Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Architecture question

 
roy siju
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have got this question from a document from sun ( as well as this question is also is Cade's book )
====================================
You are developing a system with the following requirements:
Users will access the system using a standard Web browser.
All incoming requests will be filtered based on the user's IP address.
The response to the request will be an appropriate static HTML page,based on the user's IP address.
Which two J2EE technologies should be used to handle HTTP requests?(Choose two.)
A.JSP
B.JTS
C.EJB
D.SNMP
E.servlets

The answer in Sun's document is given as A and E.

Option 'E' I understand, fintering part can be done by Servlet. But why JSP? In the question it is written that the output is a static html, but JSP is used to generate dynamic content....rest of the options also not seems to be correct!!!

Thanks
Roy
 
Peter Storch
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both A) JSP and E) Servlets can be used to serve dynamic and static content.

As you know all JSPs are compiled into a servlet, so technically there's no different.
 
roy siju
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it. Was thinking about sun's preferred architecture so have not thought JSP as a front controller strategy. My fault....

Thanks
Roy.
 
Chong-Leng Goh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do know that there are two models for Model-View-Controller design pattern, right? Model 1 is based on JSP as controller while model 2 is based on servlet.
[ June 20, 2004: Message edited by: Chong-Leng Goh ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic