开发者

Struts 1 map to static .xml file

I'm trying to map the path /crossdomain.xml to some xml content (whether its contained in a jsp, xml, or any other files, I don't care). I'm running struts 1, and I've tried this:

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

This technique works if I replace the .xml in the path with .jsp (then I can access it as .jsp, but I need it to be a specific name).

I also tried the DefaultServlet answer from here: Servlet for serving static content - apparently we don't have that catalina.DefaultServlet class. I tried using ActionServlet, without any l开发者_开发百科uck.

Its super frustrating that the simple mapping I tried first fails without any errors or messaging. Any ideas?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜