Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Servlets Vs Jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


SANDEEP
Servlets Vs Jsp
2 Answer(s)      6 years and 4 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

September 26, 2008 at 10:28 PM


Based on the situation we can decide.For example we are using Database related things(Opening a connection,executing statements etc.i.e, called as business logic)it is better to use Servelts(Re usability is possible with servlets but not with jsp's)Most of cases we use jsp's for presentation.i.e,the output nthat has to sent to browser can be done by making use of jsp's

Presentation----Jsp's
Internalprocessing(Logic)---servlet
ok


September 27, 2008 at 11:53 AM


Hi friend,

Servlet and Jsp are both important.

Jsp is used for view.
Servlet is used for request.

Servlet

It is used to exceute on the webbased,which is used to seperate the Dynamic and static Content.
It acts as a Controller in MVC .
It is a Java class implementing the javax.servlet.
Servlet interface that runs within a Web or application server's servlet engine, servicing client requests forwarded to it through the server.

Jsp
JSP is a Presentation Layer.
A Java Server Page is a slightly more complicated beast.
JSP pages contain a mixture of HTML, Java scripts (not to be confused with JavaScript), JSP elements, and JSP directives.
The elements in a Java Server Page will generally be compiled by the JSP engine into a servlet, but the JSP specification only requires that the JSP page execution entity follow the Servlet Protocol.



Servlets and Java Server Pages are complementary APIs, both providing a means for generating dynamic Web content.


For read more information :
http://www.roseindia.net/jsp/
http://www.roseindia.net/servlets/


Thanks



Related Tutorials/Questions & Answers:
Servlets vs JSP - JSP-Servlet
Servlets vs JSP  What is the main difference between Servlets and JSP?  Hi Friend, Differences: 1)In MVC, jsp act as a view... and servlet is used for bussiness logic 5)Servlets are faster than jsp. 6
Servlets Vs Jsp - JSP-Servlet
Servlets Vs Jsp  In servlets and Jsp's which one is important? and also tell me the Is Servlets are best or jsp's are best? give me the(reason also... with servlets but not with jsp's)Most of cases we use jsp's for presentation.i.e
Advertisements
jsp -servlets
jsp -servlets  i have servlets s1 in this servlets i have created emplooyee object, other servlets is s2, then how can we find employee information in s2 servlets
Struts ForwardAction vs Forward tag in jsp - Struts
Struts ForwardAction vs Forward tag in jsp  difference between struts ForwardAction class and Forward tag in jsp
jsp and servlets
jsp and servlets  what is difference between jsp and servlet?? what should a person use to develop website ??   JSP is used for view in MVC... the request submitted from browser and process the data and redirect it to JSP
jsp and servlets
jsp and servlets  i want code for remember password and forget password so please send as early as possible ............. thanks in advance   Please visit the following link: http://www.roseindia.net/jsf/richfaces
Business logic vs Presentation logic - JSP-Servlet
Business logic vs Presentation logic  what is the difference between Business logic and Presentation logic
jsp,servlets - JSP-Servlet
jsp,servlets   Good Afternoon Sir, I am sowmya i have a doubt that is whether it is possible to use arrays in servlets.how to declare that arrays in servlets and i am getting values from textbox in jsp
servlets and jsp - JSP-Servlet
servlets and jsp  HELLO GOOD MORNING, PROCEDURE:HOW TO RUN A SERVLET AND JSP IN COMMANDPROMPT AND ALSO IN NETBEANS IDE6.0,IT'S VERY URGENT FOR ME,IN ADVANCE THANK U VERY MUCH.   TO Run Servlets in Compand
Difference between JSP and Servlets
Difference between JSP and Servlets  What is the difference between JSP and Servlets ?   JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP
servlets - JSP-Servlet
servlets link . you can learn more information about servlets structure. To develop an application using servlet or jsp make the directory structure Read for more information. http://www.roseindia.net/servlets/directory
Servlets in JSF - JSP-Servlet
in the form itself by double clicking why should i go for servlets to write code.... Simply what is the role of servlets in JSF. which one is the best one..jsp...Servlets in JSF  Hi! I am using Java Visual Studio to develop my
JSP-Servlets-JDBC
JSP-Servlets-JDBC  Hi all, 1, Create - i want sample code ( if possible with explanation) to create a registration form in JSP, and the form..... It will be helpful if it's made into sub modules, JSP, Driver Constants, Servlets, Java Beans
JSP and servlets - JSP-Servlet
JSP and servlets  Hi sir, This is vanisree in my project i need to add the start time of examination and end time of examinaion and if the time between end and start are greater than one hour then i need to close that session
servlets - JSP-Servlet
an application using Servlets or jsp make the directory structure given below link http://www.roseindia.net/servlets/directory-structure.shtml Now visit
how to execute jsp and servlets with eclipse
how to execute jsp and servlets with eclipse  hi kindly tell me how to execute jsp or servlets with the help of eclipse with some small program
servlets - JSP-Servlet
servlets.  Hi friend, employee form in servlets...;This is servlets code. package javacode; import java.io.*; import java.sql.... Servlet and JSP Examples. Servlet and JSP
servlets and jsp - JDBC
servlets and jsp  I want to display textboxes dynamically in my page using JSP and servlets (javascript for validation). For eg, consider the recruitment application form for various jobs. The name, address and tel
Servlets - JSP-Servlet
Servlets  Hi,im d beginner to learn servlets and jsp.please can u... with the host server.It also allows the servlets to write events to a log file... to: http://www.roseindia.net/servlets/ServletContext.shtml http://www.roseindia.net
servlets - JSP-Servlet
servlets  hi, can anybody help me as what exactly to be done to for compilation,execution of servlets. i also want to know the software required in this execution
servlets - JSP-Servlet
servlets  how to upload images in servlets  Hi friend, For solving the problem : http://www.roseindia.net/servlets/upload-image.shtml Thanks
servlets - JSP-Servlet
servlets  How would you set an error message in the servlet,and send the user back to the JSP page?Please give java or pseudo code examples.  ...(""); } } --------------------------------------------------- Read for more information. http://www.roseindia.net/servlets
java Servlets - JSP-Servlet
java Servlets  Hi i am having a doubt regarding servlets as i am in learning stage give me any clew how to retrive data from mysql database after... here i am not using any jsp's. i got up to retriving data from data base but i am
servlets - JSP-Servlet
/servlets/HowToRunAServlet.shtml Thanks
Servlets and Jsp - JDBC
Servlets and Jsp  Sir I am getting Nullpointer exception in netbeans ,while running this program. Please help me. http://www.roseindia.net/mysql/select-box.shtml
Servlets And Jsp - JDBC
Servlets And Jsp  Sir, I need a program for when i select the one of the field name of table,It has to display the table.Please anyone help me.I need this program fully
servlets - JSP-Servlet
servlets  I want to write a simple program on servlet context attribute listener.  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/ServletContextAttributeListener.shtml Hope
servlets - JSP-Servlet
servlets  i want to write a simple program on servlet context listener.  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/ServletContextListener-example.shtml Hope
servlets execution - JSP-Servlet
servlets execution  the xml file is web.xml file in which the servlet name,servlet class,mapping etc which has to be done.   What u want...://www.roseindia.net/servlets/ Thanks. Amardeep
servlets execution - JSP-Servlet
servlets execution  hi friends, i wanted to know how to compile and run a servlet which has got an html file with it. this html file..., To visit this link for solving the problem: http://www.roseindia.net/servlets
Servlets and Jsp - JDBC
Servlets and Jsp  Sir How to perform the insert for the specified input and remaining fields must be select the values automatically.  Hi Friend, Please clarify your question. Thanks  first you post
 

 

 

DMCA.com