aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse - exporting files in WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse - exporting files in WAR file" Watch "Eclipse - exporting files in WAR file" New topic
Author

Eclipse - exporting files in WAR file

Greg Soulsby
Greenhorn

Joined: Feb 01, 2011
Posts: 9
I have my Eclipse project working nicely in dev. (actually myEclipse)

But after deploying to my ISP via a WAR file it fails as it cant find the mail.java class.

Within Eclipse I copied mail.java into /scr. Within the deployed webapp is ends up in /WEB-INF/classes, which is not in the class path.

When I copy or move mail.java to /lib then the app runs.

I put the mail.jar into /lib within Eclipse but it was not copied at all when deployed via WAR file.

So what could be happening that they are not deployed? How come a file in /scr directory ends up in /class when you deploy by WAR?

Thanks.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40027
    
  28
Don’t know. Sorry. I shall move this discussion to our IDEs forum, because that appears to be an IDE-related question.
Richard Bell
Greenhorn

Joined: Oct 20, 2011
Posts: 4

Are you using ANT to create your WAR file?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

If you created a Dynamic Web Project, then you should place the mail.jar in WebContent/WEB-INF/lib


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse - exporting files in WAR file