Hi Jason and JSP group,

>> I mean..if all you had to do was put a bunch of <%= bean.getXXX() %>
>> on a page, how hard is that to learn?
>
>That was my argument in the early days of JSP.  But <jsp:getProperty
>name="foo"/> syntax won out as the recommended approach.

Well, won out as the "favorite" but I dont use it. I actually would, except
it is a bit clunkier looking at this point. Maybe later I will go that route.

>
>> As another fellow responded to you, I dont see much difference in
>> the way WebMacro does things.
>
>Although let's be clear that you've never tried WebMacro.

True. You win there. :)

>Whoa!  WebMacro, and all template engines I know about, are Pure Java
>classes that work on top of the Servlet API.  They work EVERYWHERE.
>They're no different than the classes you write to support your
>servlets.  They don't integrate with the server because they don't need
>to.  They don't require vendor support anymore than your utility
>classes.  They work across all OS's and even on API 2.0 servers.
>They even work with JServ (where JSP doesn't fully work).

Yeah..I am eating what I said. I believe later on I said that a template
engine would be nothing more than a servlet with a .ext redirected to it.
My bad.
JSP doesnt fully work with JServ because the developers of JServ havent
done their job fully. :) Thats not to say JSP "shouldn't" work with JServ.
Hell, in that case, JSP doesn't work with alot of servlet engines yet,
because they havne't got around to fully implementing them.

>Can I propose that instead of defending JSP without understanding the
>alternative, you just go try the alternative for a while?  I'm not
>saying you'll like it, you probably won't, but then you can argue
>based on facts and not impressions.

I wish I could. The time involved is more than I can alot. I'll take your
word for it, and stick with JSP.

>> The main reason people go to Java is its portability and ease of
>> use
>
>Well, templates are *more* portable.

I wouldnt say that. I would say JUST as portable given the fact they are a
servlet engine as the template engine. Doesn't mean they are more portable.
JSP engine is a servlet as well..so there isn't any real difference here.
Just in how they are implemented and what they support.

>> Actually, we did our own template engine via a servlet for a while.
>> I can say this..it was 8 times slower than JSP is. That might be
>> because we parse a "template" file replacing tokens with dynamic
>> content in the servlet,
>
>Yeah, repeated parsing is not the fastest way to go.  :-)

MUCHO AGREED! Man..is our site slow because of it.

>If you're the lone engineer and know Java, JSP can work fine for you.
>Sounds like that's your position.  It's often my position, and I still
>prefer templates.  Different strokes...

Well, not the lone engineer, but the lone web developer/java engineer. The
other engineers do the back-end work. I mostly do the JSP/Javabean stuff.

>How will you internationalize your Model 1 pages?  You can't really.
>You need Model 2 for that.  How do you have your page display two
>different error messages besides the success page, one for database
>problems, one for form input problems?  Model 2.

Well, Im not worried about internationalization..but thats a good point. I
can see where Model 2 gives alot more choices to FORWARD to based on the
logic. Like I said, since our site is MOSTLY forms, its far easy to read in
the forms into javabeans automatically, over using the Model 2 approach
where I have to in code, for each form submitted, have a bunch of
mybean.setXXX( request.getParameters("XXX") );. Now, if ANYONE can tell me
a way that using Model 2 can automatically set the beans properties via the
request object..then I would go that route! Then it would be worth it to
me. I just think its more work than necessary, at least at this point.

As for different errors, well, I put all the JavaBean and scriplet code at
the top of the page before any HTML tags, so that in the beans or scriplet
code, I can forward to various pages based on some conditioins from the
previous page, current page, etc. It works..just not as "pretty" as the
Model 2 approach.

However, at least at this point, our site is small. It will get bigger, but
I dont see the need to use the Model 2 approach. Actually, I would, but
like I said..until such a time as I can automatically populate all the
property fields from a form to the bean so the JSP page can display it
without having a slew of lines of code to do it, I'll stick with the Model
1.5 approach.

Anyone know if there is any easy way to populate a bean in a servlet with
the request parameters? Seems it would be nice if the bean constructor
accepted the HttpServletRequest object and did it for you! :)


Kevin Duffey
Software Engineer
[EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to