wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts Install WebSphere 3.5.4 Standard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Install WebSphere 3.5.4 Standard" Watch "Struts Install WebSphere 3.5.4 Standard" New topic
Author

Struts Install WebSphere 3.5.4 Standard

Ted J Schrader
Greenhorn

Joined: Oct 10, 2001
Posts: 28
Hello,
In working through installing Struts on WebSphere 3.5.4 (well, 3.5 Fixpack 4) Standard version, I used the install advice for WAS 3.5.3 Advanced found on:
http://www.distribucon.com/struts/WASInstall.htm
However, I have found that following these steps will result in a ClassNotFoundException when WAS tries to load the org.apache.struts.action.ActionServlet. This exception is very misleading (and frustrating), because, in reality, the underlying Logging and XML parsers aren't behaving properly. On the surface, it appears that WAS is completely ignoring the CLASSPATH declarations of the struts-example webapp.
I did two things differently from the steps referenced above. One is a new step, and one replaces an existing step.
The first problem is a conflicting commons-logging.jar included with struts-1.1-b1. I grabbed commons-logging 1.0.2 and replaced the existing commons-logging.jar file in the servlets directory of the struts-example webapp. The 1.0.2 version of commons-logging can be found on:
http://jakarta.apache.org/builds/jakarta-commons/release/commons-logging/v1.0.2/
After starting the host again via WAS AdminConsole, I got an XML parsing related exception:
In the std_err file:
javax.xml.parsers.ParserConfigurationException: Namespace not supported by SAXParser
In the std_out file:
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
Now to replace a step:
In step 6, they say to "Copy jaxp 1.0.1's jaxp.jar and parser.jar to the servlets directory of the struts-example webapp." Instead, I grabbed Apache Crimson 1.1.3. It can be found on:
http://xml.apache.org/dist/crimson/
I then placed the crimson.jar in the servlets directory of the struts-example webapp.
After starting the host again via WAS AdminConsole, the struts-example appears in my browser on:
http://localhost/struts-example/
I hope people will find this helpful since the lowest FixPack available from IBM for WAS 3.5 is FixPack 4. In all honesty, I wrote this for myself, too, in case I need to go through this process again and can't find my notes.
Regards,
Ted Schrader
SCJ2P
Ted J Schrader
Greenhorn

Joined: Oct 10, 2001
Posts: 28
Hello,
One other thing I have noticed is that I didn't have to carry out "Configuring WAS 3.5, Step 1" in the above-mentioned install notes, either.
The step in which I refer states to extract all XML DTD files from struts.jar (using folder names)and place them into the C:\WebSphere\AppServer\classes\ directory so WAS can find them with its class loader. Basically, this will create /org/apache/struts/resources/*.dtd in the /classes/ directory.
Again, I didn't do this and the struts-example seems to work fine.
Regards,
Ted Schrader
SCJ2P
Ted J Schrader
Greenhorn

Joined: Oct 10, 2001
Posts: 28
Hello again,
I'm sure anyone interested in this post would appreciate knowing that the struts-example application will most likely not run on WAS 3.5.4 (and on up to WAS 4.0).
The problem is when we click the Register or Login links, the following exception occurs:
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.java:236)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:632)
at _registration_jsp_0._jspService(_registration_jsp_0.java:935)
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.java:396)
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(StrictLifecycleServlet.java:160)
<truncated>
At first glance, it looks like the FormTag.doEndTag() is at fault. But, further research indicates that, in reality, PageContextImpl.removeAttribute() does not comform to specifications.
In short, the problem lies in the fact that WAS relies on a version of Jasper associated with TomCat 3.1. To work properly, a version of Jasper associated with TomCat 3.2.2 is needed. However, I have seen that people running WAS 4.0 are having the same trouble, and someone mentioned that WAS 4.0.1 has fixed the problem, but he didn't give any resources.
Basically, an upgrade of WAS is needed (still unsure about version), or patch Struts yourself and re-build it.

Ted
SCJ2P
References:
http://issues.apache.org/bugzilla/
Bugs 2123, 2259, 932.
http://groups.google.com/groups?hl=en&q=cant%20remove%20Attributes%20from%20request%20scope&group=ibm.software.websphere.*
[ October 03, 2002: Message edited by: Ted Schrader ]
Ted J Schrader
Greenhorn

Joined: Oct 10, 2001
Posts: 28
Hello,
In regards to my first reply to myself regarding copying all DTD documents to C:\WebSphere\AppServer\classes\:
It is a good idea to do this! Somehow, our local WAS server can't see the Internet this morning, and initialisation breaks, since it can't find the necessary DTDs. Following "Configuring WAS 3.5, Step 1" seems to make the DTDs permanently available as a local reference.
Regards,
Ted
SCJ2P
 
 
subject: Struts Install WebSphere 3.5.4 Standard
 
Similar Threads
Struts 1.0 and 1.1 downloads
Axis on WebLogic
Axis on WebLogic
Struts Installation -- Need Help
which jar does org.apache.log4j belong to ?where can i down it?