Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet tricks me

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet file in which i get the values from JSP page and insert them to DB. My problem is the data's in textfield of JSP seems to be tricks me accordingly the Servlet code i put..

: EDITED :
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rajkumar balakrishnan:
If i write my code like this...




ofcourse.. you are forwarding request to vendorcp.jsp then you set the value in request.. so , how you will get the value in next page?
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friend.. then what should i do in order to refresh the page after the DB function finished... Please let me know...
 
Matteo Di Furia
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you want to be displayed after the DB has been updated ?
A new blank form ? Then



should work (assuming vendorcp.jsp is the form jsp which displays blank if no params are set in request).
Else, forward to a message JSP in which you inform of the successfull DB update.
[ September 24, 2008: Message edited by: Matteo Di Furia ]
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matteo Di Furia:
What do you want to be displayed after the DB has been updated ?
A new blank form ? Then



should work (assuming vendorcp.jsp is the form jsp which displays blank if no params are set in request).
Else, forward to a message JSP in which you inform of the successfull DB update.

[ September 24, 2008: Message edited by: Matteo Di Furia ]


But i need the request Attribute to set the object name to display a message like Data added to the vendorcp.jsp, along with blank jsp page...
I currently use ${n.result} to display that. So i need req.setAttribute("n",n/*This n is used to call result method where i have a string with value as Data added*/);

Is there other ways to accomplish that?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic