Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


suveer
request dispatcher
1 Answer(s)      5 years and 11 months ago
Posted in : Java Interview Questions



Advertisement
View Answers

December 20, 2008 at 3:32 AM


Hi friend,

getRequestDispatcher

RequestDispatcher getRequestDispatcher(java.lang.String uri)

Returns a request dispatcher for later inclusion or forwarding. This is the servlet API equivalent to SSI includes.
The uri is relative to the application root.

The following example includes the result of executing inc.jsp into the output stream. If the context path is /myapp,
the equivalent uri is /myapp/inc.jsp

RequestDispatcher disp;
disp = getRequestDispatcher("/test.jsp");
disp.include(request, response);


ServletRequest to return a request dispatcher relative to the request uri.

Parameters:
uri - path relative to the app root (including query string) for the included file.
Returns:
RequestDispatcher for later inclusion or forwarding.

getNamedDispatcher

RequestDispatcher getNamedDispatcher(java.lang.String servletName)

Returns a request dispatcher based on a servlet name.

Parameters:
servletName - the servlet name to include or forward to.
Returns:
RequestDispatcher for later inclusion or forwarding.


Thanks


Related Tutorials/Questions & Answers:
JSP Request Dispatcher
JSP Request Dispatcher   ...; <body> <h2>Request Dispatcher in Jsp</h2> <... the RequestDispatcher class to transfer the current request to another jsp page. You can
request dispatcher - Java Interview Questions
RequestDispatcher getRequestDispatcher(java.lang.String uri) Returns a request dispatcher... dispatcher relative to the request uri. Parameters: uri - path...) Returns a request dispatcher based on a servlet name. Parameters
Advertisements
compre request dispatcher and send redirectmethod - Framework
compre request dispatcher and send redirectmethod  compre request dispatcher and send redirectmethod  Hi I am sending a link where u will found in details about RequestDispatcher vs sendRedirect methods. http
HOW TO USE REQUEST DISPATCHER - Servlet Interview Questions
HOW TO USE REQUEST DISPATCHER  PLEASE USE A BUSINESS CODES TO EXPLAIN HOW TO USE REQUEST DISPATCHER, SESSION MANAGEMENT AND URL REWRITING. AND USE MSSQL DATABASE TO SAVE THE DATA THANKS FOR YOUR SOLUTION IN ADVANCE
Event Dispatcher Thread
Event Dispatcher Thread       In the tutorial Java Event Dispatcher thread in Graphics... is going to show you Event Dispatcher thread that will wait for the events
Event Dispatcher Thread
Event Dispatcher Thread       In the tutorial Java Event Dispatcher thread in Graphics... is going to show you Event Dispatcher thread that will wait for the events
How to send the request and get the request?
How to send the request and get the request?  how to send a request to a JSP file in another domain in the same server and get the request done i.e how to include JSP file of one domain to another doamin JSP within in the same
request this program
request this program  if three text box value in my program i want to check the three input boxes values and display greatest two values
request to help
request to help   how to write the program for the following details in java Employee Information System An organization maintains the following data about each employee. Employee Class Fields: int Employee ID String Name
setAttribute() Method Of The Request Object
the request object through the dispatcher method. The set value of the attribute... setAttribute() Method Of The Request Object... the best illustration about the setAttribute() method of the request object in JSP
request processing in servlets
request processing in servlets  how request processing is done in servlets and jsp   Please visit the following links: JSP Tutorials Servlet Tutorials Here, you will find several examples of processing request
getAttribute() Method Of The Request Object
getAttribute() Method Of The Request Object... for the illustration of the getAttribute() method of the request object in JSP... that is set through the setAttribute() method of the request object. The getAttribute
jsp request in struts1
jsp request in struts1  how the request for a JSp is processed in Struts1?Any JsP page in the end a servlet only.where is the URL pattern for this servlet
JSP Request Object
JSP Request Object  JSP Request Object ?   request object... an HTTP request. The request object is used to take the value from the client?s web browser and pass it to the server. This is performed using an HTTP request
request object - JSP-Servlet
request object  What is Difference Between request.getHeader("x-forwarded-for") and request.getServerName() pls give me reply as soon as possible
The $_Request Function
The $_Request Function The contents of both $_GET, $_POST, and $_COOKIE are contained by the PHP built-in $_REQUEST function. $_REQUEST Method is used...;?php echo $_REQUEST["name"]; ?><br /> Address :<?php echo
jQuery Ajax load request
jQuery Ajax load request  Hi, How to use jQuery to send the request on server to load data in web page? Thanks   Hi, In the jQuery Load Content tutorial you will find the code example to send request on server
Session Object from request
request object? Why are we adding cookie object into response object? Why are we getting cookie object from request object? I know all methods are available its relevant class. is there any reason for getting session object from request
request object value
request object value  Hi Friends I am developing a web application... request object value for whole application. Problem is..envirement session... request value for whole application without using session,application object. Please
Request for Discussion forum in jsp
Request for Discussion forum in jsp  Hi i want discussion forum to my project. Can anyone tell me, what are all requirements needed to create it. THanks in advance
request for java source code
request for java source code  I need source code for graphical password using cued-click points enabled with sound signature in java and oracle 9i as soon as possible... Plz send to my mail
JMeter HTTP request example
JMeter HTTP request example  Concerning: http://www.roseindia.net/jmeter/using-jmeter.shtml how do I set path? also what do i need to do to get the helloworld servlet work? Thanks in advance
getAttributeNames() Method Of The Request Object
); if (dispatcher != null){ dispatcher.forward(request, response); } %>... getAttributeNames() Method Of The Request Object... you the detailed explanation of the getAttributeNames() method of the request
Ajax request object
Ajax request object  i have to open more than one time a same jsp page with same input using Ajax.. But it will be opened only one time. i can open If i give different input.. how to solve this problem
Request for codes - JSP-Servlet
Request for codes  Sir , I am an engineering student i am interested in learning JAVA also i need some example code for creating Registration form codes for creating web based application using JSP sir plz send me which
Configure Js request in Web.xml
Configure Js request in Web.xml  Hi all, I have 1 basic doubt,suppose i have 2 jsp,1 servlet,1 web.xml file.i need to redirect 1 page via servlet with help of web.xml file.Here just i need to redirect to mainCtrl.java
Problem in request object
Problem in request object  I have created a form where I have file...=null; String description=null; String path1=null; out.println(request); path1...(); int update=0; boolean isMultipart = ServletFileUpload.isMultipartContent(request
Request Object In JSP
the attribute name through the request object by using dispatcher method... Request Object In JSP     ... Request object. This object retrieves values whatever client passes
Problem in request Object
Problem in request Object  I have created a form where I have file input along with other inputs. I am using jsp to process the inputs. File input is not processing while the rest of the data is being processed.Please Help me out
How to send HTTP request in java?
How to send HTTP request in java?  How to send HTTP request in java
request header and response - Java Beginners
request header and response  count the hits of a user on a site
 

 

 

DMCA.com