Robert,
It looks like the <INPUT ... > should have an equal sign
<INPUT type="hidden" name="actionType"
value"<%=dbBean.ACTION_INTERFACE_ADD_USER%>">
here ^ making it:
<INPUT type="hidden" name="actionType"
value="<%=dbBean.ACTION_INTERFACE_ADD_USER%>">
Fred
[EMAIL PROTECTED]
-----Original Message-----
From: Robert Wohleb [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 8:30 PM
To: tomcat-user listserv
Subject: Possible Jasper/introspecthelper bug...
PLEASE HELP ME, TOMCAT DEVELOPERS
If one of the developers is around please email me. I need help tracking
this down. Here is the general situation.
I am running tomcat 3.2 with jdk 1.3 on redhat 6.2...
I have all JSP pages define a bean with scope=session as
<jsp:useBean id="dbBean" scope="session"
class="parafoil.web.custdb.CustDBBean" />
I have a file called main.jsp in /protected/process/ in the root of my
web app. All this JSP does is define the bean like above, set all params
with
<jsp:setProperty name="dbBean" property="*" />
and then forward to a page that the bean defines based upon the params
passed to it with
<jsp:forward page="<%=dbBean.getActionURL()%>" />
I have a JSP file called main.jsp in /protected/interface/ in the root
of my web app. All this JSP does is define the bean as above and show a
form by
<FORM method="post" action="/custdb/protected/process/main.jsp">
<INPUT type="hidden" name="actionType"
value"<%=dbBean.ACTION_INTERFACE_ADD_USER%>">
<INPUT type="submit" name="add_user" value="Add User">
</FORM>
The ACTION_INTERFACE_ADD_USER public variable of the bean is defined as
a public final int. I'm using this scheme for enumeration.
The root of my web app is /custdb/ by the way. All forwards work when
hardocded using URLs like /protected/interface/main.jsp
When I hit the button to submit the form I get the 500 error listed
below. The Jasper Exception does not include a message as with other
JasperExceptions I have seen. On stderr I get
2001-01-11 06:46:43 - Ctx( /custdb ): JasperException: R( /custdb +
/protected/process/main.jsp + null)
Using the 500 error listed below, I followed the line numbers into the
src to the convert function that the instrospectionhelper uses. I now
print the values for the class type and value to stderr and determined
the value being passed contains a single space. To double check, I had
the catch of convert() print a stack trace before throwing the
JasperException. As I suspected, it was caused by Integer trying to
convert a " ".
I checked the HTML from within the browser and it shows
<!-- Add user -->
<FORM method="post" action="/custdb/protected/process/main.jsp">
<INPUT type="hidden" name="actionType" value"3">
<INPUT type="submit" name="add_user" value="Add User">
</FORM>
It's not that the HTML form is passing the space.
I'm trying to follow the code back to see where the " " in value is
coming from. If one of the developers has an idea I am open to hear it.
I am currently using a "build" of the tomcat source so that I can trace
this problem, so if you need me to test some code on my sys then please
tell me.
------------------------------------------------
Error: 500
Location: /custdb/protected/process/main.jsp
Internal Servlet Error:
org.apache.jasper.JasperException:
at
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra
ry.java:215)
at
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.jav
a:157)
at
p_00025otected.process._0002fprotected_0002fprocess_0002fmain_0002ejspmain_j
sp_0._jspService(_0002fprotected_0002fprocess_0002fmain_0002ejspmain_jsp_0.j
ava:84)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
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.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
org.apache.jasper.JasperException:
at
org.apache.jasper.runtime.JspRuntimeLibrary.convert(JspRuntimeLibrary.java:1
43)
at
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra
ry.java:209)
at
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.jav
a:157)
at
p_00025otected.process._0002fprotected_0002fprocess_0002fmain_0002ejspmain_j
sp_0._jspService(_0002fprotected_0002fprocess_0002fmain_0002ejspmain_jsp_0.j
ava:84)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
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.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
------------------------------------------------
--
_______________________________________
Robert Wohleb
Web Applications Development Manager
Parafoil Software, Inc.
_______________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]