Can you tell me how to know which servlet and JSP version am I using ? I use NetBeans IDE 7.1.2 for creating Servlets and JSP.
Jakarta Server Pages (JSP; formerly JavaServer Pages) is a collection of technologies that helps software developers create dynamically generated web pages based on HTML, XML, SOAP, or other document types. Released in 1999 by Sun Microsystems, JSP is similar to PHP and ASP, but uses the Java programming language.
Java™ servlets and Java server pages (JSPs) are Java programs that run on a Java application server and extend the capabilities of the Web server. Java servlets are Java classes that are designed to respond to HTTP requests in the context of a Web application.
Servlets and JSPs are considered outdated technologies and no longer chosen for the new projects. These were found in use significantly for legacy projects. Servlet JSPs were used enormously in around 2000. With the popularity of emerging MVC frameworks like Struts, Webwork, Spring etc.
Servlets can accept and process all type of protocol requests. JSP on the other hand is compatible with HTTP request only. In Servlet by default session management is not enabled, the user has to enable it explicitly. On the other hand in JSP session management is automatically enabled.
You can easily check the JSP,SERVER and SERVLET version. Add the following code in your jsp page after that run using any IDE Tools.
Server Version: <%= application.getServerInfo() %><br> Servlet Version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> JSP Version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %> <br>
You can get the details programatically using ServletContext
#getMajorVersion()
and #getMinorVersion()
.
For knowing the JSP version corresponding to the Servlet, you can get details from this Tomcat page.
Below is a brief summary (check Tomcat's corresponding version at the link above):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With