Bug 54974

Summary: SessionCookieConfig.setXXX methods must throw IllegalStateException when invoked after initialization phase
Product: Tomcat 7 Reporter: Violeta Georgieva <violetagg>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0.40   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Violeta Georgieva 2013-05-15 08:23:39 UTC
According to Servlet 3.0 javadoc 
javax.servlet.SessionCookieConfig setter methods must throw IllegalStateException when invoked after initialization phase

setComment(String) 
setDomain(String)
setHttpOnly(boolean)
setMaxAge(int)
setName(String) 
setPath(String)
setSecure(boolean)

"
Throws: java.lang.IllegalStateException - if the ServletContext from which this SessionCookieConfig was acquired has already been initialized
"
Comment 1 Violeta Georgieva 2013-05-15 12:18:43 UTC
Fixed in trunk and 7.0.x and will be included in 7.0.41 onwards.