0

I am interested in understanding this code, but I am not sure how to get IntelliJ to be able to use Tomcat's PoolProperties. If it were an external library such as the Connector/J or a JSTL library, I might be able to figure it out, but since a web program is already using Tomcat, I am not sure. Should I be using the Project Structure menu to add a Tomcat library?

1
  • try using Maven to achieve the same. Commented Mar 1, 2019 at 20:08

1 Answer 1

1

That depends on the project's dependency management tool you're using. If it's Maven or Gradle, you just need to register the dependency Tomcat JDBC

<dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-jdbc</artifactId> <version>9.0.16</version> </dependency> 

Or for Gradle

implementation 'org.apache.tomcat:tomcat-jdbc:9.0.16' 

Remember to pick a version which is compatible with the Tomcat web server version you're using.
Look at MvnRepository.

If the process of adding dependencies is manual, you need to add the JAR file via the IDEA Module settings. You'd also need to manually copy that JAR to the build artifact (e.g. the WAR file), under the appropriate directory.

Sign up to request clarification or add additional context in comments.

2 Comments

You can also add dependency for source code. that you enable you to step into tomcat code base.
@ringadingding that module might not be part of a standard Tomcat installation.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.