| Author |
Connection between servlet and jsp
|
divya dhage
Greenhorn
Joined: Aug 07, 2010
Posts: 2
|
|
Hi.. I am new to JAVA... I created one servlet page as controller and one JSP page for view.. now i want to connect these two pages.. how do i do it? please help me..
thanks in advance
Divya
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
Welcome to JavaRanch! You want to connect JSP from servlet for viewing purposes? If so, Use RequestDispatcher.
|
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
Use the forward() facility of the request dispatcher. That way, any scoped values that you place on the request (using setAttribute()) will be available within the JSP.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
divya dhage
Greenhorn
Joined: Aug 07, 2010
Posts: 2
|
|
Thank You.....
|
 |
 |
|
|
subject: Connection between servlet and jsp
|
|
|