dcsimg
how can we pass an object as parameter to the servlet url ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   faisal_parwani
Posted On:   Tuesday, April 3, 2001 05:03 AM

My jsp will get some objects from ejb than i want to send
this object to a servlet with in url like followint

http://localhost:8080/servlet/Myservlet?Myobject

I want to send an object to the servet with in url ?

how can i do this and how will i handle it in servlet

Re: how can we pass an object as parameter to the servlet url ?

Posted By:   Igor_Royzis  
Posted On:   Tuesday, April 3, 2001 10:01 AM

You can't send objects as parameters in a url string. You can save the object in your session though, like this:

session.setAttribute("MyObject", MyObject);

Then in your servlet you would get it like this:

Object myObject = request.getSession(false).getAttribute("MyObject");
About | Sitemap | Contact