The difference between a GET and a POST is the way data is transferred to a servlet. With a GET, the URL will show each name/value pair on the query string in the URL. For example, if you had a form with a field named 'foo,' and when submitted had a value of 'bar,' the URL might be something like this:
http://www.example.com/servlet?foo=bar
With a POST, this information is not visible in the URL. Instead, it is transferred in the HTTP headers. As far as the actual servlet is concerned, there is not a great deal of difference when it comes to getting the parameters. Whether you use a GET or a POST, you still use request.getParameter("foo"); to get the value.
The method used in the Servlet for processing either a GET or a POST is different too. If you use a GET, the method that is called is doGet(HttpServletRequest, HttpServletResponse). The doGet method is also called if there is no GET or POST data. If you use a POST, the method called is doPost(HttpServletRequest, HttpServletResponse).
barsanabegam
SERVLETS JSP 1. Servlet is a java class. 2. Servlet is a single instance multiple thread web application, In which HTML code can be included in java code. 3. In servlets the presentation logic and the B.logic is tightly coupled. 4. For every modification done in servlet program, we need to recompile and reload the application. 5. In servlets implicit objects are not available. 6. Servlets are supported to HTTP, FTP, and SMTP protocols. 7. Sevlets are need Deployment Descriptor file (web.xml) 1. Jsp is a file. 2. In jsp java code can be included in HTML code by using special tags. 3. In jsp's the presentation logic and B.logic are separated by defining the java beans. 4. If any modifications done in jsp's without recompiling and reloading , the modifications are reflected. 5. In jsp's implicit objects are available which is we can implement directly into jsp pages. 6. Jsp are supported to HTTP protocol only. 7. No need of Deployment Descriptor file (web.xml) rajus_1219@yahoo.co.in
It is a good to know item. It is not mandatory or necessary. Basic knowledge of core Java is enough to learn JSP and Servlets.
A servlet is nothing but Java code that runs in a container. It generates HTML & other contents that get displayed in the web page that we see. It is purely coded in Java, so the benefits and restrictions of all regular Java classes apply here too. Servlets are compiled to form a platform neutral bytecode (All java code is platform neutral, isnt it? Serlvet is no different). Upon request, this bytecode file is loaded into a container. Some containers (servlet engines) are integrated with the Web server, while others are plug-ins or extensions to Web servers that run inside the JVM. Servlets look the same as static Web pages to the client, but they really are complete programs capable of complex operations.
The main difference between ASP and JSP is that JSP is more script like and includes Java, whereas ASP does not. Both of these are server side languages.
STRUTs is a framework of technology of java based on JSP/Java Servlets PHP is another server scripting language
Yes. It is very suitable and in fact Servlets are based on the Java Technology and the Java Development Kit (JDK) is used for the same
Core java consists of basics of java language (OOP, Threading, Exceptions, Collections, Annotations, Internationalization etc) along with other technologies like JDBC, Servlets. Advanced java is the next step of core java. This consists of JSP, EJB, Beans etc.
J2SE stands for Java 2 Standard Edition and I dont think Servlets are a part of it. Servlets are only part of the Java 2 Enterprise Edition.
They are both Java based technologiesThey can be used in J2EE Enterprise applicationsThey can contain Java codeThey are powerful and have a lot of features
Andrea Steelman has written: 'Murach's Java servlets and JSP' -- subject(s): Java (Computer program language), JavaServer pages, Servlets
using servlets, php, and database we can connect import codes into java
JSPs can contain HTML, JavaScript, XML and Java Code whereas Servlets can contain only Java Code, making JSPs more flexible and powerful than Servlets. However, Servlets have their own place in a J2EE application and cannot be ignored altogether. They have their strengths too which cannot be overseen.
The Java Servlet is like every other Java class. You can compile it using the javac command or if you are using a Integrated Development Environment (IDE) like Eclipse, it will compile the class for you. One main difference w.r.t Servlets is the fact that, they get deployed into EAR files (Enterprise Archive Files) and not JAR files (Java Archive Files) like normal java apps.
Java support system includes: · Applets · Servlets · Java Beans · EJB · JSP · XML · SOAP · CORBA
Servlet is a Server side component, a servlet is a small pluggable extension to the server and servlets are used to extend the functionality of the java enabled server.
barsanabegam