Hi All,
I am sending request from 4-jsps to a single servelt and i want to redirect those requests.
How can I identify a request which came from a specific JSP.
i.e., 1.jsp,2.jsp,3.jsp,4.jsp are calling dopost() method of MyServlet.
how come the servlet(MyServlet) knows this request came from 1.jsp?
thanks in advance
Santhosh
-
Identifying JSPs request by Servlet (2 messages)
- Posted by: Santhosh Muktha
- Posted on: April 22 2004 01:20 EDT
Threaded Messages (2)
- Referer by Stephane Vaucher on April 22 2004 02:25 EDT
- Referer by Santhosh Muktha on April 22 2004 02:53 EDT
-
Referer[ Go to top ]
- Posted by: Stephane Vaucher
- Posted on: April 22 2004 02:25 EDT
- in response to Santhosh Muktha
Two ways:
1) Use http referer header: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36
2) Add it to your request:
a) GET method:
http://myserver/servlet/DispatchServlet?source=1.jsp
b) POST method: (in a form)
<form method="POST" action="/servlet/DispatchServlet">
<input type="hidden" value="1.jsp"/>
</form> -
Referer[ Go to top ]
- Posted by: Santhosh Muktha
- Posted on: April 22 2004 02:53 EDT
- in response to Stephane Vaucher
Thank you