You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/04/03 07:36:00 UTC

DO NOT REPLY [Bug 7705] New: - Unnecessary statement in the initServlet method?

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7705>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7705

Unnecessary statement in the initServlet method?

           Summary: Unnecessary statement in the initServlet method?
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Controller
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: chuckcavaness@attbi.com


I noticed something in the ActionServlet that didn't look right. I don't 
believe it's causing a problem, but I wanted to point it out and let one of you 
take a look. In the initServlet method, the last line loads the servletMapping 
value into the ServletContext at the SERVLET_KEY value. However, back out in 
the init method, which the execute returns to right after the initServlet 
method finishes, this value is always overwritten by setting the instance of 
the servlet to the same key in the ServletContext. Since this is not 
conditional on anything, it always overwrites this value. Why is the 
servletMapping even being put in the ServletContext in the initServlet method, 
if it's always overwritten in the next statement, every time?

Hopefully this will make sense to one of you.

Chuck

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>