当前位置: 技术问答>java相关
谁能给我TomCat中CookieExample.class的源文件,我给他50分
来源: 互联网 发布时间:2015-08-25
本文导语: 我看了,TomCat的源码根本就不是这个.class的源文件! 因为页面上明明显示的是Name: Value: 而.java中却是Cookie Name: Cookie Value: 如果谁能贴一份标准的源文件出来,我给50分 | 怪了,CookieExamp...
我看了,TomCat的源码根本就不是这个.class的源文件!
因为页面上明明显示的是Name: Value:
而.java中却是Cookie Name: Cookie Value:
如果谁能贴一份标准的源文件出来,我给50分
因为页面上明明显示的是Name: Value:
而.java中却是Cookie Name: Cookie Value:
如果谁能贴一份标准的源文件出来,我给50分
|
怪了,CookieExample.class和CookieExample.java不是都在这个目录吗:
webappsexamplesWEB-INFclasses
webappsexamplesWEB-INFclasses
|
//
// SourceAgain (TM) v1.10 (Core Java 1.2 Trial)
// (C) 1998 Ahpah Software Inc
// Please visit our website at http://www.ahpah.com for purchasing information.
//
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CookieExample extends HttpServlet {
ResourceBundle rb = ResourceBundle.getBundle( "LocalStrings" );
// Please visit http://www.sourceagain.com for product information.
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
PrintWriter out;
String title;
Cookie[] cookies;
Object cookie;
String String9;
((ServletResponse) response).setContentType( "text/html" );
out = ((ServletResponse) response).getWriter();
out.println( "" );
out.println( "" );
out.println( "" );
title = rb.getString( "cookies.title" );
out.println( "" + title + "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" + title + "" );
cookies = request.getCookies();
if( cookies.length > 0 )
{
int i;
out.println( (String.valueOf( rb.getString( "cookies.cookies" ) )) + "
" );
for( i = 0; i
// SourceAgain (TM) v1.10 (Core Java 1.2 Trial)
// (C) 1998 Ahpah Software Inc
// Please visit our website at http://www.ahpah.com for purchasing information.
//
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CookieExample extends HttpServlet {
ResourceBundle rb = ResourceBundle.getBundle( "LocalStrings" );
// Please visit http://www.sourceagain.com for product information.
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
PrintWriter out;
String title;
Cookie[] cookies;
Object cookie;
String String9;
((ServletResponse) response).setContentType( "text/html" );
out = ((ServletResponse) response).getWriter();
out.println( "" );
out.println( "" );
out.println( "" );
title = rb.getString( "cookies.title" );
out.println( "" + title + "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" );
out.println( "" + title + "" );
cookies = request.getCookies();
if( cookies.length > 0 )
{
int i;
out.println( (String.valueOf( rb.getString( "cookies.cookies" ) )) + "
" );
for( i = 0; i