.jsp文件不适用于Google App Engine留言板教程 [英] .jsp file not working for Google App Engine guestbook tutorial

查看:133
本文介绍了.jsp文件不适用于Google App Engine留言板教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注Google App Engine教程,而且.jsp文件有问题。以下是Google的代码:使用JSP 。我正在使用Eclipse构建我的项目,并且由于某种原因,当我将 guestbook.jsp 文件添加到war目录中时,它立即获取一个红色的错误图标。我也不能双击打开guestbook.jsp。这里可能发生什么?

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 project, and for some reason when I add the guestbook.jsp file to the war directory, it instantly gets a red error icon. I can't double click to open guestbook.jsp either. What could be going on here?

推荐答案

最后,我似乎已经浪费了我的赏金,因为我自己找到了解决方案(有一点帮助)。

In the end I seem to have wasted my bounty as I found the solution (with a little help) myself.

问题出现因为我不熟悉Eclipse。当我发现更详细的错误消息您的项目必须配置为使用JDK才能使用JSPs guestbook.jsp
它位于Eclipse窗口底部的窗格中,名为Markers标签。

似乎Eclipse没有意识到我已经安装JDK。

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.

在Eclipse中,我进入菜单 Window-> Preferences-> Java->已安装的JRE 。 Eclipse只有一个条目名为 jre6 我点击了添加... 按钮选择标准VM 并浏览到jdk的基本目录(在我的情况下 C:\Program Files\Java\jdk1.6.0_20

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)

我重建了我的项目,但同样的错误在那里。我忘了检查一下告诉Eclipse使用jdk而不是jre的方框。

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很快,就像Eclipse那样重建我的项目,错误消失了。

As soon as I did that Eclipse rebuilt my project and the error was gone.

这篇关于.jsp文件不适用于Google App Engine留言板教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆