aspose file tools*
The moose likes Servlets and the fly likes can any  body  tell  how to get  the orginal  url  value  in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

can any body tell how to get the orginal url value in servlet

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
i include jsp page in all pages like product.jsp ,supplier.jsp .if user login from product.jsp i have to redirect to the product.jsp .if user login in supplier.jsp i have to redirect to supplier.jsp. can any body tell how to get the url in servlet?

thanks in advance
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

You can use the referrer header to check from which URL the use is coming from.


[Servlet tutorial] [Servlet 3.0 Cook Book]
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

if user login from product.jsp i have to redirect to the product.jsp .if user login in supplier.jsp i have to redirect to supplier.jsp.


Its not really a good idea to redirect to the same jsp again. You should be using a controller servlet and redirecting to the view(jsp).

can any body tell how to get the url in servlet?

I am not getting you, will you please give some details of exactly what you want to do.


SCJP, SCWCD.
|Asking Good Questions|
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Please continue in original post on this issue and do not post the same issue more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can any body tell how to get the orginal url value in servlet