I've never used the Struts Adapter, so I can't offer much advice.  I
typically use JSTL and  with the displaytag.  Since this is the
default, it's easy to setup.  Just add the following to your web.xml.

    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>ApplicationResources</param-value>
    </context-param>

Matt

On 8/15/05, Meckler, Josh F. <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> All, 
> 
> I've written about this before, but so far no one has responded to offer any
> suggestions. So, here goes again. 
> 
> My problem is simply put: When I try to use localization with displaytag, I
> encounter problems with redeploying to my jboss. 
> 
> Basically, I have a web application running inside JBoss 4.0.1 sp1. The web
> app uses the displaytag library. 
> 
> When I'm *not* using any of the i18n adapters specified through displaytag
> (via the properties file), I can deploy and redeploy my EAR file at will. 
> 
> However, when I set
> locale.provider=org.displaytag.localization.I18nStrutsAdapter
> in the displaytag.properties file, I can get the localization to work. BUT,
> if I then redeploy the EAR file (because I've made another change, for
> example), the server explodes with a stacktrace when the i18n resource
> adapter is caled. Here's the stack trace: 
> 
> 17:04:23,688 ERROR [Engine] ApplicationDispatcher[] Servlet.service() for
> servle 
> t jsp threw exception 
> java.lang.ClassCastException 
>         at
> org.displaytag.localization.I18nStrutsAdapter.getResource(I18nStrutsA
> dapter.java:73) 
>         at
> org.displaytag.tags.ColumnTag.addHeaderToTable(ColumnTag.java:609)
>         at
> org.displaytag.tags.ColumnTag.doEndTag(ColumnTag.java:547) 
>         at
> org.apache.jsp.pages.home_002dbody_jsp._jspx_meth_display_column_6(ho
> me_002dbody_jsp.java:555) 
>         at
> org.apache.jsp.pages.home_002dbody_jsp._jspService(home_002dbody_jsp.
> java:159) 
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:324) 
> 
> To me, it looks as if somehow displaytag is holding onto some class
> reference across redeployments of the EAR file. 
> 
> Note that I can get rid of the classcastexception by bouncing the server,
> but this is no acceptable in a development environment. Also note that I am
> perfectly happy to look for problems in our own deployment scripts, but to
> me, this looks like some kind of displaytag problem. 
> 
> Can someone help or at least point me in the right direction? 
> 
> Thanks 
>  
>  -----------
>  The information contained in this e-mail message, and any attachment, is
> confidential and for use solely by the intended recipient. If you have
> received this message in error, please delete this message immediately.
> Although Moody's KMV makes every effort to protect its computing environment
> from malicious code, Moody's KMV is not responsible for any virus or other
> type of suspect code that may be transferred via this e-mail message.
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to