Bug 32382 - First App -> Example App is misleading
First App -> Example App is misleading
Product: Tomcat 5
Classification: Unclassified
Component: Webapps:Documentation
Nightly Build
All All
: P2 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2004-11-24 16:59 UTC by Ben Souther
Modified: 2005-03-24 06:59 UTC (History)
0 users

The example app as a war file. (6.90 KB, application/octet-stream)
2004-11-24 17:00 UTC, Ben Souther
xml sheet for generating an index.html page with a link to the myapps.war file. (1.19 KB, text/xml)
2004-11-24 17:01 UTC, Ben Souther

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Souther 2004-11-24 16:59:42 UTC
Per discussion on the dev list (posted below) I'm attaching a WARed up version
of the example app in the "First App" tutorial and an index page with a link to it.
The index page should go under:

From the dev list.....................

The "Example App" link at the end of the "First App" tutorial
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample is a bit
misleading when viewed off the Apache site from the web.

When you click on it, it displays an Apache directory listing.
From there, you can drill into the src directory to get
the servlet code but when you try to drill into the web directory
the index.html page gets shown and leads the viewer into thinking that
this is a working app.  It's not.  When you click on the "To a servlet"
link you see a 404 error and when you click on the "To a JSP page" link
you see the JSP code (which looks like the output from a JSP page
displayed as text because there are no JSP scriptlet tags in it).

I understand that the intent is for the viewer install TC, follow the
entire tutorial and actually deploy the examples to his/her own machine,
and then run it from there, but a casual surfer (or worse a struggling
newbie) will just see this as a non-working app with broken links.

Has anyone considered building the app, WARing it up, and putting an
index.html page at
with a link to the war file and some basic instructions for either
running or unpacking the file to get to the src that goes with the

If this is a good idea, I'd be willing to build the war files and HTML

- Ben

Go ahead, build the WAR, index page, and put it in a Bugzilla
enhancement item please.  I'd done part of this, including the WAR for
the example webapp, in the past.  I put it on my apache.org/~yoavs site,
and it was downloaded a number of times, but I accidentally deleted the
relevant directory tree a few months ago ;(

Happy thanksgiving to all,

Yoav Shapira http://www.yoavshapira.com
Comment 1 Ben Souther 2004-11-24 17:00:31 UTC
Created attachment 13534 [details]
The example app as a war file.
Comment 2 Ben Souther 2004-11-24 17:01:39 UTC
Created attachment 13535 [details]
xml sheet for generating an index.html page with a link to the myapps.war file.
Comment 3 Ben Souther 2004-11-24 22:15:22 UTC
A closer look at the tutorial makes it clear that a war file is not the most
appropriate way to deliver this. I think that, in order to match the tutorial's
directory structure exactly, it would make more sense to pack all the project
files into a zip file and link to that.  

A working war file could be placed in the zip file, or next to it with a
separate link for the impatient who want to see it work before taking on the
tutorial.  This war file would contain none of the source code and would be
built with the Ant script included in the project.  This means that the war file
they download would be exactly the same as the one they would build if they went
through the whole tutorial.

I'll put this together over the long weekend and submit it for review.

Comment 4 Ben Souther 2004-11-29 20:48:45 UTC
Hmm... Because the tutorial is located under specific versions of Tomcat, to do
this the way I would like would involve building the zip file as part ot
Tomcat's build process.  If there is a committer interested in the idea, I am
happy to do the grunt work.  

In the mean time, I think it would still be an improvement to have the
index.html page and the war file committed.

Thank you
Comment 5 Yoav Shapira 2004-12-07 17:48:34 UTC
Index.html and WAR file, yes, extra zip as part of the build, not worth the 

Done on CVS HEAD.
Comment 6 Ben Souther 2004-12-07 19:38:35 UTC
>Index.html and WAR file, yes, 
Thank you.

> extra zip as part of the build, not worth the effort.
Comment 7 Ben Souther 2005-01-26 21:18:22 UTC
Looks like the war file has recently been corrupted.  Can someone re-commit it
to CVS?
Comment 8 Yoav Shapira 2005-03-24 15:59:05 UTC
Updated WAR integrity verified and commited to CVS.  Thanks!