Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2008, 07:16 AM
Member
 
Join Date: May 2008
Posts: 1
vitalstrike82 is on a distinguished road
Able to find class file in WEB-INF/classes but not after add sub folders in class dir
Greetings,
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
Code:
<?xml version = '1.0' encoding = 'windows-1252'?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"> <description>Empty web.xml file for Web Application</description> <welcome-file-list> <welcome-file> index.jsp </welcome-file> </welcome-file-list> <session-config> <session-timeout>35</session-timeout> </session-config> <mime-mapping> <extension>html</extension> <mime-type>text/html</mime-type> </mime-mapping> <mime-mapping> <extension>txt</extension> <mime-type>text/plain</mime-type> </mime-mapping> <servlet> <servlet-name>VelocityTest</servlet-name> <servlet-class>com.velocity.velocityObj.velocityTest</servlet-class> </servlet> <servlet-mapping> <servlet-name>VelocityTest</servlet-name> <url-pattern>/VelocityTest</url-pattern> </servlet-mapping> </web-app>
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:
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(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
Thanks i n advance

Last edited by vitalstrike82 : 05-13-2008 at 11:22 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not find the main class, program will exit. aryubi New To Java 13 09-30-2008 12:11 AM
[SOLVED] instantiating a class from other classes of different types... olbion New To Java 2 05-05-2008 11:55 AM
How to Merge all classes into One class jazz2k8 New To Java 12 04-23-2008 04:40 AM
[SOLVED] Using classes and overriding one class for another StealthRT New To Java 3 04-08-2008 08:12 AM
cannot find symbol class error po0oker New To Java 5 10-31-2007 03:52 PM


All times are GMT +3. The time now is 11:54 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org