• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

unable to pass data in same package  RSS feed

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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 Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
container instantiates servlet. you cant
 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • 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 Java Windows XP
  • Mark post as helpful
  • send pies
  • 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
  • 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 Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are welcome
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!