RE: Virtual Host to Redirect

2003-11-18 Thread Boemio, Neil \(GEI, FGI\)
I need for the url address in the client's browser to change to our main domain.  A 
redirect (ReWrite) is needed to do this.  The Apache ReWrite for JSP pages is not 
happening because of the connector sending *.jsp to Tomcat.

-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 12:05 AM
To: 'Tomcat Users List'
Subject: RE: Virtual Host to Redirect


Why don't you just set the DNS so that all hosts resolve to the same
machine, and then set the default virtual host to have the files you
want in it?


George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585

-Original Message-
From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2003 6:26 PM
To: Tomcat Users List
Subject: Virtual Host to Redirect


I have a sever with 2 IPs.  One of the IPs (say 1.2.3.4) is going to be
used as a redirector to point all our domains to one main domain.  
Example: Typing in
  another.name.com  will send the browser to my.main.com
  another.name.com/somepage.jsp will send the browser to my.main.com
  yetanother.name.com   will send the browser to my.main.com

This will be accomplished by having all our domains point to this one
redirector IP in our DNS.

I'm running Apache 2.0.47 and Tomcat 4.1.27 with JK2 as the connector.

So in my Apache conf I have:


RewriteEngine On
RewriteRule /.* http://my.main.com/ [R]


Now this works fine if I go to  http://1.2.3.4/.  It redirects to
my.main.com just fine.  My problem is that if I enter something like
http://1.2.3.4/somepage.jsp, then it does not get redirected.  Instead
Tomcat serves it up.  I believe this is happening because I have the
following in my workers2.properties file under the Apache conf
directory:

# Map JSPs to the Web server uri space
[uri:/*.jsp]
worker=ajp13:localhost:8009 

So it seems the connector is sending all JSPs to Tomcat and the Rewrite
in the VirtualHost is never getting to do it's job.  But of course, I
need JSPs to go to Tomcat.

Does anyone know how to get around this problem?  Or perhaps there is a
better way to accomplish what I'm trying to do?

Thanks a bunch!
Neil

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


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



Virtual Host to Redirect

2003-11-18 Thread Boemio, Neil \(GEI, FGI\)
I have a sever with 2 IPs.  One of the IPs (say 1.2.3.4) is going to be used as a 
redirector to point all our domains to one main domain.  
Example: Typing in
  another.name.com  will send the browser to my.main.com
  another.name.com/somepage.jsp will send the browser to my.main.com
  yetanother.name.com   will send the browser to my.main.com

This will be accomplished by having all our domains point to this one redirector IP in 
our DNS.

I'm running Apache 2.0.47 and Tomcat 4.1.27 with JK2 as the connector.

So in my Apache conf I have:


RewriteEngine On
RewriteRule /.* http://my.main.com/ [R]


Now this works fine if I go to  http://1.2.3.4/.  It redirects to my.main.com just 
fine.  My problem is that if I enter something like http://1.2.3.4/somepage.jsp, then 
it does not get redirected.  Instead Tomcat serves it up.  I believe this is happening 
because I have the following in my workers2.properties file under the Apache conf 
directory:

# Map JSPs to the Web server uri space
[uri:/*.jsp]
worker=ajp13:localhost:8009 

So it seems the connector is sending all JSPs to Tomcat and the Rewrite in the 
VirtualHost is never getting to do it's job.  But of course, I need JSPs to go to 
Tomcat.

Does anyone know how to get around this problem?  Or perhaps there is a better way to 
accomplish what I'm trying to do?

Thanks a bunch!
Neil

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



RE: Set Tomcat to show deprecation warnings

2003-10-15 Thread Boemio, Neil (GEI, FGI)
Yes, I meant shown in the browser.  Bummer.

OK ... when I tried to compile one of the JSP java files in the work directory, I get:


contactus_jsp.java:6: package org.apache.jasper.runtime does not exist
import org.apache.jasper.runtime.*;
^
contactus_jsp.java:11: cannot resolve symbol
symbol  : class HttpJspBase
location: class org.apache.jsp.contactus_jsp
public class contactus_jsp extends HttpJspBase {


I assume I need some tomcat jar in my classpath which is not currently there?  Which 
one has org.apache.jasper.runtime.* ?

Thanks,
Neil


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 9:04 AM
To: Tomcat Users List
Subject: RE: Set Tomcat to show deprecation warnings



Howdy,
I assume that by "shown" you mean shown in the browser, as opposed to
tomcat's log?  I don't think so.  That's because by default jasper
doesn't compile with deprecation ;)  You could change the jasper source
code to do this.  But you have two other options:

- Take the precompiled .java files for your JSPs from the work
directory, compiled them with javac -deprecation yourself, and look for
the warnings.

- Use JspC to precompile your JSPs, then run them through javac
-deprecation, and look at the warnings.  This can be done completely
offline in Ant.  You can even fail the build if there are any warnings.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-----
>From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 15, 2003 1:55 AM
>To: [EMAIL PROTECTED]
>Subject: Set Tomcat to show deprecation warnings
>
>When I hit a JSP page and there are errors, Tomcat shows a page with
all
>the errors.  If there are no errors, but there are deprecated methods
being
>used, Tomcat does not show this.  Is there a way I can set it up so
that
>deprecation warnings are shown when I hit a JSP page?
>
>Thanks,
>Neil
>



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]



Set Tomcat to show deprecation warnings

2003-10-14 Thread Boemio, Neil (GEI, FGI)
When I hit a JSP page and there are errors, Tomcat shows a page with all the errors.  
If there are no errors, but there are deprecated methods being used, Tomcat does not 
show this.  Is there a way I can set it up so that deprecation warnings are shown when 
I hit a JSP page?
 
Thanks,
Neil
 


RE: preventing directory listings

2003-10-06 Thread Boemio, Neil (GEI, FGI)
In the web.xml under the conf directory, change the listings parameter to false for 
the default servlet.  This is for 4.1.27, don't know if the same applies to 3.3.1a

  
default

  org.apache.catalina.servlets.DefaultServlet


debug
0


listings
false

1


-Original Message-
From: Denver J. Saldanha [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 1:29 AM
To: [EMAIL PROTECTED]
Subject: preventing directory listings


Hi,
 
I am using tomcat 3.3.1a. Now when i type sin the url
http://localhost:8080/
  I can see the directory listing. Is there any
way
to prevent this. Could you please let me know about this if there is a
way. 
 
Thanks and Regards
Denver Saldanha

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



RE: Apache Authentication with Tomcat

2003-09-30 Thread Boemio, Neil (GEI, FGI)
Awesome!   Works great now!  Thanks a bunch!

-Original Message-
From: Robert Priest [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 12:03 PM
To: 'Tomcat Users List'
Subject: RE: Apache Authentication with Tomcat



http://marc.theaimsgroup.com/?l=tomcat-user&m=106070071117870&w=2

-Original Message-----
From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 11:59 AM
To: Tomcat Users List
Subject: RE: Apache Authentication with Tomcat


Excellent!  This did the trick.  Thanks!

Now I get prompted and I can login  but for some reason,
request.getRemoteUser(), returns null.  I am porting this application to
Tomcat and this used to work just fine in JRun.  Any ideas?

-Original Message-
From: Morgan Pyne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 11:27 AM
To: Tomcat Users List
Subject: RE: Apache Authentication with Tomcat


Hi Neil,

Use a "Location" directive in your httpd.conf instead. e.g.:


AuthType Basic
AuthName "FGIC Downloads"
AuthUserFile d:\apache\apache2\conf\passwords
AuthGroupFile d:\apache\apache2\conf\groups
Require group FGICMoodys


"Directory" directives apply to the filesystem, "Location" directives apply
to the URL space.

See the Apache manual for more details:
http://httpd.apache.org/docs-2.0/mod/core.html#location

Regards,
Morgan


> -Original Message-
> From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 30, 2003 17:17
> To: [EMAIL PROTECTED]
> Subject: Apache Authentication with Tomcat
> 
> 
> I'm trying to protect a /downloads url in apache.   My webapp 
> in Tomcat is in ROOT.  So in the workers2.properties file 
> under apache, I have:
> 
> # Map the webapp to the Web server uri space
> [uri:/*]
> info=my website
> 
> So my app is working fine  requests for /* are passed to 
> Tomcat and things are wonderful. But I want to protect 
> /downloads using apache.  But there really is no directory 
> under apache called \apache\apache2\htdocs\downloads.  There 
> is no need for one since requests are sent to Tomcat.  The 
> real directory is \Tomcat4.1\webapps\ROOT\downloads.
> 
> When I remove [uri:/*] from workers2.properties and create a 
> dummy htdocs\downloads directory under apache, the apache 
> authentication works fine.  But when I put [uri:/*] back, I 
> do not get prompted for ID/Password.  Here is what I have in 
> httpd.conf.  Any ideas?
> 
> 
> AuthType Basic
> AuthName "FGIC Downloads"
> AuthUserFile d:\apache\apache2\conf\passwords
> AuthGroupFile d:\apache\apache2\conf\groups
> Require group FGICMoodys
> 
> 
> I tried using:  d:\Tomcat4.1\webapps\ROOT\downloads> but that didn't work.  
> Ideally, I want to tell apache to protect a URL not a file 
> system path, but obviously, that is not the syntax for the 
> Directory directive.
> 
> Windows 2000
> Tomcat 4.1.27
> Apache 2.0.47
> JK2 2.0.43
> 
> -
> 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]

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

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



RE: Apache Authentication with Tomcat

2003-09-30 Thread Boemio, Neil (GEI, FGI)
Excellent!  This did the trick.  Thanks!

Now I get prompted and I can login  but for some reason, request.getRemoteUser(), 
returns null.  I am porting this application to Tomcat and this used to work just fine 
in JRun.  Any ideas?

-Original Message-
From: Morgan Pyne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 11:27 AM
To: Tomcat Users List
Subject: RE: Apache Authentication with Tomcat


Hi Neil,

Use a "Location" directive in your httpd.conf instead. e.g.:


AuthType Basic
AuthName "FGIC Downloads"
AuthUserFile d:\apache\apache2\conf\passwords
AuthGroupFile d:\apache\apache2\conf\groups
Require group FGICMoodys


"Directory" directives apply to the filesystem, "Location" directives apply to the URL 
space.

See the Apache manual for more details:
http://httpd.apache.org/docs-2.0/mod/core.html#location

Regards,
Morgan


> -Original Message-
> From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 30, 2003 17:17
> To: [EMAIL PROTECTED]
> Subject: Apache Authentication with Tomcat
> 
> 
> I'm trying to protect a /downloads url in apache.   My webapp 
> in Tomcat is in ROOT.  So in the workers2.properties file 
> under apache, I have:
> 
> # Map the webapp to the Web server uri space
> [uri:/*]
> info=my website
> 
> So my app is working fine  requests for /* are passed to 
> Tomcat and things are wonderful. But I want to protect 
> /downloads using apache.  But there really is no directory 
> under apache called \apache\apache2\htdocs\downloads.  There 
> is no need for one since requests are sent to Tomcat.  The 
> real directory is \Tomcat4.1\webapps\ROOT\downloads.
> 
> When I remove [uri:/*] from workers2.properties and create a 
> dummy htdocs\downloads directory under apache, the apache 
> authentication works fine.  But when I put [uri:/*] back, I 
> do not get prompted for ID/Password.  Here is what I have in 
> httpd.conf.  Any ideas?
> 
> 
> AuthType Basic
> AuthName "FGIC Downloads"
> AuthUserFile d:\apache\apache2\conf\passwords
> AuthGroupFile d:\apache\apache2\conf\groups
> Require group FGICMoodys
> 
> 
> I tried using:  d:\Tomcat4.1\webapps\ROOT\downloads> but that didn't work.  
> Ideally, I want to tell apache to protect a URL not a file 
> system path, but obviously, that is not the syntax for the 
> Directory directive.
> 
> Windows 2000
> Tomcat 4.1.27
> Apache 2.0.47
> JK2 2.0.43
> 
> -
> 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]

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



Apache Authentication with Tomcat

2003-09-30 Thread Boemio, Neil (GEI, FGI)
I'm trying to protect a /downloads url in apache.   My webapp in Tomcat is in ROOT.  
So in the workers2.properties file under apache, I have:

# Map the webapp to the Web server uri space
[uri:/*]
info=my website

So my app is working fine  requests for /* are passed to Tomcat and things are 
wonderful.
But I want to protect /downloads using apache.  But there really is no directory under 
apache called \apache\apache2\htdocs\downloads.  There is no need for one since 
requests are sent to Tomcat.  The real directory is \Tomcat4.1\webapps\ROOT\downloads.

When I remove [uri:/*] from workers2.properties and create a dummy htdocs\downloads 
directory under apache, the apache authentication works fine.  But when I put [uri:/*] 
back, I do not get prompted for ID/Password.  Here is what I have in httpd.conf.  Any 
ideas?


AuthType Basic
AuthName "FGIC Downloads"
AuthUserFile d:\apache\apache2\conf\passwords
AuthGroupFile d:\apache\apache2\conf\groups
Require group FGICMoodys


I tried using:  but that didn't work.  
Ideally, I want to tell apache to protect a URL not a file system path, but obviously, 
that is not the syntax for the Directory directive.

Windows 2000
Tomcat 4.1.27
Apache 2.0.47
JK2 2.0.43

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



RE: Full Package Names??

2003-09-29 Thread Boemio, Neil (GEI, FGI)
OK.  Looks like I had some weird stuff going on.  This seems to work now.  But I was 
messing around with the OS classpath (in order to compile some other stuff) and it 
seems this works now when it didn't before.  But I was under the impression that 
Tomcat does not use the OS's classpath environment variable.  Is that true?

Also, is it true that Tomcat (or at least version 4.1.27) has trouble with unpackaged 
classes?  The issue below came to light because I was originally using unpackaged 
classes with JRun (old version of JRun - 2.3.3).  When I tried putting these classes 
in the classes directory under my app's WEB-INF directory, they could not be found.  
During my search to resolve this, I noticed many others with a similar problem, and 
the solution was always to put the classes in a package.  So that's what I did, and it 
worked.  So is there a known issue with unpackaged classes?  Is this supposed to work?

Thanks,
Neil


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 4:22 PM
To: Tomcat Users List
Subject: RE: Full Package Names??



Howdy,

>I'm just starting to use Tomcat (4.1.27) and I'm trying to get my
existing
>app to work.  It worked fine with JRun, but it seems that Tomcat
requires
>that I specify the full package name for a class whenever I use it??
Is
>this true?

No, tomcat does not required that.  Tomcat follows the Java Language
Specification regarding package imports, as all servers should.

>For example,  I get, "cannot resolve symbol" for the following:
>--
>import com.fgic.Utility.*
>Utility util = new Utility();

You need a semicolon at the end of the import statement.  You also
probably mean import com.fgic.Utility; rather than import
com.fgic.Utility.*;

>--
>But when I change it like below, it works fine:
>
>import com.fgic.Utility.*
>com.fgic.Utility util = new com.fgic.Utility();

That's because your import statement is flawed.  I don't buy that the
above works fine as it shouldn't even compile.

>So does this means I have to go through all my code and specify the
full
>package name everywhere?

No.

>Note: in JRun, I didn't even have to specify the package name in the
import
>statement.  It was able to find it with just: import Utility.*

That's strange at best.

In general, you have to import classes you use, or use their fully
qualified name if you don't import them.

If you post the entire relevant piece of code along with the compilation
errors in full, we could help more.

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]



RE: Full Package Names??

2003-09-29 Thread Boemio, Neil (GEI, FGI)
No, the semicolon was missing just in the e-mail.

-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 4:36 PM
To: Tomcat Users List
Subject: RE: Full Package Names??


Do you really have:

import com.fgic.Utility.*
Utility util = new Utility();

If so, I don't think that import is doing what you hope for.
I think:

import com.fgic.Utility;

would work better.

Larry

> -Original Message-
> From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 29, 2003 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: Full Package Names??
> 
> 
> I'm just starting to use Tomcat (4.1.27) and I'm trying to 
> get my existing app to work.  It worked fine with JRun, but 
> it seems that Tomcat requires that I specify the full package 
> name for a class whenever I use it??  Is this true?
> 
> For example,  I get, "cannot resolve symbol" for the following:
> --
> import com.fgic.Utility.*
> Utility util = new Utility();
> 
> --
> But when I change it like below, it works fine:
> 
> import com.fgic.Utility.*
> com.fgic.Utility util = new com.fgic.Utility();
> 
> --
> So does this means I have to go through all my code and 
> specify the full package name everywhere?
> 
> Note: in JRun, I didn't even have to specify the package name 
> in the import statement.  It was able to find it with just: 
> import Utility.*
> 
> -
> 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]

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



Full Package Names??

2003-09-29 Thread Boemio, Neil (GEI, FGI)
I'm just starting to use Tomcat (4.1.27) and I'm trying to get my existing app to 
work.  It worked fine with JRun, but it seems that Tomcat requires that I specify the 
full package name for a class whenever I use it??  Is this true?

For example,  I get, "cannot resolve symbol" for the following:
--
import com.fgic.Utility.*
Utility util = new Utility();

--
But when I change it like below, it works fine:

import com.fgic.Utility.*
com.fgic.Utility util = new com.fgic.Utility();

--
So does this means I have to go through all my code and specify the full package name 
everywhere?

Note: in JRun, I didn't even have to specify the package name in the import statement. 
 It was able to find it with just: import Utility.*

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