• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP & Servlet interaction  RSS feed

 
Erick Heberling
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get a String "in a servlet" by calling it in the JSP?
For example in the servlet I have:



I have set e_num equal to strUserName in the servlet. The part I am having trouble with is using a jsp expression to reference e_num.

Thanks for any advice.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would do this by binding the string to a particular scope.

In your servlet:


In your JSP:
 
Erick Heberling
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That worked. Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!