tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Haines <shai...@ipnet-solutions.com>
Subject RE: role of JSP
Date Thu, 01 Jun 2000 15:08:54 GMT
JSP has something called custom tag libraries (or tag-lib) for short. Take a
look at "Web Development using JavaServer Pages" by Manning Publishing -
they implement a for loop and an if statement in there, which are accessed
as follows:

<yourtag:ifProperty name="bean" property="boolproperty" action="include or
exclude">

	HTML or JSP code

</yourtag:ifProperty>

and

<yourtag:forProperty name="bean" property="indexproperty" id="indexedbean"
class="package.of.indexed.bean">

	Indexed property: <jsp:getProperty name="indexproperty"
property="myproperty"/>

</yourtag:forProperty>

By following this book I have implemented and am using both of these tags..
They are great..  Because of support JSP offers for custom tag-libs you can
extend the JSP page to do anything you want..  There is also a tag-lib
apache effort, take a look at:

http://jakarta.apache.org/taglibs/index.html

Good luck!
Steve

-----Original Message-----
From: Arion [mailto:arion@talentinfo.com.hk]
Sent: Wednesday, May 31, 2000 9:48 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: role of JSP


Hi!

Actually I am not familiar with JSP. Correct me if I was wrong.

Sean Han wrote:

> Hi, everyone:
>
> One of the reasons that separate web applications into
> JSP and servlet is that people like script writers,
> who don't know Java at all but be good at artistic
> design, can do the JSP pages easily. I think writing a
> JSP page should be as easy as writing an ASP page. All
> you need to know are those components(Bean in JSP
> terminology) and their properties, methods and events.
>
> But things are not as ideal as I expect. Here I got
> some problems I found in JSP. Maybe you guys can help
> me out.
>
> 1. In JSP, although there are <jsp:getProperty> and
> <jsp:setProperty> tags available for properties
> accessing, you cannot use them to access an indexed
> property.

You should able to get/set an object. An Array is also an object and thus
you
can achieve what you want.
jsp:get/setProperty comes from HttpSession, right?

> 2. There are not simple flow-control tags, like loop
> or while, in standard JSP tags.

I agree. Although we can have <% if { %> for if tag, <% } %> for endif tag,
it
would be better to have something like <jspIf></jspIf>, <jspWhile
...></jspWhile> for easy script writing.

> 3. Visual tools is not readily available.

I agree! and the error message cannot be easily understandable without
viewing
the generated servlet source file

> Please give advice. Thank you!
>
> Sean
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message