I am currently developing a simple web application that would apply the MVC architecture. To those new to the MVC term, it stands for Model-View-Controller. An architecture used for simple applications that separates the GUI pages (for end client), the business logic (reusable classes), and the controller (that controls the event or method call). You can easily implement this in Eclipse by creating a new Dynamic Web Application project. Apparently, during the development process, I’ve encountered a simple yet very important problem. My Database related classes can’t locate the classes from Postgre (which is my database system). This is due to the Library from Postgre that my code is looking. The big question now – “How will I add a library in my Dynamic Web Project?” Well, in a simple Java Project, this is easy but for a project of this kind where your sources are placed in a separate directory scheme it is the other way around. I found this thread and it worked: http://dev.eclipse.org/newslists/news.eclipse.webtools/msg11326.html The solution is quite straightforward: The added library should be seen under: ProjectName > Java Resources: src > Libraries > WebApp Libraries. ARMAN
- Right click on the your web project and choose PROPERTIES
- Choose the J2EE Module Dependencies
- Click on the Add External JARs… and then point on your library file (ZIP or JAR)
- Click on Apply then OK.
- Restart your Apache Tomcat
14 Comments
Comments RSS TrackBack Identifier URI
Leave a comment




Hmm, you can just place the needed jars into /WEB-INF/libs and they will be added to the classpath too ?
eherm eherm… ^_^ sori i can’t see anything where i could just leave a message ^_^ eniway~ musta na po ? ^____^
Hello Balder,
Thanks for the info. I tried your suggestion and it worked!
– arman
Thanks Fiona for visiting. It’s been a while since I heard from you. Hope everything is fine with your work now. Please extend my regards to our JPCS and Baste friends.
– arman
@ajison
glad I could be of help
Exactly what I am searching for. What an incredible resource the web ! Thankyou !
You are a live saver
cheers
oh man, i love simple guides for the uber noobs in Eclipse. <3
Thank u so much. i faced this problem for a long time. Now ok la.. thanks a lot
Hi,
It worked (at least for me). Nice post.
Iker.
Hi
I had this problem, I found this post and IT WORKED.
thx
grazie mille!!!
Thanks a lot for sharing …
Excelent! Saved me from pulling my hair out! Thank you!!!