I finally figured it out. The following worked when I placed the tag set under the <host> tag. Originally, I had it under the top level <resin> tag because it worked there in resin 3.0:

<resin:set var="store" value="${getenv['WEB_STORE']}"/>
<resin:if test="${empty store}">
<resin:set var="store" value="go2marine"/>
</resin:if>


On 04/01/2011 06:34 PM, Keith Fetterman wrote:
In resin 3.0, you could pass values into the startup of resin via Java system properties. For example,

In my resin startup script (Linux), I would start resin using the following command:

$RESIN_ROOT/bin/httpd.sh -verbose -server-root /web/resin -Xmx500M -XX:MaxPermSize=100M -Dstore=go2marine start

Essentially, I would pass in a Java system property named "store" and in my resin.conf file, I would set this to an EL variable:

<resin:set var="store" value="${Var['store']}"/>
<resin:if test="${empty store}">
<resin:set var="store" value="go2marine"/>
</resin:if>

In resin 4, I don't see a way to pass in Java system properties. I've tried setting environment variables, but I can't find a way to read the environment variables in resin.xml. I found the following information in Resin documentation, but it doesn't work seem to work for environment variables that I create.

http://www.caucho.com/resin-4.0/admin/config-el.xtp#Environment variables <http://www.caucho.com/resin-4.0/admin/config-el.xtp#Environment%20variables>


  Environment variables

Environment variables inherited by the process from the operting system are available as variables in el expressions, for example|${LANG}|.



I created the environment variable $STORE, and tried using <resin:set var="store" value="${STORE}"/>

I also found some resin documentation that showed the EL variable ${getenv['STORE']} should work, but it didn't work either.

Is there a way to pass variables into the startup of resin?

--
-----------------------------------------------------------------
Keith Fetterman                        Direct: 206-319-9434
Mariner Supply, Inc.                   206-780-5670
http://www.go2marine.com                kfetter...@go2marine.com

http://www.boatersline.com


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

--
-----------------------------------------------------------------
Keith Fetterman                        Direct: 206-319-9434
Mariner Supply, Inc.                   206-780-5670
http://www.go2marine.com               kfetter...@go2marine.com

http://www.boatersline.com


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to