Hi,

I am having a tough time trying to install Struts on WebSphere Application
Server 3.5.3 Advanced under Windows NT.
Has anyone tried installing Struts in Windows NT with Websphere Application
Server 3.5.3 Advanced?

I followed exactly all the instruction given in
http://www.husted.com/about/struts/FAQ/installation.htm  for Windows 2000
platform  (as attached after ==== below ) but still could not get it to
work!  I am getting errors like "Cannot find ActionMappings, etc...
According to the attached description, I am still  still bombing on the
struts-config issue that Richard discovered.
The fix proposed below could not fix my problem.

Can someone tell me who Richard is? What is the issue he discovered? What
is the solution if available?
Where can I get relevant information for solutions? Your help is highly
appreciated!

Regard,

George Lee

========================================================================================
Installing on WebSphere 3.5.3
[Chris Assenza] After quite a bit of effort, I have finally gotten the Struts example 
to work flawlessly in WebSphere 3.5.3.
What's funny is that I was reading your post Richard and was thinking to myself: "Gee, 
I've done ALL of this EXACTLY --
in fact I'm even on the same OS, just different drive letters, WHAT could be wrong??" 
Then it hit me, looking through your
 steps  below I found the one thing that was different that had completely slipped 
through - jaxp 1.0.1. I was using jaxp 1.1.1!!
Crimson is a separate jar now, that includes the stuff from parser.jar, but it 
apparently does something different then 1.0.1
and it was just screwing everything up! I downloaded 1.0.1 and got significantly 
further then I ever have, but ran into another
 problem. WebSphere reported that the public identifiers for the DTD's were malformed 
URLs. Luckily, I saw on another
mailing list an issue with WebSphere & Struts not liking PUBLIC DTD refs, so I changed 
them to SYSTEM and away it flew -
flawlessly.

For those people who run into these issues (and because I have to document it for work 
anyway - here is Richard's list again
revised with more detail on some of the bugs I encountered. (BTW, adding web to the 
classpath did not help me, I had to
move it to the servlets directory).

Server: Windows 2000 Server with WebSphere 3.5.3 Advanced

Start up the adminserver.
Start up Admin Console.
Use the Convert War file task to convert the struts-example.war from the struts-b1 
distrib as-is.
Convert to the default_server, default servlet engine and standard install directory
(c:\websphere\appserver\hosts\default_host).
Create a WEB-INF directory in the servlets dir and copy struts-config.xml, 
database.xml AND web.xml into it (Keep WEB-INF
with all the TLD's under web - both WEB-INF directories must be present).
Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and parser.jar to the servlets directory of 
the strut-example webapp.
In the servlets directory, open struts.jar with WinZip. Extract the three DTD's 
(struts-config_1_0.dtd, web-app_2_2.dtd
and web-app_2_3.dtd) into the servlets directory making sure you use folder names (so 
the files extract to servlets/org/apache/struts/resources).
Click on struts-example in the Admin Console under Default Server/Default Servlet 
Engine and click the advanced tab on the
right hand side of the screen.
Down where it says Default Error Page, enter /ErrorReporter and then click Apply.
Start the Default Server via the Admin Console. You should see a whole bunch of 
ActionServlet messages in the default_host_stdout.log file with no
exceptions.
Via a browser accessed the app using http://localhost/struts-example/index.jsp.
If it returns "Application not Available" then go back to the Admin Console, 
right-click on struts-example and select Restart WebApp.
Once it reports success, go back to the URL above and try again - it should work 
flawlessly.
For whatever reason, some installations do not like XML files that reference PUBLIC 
DTD's - if in looking at the default_host_stdout.log file you see
errors about invalid public URL references during DTD registrations, or if your pages 
say "cannot find //logon or //saveRegistration (ie. action
mappings) then do the following:

Stop Default Server
Go to servlets\WEB-INF\ and edit web.xml and struts_config.xml.
In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and completely
remove the line that reads "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
from web.xml and remove "-//Apache Software Foundation//DTD Struts Configuration
1.0//EN" from struts-config.xml.
Save these changes and go back to step 10 above.
Just as a troubleshooting guide -

If you are getting errors like "Cannot find ActionMappings, etc..." or "Cannot find 
key org.apache.struts.MESSAGE"
 then your application is most likely still bombing on the struts-config issue that 
Richard discovered. The above steps
 SHOULD correct that leaving nothing out. If you are getting 404 errors about //logon 
or something not found, then you are
still having XML config troubles and it is not initializing the Action servlet 
properly. Follow the steps above in regards to
 DTD's and it should work.

As a final thought, I obviously haven't gotten to test too much but I don't believe 
that there are ANY coding changes that
need to be made to the actual struts source. Everything about getting it to work in 
WebSphere has been a WebSphere
configuration issue thus far (and I don't think I'll be having any more).

Thanks for your help Richard and I hope others benefit from this as well! :)


--------------------------------------------------------------------------------



*******************************************************************************
This communication (including any attachments) may contain privileged or confidential 
information intended for a specific individual and purpose, and is protected by law.  
If you are not the intended recipient, you should delete this communication and/or 
shred the materials and any attachments and are hereby notified that any disclosure, 
copying, or distribution of this communication, or the taking of any action based on 
it, is strictly prohibited.  Thank you.

Reply via email to