HP3000-L Archives

July 2003, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Thompson <[log in to unmask]>
Reply To:
Chris Thompson <[log in to unmask]>
Date:
Mon, 14 Jul 2003 02:47:29 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (106 lines)
 Still a JSP learner but my understanding is that Custom Tag Libraries
(which I believe is what Evan is talking about)  are to be preferred
over <jsp:usebean>, <jsp:setProperty>, <jsp:getProperty> etc. in the
HTML page for the primary reason that no Java programming is involved to
use them This is potentially attractive for pure web page developers.
Additionally custom tags help to separate code and data.

According to specifications for implementing Custom Tags there are three
components essential to deploying custom tags.
1. A Java tag handler class that implements the tag functionality
2. A Tag Library Descriptor (TLD) which is an XML file describing the
tag and typically located in the web-inf folder (for Tomcat)
3. A JSP page that includes the custom tag.

So based on the above it would appear that Evan's 2nd strategy is to be
preferred, ie. hide the beans from the HTML developer.

A very useful introduction (with examples) to Custom Tags appears in the
Sams publication - Teach Yourself Java Server Pages in 21 Days. (The
2003 version) - much more comprehensive than the title might imply :-)

Hope this is helpful.

Chris Thompson

,In article <[log in to unmask]>, Evan Vaala
<[log in to unmask]> writes
>Just looking for some Java/JSP feedback from any people working with it out
>in 3000L.
>
>(Following contains tags - hope they are translated to lt gt.  If not I
>will resend translated.)
>
>Thinking in the mindsets of an HTML developer and of an application
>developer.
>
>I have a tag (bean) with similiar functionality to the jsp:usebean tag, but
>with a few more capabilities.
>
>Do you think the html coder would like to work with the multiple "bean"
>tags, much like the usebean tags defined within their html?
>
><body>
><ra:bean id="myBean1" class="ra.apps.model.MyBean1" scope="session" />
><ra:bean id="myBean2" class="ra.apps.model.MyBean2" scope="request" />
><ra:bean id="myBean3" class="ra.apps.model.MyBean3" scope="event" />
>
><%=myBean1.getStuff()%><br>
><%=myBean2.getStuff()%><br>
>etc...
>
></body>
>
>Or would they prefer to have these beans defined in a seperate application
>xml config file that the application developer controls.
>
>app.config.xml:
>
><config>
>    <screen name="myscreen.screen">
>        <bean id="myBean1" class="ra.apps.model.MyBean1" scope="session" />
>        <bean id="myBean2" class="ra.apps.model.MyBean2" scope="request" />
>        <bean id="myBean3" class="ra.apps.model.MyBean3" scope="event" />
>        <other-screen-atts />
>    </screen>
></config>
>
>
>The html developer would only be concerned with one tag:
>
><body>
>
><ra:definebeans screen="myscreen.screen" /> <!-- defines myBean1, myBean2,
>myBean3 -->
>
><%=myBean1.getStuff()%><br>
><%=myBean2.getStuff()%><br>
>etc...
>
></body>
>
>The latter option as I mentioned before gives more control to the
>application developer, who is probably the person who will be putting the
>myBeanX objects inside the various scopes.
>
>All the html developer has to be concerned with is working with the beans
>and not having to define them.  Also the HTML developer would not be able
>to mistakenly change the bean defs.
>
>Just looking for feedback from a pretty open minded community.
>
>I know that I could get alot of feedback from the Java/JSP communities, but
>such topics can sometimes cause a list meltdown.  Just trying 3000L first.
>
>Thanks!
>
>Evan Vaala
>Rockwell Automation
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2