aspose file tools*
The moose likes Websphere and the fly likes 3.5 -> 4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "3.5 -> 4.0" Watch "3.5 -> 4.0" New topic
Author

3.5 -> 4.0

Chris Roper
Greenhorn

Joined: Nov 25, 2002
Posts: 17
Hi folks.
I've been thrown in at the deep end. We have an application running on Websphere 3.5 - unfortunately the guy who developed it all has left the company, leaving no documentation of use....
We need to get the application up and running on 4.0, and that is my task.
I've spent the last few weeks bumbling around, but with little success...
I've used the AAT to assemble the application (without ever being 100% sure about what I was doing), and managed to get it up and running (ie. you can get to the first page, and it finds the correct Servlet when I press Enter), but am experiencing a few problems:
.gif files not being found on the web pages (I included them when assembling the application). I've tried putting them everywhere, but they just don't get picked up.
a file that is being access by a Java Class cannot be found (again, this file was included in the assembly).
Any help would be greatly appreciated, either about these specific problems or general 3.5 -> 4.50 migration.
Cheers
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
1) The .gif files not being loaded -- What is your 'root context' for your application? And what version of WAS are you using. If your root context is "/" and version is before 4.0.4, you may need to either upgrade or change your root context (or use the support page to find a work-around).
2) The file not being found -- Do you mean like a .properties file? In WAS 3.5, you used to set a 'Working Directory' on the Application Server page. You do the same in WAS 4.0, but the application server page is a little deeper down the tree. There is now a 'Application Servers' folder underneath the node, and your application should be listed there. Your Application Server has a 'Working Directory' property which you can set by navigating to the application server, then editting in the 'General' tab.
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
One further note about your .gifs. On 3.5 you could set the doc root to point to your image files and such. I think that as long as your images are in a directory relative to the context root, it should find them. If worst comes to worst, put them in the IBM HTTP Server/htdocs directory.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Chris Roper
Greenhorn

Joined: Nov 25, 2002
Posts: 17
Thanks for the help. I have managed to get my .properties file found.
But I'm still having problems with the images.
In my .war, I have (amongst others) the following directories:
JSP
Images
Includes
Now, my JSPs import html from Includes - this happens no problem. The html in Includes imports images from Images. However, they are never found.... I've tried everything I can think of - putting them in http/htdocs didn't work either.
If I open the html from the desktop, the gifs are all present and correct, it's just the JSPs can't find them when accessed via Websphere.
Cheers,
Chris
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
In the configuration of your WAR file, make sure that in the AAT you set the flag that leaves file serving turned "on". You should then be able to have the browser obtain the GIF files from the WAR file through WebSphere.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
One more thing -- what URL is your HTML looking for the GIF files at? That is, could you post a sample "image" tag here in Javaranch to show us what directory the browser is requesting?
Kyle
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
If you are trying to access your .gif files as
<pre>
http://my.server.com/Images/myImage.gif
</pre>
as opposed to
<pre>
http://my.server.com/myWebApp/Images/myImage.gif
</pre>
This is a problem in WebSphere 4.0.3 and older.
Another thing to look out for -- If you are in Windows, remember that everything serverd from a .war file is case sensitive. So if you called it /Images/myImage.gif in the .war file, it won't be able to find /images/MyImage.gif from an HTTP request.
Chris Roper
Greenhorn

Joined: Nov 25, 2002
Posts: 17
Thanks for all the help guys.
I eventually figured it out.
The .html files were referring to the .gifs as "../images/pic.gif". This was fine when accessing the html straight from the desktop, but wouldn't work in the application.
However, I changed them all to "images/pic.gif" and moved the images folder and now it's all fine. Now, I don't know if this is the best solution or whatever, but it worked so I'm happy....
I'm getting there!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 3.5 -> 4.0
 
Similar Threads
Access XML files from servlets
Merant
Was 3.5 and 4.0 on same computer
how do you load images from a jar file for image buttons?
Websphere 4.0 AES connection to as/400