Commit 2fcd33b8 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

9780596000400

0 → 120000
+1 −0
Changes for 9780596000400: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
9780596000400
 No newline at end of file

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
  
# Java Servlet Programming 2nd Edition, by William Crawford
  
[![Java Servlet Programming 2nd Edition, by William Crawford](http://akamaicovers.oreilly.com/images/9780596000400/cat.gif)](https://www.safaribooksonline.com/library/view/title/0596000405//)
  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.

index.html

0 → 100755
+56 −0
Changes for index.html: 56 added lines, 0 removed lines.
Original line number Diff line number Diff line
<HTML>
<HEAD>
<Title>Java Servlet Programming, 2nd Edition -- Examples</Title>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<IMG SRC="http://www.oreilly.com/graphics_new/generic_ora_header_xwide.gif" 
WIDTH="610" HEIGHT="37" ALT="O'Reilly and Associates" CLASS="headerimg">
<H2>Java Servlet Programming, 2nd Edition
<br>
Examples</H2>

Example files for <A HREF="http://www.oreilly.com/catalog/jservlet2/"><B>Java 
Servlet Programming, 2nd Edition</B></A> are available in the following ways:

<UL>
<LI> <B>Static Examples</B> are available for <a href="jservlet2.zip">download</a> from 
our examples site.
<p>

<LI><B>Dynamic Examples</B></A> (select examples that are actually running) 
are available from the author's Web site at
<a href="http://www.servlets.com/jservlet2/examples/">http://www.servlets.com/jservlet2/examples/</a>.
<p>

<LI><B>The com.oreilly.servlet package</B> examples are available only at 
<a href="http://www.servlets.com/cos/">http://www.servlets.com/cos/</a>.
<p>
</UL>

<p><B>Note:</B> If you have trouble accessing examples on the author's Web site, 
please contact 
<a href="mailto:webmaster@servlets.com">webmaster@servlets.com</a>.</p>

<p><b>Back to: <a href="http://www.oreilly.com/catalog/jservlet2/">Java Servlet 
Programming, 2nd Edition</a> </b></p>

<!-- O'Reilly Footer Begins Here -->

<CENTER>
<HR SIZE="1" NOSHADE>
<FONT SIZE="1" FACE="Verdana, Arial, Helvetica">
<A HREF="http://www.oreilly.com/"><B>oreilly.com Home</B></A> <B> | </B>
<A HREF="http://www.oreilly.com/sales/bookstores"><B>O'Reilly Bookstores</B></A> <B> | </B>
<A HREF="http://www.oreilly.com/order_new/"><B>How to Order</B></A> <B> | </B>
<A HREF="http://www.oreilly.com/oreilly/contact.html"><B>O'Reilly Contacts<BR></B></A>
<A HREF="http://www.oreilly.com/international/"><B>International</B></A> <B> | </B>
<A HREF="http://www.oreilly.com/oreilly/about.html"><B>About O'Reilly</B></A> <B> | </B>
<A HREF="http://www.oreilly.com/affiliates.html"><B>Affiliated Companies</B></A> <B> | </B>
<a href="http://www.oreilly.com/privacy_policy.html"><b>Privacy Policy</b></a>
<p><EM>&copy; 2001, O'Reilly &amp; Associates, Inc.</EM>
</FONT>
</CENTER>
<!-- O'Reilly Footer Ends Here -->
</BODY>
</HTML>
+25 −0
Changes for jservlet2-examples/ch02/Hello.java: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class Hello extends HttpServlet {

  public void doGet(HttpServletRequest req, HttpServletResponse res)
                               throws ServletException, IOException {

    res.setContentType("text/html");
    PrintWriter out = res.getWriter();

    String name = req.getParameter("name");
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello, " + name + "</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("Hello, " + name);
    out.println("</BODY></HTML>");
  }

  public String getServletInfo() {
    return "A servlet that knows the name of the person to whom it's" + 
           "saying hello";
  }
}
+19 −0
Changes for jservlet2-examples/ch02/HelloWorld.java: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet {

  public void doGet(HttpServletRequest req, HttpServletResponse res)
                               throws ServletException, IOException {

    res.setContentType("text/html");
    PrintWriter out = res.getWriter();

    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<BIG>Hello World</BIG>");
    out.println("</BODY></HTML>");
  }
}
Loading