aspose file tools*
The moose likes Struts and the fly likes The requested resource (/User/WEB-INF/web.xml) is not available. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "The requested resource (/User/WEB-INF/web.xml) is not available." Watch "The requested resource (/User/WEB-INF/web.xml) is not available." New topic
Author

The requested resource (/User/WEB-INF/web.xml) is not available.

bhargavi bandaru
Greenhorn

Joined: Jun 16, 2008
Posts: 4
Hii all,

I am new to Struts,When i am trying to do a simple application in Struts containing 1 ActionForm,1 Action class,1 jsp and i kept actionform, action class in necessary packages etc and i included lib, tld files in WEB-INF.And did every thing in a proper manner. I didnot get any error while compiling but at execution time "The requested resource (/User/WEB-INF/web.xml) is not available", i am getting that error.I did this application through Eclipse and deployed through Tomcat.Please any one help me.

Thanks in advance,
Bhargavi
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Show us the full error message including the top 10 or so lines of the stack trace. Do you have a web.xml file in WEB-INF within your war file? If not, you need one.


Merrill
Consultant, Sima Solutions
bhargavi bandaru
Greenhorn

Joined: Jun 16, 2008
Posts: 4
Yes, i kept web.xml file in WEB-INF only.In the browser this message is displaying:-

type Status report

message /User/WEB-INF/pages/login.jsp

description The requested resource (/User/WEB-INF/pages/login.jsp) is not available.


In the console it is displaying:-


SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@482923
org.apache.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 25, 2008 1:18:02 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /User threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 25, 2008 1:18:03 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 25, 2008 1:18:03 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 25, 2008 1:18:03 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/79 config=null
Jun 25, 2008 1:18:03 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 25, 2008 1:18:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1875 ms
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The root cause of the error is the following line in your stack trace:
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet

Make sure that you have included all the files from the /lib directory of the Struts download materials in your WEB-INF/lib directory, most importantly struts-core-1.3.8.jar.

Another problem could be that you're trying to access a JSP in WEB-INF directly from a URL, which is not allowed. Either call an action (something.do) which forwards to the JSP, or move the JSP so that it is not in WEB-INF.
[ June 25, 2008: Message edited by: Merrill Higginson ]
bhargavi bandaru
Greenhorn

Joined: Jun 16, 2008
Posts: 4
As you told I added struts-core-1.3.8.jar in lib folder.And i kept jsp outside th WEB-INF.And i made the application run through the Action class which will forward it to the jsp page.Even then also the same error is getting reported.

HTTP Status 404 - /User/WEB-INF/classes/webforum/controller/action/LoginSubmitAction.java

--------------------------------------------------------------------------------

type Status report

message /User/WEB-INF/classes/webforum/controller/action/LoginSubmitAction.java

description The requested resource (/User/WEB-INF/classes/webforum/controller/action/LoginSubmitAction.java) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.26


Jun 25, 2008 5:09:58 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_15\bin;.;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jre1.5.0_15\bin\client;C:\Program Files\Java\jre1.5.0_15\bin;.;C:\Users\bhargavi\bin;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\Bioscrypt\VeriSoft\bin;C:\Program Files\QuickTime\QTSystem\.;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\IBM\Installation Manager\eclipse\lib;.;C:\ProgramFiles\Java\jdk1.5.0_15\bin;
Jun 25, 2008 5:09:58 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 25, 2008 5:09:58 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 784 ms
Jun 25, 2008 5:09:58 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 25, 2008 5:09:58 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
Jun 25, 2008 5:09:58 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 25, 2008 5:09:59 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet action as unavailable
Jun 25, 2008 5:09:59 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@482923
org.apache.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 25, 2008 5:09:59 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /User threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 25, 2008 5:09:59 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 25, 2008 5:09:59 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 25, 2008 5:09:59 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/29 config=null
Jun 25, 2008 5:09:59 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 25, 2008 5:09:59 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 691 ms


Please help me .Thank you
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Something is obviously very wrong with your Struts project, and from your descriptions it's hard to tell exactly what that is.

My suggestion would be to set aside your project for now and spend some time working through one or more of the Struts tutorials that are out there. Once you've done this, you will be better prepared to take on your project.

This page has links to some good tutorials.
sreeprasasd govindankutty
Greenhorn

Joined: Jun 05, 2008
Posts: 5
I agree that the root cause of the problem is


quote:

------------------------------------------------------------------------
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
------------------------------------------------------------------------

Please put the struts.jar at

---------------------------
webapps/XXXXX/WEB-INF/lib/
---------------------------

restart the server


Sreeprasad,<br />SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The requested resource (/User/WEB-INF/web.xml) is not available.