简体   繁体   English

如何在Tomcat中链接jsps而不是保留WEB-INF / jsp文件夹?

[英]How to link the jsps in tomcat instead of keeping WEB-INF/jsp folder?

Can anyone please let me know, how to link the jsps in tomcat instead of keeping all jsps in WEB-INF/jsp and binding in the WAR ? 任何人都可以让我知道,如何在tomcat中链接jsps,而不是将所有jsps保留在WEB-INF / jsp中并在WAR中进行绑定? In WEBLOGIC, we can do it by giving the path in weblogic.xml, so everytime we don't need release the WAR for a small jsp fix. 在WEBLOGIC中,我们可以通过在weblogic.xml中提供路径来做到这一点,因此每次我们都不需要发布WAR来进行小规模的jsp修复。

create tile definition and then just pass tiles name in result of action 创建磁贴定义,然后在操作结果中传递磁贴名称

eg : 例如:

<tiles-definitions>
<definition name="test" template="/WEB-INF/views/layouts/MainTemplate.jsp">
      <put-attribute name="body" value="/WEB-INF/views/test.jsp"/>
 </definition> 
</tiles-definitions>

I don't think there is a challenge in giving a fix in jsp when it is put inside WEB-INF in tomcat. 我不认为将jsp放入tomcat的WEB-INF中时在jsp中进行修复没有挑战。 Please replace the jsp and edit the jsp within WEB-INF folder of the exploded directory. 请替换jsp并在展开目录的WEB-INF文件夹中编辑jsp。 say for example, if i deploy test.war in tomcat, then tomcat will extract the test.war into test directory inside webapps folder during startup. 例如说,如果我在tomcat中部署test.war,则tomcat将在启动期间将test.war提取到webapps文件夹内的test目录中。 now, I want to edit the login.jsp in test webapp, i will just make the corrections in login.jsp in WEB-INF folder of test directory (ie the extracted folder) not in test.war. 现在,我要在测试Web应用程序中编辑login.jsp,我将在test.war而不是测试目录的WEB-INF文件夹(即提取的文件夹)中的login.jsp中进行更正。 that's all 就这样

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

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