The following issue has been updated:
Updater: Vincent Massol (mailto:[EMAIL PROTECTED])
Date: Sat, 17 Apr 2004 9:14 AM
Changes:
description changed from Hi,
I have just updated to Cactus 1.3 and the following code throws an exception
:
public class Testresults extends JspTestCase {
...
protected void setUp() throws Exception {
// Setup the needed beans
// JSPDataConstants.initializeConstants(pageContext) ;
SessionBean sessionBean = new SessionBean() ;
pageContext.setAttribute("sessionBean",
sessionBean,PageContext.SESSION_SCOPE) ;
}
...
java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an
HttpSession
at
org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:
244)
at
org.apache.cactus.server.AbstractPageContextWrapper.dispatch63_setAttribute
AbstractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k
):319)
at
org.apache.cactus.server.AbstractPageContextWrapper.around63_setAttribute(Ab
stractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):
1147)
at
org.apache.cactus.server.AbstractPageContextWrapper.setAttribute(AbstractPag
eContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):316)
at Testresults.setUp(Testresults.java:86)
at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:4
88)
at
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.java:1
48)
...
It worked with Cactus previous version, but I remember I had to change the
jspRedirector.jsp first line to
<[EMAIL PROTECTED] import="org.apache.cactus.server.*" session="true" %> (the original
version states session="false")
I made this change because I had a similar exception and saw this advice on
cactus mailing list. to Hi,
I have just updated to Cactus 1.3 and the following code throws an exception
:
public class Testresults extends JspTestCase {
...
protected void setUp() throws Exception {
// Setup the needed beans
// JSPDataConstants.initializeConstants(pageContext) ;
SessionBean sessionBean = new SessionBean() ;
pageContext.setAttribute("sessionBean",
sessionBean,PageContext.SESSION_SCOPE) ;
}
...
java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an
HttpSession
at
org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:
244)
at
org.apache.cactus.server.AbstractPageContextWrapper.dispatch63_setAttribute
AbstractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k
):319)
at
org.apache.cactus.server.AbstractPageContextWrapper.around63_setAttribute(Ab
stractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):
1147)
at
org.apache.cactus.server.AbstractPageContextWrapper.setAttribute(AbstractPag
eContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):316)
at Testresults.setUp(Testresults.java:86)
at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:4
88)
at
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.java:1
48)
...
It worked with Cactus previous version, but I remember I had to change the
jspRedirector.jsp first line to
<[EMAIL PROTECTED] import="org.apache.cactus.server.*" session="true" %> (the original
version states session="false")
I made this change because I had a similar exception and saw this advice on
cactus mailing list.
environment changed from Operating System: Windows NT/2K
Platform: PC to Operating System: Windows NT/2K
Platform: PC
priority changed to Major
Fix Version changed to 1.4-beta1
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/CACTUS-21?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/CACTUS-21
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CACTUS-21
Summary: HttpSession is not setup
Type: Bug
Status: Resolved
Priority: Major
Resolution: FIXED
Project: Cactus
Components:
Framework
Fix Fors:
1.4-beta1
Versions:
1.3
Assignee: Vincent Massol
Reporter: Marc Brette
Created: Tue, 30 Apr 2002 7:29 AM
Updated: Sat, 17 Apr 2004 9:14 AM
Environment: Operating System: Windows NT/2K
Platform: PC
Description:
Hi,
I have just updated to Cactus 1.3 and the following code throws an exception
:
public class Testresults extends JspTestCase {
...
protected void setUp() throws Exception {
// Setup the needed beans
// JSPDataConstants.initializeConstants(pageContext) ;
SessionBean sessionBean = new SessionBean() ;
pageContext.setAttribute("sessionBean",
sessionBean,PageContext.SESSION_SCOPE) ;
}
...
java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an
HttpSession
at
org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:
244)
at
org.apache.cactus.server.AbstractPageContextWrapper.dispatch63_setAttribute
AbstractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k
):319)
at
org.apache.cactus.server.AbstractPageContextWrapper.around63_setAttribute(Ab
stractPageContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):
1147)
at
org.apache.cactus.server.AbstractPageContextWrapper.setAttribute(AbstractPag
eContextWrapper.java;org/apache/cactus/util/log/LogAspect.java(1k):316)
at Testresults.setUp(Testresults.java:86)
at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:4
88)
at
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.java:1
48)
...
It worked with Cactus previous version, but I remember I had to change the
jspRedirector.jsp first line to
<[EMAIL PROTECTED] import="org.apache.cactus.server.*" session="true" %> (the original
version states session="false")
I made this change because I had a similar exception and saw this advice on
cactus mailing list.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]