File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts Forms ( html:form ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Forms ( html:form )" Watch "Struts Forms ( html:form )" New topic

Struts Forms ( html:form )

S Krishnan

Joined: Aug 22, 2005
Posts: 5
How do I give the action url in the <html:form> tag, inorder to point (submit) to the same page. I am using a JSP page.

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
<html:form action="/actionName">
vijaya bharath
Ranch Hand

Joined: Jun 10, 2005
Posts: 66

I didn't get u
You told like you are working on jsp page
And the submit button shud return to the same page
If u want to return to the same jsp page with out going to the action u can use <html:link> which directly calls jsp page
Other wise if u want to come to the same jsp page by going to the action
In that action u can write forward to the same jsp page
I think u got my point.
if u write<html:form action="/action">
in the action return mapping.findForward("success");
In the struts-config.xml
Give in the action mappings
<action name="something" path="/action" type="something">
<forward name="success" type="something" />

Regards,<br />Vijaya Bharath.<br />SCJP1.4 <br />SCWCD5.0
I agree. Here's the link:
subject: Struts Forms ( html:form )
It's not a secret anymore!