You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2001/07/23 17:47:56 UTC

JSP Reader

Hi, dims and team!

Just took a look at the JSPGenerator and it occured to me that it'll be easy
to extract from the stream reading part and make a JSP reader. It can be
useful for a JSP based site controlled by Cocoon sitemap. (We are at out
project using this approach). Now we are using an ugly way of flow control
(redirects to JSP servlet) after sitemap called appropriate actions.

Will anybody of the authors of JSPGenerator implement this? If no, then I'll
try it do it myself.

Best regards,

Konstantin Piroumian
Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: JSP Reader

Posted by Davanum Srinivas <di...@yahoo.com>.
Konstantin,

It should be really easy to write a JSPReader based on the JSPEngine/JSPGenerator. Take a shot at
it and let us if you run into any problems. Check the docs in C2.1 for more information in the
JSPEngine.

Thanks,
dims

--- "Piroumian, Konstantin" <KP...@flagship.ru> wrote:
> > Konstantin,
> >
> > Can you please explain a bit? Generator+Serializer=Reader, so you won't
> need a special JSPReader.
> > Can you explain why you need one?
> 
> Sure.
> The problem is that we are using JSP not for XML generation, but for final
> HTML output. So, I can't use JSPGenerator because the output of our pages is
> not XML comformant and there is no need to generate SAX events. The only
> thing I need is to be able to read the output stream of the JSP servlet
> (just like HTMLReader does) and output it as is. In JSPGenerator you get the
> output and set it as an input for the parser - I don't need the second step.
> Currently we are using redirects to JSP servlet to be able to performs
> actions and then show the page, but it's an ugly, unsecure and uneffective
> way of flow control.
> 
> P.S. Don't ask me why we are using such uncommon approach - it wasn't my
> decision - there were a number of reasons for that. One of them was the huge
> number of JSP developers against a very few (almost absence) of Cocoon
> developers or even XML/XSL developers.
> 
> >
> > Thanks,
> > dims
> >
> > --- "Piroumian, Konstantin" <KP...@flagship.ru> wrote:
> > > Hi, dims and team!
> > >
> > > Just took a look at the JSPGenerator and it occured to me that it'll be
> easy
> > > to extract from the stream reading part and make a JSP reader. It can be
> > > useful for a JSP based site controlled by Cocoon sitemap. (We are at out
> > > project using this approach). Now we are using an ugly way of flow
> control
> > > (redirects to JSP servlet) after sitemap called appropriate actions.
> > >
> > > Will anybody of the authors of JSPGenerator implement this? If no, then
> I'll
> > > try it do it myself.
> > >
> > > Best regards,
> > >
> > > Konstantin Piroumian
> > > Software engineer
> > >
> > > Protek Flagship LLC
> > > Phone: + 7 095 795 0520 (add. 1288)
> > > Fax: + 7 095 795 0525
> > > E-mail: kpiroumian@flagship.ru
> > > http://www.protek.com
> > >
> >
> >
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> >


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: JSP Reader

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> Konstantin,
>
> Can you please explain a bit? Generator+Serializer=Reader, so you won't
need a special JSPReader.
> Can you explain why you need one?

Sure.
The problem is that we are using JSP not for XML generation, but for final
HTML output. So, I can't use JSPGenerator because the output of our pages is
not XML comformant and there is no need to generate SAX events. The only
thing I need is to be able to read the output stream of the JSP servlet
(just like HTMLReader does) and output it as is. In JSPGenerator you get the
output and set it as an input for the parser - I don't need the second step.
Currently we are using redirects to JSP servlet to be able to performs
actions and then show the page, but it's an ugly, unsecure and uneffective
way of flow control.

P.S. Don't ask me why we are using such uncommon approach - it wasn't my
decision - there were a number of reasons for that. One of them was the huge
number of JSP developers against a very few (almost absence) of Cocoon
developers or even XML/XSL developers.

>
> Thanks,
> dims
>
> --- "Piroumian, Konstantin" <KP...@flagship.ru> wrote:
> > Hi, dims and team!
> >
> > Just took a look at the JSPGenerator and it occured to me that it'll be
easy
> > to extract from the stream reading part and make a JSP reader. It can be
> > useful for a JSP based site controlled by Cocoon sitemap. (We are at out
> > project using this approach). Now we are using an ugly way of flow
control
> > (redirects to JSP servlet) after sitemap called appropriate actions.
> >
> > Will anybody of the authors of JSPGenerator implement this? If no, then
I'll
> > try it do it myself.
> >
> > Best regards,
> >
> > Konstantin Piroumian
> > Software engineer
> >
> > Protek Flagship LLC
> > Phone: + 7 095 795 0520 (add. 1288)
> > Fax: + 7 095 795 0525
> > E-mail: kpiroumian@flagship.ru
> > http://www.protek.com
> >
>
>
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: JSP Reader

Posted by Davanum Srinivas <di...@yahoo.com>.
Konstantin,

Can you please explain a bit? Generator+Serializer=Reader, so you won't need a special JSPReader.
Can you explain why you need one?

Thanks,
dims

--- "Piroumian, Konstantin" <KP...@flagship.ru> wrote:
> Hi, dims and team!
> 
> Just took a look at the JSPGenerator and it occured to me that it'll be easy
> to extract from the stream reading part and make a JSP reader. It can be
> useful for a JSP based site controlled by Cocoon sitemap. (We are at out
> project using this approach). Now we are using an ugly way of flow control
> (redirects to JSP servlet) after sitemap called appropriate actions.
> 
> Will anybody of the authors of JSPGenerator implement this? If no, then I'll
> try it do it myself.
> 
> Best regards,
> 
> Konstantin Piroumian
> Software engineer
> 
> Protek Flagship LLC
> Phone: + 7 095 795 0520 (add. 1288)
> Fax: + 7 095 795 0525
> E-mail: kpiroumian@flagship.ru
> http://www.protek.com
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org