• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet tricks me

 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic