- 浏览: 43277 次
- 性别:
- 来自: 北京
最新评论
文章列表
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://ja ...
- 2013-11-02 09:40
- 浏览 314
- 评论(0)
package donghongyujava.gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.swing.JButton;
import javax.swing.JFrame;
impor ...
- 2013-11-01 08:34
- 浏览 577
- 评论(0)
package donghongyu.servlet;
import java.io.IOException;
public class PrintServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public PrintServlet() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts &qu ...
- 2013-10-30 13:30
- 浏览 445
- 评论(0)
package donghongyujava.servlet;
import java.io.File;
public class ShowImage extends HttpServlet {
/**
* Constructor of the object.
*/
public ShowImage() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destro ...
- 2013-10-30 13:22
- 浏览 379
- 评论(0)
请求头
Accept:客户机通过这个头,告诉服务器,它支持哪些数据类型
Accept-Charset::客户机通过这个头,告诉服务器,它支持的编码
Accept-Encoding: 客户机通过这个头,告诉服务器,支持哪种数据压缩格式
Accept-Language: 客户机采用的是哪个语言
Host:客户机通过这个头,告诉服务器,想访问服务器哪台主机
If-Modified-Since:客户机通过这个头,告诉服务器,数据缓存的时间
Referer:客户机通过这个头,告诉服务器,客户机是从哪个页面来的(防盗链)
User-Agent: 说明客户机操作系统信息,以及浏览器信息
Co ...
- 2013-10-29 08:16
- 浏览 407
- 评论(0)
<WEB应用程序目录下>/WEB-INF/目录下添加web.xml文件,
文件内容添加
<welcome-file-list>
<welcome-file>index.html(用户自定义的默认主页)</welcome-file>
</welcome-file-list>
- 2013-10-29 07:52
- 浏览 482
- 评论(0)
<?xml version="1.0" encoding="UTF-8"?>
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/"
xmlns:tns="http://www.w3.org/" elementFormDefault="qualified">
<xsi:element name="pers ...
- 2013-10-25 09:12
- 浏览 411
- 评论(0)
w3school中的帮助文档的事例代码经过测试不能出现效果,所以我自己写了一个,以下是我的代码,
这是第一个scheam约束
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/family" xmlns:tns="http://www.example.org/famil ...
- 2013-10-24 19:15
- 浏览 482
- 评论(0)
<?xml version="1.0" encoding="UTF-8"?>
<w3:schema xmlns:w3="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/csdn"
elementFormDefault="qualified">
<w3:element name="csdn" />
</w3:schema>
...
- 2013-10-24 15:00
- 浏览 448
- 评论(0)
XML文件
<!DOCTYPE 四大名著[
<!ELEMENT 四大名著 (西游记,红楼梦)>
<!ATTLIST 西游记 id ID #IMPLIED>
]>
<四大名著>
<西游记 id="x001">
<作者>
<姓名>吴承恩</姓名>
<性别>男</性别>
</作者>
</西游记>
<红楼梦 id="x002">
<作者>曹雪芹</作者> ...
- 2013-10-23 08:23
- 浏览 466
- 评论(0)
java项目文件
package sax;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.junit.Test;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
imp ...
- 2013-10-23 08:07
- 浏览 320
- 评论(0)
JAVA项目文件
package dom_jiexi;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.Transf ...
- 2013-10-23 08:01
- 浏览 444
- 评论(0)
package xianChengSaomiao;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class Test6 {
/**
* @param args
* 用线程实现快速扫描指定路径满足筛选条件的文件
*
*
* 对半拆分,按照一定的规律拆分得到的数据, 再将拆分后的数据进行处理
*/
public static void path(File file) {
// 解决空指针问题
i ...
- 2013-10-13 20:47
- 浏览 338
- 评论(0)
package filenameFilter;
import java.io.File;
/*
* 实现功能:
* 获取指定路径下的指定格式的文件;
* */
public class Test {
public static void listPath(File file) {
// 接收筛选过后的文件对象数组
//用文件对象调用listFiles(FilenameFilter filter);方法,
//返回抽象路径名数组,这些路径名表示此抽象路径名表示的目录中满足指定过滤器的文件和目录
File files[] = file.listFiles(new ...
- 2013-10-09 16:16
- 浏览 461
- 评论(0)