Ray's playground

 

随笔分类 -  Java

1 2 下一页

Conversational state: session management(Head First Servlets and JSP)
摘要:Somehow, the Container has to get the session ID to theclient as part of the response, and the client has to send backthe session ID as part of the request. The simplest and mostcommon way to exchange... 阅读全文

posted @ 2010-05-09 23:14 Ray Z 阅读(322) 评论(0) 推荐(2)

Being a Web App: attributes and listeners(Head First Servlets and JSP)
摘要:MyServletContextListenerCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1packagecom.example;23importjavax.servlet.*;;45publicclassMyServletContextList... 阅读全文

posted @ 2010-03-31 21:43 Ray Z 阅读(160) 评论(0) 推荐(1)

Being a Servlet: request AND response(Head First Servlets and JSP)
摘要:Each request runs in a separate thread!  When you use GET, the parameter data shows up in the browser’s input bar, right after actual URL (and separated with a “?”).Still another iss... 阅读全文

posted @ 2010-03-29 23:56 Ray Z 阅读(297) 评论(0) 推荐(0)

Mini MVC Tutorial: hands-on MVC(Head First Servlets and JSP)
摘要:form.htmlCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<html><body>2<h1align="center">BeerSelectionPage</h1>3<formmethod... 阅读全文

posted @ 2010-03-28 16:17 Ray Z 阅读(289) 评论(0) 推荐(0)

Web App Architecture: high-level overview(Head First Servlets and JSP)
摘要:When you deploy your servlet into your web Container, you’ll create a fairly simple XML document called the Deployment Descriptor (DD) to tell the Container how to run yourservlets and JSPs. Alt... 阅读全文

posted @ 2010-03-27 10:58 Ray Z 阅读(191) 评论(0) 推荐(0)

Why use Servlets & JSPs: an introduction(Head First Servlets and JSP)
摘要:􀂃 A GET request appends form data to the end of the URL.  􀂃 A POST request includes form data in the body of the request.  􀂃 A MIME type tells the browser what kind of data the browser is about to ... 阅读全文

posted @ 2010-03-25 22:31 Ray Z 阅读(154) 评论(0) 推荐(0)

Arrays(Thinking in Java)
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1importjava.util.*;23classBerylliumSphere4{5privatestaticlongcounter;6privatefinallongid=counter++... 阅读全文

posted @ 2010-03-17 22:06 Ray Z 阅读(202) 评论(0) 推荐(0)

Generics(Thinking in Java)
摘要:Generic MethodsCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1publicclassGenericMethods{2public<T>voidf(Tx)3{4System.out.println(x.getClass().... 阅读全文

posted @ 2010-03-16 21:37 Ray Z 阅读(189) 评论(0) 推荐(0)

Type Information(Thinking in Java)
摘要:ShapesCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1importjava.util.*;23abstractclassShape4{5voiddraw()6{7System.out.println(this+".draw()");8}9abs... 阅读全文

posted @ 2010-03-14 17:39 Ray Z 阅读(346) 评论(0) 推荐(0)

Strings(Thinking in Java)
摘要:Since String objects are immutable, you can alias to a particular String as many times as you want. Because a String is read-only, there’s no possibility that one reference will change something... 阅读全文

posted @ 2010-03-11 21:23 Ray Z 阅读(153) 评论(0) 推荐(0)

Error Handling with Exceptions(Thinking in Java)
摘要:When you override a method, you can throw only the exceptions that have been specified in the base-class version of the method. This is a useful restriction, since it means that code that works with t... 阅读全文

posted @ 2010-03-10 21:07 Ray Z 阅读(246) 评论(0) 推荐(0)

Holding Your Objects(Thinking in Java)
摘要:So far, the foreach syntax has been primarily used with arrays, but it also works with any Collection object. 阅读全文

posted @ 2010-01-28 00:13 Ray Z 阅读(137) 评论(0) 推荐(0)

Inner Classes(Thinking in Java)
摘要:If you want to make an object of the inner class anywhere except from within a non-static method of the outer class, you must specify the type of that object as OuterClassName.InnerClassName,  So an i... 阅读全文

posted @ 2010-01-26 22:02 Ray Z 阅读(330) 评论(0) 推荐(0)

Interfaces(Thinking in Java)
摘要:The interface keyword takes the concept of abstractness one step further. The abstract keyword allows you to create one or more undefined methods in a class—you provide part of the interface wit... 阅读全文

posted @ 2010-01-25 23:16 Ray Z 阅读(243) 评论(0) 推荐(0)

Polymorphism(Thinking in Java)
摘要:All method binding in Java uses late binding unless the method is static or final (private methods are implicitly final). This means that ordinarily you don’t need to make any decisions about wh... 阅读全文

posted @ 2010-01-23 23:43 Ray Z 阅读(295) 评论(0) 推荐(0)

Reusing Classes(Thinking in Java)
摘要:Java’s final keyword has slightly different meanings depending on the context, but in general it says “This cannot be changed.” You might want to prevent changes for two reasons: des... 阅读全文

posted @ 2010-01-22 23:30 Ray Z 阅读(216) 评论(0) 推荐(0)

Access Control(Thinking in Java)
摘要:The levels of access control from “most access” to “least access” are public, protected, package access (which has no keyword), and private. 阅读全文

posted @ 2010-01-18 22:30 Ray Z 阅读(230) 评论(0) 推荐(0)

Initialization & Cleanup(Thinking in Java)
摘要:[代码] 阅读全文

posted @ 2010-01-15 22:29 Ray Z 阅读(164) 评论(0) 推荐(0)

Controlling Execution(Thinking in Java)
摘要:[代码] 阅读全文

posted @ 2010-01-14 22:24 Ray Z 阅读(153) 评论(0) 推荐(0)

Operators(Thinking in Java)
摘要:The default behavior of equals( ) is to compare references. So unless you override equals( ) in your new class you won’t get the desired behavior.  Java programmers cannot implement their own ov... 阅读全文

posted @ 2010-01-14 08:55 Ray Z 阅读(202) 评论(0) 推荐(0)

1 2 下一页

导航