Results 1 to 1 of 1
  1. #1
    vitalstrike82 is offline Member
    Join Date
    May 2008
    Rep Power

    Default Able to find class file in WEB-INF/classes but not after add sub folders in class dir

    i'm now struggling with velocity for a day now. Currently i am able to run velocity when the class file is in WEB-INF/classes directory.

    However, my project need to add in sub directories in the classes folder for easier management.

    eg: WEB-INF/classes/com/velocity/velocityObj/<the class file in here>

    This is my web xml
    Java Code:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="" xsi:schemaLocation="" version="2.4" xmlns="">
        <description>Empty web.xml file for Web Application</description>
    I have state in the servlet class tag: com.velocity.velocityObj.velocityTest.

    Previously when the class file is in the WEB-INF/classes directory, my servlet tag is this: <servlet-class>velocityTest</servlet-class>

    What can i edit to the tag to read the class file:?

    This is my error:
    Java Code:
    11:37:28,753 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.2.2.GA/server/default/deploy/velocity.war/
    java.lang.NoClassDefFoundError: com/velocity/velocityObj/velocityTest (wrong name: velocityTest)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(
    Thanks i n advance
    Last edited by vitalstrike82; 05-13-2008 at 10:22 AM.

Similar Threads

  1. Could not find the main class, program will exit.
    By aryubi in forum New To Java
    Replies: 39
    Last Post: 02-19-2010, 11:02 AM
  2. Replies: 2
    Last Post: 05-05-2008, 10:55 AM
  3. How to Merge all classes into One class
    By jazz2k8 in forum New To Java
    Replies: 12
    Last Post: 04-23-2008, 03:40 AM
  4. Replies: 3
    Last Post: 04-08-2008, 07:12 AM
  5. cannot find symbol class error
    By po0oker in forum New To Java
    Replies: 5
    Last Post: 10-31-2007, 03:52 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