• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can a servlet run on application server? why not?

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
can anybody tell me why cant we run a servlet on an application server........i mean on middle tier?
thanks in advance.....
surya
------------------
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi surya,
Why can't u run a servlet in aan application server. U can do that. Example (Weblogic server)
Correct me if Iam wrong.
sakthi

Originally posted by suryateja:
Hi everybody,
can anybody tell me why cant we run a servlet on an application server........i mean on middle tier?
thanks in advance.....
surya

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
You can run a servlet there, but then it would no longer be the middle tier, would it? Servlets are usually called by clients. Servlets then call the middle tier, which calls the backend.
There can be a servlet that does business logic of course, in which case it might belong in the middle tier logically.
Originally posted by Sakthivel, Palanivelu:
Hi surya,
Why can't u run a servlet in aan application server. U can do that. Example (Weblogic server)
Correct me if Iam wrong.
sakthi


 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Ok, Tell me what a 3 tier architecture is ?
Browser ---> Buisness logic (Webserver) ----> database server
Ist layer middle layer 3rd layer
U don't need to have seperate application server to say that it is only the middle tier.
But when u talk about n-tier architecture. There u can have any number of buisness components running in any number of application servers.
thanks
sakthi
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a lot of discussion and disagreement about terms like "3-tier system". Many people contend that the pair of browser and webserver are so closely coupled that they form only one "tier". A 3-tier system then becomes:
Front: Browser/Webserver
Middle: Business Logic (eg. a knowledge-based system)
Back: Database
This model works well for servlet development where each servlet becomes a very thin "wrapper" round calls to the business tier and exists just to translate a java object-and-method-call interface to and from a HTTP/HTML/Forms one. The middle tier is then completely independent of the details of the display, and can be used by all sorts of different interfaces, not just a browser.
To answer the original question, servlets can be used at any tier, although they do tend to presuppose the use of HTTP or a very similar protocol. If you wish to use HTTP to communicate between your tiers, rather than RMI/CORBA/JINI etc., then servlets make a good design choice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic