Thursday, March 27, 2008

How can I determine the name and version number of the servlet or JSP engine that I am using?

How can I determine the name and version number of the servlet or JSP engine that I am using?
 

From within a servlet, you can invoke the ServletContext.getServerInfo() method as follows:

String thisServer= getServletConfig().getServletContext().getServerInfo();

If you are using JSP, you can use this expression:

<%= application.getServerInfo() %>

 

No comments:

Post a Comment