You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "M.J. Maré" <mj...@webtothemax.com> on 2000/06/16 22:58:10 UTC
Where can I find the tag-lib project source or binary?
Where can I find the tag-lib project source or binary? I couldn't find it in
http://jakarta.apache.org/builds/tomcat/nightly/
TIA
Marcel
Re: Creating Your Own Implicit Objects
Posted by Jon Baer <jo...@digitalanywhere.com>.
Hmmm I see what you are saying and I have to say I found the ActionServlet of Structs
very useful. But on my original question what I meant is by allowing something like
object declaration in a taglib and then being accessible outside the tag. The approach
I want to take is similar to what you have where the taglib loads all the mappings of a
prop file and then uses it throughout the page as such example:
<% @ taglib uri="uri" prefix="load" %>
<load:map file="file.map"/>
<!-- now the file is loaded and you can use an object from the taglib -->
Here is the value of <% mapValue.getName(0) %> : <% mapValue.getValue(0) %>
So that mapValue is available throughout the JSP page without having to declare a tag
for it. Is this possible?
- Jon
"Craig R. McClanahan" wrote:
> Jon Baer wrote:
>
> > Hi,
> >
> > This is more of a programming question using Tomcat, I am interested in how to
> > accomplish via JSP/Servlet 2.2 on how to create your own implicit objects in a
> > page. Does anyone have any reference for this or a piece of code that shows it
> > being done? Im told you can do it though a taglib but I havent seen it in an
> > examples.
> >
>
> You can indeed create new implicit objects in a custom tag (portable across any
> servlet 2.2/JSP 1.1 container, not just Tomcat). For just one example, check out
> the <struts:enumerate> tag (Java class is org.apache.struts.taglib.EnumerateTag) in
> the Struts framework project at <http://jakarta.apache.org/struts>. It creates an
> implicit object for the current element of a collection that is visible to other
> tags (and scriptlets) on the current page, as well as allowing you to loop through
> all the elements of an Enumeration or an array.
>
> If you are using an architecture that forwards to a JSP page (using
> RequestDispatcher.forward), you should also know that there is a direct
> correspondence between the attributes models for servlets and JSP pages:
>
> * Request attributes (servlet) == request scope beans (JSP)
> * Session attributes (servlet) == session scope beans (JSP)
> * ServletContext attributes (servlet) == application scope beans (JSP)
>
> This correspondence makes it very easy to share information between the various
> servlets and JSP pages in your web application.
>
> >
> > Thanks.
> >
> > - Jon
> >
>
> Craig McClanahan
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
Re: Creating Your Own Implicit Objects
Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
The JSP 1.1 spec suggested an action like <me:defineObjects/> ... See
section 5.8.1.
- eduard/o
"Craig R. McClanahan" wrote:
>
> Jon Baer wrote:
>
> > Hi,
> >
> > This is more of a programming question using Tomcat, I am interested in how to
> > accomplish via JSP/Servlet 2.2 on how to create your own implicit objects in a
> > page. Does anyone have any reference for this or a piece of code that shows it
> > being done? Im told you can do it though a taglib but I havent seen it in an
> > examples.
> >
>
> You can indeed create new implicit objects in a custom tag (portable across any
> servlet 2.2/JSP 1.1 container, not just Tomcat). For just one example, check out
> the <struts:enumerate> tag (Java class is org.apache.struts.taglib.EnumerateTag) in
> the Struts framework project at <http://jakarta.apache.org/struts>. It creates an
> implicit object for the current element of a collection that is visible to other
> tags (and scriptlets) on the current page, as well as allowing you to loop through
> all the elements of an Enumeration or an array.
>
> If you are using an architecture that forwards to a JSP page (using
> RequestDispatcher.forward), you should also know that there is a direct
> correspondence between the attributes models for servlets and JSP pages:
>
> * Request attributes (servlet) == request scope beans (JSP)
> * Session attributes (servlet) == session scope beans (JSP)
> * ServletContext attributes (servlet) == application scope beans (JSP)
>
> This correspondence makes it very easy to share information between the various
> servlets and JSP pages in your web application.
>
> >
> > Thanks.
> >
> > - Jon
> >
>
> Craig McClanahan
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
TagLib + JSPBean Documentation Tools
Posted by Jon Baer <jo...@digitalanywhere.com>.
I have a question, is there any tools that can document beans into a property sheet and
is there currently any specific tools for documenting custom taglibs? Is there a
standard way of doing these?
Thanks.
- Jon
Re: Creating Your Own Implicit Objects
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jon Baer wrote:
> Hi,
>
> This is more of a programming question using Tomcat, I am interested in how to
> accomplish via JSP/Servlet 2.2 on how to create your own implicit objects in a
> page. Does anyone have any reference for this or a piece of code that shows it
> being done? Im told you can do it though a taglib but I havent seen it in an
> examples.
>
You can indeed create new implicit objects in a custom tag (portable across any
servlet 2.2/JSP 1.1 container, not just Tomcat). For just one example, check out
the <struts:enumerate> tag (Java class is org.apache.struts.taglib.EnumerateTag) in
the Struts framework project at <http://jakarta.apache.org/struts>. It creates an
implicit object for the current element of a collection that is visible to other
tags (and scriptlets) on the current page, as well as allowing you to loop through
all the elements of an Enumeration or an array.
If you are using an architecture that forwards to a JSP page (using
RequestDispatcher.forward), you should also know that there is a direct
correspondence between the attributes models for servlets and JSP pages:
* Request attributes (servlet) == request scope beans (JSP)
* Session attributes (servlet) == session scope beans (JSP)
* ServletContext attributes (servlet) == application scope beans (JSP)
This correspondence makes it very easy to share information between the various
servlets and JSP pages in your web application.
>
> Thanks.
>
> - Jon
>
Craig McClanahan
Creating Your Own Implicit Objects
Posted by Jon Baer <jo...@digitalanywhere.com>.
Hi,
This is more of a programming question using Tomcat, I am interested in how to
accomplish via JSP/Servlet 2.2 on how to create your own implicit objects in a
page. Does anyone have any reference for this or a piece of code that shows it
being done? Im told you can do it though a taglib but I havent seen it in an
examples.
Thanks.
- Jon