Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
struts2。将路径添加到url_Url_Struts2 - Fatal编程技术网

struts2。将路径添加到url

struts2。将路径添加到url,url,struts2,Url,Struts2,我在和struts2一起工作。 外部应用程序使用url调用我的应用程序 http://localhost:8080/present/jsp/mi.action?cod=02021 但是由于我的JSP文件系统,我的操作结果是 http://localhost:8080/present/jsp/ALTE/mi.action?cod=02021 (注意ALTE中的差异) JSP有如下几行代码: <%@ include file="../comuns/comunCssyJs.jsp"%>

我在和struts2一起工作。 外部应用程序使用url调用我的应用程序

http://localhost:8080/present/jsp/mi.action?cod=02021
但是由于我的JSP文件系统,我的操作结果是

http://localhost:8080/present/jsp/ALTE/mi.action?cod=02021
(注意ALTE中的差异)

JSP有如下几行代码:

<%@ include file="../comuns/comunCssyJs.jsp"%>

第一件事是出去玩。 如果我使用第一个链接访问,则会加载页面,但找不到包含文件。但是,第二个链接没有问题

有人知道我能做什么吗?我知道我可以更改我的JSP-sdir-s,但我更喜欢“自动添加”url的ALTE路径。可能吗

提前谢谢。
Jon

使用Struts2
标记和
标记。

/WEB-INF/ALTE/comuns/comunCssyJs.jsp
一样将绝对路径放在
comuncsyjs.jsp上。哇,这真的有效吗?