Hi, I am new to Struts, i am facing the following a problem with the action mappings. Here are my code snippets In web.xml ------------ <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> In login.jsp ------------- <html:form action="/Login" name="LoginForm" type="com.xxx.yyy.LoginForm" >
With the above code, when the login.jsp is submitted the values have to be filled in LoginForm which is an ActionForm for the ActionClass LoginAction . The associated action path is supposed to be /Login but when the jsp is submitted i get an error page saying The requested resource (/MyApp/Login.do) is not available. Can somebody point me where am i wrong ? I am using Tomcat 4.1.24, Struts 1.1 TIA Meka Toka
Yes i have defined the ActionServlet in the web.xml, the reason why i didnt provide the code snippet earlier is because i was trying to show all the code related to the action mapping in both the deployment descriptors. This looks like a problem that many beginners face, i searched but found no solution. Any more suggestions ? TIA Meka Toka [ July 24, 2003: Message edited by: meka toka ]
I vaguely remember this happening to me a while back. I'll have to get back to you later though...In the meantime, try searching this site and the web for that error message; use a search phrase like "Tomcat Struts resource not available"
Joined: Dec 11, 2002
Also can somebody clarify this When a struts application is deployed on Tomcat server, should there be any pop ups of the Action Mapping, Success and Failure files. If the pop up doesnt come up in stack trace when starting Tomcat, does it mean that the form-beans(ActionForms) are not properly configured in deployment descriptors ? Does extending the ActionMapping and writing your own ActionMapping cause any of these pop ups ? I am asking this because, when i start Tomcat no popups comeup, where as when i place storefront sample application, there are pop ups of the Form beans, and some other stuff. Thank You Meka Toka
Hi, I guess the problem is in the jsp page from where you click on the link to invoke the action. I got the same error when I was using <a href=""></a> instead of <html:link></html:link>. My mistake was I was using an extra "/". So if you check the address in the task bar when you put your mouse on the link of that action you might get a clue.