File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Andrews Arokiam
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic