File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes What is wrong with my html:link code. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is wrong with my html:link code." Watch "What is wrong with my html:link code." New topic
Author

What is wrong with my html:link code.

Bruce Sparo
Greenhorn

Joined: Jun 24, 2004
Posts: 9
what am I doing wrong.....
<td><html:link forward="enterForgotPassword"> <html:img page="/images/forgotPassword.gif" width="149" height="21"/></html:link> </td>


My struts-config.xml config



<!-- Enter logon information -->
<action path="/enterForgotPassword"
forward="/templates/ForgotPassword.jsp">
</action>




Error 500--Internal Server Error
javax.servlet.jsp.JspException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named enterForgotPassword
at org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:499)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
at jsp_servlet._templates.__logon._jspService(__logon.java:639)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)


If I haven't already said it... THANKS for responding.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

your html:link looks for an ActionForward, not ActionMapping

<global-forwards>
<forward name="enterForgotPassword" path="/templates/ForgotPassword.jsp"></forward>
</global-forwards>


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is wrong with my html:link code.