You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2014/09/30 11:13:47 UTC
Tapestry via PHP proxy
I'd like to be able to embed my tapestry pages including form interactions via PHP script on a remote host.
Is there any simple way to accoumplish this? I need to hide the application server with my Tapestry app from the client, so I need some kind of proxy interaction.
John
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Re: Tapestry via PHP proxy
Posted by Lance Java <la...@googlemail.com>.
Or you could decorate the BaseUrlSource service to check for request
headers etc.
On 1 Oct 2014 15:07, "Thiago H de Paula Figueiredo" <th...@gmail.com>
wrote:
> On Wed, 01 Oct 2014 10:58:18 -0300, John <jo...@quivinco.com> wrote:
>
> Thanks for this.
>>
>> My Tapestry components will inject into a number of different sites, so I
>> think I must use LinkRewriter like Thiago suggests. This will allow me to
>> assign the URLs dynamically depending on request I guess?
>>
>
> Yep. You can implement any logic you want in your LinkRewriter or
> URLRewriteRule implementation.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Tapestry via PHP proxy
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 01 Oct 2014 10:58:18 -0300, John <jo...@quivinco.com> wrote:
> Thanks for this.
>
> My Tapestry components will inject into a number of different sites, so
> I think I must use LinkRewriter like Thiago suggests. This will allow me
> to assign the URLs dynamically depending on request I guess?
Yep. You can implement any logic you want in your LinkRewriter or
URLRewriteRule implementation.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry via PHP proxy
Posted by John <jo...@quivinco.com>.
Thanks for this.
My Tapestry components will inject into a number of different sites, so I think I must use LinkRewriter like Thiago suggests. This will allow me to assign the URLs dynamically depending on request I guess?
John
----- Original Message -----
From: Lance Java
To: Tapestry users
Sent: Wednesday, October 01, 2014 1:43 PM
Subject: Re: Tapestry via PHP proxy
Tapestry has built-in support for rendering links to a proxy via the
BaseUrlSource.
If you contribute the following symbols to match your PHP server
- SymbolConstants.HOSTNAME
- SymbolConstants.HOSTPORT
- SymbolConstants.HOSTPORT_SECURE
All links (and form post endpoints) generated by tapestry will point to the
PHP server rather than the tapestry container.
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Re: Tapestry via PHP proxy
Posted by Lance Java <la...@googlemail.com>.
Tapestry has built-in support for rendering links to a proxy via the
BaseUrlSource.
If you contribute the following symbols to match your PHP server
- SymbolConstants.HOSTNAME
- SymbolConstants.HOSTPORT
- SymbolConstants.HOSTPORT_SECURE
All links (and form post endpoints) generated by tapestry will point to the
PHP server rather than the tapestry container.
Re: Tapestry via PHP proxy
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 01 Oct 2014 05:31:08 -0300, John <jo...@quivinco.com> wrote:
> But thanks for the point about URL rewriting, that seems to be the main
> problem. Could some Tapestry filter rewite the URLs based on the request
> header,
You can do that using the LinkRewriter API or the old Tapestry URL
rewriter API (for incoming URLs, the old API is easier to use than
LinkRewriter): https://github.com/thiagohp/tapestry-url-rewriter.
<dependency>
<groupId>br.com.arsmachina</groupId>
<artifactId>tapestry-url-rewriter</artifactId>
<version>2.0.0</version>
</dependency>
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry via PHP proxy
Posted by John <jo...@quivinco.com>.
Hi,
Yes I tried iframe already, but I have had problems with some Tapestry mixins, for example the jquery Tooltip mixin will spill the title text over the edge of the frame causing to the text to crop. And I don't want the server address serving Tapestry to turn up in the broswer history. Some of my clients will want to embed my Tapestry components into their PHP pages.
But thanks for the point about URL rewriting, that seems to be the main problem. Could some Tapestry filter rewite the URLs based on the request header, or maybe just an extra request parameter? Or maybe this should all be done in PHP.
John
----- Original Message -----
From: Thiago H de Paula Figueiredo
To: Tapestry users
Sent: Tuesday, September 30, 2014 2:58 PM
Subject: Re: Tapestry via PHP proxy
On Tue, 30 Sep 2014 09:19:40 -0300, Chris Mylonas <ch...@opencsta.org>
wrote:
> <tapestry form here>
> And wants the tapestry stuff to be embedded here - like a cool form
> </tapestry form here>
This probably won't work without URL rewriting because otherwise the URL
to which the form will POST will be wrong.
By the way, why do something like that? Embed a Tapestry form inside a PHP
page? Why not an iframe instead? This way, the problem above won't exist.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Re: Tapestry via PHP proxy
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 30 Sep 2014 09:19:40 -0300, Chris Mylonas <ch...@opencsta.org>
wrote:
> <tapestry form here>
> And wants the tapestry stuff to be embedded here - like a cool form
> </tapestry form here>
This probably won't work without URL rewriting because otherwise the URL
to which the form will POST will be wrong.
By the way, why do something like that? Embed a Tapestry form inside a PHP
page? Why not an iframe instead? This way, the problem above won't exist.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry via PHP proxy
Posted by Chris Mylonas <ch...@opencsta.org>.
He probably has existing stuff. So not really a reverse proxy to app
server.
Like,
<html>
<?php
stuff going on here
?>
<tapestry form here>
And wants the tapestry stuff to be embedded here - like a cool form
</tapestry form here>
<?php
and go back to php here
?>
<footer>
All in the same page, copyright 2020 (me).
</footer>
<html>
On Tue, 30 Sep 2014 22:14:32 +1000, Charlouze <me...@charlouze.com> wrote:
> PHP usually works with apache or nginx or another http deamon... why not
> use those as a proxy (it'll be easier).
>
> 2014-09-30 14:10 GMT+02:00 John <jo...@quivinco.com>:
>
>> You are right, just wondering if anyone has achieved success with this
>> here.
>>
>> My main concern comes with how tapestry secures forms.
>>
>> John
>> ----- Original Message -----
>> From: Lance Java
>> To: Tapestry users
>> Sent: Tuesday, September 30, 2014 12:11 PM
>> Subject: Re: Tapestry via PHP proxy
>>
>>
>> Sounds more like a php question than a tapestry question.
>> On 30 Sep 2014 10:14, "John" <jo...@quivinco.com> wrote:
>>
>> > I'd like to be able to embed my tapestry pages including form
>> interactions
>> > via PHP script on a remote host.
>> >
>> > Is there any simple way to accoumplish this? I need to hide the
>> > application server with my Tapestry app from the client, so I need
>> some
>> > kind of proxy interaction.
>> >
>> > John
>> >
>> > ---
>> > This email is free from viruses and malware because avast! Antivirus
>> > protection is active.
>> > http://www.avast.com
>> >
>>
>>
>> ---
>> This email is free from viruses and malware because avast! Antivirus
>> protection is active.
>> http://www.avast.com
>>
--
Using Opera's mail client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry via PHP proxy
Posted by Charlouze <me...@charlouze.com>.
PHP usually works with apache or nginx or another http deamon... why not
use those as a proxy (it'll be easier).
2014-09-30 14:10 GMT+02:00 John <jo...@quivinco.com>:
> You are right, just wondering if anyone has achieved success with this
> here.
>
> My main concern comes with how tapestry secures forms.
>
> John
> ----- Original Message -----
> From: Lance Java
> To: Tapestry users
> Sent: Tuesday, September 30, 2014 12:11 PM
> Subject: Re: Tapestry via PHP proxy
>
>
> Sounds more like a php question than a tapestry question.
> On 30 Sep 2014 10:14, "John" <jo...@quivinco.com> wrote:
>
> > I'd like to be able to embed my tapestry pages including form
> interactions
> > via PHP script on a remote host.
> >
> > Is there any simple way to accoumplish this? I need to hide the
> > application server with my Tapestry app from the client, so I need some
> > kind of proxy interaction.
> >
> > John
> >
> > ---
> > This email is free from viruses and malware because avast! Antivirus
> > protection is active.
> > http://www.avast.com
> >
>
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
Re: Tapestry via PHP proxy
Posted by John <jo...@quivinco.com>.
You are right, just wondering if anyone has achieved success with this here.
My main concern comes with how tapestry secures forms.
John
----- Original Message -----
From: Lance Java
To: Tapestry users
Sent: Tuesday, September 30, 2014 12:11 PM
Subject: Re: Tapestry via PHP proxy
Sounds more like a php question than a tapestry question.
On 30 Sep 2014 10:14, "John" <jo...@quivinco.com> wrote:
> I'd like to be able to embed my tapestry pages including form interactions
> via PHP script on a remote host.
>
> Is there any simple way to accoumplish this? I need to hide the
> application server with my Tapestry app from the client, so I need some
> kind of proxy interaction.
>
> John
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Re: Tapestry via PHP proxy
Posted by Lance Java <la...@googlemail.com>.
Sounds more like a php question than a tapestry question.
On 30 Sep 2014 10:14, "John" <jo...@quivinco.com> wrote:
> I'd like to be able to embed my tapestry pages including form interactions
> via PHP script on a remote host.
>
> Is there any simple way to accoumplish this? I need to hide the
> application server with my Tapestry app from the client, so I need some
> kind of proxy interaction.
>
> John
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>