FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Java_Servlet

Jakarta Servlet

Contents
History
Container servers
See also
Citations
References

Life of a JSP file

A Jakarta Servlet, formerly Java Servlet is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API. Such web servlets are the Java counterpart to other dynamic web content technologies such as PHP and ASP.NET.

HttpServlet class. Thus "servlet" is often used as shorthand for "HTTP servlet". Thus, a servlet can be used to add dynamic content to a web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML and more commonly, JSON.

The Jakarta Servlet API has, to some extent, been supersededFacesServlet.

A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model–view–controller.

History

edit

The Java Servlet API was first publicly announced at the inaugural JavaOne conference in May 1996. About two months after the announcements at the conference, the first public implementation was made available on the JavaSoft website. This was the first alpha of the Java Web Server (JWS; then known by its codename Jeeves) which would eventually be shipped as a product on June 5, 1997.

In his blog on java.net, Sun veteran and GlassFish lead Jim Driscoll details the history of servlet technology. James Gosling first thought of servlets in the early days of Java, but the concept did not become a product until December 1996 when Sun shipped JWS. This was before what is now Jakarta EE was made into a specification.

The Servlet1 specification was created by Pavni Diwanji while she worked at Sun Microsystems, with version 1.0 finalized in June 1997. Starting with version 2.2, the specification was developed under the Java Community Process.

Servlet API history
Servlet API versionReleasedSpecificationPlatformImportant Changes
Jakarta Servlet 6.1March 28, 20246.1Jakarta EE 11improve HTTP status code and character encoding support
Jakarta Servlet 6.0May 31, 20226.0Jakarta EE 10remove deprecated features and implement requested enhancements
Jakarta Servlet 5.0October 9, 20205.0Jakarta EE 9API moved from package —N/aJDK 1.1Part of April 1998 Java Servlet Development Kit 2.0
Java Servlet 1.0December 1996packageorg.wikipedia.examples; importjava.io.IOException; importjakarta.servlet.ServletConfig; importjakarta.servlet.ServletException; importjakarta.servlet.http.HttpServlet; importjakarta.servlet.http.HttpServletRequest; importjakarta.servlet.http.HttpServletResponse; publicclass ServletLifeCycleExampleextendsHttpServlet{ privateintsharedCounter; privatefinalObjectlock=newObject(); @Override publicvoidinit(ServletConfigconfig)throwsServletException{ super.init(config); getServletContext().log("init() called"); } @Override protectedvoidservice(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{ getServletContext().log("service() called"); varlocalCounter=0; synchronized(lock){ localCounter=++sharedCounter; } varwriter=response.getWriter(); writer.write("Incrementing the count to "+localCounter);// accessing a local variable writer.flush();// flush response } @Override publicvoiddestroy(){ getServletContext().log("destroy() called"); } }

Container servers

edit

The specification for Servlet technology has been implemented in many products. See a list of implementations on the web container page.

There are also other types of servlet containers such as those for SIP servlets, e.g., SailFin.

See also

edit

Citations

edit
Freedman, Matt (June 26, 1996). "JavaOne conference report". JavaWorld. Archived from the original on 2018-07-26. Retrieved 2018-07-25.
  • ↑ Chang, Phil Inje (June 1, 1997). "Java Web Server ships!". JavaWorld. Archived from the original on 2018-07-26. Retrieved 2018-07-25.
  • ↑ "Java Web Server". Javasoft. Sun Microsystems. Archived from the original on 1998-01-11. Retrieved 2020-02-01.
  • ↑ "What's new in Servlet 3.1 ? - Java EE 7 moving forward (Arun Gupta, Miles to go ...)". oracle.com. Retrieved 22 November 2016.
  • ↑ Hunter, Jason (March 28, 2003). "Servlet 2.4: What's in store". InfoWorld. Retrieved 2025-12-27.
  • ↑ Crawford, William; Hunter, Jason (November 1998). "Preface". Java Servlet Programming (1st ed.). O'Reilly Media. p. ix–x. ISBN 978-1-56592-391-1. We cover Version 2.0 of the Servlet API, which was introduced as part of the Java Web Server 1.1 in December 1997 and clarified by the release of the Java Servlet Development Kit 2.0 in April 1998.
  • ↑ Murach & Urban 2014, pp. 160–163, §15 How to develop servlet - More skills for working with servlets.
  • References

    edit
    Jakarta EE specifications
    formerly known as: Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE)
    Web app
    Enterprise app
    Web services
    Other
    Removed
    Related
    Web interfaces
    Server-side
    Protocols
    Server APIs
    Apache modules
    Topics
    Client-side
    Browser APIs
    Web APIs
    WHATWG
    W3C
    Khronos
    Others
    Topics
    Related topics
    International
    National
    Other

    View original on Wikipedia | Back | FazBrowse Home