I have now successfully set up the struts example to run in Visual Age 4.0 -
I've collated all the information I learned from the archives and various
other articles and listed the main points to be aware of below.

1. Use the latest IBM XML Parser (3.2.1)

2. Use Xerces 1.4.4

3. Use Tomcat to serve the dtd files - DO NOT reference them from your hard
drive using SYSTEM, this gives a SAXParse exception:

e.g In "struts-config.xml" use something like,
http://localhost:85/struts/dtds/struts-config_1_0.dtd 

    In "web.xml" use something like
"http://localhost:85/struts/dtds/web-app_2_2.dtd";
    (Obviously the port number depends on how you have configured Apache
Tomcat).

However, I still get a message in the console "Not registered, use system
identifier" - I believe this may be a classpath issue (?) as the
ActionServlet declares the dtd file as
/org/apache/struts/resources/struts-config_1_0.dtd. The example still works,
but I'll have to investigate the proper location of the dtds.

4. Put the ApplicationResources.properties in the classpath of the WebSphere
Test Environment using the "Extra classpath" field.
   Also ensure you have "Servlet API classes" and to state the obvious any
other packages you are using (Log4j, protomatter,ldap etc)

5. Ensure that the strutsexample.webapp file uses <init-parameter> rather
than <init-param>
   Also use <name> and <value> rather than <parameter-name>,
<parameter-value>.

6. Add the following to the default_servlet.engine file:
    <websphere-webgroup name="strutsexample">
      <description>strutsexample Webgroup</description>
      <document-root>$approot$</document-root>
      <classpath>$approot$</classpath>
      <root-uri>/strutsexample</root-uri>
      <auto-reload enabled="true" polling-interval="3000"/>
      <shared-context>false</shared-context>
    </websphere-webgroup>


Location of files in Websphere Test Environment:

[...]\project_resources\IBM WebSphere Test
Environment\hosts\default_host\strutsexample\
index.jsp
logon.jsp
mainMenu.jsp
registration.jsp
struts-power.gif
strutsexample.webapp
subscription.jsp
tour.htm

[...]\project_resources\IBM WebSphere Test
Environment\hosts\default_host\strutsexample\WEB-INF
action.xml
app.tld
database.xml
struts-bean.tld
struts-config.xml
struts-form.tld
struts-html.tld
struts-logic.tld
struts-template.tld
struts.tld
web.xml

[...]\project_resources\IBM WebSphere Test
Environment\hosts\default_host\strutsexample\WEB-INF\classes
ApplicationResources.properties


Regards,
Andrew Fairburn.



-----Original Message-----
From: corrado agusto [mailto:[EMAIL PROTECTED]]
Sent: 13 March 2002 21:02
To: Struts Users Mailing List
Subject: Re: Visual Age 4.0, WebSphere Test Environment and struts


Hello Andrew,

Tuesday, March 12, 2002, 12:37:17 PM, you wrote:

AFvcu> Does anyone have a good basic tutorial on setting up a struts
application
AFvcu> within Visual Age 4.0? 


AFvcu> I have Xerces 1.4.4 in my workspace and the IBM XML Parser that comes
with
AFvcu> VAJ 4.0 - I have tried a newer version of the IBM XML Parser (3.2.1)
but
AFvcu> this did not fix the problem.

I read that ibm Xml parser is not compatible with Struts, but it's
still needed to make Tomcat Test Environment run properly.

I'm sure a few workarounds were posted on this list, have you tried a
search, don't you ? :-)

In my hd, I found only following suggestion from
[EMAIL PROTECTED] , try retrive entire thread from archive.

>What I have done to get round problems like these is to :=
>1 Export IBM XML Parser for java to a directory - MY_IBM_XML
>2.Remove all the OMG packages from the directory.
>3. Remove the IBM Xml Parser from the Workspace
>4 Craete a new project IBM XML Parser - OMG
>5 Emport the MY_IBM_XML directory into this project
>6 Create a new project for Xerces
>7 5 Emport Xerces into this project






-- 
Best regards,
 corrado                            mailto:[EMAIL PROTECTED]


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

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

Reply via email to