【问题标题】:The resource not available error in eclipse ,jsp and tomcat and mysqleclipse、jsp、tomcat和mysql中的资源不可用错误
【发布时间】:2012-01-09 06:00:09
【问题描述】:

我正在使用 eclipse indigo(javaEE) 和 apache tomcat 7.0.23。 jsp代码

pstatement = connection.prepareStatement(queryString);
pstatement.setString(1, name);
pstatement.setString(2, city);
pstatement.setString(3, phone);
updateQuery = pstatement.executeUpdate();

the requested resource jsp1/prepared_statement_query.jsp is not available 给出错误。

简单的.jsp 文件正确执行并显示连接成功,但不能插入数据库。不知道是数据库连接有问题还是服务器运行有问题?

【问题讨论】:

  • 对不起,我没有为代码添加标签。!
  • 您是否在页面中包含其他一些 JSP jsp1/prepared_statement_query.jsp
  • no.its 唯一的 my_try_conn.jsp 文件,是的,错误是 404
  • 在 JSP 文件中而不是在 Java 类中编写 Java 代码确实并不总是会生成非常有用的问题指示符。这也是一种不好的做法。

标签: eclipse jsp tomcat


【解决方案1】:

是 404 错误吗?文件“prepared_statement_query.jsp”不在它应该在的地方吗?

如果错误是 - “404 Requested Resource Not Found”,则在适当的位置找到文件。

并请发布完整的堆栈跟踪,以便更好地理解问题。

【讨论】:

  • 是的。它的 404 错误。无论如何我应该将该文件放在哪里?我执行了简单的代码而没有将它放在任何地方,因为我正在使用 eclipse?
猜你喜欢
  • 2015-12-09
  • 1970-01-01
  • 1970-01-01
  • 2013-11-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多