You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Slater <ps...@yahoo.com> on 2006/05/03 00:04:03 UTC

WebApp Cannot seem to locate Resource Bundle

I have defined Action Servlet configuration in web.xml as:
   <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.xxx.i18nMessages.MessageResources</param-value>
     </init-param>
     <init-param>
       <param-name>config</param-name>
       <param-value>/WEB-INF/conf/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>
     <load-on-startup>2</load-on-startup>
   </servlet>
 
 But, when I put this into a jsp page:
 <%@ taglib uri="/WEB-INF/conf/struts-bean.tld" prefix="bean" %>
 <bean:message key="loginEntry.userName"/>
 
 then, I the exception:
 ERROR - ApplicationDispatcher.invoke(719) | Servlet.service() for servlet jsp threw exception
 javax.servlet.jsp.JspException: Missing message for key "loginEntry.userName"
 
 ERROR - InsertTag$InsertHandler.doEndTag(922) | ServletException in '/WEB-INF/tiles/login/loginFields.jsp': Missing message for key "loginEntry.userName"
 javax.servlet.ServletException: Missing message for key "loginEntry.userName"
  
 My struts app cannot seem to resolve the loginEntry.userName key-value pair for some reason.... Need help on this. Thank you very much
 
		
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

Re: WebApp Cannot seem to locate Resource Bundle

Posted by Laurie Harper <la...@holoweb.net>.
Do you have the properties file (MessageResources.properties) deployed 
in the correct directory (com/xxx/i18nMessages) somewhere on your 
classpath? Either under WEB-INF/classes, or within a jar in WEB-INF/lib?

Does the properties file actually contain an entry with the key 
'loginEntry.userName'?

Have you checked the logs during startup? Does Struts find and 
successfully load the properties file you specified?

You don't mention which version of Struts you're using; most of the 
servlet config params you listed are no longer used in recent releases, 
though as long as you have the <message-resources/> tag in 
struts-config.xml it shouldn't hurt to have them.

L.

Pat Slater wrote:
> I also have a message resource entry in struts-config.xml file:
> <message-resources parameter="com.xxx.i18nMessages.MessageResources" />
> 
> Pat Slater <ps...@yahoo.com> wrote: I have defined Action Servlet configuration in web.xml as:
>    
>      action
>      org.apache.struts.action.ActionServlet
>      
>        
> application
>           
> com.xxx.i18nMessages.MessageResources
> 
>      
>      
>        
> config
> 
>        
> /WEB-INF/conf/struts-config.xml
> 
>      
>      
>        
> debug
> 
>        
> 2
> 
>      
>      
>        
> detail
> 
>        
> 2
> 
>      
>      2
>    
>  
>  But, when I put this into a jsp page:
>  <%@ taglib uri="/WEB-INF/conf/struts-bean.tld" prefix="bean" %>
>  
>  
>  then, I the exception:
>  ERROR - ApplicationDispatcher.invoke(719) | Servlet.service() for servlet jsp threw exception
>  javax.servlet.jsp.JspException: Missing message for key "loginEntry.userName"
>  
>  ERROR - InsertTag$InsertHandler.doEndTag(922) | ServletException in '/WEB-INF/tiles/login/loginFields.jsp': Missing message for key "loginEntry.userName"
>  javax.servlet.ServletException: Missing message for key "loginEntry.userName"
>   
>  My struts app cannot seem to resolve the loginEntry.userName key-value pair for some reason.... Need help on this. Thank you very much
>  
>   
> ---------------------------------
> Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2�/min with Yahoo! Messenger with Voice.
> 
> 		
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.



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


Re: WebApp Cannot seem to locate Resource Bundle

Posted by Pat Slater <ps...@yahoo.com>.
I also have a message resource entry in struts-config.xml file:
<message-resources parameter="com.xxx.i18nMessages.MessageResources" />

Pat Slater <ps...@yahoo.com> wrote: I have defined Action Servlet configuration in web.xml as:
   
     action
     org.apache.struts.action.ActionServlet
     
       
application
          
com.xxx.i18nMessages.MessageResources

     
     
       
config

       
/WEB-INF/conf/struts-config.xml

     
     
       
debug

       
2

     
     
       
detail

       
2

     
     2
   
 
 But, when I put this into a jsp page:
 <%@ taglib uri="/WEB-INF/conf/struts-bean.tld" prefix="bean" %>
 
 
 then, I the exception:
 ERROR - ApplicationDispatcher.invoke(719) | Servlet.service() for servlet jsp threw exception
 javax.servlet.jsp.JspException: Missing message for key "loginEntry.userName"
 
 ERROR - InsertTag$InsertHandler.doEndTag(922) | ServletException in '/WEB-INF/tiles/login/loginFields.jsp': Missing message for key "loginEntry.userName"
 javax.servlet.ServletException: Missing message for key "loginEntry.userName"
  
 My struts app cannot seem to resolve the loginEntry.userName key-value pair for some reason.... Need help on this. Thank you very much
 
  
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2�/min with Yahoo! Messenger with Voice.

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.