上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 85 下一页
摘要: JSP生成图片验证码1。建立一个JSP页面(image.jsp),把下面的代码全部复制到image.jsp下。<%@pagecontentType="image/jpeg"import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*"%><%!ColorgetRandColor(intfc,intbc)...{//给定范围获得随机颜色Randomrandom=newRandom();if(fc>255)fc=255;if(bc>255)bc=255;intr= 阅读全文
posted @ 2007-10-27 01:15 hibernate3例子 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 网页常用小技巧1.oncontextmenu="window.event.returnValue=false"将彻底屏蔽鼠标右键 <tableborderoncontextmenu=return(false)><td>no</table>可用于Table 2.<bodyonselectstart="returnfalse">取消选取、防止复制 3.onpaste="returnfalse"不准粘贴 4.oncopy="returnfalse;"oncut=" 阅读全文
posted @ 2007-10-27 01:13 hibernate3例子 阅读(117) 评论(0) 推荐(0) 编辑
摘要: <!-- File name:calendar.jsp --> <!-- 显示任意年、月的日历,可选择不同的年、月。 author:wildfield --> <%@ page language="java" import="java.util.*" %> <%! String year; String month; %> <% month=request.getParameter("month"); year =request.getParameter("year&qu 阅读全文
posted @ 2007-09-30 09:55 hibernate3例子 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1.如何安装Struts: 首先到http://jakarta.apache.org/Struts下载Struts,建议使用release版,现在最高版本为1.2.6,有多种OS版本(windows,linus...),下载后解压开来,可以看到这个目录:lib和webapps,webapps下有一些WAR文件。假设你的Tomcat装在c:Tomcat下,则将那些WAR文件拷贝到C:Tomcatwebapps,重新启动Tomcat即可。打开浏览器,在地址栏中输入:http://localhost:8080/Struts-example/index.jsp,若能见到“powered by Stru 阅读全文
posted @ 2007-09-30 09:53 hibernate3例子 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 在前面的讲解中你已经了解了怎样创建一个JavaBean,现在我们来看一下如何调用它,在这篇文章中我们将用到上篇的例子,如果你没有看的话,我建议你最好看一下.好了,开始!!在我们继续描述如何编写一个jsp调用JavaBean前,我们先来讨论一下jsp提供的使用javabean的三个tags.i. <jsp:useBean>这个标记被用于声明和实例化javabean类.语法如下:<jsp:useBean id="object-name" scope="page | request | session | application" type= 阅读全文
posted @ 2007-09-30 09:48 hibernate3例子 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://www.codeok.com/opensource/java/index.shtmlhttp://java.linuxjiaocheng.com/applet-api/sdk-tutorial/xml-jsp-programming7947_4.htmlJava多线程编程详解 我们不妨设想,为了创建一个新的线程,我们需要做些什么?很显然,我们必须指明这个线程所要执行的代码,而这就是在Java中实现多线程我们所需要做的一切! 真是神奇!Java是如何做到这一点的?通过类!作为一个完全面向对象的语言,Java提供了类 java.lang.Thread 来方便多线程编程,这个类提供了大 阅读全文
posted @ 2007-09-30 09:44 hibernate3例子 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 选用纯 JSP 还是纯 Servlet 设计站点都有它的局限性,Struts 就是把它们联系在一起的一种有力工具。采用 Struts 能开发出基于 MVC 模式的应用,关于 MVC 的概念可以参见 GoF 的《设计模式——可复用面向对象软件的基础》。 你现在要做的是,下载、安装、配置好以下的工具,版本不同的话操作可能会有些差异,具体的看它们的文档吧:Tomcat 4.1.24 Apache 2.0.43, w/ mod_jk2 2.0.43 Java 2 SDK Standard Edition 1.4.0 Struts 1.1 Eclipse 2.1.0 Struts 是用 Java 写的. 阅读全文
posted @ 2007-09-30 09:36 hibernate3例子 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 创建 Controller LogonAction.java:package org.monotonous.struts;import java.util.Locale;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpSession;import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;import org.apache.struts.action.ActionError;im. 阅读全文
posted @ 2007-09-30 09:30 hibernate3例子 阅读(149) 评论(0) 推荐(0) 编辑
摘要: http://www.daily-english.com.cn/?action-viewnews-itemid-466Suts标签html:form注意事项 在使用html:form时需指定action属性,特别是在使用 html标签时指定的action应在xml中找得到并且页面显示的ActionForm 应于action中使用的.do引擎相匹配,否则JSP会出错 Suts中JSP基本操作 文件头部需增加的代码 <%@ page contentType="text/html;charset=gb2312" %> <%request.setCharacter 阅读全文
posted @ 2007-09-30 09:29 hibernate3例子 阅读(91) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE struts-config PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN""http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";><struts-config><form-beans><form-bean name="logonForm" type="org.apache.struts.validator.DynaValidatorForm& 阅读全文
posted @ 2007-09-30 09:27 hibernate3例子 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 85 下一页