Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:forward alternative for jsf 2.0  RSS feed

 
Yuri Savchenko
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an jsf 1.2 web application and I want to transform it to jsf 2.0 web application.
My question is how can I replace the following code
<c:if test="${!myBean.correctAuthorization}">
<jsp:forward page="login.jsp" />
</c:if>
with jsf 2.0 - like
?
Thanks for your help
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Yuri!

Actually, I could rant long and hard on user-designed security systems. And I have. But the short answer is that it's usually better to use the Security that's built into the J2EE specificaton.

If you do that, you can define security protections for whatever URLs you want as entries in the web.xml file and not need any code on the JSF page. Or JSP pages either. Even non-JSF JSPs and servlets!
 
Yuri Savchenko
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Tim
But the main reason I had decided to transform my project was jsf2.0's ajax support. So I'm looking for solution that would be as simple as possible just to make my application work.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!