Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<html:link/> not working with inbuilt ForwardAction class

 
Anuj Singh
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys.I am using 1.1.In my jsp somewhere I have written <html:link action="regn">SignUp</html:link>.Also in the struts-config I have my action mapping as:
<action path="/regn"
type="org.apache.struts.actions.ForwardAction"
parameter="/regnform.jsp">
</action>
On clicking on the hyperlink SignUp,its not going to the regnform.jsp as on clicking on the hyperlink,the URL is coming as http://localhost:8080/JavaBondCom/regn.
It should come as regn.do.But the suffix .do is not getting attached on the URL generation.
Moreover in one of the book,its written "When you use the action attribute instead of the page attribute in
<html:link>, you need not specify the “.do” explicitly.".
P.S:If in the URL bar,if I add the ".do" explicitly,it works fine!!THe regn.jsp is displayed.

So now how to resolve this problem?How will I add the suffix do in the generated URL after clicking the hyperlink??

Thanks
Anuj
 
Shailesh Kumar Saxena
Greenhorn
Posts: 25
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anuj....

You are right ..when you are using struts built-in tags , need not to add .do in action but you should write action starting with /
like

.....Its all I know. make me right , if I am wrong.

Thanks & Regards.
 
Shailesh Kumar Saxena
Greenhorn
Posts: 25
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anuj....

You are right ..when you are using struts built-in tags , need not to add .do in action but you should write action starting with /
like

.....Its all I know. make me right , if I am wrong.

Thanks & Regards.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic