Just curious about several things on this setup.

1.    Did you need a special patch level to make this work? We are at 3.5.3.

2.   What JDK version are you using?  We are using 1.3.

3.   Which struts jar are you using?   Is it the websphere specific version for NT?  
Or, is it normal version?  Do you put it on your classpath? 

4.   Do you have the DTD's,  struts-config_1_0.dtd,   web-app_2_2.dtd, and 
web-app_2_3.dtd
     outside the jar file? Or did you keep them inside?  We have ours outside and 
modified as the windows 2000 documentation mentioned.

Reason I am asking is that I cannot get the action servlet to load.   It is abending 
with the following:

"
.....
Mar 13, 2002 15:36:18.066 PM  Thread-1 ServletInstan X Uncaught init()  exception 
thrown by servlet {0}: {1}
                                 "action"
                                 javax.servlet.ServletException: 
java.lang.ClassNotFoundException

:at 
:com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(t(ServletManager.java:637)
:at 
:com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:136)
:at 
:com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:236)

:at 
:com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:102)

:at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:301)
:at javax.servlet.GenericServlet.init(GenericServlet.java:258)
....
"




Steven Banks
368-0566

>>> "KASSON, STEVEN R (Steve), ALBAS" <[EMAIL PROTECTED]> 03/11/02 05:28PM >>>
Hmm... I received a follow-up question on this topic, so I tried to find my posting 
from awhile back.  I couldn't find it in the archives... so here it is again.
 

Regards, 
-Steve 


 To: [EMAIL PROTECTED] 
Subject: RE: Config for WAS 3.5 on OS/390?

Hi All,  

Since I made my original post we've been able to get things running. Here are the 
details (I needed to write them up anyway). I'm sure it's not the only solution, but 
it's working!  Any suggestions on the DTD validation are welcome...

Regards,

-Steve

 

Configuring Struts 1.0 on WAS 3.5 for OS/390

Background Info:

WAS for OS/390 strives to be compatible with the "multi-platform" releases of WAS, but 
it does have some differences. One big difference is the lack of the Administrator's 
Console. Instead it uses a set of properties files to configure the server and web 
applications. The following site has specific documentation; the "Planning, 
Installing, and Using" (PIU) document is the most useful. 

http://www-4.ibm.com/software/webservers/appserv/library_390.html 

There is a section in Chapter 3 of the PIU document which details how to convert a WAR 
file. We tried this on the struts-blank.war but were unable to get things working. But 
it was helpful to see what the conversion process generated. We then manually 
configured our application as described below.

Problems Encountered

        XML Validation

        We tried multiple combinations for specifying the DTD's for the XML files: 
struts-config.xml and web.xml.  Nothing seemed to work.  The parser could not seem to 
resolve to the local copy of the DTD.  We got around this by removing the DOCTYPE tag 
from the files and adding/setting the servlet parameter "validating" to "false" for 
the action servlet.

        ASCII vs EBCDIC

        It turns out that most files (jsp, xml, tld, resources, etc.) must be ASCII in 
order for WAS and Struts to process them. The only exception is the "myapp.webapp" 
file (described below). We use FTP to promote our files to the 390. Here's the 
confusing part... When you FTP in mode ASCII, an automatic conversion takes place, 
converting your text files to EBCDIC. To keep the files in ASCII format, you must FTP 
in mode BINARY. 

Key Files

The key files for configuring WAS on OS/390 are detailed in the PIU document. I've 
noted some comments below and snippets/content for each that we touched in our 
installation.

        httpd.conf

        The configuration file for the Web server. A "Service" directive is needed to 
route requests through WAS for your application. 

# MYAPP application 

# 

Service /myapp/* /usr/lpp/WebSphere/uq56298/AppServer/bin/was350plugin.so:service_exit 

 

        was.conf

        A properties file used to configure the application server and web 
applications. The key here is to only use the "deployedwebapp" items, do not include 
any "webapp" items. This way, WAS will look for the "myapp.webapp" file in your path 
for the webapp configuration. 

#

# myapp application 

# 

deployedwebapp.myapp.host=default_host 

deployedwebapp.myapp.rooturi=/myapp 

deployedwebapp.myapp.classpath=/myapp/WEB-INF/classes:/myapp/WEB-INF/lib 

deployedwebapp.myapp.documentroot=/myapp

deployedwebapp.myapp.autoreloadinterval=30000 

         

        myapp.webapp  

        An XML file that is similar to the web.xml standard for web application 
deployments.  (The PIU document claims that it is the same, but it's not.)  The online 
documentation for Visual Age contains information on it's tags and formatting.  Also, 
Kyle Brown's article discusses it with regard to configuring the WebSphere Test 
Environment on Visual Age for Java - 
http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocument&SubMast=1 
Actually, the configuration for WAS on OS/390 seems to be very similar to the 
configuration for the WebSphere Test Environment in Visual Age for Java. Remember, 
this file MUST be EBCDIC. Here is a complete example file:

<?xml version="1.0"?>

<webapp>

<taglib>

<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>

<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>

<taglib-location>/WEB-INF/struts-html.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>

<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>

</taglib>

<servlet>

<name>action</name>

<code>org.apache.struts.action.ActionServlet</code>

<autostart>true</autostart>

<init-parameter>

<name>application</name>

<value>ApplicationResources</value>

</init-parameter>

<init-parameter>

<name>config</name>

<value>/WEB-INF/struts-config.xml</value>

</init-parameter>

<init-parameter>

<name>debug</name>

<value>2</value>

</init-parameter>

<init-parameter>

<name>detail</name>

<value>2</value>

</init-parameter>

<init-parameter>

<name>validate</name>

<value>true</value>

</init-parameter> 

<init-parameter>

<name>validating</name>

<value>false</value>

</init-parameter>

<servlet-path>*.do</servlet-path>

</servlet>

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

<servlet>

<name>jsp11</name>

<description>JSP 1.1 support servlet</description>

<code>org.apache.jasper.runtime.JspServlet</code>

<servlet-path>*.jsp</servlet-path>

<servlet-path>*.jsv</servlet-path>

<servlet-path>*.jsw</servlet-path>

<autostart>true</autostart>

</servlet>

<servlet>

<name>file</name>

<description>File Serving servlet</description>

<code>com.ibm.servlet.engine.webapp.SimpleFileServlet</code>

<servlet-path>/</servlet-path>

<autostart>true</autostart>

</servlet>

<servlet>

<name>ErrorReporter</name>

<description>Default error reporter servlet</description>

<code>com.ibm.servlet.engine.webapp.DefaultErrorReporter</code>

<servlet-path>/ErrorReporter</servlet-path>

<autostart>true</autostart>

</servlet>

</webapp>

 

Example Directory Structure and File Locations

The directory structure utilized for our application is detailed below. 

/myapp

        index.jsp 

/myapp/WEB-INF

        *.tld files 

/myapp/WEB-INF/classes

        myapp.webapp (EBCDIC)

        ApplicationResources.properties

        Any class files (not in jars) can be located under this directory in 
appropriate package/directory structure.

/myapp/WEB-INF/classes/WEB-INF

        struts-config.xml 

        web.xml 

/myapp/WEB-INF/lib

        jaxp.jar

        parser.jar

        struts.jar

        myapp.jar

/myapp/WEB-INF/pages

        *.jsp

 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to