I've solved it through Spring and Struts2.

1. Define your property in maven.
    <app.somePath>/some/path</app.somePath>

2. Create some application property file and put into into the
src/main/resources folder.
   Add the following property which will be passed to your application by
Spring's
   PropertyPlaceholderConfigurer:

   app.somePath=${app.somePath}

3. Add this application property file to the list of locations for the
property configurere in
   applicationContext-resources.xml
   <value>classpath:app.properties</value> 

   Now Spring knows about your properties.

4. Finally, here is how you communicate your properties to your app beans.
    Simply inject into your bean:

        <bean id="searchI2GManager"
                class="net.i2geo.comped.service.SearchI2GManager">
                <property name="somePath" value="${app.somePath}"/>
        </bean>

5. Now you can make your bean available to some action class (by injection)
and then
   access the the some path property in JSP pages as usually.

Martin
-- 
View this message in context: 
http://www.nabble.com/Pass-a-pom-property-to-a-JSP-page-tp21452783s2369p21537737.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to