Bug 31656 - Tomcat 5 should be updated to build with recent struts
Summary: Tomcat 5 should be updated to build with recent struts
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Webapps:Administration (show other bugs)
Version: 5.0.28
Hardware: Other other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 23:16 UTC by James Berry
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Berry 2004-10-11 23:16:34 UTC
I don't know how far back this goes, but Tomcat fails to build against the recent versions of struts. This 
can be fixed by moving away from deprecated/removed struts apis.

Tomcat appears to rely on accessors in struts that are not just deprecated, but not even available 
anymore in struts 1.2x. The following shows the beginning of the errors...

-jdb
...
build-main:
    [javac] Compiling 164 source files to /Volumes/Rock/Users/jberry/Projects/darwinports/localports/
java/tomcat5/work/jakarta-tomcat-5.0.28-src/jakarta-tomcat-5/build/server/webapps/admin/WEB-
INF/classes
    [javac] /Volumes/Rock/Users/jberry/Projects/darwinports/localports/java/tomcat5/work/jakarta-
tomcat-5.0.28-src/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/
admin/ApplicationLocales.java:52: cannot resolve symbol
    [javac] symbol  : method getResources ()
    [javac] location: class org.apache.struts.action.ActionServlet
    [javac]         MessageResources resources = servlet.getResources();
    [javac]                                             ^
    [javac] /Volumes/Rock/Users/jberry/Projects/darwinports/localports/java/tomcat5/work/jakarta-
tomcat-5.0.28-src/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/
admin/CommitChangesAction.java:95: cannot resolve symbol
    [javac] symbol  : variable LOCALE_KEY 
    [javac] location: class org.apache.struts.action.Action
    [javac]         Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
    [javac]                                                             ^
    [javac] /Volumes/Rock/Users/jberry/Projects/darwinports/localports/java/tomcat5/work/jakarta-
tomcat-5.0.28-src/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/
admin/CommitChangesAction.java:97: cannot resolve symbol
    [javac] symbol  : method getResources ()
    [javac] location: class org.apache.struts.action.ActionServlet
    [javac]             resources = getServlet().getResources();
    [javac]                                   ^
    [javac] /Volumes/Rock/Users/jberry/Projects/darwinports/localports/java/tomcat5/work/jakarta-
tomcat-5.0.28-src/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/
admin/SetLocaleAction.java:85: cannot resolve symbol
    [javac] symbol  : variable LOCALE_KEY 
    [javac] location: class org.apache.struts.action.Action
    [javac]                     session.setAttribute(Action.LOCALE_KEY, currentLocale);
Comment 1 Yoav Shapira 2004-10-14 17:39:36 UTC
We've been building the admin webapp against Struts 1.1.  I'm changing this 
issue to an enhancement issue, and I'll look into the actual modifications 
needed to make it build under Struts 1.2.  If you have patches that will make 
struts 1.2 compilation work, please post them, and they'd be much appreciated.
Comment 2 Yoav Shapira 2004-10-27 16:45:01 UTC
For Tomcat 5.5, this is already fixed (we build that using Struts 1.2.4).  Will 
take a look at Tomcat 5.0 next.
Comment 3 Yoav Shapira 2004-10-27 17:03:01 UTC
I see Bill Barker's already fixed 5.5, so I'll back-port his fixes to 5.0.
Comment 4 Yoav Shapira 2004-10-27 18:38:21 UTC
OK, done for Tomcat 5.0(.30) as well.  Thanks for bringing this to our 
attention, and thanks Bill for covering 3.x and 5.5, making my job mostly 
copy/paste on this one ;)