Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need help with JSP & Servlet interaction

 
Randall Stevens
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a project, I need to have a servlet running that retrieves data from a socket interface and then go to a directory path and retreive a JSP page. The JSP file will basically be an HTML file with one parameter that needs to be embedded. The parameter will need to be dynamically passed from the servlet to the JSP page and presented to a user.
I have not done Servlets & JSPs for quite some time and do not remember how to do this.
Please Help
Randall Stevens
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you need to attach the retrieved parameter to the request with setAttribute, then use RequestDispatcher to forward the request to the JSP.
The JSP will then be able to getAttribute by name.
Bill
 
Randall Stevens
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel stupid, I do not know how to do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic