简体   繁体   English

在Azure“应用程序服务”的Tomcat容器中指定WEB-INF的路径

[英]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识别为类型而失败了

According to my test, The WEB-INF floder is under D:\\home\\site\\wwwroot\\webapps\\ROOT in Azurer web app. 根据我的测试,WEB-INF程序位于Azurer Web应用程序中的D:\\ home \\ site \\ wwwroot \\ webapps \\ ROOT下。 The detailed steps are as below. 详细步骤如下。

  1. Get Kudo 获取工藤

在此处输入图片说明 2.Get Path 2.获取路径 在此处输入图片说明

暂无
暂无

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

相关问题 在 Azure Web App Service 中使用 redis 作为容器 - Use redis as a container in Azure Web App Service 从 Azure 应用服务(Web App)访问 Azure 容器实例 - Access Azure Container Instance from Azure App Service (Web App) 如何使用 Tomcat linux 配置 Azure 应用服务的上下文路径 - How to configure context path for Azure App service with Tomcat linux 为Azure容器服务指定Kubernetes版本 - Specifying Kubernetes version for Azure Container Service Azure Web 容器应用程序 - 容器无法连接到外部 WCF 服务 - Azure Web App For Containers - Container cannot connect to outside WCF Service Azure容器服务和容器Web应用程序之间的区别 - Difference between Azure Container Service and Web App for Containers Error: Internal server error in Azure AD authentication Web App deployed as docker container in Azure web App service - Error : Internal server error in Azure AD authentication Web App deployed as docker container in Azure web App service 在Web应用程序部署到Azure中指定工件位置 - Specifying artifactsLocation in web app deployment to Azure Azure Web 自定义容器中的应用程序,环境变量未从应用程序服务传播到容器 - Azure Web App in custom container, env variables not propagated from app service to container Pulumi:添加Azure Web App Service web hook到Azure Container Registry进行持续部署 - Pulumi: Add Azure Web App Service web hook to Azure Container Registry for continuous deployment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM