Results 1 to 2 of 2

Thread: Use Placeholder value in JSP page?

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    18

    Default Use Placeholder value in JSP page?

    Hi!

    Using Spring 3.0.x for a web application, is it possible to get/read a placeholder value from a JSP page?

    I found two solutions, but they are not elegant:
    - store the value in a bean and read it with spring:eval tag / SpEL (see post #9 here)
    - use a bean to inject the value into the servlet context (see here)

    Is there a better simpler way? What I aim at is:

    Code:
    <context-param>
    	<param-name>foo</param-name>
    	<param-value>${placeholder.value}</param-value>
    </context-param>
    Thanks,
    David

    PS: Hmm, if PropertyPlaceholderConfigurer would implement the FactoryBean<Properties> interface it would be much simpler for me...
    Last edited by xerces8; Feb 7th, 2013 at 10:49 AM.

  2. #2

    Default

    How about writing a custom jsp tag that would fetch the value for you?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •