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?
JSP

Avatar of undefined
Last Comment
Computer101

8/22/2022 - Mon
evnafets

Check the <logic:redirect> tag on your page to make sure you are not passing it a null URL.
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
Computer101

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck