wood burning stoves*
The moose likes Struts and the fly likes Problem reading from properties file in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem reading from properties file in struts 2" Watch "Problem reading from properties file in struts 2" New topic
Author

Problem reading from properties file in struts 2

Subhash Shah
Greenhorn

Joined: May 07, 2010
Posts: 2
I am new to struts 2.
I have 2 jsp files. e.g. 1.jsp and 2.jsp

2.jsp has a frameset and one frame has 1.jsp as source.

I want to use a label in 1.jsp. but I get an error when I try to include <s:label key="msg" /> (msg is in test.properties file)

I have following configuration in web.xml file.

<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.foo.action.common</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

I found that the problem is due to 1.jsp is not called through FilterDispatcher.

Does anyone have any idea about how to resolve the issue?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yes--don't access JSP pages directly.
Subhash Shah
Greenhorn

Joined: May 07, 2010
Posts: 2
Thanks David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem reading from properties file in struts 2
 
Similar Threads
Struts2 integration with Spring Security
Struts2 with Displaytag export option is not working
web.xml problem in struts2
Filter mapping in struts2
richfaces and problems with navigation