ITPUB个人空间 »
Madrid_guti的个人空间
欢迎访问 Madrid_guti 的个人空间
我的论坛主题
-
2008-08-11 15:51:24 / Java企业开发
Myeclipse6.0的版本 (在5.5可以用)db.propertiesEnv.java:package DAO;import java.io.InputStream;import java.util.Properties;public final class Env extends Properties// 获取连接{private static Env instance;public static Env getInstance() {if (instance != null) {return instance;} else {makeInstance();return instance;}}private static synchronized void makeInstance() {if (instance == null) {instance = new Env();}}p
查看(281)
评论(4)
-
2008-06-24 20:45:56 / Java web开发及框架技术
错误代码:---------------------------HTTP Status 500 ---------------------------------------------------------------------------------type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionjavax.servlet.ServletException: Servlet execution threw an exceptionroot causejava.lang.StackOverflowErrorcom.sqlCom.Close(sqlCom.java:68)com.sqlCom.Close(sqlCom.java:68)co
查看(517)
评论(5)
-
2008-06-21 16:55:19 / Java web开发及框架技术
是一个javabean查询sql中的所有用户和密码我把查询的数据放到了以个ArrayList并建立了一个Sbean对象 应该要用bean.setSeat(rs.getString(1)); 就是点不出来。
查看(554)
评论(20)
-
2008-06-20 21:57:24 / Java web开发及框架技术
ResultSet rs = s.executeQuery();boolean flog = rs.next();if(flog){RequestDispatcher rd = request.getRequestDispatcher("/MyBBS.jsp");rd.forward(request, response);}else{out.print("您输入的账号或密码错误,请");out.print("返回");}输入正确没问题,输入错误点返回,返回以个404:http://localhost:8080/BBS/servlet/index.jsphttp://localhost:8080/BBS/后面多了一个servlet
查看(364)
评论(8)
-
2008-06-20 17:11:09 / Java入门与认证版
怎么把查询出来的数据放到ArratList数组里面啊?Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con = DriverManager.getConnection("jdbc:odbc:test","sa","sa");PreparedStatement s = con.prepareStatement("select * from Muser where username=? and userpassword=?");s.getString(1, name);s.getString(2, pwd);ResultSet rs = s.executeQuery();
查看(256)
评论(4)
-
2008-05-18 14:33:34 / 体育世界
:red3: :red3:
查看(609)
评论(19)
-
2008-05-17 22:30:43 / Java企业开发
一个登陆页面login所提交的name和password提交给loginServlet处理,loginServlet负责连接sql,如果输入的name和pas相同转交给say.html(留言板,这我就不发了),用了RequestDispatcher转发给say,直接出现404,经过out的调试只发现能进入if中的语句块,如果输入错误else抛出System.out.println("数据库出错"+ee);啥回事?登陆login(重要的代码)---------------------------------------#姓名:密码:---------------------------------------#loginServlet----------------------------------------"publi
查看(354)
评论(4)
-
2008-05-17 20:27:20 / Java企业开发
下午5点下了个myeclipse5.5GA破解了能用 jdk5.0和tomcat5.5配置好了 jsp文件在webroot下面,配置了tomcat,启动,没错误---------------------------------------2008-5-17 20:21:11 org.apache.coyote.http11.Http11Protocol init信息: Initializing Coyote HTTP/1.1 on http-80802008-5-17 20:21:14 org.apache.catalina.startup.Catalina load信息: Initialization processed in 5391 ms2008-5-17 20:21:15 org.apache.catalina.core.StandardService start信息: Starting service Catalina2008-5-17 20:21:15 org.
查看(326)
评论(5)
-
2008-05-15 20:10:19 / Java web开发及框架技术
[localimg=400,181]5[/localimg]看看代码有错吗登陆login----------------------------------------------------------------------------------------------------------------------tomcat的配置
查看(347)
评论(10)
-
2008-05-13 11:52:17 / Java入门与认证版
定义了一个swing界面有个text输入框下面定义了一个buttion,在单击事件里连接数据库成功,定义一个String s=text(的名字).getString获得了文本框中的字符int i=stmt.executeUpdate(*);------------------------------------*号里面的插入SQL代码应该怎样把 s对象 添加到sql里?我只知道在数据库中插入的代码 却不知道怎么在swing中的sql中添加对象insert into stu (name) value ()
查看(221)
评论(5)