wood burning stoves*
The moose likes Websphere and the fly likes Problems while importing an Struts-based  .war from Tomcat to WSAD 4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Problems while importing an Struts-based  .war from Tomcat to WSAD 4" Watch "Problems while importing an Struts-based  .war from Tomcat to WSAD 4" New topic
Author

Problems while importing an Struts-based .war from Tomcat to WSAD 4

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi !
I have a simple Struts-based web application runnink ok with Tomcat 4 and I�m trying to import its war file to WSAD 4, but something wrong happens and all I get is the following messages (after proceeding with the File-Import-War File...) :
"Error importing Module File" and in the Console view I get "CHKJ3008E:Invalid WAR File".
Is there any configuration or adaptation to be done before criating the war file under Tomcat directory ?
Does anybody have an idea ?
Thanx,
F�bio
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
Was it perchance created under the Servlet 2.3 spec? WAS and WSAD 4.0 only supports Servlet 2.2.
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.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Tks Kyle !
In fact , there�s nothing special about this application. It�s quite simple . The whole app has 4 .jsps... and a couple of classes... The only �sophistication� is Struts... Although it runs under Tomcat 4.1xx which implements the Servlet 2.3 spec, apparently it doesn�t make use of special features that are only present in the 2.3 spec, so , I don�t think this might be the case...
But supposing it is... would it malfunction or just fail while importing the .war file ?

Tks !
F�bio
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
The issue is that each WAR file has as the first line of the web.xml file a declaration of which servlet specification it was built under. If it's a servlet 2.3 WAR it won't import into WAS until you change it back down to a Servlet 2.2 WAR.
Kyle
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Ok .
I�ve checked the web.xml and the specification use in my app is the servlet 2.2 ...
To tell you the truth , I�ve imported the struts-example.war just to test ... And , although the import process had been ok, I got the following message while attempting to run the start page (index.jsp) :
"Cannot find message resources under key org.apache.struts.action.MESSAGE"
And this is the second app where I get this message. Do you have an idea of what the problem is ?
Once more, thanx 4 your attention...
F�bio
Vis Deo
Ranch Hand

Joined: Jul 02, 2004
Posts: 40
How did you resolve this problem? I am also in the same boat with wsad 5.0

Thanks,

Vis
Joe Edwards
Greenhorn

Joined: Jul 12, 2003
Posts: 2
In WSAD, all your properties files must be present under <project>/Web Content/WEB-INF/classes. Make sure you recreate the full path within this folder, as .properties files are located in the same way as .class files.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems while importing an Struts-based .war from Tomcat to WSAD 4
 
Similar Threads
import WAR problem
Struts and WSAD
abstract schema name is not defined
Struts with WSAD 5.0?
How to call external WAR file in J2EE Project using WSAD 5.1.1