RE: Tomcat and IP transparency

2013-07-31 Thread Ilya Kazakevich
Hello,

They may use RemoteIpValve to fetch real ip from x-forwarded-for and set
it to remote_addr where getRemoteAddr will get it.


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Joan Balagueró Ventus Proxy
[mailto:joan.balagu...@ventusproxy.com]
Sent: Wednesday, July 31, 2013 11:05 PM
To: users@tomcat.apache.org
Subject: Tomcat and IP transparency

Hello,



I already asked this question to the Apache HttpClient Forum. They don't
know if this is possible with java/Tomcat.



I have developed a proxy servlet with an xml cache, running in a Tomcat
6.0.37 on Linux Centos6.4.



When the incoming xml request (sent from an external client) is not found
in
the proxy cache, I use HttpClient 4.2.5 to create a new http request and
redirect it to the provider application servers to get the xml response.



So far, everything worked ok with all our clients. But now we've a provider
that needs ip transparency. Then, the request created by httpclient needs
to
carry the origin ip address (that from the external client), not the proxy
ip.
My proxy gets correctly the external IP (using request.getRemoteAddr()),
but
when the provider application reads the IP provided by the http client
using
request.getRemoteAddr(), they obviously get the proxy IP.



The provider software is a blackbox, then reading ips with
'request.getRemoteAddr()' is something that they cannot change now.
Therefore, things like adding a 'X-Forwarded-for' header cannot be
implemented in this scenario.



Is it possible tot achieve this at  Tomcat level? Has anyone found an
scenario
like this?



Thanks in advance,

Joan.



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



RE: forward request by changing the port in request url

2013-06-13 Thread Ilya Kazakevich
Hello,
What is request for application? How would any software know this request
is for abc app?
You should use different URLs (servlet contexts) or different domain names. 

Then you may install nginx or apache or squid or something else that would
forward your requests to the following tomcats. But you need to configure
tomcat valve to store remote_addr.
I will give you an example for nginx and domain names.

Say, your DNS zone is example.com. You create 2 subdomains
abc.example.com and def.example.com both with same IP (A record).
You install nginx on it listening port 80. You configure it to pass requests
for abc.example.com to localhost:8080 and requests for def.example.com to
8081.

You open browser and navigate to abc.example.com. Nginx accepts your request
and makes request to localhost:8080 where tomcat with app abc sits. Tomcat
answers to nginx and it forwards it to you.

That is pretty common solution.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)
[mailto:anigo...@cisco.com]
Sent: Thursday, June 13, 2013 10:00 PM
To: Tomcat Users List
Subject: forward request by changing the port in request url

i have two service running under tomcat. One service is default i.e.
catalina
on port 8080 and 8443 second service is catalina_new on port 8081 and 8444.

i have application abc.war deployed in webapps_new service which is
running on port 8081. This application is not there in webapps.
i want if any request coming on port 8080 for application abc, it is
forwarded
to port 8081.(same for ssl port 8443-8444) Is there any way to do the
same.

Thanks
Anil


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



RE: forward request by changing the port in request url

2013-06-13 Thread Ilya Kazakevich
Hello,

I do not think destination NAT is good solution because it works on TCP
layer and knows nothing about domain names and URLs (both are application
level (http) knowledge). So you would need to use separate  IP/port  for
that and in case you have it you can bind tomcat there directly) So
application-layer forwarding proxy (nginx, squid, apache) is way to go.

Hardware cisco solutions could handle it too but I they are too big  for
such a simple task (unless you have really many users)

Ilya

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com]
Sent: Friday, June 14, 2013 2:28 AM
To: Tomcat Users List
Subject: RE: forward request by changing the port in request url

for IP Redirecting and or automatic Network Address Translations (e.g. Port
80 redirects to Port 81)

you will need a proxy server

please contact supp...@cisco.com


for product and service options



Viel Gluck
Martin


 i have two service running under tomcat. One service is default i.e.
 catalina on port 8080 and 8443 second service is catalina_new on port
8081
and 8444.

 i have application abc.war deployed in webapps_new service which is
running on port 8081. This application is not there in webapps.
 i want if any request coming on port 8080 for application abc, it is
 forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to
do
the same.

 Thanks
 Anil



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



RE: Keystore error trying to use SSL JSSE

2013-06-06 Thread Ilya Kazakevich
Hello, 

1) keystoreFile (letter F should be in upper case)
2) Use / instead of \
3) Use ${user.home} instead path (and I am not sure c:\ works, you probably
need file:///c:/ but ${user.home} is better anyway)


Ilya Kazakevich,
-Original Message-
From: Tim Colletto [mailto:tcolle...@cra.com]
Sent: Thursday, June 06, 2013 7:30 PM
To: users@tomcat.apache.org
Subject: Keystore error trying to use SSL JSSE

Hello,

Using the above method I receive the following in the log:

WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting
property 'keystorefile' to 'c:\users\administrator\.keystore' did not find
a
matching property.
The following is my main config:

Connector port=80 redirectPort=443 protocol=HTTP/1.1
   connectionTimeout=2/

Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150
scheme=https secure=true
keyAlias=tomcat
keystorefile=c:\users\administrator\.keystore
keystorePass=changeit
acceptCount=100
clientAuth=false sslProtocol=TLS /

Connector port=8009 redirectPort=443 protocol=AJP/1.3/

I've tried just about every combination of modifications with no luck.
Tried
different ports. Tried different keystore paths. I did the same steps on my
windows 7 machine and it all worked fine.

I tried the following protocols:
protocol=org.apache.coyote.Http11NioProtocol
protocol=org.apache.coyote.Http11Protocol

Nothing worked. I'm at a complete dead end.

I verified that .keystore was ok via keytool -l .keystore
 


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



RE: Keystore error trying to use SSL JSSE

2013-06-06 Thread Ilya Kazakevich
-Original Message-
From: Tim Colletto [mailto:tcolle...@cra.com]
Sent: Thursday, June 06, 2013 9:36 PM
To: Tomcat Users List
Subject: RE: Keystore error trying to use SSL JSSE

${user.home} I think is for linux?  I tried quickly %USERPROFILE%/keystore

No, this is for Java:
http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
In windows this is %USERPROFILE% and in Linux it is $HOME
But java is cross-platform here.

Ilya.



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



RE: Tomcat and PostgreeSQL

2013-06-06 Thread Ilya Kazakevich
I've never heard about it but looks like JDBC PostgreSQL driver has memory
leak.  What version of driver do you use? Try to google postgre SQL JDBC
memory leak
Actually any memory leak should be investigated using profiler tool. Google
for java profile memory leaks


Ilya.
-Original Message-
From: Hector Del Mestre [mailto:hectordelmes...@gmail.com]
Sent: Friday, June 07, 2013 12:46 AM
To: users@tomcat.apache.org
Subject: Tomcat and PostgreeSQL

Hello:
I'm on a project and asked me to install Apache Tomcat as server pages and
PostgreSQL as database engine. So far so good and right install everything
correctly.
The application was done with AppFuse architecture originally utlizando
MySQL, but issues like licensing and client wants to use PostgreSQL.
And that is where I'm stuck, because Tomcat (or rather the Java VM) began
comsumir large amount of memory (I get 1.5 GB of RAM) when using the
application and there comes a time when it is hung and not answers, and
this
is the only application deployed on the server.
Well, now the fatal question:
Tomcat need any special configuration to use PostgreSQL?
With MySQL the application works normally.

Team Summary (Virtualized with VMWare):
S.O.: OpenSUSE 12.3
PostgreSQL 9.2
Apache Tomcat: 7.0.39
RAM: 4 GB
Processor: 1 with two (2) cores.

Any guide / link will help.

Note:
Sorry for the English, I am using a translator.

Atte.

--
Héctor Del Mestre


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



Mapping security role outside of servlet specification

2013-06-05 Thread Ilya Kazakevich
Hello,

I use probe app for several tomcats.
It's security model is based on servlet API security: security roles and
constraints are provided in web.xml and mapped for each servlet it has.
I use JNDIRealm to authenticate users via LDAP (actually AD is used).
I want to grant access to Probe on Tomcat1' installation for people from
Group1  and to Tomcat2 to people from Group2.
But manager group is hard-coded in web.xml inside of probe!

I want to map group Group1 from LDAP realm to role manager in tomcat.
How can I do that?
I can't use security-role-ref because I should put in servlet tag, so I
can't
do that on tomcat level.
There is  security-role-mapping tag in some servers but  it is proprietary
and not supported by tomcat.

So the only way for me to extract .war file and patch web.xml.

What is the best way to solve it?

Ilya.



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



RE: running separate isolated jvm's for each web app

2012-01-16 Thread Ilya Kazakevich
Tomcat itself runs inside JVM, so you need 2 JVMs each with tomcat and your
app. 
Separating apps is a good practice because of classpath issues

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!
 

-Original Message-
From: S Ahmed [mailto:sahmed1...@gmail.com] 
Sent: Monday, January 16, 2012 8:14 PM
To: Tomcat Users List
Subject: running separate isolated jvm's for each web app

If my tomcat has 2 web applications running on it, how do I 
create different jvm pools to keep the apps isolated?



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



Tomcat JMX/RMI: How server interface is choosen?

2011-12-08 Thread Ilya Kazakevich
I enable JMX server and JMX Registry in tomcat using

Listener className=org.apache.catalina.mbeans.JmxRemoteLifecycleListener
  rmiRegistryPortPlatform=10001 rmiServerPortPlatform=10002 /
Client connects to 10001 and tomcat returns its address and port 10002,
right? 
But if I have several addresses on the interface tomcat returns the first
one.

Is it tomcat or RMI issue?
How can I set interface and/or ip address to be returned to the client?
Is it possible to use JMX directly over the one TCP port with out of all
that RMI stuff?


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!


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



RE: hi

2011-12-05 Thread Ilya Kazakevich
Don't use it. Why build applications on a platform you have doubts
about? I think you should build all of your applications using snobol.
See http://en.wikipedia.org/wiki/SNOBOL for websites.
I do prefer Ook, but not sure if there are good web frameworks for it:
http://www.dangermouse.net/esoteric/ook.html


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



RE: hi

2011-12-02 Thread Ilya Kazakevich
http://tomcat.apache.org/download-55.cgi 


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: srilaxmi deevela [mailto:deevelasrila...@gmail.com] 
Sent: Friday, December 02, 2011 9:56 PM
To: users@tomcat.apache.org
Subject: hi

please send me the tomcat5.5 software link,i traid but setup file is not
visible there


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



RE: hi

2011-12-02 Thread Ilya Kazakevich
Navigate to Windows Service Installer link and click it. 


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: srilaxmi deevela [mailto:deevelasrila...@gmail.com] 
Sent: Friday, December 02, 2011 10:00 PM
To: Tomcat Users List
Subject: Re: hi

where is the download option there, i didnt get that

On Fri, Dec 2, 2011 at 11:27 PM, Ilya Kazakevich 
ilya.kazakev...@jetbrains.com wrote:

 http://tomcat.apache.org/download-55.cgi


 Ilya Kazakevich,
 Developer
 JetBrains Inc
 http://www.jetbrains.com
 Develop with pleasure!

 -Original Message-
 From: srilaxmi deevela [mailto:deevelasrila...@gmail.com]
 Sent: Friday, December 02, 2011 9:56 PM
 To: users@tomcat.apache.org
 Subject: hi

 please send me the tomcat5.5 software link,i traid but setup file is not
 visible there


 -
 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: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Ilya Kazakevich
 That is just stupid since 32bit cannot address more
 than 4GB of memory no matter what you do. Any sysadmin should know
 that right?

That's per process. All reasonably recent 32-bit OSs can address way
more than 4GiB internally.

Yes, but one region in memory is reserved for IO. Drivers use high memory
addreses (3Gb) to speak with their devices.
To support more than 3Gb on Win/32bit PAE could be used so IO would reside
higher than 4Gb. 
But in this situation drivers need to deal with 64bit pointers. 
Microsoft believes it would lead to driver fails and BSODs, so it denied it
for desktop versions of OSes. But it works in server versions.
Idea was: 4Gb is rarely needed on desktop and desktop has cheap hardware
and poorly-written drivers.  And on server they have good hardware and good
drivers and often require more than 4Gb.

You could use +4Gb on Win2008/32bit but you _can't_ use more than about
3.5Gb on Win7@32bit. 


BTW process could access more than 4Gb too (see AWE:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366527(v=vs.85).as
px) but AFAIK Sun JVM does not use it

If you have relatively small processes, there's no need for
the overhead of 64-bit even if you have 16GiB or more.

You can run 32bit apps on 64bit windows (that's called WoW64). Processor and
Windows support it and it works pretty well.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!


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



RE: block direct tomcat

2011-11-30 Thread Ilya Kazakevich
Just disable HTTP connector (comment it in server.xml).
You can use firewall to protect AJP port from remote clients too.


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: cpanon [mailto:cpa...@yahoo.com] 
Sent: Wednesday, November 30, 2011 10:05 PM
To: Tomcat
Subject: block direct tomcat

Hello
I have an Apache-ajp-Tomcat config that works, but I would like to block any
access to tomcat directly, either on localhost (except for 8009) or from a
client?  What/is there a tomcat config to achieve that?


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



RE: [OT] Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Ilya Kazakevich
Does the fact of having a system with a 64-bit CPU (and OS) necessarily
(or usually) imply 
that data transfers between CPU and RAM happen also 64-bit in parallel ?
That depends on front bus width. Modern PCs has 64-bit bus AFAIK.

In 64-bit CPU 64 is register size and nothing else (although 86x64 mode
has some differences with IA32)

My understanding is that under a 32-bit platform, each integer will occupy
32 bit, while 
on a 64-bit platform each will occupy 64 bit (the source program remaining
the same).
Java integers are always 32bit, are not they?

C int may vary from 16 (in BCC 3.1 for DOS) to 64. 

64-bit processor mode gives you ability to:
1) address more memory (2^64 bytes theoretically).
2) store more data in register so CPU could now operate 64bit numbers and
you need one operation to do something with two 64bit objects opposite to
two operations on 32bit.
3) v86 mode is disabled so you can't run 16bit apps :)
4) use new registers, new SSE instructions and so on:
http://en.wikipedia.org/wiki/X86-64#Architectural_features



-
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: Trying to get Tomcat 6 running as a Windows service

2011-11-16 Thread Ilya Kazakevich
Which file do you run? service.bat ?

What do you have in your event logs?
Which account do you use for service? Does it have requried rights?


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com] 
Sent: Wednesday, November 16, 2011 3:36 PM
To: users@tomcat.apache.org
Subject: Trying to get Tomcat 6 running as a Windows service

Hello

I'm trying to get Tomcat 6.0.26 running as a service on a Windows 7 64 bit
PC but everytime I try I get message:

Failed installing 'Tomcat6' service.

As far as I'm aware, all relevant system settings are good and the
installation displays settings for 
CATALINA_HOME, CATALINA_BASE, JAVA_HOME and JVM. I'm running the batch file
with adminstrator authorities.

Has anyone any idea?

I should also add, that this version of Tomcat runs perfectly if called from
NetBeans 7.0.1 which is deployed on 
the same PC.

Martin O'Shea.
-- 



-
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: Trying to get Tomcat 6 running as a Windows service

2011-11-16 Thread Ilya Kazakevich
http://www.coderanch.com/t/450781/Tomcat/Tomcat-Windows-Server-Permissions 


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Martin O'Shea [mailto:app...@dsl.pipex.com] 
Sent: Wednesday, November 16, 2011 3:59 PM
To: 'Tomcat Users List'
Subject: RE: Trying to get Tomcat 6 running as a Windows service

I've been trying to get the service running as per the attachment.

The account I am using does have admin rights.

The Jakarta Service log file reports:

[2011-11-16 11:54:30] [info] Commons Daemon procrun (1.0.2.0) started
[2011-11-16 11:54:30] [80   service.c] [error] Access is denied.
[2011-11-16 11:54:30] [524  prunsrv.c] [error] Unable to open the Service
Manager
[2011-11-16 11:54:30] [info] Commons Daemon procrun finished.

When I try to set the service up as displayed in the attachment.

-Original Message-
From: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] 
Sent: 16 Nov 2011 11 40
To: 'Tomcat Users List'
Subject: RE: Trying to get Tomcat 6 running as a Windows service

Which file do you run? service.bat ?

What do you have in your event logs?
Which account do you use for service? Does it have requried rights?


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com]
Sent: Wednesday, November 16, 2011 3:36 PM
To: users@tomcat.apache.org
Subject: Trying to get Tomcat 6 running as a Windows service

Hello

I'm trying to get Tomcat 6.0.26 running as a service on a Windows 7 64 bit
PC but everytime I try I get message:

Failed installing 'Tomcat6' service.

As far as I'm aware, all relevant system settings are good and the
installation displays settings for CATALINA_HOME, CATALINA_BASE, JAVA_HOME
and JVM. I'm running the batch file with adminstrator authorities.

Has anyone any idea?

I should also add, that this version of Tomcat runs perfectly if called from
NetBeans 7.0.1 which is deployed on the same PC.

Martin O'Shea.
-- 



-
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



RE: Grabbing the user's info

2011-11-16 Thread Ilya Kazakevich
Hello,

As Ilya hints, you'll have to use NTLM to get this to work. IIRC, this
requires that you use IIS with mod_jk to capture the authentication
information and forward it over to Tomcat. If you want to be able to
use NTLM for authentication into your webapp, you'll need to use a
specific type of realm to do that.

IE and almost all modern browsers on windows may sent authentication info
transparently. Old, non-ie browsers can't and you need user needs to use
HTTP plain auth (401 Unauthorized) or form authentication.
Only IIS is able to accept it transparently AFAIK, tomcat natevly accepts
only form and HTTP-based auth. 

So: 

If you want your user not to enter log and pass (you just log into windows
and go to web site) -- you need IIS and IE (or modern version of another
browser).

In all other cases user would need to enter her login and password in
browser window (for http auth) or special page (form auth). 

You may use LDAP AD interface to check this info. That could be done with
out of IIS.

But for _transparent_ authentication IIS is required as Christopher
mentioned.

Ilya.



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



RE: Include NEtwork path into Tomcat - urgent

2011-11-15 Thread Ilya Kazakevich
Not sure Java IO supports windows UNC.
 
Try to do the following: 
1) mount this share as disk: (in cmd type net use z:
\\storage\share\pictures)
2) configure tomcat to work with z:\
 

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com http://www.jetbrains.com/ 
Develop with pleasure!


 

  _  

From: Alexander Diedler [mailto:adied...@tecracer.de] 
Sent: Tuesday, November 15, 2011 5:27 PM
To: users@tomcat.apache.org
Subject: Include NEtwork path into Tomcat - urgent



Hello,

I have a Tomcat 6.0 application, that references their pictures as
http://www.test.de/pictures/test.png.

/pictures is a network path on a storage, so I try to make it as a Context
within the server.xml Host Tag

Context path=/pictures docBase=\\storage\share\pictures  / but it
throws a 404 error if I test it. Has somebody any idea to get out of this
troube?

 

Greetings

Alexander

 



RE: Include NEtwork path into Tomcat - urgent

2011-11-15 Thread Ilya Kazakevich
You need user ssesion to access windows station via SMB anyway. 

You can set this script as log in script using group policies in windows
for the user your tomcat runs as. 



Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Alexander Diedler [mailto:adied...@tecracer.de] 
Sent: Tuesday, November 15, 2011 5:39 PM
To: Tomcat Users List
Subject: AW: Include NEtwork path into Tomcat - urgent

Hello,
This is no option, this solution means, that the windows session must still
remain opened with a logged in user.

Alex
 

-Ursprüngliche Nachricht-
Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] 
Gesendet: Dienstag, 15. November 2011 14:32
An: 'Tomcat Users List'
Betreff: RE: Include NEtwork path into Tomcat - urgent

Not sure Java IO supports windows UNC.
 
Try to do the following: 
1) mount this share as disk: (in cmd type net use z:
\\storage\share\pictures)
2) configure tomcat to work with z:\
 

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com http://www.jetbrains.com/ Develop with
pleasure!


 

  _  

From: Alexander Diedler [mailto:adied...@tecracer.de] 
Sent: Tuesday, November 15, 2011 5:27 PM
To: users@tomcat.apache.org
Subject: Include NEtwork path into Tomcat - urgent



Hello,

I have a Tomcat 6.0 application, that references their pictures as
http://www.test.de/pictures/test.png.

/pictures is a network path on a storage, so I try to make it as a Context
within the server.xml Host Tag

Context path=/pictures docBase=\\storage\share\pictures  / but it
throws a 404 error if I test it. Has somebody any idea to get out of this
troube?

 

Greetings

Alexander

 



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



RE: Include NEtwork path into Tomcat - urgent

2011-11-15 Thread Ilya Kazakevich
Wiki says it should work: http://wiki.apache.org/tomcat/FAQ/Windows#Q6

What account do you use to run tomcat?
Does it has access to your share?
What is about tomcat logs and output? Do they have some errors?

Enable audit failure on remote machine and check security event logs (it
should log any unsuccessful authentication).

Use tools like wireshark / winpcap  to sniff tomcat-to-remote-machine
conversation to see what has happened

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Alexander Diedler [mailto:adied...@tecracer.de] 
Sent: Tuesday, November 15, 2011 6:27 PM
To: Tomcat Users List
Subject: AW: Include NEtwork path into Tomcat - urgent

Yes,
http://www.test.de/pictures/test.png throws 404 error.

Alex


-Ursprüngliche Nachricht-
Von: Daniel Mikusa [mailto:dmik...@vmware.com] 
Gesendet: Dienstag, 15. November 2011 15:13
An: Tomcat Users List
Betreff: RE: Include NEtwork path into Tomcat - urgent


 Not sure Java IO supports windows UNC.

A quick test worked for me.  I was able to list the contents of a SMB share
on my network.  Windows XP, Java 1.6.0_29.

public class Test {
  public static void main(String[] args) {
for (String fileName : new File(server\\share).list()) {
  System.out.println(fileName);
}
  }
}

Maybe try running a quick test like this from your machine?


 but it throws a 404 error if I test it.

How are you testing it?  Are you directly accessing a file on that share or
are you trying to get a directory listing?  By default, Tomcat will not
display a directory listing (it'll display a 404 error).

Dan




On Tue, 2011-11-15 at 05:48 -0800, Ilya Kazakevich wrote:
 You need user ssesion to access windows station via SMB anyway. 
 
 You can set this script as log in script using group policies in 
 windows for the user your tomcat runs as.
 
 
 
 Ilya Kazakevich,
 Developer
 JetBrains Inc
 http://www.jetbrains.com
 Develop with pleasure!
 
 -Original Message-
 From: Alexander Diedler [mailto:adied...@tecracer.de]
 Sent: Tuesday, November 15, 2011 5:39 PM
 To: Tomcat Users List
 Subject: AW: Include NEtwork path into Tomcat - urgent
 
 Hello,
 This is no option, this solution means, that the windows session must 
 still remain opened with a logged in user.
 
 Alex
  
 
 -Ursprüngliche Nachricht-
 Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com]
 Gesendet: Dienstag, 15. November 2011 14:32
 An: 'Tomcat Users List'
 Betreff: RE: Include NEtwork path into Tomcat - urgent
 
 Not sure Java IO supports windows UNC.
  
 Try to do the following: 
 1) mount this share as disk: (in cmd type net use z:
 \\storage\share\pictures)
 2) configure tomcat to work with z:\
  
 
 Ilya Kazakevich,
 Developer
 JetBrains Inc
 http://www.jetbrains.com http://www.jetbrains.com/ Develop with 
 pleasure!
 
 
  
 
   _
 
 From: Alexander Diedler [mailto:adied...@tecracer.de]
 Sent: Tuesday, November 15, 2011 5:27 PM
 To: users@tomcat.apache.org
 Subject: Include NEtwork path into Tomcat - urgent
 
 
 
 Hello,
 
 I have a Tomcat 6.0 application, that references their pictures as 
 http://www.test.de/pictures/test.png.
 
 /pictures is a network path on a storage, so I try to make it as a 
 Context within the server.xml Host Tag
 
 Context path=/pictures docBase=\\storage\share\pictures  / but 
 it throws a 404 error if I test it. Has somebody any idea to get out 
 of this troube?
 
  
 
 Greetings
 
 Alexander
 
  
 
 
 
 -
 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: Grabbing the user's info

2011-11-14 Thread Ilya Kazakevich
Hello,

What do you call network authentication ? 

If you speak about windows domain (active directory) authentication you can
use JNDIRealm
(http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm) because
AD has LDAP interface.
Here are some examples:
http://www.jspwiki.org/wiki/ActiveDirectoryIntegration


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Josh Gooding [mailto:josh.good...@gmail.com] 
Sent: Monday, November 14, 2011 10:19 PM
To: Tomcat Users List
Subject: Grabbing the user's info

Hey guys,

Question.  I'm developing an application that resides on a network.  I
wondered if (and how) there was a way to use the users network
authentication as a valid authentication into this application?

- Josh


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



RE: SSL Tomcat 6 7

2011-11-13 Thread Ilya Kazakevich
Hello,

Please read this guide: http://hc.apache.org/httpclient-3.x/sslguide.html
It is about HTTPS and apache HTTP client. 

You may also be interested in this document:
http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuid
e.html
This one is about JSSE (java ssl implementation)

Servlet does not have to care about SSL/TLS. Tomcat's connector implements
it. 
Please read http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html to
configure it.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Lau Eng Huat [mailto:tomcath...@gmail.com] 
Sent: Sunday, November 13, 2011 2:03 PM
To: users@tomcat.apache.org
Subject: SSL Tomcat 6  7

Hi everybody,

I have followed this example on setting up the SSL on Tomcat Expert
http://www.tomcatexpert.com/knowledge-base/using-openssl-configure-ssl-certi
ficates-tomcat
.
The question that I have is how do you use Apache Common HttpClient to sent
and received information from the servlet. I have no idea on how to write
the code for the httpClient and Servlet. Please help me on this , I'm stuck
at this for couple of weeks already.

God Bless
Eng Huat


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



Log exception logging

2011-11-11 Thread Ilya Kazakevich
Hello,

Does there is a way to make tomcat log exception (with stacktrace) thrown by
servlet? 
I do not want my app to do that because I like the way tomcat handles
exceptions: 500 error and error page is ok, but I need exception stacktrace
to be logged so I would be able to configure logging engine to send me
emails and save trace to files and so on.

Thanks.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!


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



RE: Log exception logging

2011-11-11 Thread Ilya Kazakevich
I am running tomcat 6.0
Docs say it should log them into stdout but it does not. My stdout starts
with:
..
INFO: Initializing Coyote HTTP/1.1 on http-8080
11.11.2011 20:18:36 org.apache.coyote.http11.Http11Protocol init

My app throws exception. Tomcat displays 500 error. But nothing found in
logs.


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Friday, November 11, 2011 8:17 PM
To: Tomcat Users List
Subject: Re: Log exception logging

2011/11/11 Ilya Kazakevich ilya.kazakev...@jetbrains.com:

 Does there is a way to make tomcat log exception (with stacktrace) thrown
by
 servlet?
 I do not want my app to do that because I like the way tomcat handles
 exceptions: 500 error and error page is ok, but I need exception
stacktrace
 to be logged so I would be able to configure logging engine to send me
 emails and save trace to files and so on.


What makes you think that it does not log them?

-
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: Log exception logging

2011-11-11 Thread Ilya Kazakevich
Do you know there are ~30 different versions of 6.0.x ?

6.0.32


What docs?
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Console

I believe uncought exception should be printed to stderr as it does by
java.lang.ThreadGroup.uncaughtException.


That is my tomcat misconfiguration not a tomcat bug, is not it?

Ilya.


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



RE: Log exception logging

2011-11-11 Thread Ilya Kazakevich
A Servlet itself is always executed by
Tomcat (if you have ever seen the stacktraces printed by servlets).

I understand that servlet runs in tomcat's thread-pool.

It does not prevent Servlet form using proper logging framework, or
those old log() methods in Servlet API.

But when my servlet throws exception -- tomcat catches it and displays 500
error. 

Anyway: I found the error. It was my framework (struts), not tomcat trouble.
Tomcat itself logs any exception thrown by filter or servlet. 

I should check it before write to this list. Sorry.


Ilya.


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



Log4j per context admin managable configs?

2011-10-06 Thread Ilya Kazakevich
Hello,

My app uses log4j. I have several apps running in my tomcat 6 in different
contexts. I want to log them to different files but filenames (as well as
levels and even appenders) should be configurable by admin.

Something like this:

./config/ENGINE_NAME/HOST_NAME/ContextName/log4j.properties

I can't put log4j directly in tomcat so all apps would use one config (and
it is not what I want).
I can't put a copy to the each .war file too because admin would not be able
to reconfigure them.

Does there is a nice solution (with out of custom code)?

Thank you.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
Develop with pleasure!


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



GZIP: pjl-comp-filter vs build-in compression engine

2009-04-24 Thread Ilya Kazakevich
Hello.
 
Http connector is able to compress data (compress param), right?
So, why filters like pjl-comp-filter exist?
 
Did anybody compare them? Any benchmarks or pitfalls? 
 
I am asking because some people in our company uses pjl, and I do not
understand why do I need some third-party solution, if from-the-box
functionality exists.
 
What do you think?
 
Thanks. 

Kazakevich Ilya,
MCP, SCJP


 


RE: Which user executes JSP in Tomcat?

2009-04-03 Thread Ilya Kazakevich
Which user tomcat runs at?

BTW, you do not need JSP to create directory and file. JSP is for template
tasks only. Use simple servlet instead.  

-Original Message-
From: raga2 [mailto:ragabo...@gmail.com] 
Sent: Friday, April 03, 2009 2:11 PM
To: users@tomcat.apache.org
Subject: Which user executes JSP in Tomcat?


Hello, 

Running tomcat on linux. I've written a simple JSP script to create a
directory and a file. When I run it via tomcat, the code runs fine, no
errors, but the directory nor the file get created where I specified. I have
a feeling it's some sort of permission issue. Any help is welcome, pretty
new to Tomcat. 



Thanks,
Raga
--
View this message in context:
http://www.nabble.com/Which-user-executes-JSP-in-Tomcat--tp22865557p22865557
.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


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



RE: Which user executes JSP in Tomcat?

2009-04-03 Thread Ilya Kazakevich
Which code exactly you use to create directory? 

-Original Message-
From: raga2 [mailto:ragabo...@gmail.com] 
Sent: Friday, April 03, 2009 2:44 PM
To: users@tomcat.apache.org
Subject: Re: Which user executes JSP in Tomcat?


Thanks guys for the reply.

ps -aef tells me it's root running tomcat. 

I'm using tomcat 5.5 and Java 1.5.0 Update 16. 

If it's root running, then why doesn't the directories get created anywhere?
Something I'm doing wrong.




Thanks for your replies again. 

Pid-2 wrote:
 
 raga2 wrote:
 Hello,
 
 Running tomcat on linux. I've written a simple JSP script to create a 
 directory and a file. When I run it via tomcat, the code runs fine, 
 no errors, but the directory nor the file get created where I 
 specified. I have a feeling it's some sort of permission issue. Any 
 help is welcome, pretty new to Tomcat.
 
 
 
 Thanks,
 Raga
 
 type ps -aef | grep java
 
 you should see which user tomcat is running under.
 
 p
 
 
 p.s. Usually helpful to inlcude Tomcat version, java version etc in 
 your post.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

--
View this message in context:
http://www.nabble.com/Which-user-executes-JSP-in-Tomcat--tp22865557p22866000
.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


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



RE: WebApp configuration best practice?

2009-03-31 Thread Ilya Kazakevich
Use context, and IT would be able to configure your app outside of war file.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html 



-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Tuesday, March 31, 2009 2:58 PM
To: Tomcat Users List
Subject: Re: WebApp configuration best practice?

Josh McDonald wrote:
 Hi guys,
 
 First, apologies if this is off-topic for the Tomcat list! If so, 
 where should I ask it? My question is simple (I hope). What's the best 
 practice
 when:
 
 1) you're distributing a .war file
 2) the app needs some simple configuration information

Customise your build script to include the config, or supply additional
config files that contain your extra info to the war file.

p


 3) it will likely be deployed onto shared hosts with no access to 
 server.xml
 
 Any enlightenment will be much appreciated!
 
 Cheers,
 -Josh
 


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

2009-03-31 Thread Ilya Kazakevich
You need some front-end proxy. 
Apache web-server could do it.
Squid could (AFAIK).
Nginx could do it also.



-Original Message-
From: Melanie Pfefer [mailto:melanie_pfe...@yahoo.co.uk] 
Sent: Tuesday, March 31, 2009 8:59 PM
To: users@tomcat.apache.org
Subject: redirection


Hello

I have a tomcat server running on port 8080.

users need to create a dns alias which is on port 80. redirection cannot be
done on DNS level of course.

do you have any idea how to achieve this in tomcat. For example:

http://siroe redirects to http://machineX:8080 that is a tomcat application?

thank you


  

-
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



FW: very off topic marketing question

2009-03-20 Thread Ilya Kazakevich
Number of users is not the only one thing, you need to think about, when you
are choosing technology.

PHP is a _scripting_ language with out of _static typization_,
multi-threading, full OOP support and its API is pretty weak too.
Also it is _not_ designed for servlet ideology: each request runs script
from the very beginning. You can use fast_cgi, but sometimes it is painfull
procedure too.

But it is fast and easy-to-use.

Apache + PHP  may run on P-166/64 RAM/FreeBSD serving phorum for ~ 100 users
with out of troubles.

Programs are small too, like in all scripting languages. 

If you are going to move to php, be ready to:
1) loose tools like log4j.
2) meet API, 10% of which uses OOP and exceptions, and 90% is procedure /
errors based. 
3) you would not have namespaces.
4) because of dynamic typization, you would be able to find some types of
errors only in runtime.
5) no multithreading

etc...



-Original Message-
From: Jason Pyeron [mailto:jpye...@pdinc.us] 
Sent: Friday, March 20, 2009 6:04 PM
To: 'Tomcat Users List'
Subject: very off topic marketing question

I have a client that is confused why we are giving them a J2EE product and
they are concerned with performance and scalability.

(IE/Tomcat 5.5/struts 2.1/hibernate 3.x/oracle 10g)

Note the system will never see more than 50 users/sessions with 7500 hits
per day on a lan. As such we don't see any relevance as to the performance
and scalability issues for either PHP or J2EE.

They have quoted to us:

PHP by itself is very fast. Much faster than ASP or JSP running on the same
type of server. This is because it has very little overhead compared to its
competitors and it pre-compiles all of its code before it runs each script

How would others respond to this?

-Jason

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.



-
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: very off topic marketing question

2009-03-20 Thread Ilya Kazakevich
 For starters, I'd point out the jsp page compiler does this as well...
1) BTW, you do not have to use JSP.

I have a very big app, which gives XML as output. 
I do not need JSP to generate XML, so I use sevlet output directly.

2) You can precompile JSP (well, you can precompile PHP too, see Zend
Compiler)

3) Most of logic in java web-app is stored in .class files, not in JSP
pages. So, they are compiled, loaded _once_ and live in a memory.


Kazakevich Ilya,
MCP, SCJP



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



RE: Newline doesn't work

2009-03-18 Thread Ilya Kazakevich
Mighty, 

Here is good and small HTML tutorial, which I advice you to read:
http://www.w3schools.com/html/default.asp
 
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 18, 2009 7:41 PM
To: Tomcat Users List
Subject: RE: Newline doesn't work

 From: Mighty Tornado [mailto:mighty.torn...@gmail.com]
 Subject: Newline doesn't work
 
 But when I try to make it a string with newline characters it still 
 prints everything in one line - like newline characters turn into 
 regular space characters.

That's the way HTML works.  You need to separate lines by p or br;
experiment with both to see which is more to your liking.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

-
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: Installing Tomcat on Windows

2009-03-17 Thread Ilya Kazakevich
Install it as windows service and make sure you set it to automatic start
mode.
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html 

You should also check logs (catalina.out). Maybe it starts, but stops
because of errors.


-Original Message-
From: Dharani [mailto:vishgnanik...@gmail.com] 
Sent: Tuesday, March 17, 2009 2:00 PM
To: users@tomcat.apache.org
Subject: Installing Tomcat on Windows

I installed apache-tomcat-5.5.27.exe in windows platform (In the machine I
have installed jdk1.6. ) But the server doesn't start with Windows start.
Always I have to go to binfolder and run tomcat5.exe to start the server.

How can I configure the server to start with when Windows starts?

Is the problem occurring because of I use jdk1.6?

Please I need a quick answer.


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



RE: Tomcat 6 multiple hosts howto

2009-03-16 Thread Ilya Kazakevich
I used Tomcat 5.5 with multiple Host/ elements in the server.xml Now I
read that this has to be done differently in Tomcat 

No, it is not.
You should have one Host element for every virtual host you need.

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

-Original Message-
From: Jeroen Kransen [mailto:jer...@kransen.nl] 
Sent: Monday, March 16, 2009 5:29 PM
To: users@tomcat.apache.org
Subject: Tomcat 6 multiple hosts howto

Hello all,

I am sure this is a FAQ, but I can't find any info about it. I used Tomcat
5.5 with multiple Host/ elements in the server.xml Now I read that this
has to be done differently in Tomcat 6, but I am not sure how. I added a
conf/Catalina/examplecom/context.xml, but I don't know what to put there,
and how to link it to the host example.com..
Also, is there a way to specify individual classpaths that have a Host as
scope? That way I can deploy the same webapp for different hosts using
different settings in the .properies files.

Thanks in advance! Jeroen

-
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: tcnative-1.dll

2009-03-13 Thread Ilya Kazakevich
Check your stdout (or catalina.out), it should have something like 

org.apache.coyote.http11.Http11AprProtocol init.

Http11AprProtocol  means you use APR, 
Http11Protocol  -- no.



-Original Message-
From: markov.ya...@neftochim.bg [mailto:markov.ya...@neftochim.bg] 
Sent: Friday, March 13, 2009 5:44 PM
To: users@tomcat.apache.org
Subject: tcnative-1.dll 

Hi, all

How can I tell for sure that tcnative-1.dll is used by tomcat ?
System is Windows 2003 SP2, Tomcat 5.5.20, JDK 1.5.0_11, tcnative-1.dll used
is 1.1.12 Tomcat is started as a service.
File tcnative-1.dll is placed in directory mentioned within
-Djava.library.path =... in registry.

If it's not in this directory there is a warning in stdout.log(which is the
only one used for logging).
(can't find... tcnative-1.dll... ), but when it's placed in the
directory, there is no message about it's loading (as stated in
http://tomcat.apache.org/native-doc/).

Difference in version behaviour, or...?

Best Regards,
YANKO MARKOV
LTS BULGARIA


-
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: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread Ilya Kazakevich
Some proxies send client IP as X-FORWARDER-FOR header.

I am not sure, but probably tomcat uses it instead of REMOTE_ADDR in
getRemoteAddr()? 
That is just a guess.


Kazakevich Ilya,
MCP, SCJP




-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, March 10, 2009 6:45 PM
To: Tomcat Users List
Subject: Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/6/2009 2:03 PM, Mark Thomas wrote:
 Bing Zheng wrote:
 The tomcat server (version 5.5.23) is behind a load balancer.  If I 
 use request.getRemoteAddr(), it returns the load balancer's ip.  If I 
 use request.getHeader(REMOTE_ADDR), it returns the correct client 
 IP address.  Is this a known bug?  Thanks.
 
 Nope, it is expected behaviour.

Is it? From the javadoc for javax.servlet.ServletRequest:

Returns the Internet Protocol (IP) address of the client or last proxy that
sent the request. For HTTP servlets, same as the value of the CGI variable
REMOTE_ADDR.

I would think that if
!request.getRemoteAddr().equals(request.getHeader(REMOTE_ADDR)) then
something has gone wrong.

Perhaps a load-balancer doesn't count as a proxy under this definition?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm2iuIACgkQ9CaO5/Lv0PBEPQCgkT3kiGT9/nUUbmw6B8eTI7Kn
CusAnjzmfCLle3z3ZUgtvN3buVhy0mf+
=B3fe
-END PGP SIGNATURE-

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

2009-02-26 Thread Ilya Kazakevich
You can use VPN than:)

But RDP (remote desktop) is better, because RPC calls used in all MMC
(management consoles) are designed for local network and work pretty slow on
the Internet.

Remote desktop connection  (mstsc) is the best solution, I think.

-Original Message-
From: Laura Bartolomé [mailto:la...@secways.com] 
Sent: Thursday, February 26, 2009 12:48 AM
To: Tomcat Users List
Subject: Re: tomcat restart remotely

you're right but this has to be trough internet, not local...

André Warnier escribió:
 Caldarale, Charles R wrote:
 From: Laura Bartolomé [mailto:la...@secways.com]
 Subject: Re: tomcat restart remotely

 My problem was I haven't thought before! :) I'm going to test it 
 right now

 As far as I know, given the appropriate permissions for the account 
 you use to do this, you can also access the services applet of 
 another Windows machine remotely.  You do not need SSH or Remote 
 Desktop or any external utility for that.
 If you right-click on the My Computer icon of any Windows pc in your 
 network, and choose action in the top menu, the first item is 
 connect to another computer.  You can then manage this other 
 computer (if your account has these permissions, and only then), and 
 turn services on/off on that other computer, including Tomcat.



 -
 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



RE: Question

2009-02-25 Thread Ilya Kazakevich
Hello.

Give us:
1) Tomcat versions
2) log files (catalina and localhost) 
3) URLs of these links

How do you run tomcat? What command do you use?



-Original Message-
From: koppisetty bhavani naga satish [mailto:kbnsat...@gmail.com] 
Sent: Wednesday, February 25, 2009 9:46 PM
To: users@tomcat.apache.org
Subject: Question

Hi

I will talk about the problem I have encountered in brief. I have two tomcat
servers. I could deploy the new-same  war on both of them. but with one
server I am facing problem with two links on the website. They point to 404
pages. Can any one suggest me the solutin for that.

The environment is LINUX.

Thanks

Satish


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



Context in [engine]/[host]/[app].xml and .war deployment

2009-02-18 Thread Ilya Kazakevich
Hello, 

I want to implement the following scenario: 

Developer creates .war file, which expects all config to be in context. 
He sends this file to IT guy who should create  [engine]/[host]/[app].xml
with all config he need, and copy .war file to webapps. Tomcat then should
depoly this app (or redeploy, if one already exists).
Next version of app could be easly copied to webapps and that redeployed. 
So, here is two general ideas:
1) IT guy does not need to go inside of .war file, he may configure
application using  [engine]/[host]/[app].xml
2) New .war file can be deployed automatically, and redeployment does not
affect config (which is in [engine]/[host]/[app].xml file).

But when I create  [engine]/[host]/[app].xml and than start tomcat, it says:

SEVERE: Error starting static Resources:
java.lang.IllegalArgumentException: Document base
[CATALINA_HOME]/webapps/[MY_APP] does not exist or is not a readable
directory
Well. it seems to be OK: I did not deploy .war file yet.
But when I deploy .war file -- tomcat does NOT deploy it, and even logs are
empty. Looks like tomcat does not see my new .war file. 

Here are my questios: 
1) Did I do something wrong?
2) Is it possible to implement my scenario?

Tomcat: 6.0

Thank you, 

Ilya.


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



RE: Tomcat-- Web Server or Web Container?

2008-12-10 Thread Ilya Kazakevich
Hi, 

Web-server is a tool, which handles HTTP requests. Apache is web-server.
Microsoft IIS is web-server.  Thttpd is web-server too.
Servlet-container (according to specification of servlets) is something,
that runs servlets in special environment. 
Web-server may work with CGI or static pages or servlets.

Tomcat is web-server AND servlet-container.



Kazakevich Ilya,
MCP, SCJP
 

-Original Message-
From: Thangavel Sankaranarayanan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2008 3:19 PM
To: Tomcat Users List
Subject: Tomcat-- Web Server or Web Container?

Hi

I  have a doubt  which is breaking my head and I dont find good definition
for it...

What is the difference between Web Server and Web Container?
What are the roles of Web Server and Web Container ?
is Tomcat  a Web Server or Web Container ..and why?


I would e very Thankfull to find a response for it.:)

Regards,
Thangavel Sankaranarayanan


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