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 |
why we should override only no-agrs init() method.
Why doesn’t a servlet include main()?
What is a Session Id?
what is meant by servlet to servlet communication?
The code in a finally clause will never fail to execute, right?
What is the use of send redirect () method?
What is the capacity the doget can send to the server?
difference between forward and sendredirect
How can we refresh automatically when new data is entered into the database?
What are the security issues in Servlets?
Explain the difference between servlet and cgi?
When a client request is sent to the servlet container, how does the container choose which servlet to invoke?