Intellij 9 and plain Java webapps
In Intellij 8
- Create a plain Java Webapp
- New project - Java Module
- [Src Directory] - Accept default
- Select 'Web Application' (2.5)
- Finish
This results in a project skeleton. In the ./src directory, open the context menu and select New > Servlet. Enter the minimum information and accept the defaults.
The file created will compile - indicating that the jar containing the javax. servlet support (or at least APIs) is correctly and automatically configured in the compile-time classpath.
In Intellij 9
- Create a plain Java Webapp
- New project - Java Module
- [Src Directory] - Accept default
- Select 'Web Application' but nothing else
- Finish
This results in a project skeleton. In the ./src directory, open the context menu and select New > Servlet. Enter the minimum information and accept the defaults.
The resultant java servlet code does not complie, indicating that it cannotf find the javax.servlet classes (i.e. jar behind the scenes)
If I copy,load and configure javaee.jar (from an 8.1 release) as a library for the project. the compile errors go away.
Is this the acceptable solution in Idea 9 or is there some other configuration option that needs to be set?
请先登录再写评论。