Missing message for key --Struts problem

Hi

I am using ApplicationResources.properties in /WEB-INF/classes folder.

in JSP

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

<bean:message bundle="myresources" key="form.emp_name" />

--

In config file i wrote

<message-resources key="myresources" parameter="/WEB-INF/classes/ApplicationResources"/>

--

in ApplicationResources file

form.emp_name=Emp Name

form.age=enter age

errors.minlength={0} cannot less than {1} characters

errors.maxlength=Name contain less than {1} letters

errors.invalid=Name should be letters only

-

in web.xml file

<init-param>

<param-name>application</param-name>

<param-value>/WEB-INF/classes/ApplicationResources</param-value>

</init-param>

-

Then also error is coming missing message for key form.emp_name

What is the problem

Any informations get appreciated

Sudheesh

[1023 byte] By [SudheeshKumara] at [2007-11-26 18:23:47]
# 1
dont give bundle name..Hope ur application resource property file is being put in classes folder..
mshanua at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
hai, I tried that way also,but it is not wking,I am doing validation .My propertyies file is in classes folder.Any other criteria?
SudheeshKumara at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

remove this from strus-config.xml

<message-resources key="myresources" parameter="/WEB-INF/classes/ApplicationResources"/>

instead of this <bean:message bundle="myresources" key="form.emp_name" />

use

<bean:message key="form.emp_name" />

regards

shanu

mshanua at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
hi,I very first tried that way also...But it is not working...now i removed bundle name from config file also...But Still problemExpecting responseSudheesh
SudheeshKumara at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
when u r starting the server are u getting any error message? send the error stack trace..regardsshanu
mshanua at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
HiNo error in server.I ma strating my server from bin/runWhen i give null="false" in <message-re....>in config fileit is showing the ?en_US.form.emp_name? ?en_US.form.emp_age? ..But not reading the resources.ppt fileregardsSudheesh
SudheeshKumara at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

JAVA_HOME is not set. Unexpected results may occur.

Set JAVA_HOME to the directory of your local JDK to avoid this message.

===============================================================================

.

JBoss Bootstrap Environment

.

JBOSS_HOME: C:\jboss-4.0.2\bin\\..

.

JAVA: java

.

JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m

.

CLASSPATH: \lib\tools.jar;C:\jboss-4.0.2\bin\\run.jar

.

===============================================================================

.

16:05:03,917 INFO [Server] Starting JBoss (MX MicroKernel)...

16:05:03,927 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_

4_0_2 date=200505022023)

16:05:03,927 INFO [Server] Home Dir: C:\jboss-4.0.2

16:05:03,927 INFO [Server] Home URL: file:/C:/jboss-4.0.2/

16:05:03,927 INFO [Server] Library URL: file:/C:/jboss-4.0.2/lib/

16:05:03,927 INFO [Server] Patch URL: null

16:05:03,927 INFO [Server] Server Name: default

16:05:03,927 INFO [Server] Server Home Dir: C:\jboss-4.0.2\server\default

16:05:03,927 INFO [Server] Server Home URL: file:/C:/jboss-4.0.2/server/default

/

16:05:03,937 INFO [Server] Server Data Dir: C:\jboss-4.0.2\server\default\data

16:05:03,937 INFO [Server] Server Temp Dir: C:\jboss-4.0.2\server\default\tmp

16:05:03,957 INFO [Server] Server Config URL: file:/C:/jboss-4.0.2/server/defau

lt/conf/

16:05:03,957 INFO [Server] Server Library URL: file:/C:/jboss-4.0.2/server/defa

ult/lib/

16:05:03,957 INFO [Server] Root Deployment Filename: jboss-service.xml

16:05:03,967 INFO [Server] Starting General Purpose Architecture (GPA)...

16:05:05,359 INFO [ServerInfo] Java version: 1.5.0_01,Sun Microsystems Inc.

16:05:05,359 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_01-b08

,Sun Microsystems Inc.

16:05:05,359 INFO [ServerInfo] OS-System: Windows 2000 5.0,x86

16:05:06,320 INFO [Server] Core system initialized

16:05:10,216 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour

ce:log4j.xml

16:05:10,406 INFO [WebService] Using RMI server codebase: http://sys18:8083/

16:05:11,628 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=

1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server Socket

Factory=org.jboss.net.sockets.DefaultSocketFactory@ad093076

16:05:21,272 INFO [Embedded] Catalina naming disabled

16:05:22,553 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0

-9090

16:05:22,553 INFO [Catalina] Initialization processed in 1151 ms

16:05:22,553 INFO [StandardService] Starting service jboss.web

16:05:22,563 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.9

16:05:22,643 INFO [StandardHost] XML validation disabled

16:05:22,694 INFO [Catalina] Server startup in 141 ms

16:05:23,234 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/C:/jb

oss-4.0.2/server/default/deploy/http-invoker.sar/invoker.war/

16:05:23,995 INFO [WebappLoader] Dual registration of jndi stream handler: fact

ory already defined

16:05:25,007 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=file:/C:/jbos

s-4.0.2/server/default/tmp/deploy/tmp32751jboss-ws4ee-exp.war/

16:05:25,387 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/C:/jboss-4.0

.2/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/

16:05:25,888 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file

:/C:/jboss-4.0.2/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war

/

16:05:30,094 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/C

:/jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/

16:05:31,416 INFO [MailService] Mail Service bound to java:/Mail

16:05:32,718 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/jboss-ha-local-jdbc.rar

16:05:32,978 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/jboss-ha-xa-jdbc.rar

16:05:33,239 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/jboss-local-jdbc.rar

16:05:33,449 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/jboss-xa-jdbc.rar

16:05:33,719 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/jms/jms-ra.rar

16:05:33,940 INFO [RARDeployment] Required license terms exist view the META-IN

F/ra.xml: file:/C:/jboss-4.0.2/server/default/deploy/mail-ra.rar

16:05:36,233 INFO [WrapperDataSourceService] Bound connection factory for resou

rce adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=Defa

ultDS to JNDI name 'java:DefaultDS'

16:05:36,814 INFO [A] Bound to JNDI name: queue/A

16:05:36,824 INFO Bound to JNDI name: queue/B

16:05:36,844 INFO [C] Bound to JNDI name: queue/C

16:05:36,844 INFO [D] Bound to JNDI name: queue/D

16:05:36,854 INFO [ex] Bound to JNDI name: queue/ex

16:05:36,894 INFO [testTopic] Bound to JNDI name: topic/testTopic

16:05:36,904 INFO [securedTopic] Bound to JNDI name: topic/securedTopic

16:05:36,904 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

16:05:36,904 INFO [testQueue] Bound to JNDI name: queue/testQueue

16:05:37,345 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.

0.0:8093

16:05:37,435 INFO [DLQ] Bound to JNDI name: queue/DLQ

16:05:37,855 INFO [ConnectionFactoryBindingService] Bound connection factory fo

r resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBin

ding,name=JmsXA to JNDI name 'java:JmsXA'

16:05:37,925 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C

:/jboss-4.0.2/server/default/deploy/jmx-console.war/

16:05:38,697 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-909

0

16:05:39,007 INFO [ChannelSocket] Port busy 8009 java.net.BindException: Addres

s already in use: JVM_Bind

16:05:39,348 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8010

16:05:39,368 INFO [JkMain] Jk running ID=1 time=0/441 config=null

16:05:39,378 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4

_0_2 date=200505022023)] Started in 35s:421ms

16:06:10,392 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour

ce:log4j.xml

16:06:39,194 INFO [TomcatDeployer] deploy, ctxPath=/valid, warUrl=file:/C:/jbos

s-4.0.2/server/default/tmp/deploy/tmp32797valid-exp.war/

16:06:40,205 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-IN

F/validator-rules.xml'

16:06:40,205 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-IN

F/validator.xml'

16:07:10,398 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour

ce:log4j.xml

SudheeshKumara at 2007-7-9 5:57:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...