【问题标题】:Tomcat The origin server did not find a current representation for the target resource or is not willing to disclose that one existsTomcat 源服务器没有找到目标资源的当前表示或不愿意透露存在的表示
【发布时间】:2018-08-02 07:38:45
【问题描述】:

我在谷歌上检查了这个错误。但没有找到正确的解决方案。

供您参考,我使用的是 struts2,Tomcat 版本是“Tomcat-8.5.30”,操作系统是 Ubuntu。

web.xml:

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

并且项目在适当的位置包含 index.jsp,即 WebContent/index.jsp

仍然显示上述错误。请提供解决方案。

我尝试评论以下代码然后它正在工作。但我需要这行代码来运行我的应用程序。

<!-- 
        <action name="UploadLeavesData">
             <interceptor-ref name="authStack"></interceptor-ref>
            <result name="error">view/common/error.jsp</result>
            <result name="success">view/employees/uploadEmpLeavesFileFromGreytHr.jsp</result>
        </action>

        <action name="importLeaves" class="com.zCon.controller.LeaveFileUploadAction" method="execute">
            <interceptor-ref name="fileUpload">
                <param name="maximumSize">20971520</param>
                <param name="allowedTypes">  
                    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/octet-stream
                </param>  
            </interceptor-ref>  
            <interceptor-ref name="defaultStack"></interceptor-ref>
            <result name="input">view/employees/uploadEmpLeavesFileFromGreytHr.jsp</result>
            <result name="success" type="redirect">UploadLeavesData</result>
        </action>
 -->

提前致谢。

【问题讨论】:

    标签: java struts2 web-deployment tomcat8


    【解决方案1】:

    请检查您的网络应用程序是否存在于 C:\Program Files\Apache Software Foundation\Tomcat XX\webapps 中,因为 Tomcat 文件夹存在于此处和 C:\tomcat-XXXX 就我而言。

    将我的应用程序移到那里后,它就可以工作了。它指向的真实目录似乎就是那个目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-10-14
      • 1970-01-01
      • 1970-01-01
      • 2020-02-27
      • 2023-03-26
      • 2022-10-23
      • 2020-10-03
      相关资源
      最近更新 更多