Eclipse does not work with JSP

I am following this tutorial about using the Google engine API to build a web application. When I add a file with the suffix .jsp to my war folder, the project will no longer compile. enter image description here

What is the reason? If you need more information, just leave a comment. Thanks.

+4
source share
2 answers

Could it be that I canโ€™t compile because I didnโ€™t download Eclipse for Java EE Developers, but only Eclipse for Java Developers?

I'm not sure. I see <Java EE> in the title bar of your Eclipse screenshot, which is typical for Eclipse developers for Java EE. So you have the correct version. If you can do File> New> Dynamic Web Project, then you definitely have a version of Java EE, or at least one with WTP. For more information, see Help> About Eclipse.

error in the Markers tab: "Your JDK must be configured to use JSP in your project"

You need to install JDK. Go to the Java SE download home page and click the leftmost of the four large buttons. To do this, go to Eclipse on Windows> Preferences> Java> Installed JREs, select the existing JRE, click "Edit" and give the JRE home path the JDK folder.

+6
source

He asks you if you want to work even if he finds errors in the project. First, what mistakes can you fix? Eclipse gives pretty good error messages. If the errors are correct, disable them in the project settings, then try to start the project again.

Otherwise, double-check that you are using the exact code from the tutorial. Copy the code from Google and save it in a separate file. Then select your file and the new file, right-click on the two files and use the Eclipe comparison file to show you if you missed something.

[edit] You can install the EE version in another directory. The various versions of Eclipse go great with each other, they are simply huge. Do not import the project into the EE workspace. It appears as a simple Java project, and you need a web project. Create a new Web / JSP project, and then copy the files.

0
source

All Articles