Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

retrieve data from servlet through jsp  RSS feed

 
Joshua Cloch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Here is the problem.

in my servlet :
......
request.setAttribute("customer","Tom");
RequestDispatcher rd = request.getDispatcher("welcome.jsp");
rd.forward(request.response);
......

How can retrieve the value of customer in welcome.jsp?

any sample code is welcome!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using EL, ${customer}

And before posting that it does not work, check this page:
http://faq.javaranch.com/view?ElOrJstlNotWorkingAsExpected
 
Joshua Cloch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much.It works!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!