How to pass JavaBeans data to JSP using Servlets?

Answers were Sorted based on User's Feedback



How to pass JavaBeans data to JSP using Servlets?..

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

How to pass JavaBeans data to JSP using Servlets?..

Answer / muralisankar

Using RequestDispatcher as follows,

RequestDispatcher rd =
getServletContext().getRequestDispatcher("test.jsp");
rd.forward(req,res);

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Servlets Interview Questions

How to pass JavaBeans data to JSP using Servlets?

2 Answers  


How to handle exceptions thrown by application with another servlet?

0 Answers  


If a servlet is not properly initialized, what exception may be thrown?

0 Answers  


How do you communicate in between Applets and Servlets?

0 Answers  


What's the difference between servlets and applets?

0 Answers  






When a servlet accepts a call from a client, it receives two objects. What are they?

0 Answers  


What is the default HttpRequest method?

6 Answers  


What are the difference between RMI and Servlets?

0 Answers  


What is a Proxy Server?

1 Answers  


Explain jsessionid and when is it created?

0 Answers  


How do I support both get and post from the same servlet?

0 Answers  


What is the difference between an applet and a servlet?

15 Answers   GCEW, Miracle Solutions,


Categories