You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Derek Clarkson <dc...@waterwerks.com.au> on 2003/12/04 02:13:07 UTC

Message Resource bundle frustration

Hi all,
	I've just subscribed to this list and would appreciate any help you can give. 
I've been trying to get resources bundles to work. I have a jar file which is 
used on several projects and contains some core business beans. It also 
contains aproperty file with a basic set of messages for various errors.

In the project I am currently working on I have another properties file which 
contains more project specific messages. The problems is that I cannot find 
out how to access these messages in an Action.

I've read a lot on the web, but most of the docouments talk about how you do 
it using jsp tags. In actions I can access messages using the ActionMessage 
class which are stored in the default properties file. In my 
struts-config.xml though, I can only have one properties file as default and 
the other I have to provide a key for. 

I can't find any way to tell ActionMessage what key to use to access the 
messages I want to use. I can do it using a MessageResources class, but it 
only provides the completed message Strings, and ActionMessage only accepts 
property keys.

I must be missing something, or there is a gap between these two ways of 
handle messages. All I want to do is (in an Action) retrieve a message from a 
specific properties file and display it in a document using <html:messages>. 
This shouldn't be this hard, any ideas ????


-- 
Regards,
Derek Clarkson
Analyst/Programmer
Waterwerks Pty Ltd
Melbourne
Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Message Resource bundle frustration

Posted by Derek Clarkson <dc...@waterwerks.com.au>.
Hi Greg,

Thanks for your help. I hadn't noticed the bundle option on html:messages - 
doh!

It does seem rather restrictive though. It kind of makes it hard when (like 
I'm doing) you want to build some sort of common jar file for use on a number 
of apps. You either have to duplicate your core message file in each project 
and add to it as necessary. Or try and work out some other technique.

I don't know if any of the struts developers are watching this. but could I 
suggest that all messages files referenced under the same key in the 
struts-config.xml file are regarded as one and scanned rather than just the 
last one. It would probably be even better if they where scanned in order for 
a particular message too. That way, it would be possible to override messages 
if desired by simple redefining them in a higher level file.

cio
Derek.

On Thursday 04 December 2003 17:15, Greg Reddin wrote:
> Derek Clarkson wrote:
> > Hi all,
> > 	I've just subscribed to this list and would appreciate any help you can
> > give. I've been trying to get resources bundles to work. I have a jar
> > file which is used on several projects and contains some core business
> > beans. It also contains aproperty file with a basic set of messages for
> > various errors.
> >
> > In the project I am currently working on I have another properties file
> > which contains more project specific messages. The problems is that I
> > cannot find out how to access these messages in an Action.
>
> Derek,
>
> If my understanding is correct, neither ActionMessage nor ActionMessages
> do any resolution of the message so they are agnostic of the resource
> bundle the message is in.  It's just a collection of keys until you try
> to resolve them on a JSP page.  At that point you specify which bundle
> the message should be resolved from.
>
> > I've read a lot on the web, but most of the docouments talk about how you
> > do it using jsp tags. In actions I can access messages using the
> > ActionMessage class which are stored in the default properties file.
>
> This is not actually corect.  In actions, the ActionMessages object is
> just a collection of keys.  Again, it's agnostic of which properties
> file the message comes from.
>
> > In my
> > struts-config.xml though, I can only have one properties file as default
> > and the other I have to provide a key for.
> >
> > I can't find any way to tell ActionMessage what key to use to access the
> > messages I want to use. I can do it using a MessageResources class, but
> > it only provides the completed message Strings, and ActionMessage only
> > accepts property keys.
> >
> > I must be missing something, or there is a gap between these two ways of
> > handle messages. All I want to do is (in an Action) retrieve a message
> > from a specific properties file and display it in a document using
> > <html:messages>. This shouldn't be this hard, any ideas ????
>
> In your action class create and save the ActionMessages collection, then
> use the "bundle" attribute of the <html:messages> tag in your JSP to
> resolve the messages from a specific resource file.
>
> I do see how it would be desireable for your case to be able to specify
> the bundle when you create the message.  Then you could use one
> <html:messages> tag to display all your messages no matter what bundle
> they are in.  But the Struts approach is to specify the bundle to
> resolve a message as close to the view as possible and let the rest of
> the Frameowrk not care.
>
> Another option for you would be to store messages in multiple
> collections and use both the "name" and "bundle" attributes of the
> <html:messages> tag to find and resolve from a different bundle:
>
> -----------------------------------------------------------------
> In action:
>
> ActionMessages myMessages = new ActionMessages();
> myMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
>      "foo.bar"));
> request.setAttribute("myCollection", msgs);
>
> ActionMessages messages = new ActionMessages();
> messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
>      "some.message"));
> saveMessages(request, messages);
>
> -----------------------------------------------------------------
> In JSP:
>
> <%-- To display messages in custom bundle --%>
> <html:messages id="msg" name="myCollection" bundle="myBundle"/>
>      <bean:write name="msg"/>
> </html:messages>
>
> <%-- To display messages in default bundle --%>
> <html:messages id="msg">
>      <bean:write name="msg"/>
> </html:messages>
>
> Greg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
Regards,
Derek Clarkson
Analyst/Programmer
Waterwerks Pty Ltd
Melbourne
Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Message Resource bundle frustration

Posted by Greg Reddin <gr...@fnf.com>.
Derek Clarkson wrote:
> Hi all,
> 	I've just subscribed to this list and would appreciate any help you can give. 
> I've been trying to get resources bundles to work. I have a jar file which is 
> used on several projects and contains some core business beans. It also 
> contains aproperty file with a basic set of messages for various errors.
> 
> In the project I am currently working on I have another properties file which 
> contains more project specific messages. The problems is that I cannot find 
> out how to access these messages in an Action.

Derek,

If my understanding is correct, neither ActionMessage nor ActionMessages 
do any resolution of the message so they are agnostic of the resource 
bundle the message is in.  It's just a collection of keys until you try 
to resolve them on a JSP page.  At that point you specify which bundle 
the message should be resolved from.

> 
> I've read a lot on the web, but most of the docouments talk about how you do 
> it using jsp tags. In actions I can access messages using the ActionMessage 
> class which are stored in the default properties file. 

This is not actually corect.  In actions, the ActionMessages object is 
just a collection of keys.  Again, it's agnostic of which properties 
file the message comes from.

> In my 
> struts-config.xml though, I can only have one properties file as default and 
> the other I have to provide a key for. 
> 
> I can't find any way to tell ActionMessage what key to use to access the 
> messages I want to use. I can do it using a MessageResources class, but it 
> only provides the completed message Strings, and ActionMessage only accepts 
> property keys.
> 
> I must be missing something, or there is a gap between these two ways of 
> handle messages. All I want to do is (in an Action) retrieve a message from a 
> specific properties file and display it in a document using <html:messages>. 
> This shouldn't be this hard, any ideas ????

In your action class create and save the ActionMessages collection, then 
use the "bundle" attribute of the <html:messages> tag in your JSP to 
resolve the messages from a specific resource file.

I do see how it would be desireable for your case to be able to specify 
the bundle when you create the message.  Then you could use one 
<html:messages> tag to display all your messages no matter what bundle 
they are in.  But the Struts approach is to specify the bundle to 
resolve a message as close to the view as possible and let the rest of 
the Frameowrk not care.

Another option for you would be to store messages in multiple 
collections and use both the "name" and "bundle" attributes of the 
<html:messages> tag to find and resolve from a different bundle:

-----------------------------------------------------------------
In action:

ActionMessages myMessages = new ActionMessages();
myMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
     "foo.bar"));
request.setAttribute("myCollection", msgs);

ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
     "some.message"));
saveMessages(request, messages);

-----------------------------------------------------------------
In JSP:

<%-- To display messages in custom bundle --%>
<html:messages id="msg" name="myCollection" bundle="myBundle"/>
     <bean:write name="msg"/>
</html:messages>

<%-- To display messages in default bundle --%>
<html:messages id="msg">
     <bean:write name="msg"/>
</html:messages>

Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Tomcat 4.1.29 & Struts

Posted by David Friedman <hu...@ix.netcom.com>.
Mukund,

What was your problem?  Was it specifying your DTD with periods instead of
underscores in the appropriate places as I pointed out?  Or was there
another problem?

Regards,
David

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Monday, December 08, 2003 2:29 PM
To: 'Struts Users Mailing List'
Subject: RE: Tomcat 4.1.29 & Struts


Hi David,

Thanks for your mail.

Actually I don't still know what is causing the problem.
Now based on your mail, I've tried with both the following DTDs:

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">struts-conf
ig_1_1.dtd
http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">struts-conf
ig_1_0.dtd
The result is same:
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE

Actually when I reload the webapp, I get the following error in my log:

2003-12-08 11:26:07 StandardWrapper[/strutsShop:default]: Loading
container servlet default
2003-12-08 11:26:08 StandardWrapper[/strutsShop:action]: Marking servlet
action as unavailable
2003-12-08 11:26:08 StandardContext[/strutsShop]: Servlet /strutsShop
threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path
	at
org.apache.struts.action.ActionServlet.handleConfigException(ActionServl
et.java:1035)
	at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
et.java:1014)
	at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:955)
	at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:935)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3422)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623
)
	at
org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfi
g.java:614)
	at
org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
	at java.lang.Thread.run(Thread.java:536)

I'm attaching web.xml and struts_config.xml below:
-----------struts-config.xml -----------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
 <struts-config>
</struts-config>
----------------------web.xml--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <servlet>
    <servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>


Thanks for your help.

Regards
Mukund

-----Original Message-----
From: David Friedman [mailto:humble@ix.netcom.com]
Sent: Saturday, December 06, 2003 2:39 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29 & Struts


Mukund,

What was your Tomcat 4.1.29 problem?  Was the wrong DTD part of the
problem?

Regards,
David

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 7:06 PM
To: 'Struts Users Mailing List'
Subject: Tomcat 4.1.29 & Struts


Is anyone working with Struts on Tomcat 4.1.29?
If yes, can you provide me some inputs on the installation.

I'm getting org.apache.jasper.JasperException: Cannot find message
resources under key org.apache.struts.action.MESSAGE, when executing
<bean:message key="index.title"/> in the jsp.

Thanks
Mukund


-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 9:00 AM
To: 'Struts Users Mailing List'
Subject: RE: org.apache.struts.action.MESSAGE


My attachment got denied.
I'm enclosing it here. Thanks - Mukund
----------------------------- struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">
 <struts-config>
 <message-resources
 parameter="ApplicationResources"
key="org.apache.struts.action.MESSAGE" null="false" /> </struts-config>
----------------------------- web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <servlet>
    <servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
       <param-name>application</param-name>
       <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>



-----------------------------

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: org.apache.struts.action.MESSAGE


Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same. Any suggestions?

Thanks
Mukund


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Tomcat 4.1.29 & Struts

Posted by Mukund Ramadoss <mu...@SES-Ins.COM>.
Hi David,

Thanks for your mail.

Actually I don't still know what is causing the problem.
Now based on your mail, I've tried with both the following DTDs:

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">struts-conf
ig_1_1.dtd 
http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">struts-conf
ig_1_0.dtd 
The result is same:
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE

Actually when I reload the webapp, I get the following error in my log:

2003-12-08 11:26:07 StandardWrapper[/strutsShop:default]: Loading
container servlet default
2003-12-08 11:26:08 StandardWrapper[/strutsShop:action]: Marking servlet
action as unavailable
2003-12-08 11:26:08 StandardContext[/strutsShop]: Servlet /strutsShop
threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path 
	at
org.apache.struts.action.ActionServlet.handleConfigException(ActionServl
et.java:1035)
	at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
et.java:1014)
	at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:955)
	at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:935)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3422)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623
)
	at
org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfi
g.java:614)
	at
org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
	at java.lang.Thread.run(Thread.java:536)

I'm attaching web.xml and struts_config.xml below:
-----------struts-config.xml -----------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
 <struts-config> 
</struts-config>
----------------------web.xml--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM 
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    
<web-app>

  <servlet>
    <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
   
  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>


Thanks for your help.

Regards
Mukund

-----Original Message-----
From: David Friedman [mailto:humble@ix.netcom.com] 
Sent: Saturday, December 06, 2003 2:39 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29 & Struts


Mukund,

What was your Tomcat 4.1.29 problem?  Was the wrong DTD part of the
problem?

Regards,
David

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 7:06 PM
To: 'Struts Users Mailing List'
Subject: Tomcat 4.1.29 & Struts


Is anyone working with Struts on Tomcat 4.1.29?
If yes, can you provide me some inputs on the installation.

I'm getting org.apache.jasper.JasperException: Cannot find message
resources under key org.apache.struts.action.MESSAGE, when executing
<bean:message key="index.title"/> in the jsp.

Thanks
Mukund


-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 9:00 AM
To: 'Struts Users Mailing List'
Subject: RE: org.apache.struts.action.MESSAGE


My attachment got denied.
I'm enclosing it here. Thanks - Mukund
----------------------------- struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">
 <struts-config>
 <message-resources
 parameter="ApplicationResources"
key="org.apache.struts.action.MESSAGE" null="false" /> </struts-config>
----------------------------- web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <servlet>
    <servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
       <param-name>application</param-name>
       <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>



-----------------------------

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: org.apache.struts.action.MESSAGE


Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same. Any suggestions?

Thanks
Mukund


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Tomcat 4.1.29 & Struts

Posted by David Friedman <hu...@ix.netcom.com>.
Mukund,

What was your Tomcat 4.1.29 problem?  Was the wrong DTD part of the problem?

Regards,
David

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 7:06 PM
To: 'Struts Users Mailing List'
Subject: Tomcat 4.1.29 & Struts


Is anyone working with Struts on Tomcat 4.1.29?
If yes, can you provide me some inputs on the installation.

I'm getting org.apache.jasper.JasperException: Cannot find message
resources under key org.apache.struts.action.MESSAGE, when executing
<bean:message key="index.title"/> in the jsp.

Thanks
Mukund


-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 9:00 AM
To: 'Struts Users Mailing List'
Subject: RE: org.apache.struts.action.MESSAGE


My attachment got denied.
I'm enclosing it here. Thanks - Mukund
----------------------------- struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">
 <struts-config>
 <message-resources
 parameter="ApplicationResources"
 key="org.apache.struts.action.MESSAGE" null="false" /> </struts-config>
----------------------------- web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <servlet>
    <servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
       <param-name>application</param-name>
       <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>



-----------------------------

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM]
Sent: Thursday, December 04, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: org.apache.struts.action.MESSAGE


Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same.
Any suggestions?

Thanks
Mukund


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Tomcat 4.1.29 & Struts

Posted by Mukund Ramadoss <mu...@SES-Ins.COM>.
Is anyone working with Struts on Tomcat 4.1.29?
If yes, can you provide me some inputs on the installation.

I'm getting org.apache.jasper.JasperException: Cannot find message
resources under key org.apache.struts.action.MESSAGE, when executing
<bean:message key="index.title"/> in the jsp.

Thanks
Mukund


-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM] 
Sent: Thursday, December 04, 2003 9:00 AM
To: 'Struts Users Mailing List'
Subject: RE: org.apache.struts.action.MESSAGE


My attachment got denied.
I'm enclosing it here. Thanks - Mukund
----------------------------- struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">
 <struts-config> 
 <message-resources 
 parameter="ApplicationResources" 
 key="org.apache.struts.action.MESSAGE" null="false" /> </struts-config>
----------------------------- web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM 
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    
<web-app>

  <servlet>
    <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
       <param-name>application</param-name>
       <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
   
  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>



-----------------------------

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM] 
Sent: Thursday, December 04, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: org.apache.struts.action.MESSAGE


Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same. 
Any suggestions?

Thanks
Mukund


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: org.apache.struts.action.MESSAGE

Posted by Mukund Ramadoss <mu...@SES-Ins.COM>.
My attachment got denied.
I'm enclosing it here. Thanks - Mukund
----------------------------- struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd">
 <struts-config> 
 <message-resources 
 parameter="ApplicationResources" 
 key="org.apache.struts.action.MESSAGE" null="false" />
</struts-config>
----------------------------- web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    SYSTEM 
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    
<web-app>

  <servlet>
    <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
       <param-name>application</param-name>
       <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
   
  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

<!-- Struts Tag Library Descriptor -->
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-bean.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-bean.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-html.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-html.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-logic.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-logic.tld
   </taglib-location>
</taglib>
<taglib>
   <taglib-uri>
   	/WEB-INF/struts-template.tld
   </taglib-uri>
   <taglib-location>
   	/WEB-INF/struts-template.tld
   </taglib-location>
 </taglib>

</web-app>



-----------------------------

-----Original Message-----
From: Mukund Ramadoss [mailto:mukund@SES-Ins.COM] 
Sent: Thursday, December 04, 2003 8:55 AM
To: 'Struts Users Mailing List'
Subject: org.apache.struts.action.MESSAGE


Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same. 
Any suggestions?

Thanks
Mukund


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


org.apache.struts.action.MESSAGE

Posted by Mukund Ramadoss <mu...@SES-Ins.COM>.
Hi,

I'm setting up Struts to work with Tomcat 4.1.29.

When I tried to run a jsp (BookView.jsp) from a tutorial, I get the
following exception :
org.apache.jasper.JasperException: Cannot find message resources under
key org.apache.struts.action.MESSAGE
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:254)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)


I'm attaching struts-config.xml, web.xml, and BookView.jsp for your
reference.

I've tried copying ApplicationResources.properties from classes to
WEB-INF folder. But the result is same. 
Any suggestions?

Thanks
Mukund