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 |
Explain the difference between generic servlet and http servlet?
What is servlet api used for conneting database?
How do you invoke a servelt?
How to find whether a parameter exists in the request object?
What do you mean by request dispatcher in servlet? Also explain its methods.
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
i need connection pooling code.....from harpreet.your@gmail.com
When the methods init() and Distroy() will be called?
why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet used for coding business logic and controller logic. Reason for using servlets in business logic.
What is the difference between Get and Post Method?
How does java thread pool work?
What is servlet attributes and their scope?