This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2: Server side response..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

Struts2: Server side response.....

Sachin Ramesh Patil
Greenhorn

Joined: Feb 16, 2010
Posts: 4
Hello freinds,
I am new to struts. My problem is I got one JSP page where I have to take input from user. On click of save button data gets saved into database.

Now, after clicking save button I want to move on the same JSP. But with one extra line "Record inserted successfully" in the same JSP.
I am using struts 2 framework. I want to do it without using AJAX....

any suggestions for this?


Sachin Ramesh Patil
Pradeep Chaubey
Greenhorn

Joined: Jun 15, 2009
Posts: 20
You can put some flag in some scope(Request, Session) when database operation gets successfully completed.
Test the flag, if it is true, display your message.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

How is this different from the first time you asked this question? Please continue in your original thread.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts2: Server side response.....