English 中文(简体)
Struts1映射到static.xml文件
原标题:Struts 1 map to static .xml file

我正在尝试将路径/crossdomain.xml映射到一些xml内容(无论它是否包含在jsp、xml或任何其他文件中,我都不在乎)。我正在运行struts 1,我已经尝试过:

<action path="/crossdomain.xml" type="org.apache.struts.actions.ForwardAction" parameter="/crossdomain.jsp">
</action>

如果我将路径中的.xml替换为.jsp(那么我可以以.jsp的形式访问它,但我需要它是一个特定的名称),那么这种技术就会起作用。

我还在这里尝试了DefaultServlet的答案:用于提供静态内容的Servlet-显然我们没有catalina.DefaultServlet类。我尝试使用ActionServlet,但没有成功。

超级令人沮丧的是,我第一次尝试的简单映射失败了,没有任何错误或消息。有什么想法吗?

最佳回答

My advice is to skip struts and go straight to Tomcat, a la: http://ekawas.blogspot.com/2006/10/configuring-tomcat-to-serve-static.html

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签