Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Thread t = Thread.currentThread();
System.out.println( "Current Thread = " + t );
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Before the forward method of the RequestDispatcher interfae returns, the response content must be sent and committed, and closed by the servlet container.
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Originally posted by Madhav Lakkapragada:
jason:
Thanks for the code.![]()
And your browser should return the following:
In TestServlet
In Test2Servlet
In TestServlet
FYI.......
There is an error in the above response....
The output you mentioned is wrong. Yes, the control returns, but you can't add anything else to the response object. Please see my reply to Gennady above.
[ March 03, 2002: Message edited by: Madhav Lakkapragada ]
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:159)
at TestServlet.doGet(TestServlet.java:15)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Originally posted by Madhav Lakkapragada:
On a side note, it is valid to call getWriter() more than once on a response object.
Originally posted by Maulin Vasavada:
y not? it returns the same object ref. try to do sth like,
PrintWriter pw1 = response.getWriter();
PrintWriter pw2 = response.getWriter();
if ( pw1.equals(pw2) )
S.o.p("equals");
else
S.o.p("not-equal");
i tried it and it says "equals".
regards
maulin.
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Originally posted by jason adam:
Doh! Forgot I was running Orion at home and Tomcat at work. I haven't tried it yet on Tomcat, and since that is the reference platform, I think I would go with your behavior over what Orion provides. I'll give it a go at work tomorrow, and most likely will get the same results you have![]()
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|