aspose file tools*
The moose likes Servlets and the fly likes Connection between servlet and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Connection between servlet and jsp" Watch "Connection between servlet and jsp" New topic
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: 61661
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
divya dhage
Greenhorn

Joined: Aug 07, 2010
Posts: 2
Thank You.....
 
Consider Paul's rocket mass heater.
 
subject: Connection between servlet and jsp