Results 1 to 5 of 5
  1. #1
    lege is offline Member
    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0

    Default Is it necessary to use Struts tags and JSTL?

    Hi all, I'm a newer to Java EE. I wrote a small website in the past few weeks with html, Javascript and Struts as back-end.
    Now I'm confused by a question that is it necessary to use Struts tags ? HTML tags can also perform well and can look nice with css and js.
    So which one do you choose as font-end language? HTML or JSP? Do you have some suggestions?
    Thanks~

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default Re: Is it necessary to use Struts tags and JSTL?

    Not much point using Struts if you aren't actually mapping the front end fields to a back end model.
    IMO.

    And if you only have HTML then you have a fairly static site.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,090
    Rep Power
    6

    Default Re: Is it necessary to use Struts tags and JSTL?

    HTML is not a language, its a simple document markup which a browser can use to "draw" the page. Using Struts tags (or JSP/JSTL tags), you can dynamically create that HTML markup and also optionally the CSS and JS content. Its not like the Struts tags are going to the browser, it does not understand what they are.

    And through Struts tags you can still add styling information to the generated HTML content, you're not restricted like you think you are. Its simply a case of not having properly studied the technology, you're making wrong assumptions.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    lege is offline Member
    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0

    Default Re: Is it necessary to use Struts tags and JSTL?

    Well, I think I have much to learn on web development... Thanks

  5. #5
    lege is offline Member
    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0

    Default Re: Is it necessary to use Struts tags and JSTL?

    Quote Originally Posted by gimbal2 View Post
    HTML is not a language, its a simple document markup which a browser can use to "draw" the page. Using Struts tags (or JSP/JSTL tags), you can dynamically create that HTML markup and also optionally the CSS and JS content. Its not like the Struts tags are going to the browser, it does not understand what they are.

    And through Struts tags you can still add styling information to the generated HTML content, you're not restricted like you think you are. Its simply a case of not having properly studied the technology, you're making wrong assumptions.

    Thank you~ I tried a few Struts tags and added css style to them.
    But I have more questions....
    I read some sample codes from books and internet. Some of them wrote pure java code into jsp file which looks ugly and feels bad. I really don't like that kind of codes... So what is the common style of writing a webpage with jsp or could you show some good example?

Similar Threads

  1. UI issue with Struts 2 tags
    By susanjohn29 in forum Struts
    Replies: 3
    Last Post: 01-13-2012, 03:33 PM
  2. Problems Struts-JSTL
    By Peter in forum Web Frameworks
    Replies: 2
    Last Post: 07-04-2007, 06:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •