In struts-example you can find web.xml file (under WEB-INF) directory. A part of  this file:
...
  <!-- Action Servlet Configuration -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>org.apache.struts.example.ApplicationResources</param-value>
    </init-param>
...
You need to replace ApplicationResources with your file.

Maya

Ratnadeep Bhattacharjee wrote:

Hi,

I was wondering if someone could please help me with this problem:

I have created my own properties file called "Resources.properties" and it is
located in WEB-INF/classes/com/x/y/resources.

I am tring to use it in a jsp page as follows:

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

some HTML here....

<form:form action="general.do" name="GeneralForm"
 scope="request" type="com.x.y.GeneralForm">

 some HTML here...

        <bean:message
        bundle="com.x.y.resources.Resources"
        key="role_name_rev"/>

 some more HTML ...

</form:form>

</body>
</form:html>

I am getting the following error:

2001-03-08 05:29:21 - Ctx( /smc ): Exception in: R( /smc +
/usermgr/roles/general.jsp + null) - javax.servlet.ServletException: Missing
resources attribute com.x.y.resources.Resources
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Exception.<init>(Compiled Code)
        at javax.servlet.ServletException.<init>(ServletException.java:161)

Is there any place else I need to enter information about this resource file for
it to be found?

Thanks,
-Deep.

Reply via email to