Re: sslHandshakeException

2011-01-17 Thread g f
Thanks for the reply PID.
I will have to post the full stack tomorrow.
No error messages about the connector during startup.
I think you are right though , with regard to the outbound, the applications
do make requests to other servers and/or apps.
The odd thing is, apache does not throw any errors even in debug mode. If
apache is handling all things authentication I dont understand why tomcat
would be complaining about certs. Would the response from the outbound
connection be the issue? Also If I do not force common access cards it
works fine.
I will post the full stack tomorrow.
Cheers!

On Fri, Jan 14, 2011 at 5:12 PM, Pid p...@pidster.com wrote:

 On 1/14/11 10:31 PM, g f wrote:
  Hello all,
  Not sure if this is the proper area to post but here goes.
  I have a debian os running Apache 2.2.16(debian) along with tomcat
 6.0.29. I
  use mod_jk as well as mod_auth_kerb module for apache.
 
  I use common access cards and allow apache kerb module to handle all auth
  and it works just fine except when I access some of my apps that have
 ajax
  calls back to the same server. Now if I force common access card in
 apache I
  get errors in catalina.out as follows:
 
  javax.net.ssl.SSLHandshakeException: Received fatal alert:
  handshake_failure.
 
  Now as I said I dont do any auth at the tomcat level its all done at the
  apache level. It seems like tomcat is trying to validate the client certs
  that mod_jk is passing along. The question is, how do I tell tomcat to
  ignore the client certs?
 
  I only have the AJP connector active in tomcat and it looks like the
  following:
 
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443
  tomcatAuthentication=false clientAuth=false SSLVerifyClient=false
 /
 
  Any ideas?

 Umm, that sounds odd.

 Do you get any messages about the connector during server startup?

 Do you get a stacktrace or just a log message?  What is the full log
 line or stack?

  If there is an easy way to accept the client certs (even though I do
 nothing
  with them) then I could do that as well.



 Are you sure it's not due to an outbound connection attempt from some
 part of your app?


 p

  Thanks for any advice and sorry if this is not the correct forum for
 this.





sslHandshakeException

2011-01-14 Thread g f
Hello all,
Not sure if this is the proper area to post but here goes.
I have a debian os running Apache 2.2.16(debian) along with tomcat 6.0.29. I
use mod_jk as well as mod_auth_kerb module for apache.

I use common access cards and allow apache kerb module to handle all auth
and it works just fine except when I access some of my apps that have ajax
calls back to the same server. Now if I force common access card in apache I
get errors in catalina.out as follows:

javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure.

Now as I said I dont do any auth at the tomcat level its all done at the
apache level. It seems like tomcat is trying to validate the client certs
that mod_jk is passing along. The question is, how do I tell tomcat to
ignore the client certs?

I only have the AJP connector active in tomcat and it looks like the
following:

Connector port=8009 protocol=AJP/1.3 redirectPort=8443
tomcatAuthentication=false clientAuth=false SSLVerifyClient=false /

Any ideas?

If there is an easy way to accept the client certs (even though I do nothing
with them) then I could do that as well.
Thanks for any advice and sorry if this is not the correct forum for this.

Cheers!


Re: what ist $CATALINA_HOME/server ? (debian)

2010-12-08 Thread g f
Not sure of your distro and your requirements but for squeeze there is:
http://packages.debian.org/squeeze/tomcat6

lenny:
http://packages.debian.org/lenny/tomcat5.5

Now the script modification is a different story.
Cheers,
GF



On Wed, Dec 8, 2010 at 3:02 AM, Christoph Kukulies k...@kukulies.orgwrote:

 Am 07.12.2010 22:19, schrieb g f:

  Did you aptitude install tomcat6?
 If so why not modify the init.d script that came with that.
 If not perhaps you want to try to use the debs.
 apt-get install tomcat6
 G

  AFAIK there isn't such a thing like a tomcat6 package under the debian
 distribution.
 And I would have to tackle the debianisms in that script. (jsvc e.g.)

 --
 Christoph P.U. Kukulies



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: what ist $CATALINA_HOME/server ? (debian)

2010-12-07 Thread g f
Did you aptitude install tomcat6?
If so why not modify the init.d script that came with that.
If not perhaps you want to try to use the debs.
apt-get install tomcat6
G

On Tue, Dec 7, 2010 at 1:45 PM, Juha Laiho juha.la...@iki.fi wrote:

 On 7.12.2010 18:45, Christoph Kukulies wrote:
  Can be found any instructions to build your own
  /etc/init.d/tomcat_startup script.
  catalina.sh seems to have provisions for it but I don't see a hook where
 to
  put in the user (e.g. tomcat55 or tomcat6) catalina runs under.

 No need to have a hook there: catalina.sh should be run using the
 account you wish to use to run your Tomcat.
 --
 ..Juha

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




getting mod_auth_kerb to trust a request from tomcat

2010-06-04 Thread g f
Hello all,
This may be better suited to Apache users group but I will try here in case.

I am running tomcat 6.0.24 ,  jre 1.6.0_16, Apache/2.2.15 (Debian) ,
mod_auth_kerb/5.4  , mod_jk/1.2.28 mod_python/3.3.1 all installed via apt on
Debian Lenny.

I have successfully been able to get all of this working (authentication,
forwarding etc).

I have a java web app that has a servlet that serves as a proxy to get
around cross site scripting.
http://myapp/Proxy?url=www.somesite.com

I let Apache and mod_auth_kerb handle all authentication and it does well.

If I access my Proxy servlet like so:

http://MY_DOMAIN.COM/my_proxy_app/Proxy?url=http://MY_DOMAIN.COM/index.html

(Notice I am proxying to the same domain but different application)

I get a 401 error.

Here is what the access log (for apache) looks like for this request.
10.150.15.116 - - [04/Jun/2010:18:06:55 +] GET /index.html HTTP/1.1
401 829 - Java/1.6.0_16
10.150.15.212 - gfo...@my_domain.com [04/Jun/2010:18:06:54 +] GET
/my_proxy_app/Proxy?url=http://MY_DOMAIN.COM/index.html HTTP/1.1 500 394
- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)
o

Now if you notice the request from ip address 212 is actually the browser
request to the proxy.
The request from ip address 216 is the request from tomcat (notice the
Java/1.6.0_16).

So it appears that Apache sees this request from the jre and tries to
authenticate against mod_auth_kerb and of course it fails.

Is it possible to force tomcat to pass on the credentials it receives from
the initial request(browser) along to tomcats own request back to apache?

Hopefully this is somewhat clear?

Flow:
Browser makes request to  http://MY_DOMAIN.COM/my_proxy_app/Proxy
 mod_auth_kerb authenticates and then mod_jk realizes it is a java app
so it hands off the request to tomcat
 Proxy servlet runs on tomcat and makes a URL request to
http://MY_DOMAIN.COM/index.html  --- Apache attempts to authenticate this
request but since it is coming from the jre it disallows this request.

Thanks in advance!
GF


mod_jk Apache2--Tomcat6

2010-04-29 Thread g f
Hello all,
I am not entirely sure this is the correct list to post mod_jk questions
however the link from mod_jk did point to the the tomcat users list.

I am running a debian lenny box with:

Apache2 Version: 2.2.9-10+lenny2
Tomcat6 Version: 6.0.24-4
mod_jkVersion: 1:1.2.28-2

I am able to get everything working in that I can forward all requests to
Tomcat through apache.
I am attempting to use JkUnMount but when I add that to my config Apache
will not start with the following error:

Starting web server: apache2Syntax error on line 12 of
/etc/apache2/sites-enabled/000-default:
*JkUnMount needs a path when not defined in a location*
*Action 'start' failed.*
*The Apache error log may have more information.*
* failed!*

The logs do not even get created.
I have searched google for this error to no avail.
The README.gzip does mention JkUnMount so I believe this deb package does
support this feature.

From what I understand from the docs I can set up mod_jk to allow apache to
serve up all static content *out* of $CATALINA_HOME/webapps and allow Tomcat
to serve up the rest (servlets and jsps)
Do I understand correctly?

Here is s snippet of my config(000-default)[the debian way]:
VirtualHost *:80
ServerAdmin webmas...@localhost
# DocumentRoot /var/www
DocumentRoot /apps/apache2/www
#**mod_jk_directives
JkAutoAlias /var/lib/tomcat6/webapps
JkMount / ajp13_worker
JkMount /* ajp13_worker
JkUnMount /*.html

# Some other things I have tried (commented out).
# Directory /var/lib/tomcat6/webapps/test/
# Options Indexes FollowSymLinks MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
# /Directory
# Alias /test/ /var/lib/tomcat6/webapps/test/
# DirectoryMatch /var/lib/tomcat6/webapps/*/WEB-INF/*
# AllowOverride None
# Order allow,deny
# Deny from all
# /DirectoryMatch
# JkMount /* ajp13_worker
# JkMount /test/* ajp13_worker
# JkUnMount /*.html
#   End mod_jk
Directory /apps/apache2/www
Options FollowSymLinks
AllowOverride None
/Directory
Directory /apps/apache2/www/
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
/Directory
/VirtualHost


Here is a snippet from the mod_jk page

  # Static files in the examples webapp are served by apache
  Alias /examples /vat/tomcat3/webapps/examples
  # All requests go to worker1 by default
  JkMount /* worker1
  # Serve html, jpg and gif using httpd
  JkUnMount /*.html worker1
  JkUnMount /*.jpg  worker1
  JkUnMount /*.gif  worker1


Thanks in advance!

G


Re: mod_jk Apache2--Tomcat6

2010-04-29 Thread g f
Well thats embarrassing.
Thanks alot!

On Thu, Apr 29, 2010 at 10:28 AM, Paolo Santarsiero 
paolo.santarsi...@gmail.com wrote:

 JkUnMount /*.html
 Where is the worker or load balancer? Should be something like this:
 JkUnMount /*.html worker1

 On 29 April 2010 17:23, g f gfo...@gmail.com wrote:

  Hello all,
  I am not entirely sure this is the correct list to post mod_jk questions
  however the link from mod_jk did point to the the tomcat users list.
 
  I am running a debian lenny box with:
 
  Apache2 Version: 2.2.9-10+lenny2
  Tomcat6 Version: 6.0.24-4
  mod_jkVersion: 1:1.2.28-2
 
  I am able to get everything working in that I can forward all requests to
  Tomcat through apache.
  I am attempting to use JkUnMount but when I add that to my config Apache
  will not start with the following error:
 
  Starting web server: apache2Syntax error on line 12 of
  /etc/apache2/sites-enabled/000-default:
  *JkUnMount needs a path when not defined in a location*
  *Action 'start' failed.*
  *The Apache error log may have more information.*
  * failed!*
 
  The logs do not even get created.
  I have searched google for this error to no avail.
  The README.gzip does mention JkUnMount so I believe this deb package does
  support this feature.
 
  From what I understand from the docs I can set up mod_jk to allow apache
 to
  serve up all static content *out* of $CATALINA_HOME/webapps and allow
  Tomcat
  to serve up the rest (servlets and jsps)
  Do I understand correctly?
 
  Here is s snippet of my config(000-default)[the debian way]:
  VirtualHost *:80
  ServerAdmin webmas...@localhost
  # DocumentRoot /var/www
  DocumentRoot /apps/apache2/www
  #**mod_jk_directives
  JkAutoAlias /var/lib/tomcat6/webapps
  JkMount / ajp13_worker
  JkMount /* ajp13_worker
  JkUnMount /*.html
 
  # Some other things I have tried (commented out).
  # Directory /var/lib/tomcat6/webapps/test/
  # Options Indexes FollowSymLinks MultiViews
  # AllowOverride None
  # Order allow,deny
  # Allow from all
  # /Directory
  # Alias /test/ /var/lib/tomcat6/webapps/test/
  # DirectoryMatch /var/lib/tomcat6/webapps/*/WEB-INF/*
  # AllowOverride None
  # Order allow,deny
  # Deny from all
  # /DirectoryMatch
  # JkMount /* ajp13_worker
  # JkMount /test/* ajp13_worker
  # JkUnMount /*.html
  #   End mod_jk
  Directory /apps/apache2/www
  Options FollowSymLinks
  AllowOverride None
  /Directory
  Directory /apps/apache2/www/
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  allow from all
  /Directory
  /VirtualHost
 
 
  Here is a snippet from the mod_jk page
 
   # Static files in the examples webapp are served by apache
   Alias /examples /vat/tomcat3/webapps/examples
   # All requests go to worker1 by default
   JkMount /* worker1
   # Serve html, jpg and gif using httpd
   JkUnMount /*.html worker1
   JkUnMount /*.jpg  worker1
   JkUnMount /*.gif  worker1
 
 
  Thanks in advance!
 
  G
 



Re: ArrayIndexOutOfBoundsException

2009-11-24 Thread g f
Perhaps change your code from
while((bytesRead = in.read(buf))  0) {

while((bytesRead = in.read(buf)) != -1) {

From api:
Reads the next byte of data from the input stream. The value byte is
returned as an int in the range 0 to 255. If no byte is available
because the end of the stream has been reached, the value -1 is
returned. This method blocks until input data is available, the end of
the stream is detected, or an exception is thrown.

HTH.

On Tue, Nov 24, 2009 at 10:57 AM,  geoff...@fileflow.com wrote:
 Hi everyone.
 I'm stuck with a problem I don't understand. We have a tomcat server and
 after redeploying our war file, we get this error:
 java.lang.ArrayIndexOutOfBoundsException
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346)
 at
 org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)
 at
 org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
 at
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573)
 at org.apache.coyote.Response.doWrite(Response.java:560)
 at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325)
 at
 org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
 at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
 at
 org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
 at com.fileflow.downloader.Downloader.doGet(Downloader.java:123)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:619)
 Notice that there are no number on the first line and it is usually the
 case.
 The code that is responsible is:
 private ServletOutputStream out;
 private InputStream in;
 ...
 in = new FileInputStream(tmp);
 ...
 out = response.getOutputStream();
 byte[] buf = new byte[8 * 1024]; // 8K buffer
 int bytesRead;
 while((bytesRead = in.read(buf))  0) {
 out.write(buf, 0, bytesRead);
 }
 The updated code didn't change anything in that Servlet so I really have no
 clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is
 1.6.0_11.
 Thanks for any help.

 Best Regards
 Geoffrey


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Grant access to files out of webapp context using SecurityManager

2009-11-19 Thread g f
Hello all,
I have a webapp in the following location:

/apps/tomcat/webapps/mywebapp

I have files located at:

/files/images

They are on different partitions.

I need to grant mywebapp read,write,execute permissions to these images.

I am attempting to configure SecurityManager to allow this but am
having some difficulties.

here is a snippet of catalina.policy


   grant codeBase file:${catalina.home}/webapps/mywebapp/WEB-INF/- {
permission java.security.AllPermission;
permission java.io.FilePermission /files/images/-,
read,write,execute;
   };

also tried this:

   grant codeBase file:${catalina.home}/webapps/mywebapp/WEB-INF/- {
permission java.security.AllPermission;
permission java.io.FilePermission file://files/images/-,
read,write,execute;
   };

Am I correct in assuming that the additional FilePermission access
goes within the webapps grant statement?
Any ideas are appreciated.
Thanks in Advance.
G

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Grant access to files out of webapp context using SecurityManager

2009-11-19 Thread g f
I recently activated SecurityManager and had no previous issues with this.
Yes they do have permissions on that directory.
I am getting many errors regarding this here is a snippet of the stack:
SEVERE: StandardWrapper.Throwable
java.security.AccessControlException: access denied
(java.io.FilePermission /files/images read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
.
.
Does my syntax look correct?

I did also try the following:
grant codeBase file:/files/images/- {
permission java.security.AllPermission;
};

Thanks.

On Thu, Nov 19, 2009 at 2:03 PM, Pid p...@pidster.com wrote:
 On 19/11/2009 18:13, g f wrote:

 Hello all,
 I have a webapp in the following location:

 /apps/tomcat/webapps/mywebapp

 I have files located at:

 /files/images

 They are on different partitions.

 I need to grant mywebapp read,write,execute permissions to these images.

 I am attempting to configure SecurityManager to allow this but am
 having some difficulties.

 here is a snippet of catalina.policy


    grant codeBase file:${catalina.home}/webapps/mywebapp/WEB-INF/- {
         permission java.security.AllPermission;
         permission java.io.FilePermission /files/images/-,
 read,write,execute;
    };

 also tried this:

    grant codeBase file:${catalina.home}/webapps/mywebapp/WEB-INF/- {
         permission java.security.AllPermission;
         permission java.io.FilePermission file://files/images/-,
 read,write,execute;
    };

 Am I correct in assuming that the additional FilePermission access
 goes within the webapps grant statement?
 Any ideas are appreciated.
 Thanks in Advance.
 G

 First: does the user that is running Tomcat have the appropriate access
 rights to manipulate files in the directory?

 Second: what 'trouble' are you haveing?


 p


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



upgrade from 6.0.10 to 6.0.20 and retain conf and webapps.

2009-08-24 Thread g f
Hello all,
I searched the tc website and google and havent had much luck finding info
on minor upgrades...most posts pertain to major (5.5 to 6.0 etc.)
I was wondering if it was possible to just overwrite the bin and the lib
directory in order to accomplish this upgrade?
Thanks in advance!


Re: tomcat 6, ubuntu, mysql connection

2009-01-27 Thread g f
Did you verify that the user that you are connecting to mysql with has host
based permissions on mysql(In other words, does the user have rights to the
database from your webserver as the webserver is the host in this case)?

On Tue, Jan 27, 2009 at 9:09 AM, Glen Peterson g...@organicdesign.orgwrote:

 Some applications have the connection information inside the WAR file.
  For instance, in tomcat/webapps/WEB-INF/classes/hibernate-config.xml

 If that's the case, you need to get the database information from the
 developer - the tables and users particularly.

 On Tue, Jan 27, 2009 at 2:37 AM, Mihamina Rakotomandimby (R12y)
 miham...@lab.vectoris.fr wrote:
  Hi all,
  An external developper sent me a war file to be put in webapps/.
  Ok, the war was extracted and so on.
  But that application has toconnect to mysql.
 
  My system is Ubuntu 8.10 64-bit, packages only.
 
  I have installed (some might be useless)
  openjdk-6
  tomcat-6
 
  What should I put in the server.xml file in order to have the application
  connection to mySQL?
 
  I have all the rights on the mySQL DB server, I know the database to be
  used.
 
  It's my first time with tomcat and I'm not so used with Java (but it's
  coming... ;)).
 
  --
  Chef de projet chez Vectoris
  http://www.google.com/search?q=mihamina+rakotomandimby
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Tomcat Beginner - Step 2!

2009-01-16 Thread g f
Your public address will be your wan ip address(ienot 192.168.0.101).
Look in your dlink router config webpage under WAN and that will be your
public ip address.

Change your port forwarding(virtual server) to forward port 80 (on the
outside) to port 8080 on the inside.

If you kept tomcat config as is running on 8080, then your webservice url
will be http://WAN_IP/mywebservice



Flowchart:
User navigates to:
http://WAN_IP/mywebservice
dlink forwards this to
http://192.168.0.101:8080/mywebservice

BTW, WAN_IP is a variable for what your actual public ip address is.
192.168.0.101 would be the ip address dlink router assigned your machine
(assuming it was the only machine on your network). ipconfig will tell you
your 192 address if different.

Not sure about number 4.

HTH

On Sat, Jan 17, 2009 at 4:02 PM, Toriacht shatner.will...@gmail.com wrote:


 Hi,

 I have written my first web service which works fine and is visible at
 //localhost:8080/mywebservice. I  still can't make it publicly visible.

 I have a beginner few questions.

 1. What is the default public address of my tomcat server, and the
 applications on it. Is it just my external IP address/applicationName? Does
 the address include port number?

 2. I am connected thru a DLink wireless modem to my ISP modem. My ISP modem
 is v simple and lets all thru. I enabled Virtual Server Http on my wireless
 modem, public port 80, private port 80 and associated with my 192.x.x
 address

 I edited my Windows firewall to allow tomcat still nothing.

 3. What other steps do I have to take to make my Tomcat publicly visible..?

 4. I am intermittently getting a jvm_bindnull error. Is this because I'm
 not shutting Tomcat down properly? What steps should be taken to avoid this
 error?

 Thanks,
 T
 --
 View this message in context:
 http://www.nabble.com/Tomcat-Beginner---Step-2%21-tp21509364p21509364.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




webapp in tomcat context cannot access a python proxy residing in apache

2009-01-14 Thread g f
Hello all,
not sure if this should be asked here or in the apache list so I will try
here first.

I have an application running completely inside of tomcat 6...lets call it
webappTomcat which runs on port 8084.

A coworker developed an application that runs mainly on apache(html and
javascript) although he makes ajax requests to servlets. Lets call it
webappApache.
When he makes his ajax requests he does so through a pseudo proxy(to allow
cross domain) that is written in python. This proxy resides in apache on
port 80.

We need to merge both applications. I want to merge webappApache
*into*webappTomcat.

Basically bring all of the html and javascript code from webappApache into
webappTomcat and retain the use of the proxy on Apache for cross domain
calls.

When I do this, the calls to the apache python proxy fail. It seem like
there is no *path* to the proxy from tomcat.

example:

http://localhost:8084/webappTomcat/index.jsp makes an ajax call through the
proxy to http://localhost:8084/anotherTomcatWebApp/Servlet

http://localhost:8084/webappTomcat/index.jsp ---
http://localhost/webappApache/pythonProxy.py  ---
http://localhost:8084/anotherTomcatWebApp/Servlet

so the request would look something like this:

from webappTomcat an ajax request to
http://localhost/webappApache/pythonProxy.py?url=http://localhost:8084/anotherTomcatWebAppServlet?parameterX=345parameterY=199

Is there some configuration needed on tomcat for this to work?

Keep in mind that this is not a real proxy(ie, no cacheing or anything like
that).

We were thinking that perhaps a java proxy(residing in tomcat) that makes a
call to the python proxy(residing in apache) would be what we need but it
seems kind of hacky.

Thanks in advance!


Re: IIS 6 + Tomcat 6.0 + ISAPI + SSL

2009-01-14 Thread g f
You did not mention if ssl worked with tomcat in the standalone mode(without
ISAPI).
can you access https://localhost:8084/yourwebapp?

If not:

Perhaps you need to uncomment ssl support in server.xml file
Uncomment the second block and restart.
!--
 Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the
 connector should be using the OpenSSL style configuration
 described in the APR documentation
--
−
!--

Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=TLS /

--

HTH.

On Wed, Jan 14, 2009 at 9:27 AM, Alexander Diedler adied...@tecracer.dewrote:

 Hello,
 I have some question, it is possible to make SSL with an Tomcat project,
 which will be served trough the ISAPI Filter in IIS?
 Open with http Port 80 is fine, but open with https .. Page cannot be
 found will be displayed.

 Greetings
 Alexander