This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was it perchance created under the Servlet 2.3 spec? WAS and WSAD 4.0 only supports Servlet 2.2.
Kyle
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you resolve this problem? I am also in the same boat with wsad 5.0

Thanks,

Vis
 
Joe Edwards
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic