RE: newbie: Installing Servlets

2001-06-19 Thread LeRoi

Thanx Dan.  I will certainly keep that in mind.

Cheers mate,
L
-Original Message-
From: Daniel Koo [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 02:35
To: [EMAIL PROTECTED]
Subject: Re: newbie: Installing Servlets

Hi there,

once you're comfortable with the basics I suggest you have a look
at the Jakarta Ant project, and the docs in the ROOT webapp in
the basics of using it: ant reduces the amount of work you have
to do moving/copying files into and out of directories.

dan

On Mon, Jun 18, 2001 at 06:47:48PM +0100, LeRoi wrote:
> Yup!  That worked.  Part of the problem for me is that the book I'm using
to
> learn Java was written just before the Java web server was released to
> Jakarta.
>
> Innyway, you've saved me from lots of work until I need to.  I'm I've been
> reading the documentation on deploying an application.  For a newbie, it's
a
> bit overwhelming right now just to test a simple example.
>
> Cheer mate!
> LeRoi
>
> -Original Message-
> From: Francis Callo [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2001 18:06
> To: [EMAIL PROTECTED]
> Subject: Re: newbie: Installing Servlets
>
> Hi,
> if you have a servlet named "HelloWorld"i believe you
> have to put your classes on
> "webapps/examples/WEB-INF/classes/" and access it with
> URL
> "http://localhost:8080/examples/servlet/HelloWorld";
> Let me know if it works. ;)
>
> GUD LUK
> Francis
>
> --- LeRoi <[EMAIL PROTECTED]> wrote:
> > Hello!
> >
> > Now that I have Tomcat up and running, it's time
> > that I starting doing some
> > real work.  Following a simple example in the book
> > I'm using it says that
> > servlets are installed in the subdirectory
> > "webapps\WEB-INF\servlets".  I
> > put my class there (under "examples" directory of
> > Tomcat) and shut down
> > Tomcat and re-started it.  Below is the code for
> > textbook example:
> >
> > // Fig. 19.5:  HTTPGetServlet.java
> > // Creating and sending a page to the client
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> > import java.io.*;
> >
> > public class HTTPGetServlet extends HttpServlet {
> >   public void doGet(HttpServletRequest request,
> >  HttpServletResponse
> > response)
> >   throws ServletException, IOException
> >   {
> >   PrintWriter output;
> >
> >   response.setContentType("text/html");  // content
> > type
> >   output = response.getWriter();  // get writer
> >
> >   // create and send HTML page to client
> >   StringBuffer buf = new StringBuffer();
> >   buf.append("\n");
> >   buf.append("A simple Servlet Example\n");
> >   buf.append("\n");
> >   buf.append("Welcome to Servlets!\n");
> >   buf.append("");
> >   output.println(buf.toString());
> >   output.close();  // close PrintWriter stream
> >   }
> > }
> >
> > 
> > 
> >   
> >   
> >   Servlet HTTP GET Example
> >   
> >   
> >   
> >>
> >
> ACTION="http://localhost:8080/servlets/HTTPGetServlet";
> >   METHOD="GET">
> >   Click the button to have the servlet send
> > an HTML document
> >   
> >   
> >   
> > 
> >
> > Well, it didn't work.  My question is, in order to
> > install this simple
> > servlet does that mean I have to go through all the
> > steps as given in the
> > documentation for "Developing Applications with
> > Tomcat"?
> >
> > Cheers and many thanx in advance,
> > LeRoi
> >
> >
>
>
> __
> Do You Yahoo!?
> Spot the hottest trends in music, movies, and more.
> http://buzz.yahoo.com/

--
<[EMAIL PROTECTED]>
Computer Science and Engineering, UNSW




Re: newbie: Installing Servlets

2001-06-18 Thread Daniel Koo

Hi there,

once you're comfortable with the basics I suggest you have a look
at the Jakarta Ant project, and the docs in the ROOT webapp in
the basics of using it: ant reduces the amount of work you have
to do moving/copying files into and out of directories.

dan

On Mon, Jun 18, 2001 at 06:47:48PM +0100, LeRoi wrote:
> Yup!  That worked.  Part of the problem for me is that the book I'm using to
> learn Java was written just before the Java web server was released to
> Jakarta.
> 
> Innyway, you've saved me from lots of work until I need to.  I'm I've been
> reading the documentation on deploying an application.  For a newbie, it's a
> bit overwhelming right now just to test a simple example.
> 
> Cheer mate!
> LeRoi
> 
> -Original Message-
> From: Francis Callo [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2001 18:06
> To: [EMAIL PROTECTED]
> Subject: Re: newbie: Installing Servlets
> 
> Hi,
> if you have a servlet named "HelloWorld"i believe you
> have to put your classes on
> "webapps/examples/WEB-INF/classes/" and access it with
> URL
> "http://localhost:8080/examples/servlet/HelloWorld";
> Let me know if it works. ;)
> 
> GUD LUK
> Francis
> 
> --- LeRoi <[EMAIL PROTECTED]> wrote:
> > Hello!
> >
> > Now that I have Tomcat up and running, it's time
> > that I starting doing some
> > real work.  Following a simple example in the book
> > I'm using it says that
> > servlets are installed in the subdirectory
> > "webapps\WEB-INF\servlets".  I
> > put my class there (under "examples" directory of
> > Tomcat) and shut down
> > Tomcat and re-started it.  Below is the code for
> > textbook example:
> >
> > // Fig. 19.5:  HTTPGetServlet.java
> > // Creating and sending a page to the client
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> > import java.io.*;
> >
> > public class HTTPGetServlet extends HttpServlet {
> >   public void doGet(HttpServletRequest request,
> >  HttpServletResponse
> > response)
> >   throws ServletException, IOException
> >   {
> >   PrintWriter output;
> >
> >   response.setContentType("text/html");  // content
> > type
> >   output = response.getWriter();  // get writer
> >
> >   // create and send HTML page to client
> >   StringBuffer buf = new StringBuffer();
> >   buf.append("\n");
> >   buf.append("A simple Servlet Example\n");
> >   buf.append("\n");
> >   buf.append("Welcome to Servlets!\n");
> >   buf.append("");
> >   output.println(buf.toString());
> >   output.close();  // close PrintWriter stream
> >   }
> > }
> >
> > 
> > 
> >   
> >   
> >   Servlet HTTP GET Example
> >   
> >   
> >   
> >>
> >
> ACTION="http://localhost:8080/servlets/HTTPGetServlet";
> >   METHOD="GET">
> >   Click the button to have the servlet send
> > an HTML document
> >   
> >   
> >   
> > 
> >
> > Well, it didn't work.  My question is, in order to
> > install this simple
> > servlet does that mean I have to go through all the
> > steps as given in the
> > documentation for "Developing Applications with
> > Tomcat"?
> >
> > Cheers and many thanx in advance,
> > LeRoi
> >
> >
> 
> 
> __
> Do You Yahoo!?
> Spot the hottest trends in music, movies, and more.
> http://buzz.yahoo.com/

-- 
<[EMAIL PROTECTED]>
Computer Science and Engineering, UNSW



RE: newbie: Installing Servlets

2001-06-18 Thread LeRoi

Yup!  That worked.  Part of the problem for me is that the book I'm using to
learn Java was written just before the Java web server was released to
Jakarta.

Innyway, you've saved me from lots of work until I need to.  I'm I've been
reading the documentation on deploying an application.  For a newbie, it's a
bit overwhelming right now just to test a simple example.

Cheer mate!
LeRoi

-Original Message-
From: Francis Callo [mailto:[EMAIL PROTECTED]]
Sent: 18 June 2001 18:06
To: [EMAIL PROTECTED]
Subject: Re: newbie: Installing Servlets

Hi,
if you have a servlet named "HelloWorld"i believe you
have to put your classes on
"webapps/examples/WEB-INF/classes/" and access it with
URL
"http://localhost:8080/examples/servlet/HelloWorld";
Let me know if it works. ;)

GUD LUK
Francis

--- LeRoi <[EMAIL PROTECTED]> wrote:
> Hello!
>
> Now that I have Tomcat up and running, it's time
> that I starting doing some
> real work.  Following a simple example in the book
> I'm using it says that
> servlets are installed in the subdirectory
> "webapps\WEB-INF\servlets".  I
> put my class there (under "examples" directory of
> Tomcat) and shut down
> Tomcat and re-started it.  Below is the code for
> textbook example:
>
> // Fig. 19.5:  HTTPGetServlet.java
> // Creating and sending a page to the client
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
>
> public class HTTPGetServlet extends HttpServlet {
>   public void doGet(HttpServletRequest request,
>  HttpServletResponse
> response)
>   throws ServletException, IOException
>   {
>   PrintWriter output;
>
>   response.setContentType("text/html");  // content
> type
>   output = response.getWriter();  // get writer
>
>   // create and send HTML page to client
>   StringBuffer buf = new StringBuffer();
>   buf.append("\n");
>   buf.append("A simple Servlet Example\n");
>   buf.append("\n");
>   buf.append("Welcome to Servlets!\n");
>   buf.append("");
>   output.println(buf.toString());
>   output.close();  // close PrintWriter stream
>   }
> }
>
> 
> 
>   
>   
>   Servlet HTTP GET Example
>   
>   
>   
>   
>
ACTION="http://localhost:8080/servlets/HTTPGetServlet";
>   METHOD="GET">
>   Click the button to have the servlet send
> an HTML document
>   
>   
>   
> 
>
> Well, it didn't work.  My question is, in order to
> install this simple
> servlet does that mean I have to go through all the
> steps as given in the
> documentation for "Developing Applications with
> Tomcat"?
>
> Cheers and many thanx in advance,
> LeRoi
>
>


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/




Re: newbie: Installing Servlets

2001-06-18 Thread Francis Callo

Hi,
if you have a servlet named "HelloWorld"i believe you
have to put your classes on
"webapps/examples/WEB-INF/classes/" and access it with
URL
"http://localhost:8080/examples/servlet/HelloWorld";
Let me know if it works. ;)

GUD LUK
Francis

--- LeRoi <[EMAIL PROTECTED]> wrote:
> Hello!
> 
> Now that I have Tomcat up and running, it's time
> that I starting doing some
> real work.  Following a simple example in the book
> I'm using it says that
> servlets are installed in the subdirectory
> "webapps\WEB-INF\servlets".  I
> put my class there (under "examples" directory of
> Tomcat) and shut down
> Tomcat and re-started it.  Below is the code for
> textbook example:
> 
> // Fig. 19.5:  HTTPGetServlet.java
> // Creating and sending a page to the client
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
> 
> public class HTTPGetServlet extends HttpServlet {
>   public void doGet(HttpServletRequest request,
>  HttpServletResponse
> response)
>   throws ServletException, IOException
>   {
>   PrintWriter output;
> 
>   response.setContentType("text/html");  // content
> type
>   output = response.getWriter();  // get writer
> 
>   // create and send HTML page to client
>   StringBuffer buf = new StringBuffer();
>   buf.append("\n");
>   buf.append("A simple Servlet Example\n");
>   buf.append("\n");
>   buf.append("Welcome to Servlets!\n");
>   buf.append("");
>   output.println(buf.toString());
>   output.close();  // close PrintWriter stream
>   }
> }
> 
> 
> 
>   
>   
>   Servlet HTTP GET Example
>   
>   
>   
>  
>
ACTION="http://localhost:8080/servlets/HTTPGetServlet";
>   METHOD="GET">
>   Click the button to have the servlet send
> an HTML document
>   
>   
>   
> 
> 
> Well, it didn't work.  My question is, in order to
> install this simple
> servlet does that mean I have to go through all the
> steps as given in the
> documentation for "Developing Applications with
> Tomcat"?
> 
> Cheers and many thanx in advance,
> LeRoi
> 
> 


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/