Results 1 to 2 of 2
  1. #1
    robbie2 is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default WebContent/WEB_INF/classes

    My question has to do with path: WebContent/WEB_INF/classes

    My understanding of these directories are the following:

    WebContent the folder contains contents of the WAR file that will be published to the app server. It contains all Web resources including HTML files, JavaScript, JSP files and graphics needed for the application,

    WebContent/WEB-INF the folder contains the supporting Web resources for a Web application, including the web.xml deployment descriptor file and the classes and lib directories. The web.xml file contains general information about the Web application, including Servlet mappings, security information, and the welcome page.

    WebContent/WEB-INF/classes - The WebContent/WEB-INF/classes folder contains servlets, utility classes, and the Java compiler output directory. The classes in this directory are used by the application class loader to load the classes. Folders in this directory will map package and class names. The .class files are automatically placed in this directory when the Java compiler compiles the source files from the source directory. Any files placed directly in this directory will be deleted by the Java compiler when it runs.

    OK - thats some decent information. That said - one area that has me confused is the classes directory. How is the directory populated? Or what is the process? You have multiple classes here how are they created? Utility classes - how? Are they created from the java source code files? Can they be documented (via APIs)?

    Consider this a newbie question coupled with a brain hiccup.

    Any comments offered here would be appreciated - thanks...

  2. #2
    FON is offline Senior Member
    Join Date
    Dec 2009
    Belgrade, Serbia
    Rep Power


    Nothing to worry about.

    Your IDE does it for you.

    When you create web project it has some predefined structure (there is actual specification for this).

    Yours is just to write src code in "src" folder and behind scenes code is
    compiled and put where project structure need it.

    So just write all your source code for classes, beans, and servlets, utils in src
    using packages u need and compiled code will end up in some default ouput folder like "build\classes"

    Later just use Project=>Export=>Web=>WAR
    create your web archive file and place it in web server to run your application.

    good luck!

Similar Threads

  1. Three classes help!!
    By arrech326 in forum New To Java
    Replies: 4
    Last Post: 11-24-2009, 07:34 AM
  2. to retrieve the webcontent from another page source
    By rameshsathasivam in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-25-2008, 09:41 AM
  3. Get name of available classes
    By escuja in forum CLDC and MIDP
    Replies: 0
    Last Post: 07-26-2008, 01:03 PM
  4. Cant run my classes
    By Assaf A in forum Eclipse
    Replies: 1
    Last Post: 04-22-2008, 03:31 PM
  5. Using a JAR from other classes
    By Joe2003 in forum Advanced Java
    Replies: 1
    Last Post: 01-02-2008, 08:08 PM

Posting Permissions

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