*
The moose likes Struts and the fly likes Form action attribute is set to root folder 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 "Form action attribute is set to root folder" Watch "Form action attribute is set to root folder" New topic
Author

Form action attribute is set to root folder

Trivikram Kamat
Ranch Hand

Joined: Sep 26, 2010
Posts: 155
Root folder is struts.

web.xml:


struts-config.xml:


strutsForm.jsp


The above code sets form as:
<form name="sayHiForm" method="POST" action="/struts">
and not
<form name="sayHiForm" method="POST" action="StrutsSayHi.do">

Which field needs to be changed? Please help.


OCPJP6
Trivikram Kamat
Ranch Hand

Joined: Sep 26, 2010
Posts: 155
Oh, I totally forgot that I'd asked this question in this forum.

Line 19 from web.xml should be:


So that all files ending with .do extension can be forwarded to ActionServlet.
I wonder why it doesn't work with <url-pattern>/StrutsSayHi.do</url-pattern>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form action attribute is set to root folder
 
Similar Threads
struts login example issue
struts 1.beginner, code not working
a question about struts....please help
error while creating struts application
I need a help to solve this error