随笔分类 - JAVA
摘要:Choose Accessing a Scoped Value Hello Esteemed Visitor input_jstl User Info Entry Form Name: ...
阅读全文
摘要:设置过期 30 编码方式 HttpSession session = request.getSession( ); session.setMaxInactiveInterval(20 * 60);//20分钟后过期 跟踪 View Session JSP Session Info From A JSP The sess...
阅读全文
摘要:Problem You want to use a JSP to set & read a cookie on a client. Solution Wrap a JavaBean around the servlet API for creating cookies. Then use the bean in the JSP with the jsp:useBean standard actio...
阅读全文
摘要:Problem POST request. Solution Use the ServletRequest.getParameter(String name), getParameterMap( ), getParameterNames( ), or getParameterValues(String name) methods in the servlet's doPost method Cod...
阅读全文
摘要:1、 Handles a Request Problem 动态在请求时包含一个存在的servlet. Solution Use the javax.servlet.RequestDispatcher.include(request,response)method in the doGet( ) method of the servlet Code: import java...
阅读全文
摘要:u Ant 的下载 Ant 是一个开源、免费的软件,可以从以下地址下载最新版本: http://ant.apache.org/ u Ant 的安装和配置 Ant 的安装程序是一个压缩文件,例如最新版本的 Ant 1.6.5 安装程序文件名称为—— apache-ant-1.6.5-bin.zip 。 1. ...
阅读全文
摘要:import java.io.*; public class IOTest { public static void main(String[] args){ IOTest io = new IOTest(); try{ long startTime = System.currentTimeMillis(); ...
阅读全文
摘要:// $Id: wc.java,v 1.2 2001/05/31 22:56:19 doug Exp $ // http://www.bagley.org/~doug/shootout/ // with help from Dirus@programmer.net import java.io.*; import java.util.*; import java.text.*; // this...
阅读全文

浙公网安备 33010602011771号