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 is the get () method different from the post() method?
What are the uses of servlets?
What is servlet and how it works?
Why HttpServlet class is declared abstract?
can v create a constructor 4 servlet?
Is Servlet Class Thread safe?????? How to make servlet Thread safe ???
what is the difference between servlets and struts?
What is the difference between servlet and filter?
What are different Authentication options available in Servlets.
How can I share objects across different sessions?
What is ServletContext() and what is its use?
9 Answers Prime Technology, TCS,
How forward () method is different from send redirect () method?