re: Template Engine of Choice

2002-05-07 Thread chris . stephens

Content-Transfer-Encoding: 7bit

Hi Graham,

I've just started using SiteMesh(from opensymphony.org) and I find it
really refreshing and straightforward. I was using Tiles but it
ultimately seemed over complex.

SiteMesh uses Servlet 2.3 filters so it sits "outside" Struts - this
makes it much easier work with for me or it would help you apply a new
layout and look and feel to an otherwise finished site.

A few pros of SiteMesh:

 - all the "pagelets" that comprise a full page can be generated as
well-formed HTML documents. This makes it easier for them to be designed
and built than other systems (e.g. Tiles) where a "pagelet" might be
just a table (thinking real world/real people here: designers using
Dreamweaver don't need to get their heads around editing pages at the
code level).

 - the concept is really simple to grasp

 - being Filter-based means you can take your Struts hat off when you
want to put together the presentation layer.

 - it applies the layout/look and feel *after* the "pagelets" have been
generated. This allows the presentation to be more easily reactive to
the generated output.

Cons of SiteMesh:

 - I haven't found any yet. Anyone else got some?

Chris
 


*
This email and any files transmitted with it may be confidential and
privileged.  It is intended solely for the use of the individual or
parties to whom it is addressed. If you have received this email in
error please forward it to [EMAIL PROTECTED] and delete all
copies of this message immediately. Thank you.
*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


server side caching in struts

2002-04-09 Thread chris . stephens

Content-Transfer-Encoding: 7bit

Not strictly Struts but will work with it (it uses Servlet 2.3 filters)
- have a look at:

http://opensymphony.com/oscache/features.html

Wonderful, IMHO.

Chris


*
This email and any files transmitted with it may be confidential and
privileged.  It is intended solely for the use of the individual or
parties to whom it is addressed. If you have received this email in
error please forward it to [EMAIL PROTECTED] and delete all
copies of this message immediately. Thank you.
*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Problem with Struts and 2.3 Filters

2002-04-06 Thread chris . stephens

Content-Transfer-Encoding: 7bit

Thanks to all those who responded with help: I have learnt something new
- I did not realise the elements in web.xml had to be in the right order.

I guess I'd better do XML 101 again... :(

Chris
PS my app is leaping ahead now I have got over that stumbling block -
I'm enjoying Struts again and *really* enjoying filters... 


*
This email and any files transmitted with it may be confidential and
privileged.  It is intended solely for the use of the individual or
parties to whom it is addressed. If you have received this email in
error please forward it to [EMAIL PROTECTED] and delete all
copies of this message immediately. Thank you.
*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Problem with Struts and 2.3 Filters

2002-04-04 Thread chris . stephens

Content-Transfer-Encoding: 7bit

Hi folks,

I am currently endeavouring to add Servlet 2.3 filtering (SiteMesh 1.3,
in fact) to a Struts 1.0.2 application - but having no luck. I have
searched the mailing list archives and can find no reference to this
combination.

I have set up inside one webapp folder of Tomcat 4.0.3 a Struts
application which works correctly if it has the Struts application
web.xml file in WEB-INF.

Then I have copied into that same webapp directory a SiteMesh
application. This also works correctly if it has the SiteMesh
application web.xml file in WEB-INF (moving the Struts web.xml aside for
now).

However, if I add the SiteMesh elements ( and 
plus some taglibs) to the web.xml of the Struts application it fails.

In catalina.out I get:
---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.3
PARSE error at line 111 column 11
org.xml.sax.SAXParseException: The content of element type "web-app" 
must match "(icon?,display-
name?,description?,distributable?,context-param*,filter*,filter-
mapping*,listener*,servlet*,servlet-mapping*,session-
config?,mime-mapping*,welcome-file-list?,error-
page*,taglib*,resource-env-ref*,resource-ref*,security-
constraint*,login-config?,security-role*,env-entry*,ejb-
ref*,ejb-local-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.3
---

and the aplication does not work (file not found errors in the browser).

Line 111, column 11 is the very end of the file. I have run Tidy over
web.xml to check for any XML errors and there are none according to that
tool. 

If I comment out the SiteMesh elements and restart Tomcat then the
Struts application starts working again.

If I comment out the Struts elements and restart Tomcat then the
SiteMesh application starts working again.

Can anyone enlighten me as to why the XML parser thinks there is a
problem? I have searched the web for published examples of web.xml that
include filter and servlet definitions and they appear no different in
spirit to what I have...

Any help is much appreciated!

Thanks,

Chris


*
This email and any files transmitted with it may be confidential and
privileged.  It is intended solely for the use of the individual or
parties to whom it is addressed. If you have received this email in
error please forward it to [EMAIL PROTECTED] and delete all
copies of this message immediately. Thank you.
*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Struts and SiteMesh

2002-04-01 Thread Chris Stephens

format=flowed

Hi folks,

I am having trouble getting SiteMesh to work with Struts: the moment I 
add the filter and filter-mapping tags to web.xml I get 'The requested 
resource (/articles/do/Menu) is not available'.

I have set up a demo SiteMesh web application and a demo Struts web 
application in the same webapps directory (using Tomcat 4.0.3, Struts 
1.0 and SiteMesh 1.4.1). By swapping web.xml files I can get both to 
work quite happily but the moment I try to combine them so that SiteMesh 
post-processes the output of the Struts app it all fails.

Am I being dumb here or should these two technologies work together? 
 From my reading I thought the two were quite independent...

Any help much appreciated! Thanks,

Chris


*
This email and any files transmitted with it may be confidential and
privileged.  It is intended solely for the use of the individual or
parties to whom it is addressed. If you have received this email in
error please forward it to [EMAIL PROTECTED] and delete all
copies of this message immediately. Thank you.
*