Diff b/w servlet n jsp

Diff b/w servlet n jsp

View Answers

November 17, 2008 at 1:49 AM

Nothing my friend. Both are same.
Only thing is Servlet is pure Java and JSP is mixture of html or php code.
servlet is static and JSP is dynamic. There is no class in JSP.In JSP there is no need to configure "web.xml" where as in class we have to configure "web.xml'...
That's it..... Have a nice day...........

November 17, 2008 at 4:16 AM

Hi friend,


JSP is Java code embedded in HTML; the Java code is compiled and run by the container on the server and the client only sees the results of that code's execution mixed in appropriately with the html.

Servlets are compiled pure Java class files (not mixed with HTML) that get posts from the client and send html to in return.

Servlet is used to exceute on the webbased,which is used to seperate the Dynamic and static Content.It acts as a Controller in MVC. JSP is a Presentation Layer.Which has the Dynamic Html it embedded with java code.Its use to mix both Dynamic and Static content


JSP is the extension of HttpServlet instance. JSP is basically used for presentation and servlet is used for bussiness logic although you use servlet for presentation after all JSP page also boil down to jsp servlet but presentation with servlet is realy labours and boring. Servlet are free from Http protocol you can use GenericServlet class as base class of your custom servlet class to perform communication with client either in http protocal and others but with JSP page your are married only
to HTTP protocol. JSP page provides you with set of implicit objects that are page, request, response, session, pageContext, config, out, application, exception (only for error page) whereas you do not find them in servlet at your disposal.


---------------------------------------------

Visit for more information.

http://www.roseindia.net/jsp/

http://www.roseindia.net/servlets/

Thanks.









Related Tutorials/Questions & Answers:
Diff b/w servlet n jsp - Java Interview Questions
Diff b/w servlet n jsp  hii i want to know the difference between servlet and jsp. please give me the details to understand them in correct... is Servlet is pure Java and JSP is mixture of html or php code. servlet is static
diff b/w applet and servlet
diff b/w applet and servlet  what is the difference between applet and servlet?   Difference between servlet and applet: 1)An applet is client side programming whereas servlet is server side programming. 2)Applets run
Advertisements
Diff b\w C++ & Java
Diff b\w C++ & Java  What is the difference between C++ & Java
diff b/w struts 1.0 and 1.2
diff b/w struts 1.0 and 1.2  diff b/w struts 1.0 and 1.2
difference b/w == and equals()
difference b/w == and equals()  what is the difference between == operator and equals()   Hi Friend, The == operator checks if the two objects were actually the same object. This operator looks at the actually memory
Diff ways to call a EJB from Servlet, JSP - Java Interview Questions
Diff ways to call a EJB from Servlet, JSP  How can I call EJB from Servlet or JSP
difference b/w viewdidload and ViewWillAppear
difference b/w viewdidload and ViewWillAppear   hello all, what is the difference b/w viewdidload and ViewWillAppear ???   hello,ADS_TO_REPLACE_1 when view is loaded then this method run one time but ViewWillAppear
Underscore b/w consecutive capatalized words
Underscore b/w consecutive capatalized words  I have a text something like this "25km from N of Rio Negro" I want to add underscore between consecutive Capatalized words having space between them. Can some one give me
Difference b/w spring 2.x and 3.x
Difference b/w spring 2.x and 3.x  difference b/w spring 2.x and 3.x
drag n drop - JSP-Servlet
drag n drop  I want to implement drag n drop functionality for simple HTML/JSP without using applet,flash or any heavy components.using browse button... using drag and drop mode.when user drag n drop file then display the complete path
REQ for connection b/w jdbc and oracle database
REQ for connection b/w jdbc and oracle database    REQ for connection b/w jdbc and oracle database    The Java classes to connect.... b) If you are using oracle thin driver,you have to use: Connection conn
diff betn show n visible
diff betn show n visible  what is difference between show() & visible method in java
what is difference b/w oracle 8i, 9i and 10g
what is difference b/w oracle 8i, 9i and 10g  what are the difference between oracle 8i,9i and 10g? I am not considering the versions and their supported os, in the interview point of view
how to establish connection b/w java app and mobile phone
how to establish connection b/w java app and mobile phone  hello, my name is Dhanraj. i'm doing a project in my college. In that project we need to send SMS from our phone to a java application situated on a remote server
Difference b/w jdk 1.1 and 1.2 - Development process
Difference b/w jdk 1.1 and 1.2  Can you plz specify the changes/developments that have taken place from JDK 1.1 to JDK 1.2 and which version is the industry following currently.  Hi friend, Changes to CLASSPATH
JSP-Servlet - JSP-Servlet
JSP-Servlet   how to pass the value or parameter from jsp page to servlet and view the passed value
JSP-Servlet - JSP-Servlet
JSP-Servlet   how to pass the value or parameter from jsp page to servlet and view the passed value
JSP-Servlet - JSP-Servlet
JSP-Servlet   how to pass the value or parameter from jsp page to servlet and view the passed value
java - JSP-Servlet
java  Difference b/w Servlets and JSP  Hi friend, Main difference between Jsp and Servlet Jsp is better for view web pages, while servlet is good for request processing. Jsp has also all implicit objects
Jsp ,Servlet Problem - JSP-Servlet
Jsp ,Servlet Problem  hi, m new to jsp n Servlet. i really find ur... with oracle. it worked wonders. now i m starting jsp n servlet learning.. pls suggest me a book from where i can strat from d scratch n also tell me d steps how
jsp/servlet - JSP-Servlet
jsp/servlet  How to create and save the excel file on given location using jsp/servlet?  hi Geetanjali, Read for more information, http://www.roseindia.net/jsp/poi/excelPOI.shtml Thanks
JSP-Servlet - JSP-Servlet
JSP-Servlet   how to pass the value or parameter from jsp page to servlet and view the passed value.   Hi Friend, Please visit the following links: http://www.roseindia.net/tutorial/servlet/passParameters.html
jsp and servlet
jsp and servlet  what is the difference between jsp and servlet ? what is the advantages and disadvantages of jsp and servlet
servlet and jsp
servlet and jsp  how to connect an jsp and an servlet without connecting to database
JSP - JSP-Servlet
JSP & Servlet Example Code  Need example of JSP & Servlet
servlet and jsp - JSP-Servlet
servlet and jsp  can any one give me jsp-servlet related project-its urgent- 1-chat application 2-bug tracking system 3-online shopping 4-online...://www.roseindia.net/jsp/bank.shtml Thanks
Servlet - JSP-Servlet
Servlet and Java Code  Example and source code in Servlet and JSP
servlet/jsp - JSP-Servlet
servlet/jsp  hi, get me the source code to upload all file formats in servlet/jsp plaese help me as soon as possible its urgent!!! by saravanan.k  Hi friend, Code to help in solving the problem
Servlet - JSP - JSP-Servlet
Servlet - JSP  i used arraylist in servlet as shown ArrayList total = new ArrayList (); ... total.add(k[i]); session.setAttribute("efg",total); when I code this like in my jsp <%ArrayList<Integer> data= new
servlet and jsp - JSP-Servlet
servlet and jsp  Hello folks, I am very new JDBC. I am doing a project on java messaging service on the part of the project we are using JDBC. In my...   write in the jsp form action="path of servlet" and wirite
servlet and jsp - JSP-Servlet
servlet and jsp  Hi friend, please show one sample program, how to connect jsp and servlet using backend a ms-access.  Hi friend,<%@ page language="java" import="java.sql.*,java.util.*,java.text.*"
jsp/servlet - JSP-Servlet
jsp/servlet  Hello ! How can we call a servlet on a link on html page like a href="servletname"> Call Servlet Is it possible?   Hi friend, I am sending simple application using servlet. This is form
RMI n JSP - RMI
RMI n JSP  Hi Friends, First of all let me appreciate ur promptness in delivering answers. Is it possible to make communication between RMI and JSP page ? Thanks
RMI n JSP - RMI
RMI n JSP  Hi Friends, First of all let me appreciate ur promptness in delivering answers. Is it possible to make communication between RMI and JSP page ? Thanks
java (servlet) - JSP-Servlet
java (servlet)  how can i disable back button in brower while using servlet or JSP
Jsp-Servlet
Jsp-Servlet  how can i display the values in jsp pages as list from servlet ? can you help me out plz ? thanks
JSP,Servlet - JSP-Servlet
JSP,Servlet  How can i pass a list of objects from jsp to an Action? Please help me to do
jsp servlet
jsp servlet  i dont know how to write a code to Create a JSP with one text field to enter the URL and a submit button.On clicking the submit button, send the request to a servlet .Once the servlet receives the request, it need
jsp servlet
jsp servlet  i dont know how to write a code to Create a JSP with one text field to enter the URL and a submit button.On clicking the submit button, send the request to a servlet .Once the servlet receives the request, it need
JSP & Servlet - JSP-Servlet
JSP & Servlet  In the process of login validation. i'm entering the username correct and pass wrong. when using response.sendRedirect() a new req... help me with coding ? i'm just a beginner with JSP and sServlets
JSP & Servlet - JSP-Servlet
JSP & Servlet  Its an IBM Question In the process of login validation. i'm entering the username correct and pass wrong. when using... is wrong ? can any one help me with coding ? i'm just a beginner with JSP
jsp-servlet - JSP-Servlet
jsp-servlet  what is the problem with using microsoft access as database? The sample example, i got from you is: database:mysql. One of my java faculty said, we cannot use ms-access as database because it has some dis-advantage
jsp/servlet - JSP-Servlet
jsp/servlet  Hello friends ! I want to create columns in a table at run time everyday. I am using mysql database.how should I do it? thanks in advance  Hi friend, Plz explain your problem in details to solve
servlet/jsp - JSP-Servlet
servlet/jsp  Thanks for ur feedback! But this program shows an error showing package.org.apache.commons.fileupload.servlet does not exists package.org.apache.commons.fileupload.disk does not exists
JSP - JSP-Servlet
JSP  if the jsp is converted into servlet which type of code genreted and it will exend which type of servlet?i want answer plzzzz replyyyyyyyyyy
Servlet - JSP - JSP-Servlet
Servlet - JSP  Here is my complete code. all my code is running with out any error. the for loop in servlet is running as many times as my checkboxes... Servlet Code: ---------------------- package com.servlet
JSP-Servlet
JSP-Servlet  Hi have created a JSP page and I need to print it when the user clicks on the print button. I have put a print button on the JSP page. Can somebody plz help me out with the Servlet page coding
JSP - JSP-Servlet
JSP  What is the meaning of extending JSP?  Hi friend, A jsp can be made to extend our own servlet instead of container generated servlet by using. <%@ page extend="package.className"> Thanks
About jsp and Servlet - JSP-Servlet
About jsp and Servlet  Servlets are directly using java technologies. It is used in HTTP,FTP..etc, But Jsp only used in HTTP. Servlets are running fastly... Then why we moved from Servlet to JSP.. Pl Tell me the reasons
JSP with java/servlet - JSP-Servlet
(java bean or servlet) to fecth the database. Jsp would get the data from.../servlet-jsp-data-list.shtml Hope that it will be helpful for you. Thanks...JSP with java/servlet  Thanks Deepak for your answere to my previous

Ads