• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem Deploying a Struts Application in Eclipse

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I build the application using Ant and can deploy it just fine manually in Tomcat, but when I try to run it via Eclipse, I get an HTTP 404 error (requested resource is not available). Here is the console output from running Tomcat manually (note in bold where the appliation is deployed):

Apr 23, 2011 6:23:04 PM or g.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: c:\software
\glassfish3\jdk\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\
software\csvn\bin\;C:\software\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\
Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\P
rogram Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\
Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Common Files\
Ulead Systems\DVD;C:\Program Files\Common Files\HP\Digital Imaging\bin;C:\Progra
m Files\Hewlett-Packard\Digital Imaging\bin\;C:\Program Files\Hewlett-Packard\Di
gital Imaging\bin\Qt\Qt 4.3.3;C:\Program Files\QuickTime\QTSystem\;C:\Windows\Sy
stem32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\software\csvn
\bin\;C:\software\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\Syste
m32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\
Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\
9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program F
iles\Common Files\Ulead Systems\MPEG;C:\Program Files\Common Files\Ulead Systems
\DVD;C:\Program Files\Common Files\HP\Digital Imaging\bin;C:\Program Files\Hewle
tt-Packard\Digital Imaging\bin\;C:\Program Files\Hewlett-Packard\Digital Imaging
\bin\Qt\Qt 4.3.3;C:\Program Files\QuickTime\QTSystem\;C:\Windows\System32\Window
sPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;c:\users\valeriep\documents\s
oftware\apache-ant-1.8.2\bin;c:\program files\mysql\mysql server 5.5\bin
Apr 23, 2011 6:23:06 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8989"]
Apr 23, 2011 6:23:06 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8109"]
Apr 23, 2011 6:23:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2758 ms
Apr 23, 2011 6:23:06 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 23, 2011 6:23:06 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Apr 23, 2011 6:23:06 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive TIFO.war
Apr 23, 2011 6:23:09 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://displaytag.sf.net is already defined
Apr 23, 2011 6:23:10 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://displaytag.sf.net is already defined
Apr 23, 2011 6:23:11 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
Apr 23, 2011 6:23:11 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
Apr 23, 2011 6:23:11 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
Apr 23, 2011 6:23:11 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
Apr 23, 2011 6:23:11 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
0 INFO 2011-04-23 18:23:18,804 Thread-2 ResponseOverrideFilter.init(Response
OverrideFilter.java:108) Filter initialized. Response buffering is enabled
Apr 23, 2011 6:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Apr 23, 2011 6:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Apr 23, 2011 6:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Apr 23, 2011 6:23:21 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Apr 23, 2011 6:23:21 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Apr 23, 2011 6:23:21 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8989"]
Apr 23, 2011 6:23:21 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8109"]
Apr 23, 2011 6:23:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14872 ms


Here is the console output from Eclipse (application is not deployed even though I added it as a project to the server instance in Eclipse):

Apr 23, 2011 5:57:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\software\csvn\bin\;C:\software\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Common Files\Ulead Systems\DVD;C:\Program Files\Common Files\HP\Digital Imaging\bin;C:\Program Files\Hewlett-Packard\Digital Imaging\bin\;C:\Program Files\Hewlett-Packard\Digital Imaging\bin\Qt\Qt 4.3.3;C:\Program Files\QuickTime\QTSystem\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\software\csvn\bin\;C:\software\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Common Files\Ulead Systems\DVD;C:\Program Files\Common Files\HP\Digital Imaging\bin;C:\Program Files\Hewlett-Packard\Digital Imaging\bin\;C:\Program Files\Hewlett-Packard\Digital Imaging\bin\Qt\Qt 4.3.3;C:\Program Files\QuickTime\QTSystem\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;c:\users\valeriep\documents\software\apache-ant-1.8.2\bin;c:\program files\mysql\mysql server 5.5\bin;C:\Users\valeriep\Documents\Software\eclipse;
Apr 23, 2011 5:57:12 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:tifo' did not find a matching property.
Apr 23, 2011 5:57:13 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8989"]
Apr 23, 2011 5:57:13 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8109"]
Apr 23, 2011 5:57:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4341 ms
Apr 23, 2011 5:57:13 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 23, 2011 5:57:13 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Apr 23, 2011 5:57:22 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [7,174] milliseconds.
Apr 23, 2011 5:57:29 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8989"]
Apr 23, 2011 5:57:29 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8109"]
Apr 23, 2011 5:57:29 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 15489 ms

What am I missing?
 
Ranch Hand
Posts: 35
Hibernate jQuery Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In eclipse project explorer goto server directory and find your server directory in that open server.xml and remove Context tag within host tag. This should help.
 
Valerie Pressley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have a context tag within the host tag of my server.xml file. Any other suggestions? Running Tomcat 7.
 
Rupesh Mhatre
Ranch Hand
Posts: 35
Hibernate jQuery Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder where have you checked for server.xml file in tomcat installation directory or eclipse server directory.
 
Valerie Pressley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I opened the server.xml file in Eclipse located under the server folder. The direcory of the file is:
C:\Users\valeriep\Documents\Software\eclipse\workspace\Servers2\Tomcat v7.0 Server at localhost-config\server.xml, which is the Eclipse project directory, right? Is this the file you are referring to?
 
Rupesh Mhatre
Ranch Hand
Posts: 35
Hibernate jQuery Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i was talking about that file only. Please check in your tomcat installation config/server.xml if you have something like <Context docBase="F:\tomcat\apache-tomcat-7.0.2\webapps\Test" path="/Test" reloadable="true" source="org.eclipse.jst.jee.server:Test"/> if yes then please remove source attribute from it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic