• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

unable to pass data in same package

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
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
container instantiates servlet. you cant
 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

seetharaman venkatasamy wrote:container instantiates servlet. you cant



can't get it.
 
Seetharaman Venkatasamy
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

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
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
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
you are welcome
 
Get off me! Here, read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic