Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse - exporting files in WAR file

 
Greg Soulsby
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48917
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
Firefox Browser Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using ANT to create your WAR file?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you created a Dynamic Web Project, then you should place the mail.jar in WebContent/WEB-INF/lib
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic