2009/7/14 谢冬鸣 <msys....@gmail.com>:
> Hi david,
> I have another question, I want to forward my Struts2 result to one jsp page
> which included in one jar file, how can I locate the jsp file? You said
> "...there are several Struts2 jars that house css and js files...", do you
> have any idea how to get these files?
>
> Thanks
>
> On Tue, Jul 14, 2009 at 23:29, Kawczynski, David <david_kawczyn...@merck.com
>> wrote:
>
>> I was in the same boat...
>> One of my clients use apache httpd for all static content
>> and tomcat for all dynamic content... there are several
>> Struts2 jars that house css and js files.  If you don't
>> map everything to the Struts2 filter your Struts2 app
>> won't be as full-featured as it could be.  (Javascript
>> validation won't work, any themed presentation will appear
>> quite plain, etc...)
>>

As far as I know, the content that is served by struts directly (css,
js and image files) are always mapped to URLs that start with /struts.
It might be possible to create two mappings, one to /struts/* and
another to *.action. As for the question above, I don't think there is
any good way to serve a JSP out of a jar file. Rather than packaging
your JSPs into your jar, can you configure your build to copy the JSP
somewhere into your app so that it can be served traditionally? If you
have to put the content into a jar, maybe try looking at freemarker.
We use freemarker internally for generating tag output because we can
package it in the jar files and it is more general-purpose than JSP.

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to