I need to access few Bean files which is outside my Ear file(or application) from a
servlet. The front end is HTML. I have in my web.xml the following:
<param-name>contextConfigLocation</param-name>
<param-value>
jndi://java:comp/env/url/ExternalConfig
</param-value>
</context-param>
JNDI mapping is pointing to a spring file in my local machine. I need to get a bean in servlet and display its value. The bean is defined in Spring file as below:
<bean id="uploadLocation" class="java.lang.String" scope="prototype">
<constructor-arg type="java.lang.String">
<value>/opt/temp</value>
</constructor-arg>
</bean>
I need to get the value "/opt/temp" in servlet. Can you please tell me how this can be achieved in a simple servlet that extends HttpServlet.