• 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

passing methods from one servlet to another servlet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i am a new comer to the servlet programming so please help me any one, in method passing between two servlets.
Actualy i am traying to pass parameters from servlet1 to servlet2 and after adding some more information to the servet2,i want to send entire content back to servlet1 and i want display entire thing in servelet1.

thanks for every one for helping me,in advance!!!
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can send values across as request parameters / request attributes.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought I had replied to the exact same post, but it's gone
The poster's name was different though....

Anyway, same as Lynette
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you replied to a similar post in the JSP forum.
 
Vishwanath C Kagawade
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks,Lynette Dawson for your replay!!!

i got your idea, but i am not able to implement that concept,can you able to replay me with sample code. so that i can impliment that get and set attribuet() methods in my coding.
Regard,
vishwanath
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this good enough?
http://www.rgagnon.com/javadetails/java-0401.html
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think you replied to a similar post in the JSP forum


That was it My post isn't there though... Nevermind.
 
Vishwanath C Kagawade
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, Satou kurinosuke

you are replayed to another user but problem is quite similer, but it is diffrent. according to your solution: i can only send data/parameters from servlet1 to servlet2.
my pbroblem is i have to send some information from servlet1( suppose that contain user name and user address) to servlet2(which will take user name and address from servlet1),and servlet2 will add more information say user phone number and it will send user name ,address and number to servlet1
where i can display user all details.

in simple i can drow my transaction as:servlet1-servlet2-servlet1
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vishwanath,
I'm really sorry to have disturbed your thread.
Please refer to Lynette's posts.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The logic is still the same. To communicate between two servlets, use request parameters or request attributes.

Try google, you should find plenty of tutorials for the same. If you are still struck, come back and post your code here. We would be able to help you out.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vishwanath C N
Welcome to JavaRanch!

We're pleased to have you here with us in the servlets forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
[ August 10, 2006: Message edited by: Ben Souther ]
reply
    Bookmark Topic Watch Topic
  • New Topic