my dog learned polymorphism*
The moose likes Struts and the fly likes Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding." Watch "Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding." New topic
Author

Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding.

Andrews Arokiam
Greenhorn

Joined: Mar 18, 2011
Posts: 6
I have simple jsp page say home.jsp in which i have defined it to post to "form.do."

Now consider that I have used action mapping and action path="/form", etc

in the forward tag I have used name="success" and path="/form" .

Now it wont work as it doesnt find form servlet. But if I use servlet mapping in web.xml to map form servlet then it works. Now if this is the correct way why I have not found any references to it.
Rudy Gireyev
Ranch Hand

Joined: May 03, 2011
Posts: 39
This will be easier to answer if you post your code. But I believe the path variable specifies the JSP, whereas the type variable is the one that specifies the Servlet location.
 
Consider Paul's rocket mass heater.
 
subject: Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding.
 
Similar Threads
Mapping a main Action Servlet to other servlets
How to secure my page
java.lang.NullPointerException: Module 'null' not found
Deployment.
Question about "path" in the "action" tag ?