Tag Vrs Servlet (old question, but newbie here)


Web tier: servlets, JSP, Web frameworks: Tag Vrs Servlet (old question, but newbie here)

  1. Tag Vrs Servlet (old question, but newbie here) (3 messages)

    At work, I have started jsp and working with Tags, but at home I started reading "Servlets and JavaServerPages" by CORE.

    1 Which is better(probably not a straight answer), (links would be helpfull)
    2 Would reading this book confuse me for working with Tags?

  2. Come on someone here must have some bloody idead, or advise for this
  3. Well cheers for all the great answers I received. Really helped me there.
    After moving from asp, where all you get is answer after answer from sites like http://www.aspmessageboard.com and http://www.asp101.com. It is refreshing to find a community where simple questions are overlooked.
  4. Hey there! Sorry for the slow reply! Don't be discouraged, maybe the other guys are just too darned busy (like me), or maybe your question was too general; usually people are a bit more prompt here ;)

    Anyway, JSP is better suited for handling the presentation layer (html, database results, xml, etc.) and Servlets are better suited for handling the logic layer (database updates, form validation, controlling application flow, services, etc.). With JSPs, you can leverage the power of custom tag libraries to make your own modular components and insert them into your JSP at will. Servlets are used mostly for handling requests and controlling where the request object goes (i.e. success page, error page) and can actually forward those requests to other servlets or JSPs. It's kind of hard to summarize, but I'm sure you get the basic idea.

    Hope this helped a little. Back to work for me!