• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple and classic tags

 
Stu Johns
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Simple tags have a JspContext object and classic tags have a PageContext object does that mean that classic tags are http specific because of the getSession() method being http specific?

Stu.
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I guess so. In the wider scheme, although Servlet, GenericServlet, ServletRequest, ServletResponse can be used to implement any protocol, in practise containers usually only implement HTTP. Although it could be very useful to have the containers also implement FTP or any other popular protocols, they very often don't. So that means effectively all the "generic" interfaces are unused directly, and you always end up using the javax.servlet.http.* classes in your apps. Having JspContext around just means you have to cast it to PageContext whenever you need to access anything HTTP-specific, and that's a real pain. Also I just can't imagine ever needing to use JSPs (the presentation components of Java EE) on anything other than HTTP(S). So my point of view is that usually everything you do in Java EE Web is designed for use with HTTP(S).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic