Cannot find message resources under key org.apache.struts.action.MESSAGE

I am using IntelliJ 3 for my JSP/Servlets and Struts application. I have my application directory structure as follows:

C:\strutsShop --> home directory for my application
C:\strutsShop\src\books\*.class
C:\strutsShop\WEB-INF\lib\struts.jar
C:\strutsShop\WEB-INF\struts*.tld
C:\strutsShop\WEB-INF\web.xml
C:\strutsShop\*.jsp
C:\strutsShop\WEB-INF\properties\*.properties

In my JSP Page I display a Hello message. If it is US..it should display HI and if it is French it displays BONJOIR
Basically I ma using MESSAGE.

In my ApplicationResources_en.properties I have:
index.html=Hi

and in In my ApplicationResources_fr.properties I have:
index.html=BONJOIR

My STRUTS.XML file has following:
<message-resources parameter="/WEB-INF/properties/ApplicationResources" />

and then I store the files in
C:\strutsShop\WEB-INF\properties\Application_en.properties

Also the above location is present in my CLASSPATH.

But when I execute the page on URL, I get
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE

can any one help me out on this....?

THANKS



1 comment
Comment actions Permalink

This is not an IDEA problem. It's a well known configuration issue
which you're missing with Struts. Look at struts-config for the message
resource location and make sure you're comiling it tot he proper
directory, which from the looks of it you're not.

Doing a search on google will get you the answers.

R

Hari wrote:

I am using IntelliJ 3 for my JSP/Servlets and Struts application. I have my application directory structure as follows:

C:\strutsShop --> home directory for my application
C:\strutsShop\src\books\*.class
C:\strutsShop\WEB-INF\lib\struts.jar
C:\strutsShop\WEB-INF\struts*.tld
C:\strutsShop\WEB-INF\web.xml
C:\strutsShop\*.jsp
C:\strutsShop\WEB-INF\properties\*.properties

In my JSP Page I display a Hello message. If it is US..it should display HI and if it is French it displays BONJOIR
Basically I ma using MESSAGE.

In my ApplicationResources_en.properties I have:
index.html=Hi

and in In my ApplicationResources_fr.properties I have:
index.html=BONJOIR

My STRUTS.XML file has following:
<message-resources parameter="/WEB-INF/properties/ApplicationResources" />

and then I store the files in
C:\strutsShop\WEB-INF\properties\Application_en.properties

Also the above location is present in my CLASSPATH.

But when I execute the page on URL, I get
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE

can any one help me out on this....?

THANKS




0

Please sign in to leave a comment.