So it would appear that your servlet engine is also serving as your primary
HTTP stack?  running on port 80?  If you ran Apache on port 80 instead and
used ajp-proxy for your struts requests, then you could just serve all your
static resources directly from apache.  

Now, if you want an integrated security model that covers your Struts and
static resources then things can  get sticky.  It might be worthwhile to
serve your static files from your J2EE container if I can easily protect
them with a Spring Security configuration, rather than integration with the
Apache auth.  

A very common technique for getting some performance boost is to actually
serve your static resources from a different server, so that requests for
these (images, stylesheets, etc) don't take up threads on your application
server...  Rails has a nice switch for doing this.  I don't think we have a
Struts2 construct for it <s:img name='something.png' ...  or <s:resource
environment="dev"... 



Roger Varley wrote:
> 
> On Saturday 16 August 2008 13:06:19 Al Sutton wrote:
>> Not sure where you get the action-per page is the generally accepted
>> norm, but if your page is purely static (i.e. accesses no variables and
>> includes no forms), go straight to the html page.
>>
>> Not only does this save you the JSP compile/post-compile interpretation
>> time it also allows you to move the page onto an separate Apache HTTPD
>> server to improve performance.
>>
> 
> This is where I think I'm getting confused. How do I seperate my static
> HTML 
> from my application? Any link http://www.host.com/MyApplication passes 
> directly to Struts 2.
> 
> Regards
> 
>>
>> Roger wrote:
>> > Having followed this group for a while I know that the generally
>> accepted
>> > wisdom is that every page should be handled via an Action. However, I
>> > have an application that is probably going to be 70% static pages with
>> > 30% Strut-able actions to handle form entry etc etc. This means that
>> I'm
>> > going to have an awful lot of action classes that do nothing other than
>> > display the next page which feels kludgy. How would people deal with
>> > this?
>> >
>> > Regards
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts2-Application-Structure-tp19010085p19025840.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to