Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Login/Pass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Login/Pass" Watch "Login/Pass" New topic
Author

Login/Pass

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Login/Password

I written a servlet and displaying in a small iframe but everytime this servlet checks either this is logged in or not if logged in then it shows the control panel of the user else it shows the login/pass servlet

1) It is increasing the time to display the pages of website
2) How can I redirect back to the page on which the user was directed to login?


Thanks & best regards
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Farakh khan wrote:
I written a servlet ......

well suited in Servlet section and will resulted in more correct answers.
Farakh khan wrote:
1) It is increasing the time to display the pages of website

Is it a static html page or forwarded JSP page which in background doing some heavy computing ?
Farakh khan wrote:
2) How can I redirect back to the page on which the user was directed to login?

URL Rewriting will help you.

[Edited the welocme]


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39084
    
  23
Sagar Rohankar wrote: . . . well suited in Servlet section and will resulted in more correct answers. . . .
Agree. Moving.
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Thanks for your prompt reply

Farakh khan wrote:
1) It is increasing the time to display the pages of website
Is it a static html page or forwarded JSP page which in background doing some heavy computing ?


Yes its static page with small iframe that have a servlet inside to check that user logged or not

2) How can I redirect back to the page on which the user was directed to login?
URL Rewriting will help you.


I trying to get info about URL Rewriting but if you get me an example then it'll be easier for me to understand

Thanks again & best regards
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Farakh khan wrote:
Yes its static page with small iframe that have a servlet inside to check that user logged or not

This shouldn't take much time to compute. May be any other resources like images/flash taking too much of time to load.
Farakh khan wrote:
I trying to get info about URL Rewriting but if you get me an example then it'll be easier for me to understand

I never did this one, but here is the general logic I wold like to follow:

When user access the page which need authorization, say "xyz.jsp", you just write that URL to the Login.jsp like "Login.jsp?redirect=xyz.jsp" and when user sign in, take the "redirect" param and forward to that page.

HTH
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Great!
Appreciated

Thanks from the bottom of my heart

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Please let me know, if that's works for you. I assume there would be some flaws while implementing this
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Sagar Rohankar wrote:Please let me know, if that's works for you. I assume there would be some flaws while implementing this


Hi,

thanks for asking

I got a good helpful link regarding my question http://docstore.mik.ua/orelly/java-ent/servlet/ch07_03.htm

Best Regards
 
GeeCON Prague 2014
 
subject: Login/Pass