Re: Prevent Hot Linking

2009-04-19 Thread André Warnier

Graeme Kidd wrote:

Hi,
 
Is there a way to configure tomcat to prevent some one from downloading a file I host when they are not within my domain?
 

You may want to have a look here :
http://tuckey.org/urlrewrite/
It's a bit like the Swiss Army knife for this kind of thing.
You would normally do this on the base of the "Referer:" HTTP header, 
which normally contains the URL of the page from which the current 
request is coming from.


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



Re: Prevent Hot Linking

2009-04-19 Thread André Warnier

André Warnier wrote:

Graeme Kidd wrote:

Hi,
 
Is there a way to configure tomcat to prevent some one from 
downloading a file I host when they are not within my domain?
 

You may want to have a look here :
http://tuckey.org/urlrewrite/
It's a bit like the Swiss Army knife for this kind of thing.
You would normally do this on the base of the "Referer:" HTTP header, 
which normally contains the URL of the page from which the current 
request is coming from.


Upon re-reading your original post, it occurs tomme that I may have 
misunderstood your request.
If you want to just block /all/ accesses to your server, except if they 
come from one or more specific ranges of IP addresses, then you could 
use a Remote Address Filter, like explained here :

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

If I am still misunderstanding, then you need to specify more precisely 
what you mean by "not within my domain".


For example, you should be aware that
- IP addresses and DNS "domains" tend to overlap, but do not necessarily 
overlap
- filtering accesses by originating IP address is relatively efficient, 
but filtering by domain name much less so, because each access then 
requires a reverse DNS lookup, which may not even work in some cases



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



RE: Prevent Hot Linking

2009-04-19 Thread Martin Gainty

Graeme-
if I interpret the requirement correctly you need some manner of rewriting the 
URL?
 
with Tomcat you can use URLRewrite available from tuckey
http://tuckey.org/urlrewrite/

anyone?
Martin 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






> From: coolki...@hotmail.com
> To: users@tomcat.apache.org
> Subject: Prevent Hot Linking
> Date: Sun, 19 Apr 2009 04:15:15 +0100
> 
> 
> Hi,
>  
> Is there a way to configure tomcat to prevent some one from downloading a 
> file I host when they are not within my domain?
>  
> For example I have a file hosted here:
> www.mydomain.com/mypage/file.xml
>  
> That is listed on a page here:
> www.mydomain.com/mypage/mypage.html
>  
> They will have no problem downloading it, but if the link to the file.xml was 
> listed elsewhere e.g.
> www.notmydomain.com/notmypage/notmypage.html
> They would be denied access. 
>  
> I know I can do this using .htaccess on Apache but I don't know if this is 
> possible using WEB-INF/web.xml
> 
> Any ideas on how this can be achieved will be greatly appreciated.
>  
> Thanks
> _
> View your Twitter and Flickr updates from one place – Learn more!
> http://clk.atdmt.com/UKM/go/137984870/direct/01/
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009

Re: Prevent Hot Linking

2009-04-19 Thread David Smith
I think you got it right the first time.  The OP wants to make sure  
the referrer header is present and starts with http://www.mydomain.com  
as opposed to http://www.anotherdomain.com.  It'll help prevent other  
sites from linking directly to resources on the OP's site.


-- David

On Apr 19, 2009, at 9:12 AM, André Warnier  wrote:


André Warnier wrote:

Graeme Kidd wrote:

Hi,
Is there a way to configure tomcat to prevent some one from  
downloading a file I host when they are not within my domain?



You may want to have a look here :
http://tuckey.org/urlrewrite/
It's a bit like the Swiss Army knife for this kind of thing.
You would normally do this on the base of the "Referer:" HTTP  
header, which normally contains the URL of the page from which the  
current request is coming from.
Upon re-reading your original post, it occurs tomme that I may have  
misunderstood your request.
If you want to just block /all/ accesses to your server, except if  
they come from one or more specific ranges of IP addresses, then you  
could use a Remote Address Filter, like explained here :

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

If I am still misunderstanding, then you need to specify more  
precisely what you mean by "not within my domain".


For example, you should be aware that
- IP addresses and DNS "domains" tend to overlap, but do not  
necessarily overlap
- filtering accesses by originating IP address is relatively  
efficient, but filtering by domain name much less so, because each  
access then requires a reverse DNS lookup, which may not even work  
in some cases



-
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: Prevent Hot Linking

2009-04-19 Thread André Warnier

David Smith wrote:
I think you got it right the first time.  The OP wants to make sure the 
referrer header is present and starts with http://www.mydomain.com as 
opposed to http://www.anotherdomain.com.  It'll help prevent other sites 
from linking directly to resources on the OP's site.



Basically yes.
But basing the acceptance or rejection on a HTTP request header sent by 
the browser is not absolutely secure, in the sense that this can easily 
be faked using any HTTP client agent such as wget, curl, lwp-request etc..
So you are right in saying "help prevent", but it would not be correct 
to say "prevent".


On the other hand, filtering requests based on the client's IP address 
is relatively secure, since it is much harder (and normally 
counter-productive) to fake that.


So, like always, it depends...

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



RE: Need to share JVM for both tomcat and RMI server

2009-04-19 Thread Caldarale, Charles R
> From: siranjeevi krishnan [mailto:siranjee...@gmail.com]
> Subject: Re: Need to share JVM for both tomcat and RMI server
> 
> But it search the server.xml in "C:\Program Files\myApp\conf\server.xml"
> instead of tomcat\conf\server.xml.

You need to set the value of the catalina.base and catalina.home system 
properties to the path of the Tomcat directory, rather than using the default 
value of the current directory.

 - 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



Re: Prevent Hot Linking

2009-04-19 Thread Hassan Schroeder
On Sun, Apr 19, 2009 at 7:37 AM, André Warnier  wrote:

> But basing the acceptance or rejection on a HTTP request header sent by the
> browser is not absolutely secure, in the sense that this can easily be faked
> using any HTTP client agent such as wget, curl, lwp-request etc..

True. But it seems relatively trivial to write a filter that would add the
originating IP of each request for the base resource, e.g. 'foo.html',
to an in-memory list.

Then requests for the targeted resource, e.g. 'bar.jpg', can be easily
checked against that list and rejected if the request IP isn't present.

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com

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



RE: Prevent Hot Linking

2009-04-19 Thread Graeme Kidd


Thanks André,
urlrewrite seems a suficiant solution for now as I only want to block people if 
they try and acess the file from outside my domain. If my understanding is 
correct blocking by IP although harder to fake would prevent them no matter 
what.
 
There is an example given in the urlrewrite guide on Blocked Inline-Images 
which I plan to adapt to my needs:
http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html
 
Thanks
_
Beyond Hotmail — see what else you can do with Windows Live.
http://clk.atdmt.com/UKM/go/134665375/direct/01/
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



15 second for redeployment is to much

2009-04-19 Thread Khlystov Alexandr


Hello guys.

I can't fix my maven2+wicket application to be redeployed less than 15 
seconds, but I want it to take 5 seconds at least.


Could someone provide the fastest in the world practise of webapp on 
Tomcat redeployment???


Precondition ( inital deployment): copy war dir with my webapp into 
tomcat directory.


How redeployment time is spent:

  1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
  2. 0 second copy *.class file into Tomcat/webapps
  3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
 files are changed
  4. 1 seconds takes to undeploy my webapp
  5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
 Beans frameworks with my data)

So it is too much I think.

Any ideas??

Thanks in advance.

--
Khlystov Alexandr


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



Re: 15 second for redeployment is to much

2009-04-19 Thread Kees Jan Koster

Dear Khlystov,

 1. 5 second (using maven) compile source ( usually it is 1 or 2  
files )

 2. 0 second copy *.class file into Tomcat/webapps


Stop using Maven for simple compiles and write a small shell script  
that just calls javac with the webapp's WEB-INF/classes as output dir.



 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


There is a timer somewhere that you can lower for this. I forget  
precisely which one. It will slow down Tomcat a bit, but you will  
redeploy faster.



 4. 1 seconds takes to undeploy my webapp
 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)



Well, you chose these frameworks, so you'll have to live with their  
startup times. Lazy initialisation *may* help, if you initialise more  
than you need for a specific test.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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



Re: 15 second for redeployment is to much

2009-04-19 Thread Pid
Kees Jan Koster wrote:
> Dear Khlystov,
> 
>>  1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>>  2. 0 second copy *.class file into Tomcat/webapps
> 
> Stop using Maven for simple compiles and write a small shell script that
> just calls javac with the webapp's WEB-INF/classes as output dir.
> 
>>  3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>> files are changed
> 
> There is a timer somewhere that you can lower for this. I forget
> precisely which one. It will slow down Tomcat a bit, but you will
> redeploy faster.
> 
>>  4. 1 seconds takes to undeploy my webapp
>>  5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>> Beans frameworks with my data)
> 
> 
> Well, you chose these frameworks, so you'll have to live with their
> startup times. Lazy initialisation *may* help, if you initialise more
> than you need for a specific test.

1. Use faster hardware?

Why are you setting an arbitrary target time for rebuilding your
application and how is this actually meaningful?

I don't understand why this would matter, can you explain?


p



> -- 
> Kees Jan
> 
> http://java-monitor.com/forum/
> kjkos...@kjkoster.org
> 06-51838192
> 
> Rule 1 for being in a hole: stop digging.
> 
> 
> -
> 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: 15 second for redeployment is to much

2009-04-19 Thread Khlystov Alexandr


Thanks, Kees!

I'll implement your advices, and will reply with results.

Kees Jan Koster пишет:

Dear Khlystov,


1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
2. 0 second copy *.class file into Tomcat/webapps


Stop using Maven for simple compiles and write a small shell script 
that just calls javac with the webapp's WEB-INF/classes as output dir.



3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


There is a timer somewhere that you can lower for this. I forget 
precisely which one. It will slow down Tomcat a bit, but you will 
redeploy faster.



4. 1 seconds takes to undeploy my webapp
5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)



Well, you chose these frameworks, so you'll have to live with their 
startup times. Lazy initialisation *may* help, if you initialise more 
than you need for a specific test.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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






--
Khlystov Alexandr


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



Re: 15 second for redeployment is to much

2009-04-19 Thread Khlystov Alexandr

Thanks, for reply Pid.

Hardware is fast enough 2 Gb RAM, 2 Ghz CPU dual core athlon 64.

Sorry, I did not get your message. What do you think is not meaningful? 
Some times and need to redeploy webapp 10 times in 10 minutes.




Pid пишет:

Kees Jan Koster wrote:
  

Dear Khlystov,



 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
 2. 0 second copy *.class file into Tomcat/webapps
  

Stop using Maven for simple compiles and write a small shell script that
just calls javac with the webapp's WEB-INF/classes as output dir.



 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed
  

There is a timer somewhere that you can lower for this. I forget
precisely which one. It will slow down Tomcat a bit, but you will
redeploy faster.



 4. 1 seconds takes to undeploy my webapp
 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)
  

Well, you chose these frameworks, so you'll have to live with their
startup times. Lazy initialisation *may* help, if you initialise more
than you need for a specific test.



1. Use faster hardware?

Why are you setting an arbitrary target time for rebuilding your
application and how is this actually meaningful?

I don't understand why this would matter, can you explain?


p



  

--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


-
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



  



--
Khlystov Alexandr


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



Re: 15 second for redeployment is to much

2009-04-19 Thread Khlystov Alexandr


I have 10 seconds now instead of 15 with 2 of 3 options:

backgroundProcessorDelay="1"
antiJARLocking="true" backgroundProcessorDelay="1"/>


and
lazy-init for all beans.

Cool! thanks again.

Now I'm going to sleep, and will implement javac direct compilation 
tomorrow.


Kees Jan Koster пишет:

Dear Khlystov,


1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
2. 0 second copy *.class file into Tomcat/webapps


Stop using Maven for simple compiles and write a small shell script 
that just calls javac with the webapp's WEB-INF/classes as output dir.



3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


There is a timer somewhere that you can lower for this. I forget 
precisely which one. It will slow down Tomcat a bit, but you will 
redeploy faster.



4. 1 seconds takes to undeploy my webapp
5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)



Well, you chose these frameworks, so you'll have to live with their 
startup times. Lazy initialisation *may* help, if you initialise more 
than you need for a specific test.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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






--
Khlystov Alexandr


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



Re: 15 second for redeployment is to much

2009-04-19 Thread André Warnier

Hi.

I am far from being the specialist here, but my inner application 
designer core revolts at the idea of having a thread in Tomcat busy at 
nothing else but checking 86,400 times a day, just in case you redeploy 
an application from time to time.

There must exist a more efficient mechanism for doing that.
One should probably check how the Tomcat Manager deploys an application 
on-demand, and use the same mechanism e.g.


I'm curious to see Chuck's reaction to this thread.



Khlystov Alexandr wrote:


I have 10 seconds now instead of 15 with 2 of 3 options:

backgroundProcessorDelay="1"
antiJARLocking="true" backgroundProcessorDelay="1"/>


and
lazy-init for all beans.

Cool! thanks again.

Now I'm going to sleep, and will implement javac direct compilation 
tomorrow.


Kees Jan Koster пишет:

Dear Khlystov,


1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
2. 0 second copy *.class file into Tomcat/webapps


Stop using Maven for simple compiles and write a small shell script 
that just calls javac with the webapp's WEB-INF/classes as output dir.



3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


There is a timer somewhere that you can lower for this. I forget 
precisely which one. It will slow down Tomcat a bit, but you will 
redeploy faster.



4. 1 seconds takes to undeploy my webapp
5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)



Well, you chose these frameworks, so you'll have to live with their 
startup times. Lazy initialisation *may* help, if you initialise more 
than you need for a specific test.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


-
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



windows 2k3 / Tomcat 6 / IIS configuration - randomly losing sessions

2009-04-19 Thread Menachem Husarsky

I'll start by giving a brief history:

 

We have multiple sites on our old host that ran under IIS and Resin fine for 
years, we recently switched to a dedicated server using windows 2k3. Under IIS 
we installed the isapi connector tool from apache version 1.2.27, and we are 
currently using tomcat 6 for all our sites. The problem started from day one. 
each day across all our sites, "some" shoppers will randomly have their carts 
purged out right in the middle of their checkout process. I have determined 
this isn't a browser cookie issue, as they had a solid session going otherwise 
they wouldn't have been able to enter products into their cart and begin the 
checkout process. I also know customers are within the 30 timeout window as 
they have emailed us stating not 5 minutes after entering checkout they were 
sent back to their cart page with an empty cart message. My only conclusion is 
somehow these customers are losing their sessions and being issued new ones. It 
seems to do this randomly and I can't seem to replicate the error myself, but I 
am recording how often it occurs to other people. I'm uncertain who is the 
culprit here (IIS or Tomcat or TomcatRedirector).

 

I have read other entries with people who have similar problems, but there 
doesn't seem to be much in the way of solutions. Can anyone please point me in 
the right direction as to figure out where to go from here? I've reached a dead 
end, and don't know how to proceed. Thank you for any help or advice anyone can 
offer me.

Michael
husar...@hotmail.com




_
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009

Re: 15 second for redeployment is to much

2009-04-19 Thread Ronald Klop

Fix for step 3. Don't wait for Tomcat to detect changes. See 
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html or use 
org.apache.catalina.ant.ReloadTask (which uses the manager). My compile command 
automaticly calls this after a succesful compile.

Another tip: test business logic (*.java) with junit. Don't start Tomcat for 
it. And for GUI code you normaly don't need to redeploy your webapp. Tomcat can 
dynamicly compile jsp and other template engines often can do that too.

Ronald.


Op zondag, 19 april 2009 18:56 schreef Khlystov Alexandr  :> 


Hello guys.

I can't fix my maven2+wicket application to be redeployed less than 15 seconds, 
but I want it to take 5 seconds at least.

Could someone provide the fastest in the world practise of webapp on Tomcat 
redeployment???

Precondition ( inital deployment): copy war dir with my webapp into tomcat 
directory.

How redeployment time is spent:

   1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
   2. 0 second copy *.class file into Tomcat/webapps
   3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
  files are changed
   4. 1 seconds takes to undeploy my webapp
   5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
  Beans frameworks with my data)

So it is too much I think.

Any ideas??

Thanks in advance.

--
Khlystov Alexandr


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

 







 

RE: 15 second for redeployment is to much

2009-04-19 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: 15 second for redeployment is to much
> 
> I'm curious to see Chuck's reaction to this thread.

How about pointless?  Somewhat akin to debating the number of angels that can 
dance on the head of a pin.

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



Re: Building Tomcat 5.5.27 & tomcat-native

2009-04-19 Thread Mark Thomas
Andre-John Mas wrote:
> the only thing which seems odd is the generated tar balls are marked as
> 5.5.26. Is this normal?

No :). That is a bug.

Mark



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



Re: Building Tomcat 5.5.27 & tomcat-native

2009-04-19 Thread Mark Thomas
Caldarale, Charles R wrote:
>> From: Andre-John Mas [mailto:aj...@sympatico.ca]
>> Subject: Building Tomcat 5.5.27 & tomcat-native
>>
>> I am trying to build 5.5.27, but it is asking for tomcat-native
>> 1.1.12, though I see that only 1.1.16 is available. This being the
>> case, a couple of questions:
>>- is this a suitable replacement?
> 
> Yes.
> 
>>- where do I specify to use this version instead?
> 
> apache-tomcat-5.5.26-src/build/build.properties.default

That will work but the 'correct' way to do this is to create a
build.properties file and use that to override the defaults.

Mark



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



Re: Tomcat 6 and Windows 2003 -Xmx1024 Problem

2009-04-19 Thread garidan

I have the same problem: just applied windows update to my windows 2003
server and tomcat 6 doesn't start due to "Could not reserve enough space for
object heap".
I see a lot of free ram, and disk space, but the only way to start has been
to lower -Xmx value.

No clue to what happened, but it's surely related to last windows updates
applied (malware removal tool?). 



Mirco Attocchi wrote:
> 
> Hi all,
> from yesterday on two different server Windows 2003 R2 with Tomcat
> 6.0.18 running with -Xmx1024m, after a nightly restart, I've this
> problem:
> 
> [2009-04-16 10:05:51] [info] Error occurred during initialization of VM
> [2009-04-16 10:05:51] [info] Could not reserve enough space for object
> heap
> 
> And now Tomcat start only with -Xmx512m.
> 
> Seems due to an update from windows update. you know something about?
> 
> Thanks
> 
> Mirco Attocchi
> 
> -
> 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/Tomcat-6-and-Windows-2003--Xmx1024-Problem-tp23092362p23127374.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



Re: 15 second for redeployment is to much

2009-04-19 Thread Andre-John Mas


On 19-Apr-2009, at 14:57, André Warnier wrote:


Hi.

I am far from being the specialist here, but my inner application  
designer core revolts at the idea of having a thread in Tomcat busy  
at nothing else but checking 86,400 times a day, just in case you  
redeploy an application from time to time.

There must exist a more efficient mechanism for doing that.
One should probably check how the Tomcat Manager deploys an  
application on-demand, and use the same mechanism e.g.


This is one reason I would like to see a "file change" listener as  
standard in Java. The idea is that for systems providing a native file  
listener, such as Unix system which offer "kernel notifications" this  
would be used, and as a fall-back a timer task would be used. I am not  
aware of any current cross-platform implementations of this approach.



I'm curious to see Chuck's reaction to this thread.

Khlystov Alexandr wrote:

I have 10 seconds now instead of 15 with 2 of 3 options:
backgroundProcessorDelay="1"
reloadable="true" antiJARLocking="true"  
backgroundProcessorDelay="1"/>

and
lazy-init for all beans.
Cool! thanks again.
Now I'm going to sleep, and will implement javac direct compilation  
tomorrow.

Kees Jan Koster пишет:

Dear Khlystov,

1. 5 second (using maven) compile source ( usually it is 1 or 2  
files )

2. 0 second copy *.class file into Tomcat/webapps


Stop using Maven for simple compiles and write a small shell  
script that just calls javac with the webapp's WEB-INF/classes as  
output dir.



3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


There is a timer somewhere that you can lower for this. I forget  
precisely which one. It will slow down Tomcat a bit, but you will  
redeploy faster.



4. 1 seconds takes to undeploy my webapp
5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)



Well, you chose these frameworks, so you'll have to live with  
their startup times. Lazy initialisation *may* help, if you  
initialise more than you need for a specific test.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


-
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: Building Tomcat 5.5.27 & tomcat-native

2009-04-19 Thread Andre-John Mas


On 19-Apr-2009, at 16:45, Mark Thomas wrote:


Andre-John Mas wrote:
the only thing which seems odd is the generated tar balls are  
marked as

5.5.26. Is this normal?


No :). That is a bug.


I suppose it is the wrong time to open a ticket for this, but for  
5.5.28 would it be worth opening a ticket to make sure that 5.5.28  
doesn't generate tarballs marked '5.5.27'?


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



Iterate LinkedHashMap gives HTTP 500 in a JSP (NPE)

2009-04-19 Thread Tommy Pham

Hi,

I have a problem iterating a LinkedHashMap lhmObject. 
The lhmObject.size() gives correct size and lhmObject.keySet().toString gives 
the correct values.
However, if I try iterate the object with lhmObject.keySet() with an empty loop:

for (Integer key : lhmObject.keySet() ) { }

or

for (Iterator it = lhmObject.keySet().iterator(); it.hasNext(); ) { }

I get a HTTP 500 - NullPointerException in the JSP page, which has java.util.* 
and appropriate  for import.
Has anyone seen this before?

Tomcat 6.0.18
JDK 1.6u4
Win03R2 x86

TIA,
Tommy

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