0

I'm trying to run a java project with open liberty, but the servlet API is not being found.

code

  • I'm using the WebSphere Application Server Liberty Profile v8.5 server and its pointing to a valid open liberty instance.
    2. In the project facets Dynamic Web Module is selected & WebSphere Application Server Liberty Profile is checked.

What is missing?

Update

Here is some extra info.

Java 1.8
OL 21.0.0.11
myeclipse 2020.9.16
Facets: Dynamic Web Module 3.0
Open Liberty Features
<featureManager>
    <feature>javaee-8.0</feature>
    <feature>restConnector-2.0</feature>
    <feature>monitor-1.0</feature>
    <feature>localConnector-1.0</feature>
</featureManager>
Mr Smith
  • 3,318
  • 9
  • 47
  • 85
  • 1
    What *versions* are those selected facets set to? Is `javax.servlet` the package for those versions? – nitind Aug 30 '23 at 01:31
  • If you have a `module-info.java` file, delete it (if needed you can recreate it later via right-click on project and _Configure_) or [in `module-info.java` add the required `requires ...;` statement](https://en.wikipedia.org/wiki/Java_Platform_Module_System#Properties_of_modules). – howlger Aug 30 '23 at 09:09
  • See above for facet info. fyi, this is java 8. – Mr Smith Aug 30 '23 at 12:17

0 Answers0