You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Hansen <mi...@presys.dk> on 2005/04/04 14:44:07 UTC

Missing resource/Modules

Hi,

 

I'm working with struts (1.1), and am beginning to use modules instead of
separate applications

My problem is that when running the application the modules does not find
their application resources.

 

My main struts-config has the message resource set as:

     .

    <action path="/logon"

            type="myapp.LogonAction"

            name="LogonForm"

            scope="session"

            validate="true"

            input="/tp_logon.jsp">

      <forward name="logon" path="/tp_logon.jsp"/>

      <forward name="module1" contextRelative="true"
path="/module1/index.do" redirect="true"/>

    </action>

     .

   <message-resources parameter=" applicationResources" null="true" />

 

The module have the following message resource

  <message-resources parameter="module1.applicationResources" null="true" />

 

When running the application in WSAD I get the error below when I forwards
to the index.do action in module1, apparently the application tries to get
its resources from the main applications resources, not from the modules
resources, why?

 

As it is 2 different (standalone-)applications I am combining to a single
webapplication, I would like not to have to write the bundle property into
all the bean:message tags of the module.

 

[04-04-05 14:30:24:330 CEST] 7d21dca8 WebGroup      E SRVE0026E: [Servlet
Error]-[Missing message for key &quot;message.company&quot;]:
javax.servlet.jsp.JspException: Missing message for key "message.company"

      at
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

      at org.apache.jsp._tp_5F_main._jspService(_tp_5F_main.java:151)

      at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(Jsp
Servlet.java:344)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.jav
a:669)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)

      at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)

      at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)

      at 

 

 

Michael


RE: Missing resource/Modules

Posted by Mark Benussi <ma...@hotmail.com>.
You need to give one of them a key key="module1" and then in your
<html:messages> use the bundle key to refer to the key. I cant remember the
syntax for <bean:write>

 

  _____  

From: Michael Hansen [mailto:michael@presys.dk] 
Sent: 04 April 2005 13:44
To: user@struts.apache.org
Subject: Missing resource/Modules

 

Hi,

 

I'm working with struts (1.1), and am beginning to use modules instead of
separate applications

My problem is that when running the application the modules does not find
their application resources.

 

My main struts-config has the message resource set as:

     .

    <action path="/logon"

            type="myapp.LogonAction"

            name="LogonForm"

            scope="session"

            validate="true"

            input="/tp_logon.jsp">

      <forward name="logon" path="/tp_logon.jsp"/>

      <forward name="module1" contextRelative="true"
path="/module1/index.do" redirect="true"/>

    </action>

     .

   <message-resources parameter=" applicationResources" null="true" />

 

The module have the following message resource

  <message-resources parameter="module1.applicationResources" null="true" />

 

When running the application in WSAD I get the error below when I forwards
to the index.do action in module1, apparently the application tries to get
its resources from the main applications resources, not from the modules
resources, why?

 

As it is 2 different (standalone-)applications I am combining to a single
webapplication, I would like not to have to write the bundle property into
all the bean:message tags of the module.

 

[04-04-05 14:30:24:330 CEST] 7d21dca8 WebGroup      E SRVE0026E: [Servlet
Error]-[Missing message for key &quot;message.company&quot;]:
javax.servlet.jsp.JspException: Missing message for key "message.company"

      at
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

      at org.apache.jsp._tp_5F_main._jspService(_tp_5F_main.java:151)

      at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(Jsp
Servlet.java:344)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.jav
a:669)

      at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)

      at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)

      at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)

      at 

 

 

Michael