File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Writing response thro' Action class and not thro' JSP. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Writing response thro Watch "Writing response thro New topic

Writing response thro' Action class and not thro' JSP.

Varun Narang
Ranch Hand

Joined: Nov 19, 2004
Posts: 30
Hello all,
I am in a little trouble regarding response writing.
How can we write response thro' Action class and still keep the control to the same page and not forward it to any other JSP(view). One method that I have tried out is by return null mapping. But I get a big fat IlligalStateException. Can anyone help me with that. I am using Tomcat v5.9 and Struts 1.2
Thanks in Advance.
Varun Narang.

Your computer system is like AC, it's of no use when you open Windows ;)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just forward to the same page again. To the user this will appear as though you just stayed on the same page.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Writing response thro' Action class and not thro' JSP.
Similar Threads
How to get SOAP response as XML in Client Struts or Servlet. ?
question from JQ+
Can we include servlet in JSP ?
JSP processing time without Network delay