求助!!数据源错误
jbuilder9+weblogic8.1+Oracle9i 数据库未在本机
我在weblogic里配置链接池数据源都成功了,是运行程序出错错误代码:
Error 404--Not FoundFrom 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.
我得使用数据源的JSP文件
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import= "java.sql.* " %>
<%@ page import= "javax.sql.* " %>
<%@ page import= "javax.naming.* "%>
<%@ page import= "java.util.* "%>
<HTML>
<HEAD>
<TITLE> </TITLE>
</HEAD>
<BODY>
<%
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,"t3://127.0.0.1:7001");
ht.put(Context.SECURITY_PRINCIPAL, "weblogic");
ht.put(Context.SECURITY_CREDENTIALS, "00000000");
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
ctx = new InitialContext(ht);
DataSource ds = (DataSource)ctx.lookup ("MyJNDI");
conn = ds.getConnection();
stmt = conn.createStatement();
stmt.execute("select * from LawTypeInfo");
rs = stmt.getResultSet();
while ( rs.next()){
out.println( rs.getString(1)+"___");
out.println( rs.getString(2)+"___");
out.println( rs.getString(3)+"<br>");
}
stmt.close();
stmt=null;
conn.close();
conn=null;
}catch (Exception e) {
out.println("错误 !! ERR !" );
}
finally {
try {
ctx.close();
} catch (Exception e) {
out.println("ctx ERR !" ); }
try {
if (rs != null) rs.close();
} catch (Exception e) {
out.println("rs ERR !" ); }
try {
if (stmt != null) stmt.close();
} catch (Exception e) {
out.println("stmt ERR !" ); }
try {
if (conn != null) conn.close();
} catch (Exception e) {
out.println("conn ERR !" ); }
}
%>
</BODY>
</HTML>
我该怎样呀?