Announcement Announcement Module
Collapse
No announcement yet.
General question about using taglibraries with spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • General question about using taglibraries with spring

    Hi,

    Not sure if it's right post, at least it isn't about support .. I would like to know opinion from other spring's users.
    What you guys are using for outputting HTML in JSP? I'm using spring's MVC and write things using JSTL tags. But it isn't intended for formatting to HTML. I need way how to easily and without duplication output HTML elements like tables, forms, listboxes, buttons, input fields etc. Ideally should be easy to use and flexible enough.
    What is good library for that, is it JavaServer Faces? I read that it is integrated with latest spring, quite important.
    I guess XSLT isn't for me right now. Also form and input validation is quite needed. Spring has one or should I use some other?
    I'm using latest Tomcat.

    Second question, what to use for removing duplication in JSTL code? I have same tag library statements in multiple places, like <core:forEach >generate something ... </core:foreEach>
    I hate duplication In java I would extract function. In JSTL I discovered I can make new tagfile which contains these statements but this seems not so good idea.

    thanks

  • #2
    If you want to have reusable elements you can use to generate HTML in your JSPs, you should have a look at tagfile, part of the JSP 2.0 spec (your Tomcat - I assume it's 5.0 - supports it). There's a pretty decent article on JSP 2.0 at OnJava: http://www.onjava.com/pub/a/onjava/2003/11/05/jsp.html.

    Why doesn't that sound like a good idea to you?

    Comment


    • #3
      ok, I wrongly thought that for each tag file I must create different prefix. Seems that using tagfiles is ok, thanks!
      Hope somebody would answer also my first question. I have used freemarker little before, seemed ok, I know some people who don't suggest using velocity or struts.

      Comment

      Working...
      X