如何判断页面是否是JSP生成的?

发布于 2024-11-05 14:15:00 字数 73 浏览 0 评论 0原文

由于有许多编程语言可用于开发 Web 应用程序。在不查看源代码的情况下,有哪些方法可以识别 Web 应用程序是用 Java 编写的?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

触ぅ动初心 2024-11-12 14:15:00

可能是 URL 上的 .jsp 扩展名。

然而,这并不一定意味着它是一个 JavaServer Pages 脚本(例如,我可以设置 .jsp 文件以在服务器上使用 PHP 进行渲染),也不是每个 JSP 页面都有 .jsp 扩展名(我如果我愿意的话,可以在我的服务器上使用 JSP 进行 .html 渲染,甚至隐藏页面上的扩展名)。

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).

阳光下的泡沫是彩色的 2024-11-12 14:15:00

大多数时候会有一些提示,但本质上 Web 服务器提供 html 标记,因此可以将其配置为隐藏服务器端的内容。因此,没有明确的方法可以判断一个站点是用 java 编写的。

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.

肤浅与狂妄 2024-11-12 14:15:00

检查网址。如果页面以 .jsp 结尾,则它是 Java 服务器页面。另外,检查页面请求的响应标头。可能有一个 X-Powered-By 标头或类似的内容表明它是由 java 提供支持的。

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.

烛影斜 2024-11-12 14:15:00

如果 URL 包含扩展名,请查看该扩展名是否为 .jsp、.jsf 或 .jspx。可以隐藏它,但如果它有这些扩展之一,那么可以肯定它是用 Java 编写的。

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.

╰つ倒转 2024-11-12 14:15:00

我认为你找不到它,URL可以像.jsp,.jspx,.do,.action,.zul/.zhtml(zk框架),甚至没有扩展名,例如/servlet/http-header-test。

一种可能的方法(也不应该依赖它)是检查响应的 Server http-header,以下示例是 Tomcat 服务器返回的响应:

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

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
百变从容 2024-11-12 14:15:00

Struts 库喜欢(曾经?)使用 .do 扩展名。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文