Dan
I might have a too much info in my question, down in the detail of the question, I
mention the compile error occurs on a simple .jsp. Since the error happens when the
.JSP is being compiled into a Servlet, and the 'JSP has no direct reference to
pageContext.getSession(). I don't have any control over casting the object. It is in
the java that is generated for me when converting it into a Servlet. Sincere thanks
for looking at the issue. Any other ideas?
bryan Connor
[EMAIL PROTECTED] wrote:
Try this:
session = (HttpSession)pageContext.getSession();
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 11:29 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 3.2.1 JSP compile problem - A quick look, please?
Thanks to anyone out there in the ether that responds...
Did my homework, still can't figure it out... After hours spinning through
the archives of this mail forum, I have to break down and ask for help
I am trying to run a simple login.jsp from
/opt/jakarta-tomcat-3.2.1/webapps/portal2
The URL would be like http://999.99.99.245:8080/portal2/logon.jsp
Even the simplest Hello world .JSP yields the error below.
I have re-installed Tomcat, thrashed around with the /conf/server.xml,
sacrificed a chicken, and still no luck
The weird thing is that I have another application defined in this Tomcat
instance located at
/opt/jakarta-tomcat-3.2.1/webapps/portal/servlet
If I address a URl like http://999.99.99.245:8080/portal/servlet/logon.jsp
This works fine, the .JSP compiles clean and all is well.
Any ideas?
Error: 500
Location: /portal2/logon.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for
JSP/opt/jakarta-tomcat-3.2.1/work/localhost_8080%2Fportal2/_0002flogon_0002e
jsplogon_jsp_0.java:52: Incompatible type for =. Explicit cast needed to
convert javax.servlet.http.HttpSession to HttpSession.
session = pageContext.getSession();
^
1 error
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(ServletException.java:107)
at org.apache.jasper.JasperException.(JasperException.java:73)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Environment
Tomcat 3.2.1 Binaries version
Solaris 8 (I think..)
Java 1.2
No Apache in the mix at all...yet!
2001-05-18 05:21:01 - ContextManager: Tomcat classpath =
./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/parser.jar:.
/../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:/usr/java1.2/lib/to
ols.jar:/usr/java1.2/lib/classes.zip:/opt/oracle/8.1.7/jdbc/lib/classes12.zi
p:/opt/jakarta-tomcat-3.2.1/webapps/portal/WEB-INF/classes
Thanks
Bryan Connor
Consultant (Pennsylvania, USA)
__
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/
__
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/