0

My Java project has multiple JSP (view) pages, which either insert into or query a database. I created the main page and links to each JSP.

I am unsure whether I should put each component of the project (MVC pattern with jsp, servlet, a Java file) into its own web application and its own war file for uploading to the web server. Is this a proper way to build my web project?

If I did this, each component/application would need their own JDBC driver, which seems redundant. I could also group the insert pages together in one application and the query pages in another - would that be a better way to proceed?

Cel Skeggs
  • 1,827
  • 21
  • 38

1 Answers1

0

I don't see any problem building your war like that, but I prefer using some kind of building tool like Maven, Gradle, etc..

Anyway, If it is a simple dynamic web project with eclipse, you can just put your jdbc driver under your WebContent -> WEB-INF -> lib.

This way, the jdbc driver will be available in your classpath so that basically every java class in your project will be able to use it.

Minjun Yu
  • 3,497
  • 4
  • 24
  • 39