You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Mazhar, Osman (Home Office)" <ma...@lls.org> on 2006/02/07 21:22:56 UTC
disable rendering of tag
It seems like the Shell component creates an http base tag as follows:
<base href="http://127.0.0.1:9090/MyApp/"/>
Because of this base tag, I cannot have apache http server serve as a
reverse proxy to my tapestry application as it messes up all links on
the page.
Is there a way to disable rendering of this base tag somehow? Or is
there another trick, perhaps in apache http server?
Osman Mazhar
Sr Technical Architect
The Leukemia & Lymphoma Society
1311 Mamaroneck Avenue
White Plains, NY 10605
914-821-8210
______________________________________________________________________
This e-mail has been scanned by The Leukemia & Lymphoma Society Managed Email Content Service, provided by MCI and Message Labs.
NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you.
Re: disable rendering of tag (solution for Tapestry 4)
Posted by Jan Normann Nielsen <li...@dubbekarl.dk>.
Mazhar, Osman (Home Office) skrev:
> It seems like the Shell component creates an http base tag as follows:
>
>
>
> <base href="http://127.0.0.1:9090/MyApp/"/>
>
> Because of this base tag, I cannot have apache http server serve as a
> reverse proxy to my tapestry application as it messes up all links on
> the page.
>
>
> Is there a way to disable rendering of this base tag somehow? Or is
> there another trick, perhaps in apache http server?
>
This answer works for Tapestry 4:
Yes, it's definitely possible but it took me quite some work to figure
it out a couple of months ago. I looked at the Tapestry source code but
also had help from this mailing list.
The <base> tag is rendered by a Hivemind service, so if you need to
change the way the tag is rendered (e.g. by not rendering it at all),
add the file hivemodule.xml (or append to the file if it already exists)
in your WEB-INF folder of your Tapestry 4 web application:
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
This HiveMind module overrides the Tapestry "tapestry.url.BaseTagWriter"
service implementation so no base tag isn't rendered at all in any
pages.
-->
<module id="mymoduleid" version="1.0.0" package="mypackage">
<implementation service-id="tapestry.url.BaseTagWriter">
<create-instance class="MyBaseTagWriter" />
</implementation>
</module>
(fill out "mymoduleid", "mypackage" and "MyBaseTagWriter" appropriately)
and implement the mypackage.MyBaseTagWriter class like e.g.
package mypackage;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRender;
import org.apache.tapestry.IRequestCycle;
/**
* A BaseTagWriter that does nothing.
*/
public class MyBaseTagWriter implements IRender {
/**
* Constructor.
*/
public MyBaseTagWriter() {
super();
}
public void render(IMarkupWriter arg0, IRequestCycle arg1) {
// Do nothing.
}
}
This did the trick for me.
Best wishes,
Jan Nielsen
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: disable rendering of tag
Posted by Kent Tong <ke...@cpttm.org.mo>.
Mazhar, Osman (Home Office <mazharo <at> lls.org> writes:
> It seems like the Shell component creates an http base tag as follows:
>
> <base href="http://127.0.0.1:9090/MyApp/"/>
>
> Because of this base tag, I cannot have apache http server serve as a
> reverse proxy to my tapestry application as it messes up all links on
> the page.
Try configuring Tomcat like:
<Server ...>
<Service ...>
<Connector port="9090" proxyName="www.foo.com" proxyPort="80"/>
...
</Service>
</Server>
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: disable rendering of tag
Posted by Cliff Zhao <zh...@gmail.com>.
Override the tapestry.utl.BaseTagWriter service with your own
implementation, which you can do what ever you want, for example, render
nothing.
On 2/7/06, Mazhar, Osman (Home Office) <ma...@lls.org> wrote:
>
> It seems like the Shell component creates an http base tag as follows:
>
>
>
> <base href="http://127.0.0.1:9090/MyApp/"/>
>
> Because of this base tag, I cannot have apache http server serve as a
> reverse proxy to my tapestry application as it messes up all links on
> the page.
>
>
> Is there a way to disable rendering of this base tag somehow? Or is
> there another trick, perhaps in apache http server?
>
>
>
> Osman Mazhar
>
> Sr Technical Architect
>
> The Leukemia & Lymphoma Society
>
> 1311 Mamaroneck Avenue
>
> White Plains, NY 10605
>
> 914-821-8210
>
>
>
>
>
>
> ______________________________________________________________________
> This e-mail has been scanned by The Leukemia & Lymphoma Society Managed
> Email Content Service, provided by MCI and Message Labs.
>
> NOTICE: This message, including all attachments transmitted with it, is
> for the use of the addressee only. It may contain proprietary, confidential
> and/or legally privileged information. No confidentiality or privilege is
> waived or lost by any mistransmission. If you are not the intended
> recipient, you must not, directly or indirectly, use, disclose, distribute,
> print or copy any part of this message. If you believe you have received
> this message in error, please delete it and all copies of it from your
> system and notify the sender immediately by reply e-mail. Thank you.
>
>
>