> -----Ursprüngliche Nachricht----- > Von: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 06. Dezember 2001 08:53 > An: [EMAIL PROTECTED] > Betreff: Re: Proxy Component? > > > > > > Is there any possibility to use Cocoon as proxy? I have some "old" > > applications (written in PHP) that I want to use in combination with > cocoon > > (I want to use some actions) > > > > for example: > > > > <map:match pattern="old_application/**"> > > <map:act type="checkSession"/> > > <map:proxy src="http://old_application_server/{1}"/> > > </map> > > <map:redirect-to uri="login.html"/> > > </map:match> > > > > > > Currently I solved the problem by using the HTML-generator but > if I use it > > the header information of the client will get lost. > > > > If there is no available component - what would be the best way of > > implementing it? > > You can create a reader for this purpose. I needed something like that to > get direct output from a JSP page (that is generating HTML, not XML) and > have implemented the JSPReader. Now you can use it like this: > > <map:match pattern="old_application/**"> > <map:act type="checkSession"/> > <map:read src="/jsp/page.jsp"/> > </map> > <map:redirect-to uri="login.html"/> > </map:match> >
Does the reader use the client's header data (for example the User-Agent) or get this data lost and are replaced with some other values? (I tested this some month ago with the result that the values in the header were replaced.) I think of a component that works like a resource reader but uses the client's http-header data. What do you think? Regards, Reinhard Poetz > So, I hope you got the idea. > > Btw, developers, there are ServletGenerator and JSPGenerator componenets > that implement almost the same thing: get output from a servlet then > generate XML from it. JSPGeneretor uses JSPEngine for that. > Maybe it'll be > better to have something like ServletComponenet and use it either in > generators or readers that have to interact with other servlets? > > Regards, > Konstantin Piroumian > > > > > Regards, > > Reinhard > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, email: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]