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 |
What's the use of servletcontext?
What are the types of an http request?
How we can get ip address of client in servlet?
give the syntax of doGet() and doPost()?
What is lazy loading and what is Generic Servlet Class?
When should you prefer to use doget() over dopost()?
What compiler do not do if we create our own constructor?
Why servlet is used as controller ? Not JSP? I want complete explation?
How many Cookies can a host support?
What is servlet and its use?
Explain in detail about applet to servlet communication?
Can we write a constructor for a Servlet class ? if yes how ? if no why not ?