You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <p....@albourne.com> on 2007/01/24 11:34:23 UTC

Tapestry

Hi Everyone

I am trying to deploy a tapestry 4.1 application into a production 
environment (on Tomcat 5.5). When the Tapestry Shell component injects 
the various dojo scripts into my pages it uses an absolute URL using the 
server IP address and port, there must be a way to switch this off and 
use a relative path instead.

For Example:
<script type="text/javascript">
    djConfig = { isDebug: true, debugContainerId:'debug', 
baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F", 
         preventBackButtonFix: false, parseWidgets: false };
</script>
 <script type="text/javascript" 
src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
<script type="text/javascript" 
src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>

to become something similar to this:
<script type="text/javascript">
    djConfig = { isDebug: true, debugContainerId:'debug', 
baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",          
preventBackButtonFix: false, parseWidgets: false };
</script>
 <script type="text/javascript" 
src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
<script type="text/javascript" 
src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>

Thanks
Peter




-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652 

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Shell component configuration

Posted by Jesse Kuhnert <jk...@gmail.com>.
As in the last email, should be fixed in 4.1.2 as far as I can tell.

On 1/25/07, Peter Stavrinides <p....@albourne.com> wrote:
> Here is my solution, although I know its less than ideal:
>
> <html jwcid="@Shell" renderBaseTag="false"
> tapestrySource="asset:tapestrySource" dojoSource="asset:dojoSource"
> dojoPath="asset:dojoPath">
>
>     @Asset("context:/dojo/")
>     public abstract IAsset getDojoPath();
>
>     @Asset("context:/dojo/dojo.js")
>     public abstract IAsset getDojoSource();
>
>     @Asset("context:/tapestry/core.js")
>     public abstract IAsset getTapestrySource();
>
> Of course this means I have to place all those files in my context path.
>
> Tapestry seems to look for these files on the classpath and then it
> generates an absolute URL including the servers IP (or host name and
> port if it is requested that way). From a security point of view it
> would be better just to output the relative path... which would work
> just as well.
>
> Peter
>
> Peter Stavrinides wrote:
> > Thanks Andy,
> >
> > Although I don't understand what I could have misconfigured. I don't
> > use an absolute URL anywhere and my <host> server is referenced in
> > tomcats server.xml as localhost.
> >
> > andyhot wrote:
> >> Looks like a misconfiguration but if you must, the Shell component
> >> http://tapestry.apache.org/tapestry4.1/components/general/shell.html
> >> accepts an ajaxDelegate parameter that is rendering those...
> >>
> >> The default implementation for that delegate is
> >> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=log
> >>
> >>
> >> You can take a look and change as needed.
> >>
> >>
> >> Peter Stavrinides wrote:
> >>> Can anyone point me in the right direction with this, I don't
> >>> believe that this can not be done.
> >>>
> >>> Peter Stavrinides wrote:
> >>>> Hi Everyone
> >>>>
> >>>> I am trying to deploy a tapestry 4.1 application into a production
> >>>> environment (on Tomcat 5.5). When the Tapestry Shell component
> >>>> injects the various dojo scripts into my pages it uses an absolute
> >>>> URL using the server IP address and port, there must be a way to
> >>>> switch this off and use a relative path instead.
> >>>>
> >>>> For Example:
> >>>> <script type="text/javascript">
> >>>>    djConfig = { isDebug: true, debugContainerId:'debug',
> >>>> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F",
> >>>>         preventBackButtonFix: false, parseWidgets: false };
> >>>> </script>
> >>>> <script type="text/javascript"
> >>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
> >>>>
> >>>> <script type="text/javascript"
> >>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
> >>>>
> >>>>
> >>>> to become something similar to this:
> >>>> <script type="text/javascript">
> >>>>    djConfig = { isDebug: true, debugContainerId:'debug',
> >>>> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",
> >>>> preventBackButtonFix: false, parseWidgets: false };
> >>>> </script>
> >>>> <script type="text/javascript"
> >>>> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
> >>>> <script type="text/javascript"
> >>>> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
> >>>>
> >>>> Thanks
> >>>> Peter
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >>
> >
>
> --
> Peter Stavrinides
> Albourne Partners (Cyprus) Ltd
> Tel: +357 22 750652
>
> If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Shell component configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Here is my solution, although I know its less than ideal:

<html jwcid="@Shell" renderBaseTag="false" 
tapestrySource="asset:tapestrySource" dojoSource="asset:dojoSource" 
dojoPath="asset:dojoPath">  

    @Asset("context:/dojo/")
    public abstract IAsset getDojoPath();
   
    @Asset("context:/dojo/dojo.js")
    public abstract IAsset getDojoSource();
   
    @Asset("context:/tapestry/core.js")
    public abstract IAsset getTapestrySource();
   
Of course this means I have to place all those files in my context path.

Tapestry seems to look for these files on the classpath and then it 
generates an absolute URL including the servers IP (or host name and 
port if it is requested that way). From a security point of view it 
would be better just to output the relative path... which would work 
just as well.

Peter

Peter Stavrinides wrote:
> Thanks Andy,
>
> Although I don't understand what I could have misconfigured. I don't 
> use an absolute URL anywhere and my <host> server is referenced in 
> tomcats server.xml as localhost.
>
> andyhot wrote:
>> Looks like a misconfiguration but if you must, the Shell component
>> http://tapestry.apache.org/tapestry4.1/components/general/shell.html
>> accepts an ajaxDelegate parameter that is rendering those...
>>
>> The default implementation for that delegate is
>> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=log 
>>
>>
>> You can take a look and change as needed.
>>
>>
>> Peter Stavrinides wrote:
>>> Can anyone point me in the right direction with this, I don't 
>>> believe that this can not be done.
>>>
>>> Peter Stavrinides wrote:
>>>> Hi Everyone
>>>>
>>>> I am trying to deploy a tapestry 4.1 application into a production 
>>>> environment (on Tomcat 5.5). When the Tapestry Shell component 
>>>> injects the various dojo scripts into my pages it uses an absolute 
>>>> URL using the server IP address and port, there must be a way to 
>>>> switch this off and use a relative path instead.
>>>>
>>>> For Example:
>>>> <script type="text/javascript">
>>>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>>>> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F", 
>>>>         preventBackButtonFix: false, parseWidgets: false };
>>>> </script>
>>>> <script type="text/javascript" 
>>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script> 
>>>>
>>>> <script type="text/javascript" 
>>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script> 
>>>>
>>>>
>>>> to become something similar to this:
>>>> <script type="text/javascript">
>>>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>>>> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",          
>>>> preventBackButtonFix: false, parseWidgets: false };
>>>> </script>
>>>> <script type="text/javascript" 
>>>> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
>>>> <script type="text/javascript" 
>>>> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>>>>
>>>> Thanks
>>>> Peter
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>

-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652 

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Shell component configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Thanks Andy,

Although I don't understand what I could have misconfigured. I don't use 
an absolute URL anywhere and my <host> server is referenced in tomcats 
server.xml as localhost.

andyhot wrote:
> Looks like a misconfiguration but if you must, the Shell component
> http://tapestry.apache.org/tapestry4.1/components/general/shell.html
> accepts an ajaxDelegate parameter that is rendering those...
>
> The default implementation for that delegate is
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=log 
>
>
> You can take a look and change as needed.
>
>
> Peter Stavrinides wrote:
>> Can anyone point me in the right direction with this, I don't believe 
>> that this can not be done.
>>
>> Peter Stavrinides wrote:
>>> Hi Everyone
>>>
>>> I am trying to deploy a tapestry 4.1 application into a production 
>>> environment (on Tomcat 5.5). When the Tapestry Shell component 
>>> injects the various dojo scripts into my pages it uses an absolute 
>>> URL using the server IP address and port, there must be a way to 
>>> switch this off and use a relative path instead.
>>>
>>> For Example:
>>> <script type="text/javascript">
>>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>>> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F", 
>>>         preventBackButtonFix: false, parseWidgets: false };
>>> </script>
>>> <script type="text/javascript" 
>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script> 
>>>
>>> <script type="text/javascript" 
>>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script> 
>>>
>>>
>>> to become something similar to this:
>>> <script type="text/javascript">
>>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>>> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",          
>>> preventBackButtonFix: false, parseWidgets: false };
>>> </script>
>>> <script type="text/javascript" 
>>> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
>>> <script type="text/javascript" 
>>> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>>>
>>> Thanks
>>> Peter
>>>
>>>
>>>
>>>
>>
>
>

-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652 

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Shell component configuration

Posted by andyhot <an...@di.uoa.gr>.
Looks like a misconfiguration but if you must, the Shell component
http://tapestry.apache.org/tapestry4.1/components/general/shell.html
accepts an ajaxDelegate parameter that is rendering those...

The default implementation for that delegate is
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=log

You can take a look and change as needed.


Peter Stavrinides wrote:
> Can anyone point me in the right direction with this, I don't believe 
> that this can not be done.
>
> Peter Stavrinides wrote:
>> Hi Everyone
>>
>> I am trying to deploy a tapestry 4.1 application into a production 
>> environment (on Tomcat 5.5). When the Tapestry Shell component 
>> injects the various dojo scripts into my pages it uses an absolute 
>> URL using the server IP address and port, there must be a way to 
>> switch this off and use a relative path instead.
>>
>> For Example:
>> <script type="text/javascript">
>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F", 
>>         preventBackButtonFix: false, parseWidgets: false };
>> </script>
>> <script type="text/javascript" 
>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script> 
>>
>> <script type="text/javascript" 
>> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script> 
>>
>>
>> to become something similar to this:
>> <script type="text/javascript">
>>    djConfig = { isDebug: true, debugContainerId:'debug', 
>> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",          
>> preventBackButtonFix: false, parseWidgets: false };
>> </script>
>> <script type="text/javascript" 
>> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
>> <script type="text/javascript" 
>> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>>
>> Thanks
>> Peter
>>
>>
>>
>>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Shell component configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Can anyone point me in the right direction with this, I don't believe 
that this can not be done.

Peter Stavrinides wrote:
> Hi Everyone
>
> I am trying to deploy a tapestry 4.1 application into a production 
> environment (on Tomcat 5.5). When the Tapestry Shell component injects 
> the various dojo scripts into my pages it uses an absolute URL using 
> the server IP address and port, there must be a way to switch this off 
> and use a relative path instead.
>
> For Example:
> <script type="text/javascript">
>    djConfig = { isDebug: true, debugContainerId:'debug', 
> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F", 
>         preventBackButtonFix: false, parseWidgets: false };
> </script>
> <script type="text/javascript" 
> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script> 
>
> <script type="text/javascript" 
> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script> 
>
>
> to become something similar to this:
> <script type="text/javascript">
>    djConfig = { isDebug: true, debugContainerId:'debug', 
> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",          
> preventBackButtonFix: false, parseWidgets: false };
> </script>
> <script type="text/javascript" 
> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
> <script type="text/javascript" 
> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>
> Thanks
> Peter
>
>
>
>

-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652 

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry

Posted by Jesse Kuhnert <jk...@gmail.com>.
I think this was resolved in more recent versions. You could probably
replace your AjaxShellDelegate with something from 4.1.2 or just
upgrade to 4.1.2..

On 1/24/07, Peter Stavrinides <p....@albourne.com> wrote:
> Hi Everyone
>
> I am trying to deploy a tapestry 4.1 application into a production
> environment (on Tomcat 5.5). When the Tapestry Shell component injects
> the various dojo scripts into my pages it uses an absolute URL using the
> server IP address and port, there must be a way to switch this off and
> use a relative path instead.
>
> For Example:
> <script type="text/javascript">
>     djConfig = { isDebug: true, debugContainerId:'debug',
> baseRelativePath:"http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2F",
>          preventBackButtonFix: false, parseWidgets: false };
> </script>
>  <script type="text/javascript"
> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
> <script type="text/javascript"
> src="http://192.168.51.33:8080/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>
> to become something similar to this:
> <script type="text/javascript">
>     djConfig = { isDebug: true, debugContainerId:'debug',
> baseRelativePath:"/IRM/app?service=asset&path=%2Fdojo%2F",
> preventBackButtonFix: false, parseWidgets: false };
> </script>
>  <script type="text/javascript"
> src="/IRM/app?service=asset&path=%2Fdojo%2Fdojo.js"></script>
> <script type="text/javascript"
> src="/IRM/app?service=asset&path=%2Ftapestry%2Fcore.js"></script>
>
> Thanks
> Peter
>
>
>
>
> --
> Peter Stavrinides
> Albourne Partners (Cyprus) Ltd
> Tel: +357 22 750652
>
> If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org