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

What’s the difference between genericservlet and httpservlet?

0 Answers  


how can we execute servelt? what the use ".war" or ".jar" file creation

3 Answers   CTS,


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

0 Answers  


List out the difference between ServletConfig and ServletContext?

0 Answers  


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

0 Answers  






Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?

7 Answers  


Is it possible to send a mail from a servlet? Explain?

4 Answers  


when the several requests comes to server..how it manage the requests

4 Answers   iGate,


What is the major difference between context parameter and context attribute?

0 Answers  


What are the uses of servlet

0 Answers  


how a user session can be tracked in servlets?

1 Answers  


What are the types of Session Tracking ?

0 Answers  


Categories