Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Faces Redirecting issue

 
Venkata
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Here is my problem.

I would like to restrict the users from being accessed the web pages directly once they are authorised.Without entering hte required information in one page user should not goto to the next page even though they type in the correct URL.To achieve this i am using filter.In my filter i am checking for an object from the faces context's session map.(i know filter can not access the Faces context directly so, i have a method to get the context).If the user tries to acce the URl directly my filter intercepting it and forwarding ot the required page.But always i am seeing the following error in the log. Can any body tell me why is this?
Note: I have gone through this discussion in different forums and some one suggesting to use context.responseComplete() statement before response.sendRedirect() statement , but it did not do any good for me.
Here is the log.



Thanks
Ven
 
Venkata
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And also, I am using another filter for redirecting the user from application context root/default.jsp to original home page and it is working fine without error in the log.(i did not use any statement before redirecting).I am guessing that since this is very first request made by the user and it did not even have the faces context yet, therefore it has been forwarded to another page with out error in the log.

Could any body has idea why is this working and not the above one?

Thanks
ven
 
Venkata
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I resolved my issue. The trick was instead of filters, i used phase listener.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic