Try the full classpath for the ApplicationResources.properties file at the
top of your JSP...

<fmt:bundle basename="org.j2e_translate.ApplicationResources" />

Then, you can use <fmt:message key="j2emain.title" />...

Good luck! :o)

> -----Original Message-----
> From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 10, 2003 11:35 AM
> To: 'Tag Libraries Users List'
> Subject: RE: Jstl i18n not working
> 
> 
> Oh, I see.  I can find the resource bundle now for my other 
> <fmt:message>.  But it still doesn't solve my first problem.  
> That's why I got so confused. I guess it has something to do 
> with putting the <fmt:message> tag in the head.  Wonder if 
> someone can provide a good point for a JSTL beginner like me.
> 
> Thanks a lot!
> 
> ---------------------------------------------
> <HEAD>
>   <title>
>     <fmt:bundle basename="ApplicationResources">
>       <fmt:message key="j2emain.title" />
>     </fmt:bundle>
>   </title>
>   <META NAME="Author" CONTENT="Yansheng">
>   <META NAME="Keywords" CONTENT="translator">
>   <META NAME="Description" CONTENT="">
>   <style type="css/text" src="./styles/global_style.css"> 
>   <style type="css/text" src="./styles/elements.css"> 
>   <style type="css/text" src="./styles/navigation.css"> 
> </HEAD>
> ----------------------------------------------
> 
> And I am getting: 
> 
>   <title>
>     
>       ???j2emain.title???
>     
>   </title>
> ----------------------------------------------
> Oh, wait, why do I need basename?  Ah, I don't understand 
> this very well....
> 
> 
> -----Original Message-----
> From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> Sent: November 10, 2003 10:28 AM
> To: Tag Libraries Users List
> Subject: Re: Jstl i18n not working
> 
> 
> So, based on your updated info, this should be:
> 
> <context-param>
>   
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</pa
> ram-name>
>   <param-value>org.j2e_translate.ApplicationResources</param-value>
> </context-param>
> 
> And you should have your property file located at:
> 
> WEB-INF/classes/org/j2e_translate/ApplicationResources.properties
> 
> Quoting Kris Schneider <[EMAIL PROTECTED]>:
> 
> > Nothing to do with Struts. From the JSTL spec for <fmt:message>:
> > 
> > If the i18n localization context that this action 
> determines does not 
> > have any resource bundle, an error message of the form 
> "???<key>???" 
> > is produced.
> > 
> > Try this:
> > 
> > <context-param>
> >   
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</pa
> ram-name>
> >   <param-value>ApplicationResources</param-value>
> > </context-param>
> > 
> > Quoting [EMAIL PROTECTED]:
> > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > I've only seen that when struts can't find the resource 
> file or the
> > key...
> > > 
> > > Savan Thongvanh
> > > Berkley Technology Services
> > > 515.278.7725
> > > 
> > > 
> > >                                                           
>                  
> >  
> > >                                                                
> > >                       "Yansheng Lin"                      
>                  
> >  
> > >                                                                
> > >                       <[EMAIL PROTECTED]        To:       
> "'Tag Libraries
> > > Users List'" <[EMAIL PROTECTED]>            
>           
> > >                       gis.com>                 cc:        
>                  
> >  
> > >                                                                
> > >                                                Subject:  
> Jstl i18n not
> > > working                                                   
>             
> > >                       11/10/2003 11:00                    
>                  
> >  
> > >                                                                
> > >                       AM                                  
>                  
> >  
> > >                                                                
> > >                       Please respond to                   
>                  
> >  
> > >                                                                
> > >                       "Tag Libraries                      
>                  
> >  
> > >                                                                
> > >                       Users List"                         
>                  
> >  
> > >                                                                
> > >                                                           
>                  
> >  
> > >                                                                
> > >                                                           
>                  
> >  
> > >                                                                
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Hi, in my web.xml:
> > > 
> > >   <!-- ==================== JSTL i18n support 
> > > ===========================
> > > -->
> > >   <context-param>
> > >     
> <param-name>javax.servlet.jsp.jstl.fmt.fall-backLocale</param-name>
> > >     <param-value>en</param-value>
> > >   </context-param>
> > >   <context-param>
> > >    
> > 
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name
> > >
> > >      <param-value>ApplicationResources.properties</param-value>
> > >   </context-param>
> > > 
> > > Then in my jsp:
> > > 
> > >     <fmt:bundle basename="ApplicationResources">
> > >       <fmt:message key="j2emain.title" />
> > >     </fmt:bundle>
> > > 
> > > But I am getting the following output:
> > >              ???j2emain.title???
> > > 
> > > Help appreciated!
> > > 
> > > -Yan
> > 
> > --
> > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > D.O.Tech       <http://www.dotech.com/>
> 
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech       <http://www.dotech.com/>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


This message and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  If you have received this email in error, please delete the
email and any files transmitted with it entirely from your computer. 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to