Usually, it is not this easy to get a hold of web-container objects (like request, response, session etc.) in POJOs. Still, it would help if you could provide more details like:
1. Which MVC framework are you using, if any?
2. What is the flow of request? How is the POJO (simple Java class) gets invoked?
3. Does the information that you're trying to pass from JSP to POJO have to be in Session scope, or can it be in Request scope too?
I want to send a mail to a vendor(vendors) using a button request (ORDER) when I click this button a window will open in which a checkbox,vendor name input type,services and email_address fetching from the database and I check a checkbox or all button for all checkbox list and its submit button will send the request on a servlet in which i am fecthing all the fields from the request.getParameter in this servlet i am using a simple java class.... like this and want to set value in this mail table which will show in the mail i send header of the table but in the table i want to send value according to runtime user....
May be I'm missing something here... why can't you pass userid as a parameter to the method in the simple class (mail.MailToVendor() I suppose), just like you're passing vendor name, email address etc.?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com