RE: Struts 1.0 on WebSphere 3.5.4??

2001-07-03 Thread Assenza, Chris

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

RE: Struts 1.0 on WebSphere 3.5.4?? (and on WAS 4.0)

2001-07-03 Thread Brugge, John

Sadly, it looks like WAS 4.0 is still using a buggy Jasper library, as the
Struts 1.0 Final sample app still complains with the same error. 

IBM Marketing apparently doesn't understand what it means to support open
standards (http://www7b.boulder.ibm.com/wsdd/products/supportstds.html).
Just saying so doesn't make it so. And if they have passed Sun's J2EE
certification test for their Jasper implementation, then I'd have to also
say that Sun's test suite needs to be improved.

John
 -Original Message-
 From: Assenza, Chris [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, July 03, 2001 7:54 AM
 To:   '[EMAIL PROTECTED]'
 Subject:  RE: Struts 1.0 on WebSphere 3.5.4??
 
 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(ServletManag
 er
 .java
 :626)
  at 
 com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecy
 cl
 eServ
 let.java:160)
  at 
 com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServ
 le
 t.jav
 a:287)
  at 
 com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecyc
 le
 Servl
 et.java:105)
  at 
 com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:
 36
 0)
  at 
 com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletM
 an
 ager.
 java:775)
  at 
 com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMan
 ag
 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(WebAppReque
 st
 Dispa
 tcher.java:234)
  at 
 com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppReques
 tD
 ispat
 cher.java:138

RE: Struts 1.0 on WebSphere 3.5.4??

2001-07-03 Thread Assenza, Chris

Sure thing - I already sent it but the list refused it due to its file size.
As an alternative, I'll put it up on my personal FTP space and anyone who
wants it can download it from there! :) 

Struts.jar with Form tag modifications: http://www.enfused.com/struts.jar

-Chris

-Original Message-
From: Christine Eckstein [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 11:09 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts 1.0 on WebSphere 3.5.4??


Thank you for responding so quickly as I was about to hit
my head against a wall!  Perhaps you could attach that
working version you mentioned I could use?  In the
meantime, I'm going to obtain the rest of the software I'll
need in order to compile Struts myself -- just in case. 
Thank you so much!

-cme-

--- Assenza, Chris [EMAIL PROTECTED] wrote:
 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