This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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.
 
Don't get me started about those stupid light bulbs.
 
subject: Do we need servlet mapping of a servlet in web.xml while using struts Action and forwarding.