aspose file tools*
The moose likes Struts and the fly likes struts problem on WAS 5.1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts problem on WAS 5.1.1" Watch "struts problem on WAS 5.1.1" New topic
Author

struts problem on WAS 5.1.1

ita Jonnal
Greenhorn

Joined: Feb 16, 2005
Posts: 11
My war file is deploying fine.But when I click on submit on my jsp I get the following error in the browser:
Error 503: Failed to load target servlet [action]
logs show the followng message:
E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:455)
at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:652)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(WebAppRequestDispatcherInfo.java:187)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.<init>(WebAppRequestDispatcherInfo.java:68)
at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1464)
at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1423)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
What could be the problem.I downloaded the Struts 1.2.7 from apache.org.
I have a the following folder structutre
-x
my.jsp
MTEA-INF
WEB-INF
- all tlds and dtds
-lib all jars
-classes
-yyy
-zzz
-aaaction
.class file
-fffform
.class file
-resources
-Application .prop


I war this folder and I'm deploying it on WAS 5.1.1
My Action.java and Form.java are stored in another location with the package structure yyy,zzz,.

Please give some answer.
Thanks
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Looks like it couldn't start up the struts "action Servlet" at all .

- Try taking a look at the WAS startup log, there should be a short error message telling you it failed to initialize the servlet.

- This is 90% a problem with the "struts-config.xml" file.
I didn't see mention of it in you description - is it in the correct location? is the structure correct ?

Good luck
ita Jonnal
Greenhorn

Joined: Feb 16, 2005
Posts: 11
My web.xml and srtuts-config.xml are both in WEB-INF folder .
start up log tells me the following

/18/05 9:22:51:152 EDT] 3061d113 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[7/18/05 9:22:51:168 EDT] 3061d113 AdminTool A ADMU3100I: Reading configuration for server: server1
[7/18/05 9:22:53:121 EDT] 3061d113 AdminTool A ADMU3200I: Server launched. Waiting for initialization status.
[7/18/05 9:23:52:230 EDT] 3061d113 AdminTool A ADMU3000I: Server server1 open for e-business; process id is 1200

My struts-config.xml is below:



<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"struts-config_1_1.dtd">


<struts-config>

<form-beans>
<form-bean name="PinForm" type="xx.yy.zz.aa.bb.pinrequest.form.PinForm"/>

</form-beans>

<action-mappings>
<action path="/pin" type="xx.yy.zz.aa.bb.pinrequest.action.PinAction" name="PinForm"
scope="request" input="/pin.jsp" validate="true">
<forward name="pin" path="/pin.jsp" />
</action>
</action-mappings>

<message-resources
parameter="resources.ApplicationResources"
null="false" />


<!-- Validator Configuration -->
<plug-in className="org.apache.struts
.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/
validator-rules.xml, /WEB-INF/
validation.xml"/>
</plug-in>


</struts-config>


Please tell what I'm doing wrong
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
According to the stack trace you provided, the ActionServlet is failing while trying to load the plugins. The only plugin you have specified is the validator.

I'm guessing you may not have the files validator-rules.xml and validation.xml in your WEB-INF/ folder. Check to make sure they are there and that they are valid.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts problem on WAS 5.1.1