初学webservice,帮忙看一下!

jiangsmile 2005-03-02 09:50:36
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address

...全文
123 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
usabcd 2005-09-10
  • 打赏
  • 举报
回复
多半是jdbc驱动找不到,web server的日志文件可以看到错误信息
lovelanzhi716 2005-09-09
  • 打赏
  • 举报
回复
没捕捉异常吧
vvpang 2005-09-09
  • 打赏
  • 举报
回复
先支持一下楼主。。再看问题。。
jiangsmile 2005-09-09
  • 打赏
  • 举报
回复
谁回复给谁分,要结老贴了。问题自己解决
jiangsmile 2005-03-02
  • 打赏
  • 举报
回复
刚才错误自行解决,但又报下面错误
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request

代码如下
<%@ page contentType="text/html;charset=gb2312"%>

<%@ page import="java.lang.*, java.io.*, java.sql.*, java.util.*"%>
<html>
<head>
<title>数据库测试
</title>
</head>
<body>

<%
//Error reading data from static cursor cache.

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
//Connection conn=DriverManager.getConnection
String url="jdbc:microsoft:sqlserver://localhost:1433;selectmethod=cursor;DatabaseName=yiyaonew";
String user="sa";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

String sql="select top 5 namec,kind from nsaler";

ResultSet rs=stmt.executeQuery(sql);

while(rs.next()) {%>

您的第一个字段内容为:<%=rs.getString(1)%>

您的第二个字段内容为:<%=rs.getString(2)%>
<br>

<%}%>

<%out.print("数据库操作成功,恭喜你");%>

<%rs.close();

stmt.close();

conn.close();

%>

</body>

</html>





67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧