You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Matt Raible <ma...@raibledesigns.com> on 2004/02/28 00:17:03 UTC

Deprecation on tiles.ControllerSupport

FYI... no response expected.

I'm getting the following deprecation error with 1.2.0 when using JDK
1.5.0 Beta 1:

    [javac]
C:\Source\appfuse\src\web\org\appfuse\webapp\action\UserCounterControlle
r.java:26: warni
ng: [deprecation]
perform(org.apache.struts.tiles.ComponentContext,javax.servlet.http.Http
ServletReq
uest,javax.servlet.http.HttpServletResponse,javax.servlet.ServletContext
) in org.apache.struts.tiles
.Controller has been deprecated
    [javac] public class UserCounterController extends ControllerSupport
{

In UserCounterController.java, I have:


    public void execute(ComponentContext tilesContext,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletContext)
      throws Exception {
        // Get the number of current users from the application's
context
        String userCounter =
            (String)
servletContext.getAttribute(UserCounterListener.COUNT_KEY);

        // Add this number to the request for display
        request.setAttribute(UserCounterListener.COUNT_KEY,
userCounter);
    }

When using JDK 1.4.2, everything compiles w/o deprecation errors.

I'm using Windows XP.

Matt




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