Rickard,

Whilst I haven't downloaded your example I'm currently working on a model2
web application.  I'm afraid that I've had to shelve my "no java code in
jsp" dogma in favour of the real world.

After writing my own simple "iterator" and "if" tags (since validated as
virtually identical to ones found in orion and jakarta) it turns out that
tags are significantly slower.

For example, we previously used an "iterator" tag to generate option lists
and "if" tags to conditionally add "selected" to particular options
(javascript can be disabled so it has to be done this way).  We found that
it was roughly 12 times faster to replace the "if" tag with a simple
trigraph inside a jsp:expression tag in weblogic5.1.

The overall performance is bad enough that we've considered translating
the jsp before it gets installed in the document root, converting all of
our tags to the &lt% %> java code equivalents.

You know from previous (offline) conversations we've had that I'm a big
fan of taglibs but they are not a silver bullet and they do not offer a
simple, clear alternative to java in the jsp 100% of the time.  Sometimes
(and it seems with weblogic's implementation, often) a bit of java in the
jsp is a smarter option.

Trev

On Mon, 6 Nov 2000, Rickard Oberg wrote:
> Hi!
> 
> > >
> > > So, JSP != "Java code in HTML". Can be, but don't have to be.
> > >
> > > /Rickard
> >
> >
> > true, rickard, but then the control would haave to come from the app
> > developers such that all real code is in the app layer and not in the jsp
> > layer.  The problem with jsps is that code *may* always leak in due to
> poor
> > design/lazy developers.
> 
> Add a test suite that searches for "<%" in the JSP's. If it finds one the
> test fails :-)
> 
> If you simply say "Java code is banned in JSP" that should be enough. If
> not, then fire the ones that break it. I mean, come on, how unreasonable is
> it to use rules in developing an application?
> 
> > how about a servlet-template architecture (such as webmacro)?  we used to
> > develop our apps using jsps but I fast found that people were trying to do
> > things 'quick and dirty' by sticking code into jsps.  needless to say this
> > pissed the hell outta me and now we use webmacro ... which, in my opinion,
> > is a fast and flexible templating engine ...
> 
> So, what you have done is turn off the possibility to do Java code in pages.
> Good goal, but the solution seems weird. The above should be simpler to
> verify that they don't turn lazy.
> 
> BTW, the framework I outlined is servlet-template based. Strange though,
> that post hasn't arrived yet. I will try to repost it.
> 
> /Rickard
> 
> 
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to