[英]Specifying path for WEB-INF in Tomcat container in an Azure “App Service”
web.xml contains the path for WEB-INF. web.xml包含WEB-INF的路径。 This is how it looks on my local computer: 这是在我的本地计算机上的样子:
<init-param>
<param-name>webInfPath</param-name>
<param-value>C:\\eclipse workspace\\...\\MyProject\\WEB-INF</param-value>
</init-param>
I deployed my Java/JSP application to a Tomcat container in an Azure "App Service". 我将Java / JSP应用程序部署到Azure“应用程序服务”中的Tomcat容器中。
I need to specify the new path of WEB-INF in web.xml to reflect the deployment path. 我需要在web.xml中指定WEB-INF的新路径以反映部署路径。
How do I do this? 我该怎么做呢?
I have tried doing <%=servletContext.getRealPath("/")%>
in a jsp to retrieve the filepath, but this fails due to not recognizing servletContext as a type 我尝试在jsp中执行<%=servletContext.getRealPath("/")%>
来检索文件路径,但是由于未将ServletContext识别为类型而失败了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.