You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Tomsic <pt...@yahoo.com> on 2003/01/15 22:28:43 UTC

Re: stack trace error when viewing html source, but the display inbrowser is good.

yes, what I'm saying is that our servlet is actually
sending the output to the browser, but when you view
source of that output in the browser, it displays a
stacktrace.  The browser, however, is showing what we
expect (the desired HTML).
Here's the stackTrace:
(I've removed the html,head,title tags, and
DisplayTemplateAction.java line 26 is the code that I
put into my original msg. where it does a
ServletOutputStream.write(byte[]) and if I system.out
the byte array, it shows the desired html)

Apache Tomcat/4.1.12 - Error report
HTTP Status 500 - type Exception report 
message description
The server encountered an internal error () that
prevented it from fulfilling this request.
exception java.lang.NullPointerException
	at
com.cappsdigital.actions.DisplayTemplateAction.perform(DisplayTemplateAction.java:26)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:491)


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: stack trace error when viewing html source, but the display inbrowser is good.

Posted by Jason Pyeron <ja...@pyeron.com>.
good advice, my next step would be to use curl.

my favorite usage is:
 curl -viLsA 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705)' url

-F for form values
-b & -c for cookies
-k for ssl issues
-u for user auth
-o for output file ( i like the screen better )


On Thu, 16 Jan 2003, mwm wrote:

If the browser is displaying what you expect then the html (or at least some
of it) must be getting to sent to the browser, right?
Either, as someone already implied, the browser is loading up a cached
version of the page, or alternatively, the browser is getting sent a mix of
the correct response and the error.  This can happen if the output you're
producing is sufficiently large that it won't fit in the buffer (which is 8k
by default, I think).

Next time the browser displays "what you expect" choose a bit of reasonably
distinct text being displayed in the browser-window, do View / Source, then
search for the text in the source somewhere.  (Come to think of it, try
searching  to see if the <html> start tag appears more than once.)

Hope that inspires!

Mike.



----- Original Message -----
From: "Nathan McMinn" <nm...@charter.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 11:36 PM
Subject: Re: stack trace error when viewing html source, but the display
inbrowser is good.


Is it possible that the response.getOutputStream() method is returning a
null?

----- Original Message -----
From: "Paul Tomsic" <pt...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 3:28 PM
Subject: Re: stack trace error when viewing html source, but the display
inbrowser is good.


> yes, what I'm saying is that our servlet is actually
> sending the output to the browser, but when you view
> source of that output in the browser, it displays a
> stacktrace.  The browser, however, is showing what we
> expect (the desired HTML).
> Here's the stackTrace:
> (I've removed the html,head,title tags, and
> DisplayTemplateAction.java line 26 is the code that I
> put into my original msg. where it does a
> ServletOutputStream.write(byte[]) and if I system.out
> the byte array, it shows the desired html)
>
> Apache Tomcat/4.1.12 - Error report
> HTTP Status 500 - type Exception report
> message description
> The server encountered an internal error () that
> prevented it from fulfilling this request.
> exception java.lang.NullPointerException
> at
>
com.cappsdigital.actions.DisplayTemplateAction.perform(DisplayTemplateAction
.java:26)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
> at java.lang.Thread.run(Thread.java:491)
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Owner & Lead                  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)           500 West University Parkway #1S -
- +1 410 467 2266 (f)           Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: stack trace error when viewing html source, but the display inbrowser is good.

Posted by mwm <to...@ward-murphy.co.uk>.
If the browser is displaying what you expect then the html (or at least some
of it) must be getting to sent to the browser, right?
Either, as someone already implied, the browser is loading up a cached
version of the page, or alternatively, the browser is getting sent a mix of
the correct response and the error.  This can happen if the output you're
producing is sufficiently large that it won't fit in the buffer (which is 8k
by default, I think).

Next time the browser displays "what you expect" choose a bit of reasonably
distinct text being displayed in the browser-window, do View / Source, then
search for the text in the source somewhere.  (Come to think of it, try
searching  to see if the <html> start tag appears more than once.)

Hope that inspires!

Mike.



----- Original Message -----
From: "Nathan McMinn" <nm...@charter.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 11:36 PM
Subject: Re: stack trace error when viewing html source, but the display
inbrowser is good.


Is it possible that the response.getOutputStream() method is returning a
null?

----- Original Message -----
From: "Paul Tomsic" <pt...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 3:28 PM
Subject: Re: stack trace error when viewing html source, but the display
inbrowser is good.


> yes, what I'm saying is that our servlet is actually
> sending the output to the browser, but when you view
> source of that output in the browser, it displays a
> stacktrace.  The browser, however, is showing what we
> expect (the desired HTML).
> Here's the stackTrace:
> (I've removed the html,head,title tags, and
> DisplayTemplateAction.java line 26 is the code that I
> put into my original msg. where it does a
> ServletOutputStream.write(byte[]) and if I system.out
> the byte array, it shows the desired html)
>
> Apache Tomcat/4.1.12 - Error report
> HTTP Status 500 - type Exception report
> message description
> The server encountered an internal error () that
> prevented it from fulfilling this request.
> exception java.lang.NullPointerException
> at
>
com.cappsdigital.actions.DisplayTemplateAction.perform(DisplayTemplateAction
.java:26)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
> at java.lang.Thread.run(Thread.java:491)
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: stack trace error when viewing html source, but the display inbrowser is good.

Posted by Nathan McMinn <nm...@charter.net>.
Is it possible that the response.getOutputStream() method is returning a
null?

----- Original Message -----
From: "Paul Tomsic" <pt...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 3:28 PM
Subject: Re: stack trace error when viewing html source, but the display
inbrowser is good.


> yes, what I'm saying is that our servlet is actually
> sending the output to the browser, but when you view
> source of that output in the browser, it displays a
> stacktrace.  The browser, however, is showing what we
> expect (the desired HTML).
> Here's the stackTrace:
> (I've removed the html,head,title tags, and
> DisplayTemplateAction.java line 26 is the code that I
> put into my original msg. where it does a
> ServletOutputStream.write(byte[]) and if I system.out
> the byte array, it shows the desired html)
>
> Apache Tomcat/4.1.12 - Error report
> HTTP Status 500 - type Exception report
> message description
> The server encountered an internal error () that
> prevented it from fulfilling this request.
> exception java.lang.NullPointerException
> at
>
com.cappsdigital.actions.DisplayTemplateAction.perform(DisplayTemplateAction
.java:26)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
> at java.lang.Thread.run(Thread.java:491)
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>