velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Mannering" <robin_mannerin...@hotmail.com>
Subject Re: Velocity Config/Security Issue
Date Wed, 11 Oct 2006 09:50:59 GMT
Hi Will,

Thanks for the links, I'll give them a thorough read.

I've been working with the hosting company who set up the server config and 
they have give the application permission to org.apache.catalina.core 
although they are troubled to do so.

They seem very surprised that velocity requires this permission.

Since they granted the permission, the problem has cleared up and 
$request.contextPath now has a value within a velocity template (although 
this has changed from an empty value to '/' so I need to make source 
amendments.  Not a problem, just worrying it takes on a new value in a 
different hosting environment.

Thanks again for your help
Robin


>From: "Will Glass-Husain" <wglass@forio.com>
>Reply-To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>Subject: Re: Velocity Config/Security Issue
>Date: Tue, 10 Oct 2006 15:04:32 -0700
>
>What app server are you using?  This is a server configuration issue.
>If someone else set it up, you might also want to work with them.
>
>If you're using Tomcat, check out:
>http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html
>
>And you should read the Sun docs at:
>http://java.sun.com/j2se/1.5.0/docs/guide/security/permissions.html
>
>WILL
>
>On 10/10/06, Robin Mannering <robin_mannering75@hotmail.com> wrote:
>>Hi Will,
>>
>>thanks for your help. Sorry. I'm new to permissions, could you explain a
>>little more for me please.
>>
>>Thanks
>>Robin
>>
>>
>> >From: "Will Glass-Husain" <wglass@forio.com>
>> >Reply-To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>> >To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>> >Subject: Re: Velocity Config/Security Issue
>> >Date: Tue, 10 Oct 2006 08:24:57 -0700
>> >
>> >Looks like the security policy on your app server needs to be tuned.
>> >Have you tried giving the permission java.lang.RuntimePermission for
>> >accessClassInPackage.org.apache.catalina.core?
>> >
>> >WILL
>> >
>> >On 10/10/06, Robin Mannering <robin_mannering75@hotmail.com> wrote:
>> >>Hi all,
>> >>
>> >>I'm new back on this list in a while, please excuse if the following
>> >>problem
>> >>is obvious/has been posted before.
>> >>
>> >>I am transferring an existing site based on Struts/Velocity to a new 
>>web
>> >>hosting provider.  The application runs smoothly on its current host.
>> >>
>> >>However, there seems to be one last stumbling block with the new server 
>>in
>> >>that the Struts object; 'request' appears not to be in scope within
>> >>velocity
>> >>pages (there may be others not in scope).
>> >>
>> >>I'm using the VelocityLayoutServlet if that helps.
>> >>
>> >>I've attached a snippet of the log file that points to the problem I
>> >>mentioned, notable the 'java.security.AccessControlException' and
>> >>'$request.contextPath is not a valid reference'
>> >>
>> >>All other velocity directives appear to be functioning as normal.
>> >>
>> >>Has anyone seen this behaviour before? Any help would be greatly
>> >>appreciated.
>> >>
>> >>Kind regards
>> >>Robin
>> >>
>> >>10-Oct 02:45:21.752 |INFO |                       [/].log
>> >>     |  Velocity   [info] ResourceManager : found 
>>/pages/frontend/home.vm
>> >>with loader org.apache.velocity.tools.view.servlet.WebappLoader
>> >>10-Oct 02:45:21.761 |INFO |                       [/].log
>> >>     |  Velocity  [error] PROGRAMMER ERROR : PropertyExector() :
>> >>java.security.AccessControlException: access denied
>> >>(java.lang.RuntimePermission
>> >>accessClassInPackage.org.apache.catalina.core)
>> >>10-Oct 02:45:21.763 |INFO |                       [/].log
>> >>     |  Velocity  [error] ASTIdentifier.execute() : identifier =
>> >>contextPath
>> >>: java.security.AccessControlException: access denied
>> >>(java.lang.RuntimePermission
>> >>accessClassInPackage.org.apache.catalina.core)
>> >>10-Oct 02:45:21.764 |INFO |                       [/].log
>> >>     |  Velocity  [error] RHS of #set statement is null. Context will 
>>not
>> >>be
>> >>modified. /pages/frontend/home.vm [line 9, column 1]
>> >>10-Oct 02:45:21.772 |INFO |                       [/].log
>> >>     |  Velocity  [error] PROGRAMMER ERROR : PropertyExector() :
>> >>java.security.AccessControlException: access denied
>> >>(java.lang.RuntimePermission
>> >>accessClassInPackage.org.apache.catalina.core)
>> >>10-Oct 02:45:21.773 |INFO |                       [/].log
>> >>     |  Velocity  [error] ASTIdentifier.execute() : identifier =
>> >>contextPath
>> >>: java.security.AccessControlException: access denied
>> >>(java.lang.RuntimePermission
>> >>accessClassInPackage.org.apache.catalina.core)
>> >>10-Oct 02:45:21.774 |INFO |                       [/].log
>> >>     |  Velocity   [warn]
>> >>org.apache.velocity.runtime.exception.ReferenceException: reference :
>> >>template = /pages/frontend/home.vm [line 32,column 34] :
>> >>$request.contextPath is not a valid reference.
>> >>
>> >>_________________________________________________________________
>> >>Windows Live™ Messenger has arrived. Click here to download it for 
>>free!
>> >>http://imagine-msn.com/messenger/launch80/?locale=en-gb
>> >>
>> >>
>> >>---------------------------------------------------------------------
>> >>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> >>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> >
>> >--
>> >Forio Business Simulations
>> >
>> >Will Glass-Husain
>> >wglass@forio.com
>> >www.forio.com
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>> >
>>
>>_________________________________________________________________
>>Be the first to hear what's new at MSN - sign up to our free newsletters!
>>http://www.msn.co.uk/newsletters
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>
>
>
>--
>Forio Business Simulations
>
>Will Glass-Husain
>wglass@forio.com
>www.forio.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>

_________________________________________________________________
Download the new Windows Live Toolbar, including Desktop search! 
http://toolbar.live.com/?mkt=en-gb


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message