jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wagle, Shriniwas" <swa...@verisign.com>
Subject How do I get Server side logs
Date Mon, 16 Sep 2002 15:22:51 GMT
I'm testing my servlet which dispatches to a JSP using the browser, as shown
below :
http://dapp1.dev.netsol.com:19840/testCRAAuth/ServletTestRunner?suite=TestCo
ntrollerServlet

I'm having following 3 problems :
1. The first one (IllegalStateException) :
==================
DEBUG httpclient.HttpMethod           -
HttpMethodBase.readResponse(HttpState,HttpConnection) 
DEBUG httpclient.HttpMethod           -
HttpMethodBase.readStatusLine(HttpState,HttpConnection) 
DEBUG httpclient.HttpConnection       - HttpConnection.readLine() 
INFO  httpclient.wire                 - << "HTTP/1.0 200 OK" [\r\n] 
DEBUG httpclient.HttpMethod           -
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) 
DEBUG httpclient.HttpConnection       - HttpConnection.readLine() 
INFO  httpclient.wire                 - << "Server:
atg.server.http.HttpServer" [\r\n] 
DEBUG httpclient.HttpConnection       - HttpConnection.readLine() 
INFO  httpclient.wire                 - << "Set-Cookie:
JSESSIONID=UZ1R15MPFHFIWCVKZM3SFEQ;path=/" [\r\n] 
DEBUG httpclient.HttpConnection       - HttpConnection.readLine() 
INFO  httpclient.wire                 - << "Content-Type: text/plain" [\r\n]

DEBUG httpclient.HttpConnection       - HttpConnection.readLine() 
DEBUG httpclient.Cookie               - Cookie.parse():  Adding cookie -
JSESSIONID=UZ1R15MPFHFIWCVKZM3SFEQ; $Path=/ 
DEBUG methods.GetMethod               -
GetMethod.readResponseBody(HttpState,HttpConnection) 
DEBUG httpclient.HttpMethod           -
HttpMethodBase.readResponseBody(HttpState,HttpConnection) 
INFO  httpclient.wire                 - << "<webresult><exception
classname="junit.framework.AssertionFailedError"><message><![CDATA[java.lang
.IllegalStateException]]></message><stacktrace><![CDATA[junit.framework.Asse
rtionFailedError: java.lang.IllegalStateException
	at junit.framework.Assert.fail(Assert.java:47)
	at
TestControllerServlet.testPerformTask(TestControllerServlet.java:56)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332)
	at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:2
35)
	at
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.
java:149)
	at
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(
LogAspect.aj(1k):125)
	at
org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(Lo
gAspect.aj(1k):1156)
	at
org.apache.cactus.server.AbstractWebTestController.handleRequest(LogAspect.a
j(1k):101)
	at
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(LogAspect.
aj(1k):123)
	at
org.apache.cactus.server.ServletTestRedirector.around113_doPost(LogAspect.aj
(1k):1156)
	at
org.apache.cactus.server.ServletTestRedirector.doPost(LogAspect.aj(1k):109)
	at
org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(LogAspect.a
j(1k):96)
	at
org.apache.cactus.server.ServletTestRedirector.around112_doGet(LogAspect.aj(
1k):1156)
	at
org.apache.cactus.server.ServletTestRedirector.doGet(LogAspect.aj(1k):92)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)

This problem happens when the servlet dispatches the request to a JSP.  I
can see the JSP execute just fine and the output of the JSP also but at the
end of it, I get this exception.

2. The second one (ClassCastException) :
====================
I'm using the following mechanism for getting the RequestDispatcher.  Is
this supported in Cactus? :
	req.getRequestDispatcher(jspName);

The cactus sample code uses :
	ServletContext.getRequestDispatcher () mechanism.  Using this
mechanism results in a  class cast exception which if I recall correctly is
HttpServletRequestWrapper class cast exception.  I don't have the log for
that case immediately available.

3. The third one (Enabling Server Side logging) :
==================
Since I'm unable to figure out what's causing this problem, and the log
seems to be that of the cactus client, how do I enable the logging for
server side classes.  Since I'm using the browser, the client and the server
are within the same application.  How do I setup a separate file for the
server side logging?  The exception that I see here is giving me little
information of where in the flow the problem is happening.

Thanks
Shriniwas Wagle

--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message