#1
  1. No Profile Picture
    Coder Extraordinaire
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    London
    Posts
    34
    Rep Power
    13

    Why are there any tags in JSP


    Does anybody know why JSP pages use a CF tag like syntax for things like include files and forwards. Surely these could be accumplished in method calls inside <%%>'s.

    It seams odd to use two different types of syntax.

    Maybe somebody canshed some light on this?

    Thanks,
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    68
    Rep Power
    14
    we use tags to distribute our product to clients. we dont want a ton of hard coded stuff in the JSP pages. this allows them to change the look of the site to anything they want and use our tags (which return about 5000 different rows of data) where ever they want.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Location
    Salford, UK
    Posts
    0
    Rep Power
    0
    You can do it both ways using XML tags or "scriptlet"

    <jsp:forward page="x.jsp"/>

    or

    <%pageContext.forward("x.jsp");%>

    It depends on what you prefer. The idea of mixing XML tags and HTML tags is a nice idea but sometimes xml tags can require too much typing so I resort back to scriptlets. Coldfusion has the same ambiguity with CF tags and putting scripts in <CFSCRIPT>, though cfscript is a small subset of the Coldfusion tags.

IMN logo majestic logo threadwatch logo seochat tools logo