RE: Simple WAR files

2002-08-30 Thread Wagoner, Mark

I would use an IDE like Netbeans or Forte to get started.  It will do most
of this for you, including packaging the entire app into a WAR file.

Once you go through the process within the IDE it starts to make much more
sense.

-Original Message-
From: James [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 11:28 AM
To: Tomcat List
Subject: Simple WAR files


Hi,

I have read the documentation for writing web applications and distributing
them in WAR files, but now I am just more confused than ever. I'm looking
for a simple step by step tutorial on making WAR archives and making them
redistributable.

I know this so far:
- Directory structure; WEB-INF, WEB-INF/classes, etc and what they are used
for
- How to write servlets and JSPs, no worries there...

So now I need to know, what are the basic steps to make a very simple,
almost HelloWord.war type of application? How do I write an application
descriptor, and what do I do with it to make an application WAR file? What
are all the references to asking an administrator to assign a context path?
(I have no administrator, only my home computer and myself!)

Thanks,
James



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread Peter T. Abplanalp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Aug 31, 2002 at 01:28:16AM +1000, James wrote:
 Hi,
 
 I have read the documentation for writing web applications and distributing
 them in WAR files, but now I am just more confused than ever. I'm looking
 for a simple step by step tutorial on making WAR archives and making them
 redistributable.
 
 I know this so far:
 - Directory structure; WEB-INF, WEB-INF/classes, etc and what they are used
 for

do you also know about the web.xml that is supposed to go into
web-inf?

 So now I need to know, what are the basic steps to make a very simple,
 almost HelloWord.war type of application? How do I write an application
 descriptor, and what do I do with it to make an application WAR file? What
 are all the references to asking an administrator to assign a context path?
 (I have no administrator, only my home computer and myself!)

let's say you are working in ~/src/myapp which contains the dir
structure you describe above.  all you need to do is execute the
following command in ~/src/myapp:

  jar cvf myapp.war *

then proceed to copy the war file to however many tomcats you want.
that's it in its simplest form.

if you then want to do some neater stuff, you need to look into how
the web.xml file is structured.  it basically defines your web app and
what happens where.  it is really beyond the scope of a single email.
creating the war file is always the same.

 Thanks,

welcome.

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9b5NTggA8sH0iRXQRArVaAKCRlTJBYAidxf3fmHS4z95KQQBAIwCcDCGk
n0vaUtmoJNZYWPPJjI76jbY=
=oJfH
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread Peter T. Abplanalp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Aug 30, 2002 at 11:41:19AM -0400, Wagoner, Mark wrote:
 I would use an IDE like Netbeans or Forte to get started.  It will do most
 of this for you, including packaging the entire app into a WAR file.

no offense but i recommend /not/ doing this.  the ide's do a lot of
stuff behind the scenes that you may not understand.  if you really
want to understand the process, do it manually.  once you can do
simple things manually, you can switch to an ide because you now know
what the ide is doing under the covers.

 Once you go through the process within the IDE it starts to make much more
 sense.

once you start creating large complicated applications, ide's make
sense because they take some of the manual labor out of the process.

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9b5QbggA8sH0iRXQRApgqAJ9ZZQX3XaRO7QJFEZ0GRnsidiOKBgCeJXZv
MX2oP1nBGhQVcZC4oWi493Y=
=MmIF
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Simple WAR files

2002-08-30 Thread Wagoner, Mark

Personal preference I suppose.  I, personally, almost gave up trying to
teach myself Java using the notepad/javac/System.out.println routine.  Once
I was able to step through the code in the debugger (and get something to
actually work) I started to appreciate Java.  I guess I need that instant
gratification.  ;o)

I would hate to guess how long it would have taken me to get my first
servlet to work using the manual method.  But different people learn in
different ways.

-Original Message-
From: Peter T. Abplanalp [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 11:50 AM
To: 'Tomcat Users List'
Subject: Re: Simple WAR files


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Aug 30, 2002 at 11:41:19AM -0400, Wagoner, Mark wrote:
 I would use an IDE like Netbeans or Forte to get started.  It will do most
 of this for you, including packaging the entire app into a WAR file.

no offense but i recommend /not/ doing this.  the ide's do a lot of
stuff behind the scenes that you may not understand.  if you really
want to understand the process, do it manually.  once you can do
simple things manually, you can switch to an ide because you now know
what the ide is doing under the covers.

 Once you go through the process within the IDE it starts to make much more
 sense.

once you start creating large complicated applications, ide's make
sense because they take some of the manual labor out of the process.

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9b5QbggA8sH0iRXQRApgqAJ9ZZQX3XaRO7QJFEZ0GRnsidiOKBgCeJXZv
MX2oP1nBGhQVcZC4oWi493Y=
=MmIF
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread James

Thanks Peter. Now that I know how to make WAR files, is there a tutorial on
writing the bits and pieces of web.xml?

Also... I see this is a popular question, (I was also going to ask) where is
mod_jk in binary for Win32? Do you have one in a package with docs that you
can send me? :-) Sorry! I can't see how to get it.

James


- Original Message -
From: Peter T. Abplanalp [EMAIL PROTECTED]
To: Tomcat List [EMAIL PROTECTED]
Sent: Saturday, August 31, 2002 1:46 AM
Subject: Re: Simple WAR files


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Sat, Aug 31, 2002 at 01:28:16AM +1000, James wrote:
  Hi,
 
  I have read the documentation for writing web applications and
distributing
  them in WAR files, but now I am just more confused than ever. I'm
looking
  for a simple step by step tutorial on making WAR archives and making
them
  redistributable.
 
  I know this so far:
  - Directory structure; WEB-INF, WEB-INF/classes, etc and what they are
used
  for

 do you also know about the web.xml that is supposed to go into
 web-inf?

  So now I need to know, what are the basic steps to make a very simple,
  almost HelloWord.war type of application? How do I write an application
  descriptor, and what do I do with it to make an application WAR file?
What
  are all the references to asking an administrator to assign a context
path?
  (I have no administrator, only my home computer and myself!)

 let's say you are working in ~/src/myapp which contains the dir
 structure you describe above.  all you need to do is execute the
 following command in ~/src/myapp:

   jar cvf myapp.war *

 then proceed to copy the war file to however many tomcats you want.
 that's it in its simplest form.

 if you then want to do some neater stuff, you need to look into how
 the web.xml file is structured.  it basically defines your web app and
 what happens where.  it is really beyond the scope of a single email.
 creating the war file is always the same.

  Thanks,

 welcome.

 - --
 Peter Abplanalp

 Email:   [EMAIL PROTECTED]
 PGP: pgp.mit.edu
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.7 (GNU/Linux)

 iD8DBQE9b5NTggA8sH0iRXQRArVaAKCRlTJBYAidxf3fmHS4z95KQQBAIwCcDCGk
 n0vaUtmoJNZYWPPJjI76jbY=
 =oJfH
 -END PGP SIGNATURE-

 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread Peter T. Abplanalp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Aug 31, 2002 at 02:06:07AM +1000, James wrote:
 Thanks Peter. Now that I know how to make WAR files, is there a tutorial on
 writing the bits and pieces of web.xml?

well, there are many.  you can go through the tutorials at
java.sun.com or you can get some book or other.  i believe there are
also some details in the tomcat documentation.  if i'm wrong, the
tomcat docs will probably point you in the right direction.

 Also... I see this is a popular question, (I was also going to ask) where is
 mod_jk in binary for Win32? Do you have one in a package with docs that you
 can send me? :-) Sorry! I can't see how to get it.

very popular.  almost to the point of being annoying, but that is
another thread.  :-)  if you look through the messages for today, i
believe john turner posted a link to win32 binaries.  he also has a
howto that he posts about once a day.  i think he's already posted it
today.

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9b5ztggA8sH0iRXQRAvACAJ9oxtA03q7tOjOi3KOfw9T6n1NNDACdEPWz
RcsEWqvEJ792xpnqfF69L3Y=
=4p7A
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread Randall R Schulz

James,

At 08:49 2002-08-30, you wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Aug 30, 2002 at 11:41:19AM -0400, Wagoner, Mark wrote:
  I would use an IDE like Netbeans or Forte to get started.  It will do most
  of this for you, including packaging the entire app into a WAR file.

no offense but i recommend /not/ doing this.  the ide's do a lot of
stuff behind the scenes that you may not understand.  if you really
want to understand the process, do it manually.  once you can do
simple things manually, you can switch to an ide because you now know
what the ide is doing under the covers.


I agree with Peter. Learn the ins and outs of Web App configuration first 
and later you can rely on automation to relieve you of the burden.

Besides, you  might be surprised with the simplicity of a web.xml file, 
especially if you have only JSP pages. Here's the web.xml file I'm 
currently using (for a project that's still quite young). It includes a 
custom tag library:

-==--==-
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

 taglib
 taglib-uri/tau-web-elements/taglib-uri
 taglib-location/WEB-INF/TWE.tld/taglib-location
 /taglib

/web-app
-==--===-

No big deal, eh? If I didn't have the custom tags, it could have been 
omitted entirely.

Of course, once a proper controller enters the picture, I'll need at least 
one servlet declaration and probably some filters. The point is to start 
small and simple and then work your way up to more ambitious 
configurations. That way you'll know what's what and won't be in the dark 
when you need some variation that's not easily obtained from your IDE 
(assuming you use one).



  Once you go through the process within the IDE it starts to make much more
  sense.

once you start creating large complicated applications, ide's make
sense because they take some of the manual labor out of the process.

- --
Peter Abplanalp


Randall Schulz
Mountain View, CA USA


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Simple WAR files

2002-08-30 Thread James

Thanks Randall :)

Actually I have got the connectors now, all to do is now compile them :(
hahaha... you may be able to hear me scream from all the way over your at
place.

I also downloaded the taglibs, interesting things they are!

I tried a servlet with the web.xml for the root directory, in WEB-INF, at it
worked!!


- Original Message -
From: Randall R Schulz [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, August 31, 2002 2:47 AM
Subject: Re: Simple WAR files


 James,

 At 08:49 2002-08-30, you wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Fri, Aug 30, 2002 at 11:41:19AM -0400, Wagoner, Mark wrote:
   I would use an IDE like Netbeans or Forte to get started.  It will do
most
   of this for you, including packaging the entire app into a WAR file.
 
 no offense but i recommend /not/ doing this.  the ide's do a lot of
 stuff behind the scenes that you may not understand.  if you really
 want to understand the process, do it manually.  once you can do
 simple things manually, you can switch to an ide because you now know
 what the ide is doing under the covers.


 I agree with Peter. Learn the ins and outs of Web App configuration first
 and later you can rely on automation to relieve you of the burden.

 Besides, you  might be surprised with the simplicity of a web.xml file,
 especially if you have only JSP pages. Here's the web.xml file I'm
 currently using (for a project that's still quite young). It includes a
 custom tag library:

 -==--==-
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app

  taglib
  taglib-uri/tau-web-elements/taglib-uri
  taglib-location/WEB-INF/TWE.tld/taglib-location
  /taglib

 /web-app
 -==--===-

 No big deal, eh? If I didn't have the custom tags, it could have been
 omitted entirely.

 Of course, once a proper controller enters the picture, I'll need at least
 one servlet declaration and probably some filters. The point is to start
 small and simple and then work your way up to more ambitious
 configurations. That way you'll know what's what and won't be in the dark
 when you need some variation that's not easily obtained from your IDE
 (assuming you use one).



   Once you go through the process within the IDE it starts to make much
more
   sense.
 
 once you start creating large complicated applications, ide's make
 sense because they take some of the manual labor out of the process.
 
 - --
 Peter Abplanalp


 Randall Schulz
 Mountain View, CA USA


 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Simple WAR files

2002-08-30 Thread admin

I know just what you mean!!! I got round the problem by starting to use ant.
Its war task is pretty straight forward

Best Wishes
John Burgess
[EMAIL PROTECTED]
Tel: 01865 718666
Fax: 01865 718600


-Original Message-
From: James [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 4:28 PM
To: Tomcat List
Subject: Simple WAR files


Hi,

I have read the documentation for writing web applications and distributing
them in WAR files, but now I am just more confused than ever. I'm looking
for a simple step by step tutorial on making WAR archives and making them
redistributable.

I know this so far:
- Directory structure; WEB-INF, WEB-INF/classes, etc and what they are used
for
- How to write servlets and JSPs, no worries there...

So now I need to know, what are the basic steps to make a very simple,
almost HelloWord.war type of application? How do I write an application
descriptor, and what do I do with it to make an application WAR file? What
are all the references to asking an administrator to assign a context path?
(I have no administrator, only my home computer and myself!)

Thanks,
James



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/02


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/02



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]