File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes outputting servlet version in the jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "outputting servlet version in the jsp" Watch "outputting servlet version in the jsp" New topic
Author

outputting servlet version in the jsp

Joe Sal
Greenhorn

Joined: Feb 06, 2006
Posts: 13
Quick (hopefully easy) question:

Is there a way to dump out all the jsp/servlet versions in a jsp file (ie. servlet version 1.2 etc)?

My problem is I'm using an ancient app server and the document is almost nil, and I can't find the servlet version number. Any ideas?

Thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Have you checked the APIs in the JavaDoc?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I can't imagine that it wouldn't be easier to just name the server and version and either search the web or ask here.

You *might* be able to pull apart its servlet API library and check for DTDs or something.
Joe Sal
Greenhorn

Joined: Feb 06, 2006
Posts: 13
Bear Bibeault wrote:Have you checked the APIs in the JavaDoc?


hum, depending on what you mean. Are you thinking looking for methods that exist in one version and not the other? and keep working my way up until something just doesn't exist?

Heh, I thought about that, but I was sorta hoping there was an easy solution for this. Might have to just go back to this.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

No, just look in the javadoc for ServletContext.
Joe Sal
Greenhorn

Joined: Feb 06, 2006
Posts: 13
David Newton wrote:I can't imagine that it wouldn't be easier to just name the server and version and either search the web or ask here.

You *might* be able to pull apart its servlet API library and check for DTDs or something.


Just to note, I'm using Resin 2.1.17.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

If I recall correctly: Servlets 2.3 and JSP 1.2
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think that's correct (ah, memories)... and Google:

http://www.nabble.com/Which-servlet-spec-supported-by-Resin-2.1.16--td3950072.html
http://www.caucho.com/resin-2.1/ref/jsp.xtp
Joe Sal
Greenhorn

Joined: Feb 06, 2006
Posts: 13


ahh, you guys are awesome, thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: outputting servlet version in the jsp