Custom JATO components
hi ...
i have just about started using jato in conjunction with S1Studio
and find it a real great asset ...
we are trying to build custom jato components which can be packaged
into a jar file and used like any other standard jato component ...
e.g. i have developed this date component which is basically a
composition of 3 comboboxes - one each for m/d/y ...
to render these 3 comboboxes i have a "date" tag (DateTag.java)
which basically includes a file Date.jsp in the parent jsp - the
contents of Date.jsp:
<jato:pagelet>
<jato:combobox name="month"/>
<jato:combobox name="day"/>
<jato:combobox name="year"/>
</jato:pagelet>
The problem with this approach is that I can't package a JSP in a
jar since the web server would not be able to determine the path to
the jsp ...
Can any of u direct me here? ... Also, if u have an example of a
similar packaged custom jato component - that'd be of great help!
thanks much,
keyur
[1126 byte] By [
Guest] at [2007-11-25 9:29:15]

Thanks Craig ... but Somehow this didnt work - maybe I didnt follow
the steps correctly ... here is what i did:
the jar file -> date.jar
date.jar has .class files arranged according to their package
names ..
there's also the "COMP-INF" directory ...
in addition to these - i added another folder called "webapp" ...
and within "webapp" i housed the JSPs ...
i then copied date.jar to <context root>/WEB-INF/lib folder and
started the server ...
however, the web server didn't extract out the JSPs ... did i go
wrong somewhere? .... am i to do something other than this - like
create the jar with some special parameter or change some
configuration in the server?
thanks!
keyur
In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, "Craig V. Conover" <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>>
wrote:
> Keyur,
> You are in luck. There is a way to bundle the JSPs (or any web
resources
> like images and other jar's) in the component jar file so that the
tool
> will expand them properly into your web application's doc root.
>
> It's not officially documented yet, as is the case with creating
> components in general, but here's what you do:
>
> You have the ability to extract arbitrary files from a component
library jar file into the web app's file system. This allows
libraries to automatically unpack files like additional jars,
images, pagelets, etc. All that's needed to take advantage of this
new feature is to create a hierarchy of files in the complib under
a "webapp" directory (off the root). The files under that directory
will then be automatically extracted into the web context's
filesystem.
>
> For example:
>
> /webapp/test/foo.html
>
> will extract to
>
> <context root>/test/foo.html
>
> and the following
>
> /webapp/WEB-INF/lib/foo.jar
>
> will extract to
>
> <context root>/WEB-INF/lib/foo.jar
>
> Anything not under the "webapp" dir in the component jar file will
stay packaged in the jar file.
>
> Does that make sense?
>
> craig
>
>
>
> Keyur Shah wrote:
>
> > hi ...
> >
> > i have just about started using jato in conjunction with S1Studio
> > and find it a real great asset ...
> >
> > we are trying to build custom jato components which can be
packaged
> > into a jar file and used like any other standard jato
component ...
> >
> > e.g. i have developed this date component which is basically a
> > composition of 3 comboboxes - one each for m/d/y ...
> >
> > to render these 3 comboboxes i have a "date" tag (DateTag.java)
> > which basically includes a file Date.jsp in the parent jsp - the
> > contents of Date.jsp:
> >
> > <jato:pagelet>
> > <jato:combobox name="month"/>
> > <jato:combobox name="day"/>
> > <jato:combobox name="year"/>
> > </jato:pagelet>
> >
> > The problem with this approach is that I can't package a JSP in a
> > jar since the web server would not be able to determine the path
to
> > the jsp ...
> >
> > Can any of u direct me here? ... Also, if u have an example of a
> > similar packaged custom jato component - that'd be of great help!
> >
> > thanks much,
> > keyur
> >
> >
> >
> > To download the latest version of JATO, please visit:
> > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>
> >
> > For more information about JATO, please visit:
> > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>
> >
> >
Service
Guest at 2007-7-1 16:35:17 >
