I\'ve been following the Google App Engine tutorials, and I\'m having a problem with the .jsp file. Here is the code from Google: Using JSPs. I\'m using Eclipse to build my
Even after all these other techniques failed (include <%@ taglib prefix="fn" etc; ensure JRE is in project build path; ensure Eclipse Java preferences associate correct JRE with compatible Execution Environment; import jstl-1.2.jar into project and add to project Build Path JARs)... I restarted Eclipse and all was well. Except my decreasing respect for Eclipse's overall integrity.
In the end I seem to have wasted my bounty as I found the solution (with a little help) myself.
The problem arose because I was unfamiliar with Eclipse. When I found the more verbose error message Your project must be configured to use a JDK in order to use JSPs guestbook.jsp
.
It was located in a tab called 'Markers' in pane found at the bottom of the Eclipse window.
It seems that Eclipse wasn't aware that I had installed the JDK.
In Eclipse I went to menu Window->Preferences->Java->Installed JREs
. Eclipse had only one entry there named jre6
I clicked the Add...
button Chose Standard VM
and browsed to the base directory of the jdk (in my case C:\Program Files\Java\jdk1.6.0_20
)
I rebuilt my project but the same error was there. I had forgotten to check the box that tells Eclipse to use the jdk instead of the jre.
As soon as I did that Eclipse rebuilt my project and the error was gone.
Buddy
It'simple just select project->rightclick->properties->java Build path->select your jre->edit->alternate jre->select your jdk there.
So simple right.
One more thing that you have to do is to change is (Project facet) select perhaps it will ask for apply then apply if it didn't then change java level(check box) to 1.6 or 1.7 the jdk you have selected.
cheers.... Parveen Verma
Eclipse wasn't aware that you have installed the JDK
.
So In Eclipse go to menu Window->Preferences->Java->Installed JREs . Eclipse has only one entry-jre6
click the Add button Choose Standard VM and browse to the base directory of the jdk (in my case C:\Program Files\Java\jdk1.7.0_45
)
In my case these steps not enough, still i had error.
So I included these steps too.
Step 1: I copied the jdk1.7.0_45
folder from program files, and pasted it in to my workspace (D:\workspace
) and Renamed the folder jdk1.7.0_45
to JDK
inside the workspace.
Step 2: And added these lines
-vm
C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe
At the beginning of the eclipse.ini
file.
This file will be inside your eclipse folder.
The type of file is: Configuration settings (.ini)
(Note: Add these lines, Other than this don't change anything in this file)
After these steps my error was gone.
3 Suggestions:
Make sure you have this in web.xml:
<welcome-file-list>
<welcome-file>guestbook.jsp</welcome-file>
</welcome-file-list>
Have Project-->Build Automatically enabled, I deployed a Java app on AppEngine long time back and I see a classes
folder in the WB-INF folder which has the class of the servlet and the META-INF folder.
I just cannot believe what happened. All the time I had one row that was something like : 1 open-jdk-7 and one row on second place 2 oracle-jdk-7 The second row was selected the whole time, I restarted, tried to uncheck and check again. Tried every possible combination. In the moment I deleted the first row the things are fixed :). Crazy huh