Raven50
Raven50

Reputation: 43

How can I tell whether a page was generated by JSP?

Since there are many programming languages that can be used to develop a web application. Without looking at the source code, what are some ways to identify that a web application was written in Java?

Upvotes: 3

Views: 1173

Answers (6)

Bala R
Bala R

Reputation: 108967

Most of the times there are a few hints but essentially the web servers serve html markup so it could be configured to hide the server side stuff. So there can be no definitive way of telling that a site was written in java.

Upvotes: 4

LiuYan 刘研
LiuYan 刘研

Reputation: 1624

I don't think you can findout it, the URL can like .jsp, .jspx, .do, .action, .zul/.zhtml(zk framework) and even no extension such as /servlet/http-header-test.

A posible way (should not rely on it too) is check the Server http-header of response, the following example is a response returned by Tomcat server:

HTTP/1.0 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"7777-1302152739000"
Last-Modified: Thu, 07 Apr 2011 05:05:39 GMT
Content-Type: text/html
Content-Length: 7777
Date: Wed, 04 May 2011 19:47:23 GMT

Upvotes: 0

Kelly S. French
Kelly S. French

Reputation: 12344

The Struts library likes to (used to?) use .do extensions.

Upvotes: 0

Jivlain
Jivlain

Reputation: 3658

If the URL contains an extension, see if that extension is .jsp, .jsf or .jspx. It's possible to hide that, but if it has one of those extensions it's a pretty sure bet that it's written in Java.

Upvotes: 1

Thomas Shields
Thomas Shields

Reputation: 8942

Check the URL. If the pages end in .jsp, it's a Java Server page. Also, examine the response headers on your page request. There may be an X-Powered-By header or something similar that says it's powered by java.

Upvotes: 1

Matt Mitchell
Matt Mitchell

Reputation: 41833

Probably a .jsp extension on the URL.

However, this doesn't necessarily imply it is a JavaServer Pages script (e.g. I could set .jsp files to render using PHP on a server), nor does every JSP page have a .jsp extension (I could make .html render using JSP on my server if I liked, or even hide the extensions on pages).

Upvotes: 6

Related Questions