This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 2709
    
    5

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: 60049
    
  65

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
 
Similar Threads
application flow
Access to XML parsing after login authorization
Cookie Problem
problem in login
Web security: override "j_security_check" ?