Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214522
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:04:15+00:00 2026-05-17T15:04:15+00:00

Trying to make some small changes to Apache’s Velocity engine. Here’s what I can

  • 0

Trying to make some small changes to Apache’s Velocity engine.

Here’s what I can and can’t do.

I’m making a change to the merge function(). The change I’m making doesn’t matter because I haven’t made it yet. 😉 Right now I am settling for a println statement firing.

I have two references to merge(). If I change the function to mergeBAD() Eclipse tells me that it can’t find merge(). Makes sense right? I used to include in my class build path the two jars that you get when downloading velocity but instead I’ve created a project using the src files provided and used THAT project as a dependency. Again, the fact that is can’t find merge() when I rename it to mergeBAD gives me hope.

But when I am running my web server, hit a breakpoint and step into the merge call, it can’t find the source! I point it to the project yet again, and it “finds” the source, none of the changes I’ve made (specifically the println statements) are hit. They are simply skipped over. 🙁

What on God’s green earth could possibly be causing this? It’s driving me insane. I’ve spent the entire day today trying to figure out what’s wrong. I can’t continue without being able to change Velocity. Exactly what code base is eclipse running the velocity files from?

Many thanks in advance SO! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:04:15+00:00Added an answer on May 17, 2026 at 3:04 pm

    This is a typical case of confusion between build classpath and runtime classpath.

    Your build classpath contains references to your Java project (containing the changes to Velocity)… but I bet your runtime classpath holds references to the original Velocity JAR files.

    Managing build classpath and runtime classpath in Web projects under Eclipse (the WTP – Web Tools Project) has been going through massive changes over the last few WTP releases. We can guide you through. If you physically added Velocity’s JAR files into your WEB-INF/lib, lets start by removing them.


    OK, after you remove the Velocity.jar file from WEB-INF/lib, do the following:

    1. Right-click the project, select “Properties”.
    2. Go to “Java build path”. Select the “projects” tab and make sure that your custom Velocity project (lets call it “MyVelocity”) is NOT there.
    3. Still in “Java build path”, select the “Libraries” tab and make sure that no Velocity JAR is there either.

    By following the steps above, we cleaned your Web-App from any reference whatsoever to MyVelocity (your project) or any other Velocity JAR.

    Now comes the fun part. I will instruct you how to correctly “add” Java projects to Web projects as dependencies.

    1. Still in the project’s properties, go to Deployment Assembly.
    2. Click “Add”.
    3. Select “Project” and then “Next”.
    4. Select “MyVelocity” and make sure that the “Web Library Reference” checkbox is checked.
    5. Click “Finish”.

    Back in the Deployment Assembly dialog, you should now see MyVelocity mapped into WEB-INF/lib/MyVelocity.jar.

    Click OK.

    What we did by that is to map MyVelocity as a WEB-INF/lib dependency. By doing that, MyVelocity is automatically added to the compile-time build-path as well – so it is very important that you don’t add it yourself to the build-path, resulting in duplicate build-path entries.

    Everything should work for you now. Let me know if you have any problems.

    P.S. these instructions are correct if you’re developing a stand-alone WAR project; if your WAR file is a part of an EAR, you may wish (under certain circumstances, for example if MyVelocity is used by other J2EE modules inside the EAR) to map MyVelocity differently, to a common location; if that’s the case, let me know and I’ll elaborate further.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make some small adjustments to a very big website (not
I am trying to make some project in which i want a text box
I am trying to make some edits to a site for a client of
I'm trying to make some input fields that I would like to work like
I'm trying to make some common scopes for models to be sharing, so i
I'm trying to make some text bold using HTML, but I'm struggling to get
I'm trying to make some social share buttons at my site, but the urls
I'm trying to make some communication for my PIC devices and I use UDP
I'm trying to make some kind of top for some game stadistics Table it's
I'm trying to make some utils for using with sqlite databases. For that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.