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 3609898
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:41:07+00:00 2026-05-18T21:41:07+00:00

I am relatively new Java developer that’s been thrown in the deep end, my

  • 0

I am relatively new Java developer that’s been thrown in the deep end, my usual skillset lies in Microsoft products and C#.

However I have managed to write a nice web service using Restlet and incorporating Toplink and doing some database CRUD stuff, etc etc.

I developed this in Eclipse against Tomcat 5.5. I followed tutorials and examples and managed to throw something together that works.

I had all my jar files in WebContent/WEB-INF/lib directory of my project – I soon realised that when I export this as a WAR file and deploy in Tomcat, it takes these jar files with it and stores them local to the application.

Fine, but then when you try to undeploy the app, it only does it partially as Tomcat “holds on” to some of the jars it was using i.e. the Oracle JDBC, and Toplink ones. This makes sense as the web service was using these jars as there was a live Oracle connnection going on.

So then I thought I should have all these jars in a common place where all deployed apps can access them, that folder I believe is:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib

(in my case). This made total sense, it’s logical as you don’t want loads of apps on Tomcat all referencing the same jars. So I removed all the jars out of my projects lib folder and put them in the common\lib directory.

Now my app will not work properly – it can’t find my source code in src, the custom bespoke code that I have programmed against these jars. It will only work if I jar up my source code and put in the directory stated above. Odd.

I am obviously very confused with class paths and build paths and all of that stuff, and must have got this sort of stuff all wrong as I am no Java expert, as I readily admit I have pretty much hacked this together – so can anyone explain to me in laymans terms how I should structure my project to get it working with jars held in a common folder in Tomcat. Or are there any good resoureces on the web to help explain to me what I should do.

Hope this all makes sense…

Here is a pic of my current project:

alt text

  • 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-18T21:41:08+00:00Added an answer on May 18, 2026 at 9:41 pm

    Sounds like you are not using WTP web project.

    If you’ve installed ‘Eclipse IDE for Java EE Developers’ flavor of Eclipse, the WTP is already bundled in there. Otherwise here its update site -> http://download.eclipse.org/webtools/updates

    Once you’ve installed WTP you should create ‘Dynamic Web Project’.
    In general I would recomment to put only your presentation layer here ( JSPs, CSS, HTML ) and put all pure java projects into standard ‘Java’ project that you later add as a dependency to ‘Dynamic Web Project’.

    WTP can run your web application under a number of containers, fortunately Tomcat is supported.
    You will need to configure it through Window->Preferences->Server->Runtime Environments.

    Once runtime envirnonment is configured, you can create your server runtime:

    1. Right click in ‘Servers’ view.
    2. Choose New->Server
    3. Select server type: ‘Tomcat v.5.5 Server’
    4. (Optional) Change server name to whatever makes sense for you
    5. Select server runtime environment: This is the Runtime Environemtn that you have configured previously
    6. Hit ‘Next’ button
    7. Add your ‘Dynamic Web Project’ project to ‘Configured projects:’ panel
    8. Hit ‘Finish’ button

    After the server is configured you can just run it, or you can put it in Debug mode. All source code referenced by dependent projects will be available for debugging.

    NOTE:
    From personal experience, I would not recommend using common/lib. Put all the jars that your web application relies upon into its WAR file. If you are worried about dependency tracking then start looking into Maven and m2eclipse.

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

Sidebar

Related Questions

I'm a .NET and Java developer who is relatively new to threading. I'd like
I'm relatively new to java (specifically swing) and have recently been making some fairly
I'm a relatively new java programmer and I've been tinkering around with this program
I mostly use Java and generics are relatively new. I keep reading that Java
I'm relatively new to Threading in Java and I've noticed that everytime I use
I'm relatively new to Java and I'm still trying to understand the fundamentals. I
I'm still relatively new to Java and Android development, so I'm still unfamiliar with
I'm relatively new to Java and would appreciate any help on this! I have
Like lots of askers on SO, I'm relatively new to java and have attempted
I am relatively new to Objective-C and I am coming from a Java background,

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.