File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlets and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and Java" Watch "Servlets and Java" New topic

Servlets and Java

Gopinath Reddy

Joined: Feb 26, 2004
Posts: 15
In my application i am writing my buisness logic in servlets. But we can write our buisness login in core java also. Actually what is the difference between writing buisness logic in java and in servlets.?
which one is better?
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
Well servlets are server side programmes ,I mean that they listen the request and send the rseponse to client.Basically see it has been derived from all core java classes and we can use in a particular direction that is on server side .
Just read the servlets again , and if you have any questions do ask.
you are welcome.
Please see the documentation of servlets very well.

jasmine kaur
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
A good, maintainable design usually has hardly any processing in the actual servlet classes. All "business" processing is done in objects that neither know nor care whether they are running in a web application or a test harness.
Try it. Write your "logic" in separate classes, test your "logic" code thoroughly before you ever go near a servlet container. When you are happy that your business logic works, write a very thin servlet which calls your tested code. With any luck, your code will be much more reusable, and your test and development cycle should be much quicker.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Servlets and Java
It's not a secret anymore!