You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by JohnRodey <ti...@yahoo.com> on 2010/03/19 02:28:35 UTC

pivot applets and env variables

I'm running my pivot application inside a Tomcat server, and that server
loads a series of properties from a file and sets them on the System. 
However when a client accesses my pivot application it will start within a
JVM in their browser, so my question is will the properties be persisted on
their System?  or do I need to pass them in through the 'java_arguments'
parameter?  If so is there a way to pass them in here from the System on the
server side?


Also, currently I'm also getting an exception [access denied
(java.util.PropertyPermission my.test.url read)]
Can I handle this by signing the applet, editing the java.policy file, or
any other way? 
-- 
View this message in context: http://n3.nabble.com/pivot-applets-and-env-variables-tp456628p456628.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: pivot applets and env variables

Posted by Todd Volkert <tv...@gmail.com>.
Sounds like you probably want a JSP that will dynamically create the page
that defines the applet.  You'd iterate through your system properties in
the JSP, outputting startup properties.

-T

On Fri, Mar 19, 2010 at 2:54 PM, JohnRodey <ti...@yahoo.com> wrote:

>
> startup_properties definitely sounds like its the best way to go.
>
> So if my tomcat server loads a series of properties from a file on startup
> is there a way for my html/jnlp to pass those values to my pivot applet
> directly from the System properties on my tomcat server?
> Something like instead of startup_properties:"language=fr",  I want:
> startup_properties:"language=${MYLANG}".
>
> I guess what I'm trying to get at is that I want all my properties for the
> entire system in one property file, and I don't want to hard code any in my
> html/jnlp file.
>
> Thanks!
> --
> View this message in context:
> http://n3.nabble.com/pivot-applets-and-env-variables-tp456628p463155.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>

Re: pivot applets and env variables

Posted by JohnRodey <ti...@yahoo.com>.
startup_properties definitely sounds like its the best way to go.

So if my tomcat server loads a series of properties from a file on startup
is there a way for my html/jnlp to pass those values to my pivot applet
directly from the System properties on my tomcat server?  
Something like instead of startup_properties:"language=fr",  I want:
startup_properties:"language=${MYLANG}".

I guess what I'm trying to get at is that I want all my properties for the
entire system in one property file, and I don't want to hard code any in my
html/jnlp file.

Thanks!
-- 
View this message in context: http://n3.nabble.com/pivot-applets-and-env-variables-tp456628p463155.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: pivot applets and env variables

Posted by Greg Brown <gk...@mac.com>.
As Todd mentioned, generating a set of startup_properties in the page that hosts the applet is definitely the simplest approach, since it doesn't require signing the applet. However, if you actually need to specify system properties, you'll need to use the new system_properties applet param added to Pivot 1.5 (formerly 1.4.1) - the Java plugin only allows the caller to set a limited set of system properties using java_arguments, but system_properties will allow you to set an arbitrary set of properties.

 
On Thursday, March 18, 2010, at 09:37PM, "Todd Volkert" <tv...@gmail.com> wrote:
>

Re: pivot applets and env variables

Posted by Todd Volkert <tv...@gmail.com>.
> I'm running my pivot application inside a Tomcat server, and that server
> loads a series of properties from a file and sets them on the System.
> However when a client accesses my pivot application it will start within a
> JVM in their browser, so my question is will the properties be persisted on
> their System?  or do I need to pass them in through the 'java_arguments'
> parameter?  If so is there a way to pass them in here from the System on
> the
> server side?
>

The JVM on the client knows nothing of the one on the server, so you'll have
to pass those properties to the applet either as system properties using the
java_arguments parameter or as applet parameters (if you don't need them to
be system properties on the client).


>
> Also, currently I'm also getting an exception [access denied
> (java.util.PropertyPermission my.test.url read)]
> Can I handle this by signing the applet, editing the java.policy file, or
> any other way?
>

Signing the applet (including the Pivot jars) would definitely work.  There
may be a less invasive way to fix it as well (I want to say I've heard
something about granting access to specific system properties in 6u10), but
I'm not sure.

If startup properties to your application would work vs. system properties,
then you wouldn't need to worry about permissions.

Cheers,
-T