简体   繁体   English

如何隐藏TOMCAT webapp文件夹中的JSP文件

[英]How to hide JSP files in TOMCAT webapp folder

We have done a COLLEGE MANAGEMENT PROJECT in JSP using TOMCAT webserver.But,we panicked that some users at that college may stole the programming code.But we are unable to set our password to the system, because it is used by many faculty in that college.我们使用TOMCAT webserver在JSP中做了一个COLLEGE MANAGEMENT PROJECT。但是,我们担心那个学院的一些用户可能会窃取编程代码。但是我们无法设置系统密码,因为它被许多教师使用大学。 How can i hide my actual code ?如何隐藏我的实际代码? Can anyone help me..please..任何人都可以帮助我.. 请..

If you're doing all your business level programming in JSP: Don't worry, nobody will want to have it, other than as an example of how to not do it.如果您在 JSP 中进行所有业务级编程:别担心,除了作为如何不这样做的示例之外,没有人想要拥有它。

JSPs in tomcat's webapps folder are compiled and delivered as HTML to the browser. tomcat 的 webapps 文件夹中的 JSP 被编译并作为 HTML 交付给浏览器。 All your code will be gone anyway, replaced by the actual HTML code that it's supposed to generate.无论如何,您的所有代码都将消失,取而代之的是它应该生成的实际 HTML 代码。

And if you don't want them to be able to be requested directly (eg http://www.example.com/showSomething.jsp ) you can put them into your WEB-INF folder, but you'll have to do some request forwarding internally.如果您不想直接请求它们(例如http://www.example.com/showSomething.jsp ),您可以将它们放入您的 WEB-INF 文件夹中,但您必须执行一些操作内部请求转发。 How to do this is beyond this simple answer as you don't give any indication of the frameworks that you're using.如何做到这一点超出了这个简单的答案,因为您没有给出您正在使用的框架的任何指示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM