• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help!

 
Ashish Kothari
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two jsp pages, one page is submiting some data ,the problem is that how to save data in database as well as well show processed data on another jsp(I don't want to open conncetion on another jsp page).
should I use servlet between two jsp pages that saves data and forward request to second jsp.
Another approach is to use self referential form.
which approach would be better.
Or any new approach ? If so ,please suggest.
Ashish
 
Li Lung
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do a forward after the 1st servlet finishes processing.
 
Amol Desai
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As you had suggested, I think it would be better if would use servlet to process and store the data and forward the request to other jsp to display to processed data
 
Ashish Kothari
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,I have come thru another solution ,as I am not passing any data ,so why don't I use request.getRequestURI to know the name of the page and proceed according to it.
is this ok?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic