• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding html:link

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a link which when clicked should pop-up a new window. I called a java Script function in the onClick of html:link but it shows an error message something like this:

javax.servlet.ServletException: Exception forwarding for name redirect: javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: You must specify exactly one of "forward", "href", "page" or "action"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Exception forwarding for name redirect: javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: You must specify exactly one of "forward", "href", "page" or "action"
org.apache.struts.taglib.logic.ForwardTag.doForward(ForwardTag.java:125)
org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:105)
org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:85)
org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Can anyone tell me what this error is. Also mention if any more details are to be included.

Regards
Govind Rajith
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What this message is telling you is that you must specify either an href, page, or action attribute with the <html:link> tag whether you use them or not. In this case, where you're using the onclick event to do the work, you just want to nullify the normal action that would take place as a result of the user clicking on the link. To do this, simply specify javascript:void(0) as the link. Example:
reply
    Bookmark Topic Watch Topic
  • New Topic