• Post Reply Bookmark Topic Watch Topic
  • New Topic

Facelets and JSTL

 
Robert James Liguori
Author
Ranch Hand
Posts: 562
6
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just migrated my JSF 1.2 app to facelets...

But now JSTL isn't working... tags are ignored.

Any idea how to fix this?

Thanks!
 
Tim Holloway
Bartender
Posts: 18415
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Don't use JSTL. JSTL and JSF are a questionable mixture at the best of times.

More realistically - since you're probably stuck with a bunch of existing awkward JSTL stuff - can you give us some examples?
 
Robert James Liguori
Author
Ranch Hand
Posts: 562
6
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Yes. Don't use JSTL. JSTL and JSF are a questionable mixture at the best of times.

More realistically - since you're probably stuck with a bunch of existing awkward JSTL stuff - can you give us some examples?


Here is the code that is now broken (JSTL is ignored and all HTML components are displayed)... I tried the same with basic <c:if> statments... again the conditional logic was ignored and all HTML components were displayed. This code worked perfectly fine before my facelet migration.



Thanks for the help!
 
Tim Holloway
Bartender
Posts: 18415
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I've got a whole 'nother rant on Do-It-Yourself "security". Which in the real world seems to be a total oxymoron.

However, you may find this useful:

http://www.coderanch.com/t/506294/JSF/java/jstl-if-surely-impossible#2286776
 
Robert James Liguori
Author
Ranch Hand
Posts: 562
6
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Well, I've got a whole 'nother rant on Do-It-Yourself "security". Which in the real world seems to be a total oxymoron.

However, you may find this useful:

http://www.coderanch.com/t/506294/JSF/java/jstl-if-surely-impossible#2286776


So what do you suggest...

Get rid of the JSTL altogether? This seems like the best long-term solution for me.

I'm actually looking for a quick fix for now, as this is a prototype I'm building and I have to focus on other features, will the s:focus/p:focus bandaid it?

Thanks so much for you help.
 
Tim Holloway
Bartender
Posts: 18415
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been working with JSF for quite a long time now and never found a need for JSTL.

I don't actually know what s:focus does - it's not part of the taglibs I routinely use, but there's no excuse to band-aid security. Security these days is flimsy enough already. Which is precisely why I rant so much against the invent-your-own types.

There's a perfectly capable security system that comes for free with every J2EE container, even the limited ones like Tomcat. It's generally sufficient for me, and when it's not, my next choice would be Spring Security. Neither of them require "band-aids", and in the case of container security, there's precious little security that needs to be added to application code or view definitions at all; the most powerful part of it is done in web.xml.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!