You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Michael Duffy <du...@yahoo.com> on 2004/01/16 15:28:45 UTC

Question Regarding JSTL tag

I've got a fundamental question regarding the XML tags
in JSTL.

Which DOM scheme are they using?  The classes in the
org.w3c.dom package?

I'm asking because I've got an application that has a
front controller servlet and a JSP response page.  The
servlet does a query, gets an XML stream, puts it into
session scope, and sends down the response JSP.

The response JSP takes the XML stream out of session
scope and uses the <x:parse> tag into its DOM tree and
iterates through to display values using the
<x:forEach> tag.

I'd like to put the parsed DOM tree back into session
so it can be re-used by the front controller servlet
on the next request.  I'm assuming that I need to put
the DOM var into session scope.

So here are my questions: 

(1) How do I put the parsed DOM var into session scope
for reuse by the servlet?
(2) Am I correct to assume that the servlet will use
the org.w3c.dom classes to walk the tree once it has
it?  

Thanks very much - MOD


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Michael Duffy <du...@yahoo.com>.
Great idea, Kris.  I'll give it a look.  Thank you -
MOD


--- Kris Schneider <kr...@dotech.com> wrote:
> How 'bout creating a utility tag that just converts
> the DOM document 
> into JDOM?
> 
> <x:parse varDom="domDoc" ...> <%-- leave domDoc in
> page scope --%>
>    ..
> </x:parse>
> <myX:dom2jdom var="jdomDoc" dom="domDoc"
> scope="session"/>
> 
> Isn't the Java code to do the "conversion" something
> like:
> 
> org.jdom.Document jdomDoc = new
> DOMBuilder().build(domDoc);
> 
> Or create a bean instead of a tag to do the
> conversion...
> 
> Michael Duffy wrote:
> 
> > RTFM - I need "scopeDom".  Thanks, Kris. - MOD
> > 
> > 
> > --- Michael Duffy <du...@yahoo.com> wrote:
> > 
> >>Hi Kris,
> >>
> >>When I changed that attribute from var to varDom,
> I
> >>got a jsp.error.tlv.invalid.page exception: 
> >>
> >>"Illegal scope attribute without var in "x:parse"
> >>tag"
> >>
> >>Does using the scope attribute preclude using the
> >>varDom?  Please advise. - MOD
> >>
> >>
> >>--- Michael Duffy <du...@yahoo.com> wrote:
> >>
> >>>Thank you, Kris.
> >>>
> >>>Personally I like to use the JDOM library by
> Jason
> >>>Hunter and Brett McLaughlin, but I didn't think
> >>>they'd
> >>>be doing that for JSTL.  No jdom.jar in the
> distro
> >>>that I can see.
> >>>
> >>>Thank you very much for the insight.  I hope I
> can
> >>>take it from here.  Sincerely, MOD
> >>>
> >>>--- Kris Schneider <kr...@dotech.com> wrote:
> >>>
> >>>>You can use:
> >>>>
> >>>><x:parse varDom="doc" ...
> >>>>
> >>>>To force "doc" to be of type
> >>
> >>org.w3c.dom.Document.
> >>
> >>>>Otherwise, if you use 
> >>>>the "var" attribute, the type is implementation
> >>>>dependent. Of course, a 
> >>>>given implementation may happen to also choose
> >>
> >>to
> >>
> >>>>use a DOM document, 
> >>>>there just aren't any guarantees.
> >>>>
> >>>>Michael Duffy wrote:
> >>>>
> >>>>>I answered one of my questions: adding the
> >>>>
> >>>><x:parse
> >>>>
> >>>>>scope="session"/> attribute puts the parsed
> >>
> >>DOM
> >>
> >>>>into
> >>>>
> >>>>>session scope.  
> >>>>>
> >>>>>If I can verify that the classes are
> >>
> >>org.w3c.dom
> >>
> >>>>I'm
> >>>>
> >>>>>all set. - MOD
> >>>>>
> >>>>>
> >>>>>--- Michael Duffy <du...@yahoo.com> wrote:
> >>>>>
> >>>>>
> >>>>>>I've got a fundamental question regarding the
> >>>
> >>>XML
> >>>
> >>>>>>tags
> >>>>>>in JSTL.
> >>>>>>
> >>>>>>Which DOM scheme are they using?  The classes
> >>
> >>in
> >>
> >>>>the
> >>>>
> >>>>>>org.w3c.dom package?
> >>>>>>
> >>>>>>I'm asking because I've got an application
> >>
> >>that
> >>
> >>>>has
> >>>>
> >>>>>>a
> >>>>>>front controller servlet and a JSP response
> >>>
> >>>page. 
> >>>
> >>>>>>The
> >>>>>>servlet does a query, gets an XML stream, puts
> >>>
> >>>it
> >>>
> >>>>>>into
> >>>>>>session scope, and sends down the response
> >>
> >>JSP.
> >>
> >>>>>>The response JSP takes the XML stream out of
> >>>>
> >>>>session
> >>>>
> >>>>>>scope and uses the <x:parse> tag into its DOM
> >>>
> >>>tree
> >>>
> >>>>>>and
> >>>>>>iterates through to display values using the
> >>>>>><x:forEach> tag.
> >>>>>>
> >>>>>>I'd like to put the parsed DOM tree back into
> >>>>>>session
> >>>>>>so it can be re-used by the front controller
> >>>>
> >>>>servlet
> >>>>
> >>>>>>on the next request.  I'm assuming that I need
> >>>
> >>>to
> >>>
> >>>>>>put
> >>>>>>the DOM var into session scope.
> >>>>>>
> >>>>>>So here are my questions: 
> >>>>>>
> >>>>>>(1) How do I put the parsed DOM var into
> >>
> >>session
> >>
> >>>>>>scope
> >>>>>>for reuse by the servlet?
> >>>>>>(2) Am I correct to assume that the servlet
> >>
> >>will
> >>
> >>>>use
> >>>>
> >>>>>>the org.w3c.dom classes to walk the tree once
> >>
> >>it
> >>
> >>>>has
> >>>>
> >>>>>>it?  
> >>>>>>
> >>>>>>Thanks very much - MOD
> 
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Kris Schneider <kr...@dotech.com>.
How 'bout creating a utility tag that just converts the DOM document 
into JDOM?

<x:parse varDom="domDoc" ...> <%-- leave domDoc in page scope --%>
   ..
</x:parse>
<myX:dom2jdom var="jdomDoc" dom="domDoc" scope="session"/>

Isn't the Java code to do the "conversion" something like:

org.jdom.Document jdomDoc = new DOMBuilder().build(domDoc);

Or create a bean instead of a tag to do the conversion...

Michael Duffy wrote:

> RTFM - I need "scopeDom".  Thanks, Kris. - MOD
> 
> 
> --- Michael Duffy <du...@yahoo.com> wrote:
> 
>>Hi Kris,
>>
>>When I changed that attribute from var to varDom, I
>>got a jsp.error.tlv.invalid.page exception: 
>>
>>"Illegal scope attribute without var in "x:parse"
>>tag"
>>
>>Does using the scope attribute preclude using the
>>varDom?  Please advise. - MOD
>>
>>
>>--- Michael Duffy <du...@yahoo.com> wrote:
>>
>>>Thank you, Kris.
>>>
>>>Personally I like to use the JDOM library by Jason
>>>Hunter and Brett McLaughlin, but I didn't think
>>>they'd
>>>be doing that for JSTL.  No jdom.jar in the distro
>>>that I can see.
>>>
>>>Thank you very much for the insight.  I hope I can
>>>take it from here.  Sincerely, MOD
>>>
>>>--- Kris Schneider <kr...@dotech.com> wrote:
>>>
>>>>You can use:
>>>>
>>>><x:parse varDom="doc" ...
>>>>
>>>>To force "doc" to be of type
>>
>>org.w3c.dom.Document.
>>
>>>>Otherwise, if you use 
>>>>the "var" attribute, the type is implementation
>>>>dependent. Of course, a 
>>>>given implementation may happen to also choose
>>
>>to
>>
>>>>use a DOM document, 
>>>>there just aren't any guarantees.
>>>>
>>>>Michael Duffy wrote:
>>>>
>>>>>I answered one of my questions: adding the
>>>>
>>>><x:parse
>>>>
>>>>>scope="session"/> attribute puts the parsed
>>
>>DOM
>>
>>>>into
>>>>
>>>>>session scope.  
>>>>>
>>>>>If I can verify that the classes are
>>
>>org.w3c.dom
>>
>>>>I'm
>>>>
>>>>>all set. - MOD
>>>>>
>>>>>
>>>>>--- Michael Duffy <du...@yahoo.com> wrote:
>>>>>
>>>>>
>>>>>>I've got a fundamental question regarding the
>>>
>>>XML
>>>
>>>>>>tags
>>>>>>in JSTL.
>>>>>>
>>>>>>Which DOM scheme are they using?  The classes
>>
>>in
>>
>>>>the
>>>>
>>>>>>org.w3c.dom package?
>>>>>>
>>>>>>I'm asking because I've got an application
>>
>>that
>>
>>>>has
>>>>
>>>>>>a
>>>>>>front controller servlet and a JSP response
>>>
>>>page. 
>>>
>>>>>>The
>>>>>>servlet does a query, gets an XML stream, puts
>>>
>>>it
>>>
>>>>>>into
>>>>>>session scope, and sends down the response
>>
>>JSP.
>>
>>>>>>The response JSP takes the XML stream out of
>>>>
>>>>session
>>>>
>>>>>>scope and uses the <x:parse> tag into its DOM
>>>
>>>tree
>>>
>>>>>>and
>>>>>>iterates through to display values using the
>>>>>><x:forEach> tag.
>>>>>>
>>>>>>I'd like to put the parsed DOM tree back into
>>>>>>session
>>>>>>so it can be re-used by the front controller
>>>>
>>>>servlet
>>>>
>>>>>>on the next request.  I'm assuming that I need
>>>
>>>to
>>>
>>>>>>put
>>>>>>the DOM var into session scope.
>>>>>>
>>>>>>So here are my questions: 
>>>>>>
>>>>>>(1) How do I put the parsed DOM var into
>>
>>session
>>
>>>>>>scope
>>>>>>for reuse by the servlet?
>>>>>>(2) Am I correct to assume that the servlet
>>
>>will
>>
>>>>use
>>>>
>>>>>>the org.w3c.dom classes to walk the tree once
>>
>>it
>>
>>>>has
>>>>
>>>>>>it?  
>>>>>>
>>>>>>Thanks very much - MOD

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Michael Duffy <du...@yahoo.com>.
RTFM - I need "scopeDom".  Thanks, Kris. - MOD


--- Michael Duffy <du...@yahoo.com> wrote:
> 
> Hi Kris,
> 
> When I changed that attribute from var to varDom, I
> got a jsp.error.tlv.invalid.page exception: 
> 
> "Illegal scope attribute without var in "x:parse"
> tag"
> 
> Does using the scope attribute preclude using the
> varDom?  Please advise. - MOD
> 
> 
> --- Michael Duffy <du...@yahoo.com> wrote:
> > 
> > Thank you, Kris.
> > 
> > Personally I like to use the JDOM library by Jason
> > Hunter and Brett McLaughlin, but I didn't think
> > they'd
> > be doing that for JSTL.  No jdom.jar in the distro
> > that I can see.
> > 
> > Thank you very much for the insight.  I hope I can
> > take it from here.  Sincerely, MOD
> > 
> > --- Kris Schneider <kr...@dotech.com> wrote:
> > > You can use:
> > > 
> > > <x:parse varDom="doc" ...
> > > 
> > > To force "doc" to be of type
> org.w3c.dom.Document.
> > > Otherwise, if you use 
> > > the "var" attribute, the type is implementation
> > > dependent. Of course, a 
> > > given implementation may happen to also choose
> to
> > > use a DOM document, 
> > > there just aren't any guarantees.
> > > 
> > > Michael Duffy wrote:
> > > > I answered one of my questions: adding the
> > > <x:parse
> > > > scope="session"/> attribute puts the parsed
> DOM
> > > into
> > > > session scope.  
> > > > 
> > > > If I can verify that the classes are
> org.w3c.dom
> > > I'm
> > > > all set. - MOD
> > > > 
> > > > 
> > > > --- Michael Duffy <du...@yahoo.com> wrote:
> > > > 
> > > >>I've got a fundamental question regarding the
> > XML
> > > >>tags
> > > >>in JSTL.
> > > >>
> > > >>Which DOM scheme are they using?  The classes
> in
> > > the
> > > >>org.w3c.dom package?
> > > >>
> > > >>I'm asking because I've got an application
> that
> > > has
> > > >>a
> > > >>front controller servlet and a JSP response
> > page. 
> > > >>The
> > > >>servlet does a query, gets an XML stream, puts
> > it
> > > >>into
> > > >>session scope, and sends down the response
> JSP.
> > > >>
> > > >>The response JSP takes the XML stream out of
> > > session
> > > >>scope and uses the <x:parse> tag into its DOM
> > tree
> > > >>and
> > > >>iterates through to display values using the
> > > >><x:forEach> tag.
> > > >>
> > > >>I'd like to put the parsed DOM tree back into
> > > >>session
> > > >>so it can be re-used by the front controller
> > > servlet
> > > >>on the next request.  I'm assuming that I need
> > to
> > > >>put
> > > >>the DOM var into session scope.
> > > >>
> > > >>So here are my questions: 
> > > >>
> > > >>(1) How do I put the parsed DOM var into
> session
> > > >>scope
> > > >>for reuse by the servlet?
> > > >>(2) Am I correct to assume that the servlet
> will
> > > use
> > > >>the org.w3c.dom classes to walk the tree once
> it
> > > has
> > > >>it?  
> > > >>
> > > >>Thanks very much - MOD
> > > >>
> > > >>
> > > >>__________________________________
> > > >>Do you Yahoo!?
> > > >>Yahoo! Hotjobs: Enter the "Signing Bonus"
> > > >>Sweepstakes
> > >
> >
> >>http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > > >>
> > > >>
> > > > 
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > 
> > > >>To unsubscribe, e-mail:
> > > >>taglibs-user-unsubscribe@jakarta.apache.org
> > > >>For additional commands, e-mail:
> > > >>taglibs-user-help@jakarta.apache.org
> > > >>
> > > > 
> > > > 
> > > > 
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > > Sweepstakes
> > > >
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > > > 
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > taglibs-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > taglibs-user-help@jakarta.apache.org
> > > 
> > > -- 
> > > Kris Schneider <ma...@dotech.com>
> > > D.O.Tech       <http://www.dotech.com/>
> > > 
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > taglibs-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > taglibs-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > taglibs-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Michael Duffy <du...@yahoo.com>.
Hi Kris,

When I changed that attribute from var to varDom, I
got a jsp.error.tlv.invalid.page exception: 

"Illegal scope attribute without var in "x:parse" tag"

Does using the scope attribute preclude using the
varDom?  Please advise. - MOD


--- Michael Duffy <du...@yahoo.com> wrote:
> 
> Thank you, Kris.
> 
> Personally I like to use the JDOM library by Jason
> Hunter and Brett McLaughlin, but I didn't think
> they'd
> be doing that for JSTL.  No jdom.jar in the distro
> that I can see.
> 
> Thank you very much for the insight.  I hope I can
> take it from here.  Sincerely, MOD
> 
> --- Kris Schneider <kr...@dotech.com> wrote:
> > You can use:
> > 
> > <x:parse varDom="doc" ...
> > 
> > To force "doc" to be of type org.w3c.dom.Document.
> > Otherwise, if you use 
> > the "var" attribute, the type is implementation
> > dependent. Of course, a 
> > given implementation may happen to also choose to
> > use a DOM document, 
> > there just aren't any guarantees.
> > 
> > Michael Duffy wrote:
> > > I answered one of my questions: adding the
> > <x:parse
> > > scope="session"/> attribute puts the parsed DOM
> > into
> > > session scope.  
> > > 
> > > If I can verify that the classes are org.w3c.dom
> > I'm
> > > all set. - MOD
> > > 
> > > 
> > > --- Michael Duffy <du...@yahoo.com> wrote:
> > > 
> > >>I've got a fundamental question regarding the
> XML
> > >>tags
> > >>in JSTL.
> > >>
> > >>Which DOM scheme are they using?  The classes in
> > the
> > >>org.w3c.dom package?
> > >>
> > >>I'm asking because I've got an application that
> > has
> > >>a
> > >>front controller servlet and a JSP response
> page. 
> > >>The
> > >>servlet does a query, gets an XML stream, puts
> it
> > >>into
> > >>session scope, and sends down the response JSP.
> > >>
> > >>The response JSP takes the XML stream out of
> > session
> > >>scope and uses the <x:parse> tag into its DOM
> tree
> > >>and
> > >>iterates through to display values using the
> > >><x:forEach> tag.
> > >>
> > >>I'd like to put the parsed DOM tree back into
> > >>session
> > >>so it can be re-used by the front controller
> > servlet
> > >>on the next request.  I'm assuming that I need
> to
> > >>put
> > >>the DOM var into session scope.
> > >>
> > >>So here are my questions: 
> > >>
> > >>(1) How do I put the parsed DOM var into session
> > >>scope
> > >>for reuse by the servlet?
> > >>(2) Am I correct to assume that the servlet will
> > use
> > >>the org.w3c.dom classes to walk the tree once it
> > has
> > >>it?  
> > >>
> > >>Thanks very much - MOD
> > >>
> > >>
> > >>__________________________________
> > >>Do you Yahoo!?
> > >>Yahoo! Hotjobs: Enter the "Signing Bonus"
> > >>Sweepstakes
> >
> >>http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > >>
> > >>
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > 
> > >>To unsubscribe, e-mail:
> > >>taglibs-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail:
> > >>taglibs-user-help@jakarta.apache.org
> > >>
> > > 
> > > 
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > Sweepstakes
> > >
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > taglibs-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > taglibs-user-help@jakarta.apache.org
> > 
> > -- 
> > Kris Schneider <ma...@dotech.com>
> > D.O.Tech       <http://www.dotech.com/>
> > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > taglibs-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Michael Duffy <du...@yahoo.com>.
Thank you, Kris.

Personally I like to use the JDOM library by Jason
Hunter and Brett McLaughlin, but I didn't think they'd
be doing that for JSTL.  No jdom.jar in the distro
that I can see.

Thank you very much for the insight.  I hope I can
take it from here.  Sincerely, MOD

--- Kris Schneider <kr...@dotech.com> wrote:
> You can use:
> 
> <x:parse varDom="doc" ...
> 
> To force "doc" to be of type org.w3c.dom.Document.
> Otherwise, if you use 
> the "var" attribute, the type is implementation
> dependent. Of course, a 
> given implementation may happen to also choose to
> use a DOM document, 
> there just aren't any guarantees.
> 
> Michael Duffy wrote:
> > I answered one of my questions: adding the
> <x:parse
> > scope="session"/> attribute puts the parsed DOM
> into
> > session scope.  
> > 
> > If I can verify that the classes are org.w3c.dom
> I'm
> > all set. - MOD
> > 
> > 
> > --- Michael Duffy <du...@yahoo.com> wrote:
> > 
> >>I've got a fundamental question regarding the XML
> >>tags
> >>in JSTL.
> >>
> >>Which DOM scheme are they using?  The classes in
> the
> >>org.w3c.dom package?
> >>
> >>I'm asking because I've got an application that
> has
> >>a
> >>front controller servlet and a JSP response page. 
> >>The
> >>servlet does a query, gets an XML stream, puts it
> >>into
> >>session scope, and sends down the response JSP.
> >>
> >>The response JSP takes the XML stream out of
> session
> >>scope and uses the <x:parse> tag into its DOM tree
> >>and
> >>iterates through to display values using the
> >><x:forEach> tag.
> >>
> >>I'd like to put the parsed DOM tree back into
> >>session
> >>so it can be re-used by the front controller
> servlet
> >>on the next request.  I'm assuming that I need to
> >>put
> >>the DOM var into session scope.
> >>
> >>So here are my questions: 
> >>
> >>(1) How do I put the parsed DOM var into session
> >>scope
> >>for reuse by the servlet?
> >>(2) Am I correct to assume that the servlet will
> use
> >>the org.w3c.dom classes to walk the tree once it
> has
> >>it?  
> >>
> >>Thanks very much - MOD
> >>
> >>
> >>__________________________________
> >>Do you Yahoo!?
> >>Yahoo! Hotjobs: Enter the "Signing Bonus"
> >>Sweepstakes
> >>http://hotjobs.sweepstakes.yahoo.com/signingbonus
> >>
> >>
> > 
> >
>
---------------------------------------------------------------------
> > 
> >>To unsubscribe, e-mail:
> >>taglibs-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
> >>taglibs-user-help@jakarta.apache.org
> >>
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Kris Schneider <kr...@dotech.com>.
You can use:

<x:parse varDom="doc" ...

To force "doc" to be of type org.w3c.dom.Document. Otherwise, if you use 
the "var" attribute, the type is implementation dependent. Of course, a 
given implementation may happen to also choose to use a DOM document, 
there just aren't any guarantees.

Michael Duffy wrote:
> I answered one of my questions: adding the <x:parse
> scope="session"/> attribute puts the parsed DOM into
> session scope.  
> 
> If I can verify that the classes are org.w3c.dom I'm
> all set. - MOD
> 
> 
> --- Michael Duffy <du...@yahoo.com> wrote:
> 
>>I've got a fundamental question regarding the XML
>>tags
>>in JSTL.
>>
>>Which DOM scheme are they using?  The classes in the
>>org.w3c.dom package?
>>
>>I'm asking because I've got an application that has
>>a
>>front controller servlet and a JSP response page. 
>>The
>>servlet does a query, gets an XML stream, puts it
>>into
>>session scope, and sends down the response JSP.
>>
>>The response JSP takes the XML stream out of session
>>scope and uses the <x:parse> tag into its DOM tree
>>and
>>iterates through to display values using the
>><x:forEach> tag.
>>
>>I'd like to put the parsed DOM tree back into
>>session
>>so it can be re-used by the front controller servlet
>>on the next request.  I'm assuming that I need to
>>put
>>the DOM var into session scope.
>>
>>So here are my questions: 
>>
>>(1) How do I put the parsed DOM var into session
>>scope
>>for reuse by the servlet?
>>(2) Am I correct to assume that the servlet will use
>>the org.w3c.dom classes to walk the tree once it has
>>it?  
>>
>>Thanks very much - MOD
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! Hotjobs: Enter the "Signing Bonus"
>>Sweepstakes
>>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>>
>>
> 
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>taglibs-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>taglibs-user-help@jakarta.apache.org
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Question Regarding JSTL tag

Posted by Michael Duffy <du...@yahoo.com>.
I answered one of my questions: adding the <x:parse
scope="session"/> attribute puts the parsed DOM into
session scope.  

If I can verify that the classes are org.w3c.dom I'm
all set. - MOD


--- Michael Duffy <du...@yahoo.com> wrote:
> 
> I've got a fundamental question regarding the XML
> tags
> in JSTL.
> 
> Which DOM scheme are they using?  The classes in the
> org.w3c.dom package?
> 
> I'm asking because I've got an application that has
> a
> front controller servlet and a JSP response page. 
> The
> servlet does a query, gets an XML stream, puts it
> into
> session scope, and sends down the response JSP.
> 
> The response JSP takes the XML stream out of session
> scope and uses the <x:parse> tag into its DOM tree
> and
> iterates through to display values using the
> <x:forEach> tag.
> 
> I'd like to put the parsed DOM tree back into
> session
> so it can be re-used by the front controller servlet
> on the next request.  I'm assuming that I need to
> put
> the DOM var into session scope.
> 
> So here are my questions: 
> 
> (1) How do I put the parsed DOM var into session
> scope
> for reuse by the servlet?
> (2) Am I correct to assume that the servlet will use
> the org.w3c.dom classes to walk the tree once it has
> it?  
> 
> Thanks very much - MOD
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org