Results 1 to 3 of 3
  1. #1
    rhaglennwr is offline Member
    Join Date
    May 2014
    Posts
    1
    Rep Power
    0

    Default when is a .war file is not a .war file?

    I am new to jsp's, but not to java. I've notice that if I upload a .war file to a server I get varying results depending on how the .war file is created. For example if I use a windows command prompt to execute "jar cvf project.war *" it will work about half the time. But, if I use the .war file that netbeans produces, it always works. Just out of curiousity why would this be? Thanks for listening.

    rhaglennwr

    to answer my own question, it's because creating it at the command line doesn't take the class files with it. By the way, I've been letting the .war file expand in the /web directory which I thought was the correct way to do this. So, why is not including the class files?
    Last edited by rhaglennwr; 05-23-2014 at 01:12 AM.

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: when is a .war file is not a .war file?

    Hi,

    you called jar as a normal archiver. So just check where you are and what files you copied. Also be aware that you did a compile before so that the classes are at the defined location and are up to date. (So in my projects the source is in src and the class files are in bin. If you have it like that then be sure to call that command in bin and not in src.)

    My suggestion is to read up about war files and what servers expect in there. And then make sure that you included everything that is required.

    Konraf

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,260
    Rep Power
    6

    Default Re: when is a .war file is not a .war file?

    I smell a little bit of tool blaming and not enough self-blaming in this thread. "Why is not including the class files" -> translate that to "what am I doing wrong so it is not including the class files" . And that question is answered by reading the manual of the tool.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 1
    Last Post: 03-17-2014, 03:03 AM
  2. Replies: 0
    Last Post: 12-31-2013, 06:46 AM
  3. Replies: 1
    Last Post: 07-28-2011, 08:50 PM
  4. Replies: 8
    Last Post: 02-18-2010, 01:54 PM
  5. Replies: 0
    Last Post: 02-11-2009, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •