Another approach might be to ditch the JSPs in favour of another approach to
rendering your view.
One alternative that springs to mind is using Velocity. I havent used it
myself but I do know that there are tools to help you use it in a struts
application.
http://jakarta.apache.org/velocity/index.html
Im not sure however that this is quite what you are looking for, as it
stills seems to me require use of some kind of scripting on the page to deal
with dynamic content, which of course the page designers would need to
learn.

or for something completely different...

There is another alternative, but there isnt much existing support for using
it with struts (ie: you will need to do a lot more work), and that is to
make direct use of DOM manipulation. I am using such a system myself in my
current application, and it allows for a nice seperation of layout and
content. (At the price of heavier memory usage and slower response times
compared to using the JSP tags - whether this is a significant problem
rather depends on the application you are creating. (Ie: do you expect 100
or 1000 users an hour...))

My own approach is homegrown and application specific (with all the 'fun'
that entails) however it is inspired very strongly by the open source XMLC
(which supports html as well as xhtml) library. The basic idea with XMLC, is
that a page designer can use their favorite html editing tool to make the
layout, XMLC will give you a means of getting this page as a DOM (it
actually generates java source code that will build the dom at runtime!) and
the programmer uses Java (proper Java, where it belongs - in classes not on
a layout page!) to insert the dynamic bits. (And can also modify the page in
a more flexible way than a custom taglib ever could). The way the designer
indicates where the dynamic content is to go is usually by means of the id
attribute that all the html elements support. (The designer and programmer
agree on the values to use for the various id's beforehand). You can take a
look at the following link for more info on XMLC:
http://xmlc.enhydra.org/

The Barracuda framework, (another mvc framework for webapps) makes use of
XMLC for its view rendering.

If you want to use XMLC in struts however, you will have quite some work to
do, as among other things you will need to duplicate of lot of the struts
taglib functionality using the XMLC DOM based methodology (which means
digging around in the struts tag source code to see how they do their thing)
as of course XMLC itself knows nothing about ActionForms etc...


-----Original Message-----
From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 13, 2002 04:40
To: 'Struts Users Mailing List'
Subject: RE: content management ideas?


Unfortunately,  I don't believe this is a very practical approach.

A content editor may inadvertantly make a change to a tag without even
noticing it (search & replace, fat-finger, etc).  Then after they upload
their change to the server and spend a few hours trying to figure out why it
is displaying an error, they call you, the developer to debug the problem.
You then compare the previous version (you are using source control, right?)
with the modified version to see what the problem is... yada-yada.

We use an approach of having a template which contains all of our "base"
html .. header, footer, etc.  The content editors can create whatever they
want (we encourage valid XHTML, but usually don't get anything for our
efforts), and upload it to the test servers.  Our framework then pulls the
content into the template via a custom tag (using java.io.*).

Hope this helps... Happy to provide more details if you need.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-----Original Message-----
From: Kenny Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:01 PM
To: Struts Users Mailing List
Subject: RE: content management ideas?


Hi Bryan,

..but that's what JSP is designed to be... html developer friendly. Once you
create the page with all of the struts tags, they should just be able to
code the html and content around the JSP. I know it's not exactly what you
were expecting, but my suggestion would be to let them modify the JSP, just
instruct them that they are not supposed to touch the JSP tags.

Kenny Smith
JournalScape.com

-----Original Message-----
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 1:09 PM
To: Struts Users Mailing List
Subject: content management ideas?


I was wondering how people handle frequent content updates with
Struts/JSP? At my company, I'm building a site for which much of the
"static" content (including things like the CSS stylesheet) will
probably undergo frequent revision. I'd like to open it up for easier
access, such as via FrontPage, so that I (the programmer) am not in the
middle of such changes. But the site is very dynamic, with almost all
page fetches resulting in a database query and dynamic content being
built. So the site needs to be JSP-based, and I don't want the
aforementioned "Frontpagers" modifying the raw JSP pages.

Opinions appreciated on how this compromise can best be reached,

Bryan





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

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


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

Reply via email to