/*
* Copyright 1999,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package mypackage;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Simple servlet to validate that the Hello, World example can
* execute servlets. In the web application deployment descriptor,
* this servlet must be mapped to correspond to the link in the
* "index.html" file.
*
* @author Craig R. McClanahan <Craig.McClanahan@eng.sun.com>
*/
public final class Hello extends HttpServlet {
/**
* Respond to a GET request for the content produced by
* this servlet.
*
* @param request The servlet request we are processing
* @param response The servlet response we are producing
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.println("<html>");
writer.println("<head>");
writer.println("<title>Sample Application Servlet Page</title>");
writer.println("</head>");
writer.println("<body bgcolor=white>");
writer.println("<table border=\"0\">");
writer.println("<tr>");
writer.println("<td>");
writer.println("<img src=\"images/logo.gif\">");
writer.println("</td>");
writer.println("<td>");
writer.println("<h1>Sample Application Servlet</h1>");
writer.println("This is the output of a servlet that is part of");
writer.println("the Hello, World application. It displays the");
writer.println("request headers from the request we are currently");
writer.println("processing.");
writer.println("</td>");
writer.println("</tr>");
writer.println("</table>");
writer.println("<table border=\"0\" width=\"100%\">");
Enumeration names = request.getHeaderNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
writer.println("<tr>");
writer.println(" <th align=\"right\">" + name + ":</th>");
writer.println(" <td>" + request.getHeader(name) + "</td>");
writer.println("</tr>");
}
writer.println("</table>");
writer.println("</body>");
writer.println("</html>");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
WEB基本网页代码(含登录、注册、信息维护等)
共89个文件
jpg:43个
jsp:18个
gif:13个
5星 · 超过95%的资源 需积分: 49 301 下载量 134 浏览量
2009-06-10
15:35:28
上传
评论 15
收藏 428KB RAR 举报
温馨提示
自己做的最简单的网页,有登录、注册、信息维护、密码找回、查看个人信息等功能,含加密与解密。数据库的创建为 Create table userinfo( Username varchar primary key, Pwd varchar, Gender varchar, Email varchar, Question varchar, Answer varchar)
资源详情
资源评论
资源推荐
收起资源包目录
myapp1.rar (89个子文件)
myapp
0007.gif 6KB
leaveword.jsp 6KB
error2.jsp 289B
leaveword2.jsp 795B
images
login_r1.jpg 2KB
search_r1.jpg 2KB
adin_r1.gif 2KB
orange.jpg 289B
0403009.jpg 9KB
adin_r5.gif 1KB
top_r12.jpg 599B
0201008.gif 10KB
xsdg2-038.gif 9KB
0204012.gif 9KB
adin_r6.gif 2KB
031202.jpg 17KB
top_r9.jpg 538B
newbookbn.jpg 1KB
040502.jpg 18KB
angle.gif 7KB
top_r8.jpg 434B
031207.jpg 21KB
mybn.jpg 1KB
lanmu_r3.jpg 11KB
blackline.jpg 294B
031203.jpg 23KB
adin_r3.gif 1KB
adin_r4.gif 2KB
03072904.jpg 9KB
indexbutton.jpg 10KB
top_r3.jpg 415B
top_r7.jpg 471B
lanmu_r2.jpg 1KB
top_r10.jpg 527B
03072903.jpg 8KB
03092822.jpg 9KB
top_r6.jpg 462B
buybn.jpg 11KB
adin_r1.jpg 12KB
03104.jpg 14KB
adin_r2.gif 1KB
jingpinbn.jpg 1KB
top_r1.jpg 6KB
top_r5.jpg 535B
lanmu_r1.jpg 2KB
040602.jpg 18KB
040601.jpg 20KB
sq.jpg 10KB
findbn.jpg 1KB
liuyanbn.jpg 1KB
top_r4.jpg 418B
03090801.jpg 7KB
top_r11.jpg 564B
top_r2.jpg 2KB
03102909.jpg 12KB
03102906.jpg 11KB
Thumbs.db 121KB
maincss.css 507B
图片
0007.gif 6KB
0009.jpg 6KB
0003.gif 3KB
Thumbs.db 13KB
checklogin.jsp 866B
index.jsp 4KB
getpwd.jsp 5KB
error3.jsp 271B
userinfoedit.jsp 8KB
login.jsp 7KB
my.html 5KB
leaveword3.jsp 1KB
top.jsp 781B
error.jsp 281B
passwordedit.jsp 7KB
TMP99jq71ngki.htm 21KB
ckxx.jsp 4KB
ckxx2.jsp 5KB
bottom.jsp 355B
getpwd2.jsp 6KB
register.jsp 8KB
Thumbs.db 10KB
WEB-INF
classes
HelloWorld.java 563B
bean
Box.java 660B
Box.class 808B
BookBean.java 445B
BookBean.class 602B
Hello.class 2KB
HelloWorld.class 831B
Hello.java 3KB
web.xml 642B
共 89 条
- 1
duckweed0421
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论13