The problem I reported to the list the other day (that error) in JBoss 2 w/
Tomcat 3.2b7 is actually the same issue as this. Granted, I haven't actually
tested this in WebSphere, but it is the same issue and others have tried it
with success IIRC.  

Anyway, the problem is (as others have previously reported), the JASPER
version used by the WebSphere servlet engine is not up to the latest spec
and as such does not support the way the Form tag is currently written.  If
you like, I can attach an updated Struts.jar that has the fix compiled and
ready to go.  If you want to change it yourself, here's the code:

(This fix was suggested by David Janovy)

In doEndTag on the Form tag, change: 

pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

To:

    pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
    pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
    pageContext.removeAttribute(Constants.BEAN_KEY);
    pageContext.removeAttribute(Constants.FORM_KEY);

Chris

-----Original Message-----
From: Christine Eckstein [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 6:03 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0 on WebSphere 3.5.4??


Has anyone been able to get Struts 1.0 to work on WebSphere
3.5.4 (yes, that's with the new patch 4)?

I can get index.jsp to run, but I'm not getting farther
than that. I've made the recommended DTD changes, but that
didn't help (no ActionMapping, or similar, errors have
shown up in the log.)  What I'm looking to find out is if I
need to go through the additional process of modifying the
Struts code as was declared necessary for 3.5.2 and
below.

Any ideas?  Thanks for your help!!!!

The following is the reported error:

---------
Error 500
An error has occured while processing
request:http://hca320872k/strutsexample/logon.jsp
Message: Server caught unhandled exception from servlet
[jsp11]: cant
remove Attributes from request scope

Target Servlet: jsp11
StackTrace: 
----------------------------------------------------------------------------
----
Root Error-1: cant remove Attributes from request scope

java.lang.IllegalArgumentException: cant remove Attributes
from
request scope
     at java.lang.RuntimeException. <init>
(RuntimeException.java:49)
     at java.lang.IllegalArgumentException. <init> 
(IllegalArgumentException.java:45)
     at 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.ja
va:23
6)
     at
org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591)
     at _logon_jsp_1._jspService(_logon_jsp_1.java:357)
     at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:39
6)
     at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:718)
     at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:872)
     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java
:626)
     at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServ
let.java:160)
     at 
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.jav
a:287)
     at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servl
et.java:105)
     at 
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:36
0)
     at 
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.
java:775)
     at 
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.ja
va:701)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebApp
RequestDispatcher.java:478)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispa
tcher.java:234)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispat
cher.java:138)
     at 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:
77)
     at 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocat
ion.java:67)
     at 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estPr
ocessor.java:155)
     at 
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java
:300)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
Event
ListenerImp.java:230)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
isten
erImp.java:104)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
ventS
ource.java:212)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.notifyService(SQWrapperEventSource.java:353)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.run(SQWrapperEventSource.java:220)
     at 
com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
(OutO
fProcThread.java:248)
     at java.lang.Thread.run(Thread.java:481)



----------------------------------------------------------------------------
----
Wrapped Error-2: cant remove Attributes from request scope

javax.servlet.ServletException: cant remove Attributes from
request
scope
     at javax.servlet.ServletException. <init>
(ServletException.java:161)
     at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.jav
a:392)
     at _logon_jsp_1._jspService(_logon_jsp_1.java:378)
     at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:39
6)
     at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:718)
     at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:872)
     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java
:626)
     at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServ
let.java:160)
     at 
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.jav
a:287)
     at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servl
et.java:105)
     at 
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:36
0)
     at 
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.
java:775)
     at 
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.ja
va:701)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebApp
RequestDispatcher.java:478)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispa
tcher.java:234)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispat
cher.java:138)
     at 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:
77)
     at 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocat
ion.java:67)
     at 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estPr
ocessor.java:155)
     at 
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java
:300)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
Event
ListenerImp.java:230)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
isten
erImp.java:104)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
ventS
ource.java:212)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.notifyService(SQWrapperEventSource.java:353)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.run(SQWrapperEventSource.java:220)
     at 
com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
(OutO
fProcThread.java:248)
     at java.lang.Thread.run(Thread.java:481)



----------------------------------------------------------------------------
----
Wrapped Error-3: Server caught unhandled exception from
servlet
[jsp11]: cant remove Attributes from request scope

com.ibm.servlet.engine.webapp.UncaughtServletException:
Server caught
unhandled exception from servlet [jsp11]: cant remove
Attributes from
request scope
     at javax.servlet.ServletException. <init>
(ServletException.java:132)
     at com.ibm.websphere.servlet.error.ServletErrorReport.
<init> 
(ServletErrorReport.java:43)
     at com.ibm.servlet.engine.webapp.WebAppErrorReport.
<init> 
(WebAppErrorReport.java:31)
     at
com.ibm.servlet.engine.webapp.UncaughtServletException.
<init> 
(UncaughtServletException.java:11)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebApp
RequestDispatcher.java:510)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispa
tcher.java:234)
     at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispat
cher.java:138)
     at 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:
77)
     at 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocat
ion.java:67)
     at 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estPr
ocessor.java:155)
     at 
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java
:300)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
Event
ListenerImp.java:230)
     at 
com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
isten
erImp.java:104)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
ventS
ource.java:212)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.notifyService(SQWrapperEventSource.java:353)
     at 
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnabl
e.run(SQWrapperEventSource.java:220)
     at 
com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
(OutO
fProcThread.java:248)
     at java.lang.Thread.run(Thread.java:481)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to