Re: New ROOT

2002-01-22 Thread Guillermo Labatte

John Kolvereid wrote:

Hi GL,
I tried it again.  This time it worked.  Now, instead of tricking Tom,
how can I simply change the default directory from webapps/ROOT to (say)
/home/httpd/jsp.  And then how can I address jsp files from non-jsp files.
Do I have to
a href=http://hostname/a.jsp:8080

The URL should be http://hostname:8080/a.jsp


And if so, how do I return.  Must I then
a href=http://hostname/a.htm
Any thoughts.  Please advise.  Thanks.

That's right.

Now, I think it is better to maintain all content (static and non 
static) under the same roof (i.e. use the same URL space)

After all, you are building a web application. That application consists 
of dynamic content (.jsp, servlets) and static content (html, images). 
Why separate them? If you keep your application together it would be 
easier to manage it (backups, version control, relocation, etc.)

Tomcat can serve static content by itself, so you can put all .html and 
image files alongside your .jsp files. You can also instruct Tomcat to 
use the port 80. This would be the simplest setup and you would not have 
to worry about that :8080 in URLS. Here at work we use this setup for 
individual developer's PCs. So each developer has his own Tomcat server 
in his own PC.

We deploy our application in an intranet server. Since that server also 
uses Apache, there is a conflict with port 80. So we added another IP 
address to that server and make Apache use one of the IP, and Tomcat the 
other. So our webapp still uses port 80 and we do not have to worry 
about the URLs. This setup is still fairly simple.

If you cannot add a IP address to your server, or find Tomcat too slow 
for static content, you can still integrate Tomcat and Apache (using 
mod_jk), and make Apache serve the static content, and Tomcat the 
dynamic content using the same URL space. Since this setup proved to be 
cumbersome (at least for me) we sticked to the previous setup, since we 
did not encounter any performance problem serving our (relativelly 
small) static content with Tomcat.













--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




New ROOT

2002-01-21 Thread Patrick Santana

Hello!

I need to change my folder root to /home/web.

How Can I do it?


Thanks!


-- 

Patrick Santana
TAU CSI
[EMAIL PROTECTED]
Phone:  55 19 32514001
Mobile: 55 19 91223757



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread Guillermo Labatte

Patrick Santana wrote:

Hello!

I need to change my folder root to /home/web.

How Can I do it?


Thanks!


Maybe there is a better way, but I do it using a symbolic link.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi,
I am also interested in knowing how to do this.  I know I can link to
the JSPs using something like:  a href=http://hostname.any.jsp:8080
Unfortunately, I don't know how to construct a return reference.
Changing the [webapps]/ROOT would eliminate the need for this.  I suspect
it has something to do w/ the system.xml configuration file,  but I can't
find any reference to webapps/ROOT, so I can't change it.  Please
advise.  Thanks.

Patrick Santana wrote:

 Hello!

 I need to change my folder root to /home/web.

 How Can I do it?

 Thanks!

 --
 
 Patrick Santana
 TAU CSI
 [EMAIL PROTECTED]
 Phone:  55 19 32514001
 Mobile: 55 19 91223757
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.odinfo.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi,
Tried to do that but it failed for me.  I created ln from
/webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
When I tried to start Tom it said it couldn't find any files.  Then I
returned all the files to /webapps/ROOT (as a legit dir), and Tom found
them again.  Am I setting the ln up wrong?  Please advise.  Thanks.

Guillermo Labatte wrote:

 Patrick Santana wrote:

 Hello!
 
 I need to change my folder root to /home/web.
 
 How Can I do it?
 
 
 Thanks!
 
 
 Maybe there is a better way, but I do it using a symbolic link.

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.odinfo.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread Guillermo Labatte

mv /tomcatdir/webapps/ROOT /home/httpd/.
mv /home/httpd/ROOT /home/httpd/jsp
ln -s /home/httpd/jsp /tomcatdir/webapps/ROOT

should do the trick.

Tomcat (being a Java application) cannot tell the difference between a 
regular directory and a linked directory. So maybe you set the link 
wrong, or maybe there were a problem with the file permissions (i.e. the 
user under which Tomcat were running did not have the necessary 
privileges to access the /home/httpd/jsp directory or its files)

John Kolvereid wrote:

Hi,
Tried to do that but it failed for me.  I created ln from
/webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
When I tried to start Tom it said it couldn't find any files.  Then I
returned all the files to /webapps/ROOT (as a legit dir), and Tom found
them again.  Am I setting the ln up wrong?  Please advise.  Thanks.

Guillermo Labatte wrote:

Patrick Santana wrote:

Hello!

I need to change my folder root to /home/web.

How Can I do it?


Thanks!


Maybe there is a better way, but I do it using a symbolic link.





--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread Guillermo Labatte

Look into the server.xml file. There you will find several Context 
entries. The ROOT context has the path element with value  (empty 
string). Change the docBase  attribute of that context and use anything 
you like instead of ROOT. As far as I know the directory you use as 
docBase should be relative to webapps, tough. I think you can use a .jar 
file as a docBase, instead of a directory. Maybe someone more 
knowledgeable than me could enlighten us.

John Kolvereid wrote:

Hi,
   More to the point:  How does one respecify the default directory which
is shipped as
$CATALINA_HOME/webapps/ROOT
Is it in the server.xml, or the web.xml, or somewhere else.  I sure can't
find it.
Please advise.

John Kolvereid wrote:

Hi,
Tried to do that but it failed for me.  I created ln from
/webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
When I tried to start Tom it said it couldn't find any files.  Then I
returned all the files to /webapps/ROOT (as a legit dir), and Tom found
them again.  Am I setting the ln up wrong?  Please advise.  Thanks.

Guillermo Labatte wrote:

Patrick Santana wrote:

Hello!

I need to change my folder root to /home/web.

How Can I do it?


Thanks!


Maybe there is a better way, but I do it using a symbolic link.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.odinfo.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread Christopher K. St. John

John Kolvereid wrote:
 
 How does one respecify the default directory which
 is shipped as: $CATALINA_HOME/webapps/ROOT


 In server.xml:

 Context path= docBase=SOMEOTHERROOT/


 Is it in the server.xml, or the web.xml, or somewhere
 else. I sure can't find it.


 Somewhere else. If you auto-deploy and don't specify
a root Context as above, Tomcat uses the hardcoded
default in org.apache.catalina.startup.HostConfig.


-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi GL,
I tried it again.  This time it worked.  Now, instead of tricking Tom,
how can I simply change the default directory from webapps/ROOT to (say)
/home/httpd/jsp.  And then how can I address jsp files from non-jsp files.
Do I have to
a href=http://hostname/a.jsp:8080
And if so, how do I return.  Must I then
a href=http://hostname/a.htm
Any thoughts.  Please advise.  Thanks.

Guillermo Labatte wrote:

 mv /tomcatdir/webapps/ROOT /home/httpd/.
 mv /home/httpd/ROOT /home/httpd/jsp
 ln -s /home/httpd/jsp /tomcatdir/webapps/ROOT

 should do the trick.

 Tomcat (being a Java application) cannot tell the difference between a
 regular directory and a linked directory. So maybe you set the link
 wrong, or maybe there were a problem with the file permissions (i.e. the
 user under which Tomcat were running did not have the necessary
 privileges to access the /home/httpd/jsp directory or its files)

 John Kolvereid wrote:

 Hi,
 Tried to do that but it failed for me.  I created ln from
 /webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
 When I tried to start Tom it said it couldn't find any files.  Then I
 returned all the files to /webapps/ROOT (as a legit dir), and Tom found
 them again.  Am I setting the ln up wrong?  Please advise.  Thanks.
 
 Guillermo Labatte wrote:
 
 Patrick Santana wrote:
 
 Hello!
 
 I need to change my folder root to /home/web.
 
 How Can I do it?
 
 
 Thanks!
 
 
 Maybe there is a better way, but I do it using a symbolic link.
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.akaodin.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi again,
Seems to be a buffering problem.  When I mv'd ROOT back to its original
location and retried Tom, it couldn't find it, even after restarting the
browser, and restarting Tom.  Then all of a sudden out of the blue it was
ok.  Guess I'll just have to try any new changes several times before I
conclude they do or don't work.

Guillermo Labatte wrote:

 mv /tomcatdir/webapps/ROOT /home/httpd/.
 mv /home/httpd/ROOT /home/httpd/jsp
 ln -s /home/httpd/jsp /tomcatdir/webapps/ROOT

 should do the trick.

 Tomcat (being a Java application) cannot tell the difference between a
 regular directory and a linked directory. So maybe you set the link
 wrong, or maybe there were a problem with the file permissions (i.e. the
 user under which Tomcat were running did not have the necessary
 privileges to access the /home/httpd/jsp directory or its files)

 John Kolvereid wrote:

 Hi,
 Tried to do that but it failed for me.  I created ln from
 /webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
 When I tried to start Tom it said it couldn't find any files.  Then I
 returned all the files to /webapps/ROOT (as a legit dir), and Tom found
 them again.  Am I setting the ln up wrong?  Please advise.  Thanks.
 
 Guillermo Labatte wrote:
 
 Patrick Santana wrote:
 
 Hello!
 
 I need to change my folder root to /home/web.
 
 How Can I do it?
 
 
 Thanks!
 
 
 Maybe there is a better way, but I do it using a symbolic link.
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.akaodin.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi GL,
I'd like to think it was as simple as that.  My server.xml does have a
Root Context and a docBase of ROOT, but it is commented out.  That was my
very 1st try - but that didn't pan out - obviously.
I suspect that the default directory is either hard-wired (heaven forbid), or
located in some other config (.xml) file.  Please advise.  Thanks.

Guillermo Labatte wrote:

 Look into the server.xml file. There you will find several Context
 entries. The ROOT context has the path element with value  (empty
 string). Change the docBase  attribute of that context and use anything
 you like instead of ROOT. As far as I know the directory you use as
 docBase should be relative to webapps, tough. I think you can use a .jar
 file as a docBase, instead of a directory. Maybe someone more
 knowledgeable than me could enlighten us.

 John Kolvereid wrote:

 Hi,
More to the point:  How does one respecify the default directory which
 is shipped as
 $CATALINA_HOME/webapps/ROOT
 Is it in the server.xml, or the web.xml, or somewhere else.  I sure can't
 find it.
 Please advise.
 
 John Kolvereid wrote:
 
 Hi,
 Tried to do that but it failed for me.  I created ln from
 /webapps/ROOT to /home/httpd/jsp and moved all the ROOT files there.
 When I tried to start Tom it said it couldn't find any files.  Then I
 returned all the files to /webapps/ROOT (as a legit dir), and Tom found
 them again.  Am I setting the ln up wrong?  Please advise.  Thanks.
 
 Guillermo Labatte wrote:
 
 Patrick Santana wrote:
 
 Hello!
 
 I need to change my folder root to /home/web.
 
 How Can I do it?
 
 
 Thanks!
 
 
 Maybe there is a better way, but I do it using a symbolic link.
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
   John Kolvereid
   http://www.odinfo.com
   http://www.kolvereid.com
   [EMAIL PROTECTED]
   1.610.296.4485
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.akaodin.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-21 Thread John Kolvereid

Hi,
Thanks that works.  I hadn't tried the obvious.  Now, is there a way
to respecify where the root context is located, or is it always in
webapps?  Short of finding the answer, I know I can specify a ln.
Also, (and this IS a related question), does anyone know how to specify a
relative URL w/ a PORT #.  That way I can bounce back and forth from jsp
to html.

Christopher K. St. John wrote:

 John Kolvereid wrote:
 
  How does one respecify the default directory which
  is shipped as: $CATALINA_HOME/webapps/ROOT
 

  In server.xml:

  Context path= docBase=SOMEOTHERROOT/

  Is it in the server.xml, or the web.xml, or somewhere
  else. I sure can't find it.
 

  Somewhere else. If you auto-deploy and don't specify
 a root Context as above, Tomcat uses the hardcoded
 default in org.apache.catalina.startup.HostConfig.

 --
 Christopher St. John [EMAIL PROTECTED]
 DistribuTopia http://www.distributopia.com

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
  John Kolvereid
  http://www.akaodin.com
  http://www.kolvereid.com
  [EMAIL PROTECTED]
  1.610.296.4485



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]