Link to home
Create AccountLog in
Avatar of ggridley
ggridley

asked on

Problem with redirect tag

I'm revisiting a really old app which is running off Tomcat 5.5.12.  In the server.xml I have a Context tag (with reloadable="true") pointing tomcat to my development area so I don't have to redeploy war files.

Tomcat appears to start up fine.   When I access my the project in Tomcat I get:
------------------------------------------------------------------------------
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.NullPointerException
      org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:428)
      org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:311)
      org.apache.struts.taglib.logic.RedirectTag.generateRedirectURL(RedirectTag.java:294)
      org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:268)
      org.apache.jsp.index_jsp._jspx_meth_logic_redirect_0(org.apache.jsp.index_jsp:87)
      org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:59)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
-------------------------------------------------------------------------

The struts-config.xml looks fine.  

I confirmed that I have the following jars in my web\WEB-INF\lib folder:

commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jstl.jar
jta.jar
log4j.jar
standard.jar
struts.jar

What else should I check?
Avatar of evnafets
evnafets

Check the <logic:redirect> tag on your page to make sure you are not passing it a null URL.
Avatar of ggridley

ASKER

I wasn't.  I found the problem and it was really, really stupid on my part.  I have two projects in eclipse with similar names, and I was building the struts-config.xml for the wrong one.  I'm sorry people!  What a waste of a day today was for me.  No more naming projects checked out CVS that are similar to each other.   I'll put a post in Community Support to delete this question.  Just a few minutes too late to do it myself.  Sorry again.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account