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
>http://hostname/a.jsp:8080>
>
The URL should be http://hostname:8080/a.jsp

>
>And if so, how do I return.  Must I then
>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:   
For additional commands: 
Troubles with the list: 




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 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

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:   
For additional commands: 
Troubles with the list: 




Re: use JSP open new window

2002-01-21 Thread Guillermo Labatte

Galbayar wrote:

>how to use sendRedirect method to open new browser window?
>
As far as I know, sendRedirect works at the HTTP level. In order to open 
a new browser window you need to operate at the HTML/JavaScript level.

Use something like openWindow() 
in your HTML code in order to open a new window without user 
intervention. Please check the exact syntax in your HTML/JavaScript manuals.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: the route of the directories , la ruta de los directorios

2002-01-17 Thread Guillermo Labatte

Cesar Rodezno wrote:

>English: How i can change the route of the directories where I keep my files
>by default, I don't want to use ROOT?
>In particular that of the classes.
>How can i do a  directory virtual in a route different from webapp?
>
>
>EspaƱol: Como cambio la ruta de los directorios donde guardo mis  archivos,
>yo no quiero usar ROOT?; En particular el de las classes.
>Como creo directorios virtuales en una ruta diferente de webapp?
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 
>
I'm just starting using Tomcat, so I don't know i this is the best, or 
recommended way, but at least it worked for me:

In $CATALINA_HOME/conf/servler.xml use



Note that the value for the path attribute is an empty String.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: tomcat servlet output

2002-01-02 Thread Guillermo Labatte

Guido Medina wrote:

>if you are working in linux try to send the log file to any terminal, for
>example /dev/tty9 and after you'll see all the System.out.println pressing
>Alt+F9, any linux person knows that, use the terminals for logs my friend.
>
>Regards and happy new year,
>
>Guido.
>
>-Original Message-
>From: Pae Choi [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 01, 2002 12:07 PM
>To: Tomcat Users List
>Subject: Re: tomcat servlet output
>
>
>That will look ugly even though it's for the test purpose. Try
>use the log file. You will more than likely need them in the
>production environment unless that is not your preference
>and no necessary.
>
>
>Pae
>
>>At 05:13 PM 12/31/2001 -0800, you wrote:
>>
>>>My servlets in Tomcat works just fine, but I was wondering where does the
>>>
>>'System.out.println("bla bla...")' goes when the servelet is executed.  I
>>would like to use this to debug my servlet.
>>
>>>thanks,
>>>
>>>Sanjeev
>>>
>>
>>In my case (Win 2K), System.out.println goes to the Catalina console
>>
>window
>
>>that's spawned when Tomcat is started.
>>

In Linux it goes to the file catalina.out in CATALINA_HOME/logs.

I use tail -f catalina.out in order to see the messages while they are 
written.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: