• Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getRequestURL not returning correct path  RSS feed

 
James Li
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We recently had an upgrade from Tomcat 4 to Tomcat 6.0.18. Previously we used the code snippet below to create a link in our JSP
that spawns a new window with the a printer friendly version of the screen.

JSP link snippet
[<a class="supnav" href="<%= request.getRequestURL() + "?" + request.getQueryString() %>&printerFriendly=true" target="_blank" >Printer Friendly Version</a>]

Before the upgrade request.getRequestURL() would return http://localhost:8081/Portal/project/projectGroupAction.do in my test environment. After the upgrade it returns http://localhost:8081/template/tile_definition.jsp . Context path also comes back as null but the query string is fine. When the user clicks on the link to create the print friendly version we get the following error message

javax.servlet.ServletException: javax.servlet.jsp.JspException: Error - Tag Insert : At least one of the following attribute must be defined : template|page|attribute|definition|name|beanName. Check tag syntax
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.template.tile_005fdefinition_jsp._jspService(tile_005fdefinition_jsp.java:146)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)...


This was working fine before the upgrade but after the upgrade stopped working. Any help will be greatly appreciated.




 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Night Owl", please check your private messages regarding an important administrative matter.

Thank you.
 
James Li
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also forgot to mention that the portion of code that is currently not working is in a header that is substituted into all our pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!