You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jefferson Rodrigues de Oliveira e Silva <je...@edb.ericsson.se> on 2002/04/02 14:26:23 UTC
Re:
it comes from the Resources file.
Take a look in your <file>.properties, mainMenu.registration should
be there.
K J wrote:
> in:
> <bean:message key="mainMenu.registration"/>
>
> where does the value of
> registration(mainMenue.registration) come from? can
> someone explain to me how this works?
>
> also, does anyone know of any good on-line tutorials
> on using tag libraries, other than the ones on Strut'
> site?
>
> many thanks!
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://http://taxes.yahoo.com/
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: ApplicationResources.properties
Posted by srinivas <sv...@intensit.de>.
Its part of 1.0
this is what the ActionServlet does on start up. Snippet from
org.apache.struts.action.ActionServlet class.
protected void initApplication() throws ServletException {
String value = getServletConfig().getInitParameter("application");
if (value == null)
return;
String factory =
getServletConfig().getInitParameter("factory");
if (debug >= 1)
log(internal.getMessage("applicationLoading", value));
try {
String oldFactory =
MessageResourcesFactory.getFactoryClass();
if (factory != null)
MessageResourcesFactory.setFactoryClass(factory);
MessageResourcesFactory factoryObject =
MessageResourcesFactory.createFactory();
application = factoryObject.createResources(value);
MessageResourcesFactory.setFactoryClass(oldFactory);
value = getServletConfig().getInitParameter("null");
if (value == null)
value = "true";
if (value.equalsIgnoreCase("true") ||
value.equalsIgnoreCase("yes"))
application.setReturnNull(true);
else
application.setReturnNull(false);
} catch (Throwable e) {
log(internal.getMessage("applicationResources", value), e);
throw new UnavailableException
(internal.getMessage("applicationResources", value));
}
getServletContext().setAttribute(Action.MESSAGES_KEY, application);
}
-----Original Message-----
From: Wellie W. Chao [mailto:wchao@caraveltech.com]
Sent: Tuesday, April 02, 2002 11:01 PM
To: Struts Users Mailing List
Subject: RE: ApplicationResources.properties
Is the "application" parameter a relic from 1.0 or is it required in 1.1? I
have an entry in struts-config.xml that seems to serve the same purpose:
<message-resources
parameter="com.mycompany.myproject.ApplicationResources"/>
The reason I ask is that I recently began having problems accessing entries
in ApplicationResources. I'll try adding it to web.xml.
-----Original Message-----
From: srinivas [mailto:sv@intensit.de]
Sent: Tuesday, April 02, 2002 2:35 PM
To: Struts Users Mailing List
Subject: RE: ApplicationResources.properties
hello,
u need to have it in your classpath and hence under /webapp only
In fact u can place in any directory u want under classes and configure ur
web server, in case of tomcat its like this.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.test.properties.ApplicationResources</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>
<load-on-startup>1</load-on-startup>
</servlet>
regards,
srinivas
-----Original Message-----
From: K J [mailto:tony_dinapoli@yahoo.com]
Sent: Tuesday, April 02, 2002 10:14 PM
To: Struts Users Mailing List
Subject: ApplicationResources.properties
In the struts example application, this properties
file is under both /source and /webApp. does it need
to be under both directories?
thanks.
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: ApplicationResources.properties
Posted by "Wellie W. Chao" <wc...@caraveltech.com>.
Is the "application" parameter a relic from 1.0 or is it required in 1.1? I
have an entry in struts-config.xml that seems to serve the same purpose:
<message-resources
parameter="com.mycompany.myproject.ApplicationResources"/>
The reason I ask is that I recently began having problems accessing entries
in ApplicationResources. I'll try adding it to web.xml.
-----Original Message-----
From: srinivas [mailto:sv@intensit.de]
Sent: Tuesday, April 02, 2002 2:35 PM
To: Struts Users Mailing List
Subject: RE: ApplicationResources.properties
hello,
u need to have it in your classpath and hence under /webapp only
In fact u can place in any directory u want under classes and configure ur
web server, in case of tomcat its like this.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.test.properties.ApplicationResources</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>
<load-on-startup>1</load-on-startup>
</servlet>
regards,
srinivas
-----Original Message-----
From: K J [mailto:tony_dinapoli@yahoo.com]
Sent: Tuesday, April 02, 2002 10:14 PM
To: Struts Users Mailing List
Subject: ApplicationResources.properties
In the struts example application, this properties
file is under both /source and /webApp. does it need
to be under both directories?
thanks.
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: ApplicationResources.properties
Posted by srinivas <sv...@intensit.de>.
hello,
u need to have it in your classpath and hence under /webapp only
In fact u can place in any directory u want under classes and configure ur
web server, in case of tomcat its like this.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.test.properties.ApplicationResources</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>
<load-on-startup>1</load-on-startup>
</servlet>
regards,
srinivas
-----Original Message-----
From: K J [mailto:tony_dinapoli@yahoo.com]
Sent: Tuesday, April 02, 2002 10:14 PM
To: Struts Users Mailing List
Subject: ApplicationResources.properties
In the struts example application, this properties
file is under both /source and /webApp. does it need
to be under both directories?
thanks.
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
ApplicationResources.properties
Posted by K J <to...@yahoo.com>.
In the struts example application, this properties
file is under both /source and /webApp. does it need
to be under both directories?
thanks.
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>