Re: Tomcat and Servlets - DESPERATE for help

2004-11-24 Thread Dave Robbins
kinda sounds like your sending malformed html to the browser
do the view source thing in the browser and see what you're sending it

 Hi folks,  I pray someone can tell me something here.  Im writing an
 application in Servlets using Tomcat  Heres my scenario.

 I display a User Login screen,  ID and Password on an HTML form,  user
 enters data,   the submit button executes the program to verify the
 Users information  Obvioulsy if its wrong,  it redisplays the
 screen,   or correct,  it carries on into the application.  SO,  if
 the user info is correct,   it CALLS another program to build and
 display the users data, menu,  etc..

 This all works just fine,  EXCEPT.when it builds the new User
 screen,   it is building it BELOW (i.e. same browser page)  as the User
 Login screen.  Obviously this User Login screen should be gone,  and
 I should just see the new results

 Ok,   if the User validation process failed (i.e.  invalid id or
 password)  my program just redisplays the log in screen,  well,   same
 happens,  a NEW login screen,  gets bulit below the Original log in
 screen.

 can ANYONE PLEAE help me here.  Does Tomcat need to kill the
 Servlet session?  to know it needs to refresh the Browser?

 This is killing me here, Im desperate to get this resolved so I can move
 forward with my app,  I thank you all for any help you can give me
 Have a wonderful day, Merry Christmas

 Mike




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



Problem with Manager application

2004-11-23 Thread Dave Robbins
Hello All,

I've recently gotten a new machine and installed
linux Fedora Core 1
j2sdk1.4.2_03
jakarta-tomcat-5.0.19
netbeans3.6

I've played around with netbeans and tomcat in the past and have some web
apps that I've created and that run fine on an older machine.
On the new machine, when I try to use the manager application that comes
with tomcat to deploy one of my app, I get this exception.

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream

org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:142)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.29 logs.

I used netbeans to create the simplest app I could and still got the same
error.

I looked thru the archives on this mailing list and the closest thing I
found was something that said that java.lang.NoClassDefFoundError is often
caused by having multiple instances of a jar file on the machine. I
searched around and found that javax/servlet/ServletInputStream is in
tomcat_install_dir/commons/lib/servlet-api.jar, so I searched my machine
for it and found two instances. One where it should be for tomcat and
another in my home directory where netbeans is installed. This looks ok to
me but just on a whim I deleted the netbaens install dir  and nothing
changed. So now I'm kinda stuck. On my older installation of tomcat
everything works great, anybody have a good idea how to track down my
problem??
Oh yea, when I start tomcat it echos

[EMAIL PROTECTED] root]# /usr/local/jakarta-tomcat-5.0.19/bin/startup.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-5.0.19
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-5.0.19
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-5.0.19/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.2_03

which looks correct to me
Ideas???

Oh yea, Oh yea
it I just place the war file for my app in the tomcat webapps directory
and stop and restart tomcat it deploys and runs fine

TIA
Dave




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



Re: Servlets and debugging

2004-11-23 Thread Dave Robbins
Richard,

I'm certainly no expert but I've been playing with this stuff a while and
I find the free netbeans IDE to be an excellent environment for learning
this stuff. It come with a copy of tomcat built into it so you can debug
your servlet from within the IDE. With the click of a buton it will
generate a skeleton servlet that does nothing except print hello world and
then you can set breakpoints in the code and debug it and watch it execute
one line at a time. I don't know how people survive without such a tool.
Eclipse is another IDE people think highly of but I'm not familiar with
it. Check out netbeans at

www.netbeans.org

I'd stick with version 3.6 for now
good luck

Dave

 After a few years of trying on and off I've finally managed to make a
 servlet work in Tomcat (4.1).

 I had to add:
   servlet
 servlet-nameStudioSearch/servlet-name
 servlet-classStudioSearch/servlet-class
   /servlet
   servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
   /servlet-mapping
 to webapps/ROOT/WEB-INF/web.xml. (No one had ever said before about the
 servlet-mapping directive.). I'll install it in a better location when
 its working, I'm just using the root webapp for debugging.

 So now I need to try and make my servlet work. Obviously there are lots
 of bugs in the Java code itself but I wonder if anyone could suggest a
 good way of testing servlet code? ATM, I have to compile the servlet,
 copy it to the classes directory, restart Tomcat (which takes several
 minutes) and read the Tomcat logs to find out whats gone wrong!
 Nightmare! :-o

 How do people who know what they're doing go about debugging servlets?

 Thanks in advance,
 Richard
 --
   Richard Lewis
   [EMAIL PROTECTED]


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




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



problem with server.xml

2004-03-02 Thread Dave Robbins
Hello All,

I'm trying to setup the mod_jk connector between tomcat 5.0.16 and apache
1.3.x on a linux box. I've got the connector compiled and installed in
apache and I can point a browser at www.mydomain.com/servlet/foo and I get
an error message from tomcat, not apache, saying resource not available,so
I believe the connector is sucsefully talking to tomcat.
The next step is to create a workers.properties and server.xml file for
tomcat. The howto's I'm looking at have sample files, workers.properties
looks pretty straight forward but I'm kinda confused about server.xml.
Both howto's say to backup the default server.xml and start from scratch,
I've pasted their template at the bottom. When I try using their
server.xml tomcat won't even start, when I run the startup script tomcat
fails without any error message, obviously I need to tweak some stuff. It
looks like I should change your_domain to my domain name and docBase to
where my application is but these changes don't fix things. Does anybody
see what I'm doing wrong?? I've looked in the log files but didn't see
anything helpful

Thanx
Dave

Server port=8005 shutdown=SHUTDOWN debug=0

Service name=Tomcat-Apache

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
address=127.0.0.1 port=8009 minProcessors=5
maxProcessors=75
enableLookups=false acceptCount=10 debug=0/

Engine name=your_engine debug=0
defaultHost=your_domain
Logger
className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt
timestamp=true/
Host name=your_domain debug=0 unpackWARs=true

Context path=
docBase=/home/tomcat/your_application
debug=0 reloadable=true /

/Host
/Engine

/Service

/Server



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



problem with server.xml

2004-03-02 Thread Dave Robbins
Hello All,

I'm trying to setup the mod_jk connector between tomcat 5.0.16 and apache
1.3.x on a linux box. I've got the connector compiled and installed in
apache and I can point a browser at www.mydomain.com/servlet/foo and I get
an error message from tomcat, not apache, saying resource not available,so
I believe the connector is sucsefully talking to tomcat.
The next step is to create a workers.properties and server.xml file for
tomcat. The howto's I'm looking at have sample files, workers.properties
looks pretty straight forward but I'm kinda confused about server.xml.
Both howto's say to backup the default server.xml and start from scratch,
I've pasted their template at the bottom. When I try using their
server.xml tomcat won't even start, when I run the startup script tomcat
fails without any error message, obviously I need to tweak some stuff. It
looks like I should change your_domain to my domain name and docBase to
where my application is but these changes don't fix things. Does anybody
see what I'm doing wrong?? I've looked in the log files but didn't see
anything helpful

Thanx
Dave

Server port=8005 shutdown=SHUTDOWN debug=0

Service name=Tomcat-Apache

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
address=127.0.0.1 port=8009 minProcessors=5
maxProcessors=75
enableLookups=false acceptCount=10 debug=0/

Engine name=your_engine debug=0
defaultHost=your_domain
Logger
className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt
timestamp=true/
Host name=your_domain debug=0 unpackWARs=true

Context path=
docBase=/home/tomcat/your_application
debug=0 reloadable=true /

/Host
/Engine

/Service

/Server



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



RE: problem with server.xml

2004-03-02 Thread Dave Robbins
Hi Yoav,

Well, I got it working
Simply went back to original server.xml and it works with no modification
That sure was a lot easier than all the hair pulling I've been going thru :)

Thanx
Dave

 Hi,

 Both howto's say to backup the default server.xml and start from
 scratch,

 That's unfortunate, as you can clearly see the howto's are for tomcat4.
 Class names, attributes, and other elements were changed in tomcat 5.
 You should take supplied tomcat 5 server.xml and customize it as needed.

 Yoav Shapira



 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
 intended recipient, please immediately delete this e-mail from your
 computer system and notify the sender.  Thank you.


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




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



problem with server.xml

2004-02-25 Thread Dave Robbins
Hello All,

I'm trying to setup the mod_jk connector between tomcat 5.0.16 and apache
1.3.x on a linux box. I've got the connector compiled and installed in
apache and I can point a browser at www.mydomain.com/servlet/foo and I get
an error message from tomcat, not apache, saying resource not available,so
I believe the connector is sucsefully talking to tomcat.
The next step is to create a workers.properties and server.xml file for
tomcat. The howto's I'm looking at have sample files, workers.properties
looks pretty straight forward but I'm kinda confused about server.xml.
Both howto's say to backup the default server.xml and start from scratch,
I've pasted their template at the bottom. When I try using their
server.xml tomcat won't even start, when I run the startup script tomcat
fails without any error message, obviously I need to tweak some stuff. It
looks like I should change your_domain to my domain name and docBase to
where my application is but these changes don't fix things. Does anybody
see what I'm doing wrong?? I've looked in the log files but didn't see
anything helpful

Thanx
Dave

Server port=8005 shutdown=SHUTDOWN debug=0

Service name=Tomcat-Apache

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
address=127.0.0.1 port=8009 minProcessors=5
maxProcessors=75
enableLookups=false acceptCount=10 debug=0/

Engine name=your_engine debug=0
defaultHost=your_domain
Logger
className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt
timestamp=true/
Host name=your_domain debug=0 unpackWARs=true

Context path=
docBase=/home/tomcat/your_application
debug=0 reloadable=true /

/Host
/Engine

/Service

/Server



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



Newbie question

2003-12-11 Thread Dave Robbins
Hello All,

Hope someone can help me out.
I developed a servlet using Netbeans and when I tried to deploy it I had
problem
In an attempt to debug, I went back to Netbeans and created the simplest
servlet I could,
 it just prints out some text. Works fine in development environment.
Netbeans has option to build test.war file for me, did that.
put test.war file in $CATALINA_HOME/webapps
restarted tomcat
I can see new directory test with WEB-INF/classes/test.class in it
point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory listing
with nothing in it
if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it like
$CATALINA_HOME/webapps/test/junk.html
if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
with junk.html
shouldn't I see WEB-INF in directory listing??
I've messed with Netbeans/Tomcat in the past and I thought all I had to do
was make war file
dump it in webapps dir and restart Tomcat
seems like a path problem to the servlet

linux 2.4.18 tomcat 5.0.16

Anybody see what I'm missing

Thanx
Dave


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



RE: Newbie question

2003-12-11 Thread Dave Robbins
I figured it out :-)
the path to the servlet name foo is

http:/www.xxx.yyy.zzz:8080/test/servlet/foo

 

-Original Message-
From: Dave Robbins [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:51 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie question


Hello All,

Hope someone can help me out.
I developed a servlet using Netbeans and when I tried to deploy it I had
problem
In an attempt to debug, I went back to Netbeans and created the simplest
servlet I could,
 it just prints out some text. Works fine in development environment.
Netbeans has option to build test.war file for me, did that.
put test.war file in $CATALINA_HOME/webapps
restarted tomcat
I can see new directory test with WEB-INF/classes/test.class in it
point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory listing
with nothing in it
if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it like
$CATALINA_HOME/webapps/test/junk.html
if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
with junk.html
shouldn't I see WEB-INF in directory listing??
I've messed with Netbeans/Tomcat in the past and I thought all I had to do
was make war file
dump it in webapps dir and restart Tomcat
seems like a path problem to the servlet

linux 2.4.18 tomcat 5.0.16

Anybody see what I'm missing

Thanx
Dave


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

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



servletcontext/path problem

2002-09-20 Thread Dave Robbins

Hi Folks,

I've posted this before and still haven't figured it out.
Maybe you can help this time

I'm using Forte 4.0 and trying to mess with Model 2 jsp/servlet
architecture
I've got a file index.jsp in my top level directory
index.jsp contains a link to a servlet myServlet 
the myServlet servlet is in WEB-INF/classes in myPackage
the function in the servlet that handles the request executes this
code

javax.servlet.ServletContext sc;
javax.servlet.RequestDispatcher rd;

try
{
sc = getServletContext();
rd = sc.getRequestDispatcher(/foo.jsp); 
rd.forward(request, response);
}
catch(Throwable theException)
{
}

foo.jsp is in the top level directory with index.jsp and this all
works correctly, when you click the link in index.jsp, foo.jsp is
displayed.
Now I put a link in foo.jsp to index.jsp

a href'index.jspBack to Topa

when I mouse over this link the address it points at is 

http://localhost:8081/servlet/index.jsp

which is wrong.
the address displayed in the location window at this point says

http://localhost:8081/servlet/myPackage.myServlet
The docs from Sun for RequestDispatcher.forward() say

For a RequestDispatcher obtained via getRequestDispatcher(), the
ServletRequest object has its path elements and parameters adjusted to
match the path of the target resource.

this sounds to me like when control was passed to foo.jsp, the path
should have been set back to http://localhost:8081/

I kinda think the problem has something to do with a servlet mapping entry 
in web.xml, so far this is all being handled by Forte. When I try to read 
documentation on this stuff it's a tiny bit obtuse. Can somebody help me 
out here.

The .war file is tiny so I attached it

Dave





myProject.war
Description: Zip compressed data

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


relative path/context problem

2002-09-11 Thread Dave Robbins

Hello All,

I'm seeing some really odd behaviour, I hope someone can tell me what i'm 
doing wrong. I've written some jsp/servlet code with Forte 4.0, created a 
war file and deployed it on Tomcat 4.0.4. ( I deployed it by putting the 
war file in the webapps dir and restarting Tomcat) The war file was 
my_stuff.war so the url is 

http://localhost:8080/my_stuff/index.jsp

That works fine. As I started developing a little code I got to a point I 
wanted a link back to the entry of the site, I thought

a href=/index.jspBack to Top/a

would do the job. But this link pointed to
  
http://localhost:8080/my_stuff/servlet/index.jsp

I was confused so to simplify things I went back to index.jsp and put a 
link to itself in the file. When you mouse over the link, the address it 
point to is

http://localhost:8080/index.jsp

Shouldn't Tomcat be prepending

http://localhost:8080/my_stuff

onto any link I specify like this

a href=/somefile.jspMy Link/a

I'm playing around with what's called a model 2 architecture where a jsp 
page calls a servlet which does some data processing and then forwards the 
request to another jsp page and I'm not having any trouble with path's when 
I forward the request, just with links in the jsp pages.

what's really maddening is that in playing around with this I've seen it 
work correctly and seen it fail. Obviously I'm doing something boneheaded, 
any ideas??

Dave







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




Re: relative path/context problem

2002-09-11 Thread Dave Robbins

I have 1 servlet name EntryBean in a package called phonebook
should web.xml have entries for jsp pages?
here's the whole file

?xml version=1.0 encoding=UTF-8?

!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
  servlet
servlet-nameEntryBean/servlet-name
servlet-classphonebook.EntryBean/servlet-class
  /servlet
  servlet-mapping
servlet-nameEntryBean/servlet-name
url-pattern/servlet/phonebook.EntryBean/url-pattern
  /servlet-mapping
  session-config
session-timeout
30
/session-timeout
  /session-config
  welcome-file-list
welcome-file
index.jsp
/welcome-file
welcome-file
index.html
/welcome-file
welcome-file
index.htm
/welcome-file
  /welcome-file-list
/web-app



 What servlet mapping(s) do you have setup in web.xml?
 
 Dave Robbins wrote:
 Hello All,
 
 I'm seeing some really odd behaviour, I hope someone can tell me what
 i'm  doing wrong. I've written some jsp/servlet code with Forte 4.0,
 created a  war file and deployed it on Tomcat 4.0.4. ( I deployed it
 by putting the  war file in the webapps dir and restarting Tomcat) The
 war file was  my_stuff.war so the url is 
 
 http://localhost:8080/my_stuff/index.jsp
 
 That works fine. As I started developing a little code I got to a
 point I  wanted a link back to the entry of the site, I thought
 
 a href=/index.jspBack to Top/a
 
 would do the job. But this link pointed to
   
 http://localhost:8080/my_stuff/servlet/index.jsp
 
 I was confused so to simplify things I went back to index.jsp and put
 a  link to itself in the file. When you mouse over the link, the
 address it  point to is
 
 http://localhost:8080/index.jsp
 
 Shouldn't Tomcat be prepending
 
 http://localhost:8080/my_stuff
 
 onto any link I specify like this
 
 a href=/somefile.jspMy Link/a
 
 I'm playing around with what's called a model 2 architecture where a
 jsp  page calls a servlet which does some data processing and then
 forwards the  request to another jsp page and I'm not having any
 trouble with path's when  I forward the request, just with links in
 the jsp pages.
 
 what's really maddening is that in playing around with this I've seen
 it  work correctly and seen it fail. Obviously I'm doing something
 boneheaded,  any ideas??
 
 Dave
 
 
 
 
 
 
 
 --
 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]



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




Re: relative path/context problem

2002-09-11 Thread Dave Robbins

you sir, are incredibly smart
Thanks

 I think it will work if you take out the /.
 Like this:
 a href=index.jspBack to Top/a
 
 Tell me.
 
 Bye,
 
 Mauro
 
 
 
 On Wed, 11 Sep 2002, Dave Robbins wrote:
 
 Hello All,
 
 I'm seeing some really odd behaviour, I hope someone can tell me what
 i'm  doing wrong. I've written some jsp/servlet code with Forte 4.0,
 created a  war file and deployed it on Tomcat 4.0.4. ( I deployed it
 by putting the  war file in the webapps dir and restarting Tomcat) The
 war file was  my_stuff.war so the url is 
 
 http://localhost:8080/my_stuff/index.jsp
 
 That works fine. As I started developing a little code I got to a
 point I  wanted a link back to the entry of the site, I thought
 
 a href=/index.jspBack to Top/a
 
 would do the job. But this link pointed to
   
 http://localhost:8080/my_stuff/servlet/index.jsp
 
 I was confused so to simplify things I went back to index.jsp and put
 a  link to itself in the file. When you mouse over the link, the
 address it  point to is
 
 http://localhost:8080/index.jsp
 
 Shouldn't Tomcat be prepending
 
 http://localhost:8080/my_stuff
 
 onto any link I specify like this
 
 a href=/somefile.jspMy Link/a
 
 I'm playing around with what's called a model 2 architecture where a
 jsp  page calls a servlet which does some data processing and then
 forwards the  request to another jsp page and I'm not having any
 trouble with path's when  I forward the request, just with links in
 the jsp pages.
 
 what's really maddening is that in playing around with this I've seen
 it  work correctly and seen it fail. Obviously I'm doing something
 boneheaded,  any ideas??
 
 Dave
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For additional
 commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 -- 
 Ing.Mauro Daniel Ardolino
 Departamento de Desarrollo y Servicios
 Altersoft
 Billinghurst 1599 - Piso 9
 C1425DTE - Capital Federal
 Tel/Fax: 4821-3376 / 4822-8759
 mailto: [EMAIL PROTECTED]
 website: http://www.altersoft.com.ar
 
 
 --
 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]




war file deployment problem

2002-09-06 Thread Dave Robbins

Hello All,
kindof a newbie here so be gentle
I wrote a little dummy app with Forte 4.0 that consists of a jsp page with 
a link that calls a servlet which does a database lookup and spews out some 
data. It works fine with the built in copy of Tomcat that comes with Forte.
I build a war file and try to deploy it on another machine with Tomcat 
4.0.4 on it. I put my file dummy.war in the $CATALINA_HOME/webapps/dummy 
dir and use this command from a browser

http://localhost:8080/manager/install?
path=/dummywar=jar:file:$CATALINA_HOME/webapps/dummy/dummy.war!/

now the command

http://localhost:8080/manager/install

tells me that my app is running, but when I try to access it with

http://localhost/dummy or http://localhost/dummy/index.jsp it says the 
resource is not available. I kinda thought Tomcat could access the war file 
in it's bundled state but after reading the docs I got the impression the 
manager app was gonna expand it, is that true? In my case the file wasn't 
expanded. After some head scratching I figured I'd manually expand the war 
file in the $CATALINA_HOME/ROOT dir. After doing that and restarting Tomcat 
everything works fine with http://localhost/index.jsp.
 
So, let me ask a few questions

1) What does the manager app do
does it modify $CATALINA_HOME/conf/server.xml
should it expand the war file

2)If I'm gonna deploy multiple apps, what's the typical dir structure
$CATALINA_HOME/ROOT/app1, $CATALINA_HOME/ROOT/app2, etc
could i deploy an app outside the Tomcat dir structure (ie /home/mydir)

3)Is this the correct flow of things
Tomcat starts up and reads $CATALINA_HOME/conf/server.xml and now knows 
about the apps that are installed and what path they're mapped to. when a 
client tries to access an app, Tomcat goes and looks in the jar file and 
reads web.xml to discover what all is in the war file. Within the war file 
any static content goes in the WEB-INF dir, class files go in WEB-
INF/classes and .jar files goe in WEB-INF/lib

hep me, hep me

Dave



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




Re: war file deployment problem

2002-09-06 Thread Dave Robbins

What? Me make it more complicated than it is?
surely you jest!

I got it to work by putting the war file in $CATALINA_HOME/webapps/ROOT 
I still don't know what I'm doing but I'll be able to figure it out now 
that I've got something working.

Thanks
Dave 
 Hi Dave.
 
 I think you're making this more complicated than it needs to be.
 
 Two things:
 1. Try putting your war file in the $CATALINA_HOME/webapps directory
 rather than
  $CATALINA_HOME/webapps/dummy.  If your tomcat installation is set up
  to unpack
 war files (this is the default) it will create the dummy webapp
 directory for you and unpack everything into that directory when you
 restart tomcat.
 
 2. The URL to use to access your webapp will also have to use port
 8080.  Unless you've modified your server.xml file and you're running
 tomcat as root that is.  This set up will work with the out of the box
 tomcat installation.  No need to modify server.xml at all.
 
 You should then be able to access your app like this:
 http://localhost:8080/dummy
 
 See if that simplifies things.
 
 Regards,
 Pete  
 
 On Fri, 6 Sep 2002 12:51:26 -0400 (EDT)
 Dave Robbins [EMAIL PROTECTED] wrote:
 
 Hello All,
 kindof a newbie here so be gentle
 I wrote a little dummy app with Forte 4.0 that consists of a jsp page
 with  a link that calls a servlet which does a database lookup and
 spews out some  data. It works fine with the built in copy of Tomcat
 that comes with Forte. I build a war file and try to deploy it on
 another machine with Tomcat  4.0.4 on it. I put my file dummy.war in
 the $CATALINA_HOME/webapps/dummy  dir and use this command from a
 browser
 
 http://localhost:8080/manager/install?
 path=/dummywar=jar:file:$CATALINA_HOME/webapps/dummy/dummy.war!/
 
 now the command
 
 http://localhost:8080/manager/install
 
 tells me that my app is running, but when I try to access it with
 
 http://localhost/dummy or http://localhost/dummy/index.jsp it says the
  resource is not available. I kinda thought Tomcat could access the
 war file  in it's bundled state but after reading the docs I got the
 impression the  manager app was gonna expand it, is that true? In my
 case the file wasn't  expanded. After some head scratching I figured
 I'd manually expand the war  file in the $CATALINA_HOME/ROOT dir.
 After doing that and restarting Tomcat  everything works fine with
 http://localhost/index.jsp.
  
 So, let me ask a few questions
 
 1) What does the manager app do
 does it modify $CATALINA_HOME/conf/server.xml
 should it expand the war file
 
 2)If I'm gonna deploy multiple apps, what's the typical dir structure
 $CATALINA_HOME/ROOT/app1, $CATALINA_HOME/ROOT/app2, etc
 could i deploy an app outside the Tomcat dir structure (ie
 /home/mydir)
 
 3)Is this the correct flow of things
 Tomcat starts up and reads $CATALINA_HOME/conf/server.xml and now
 knows  about the apps that are installed and what path they're mapped
 to. when a  client tries to access an app, Tomcat goes and looks in
 the jar file and  reads web.xml to discover what all is in the war
 file. Within the war file  any static content goes in the WEB-INF dir,
 class files go in WEB- INF/classes and .jar files goe in WEB-INF/lib
 
 hep me, hep me
 
 Dave
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For additional
 commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 --
 Peter Davison
 [EMAIL PROTECTED]
 
 ...the increased productivity fostered by a friendly environment and
 quality tools is essential to meet ever increasing demands for
 software.
 -- M. D. McIlroy, E. N. Pinson and B. A. Tague
 
 --
 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: war file deployment problem

2002-09-06 Thread Dave Robbins

Thanks a million for the quick feedback
I've got things working now
Once you see how this works it's pretty easy, but I must say getting here 
was kinda tuff
maybe when I get a little further along I'll make up a little tutorial 
titled

how to tie your shoes
before you learn to walk
before you learn to run

Thanx Again

Dave
 You are confusing Tomcat.  If you are going to dynamically deploy your
 webapp, don't have the .war file sitting in $TOMCAT_HOME/webapps.  Have
 it somewhere else.  Everything in $TOMCAT_HOME/webapps is automatically
 deployed and, yes, it is expanded if you *don't* have a Context entry
 defined for that webapp.
 
 when you install like you are, there is already a webapp defined for
 the path you are specifying.  Now you install another webapp under the
 same name.  I don't know how Tomcat handles this situation, but it
 looks as if it hoses the webapp entry.  Make sure to name your webapps
 uniquely and don't put any .war files or expanded directories that you
 plan on dynamically installing through the manager in Tomcat's default
 auto-deploy directory (webapps).
 
 Jake
 
 Quoting Dave Robbins [EMAIL PROTECTED]:
 
 Hello All,
 kindof a newbie here so be gentle
 I wrote a little dummy app with Forte 4.0 that consists of a jsp page
 with  a link that calls a servlet which does a database lookup and
 spews out some
 
 data. It works fine with the built in copy of Tomcat that comes with
 Forte. I build a war file and try to deploy it on another machine with
 Tomcat  4.0.4 on it. I put my file dummy.war in the
 $CATALINA_HOME/webapps/dummy  dir and use this command from a browser
 
 http://localhost:8080/manager/install?
 path=/dummywar=jar:file:$CATALINA_HOME/webapps/dummy/dummy.war!/
 
 now the command
 
 http://localhost:8080/manager/install
 
 tells me that my app is running, but when I try to access it with
 
 http://localhost/dummy or http://localhost/dummy/index.jsp it says the
  resource is not available. I kinda thought Tomcat could access the
 war file
 
 in it's bundled state but after reading the docs I got the impression
 the  manager app was gonna expand it, is that true? In my case the
 file wasn't  expanded. After some head scratching I figured I'd
 manually expand the war  file in the $CATALINA_HOME/ROOT dir. After
 doing that and restarting Tomcat
 
 everything works fine with http://localhost/index.jsp.
  
 So, let me ask a few questions
 
 1) What does the manager app do
 does it modify $CATALINA_HOME/conf/server.xml
 should it expand the war file
 
 2)If I'm gonna deploy multiple apps, what's the typical dir structure
 $CATALINA_HOME/ROOT/app1, $CATALINA_HOME/ROOT/app2, etc
 could i deploy an app outside the Tomcat dir structure (ie
 /home/mydir)
 
 3)Is this the correct flow of things
 Tomcat starts up and reads $CATALINA_HOME/conf/server.xml and now
 knows  about the apps that are installed and what path they're mapped
 to. when a  client tries to access an app, Tomcat goes and looks in
 the jar file and  reads web.xml to discover what all is in the war
 file. Within the war file  any static content goes in the WEB-INF dir,
 class files go in WEB- INF/classes and .jar files goe in WEB-INF/lib
 
 hep me, hep me
 
 Dave
 
 
 
 --
 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]



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