Re: HTML Generator/proxy using POST method
I have solved the problem by creating a custom generator based on ProxyGenerator.java (from Lenya). The generator copies parameters and headers from the original request to the proxy request, then it copies cookies and headers back to the response. This seems to work, with the exception that at least in Forrest, the ResponseWrapper object passed to the generator via the objectModel map does not allow modification of response headers and unlike HttpResponse does not have the setStatus() method (sending Form data via the POST method often results in a 'page temporary moved' and redirection to another page). I don't know how to solve this problem - i.e. dynamic redirection from inside an inner body-*, but this is perhaps more Forrest specific. Tal Shalif wrote: > How do I generate (in a sitemap.xmap pipeline) HTML from a remote > HTTP server passing through the client browser's form parameters using > the POST method? > > > What I would like to achieve is embed a foreign site (e.g. a PHP based > trouble ticket system running on Apache server) inside a Forrest/cocoon > site (please see diagram below). I provide the generator with the > client form data via the query string: > > src="http://localhost/tr/{1}{2}?{request:queryString}";> > > But what do I do if the client is sending form data using the POST > method? > > > > +---+ > | remote:80 | (remote http) > +---+ > || > || > \/ > +---+ > | site skinning with forrest/cocoon | (cocoon/forrest) > +---+ > || > || > \/ > +--+ > | User view HTML page and/or submits back | (client browser) > | its form data using the POST method | > +--+ > ||/\ > || || > \/ || > +--+ > | Cocoon passes the request || > | to remote server also using | Site skinning with | (cocoon/forrest) > | the POST method | Cocoon/forres | > +--+ > > || /\ >|||| >\/|| > > +-+ > | remote HTTP server:80 | (remote http) > +-+ > Kaj Kandler <[EMAIL PROTECTED]> wrote: Hi Tal, you should be able to use {request-param:your parameter} http://localhost/tr/{1}{2}?{request-param:first}&{request-param:second}&...";> This will not do as proxy, since there is no knowledge of the query parameters available to place in the sitemap. Also, above constructs a query string, which will not be used if the page is to be retrieved using the POST method. K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to load balance in a portal
solve ! because of there're two nics on each server, so I must indicate the one I want to use in tcpListenAddress Best Regards johnson Ralph Goers 提到: > Clustering can have negative performance implications. Also, some > objects in Cocoon are not serializable and prevent clustering. > > Thomas Soddemann wrote: > >>Hi 許議中, >> >>which application container are you using? >>Many application containers support clustering. With their clustering >>facility you can keep session intact and I guess that's what you are >>looking for. >> >>Cheers, >>Thomas >> >>許議中 wrote: >> >> >>>Hi! >>> >>>I want to do a loadbalance in a portal because of heavy duty, I use >>>apache httpd to call tomcat, using balancer in workers.properties, it >>>really balance, but when I change from one coplet to another, it always >>>change the service server, and cause a 404 error or logout, how to avoid >>>it change server in the same session, or there's another way to do >>>crosss server session. >>> >>>Best Regards >>> >>>johnson >>> >>>- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTML Generator/proxy using POST method
Hi Tal, You can use the cinclude transformer with elaborate syntax to perform more complex HTTP requests. {url you want to access} method POST {name} {value or XML fragment} But this DOES require that the url results XML not HTML. Kind regards, Geert > Drs. G.P.H. Josten Consultant Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 www.daidalos.nl KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > Van: Kaj Kandler [mailto:[EMAIL PROTECTED] > Verzonden: vrijdag 27 oktober 2006 15:01 > Aan: users@cocoon.apache.org > Onderwerp: Re: HTML Generator/proxy using POST method > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Tal, > you should be able to use {request-param:your parameter} > > src="http://localhost/tr/{1}{2}?{request-param:first}&{request > -param:second}&..."> > > K > > Tal Shalif wrote: > > How do I generate (in a sitemap.xmap pipeline) HTML from a > remote HTTP > > server passing through the client browser's form parameters > using the > > POST method? > > > > > > What I would like to achieve is embed a foreign site (e.g. > a PHP based > > trouble ticket system running on Apache server) inside a > > Forrest/cocoon site (please see diagram below). I provide the > > generator with the client form data via the query string: > > > > > src="http://localhost/tr/{1}{2}?{request:queryString}";> > > > > But what do I do if the client is sending form data using the POST > > method? > > > > > > > > +---+ > > | remote:80 | (remote http) > > +---+ > > || > > || > > \/ > > +---+ > > | site skinning with forrest/cocoon | (cocoon/forrest) > > +---+ > > || > > || > > \/ > > +--+ > > | User view HTML page and/or submits back | (client browser) > > | its form data using the POST method | > > +--+ > > ||/\ > > || || > > \/ || > > +--+ > > | Cocoon passes the request || > > | to remote server also using | Site skinning with | > (cocoon/forrest) > > | the POST method | Cocoon/forres | > > +--+ > > > > || /\ > >|||| > >\/|| > > > > +-+ > > | remote HTTP server:80 | (remote http) > > +-+ > > > > > > > > - -- > [EMAIL PROTECTED] > http://conficio.blogspot.com/ > > | We teach software one screencast at a time | > > http://www.conficio.com/ > Tel: +1 (781) 632 5773 - Fax: +1 (781) 207 9159 Conficio > P.O.Box 761062, Melrose, MA 02176 > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.2.5 (MingW32) > > iD8DBQFFQgMlRDUvrJRNjTARAvhuAJ9KkeHD8f9BbaoHX2v6OMKP8QXKyACfZGbW > EIF2BkY4cuspURx1sspI67M= > =TNBl > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to load balance in a portal
Clustering can have negative performance implications. Also, some objects in Cocoon are not serializable and prevent clustering. Thomas Soddemann wrote: > Hi 許議中, > > which application container are you using? > Many application containers support clustering. With their clustering > facility you can keep session intact and I guess that's what you are > looking for. > > Cheers, > Thomas > > 許議中 wrote: > >> Hi! >> >> I want to do a loadbalance in a portal because of heavy duty, I use >> apache httpd to call tomcat, using balancer in workers.properties, it >> really balance, but when I change from one coplet to another, it always >> change the service server, and cause a 404 error or logout, how to avoid >> it change server in the same session, or there's another way to do >> crosss server session. >> >> Best Regards >> >> johnson >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to load balance in a portal
Apache httpd + tomcat 5.5.17 I found some resource about sticky session, still trying,tks. johnson Thomas Soddemann 提到: > Hi 許議中, > > which application container are you using? > Many application containers support clustering. With their clustering > facility you can keep session intact and I guess that's what you are > looking for. > > Cheers, > Thomas > > 許議中 wrote: > >>Hi! >> >>I want to do a loadbalance in a portal because of heavy duty, I use >>apache httpd to call tomcat, using balancer in workers.properties, it >>really balance, but when I change from one coplet to another, it always >>change the service server, and cause a 404 error or logout, how to avoid >>it change server in the same session, or there's another way to do >>crosss server session. >> >>Best Regards >> >>johnson >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to load balance in a portal
Hi 許議中, which application container are you using? Many application containers support clustering. With their clustering facility you can keep session intact and I guess that's what you are looking for. Cheers, Thomas 許議中 wrote: > Hi! > > I want to do a loadbalance in a portal because of heavy duty, I use > apache httpd to call tomcat, using balancer in workers.properties, it > really balance, but when I change from one coplet to another, it always > change the service server, and cause a 404 error or logout, how to avoid > it change server in the same session, or there's another way to do > crosss server session. > > Best Regards > > johnson > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- Dr. Thomas Soddemann | Boltzmannstrasse 2 Grid Architect | 85748 Garching Rechenzentrum der MPG| Germany am MPI fuer Plasmaphysik | --- phone: +49 89 3299 2694 | fax: +49 89 3299 1301 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to load balance in a portal
I'm not sure this is the right list for your question as it is really about apache httpd. I can't really help you but I know our operations folks have configured our load balancer to use sticky sessions. Unfortunately, I don't know the details of how to do it though. 許議中 wrote: > Hi! > > I want to do a loadbalance in a portal because of heavy duty, I use > apache httpd to call tomcat, using balancer in workers.properties, it > really balance, but when I change from one coplet to another, it always > change the service server, and cause a 404 error or logout, how to avoid > it change server in the same session, or there's another way to do > crosss server session. > > Best Regards > > johnson > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]