I'm a novice to JSTL. My app needed to include some text stored on another server so I installed JSTL exclusively to use c:import and accomplish this. The server I need to get the content from is stored in a properties file, myApp.properties let's call it. Prior to using JSTL, anytime I needed access to a key value pair in the properties file, I used the following code either in the appropriate
Java class or directly in the
JSP:
This doesn't work for me now, as I can't use <%=contentLocation> in JSTL (the end result is want something like this <c:import url="<%=contentLocation %>index.html"/> but I can't use the JSP variable in JSTL).
So, I tried accessing the properties file via JSTL instead like this:
and I get the following error:
Unable to convert string "${ message }" to class "javax.servlet.jsp.jstl.fmt.LocalizationContext" for attribute "bundle": Property Editor not registered with the PropertyEditorManager
Do I need to register this properties file somewhere? If I do that, will it mess up getting values of it the Java code way? (since that's used elsewhere in the code to access other values in this file). Any tips or hints would be great.
This is JSTL 1.1,
servlet version 2.4, JSP engine 2.0 and
Tomcat 5.5.23