Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

JSTL vs JSP Directives

  • 31-10-2013 11:16am
    #1
    Registered Users, Registered Users 2 Posts: 8,324 ✭✭✭


    I'm doing a college FYP, and it involves JSP pages. I've used them before with directives, but tutorials I'm following recommend using JSTL, which is fine, but I can't seem to find any articles saying why? The tutorial simply says it's better because you have no code exposure, but that's not going to be enough for my report!!


Comments

  • Registered Users, Registered Users 2 Posts: 1,275 ✭✭✭bpmurray


    JSTL 1.2 uses the same Unified Expression Language as JSP 2.1, so they're now completely compatible. when you add your code to JSP, you'll either include Java directly using <% .. %>, or using your own home-grown tags. JSTL is a set of standard tags that help you remove your dependency on plain Java and your own tags, and make your pages more readable because they look like HTML. Using JSTL makes even more sense if you're using JSF in your app, since buth systems use quite a bit of the EL.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    bpmurray wrote: »
    you'll either include Java directly using <% .. %>,

    There is never a good reason to use scriptlets


  • Registered Users, Registered Users 2 Posts: 1,275 ✭✭✭bpmurray


    ChRoMe wrote: »
    There is never a good reason to use scriptlets

    Wow! That is some enormous claim - please explain e.g. how you might surface the value of an HTTP-only cookie or system variable into a web page. While I agree that it's sub-optimal to have large swathes of embedded Java, at a guess I'd say that upwards of 99% of these contain simple values rather than functions, and that's a lot more efficient and cheaper to develop than a custom tag.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    bpmurray wrote: »
    Wow! That is some enormous claim - please explain e.g. how you might surface the value of an HTTP-only cookie or system variable into a web page. While I agree that it's sub-optimal to have large swathes of embedded Java, at a guess I'd say that upwards of 99% of these contain simple values rather than functions, and that's a lot more efficient and cheaper to develop than a custom tag.

    MVC used properly does away with the requirement and handles all the cases you list.


  • Registered Users, Registered Users 2 Posts: 8,324 ✭✭✭chrislad


    ChRoMe wrote: »
    MVC used properly does away with the requirement and handles all the cases you list.

    That's the plan, anyways, as I'm using Spring MVC Framework for the site.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    chrislad wrote: »
    That's the plan, anyways, as I'm using Spring MVC Framework for the site.

    Excellent choice :)


Advertisement