Bugs item #842010, was opened at 2003-11-14 10:07
Message generated for change (Comment added) made by paulmcculloch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=842010&group_id=73068
Category: main tag library
Group: v 1.0-b2
Status: Open
Resolution: None
Priority: 5
Submitted By: Tomer Candidy (tomts)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cannot load properties files from within war files
Initial Comment:
I'm using JBoss 1.2.1 with Tomcat, struts and tiles. My
web application is packed in a war file. I want to
customize the paging text that appears at the bottom
of the table.
I've defined a DisplayPropertiesLoaderServlet and
configured the properties.filename parameter to
be "WEB-INF/displaytag.properties" (I've also tried with
a leading /).
All files appear to be in place inside the war file,
however, I get the following error:
[ServletException in:/views/test.jsp] Unable to load file
null/WEB-INF/displaytag.properties'
The source for the problem seems to be the call to
ServletContext.getRealPath() in
DisplayPropertiesLoaderServlet.java.
According to the spec, a call to getRealPath() can fail
within war files as there might be no real path for the
file. I suggest using the getResource() call instead.
A temporary workaround is to pass the properties to
each and every table - but this is really not elegant...
----------------------------------------------------------------------
Comment By: Paul McCulloch (paulmcculloch)
Date: 2003-11-18 09:32
Message:
Logged In: YES
user_id=883626
Another workaround is to un-war the application. In JBoss
you need to un-war to a directory with the same name - e.g.
${JBOSS}/server/default/deploy/strutsclient.war
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=842010&group_id=73068
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel