aspose file tools*
The moose likes Servlets and the fly likes unable to pass data in same package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "unable to pass data in same package" Watch "unable to pass data in same package" New topic
Author

unable to pass data in same package

tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
mybean.jsp :


mybean servlet :


how can i get myname value as "cikun" in line 17 in mybean servlet . i have changed the value of myname in doGet service method.
i tried by putting this function "setTitle(myname)" in doGet but it didn't solved the problem .


Do Right , Fear No Man
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'm really not sure what you're trying to do.

Are you trying to pass data from a servlet to a JSP? Are you trying to create a JavaBean and for some reason extending a servlet?
tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
David Newton wrote:I'm really not sure what you're trying to do.

Are you trying to pass data from a servlet to a JSP? Are you trying to create a JavaBean and for some reason extending a servlet?

sorry for late reply

i am supposed to get the value "cikun" in the mybean.jsp page so for this i need to set the value in "setTitle()" method , so how can i get the value of "myname" which i have changed as "cikun" in doGet.i hope i have explained right this time
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

container instantiates servlet. you cant
tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
seetharaman venkatasamy wrote:container instantiates servlet. you cant


can't get it.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

tushar panda wrote:



jsp:useBean is designed for a JavaBean. not for a Servlet.[i did not check that jsp:useBean with servlet.but i think it wont make sense]
tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
actually i am setting a value of a variable in the doGet method , so using beans i was trying to pass the value to the jsp page .
i should be shot for trying to merge beans & servlet , ok trying now .
thanks for pointing the mistake
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

you are welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to pass data in same package