代码之家  ›  专栏  ›  技术社区  ›  Overdose

资源…不可用

  •  0
  • Overdose  · 技术社区  · 15 年前

    如果我尝试使用这个操作(test2),它总是返回“请求的资源(/webapplication4/newfolder/test2.jsp)不可用”。

    运行tomcat6和netbeans 6.7.1

    config.xml(它是 包括 在struts.xml中:

        <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
        <package name="mypackage" namespace="/" extends="struts-default">
            <action name="test2">
                <result>/newFolder/test2.jsp</result>
            </action>
        </package>
    </struts>
    

    alt text http://img2.pict.com/87/b7/dc/1676731/0/clipboard4.jpg

    但如果我将结果值从“/newfolder/test2.jsp”更改为“test.jsp”-一切都正常。

    1 回复  |  直到 15 年前
        1
  •  0
  •   Overdose    15 年前

    需要解决的问题:

    <result>/WEB-INF/newFolder/test2.jsp</result>