|
![]() |
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Sarra Sakka wrote:If i use setAttribute in my login servlet, what shoul i put in my logout servlet
Sarra Sakka wrote:If i use setAttribute in my login servlet, what shoul i put in my logout servlet
Sarra Sakka wrote:Always the button back display the home page
![]()
here's the filter :
what's the problem according to you ?
I'm stuck![]()
Paul Clapham wrote:Does your code do that?
John Schretz wrote:In addition there is some bad logic and coding practice in your authentication servlet. I can go mre complex but here is you servlet refactored, please see comments:
Sarra Sakka wrote:
John Schretz wrote:In addition there is some bad logic and coding practice in your authentication servlet. I can go mre complex but here is you servlet refactored, please see comments:
I change my authentication servlet like as you say, also my Logout servlet, but always the same problem occurred ?
here's the filter :
John Schretz wrote: You only need the filter for checking the valid user.
Sarra Sakka wrote:thank you for your reply,
John Schretz wrote: You only need the filter for checking the valid user.
do you mean only like this :
Sarra Sakka wrote:The same problem
![]()
when i click a back button it display a home.jsp![]()
John Schretz wrote:
after you click back and it displays the home page, what happens if you then refresh the page? Does it go to the login page then?
Sarra Sakka wrote:
John Schretz wrote:
after you click back and it displays the home page, what happens if you then refresh the page? Does it go to the login page then?
No, it don't go to the login page and remains in the same page home.jsp
John Schretz wrote:
if you put a breakpoint in the filter when you refresh the page at that point does it hit the breakpoint?
Sarra Sakka wrote:
John Schretz wrote:
if you put a breakpoint in the filter when you refresh the page at that point does it hit the breakpoint?
No, when i refresh the page it doesn't hit the breakpoint, that's mean there's a problem in the filter?
John Schretz wrote: Do you ever hit a breakpoint in the filter? Like when you login?
John Schretz wrote:
So in places where you would forward or redirect you would use url pattern you mapped in for that servlet
i.e.
view plainprint?
Note: Text content in the code blocks is automatically word-wrapped
getRequestDispatcher("test/home").forward(req, res);
Sarra Sakka wrote:
John Schretz wrote:
So in places where you would forward or redirect you would use url pattern you mapped in for that servlet
i.e.
view plainprint?
Note: Text content in the code blocks is automatically word-wrapped
getRequestDispatcher("test/home").forward(req, res);
when i log in the home page didn't display