This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes How to update a 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 » Java » JSP
Bookmark "How to update a JSP" Watch "How to update a JSP" New topic
Author

How to update a JSP

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
I have a main JSP page, where the user can input all the request parameters and it displays response on the same JSP page.

I also have a global listener java class which automatically gets notifications when a new record gets added to the system. When this notification is received I want to send the output to a second JSP page. And put a tab or any kind of link on the main JSP (above) to view the contents of the second JSP. How can I achieve this? Any pointers. I am using simple servlet and jsp technology.


thanks
Trupti
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
I also have a global listener java class which automatically gets notifications when a new record gets added to the system. When this notification is received I want to send the output to a second JSP page. And put a tab or any kind of link on the main JSP (above) to view the contents of the second JSP. How can I achieve this? Any pointers. I am using simple servlet and jsp technology.


Well, you can have multiple tabs on your main jsp. You can have first tab enabled by default( means the content of the first tab is only visible), you can then put all the input fields in the first tab and submit the form. When you process the request, have your servlet dispatch the request to the same jsp with some selected tab index.

As far as listener is concerned, you can add something in application scope, then when the next request comes, you put additional data to request attribute. You can not directly send output from the listener itself. Have a filter or some kind of Wrapper object that can enrich your request and response object.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to update a JSP
 
Similar Threads
Session management in Servlets
frameset and shortcut keys problem
Why is my Filter called for every image, included jsp and the main jsp?
How to share value between mutiple war files?
Refresh Problem : same action gets called