You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Donaldson, John" <Jo...@hp.com> on 2013/10/25 11:07:47 UTC

Tomcat 7 - requested resource is not available

The problem I'm facing is this: when I make a request on my application running on Tomcat I get "status 404 - the requested resource is not available".

Some background: 
This is a large and old application that I've been asked to modernize. It runs fine on an earlier Tomcat (v5 I think).
The current build has: Tomcat 7, Eclipse Kepler, Java 1.6. The project facets include the Dynamic Web Module 3.
Currently I do not have JavaServer Faces (2.2) checked.

To get this error I just request any page - either from Eclipse or outside of Eclipse.
Tomcat starts up in Eclipse, or outside. It's waiting for requests. And I can invoke the Tomcat home page.
(Also, the one-and-only html page in the app displays correctly - the problem appears for any of the jsp pages).
No errors are produced in the logs when this invocation failure occurs.
(I do have some errors earlier in the logs processing faces-config.xml)

The project structure is like this (simplified and anonymized):
- MyProj
    - source etc...
    - WebContent
        - jsp (*.jsp, *.jsf, *.html files are here)
        - WEB-INF
            - classes (.class files are here)
            - lib (jars are here)
            - faces-config.xml (nothing defined here - it's new and was not part of the old setup)
            - web.xml
    - server.xml

So, all this was working, and now fails completely. The structure hasn't changed - so I suspect it's something to do with configuration and new versions.
But I'm pretty much of a Tomcat newbie. 

Any suggestions?
It's just some big, basic error I think.

John D.

----------------------------------------
Here is an example Eclipse console log (heavily edited). The Tomcat logs (if I create a WAR and run outside of Eclipse seem to show the same).

25-Oct-2013 10:42:21 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\RA2HP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ActivIdentity\ActivClient\;C:\Program Files (x86)\ActivIdentity\ActivClient\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft BizTalk Server 2010\;C:\Program Files (x86)\Microsoft BizTalk Server 2010\Bins32;C:\Program Files (x86)\Microsoft BizTalk Server 2010\Bins64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Maven\apache-maven-3.0.5\bin;C:\Kits\Ant\apache-ant-1.9.2\bin;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;.
25-Oct-2013 10:42:21 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:RMS-II' did not find a matching property.
25-Oct-2013 10:42:22 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8181"]
25-Oct-2013 10:42:22 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
25-Oct-2013 10:42:22 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 439 ms
25-Oct-2013 10:42:22 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
25-Oct-2013 10:42:22 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
25-Oct-2013 10:42:24 org.apache.catalina.core.StandardContext addApplicationListener

... lots of Tomcat startup info messages deleted, until

INFO: MyFaces Unified EL support enabled
25-Oct-2013 10:42:26 org.apache.catalina.core.ApplicationContext log
INFO: ESP Version 3.00.00: >> Initializing ESP Server ...
- load html properties from file 'HtmlComponents.properties'...
25-Oct-2013 10:42:26 org.apache.catalina.core.ApplicationContext log

... lots of app startup info messages deleted, until

25-Oct-2013 10:42:28 ESP Version 3.00.00: >> ESP Server successfully initialized
25-Oct-2013 10:42:28 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8181"]
25-Oct-2013 10:42:28 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
25-Oct-2013 10:42:28 org.apache.catalina.startup.Catalina start
INFO: Server startup in 6485 ms

... app is now waiting for requests - nothing appears in the Eclipse console after this.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 7 - requested resource is not available

Posted by "Donaldson, John" <Jo...@hp.com>.
Urfan,

>
> Hi,
> 
> With standard Tomcat configuration you should invoke jsp pages as localhost:port/MyProj/MyJsp.jsp
> 
> Also check out how <Context/> tag is configured in server.xml file of your tomcat.
> 
> Regards,

My one and only html page (URL is like this: http://localhost:8181/esp/esp/logout.html) contains a link to "login", 
this uses this URL: http://localhost:8181/app/esp/main
Clicking this result in the previously described 404 message.
Web.xml is configured to route all requests to /esp/main/* to a servlet  (esp/espServlet which inherits from AppServlet and eventually HttpServelt).

I'm sort of perplexed by the "app" here. If I replace it by "esp" then I get the following logged:
25-Oct-2013 11:45:29 ESP Version 3.00.00: AppServlet: show login screen first
25-Oct-2013 11:45:29 ESP Version 3.00.00: Timer :Handled Request of:/login.jsp  Used Time: 2.1474836E7s
25-Oct-2013 11:45:29 ESP Version 3.00.00: Timer :Redirected to:/esp/login.jsp  Used Time: 0.0s
25-Oct-2013 11:45:29 ESP Version 3.00.00: Timer :Total Request:/login.jsp  Used Time: 0.0s

And then the URL is redirected to http://localhost:8181/app/esp/login.jsp and the page display the 404 message.

The <Context> element in server.xml appears like this:
      <Context docBase="D:\Data\RMS\wsad\workspace\esp\webApplication" path="/app" reloadable="true" source="com.ibm.etools.webtools.server:esp"/>
I have to say this looks very odd! 
I will go away and read what this is trying to say. :-( 
But, for sure for "docBase" there is no D drive in scope.

Thanks for your suggestion. In such a case as this, knowing where to look is a big help.

John D.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 7 - requested resource is not available

Posted by Urfan Alimov <al...@gmail.com>.
On Fri, Oct 25, 2013 at 12:07 PM, Donaldson, John
<Jo...@hp.com>wrote:

> The problem I'm facing is this: when I make a request on my application
> running on Tomcat I get "status 404 - the requested resource is not
> available".
>
> Some background:
> This is a large and old application that I've been asked to modernize. It
> runs fine on an earlier Tomcat (v5 I think).
> The current build has: Tomcat 7, Eclipse Kepler, Java 1.6. The project
> facets include the Dynamic Web Module 3.
> Currently I do not have JavaServer Faces (2.2) checked.
>
> To get this error I just request any page - either from Eclipse or outside
> of Eclipse.
> Tomcat starts up in Eclipse, or outside. It's waiting for requests. And I
> can invoke the Tomcat home page.
> (Also, the one-and-only html page in the app displays correctly - the
> problem appears for any of the jsp pages).
> No errors are produced in the logs when this invocation failure occurs.
> (I do have some errors earlier in the logs processing faces-config.xml)
>
> The project structure is like this (simplified and anonymized):
> - MyProj
>     - source etc...
>     - WebContent
>         - jsp (*.jsp, *.jsf, *.html files are here)
>         - WEB-INF
>             - classes (.class files are here)
>             - lib (jars are here)
>             - faces-config.xml (nothing defined here - it's new and was
> not part of the old setup)
>             - web.xml
>     - server.xml
>
> So, all this was working, and now fails completely. The structure hasn't
> changed - so I suspect it's something to do with configuration and new
> versions.
> But I'm pretty much of a Tomcat newbie.
>
> Any suggestions?
> It's just some big, basic error I think.
>
> John D.
>
> ----------------------------------------
> Here is an example Eclipse console log (heavily edited). The Tomcat logs
> (if I create a WAR and run outside of Eclipse seem to show the same).
>
> 25-Oct-2013 10:42:21 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\RA2HP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\ActivIdentity\ActivClient\;C:\Program Files
> (x86)\ActivIdentity\ActivClient\;c:\Program Files (x86)\Microsoft SQL
> Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
> Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
> Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
> Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft
> SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft BizTalk Server
> 2010\;C:\Program Files (x86)\Microsoft BizTalk Server
> 2010\Bins32;C:\Program Files (x86)\Microsoft BizTalk Server
> 2010\Bins64;C:\Program Files (x86)\Microsoft Visual Studio
> 9.0\Common7\IDE\PrivateAssemblies\;C:\Maven\apache-maven-3.0.5\bin;C:\Kits\Ant\apache-ant-1.9.2\bin;C:\Program
> Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;.
> 25-Oct-2013 10:42:21 org.apache.tomcat.util.digester.SetPropertiesRule
> begin
> WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
> property 'source' to 'org.eclipse.jst.jee.server:RMS-II' did not find a
> matching property.
> 25-Oct-2013 10:42:22 org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8181"]
> 25-Oct-2013 10:42:22 org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
> 25-Oct-2013 10:42:22 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 439 ms
> 25-Oct-2013 10:42:22 org.apache.catalina.core.StandardService startInternal
> INFO: Starting service Catalina
> 25-Oct-2013 10:42:22 org.apache.catalina.core.StandardEngine startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
> 25-Oct-2013 10:42:24 org.apache.catalina.core.StandardContext
> addApplicationListener
>
> ... lots of Tomcat startup info messages deleted, until
>
> INFO: MyFaces Unified EL support enabled
> 25-Oct-2013 10:42:26 org.apache.catalina.core.ApplicationContext log
> INFO: ESP Version 3.00.00: >> Initializing ESP Server ...
> - load html properties from file 'HtmlComponents.properties'...
> 25-Oct-2013 10:42:26 org.apache.catalina.core.ApplicationContext log
>
> ... lots of app startup info messages deleted, until
>
> 25-Oct-2013 10:42:28 ESP Version 3.00.00: >> ESP Server successfully
> initialized
> 25-Oct-2013 10:42:28 org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-8181"]
> 25-Oct-2013 10:42:28 org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"]
> 25-Oct-2013 10:42:28 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 6485 ms
>
> ... app is now waiting for requests - nothing appears in the Eclipse
> console after this.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Hi,

With standard Tomcat configuration you should invoke jsp pages as
localhost:port/MyProj/MyJsp.jsp

Also check out how <Context/> tag is configured in server.xml file of your
tomcat.

Regards,