I noticed that some tags do have more specific error messages. For example,
if you use the iterate tag and specifically an invalid rte for the
collection property you get both a stack trace and a JSP error message in
the browser. I think this is the type of error message that should be
generated for any error that occurs in a tag..

The error should be sent to the browser as a JSP error as well, since page
designers may not have access to the servlet log file- or at least it won't
be as convenient.  The error message should state the tag type, name,
property, etc... that resulted in the error so you can jump right to the
section of JSP that caused the error.



-----Original Message-----
From: Will Spies/Towers Perrin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 3:20 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Debugging struts exceptions





I think really if someone just put some extra logging in the tag libraries
the way it's in the other struts code...for example:

    if (servlet.getDebug() >= 1)
        servlet.log(...);

this would be a huge help and not a whole lot of effort...

Will





 

 

                                         To:
<[EMAIL PROTECTED]>                                  
                    "Kurt Olsen"         cc:     (bcc: Will Spies/Towers
Perrin)                                   
                    <kolsen@get2h        Subject:     RE: Debugging struts
exceptions                              
                    awaii.com>

 

                    04/04/01

                    03:06 PM

                    Please

                    respond to

                    struts-user

 

 




I'm just living with it but we hate it. Struts is working extremely well
for
us but I'd have to say that from the perspective of the page designers it
makes struts look much more 'raw' than it is. As a developer I know what
struts is doing for us (ie look at the alternatives) but some attention
needs to be focused on these error messages. Anybody got the time? I don't!
Sorry..
Kurt


-----Original Message-----
From: Will Spies/Towers Perrin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 4:58 AM
To: [EMAIL PROTECTED]
Subject: Debugging struts exceptions




I didn't get any response so I'm going to try again. Here is another
exception:

Wed Apr 04 10:53:26 EDT 2001:<E> <WebAppServletContext-tpsampleapp> Root
cause of ServletException
javax.servlet.ServletException: runtime failure in custom tag 'form'
     at jsp_servlet._employee._jspService(_employee.java, Compiled Code)
     at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
     at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:106)
     at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:124)
     at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp

l.java:154)
     at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja

va:1697)
     at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
     at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
     at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:106)
     at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp

l.java:507)
     at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp

l.java:481)
     at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext

Manager.java:252)
     at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
     at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)

I can't really say that this is very helpful in determing what the problem
is in my JSP code except that inside 'some' form there is 'some' problem. I
get past these but I could do it quicker if there was some sort of extra
logging. Is there extra logging that I can turn on for the tag libraries?
What's the recommend way to debug this ( let's say without a remote JSP
debugger though ) or does everyone just live with this?

This could be a newbie stupid question. If so I apologize in advance.
Thanks for any information!

Will



----- Forwarded by Will Spies/Towers Perrin on 04/04/01 10:54 AM -----


                                         To:
[EMAIL PROTECTED]
                    Will Spies           cc:
                                         Subject:     Debugging struts
exceptions - correction
                    04/03/01
                    08:13 AM






Oops...I put the wrong tag in there:

<html:form action="/logon" focus="badproperyname">

(see what I mean?)



----- Forwarded by Will Spies/Towers Perrin on 04/03/01 08:12 AM -----


                                         To:
[EMAIL PROTECTED]
                    Will Spies           cc:
                                         Subject:     Debugging struts
exceptions
                    04/03/01
                    08:12 AM






Seems certain exceptions don't come with very good explanations. For
example, I have a tag which had a bad property:

<html:text property="badpropertyname" size="16" maxlength="16"/>

If 'badpropertyname' does not exist the exception I see in the log file is:

javax.servlet.ServletException: runtime failure in custom tag 'form'
     at jsp_servlet._logon._jspService(_logon.java, Compiled Code)
     at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
     at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:106)
     at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp

l.java:507)
     at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp

l.java:481)
     at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext

Manager.java:252)
     at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
     at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)


This doesn't always happen but it happens here and this is probably a
pretty common error. Any suggestions?

P.S. I use WLS 5.1 SP8









Reply via email to