Can you please tell me how to know which servlet and jsp version ..I am using.
I was trying to see in web.xml, but could not find.
can you please tell me the path of web.xml.
If you want to know the version of JSP and Servlet YOU are using, you only should be aware of as you are making the appropriate use of the features of the versions. For JSP and servlets, we generally do NOT mention the versions specifically as that of XML files.
Whereas if you want to know, what versions are supported in the running/underlying environment -- the Container, you have to read the document/manual from the vendor wherein they would be mentioning the versions of each product/technology.
The ServletContext object has methods called getMajorVersion and getMinorVersion that tell you the Servlet API version. Which JSP version goes with which Servlet version is shown in the link to the Tomcat docs I posted in the other topic where you asked the same question.
In the future, please don't post the same question multiple times.
An Java EE application server is a concrete implementation of the JSP/Servlet API's.
The highest supported Servlet/JSP API version is to be found in the specs/docs of the appserver used.
The actually used Servlet API version is to be found in the web.xml root declaration.
The JSP version usually goes hand in hand with the servlet version as follows:
Servlet 2.5 uses JSP 2.1
Servlet 2.4 uses JSP 2.0
Servlet 2.3 uses JSP 1.2
Servlet 2.2 uses JSP 1.1
Servlet 2.1 uses JSP 1.0
You can use this diagnosis in a JSP page to find it out programmatically:
Not to mention that you shouldn't be using scriptlets in real world.
You said: Not to mention that you shouldn't be using scriptlets in real world.
Okay .. so Im not seeing it. If you are using jsp to build your site, what do you use instead of the scriplets?
posted 7 years ago
Bauke has long since stopped visiting this site (you're replying to a topic that was discussed back in 2009), so I'll give it a shot: You'd use JSPs without scriptlets. All the business and backend logic would be in servlets, and classes or layers called from it. A JSP is just for generating the textual output (meaning: HTML) of the computation that happens in the Java code. Combined with the JSTL and EL, there's no need for JSPs to contain Java code in the shape of scriptlets.
Nothing? Or something? Like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!