How to pass JavaBeans data to JSP using Servlets?
Answers were Sorted based on User's Feedback
Answer / pramod kumar
<jsp:useBean> tag can be used to avail the bean data in
case you are working with JSP's, or if you use a servlet
you can set the bean to the request object and forward it
to the JSP component and there in JSP retreive this object
and use getter methods and do something like this and it
works for sure.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / muralisankar
Using RequestDispatcher as follows,
RequestDispatcher rd =
getServletContext().getRequestDispatcher("test.jsp");
rd.forward(req,res);
| Is This Answer Correct ? | 3 Yes | 0 No |
How to maintain security in servlets?
Difference between get and post in java servlets?
What is the need of session tracking in HttpServlet ?
can i call init() method in destroy() method of servlset. ?
how many jsp scripting elements are there and what are those?
What are the steps involved in placing a servlet within a package?
What is the process for chaining servlet?
What are the supporting protocol by HttpServlet ?
How can the session in servlet can be destroyed?
Differentiate between the web server and application server?
What’s the difference between sendredirect and forward methods
Explain the working of service() method of a servlet.