Results 1 to 5 of 5
Thread: JSP or Servlet
- 11-27-2007, 10:30 AM #1
Senior Member
- Join Date
- Nov 2007
- Posts
- 115
- Rep Power
- 0
- 11-28-2007, 09:40 AM #2
Member
- Join Date
- Nov 2007
- Posts
- 12
- Rep Power
- 0
If you just want to send a String to the client, then Servlet is the ideal choice.
Remember, a JSP page is converted into a Servlet and then executed, which means its a bit slow. Prefer JSP if you intend to send HTML responses.
I hope this helps.
- 11-28-2007, 09:49 AM #3
Senior Member
- Join Date
- Nov 2007
- Posts
- 115
- Rep Power
- 0
That explains.
Thanks mate.
- 11-29-2007, 09:59 AM #4
Member
- Join Date
- Nov 2007
- Posts
- 97
- Rep Power
- 0
Java Server Pages - document-centric
Servlets - look and act like programs
It is easier to write HTML in JSP using different HTML editors which is not true for Servlets.
I hope this helps.
- 12-03-2007, 03:00 PM #5
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
In the MVC term JSP is more for the view on how your application will look and the Servlet act as a controller for your web application. So to process a request request it better to do it in a servlet and then send the result to the client by using a JSP page.
Website: Learn Java by Examples
Similar Threads
-
Servlet vs JSP
By javaplus in forum Java ServletReplies: 5Last Post: 06-26-2008, 10:19 PM -
my first servlet
By sireesha in forum Java ServletReplies: 3Last Post: 04-09-2008, 03:11 PM -
Regarding Servlet
By Sudha in forum New To JavaReplies: 1Last Post: 02-12-2008, 12:44 AM -
How to mix servlet & JSP
By Swamipsn in forum Java ServletReplies: 1Last Post: 08-08-2007, 12:57 AM -
javax.servlet.ServletException: Wrapper cannot find servlet class util.t2
By osval in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 03:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks