aspose file tools*
The moose likes Servlets and the fly likes I need help with JSP & Servlet interaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "I need help with JSP & Servlet interaction" Watch "I need help with JSP & Servlet interaction" New topic
Author

I need help with JSP & Servlet interaction

Randall Stevens
Ranch Hand

Joined: Jul 01, 2003
Posts: 65
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

Joined: Mar 22, 2000
Posts: 12835
    
    5
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

Joined: Jul 01, 2003
Posts: 65
I feel stupid, I do not know how to do that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I need help with JSP & Servlet interaction