Re: In-Process Tomcat

2007-06-25 Thread Leon Rosenberg

On 6/25/07, lightbulb432 [EMAIL PROTECTED] wrote:


Thanks for your detailed response. See questions below.


In-process Tomcat is to have Tomcat running in the same process space as
 Apache HTTPD, IIS, or other web server.  Since most of the web servers
 are implemented in C/C++, you will have to use JNI to integrate with
 Java-based Tomcat, and create a mod_tomcat like module for Httpd.

So there's no standard prepackaged installation of the two combined, or no
standard connector plugin or something that's distributed with either
Tomcat or HTTPD, which is why I'd have to create it myself? Is the
in-process approach that uncommon?


personally i never heard of anyone using it.




Definitely the in-process setup improves performance, since
 communication between Tomcat and web server occurs via memory-based data
 exchange.  It will be less stable since if something went wrong with the
 Tomcat, it would affect the web server directly.  It will also be less
 scalable, since this setup won't support high-availability and
 clustering of Tomcat servers.

Why does the in-process approach render high-availability and clustering
impossible? From a technical/implementation perspective, what is it about
the in-process approach that causes this specific functionality to not be
possible?


I think the poster means that you can't loadbalance with an apache
between multiple tomcat instance, a clustering / fail-over technique
for low cost sites (say 2 or 3 webservers).



In any case, if clustering features don't work then it's definitely no
surprise that any web application that needs to scale wouldn't use this
approach...unless it is being used in some way by such web applications in
production - anybody know?


Any web application that needs to scale wouldn't use httpd (or
anything else) in front of tomcat, so the question in- or out-process
tomcat doesn't matter. From 5 high performance application I know the
details of, 1 is still using apache in front; more out of habbit,
rather than by need. Others are using a hw loadbalancer in front of x
tomcat servers, and some servers for static content (which can be
apache httpd, but is mostly something different) which are parallel to
the tomcat servers. So the loadbalancer decides which server to ask
for specific content type.

regards
Leon


--
View this message in context: 
http://www.nabble.com/In-Process-Tomcat-tf3972772.html#a11281236
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Will Tomcat 6 support JSR-196 (Java Authentication SPI for Containers)?

2007-06-25 Thread Guofeng Zhang
Hi,

 

Is there any plan in Tomcat's roadmap that when Tomcat will support
JSR-196?

 

Thanks

 



Programmatically stop/start context (webapp)

2007-06-25 Thread syg6

Hello,

I would like to be able to start and stop my 'cache' webapp from my own
'cache-admin' webapp. These two apps usually run on the same Tomcat
instance, but not always.

I am not sure if I should use ManagerServlet or HTMLManagerServlet, or
Embedded tomcat. I have found some examples on this newsgroup and onjava.com
but was unable to get them to work. Any ideas?

I would also like to somehow (Ajax perhaps) grab the contents of the log
file and display it, updating every 2-3 seconds, in my 'cache-admin' webapp
when the 'cache' webapp is started/stopped. I am using log4j for logging.

Many thanks for any help!
Bob
-- 
View this message in context: 
http://www.nabble.com/Programmatically-stop-start-context-%28webapp%29-tf3975317.html#a11284321
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



session dying

2007-06-25 Thread Jacek Munch
Hello,

I looked around this list, and noticed that nobody has the similar
problem.
Seems I'm setting something wrong. What ?

I have a JSP application. I start it with my browser and make it inactive
for more than 30 minutes.
My session dies, so the user has to login back again.

In conf \ web.xlm I have
session-config
session-timeout600/session-timeout
/session-config

in myapp \ Web-inf\ web.xml I have
session-config
session-timeout480/session-timeout
/session-config

in my jsp application I have
session.setMaxInactiveInterval(120);

Tomcat manager shows default value of inactive time = 480
There is nothing in Tomcat logs at debug level.

tested on
Tomcat 5.5.17
Tomcat 5.5.23
Tomcat 6.0.13

OS
Win XP Pro 32bit
Win 2003 server 64bit

JRE
1.6.01

Please point me what I am doing wrong
Yours
Jacek M


smime.p7s
Description: S/MIME cryptographic signature


Re: session dying

2007-06-25 Thread syg6

Not sure what you're trying to do with 480 and 600 but the session-timeout is
specified in minutes. If you want your app to timeout after 30 minutes, put 

  session-config
session-timeout30/session-timeout
  /session-config

Bob

Jacek Munch wrote:
 
 Hello,
 
 I looked around this list, and noticed that nobody has the similar
 problem.
 Seems I'm setting something wrong. What ?
 
 I have a JSP application. I start it with my browser and make it inactive
 for more than 30 minutes.
 My session dies, so the user has to login back again.
 
 In conf \ web.xlm I have
 session-config
 session-timeout600/session-timeout
 /session-config
 
 in myapp \ Web-inf\ web.xml I have
 session-config
 session-timeout480/session-timeout
 /session-config
 
 in my jsp application I have
 session.setMaxInactiveInterval(120);
 
 Tomcat manager shows default value of inactive time = 480
 There is nothing in Tomcat logs at debug level.
 
 tested on
 Tomcat 5.5.17
 Tomcat 5.5.23
 Tomcat 6.0.13
 
 OS
 Win XP Pro 32bit
 Win 2003 server 64bit
 
 JRE
 1.6.01
 
 Please point me what I am doing wrong
 Yours
 Jacek M
 
  
 

-- 
View this message in context: 
http://www.nabble.com/session-dying-tf3975353.html#a11284828
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Performance

2007-06-25 Thread Mohammed Zabin

Hi All
I have developed a web site that opens a recordset at start, and while
looping through records of the main ResultSet i Open a new ResultSet for
each record, to get a specific information, then close it. like this:

while( rs.next() ) {
  Statement stmt = dbConn.createStatement();
  ResultSet newRs = stmt.executeQuery(SOME QUERY);
  ..
  .
  *Some Code Here*
  .
  .

  stmt.close();
  newRs.close();
}

I feel that this way is resource-consuming, is it or not, and if it is, what
is the best way to code this code??

Thanks


Re: Performance

2007-06-25 Thread syg6

1. This is a question for the 
http://forum.java.sun.com/forum.jspa?forumID=31 java forum , not Tomcat.
2. Yes, it's an incredibly wasteful way of doing things. Change your sql so
the 'extra info' you need is included in the same query. Chances are if you
can do it with two queries you can do it with one.

Bob




Mohammed Zabin wrote:
 
 Hi All
 I have developed a web site that opens a recordset at start, and while
 looping through records of the main ResultSet i Open a new ResultSet for
 each record, to get a specific information, then close it. like this:
 
 while( rs.next() ) {
Statement stmt = dbConn.createStatement();
ResultSet newRs = stmt.executeQuery(SOME QUERY);
..
.
*Some Code Here*
.
.
 
stmt.close();
newRs.close();
 }
 
 I feel that this way is resource-consuming, is it or not, and if it is,
 what
 is the best way to code this code??
 
 Thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/Performance-tf3975410.html#a11284672
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session dying

2007-06-25 Thread Jacek Munch
Hello,

I want my app to last at least 120 minutes.
It dies after 30 minutes ... WHY ?

Cheers
Jacek


-Original Message-
From: syg6 [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 1:18 PM
To: users@tomcat.apache.org
Subject: Re: session dying



Not sure what you're trying to do with 480 and 600 but the session-timeout
is
specified in minutes. If you want your app to timeout after 30 minutes,
put

  session-config
session-timeout30/session-timeout
  /session-config

Bob

Jacek Munch wrote:

 Hello,

 I looked around this list, and noticed that nobody has the similar
 problem.
 Seems I'm setting something wrong. What ?

 I have a JSP application. I start it with my browser and make it
inactive
 for more than 30 minutes.
 My session dies, so the user has to login back again.

 In conf \ web.xlm I have
 session-config
 session-timeout600/session-timeout
 /session-config

 in myapp \ Web-inf\ web.xml I have
 session-config
 session-timeout480/session-timeout
 /session-config

 in my jsp application I have
 session.setMaxInactiveInterval(120);

 Tomcat manager shows default value of inactive time = 480
 There is nothing in Tomcat logs at debug level.

 tested on
 Tomcat 5.5.17
 Tomcat 5.5.23
 Tomcat 6.0.13

 OS
 Win XP Pro 32bit
 Win 2003 server 64bit

 JRE
 1.6.01

 Please point me what I am doing wrong
 Yours
 Jacek M




--
View this message in context:
http://www.nabble.com/session-dying-tf3975353.html#a11284828
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


smime.p7s
Description: S/MIME cryptographic signature


RE: session dying

2007-06-25 Thread syg6

Change your web.xml, both in tomcat/conf and myApp/WEB-INF to 120.

Get rid of session.setMaxInactiveInterval(120). The setMaxInactiveInterval()
method of javax.servlet.http.Interface HttpSession takes the timeout in
SECONDS, not minutes. So you are setting your session timeout to 2 minutes.
Anyway, it's unnecessary, get rid of it.

Bob


Jacek Munch wrote:
 
 Hello,
 
 I want my app to last at least 120 minutes.
 It dies after 30 minutes ... WHY ?
 
 Cheers
 Jacek
 
 
 -Original Message-
 From: syg6 [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 25, 2007 1:18 PM
 To: users@tomcat.apache.org
 Subject: Re: session dying
 
 
 
 Not sure what you're trying to do with 480 and 600 but the session-timeout
 is
 specified in minutes. If you want your app to timeout after 30 minutes,
 put
 
   session-config
 session-timeout30/session-timeout
   /session-config
 
 Bob
 
 Jacek Munch wrote:

 Hello,

 I looked around this list, and noticed that nobody has the similar
 problem.
 Seems I'm setting something wrong. What ?

 I have a JSP application. I start it with my browser and make it
 inactive
 for more than 30 minutes.
 My session dies, so the user has to login back again.

 In conf \ web.xlm I have
 session-config
 session-timeout600/session-timeout
 /session-config

 in myapp \ Web-inf\ web.xml I have
 session-config
 session-timeout480/session-timeout
 /session-config

 in my jsp application I have
 session.setMaxInactiveInterval(120);

 Tomcat manager shows default value of inactive time = 480
 There is nothing in Tomcat logs at debug level.

 tested on
 Tomcat 5.5.17
 Tomcat 5.5.23
 Tomcat 6.0.13

 OS
 Win XP Pro 32bit
 Win 2003 server 64bit

 JRE
 1.6.01

 Please point me what I am doing wrong
 Yours
 Jacek M



 
 --
 View this message in context:
 http://www.nabble.com/session-dying-tf3975353.html#a11284828
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 

-- 
View this message in context: 
http://www.nabble.com/session-dying-tf3975353.html#a11285306
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Run multiple instances of tomcat on windows

2007-06-25 Thread David kerber


Ashish Kulkarni wrote:

Hi
The problem i am having is, when i installed second instance of tomcat it
replaced the windows service for the first tomcat, so i have only one 
tomcat
Use service.bat from the .zip package to create another service.  The 
easiest way to handle this is to do the windows installation, and then 
unzip the .zip distribution on top of the windows installation.  That 
way you have the first service to use as a model when you create the 
second service.



service in windows,
can i install one more service in tomcat now for the first installed 
tomcat,

if so how





Ashish

On 6/24/07, Cartman [EMAIL PROTECTED] wrote:


On 6/23/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:

 Hi
 I want to run 2 instance of tomcat on windows server, both of them are
 5.5.20,
 1. Is it possible to have them as 2 services so i can stop and start
them
 independently?



yes, each instance run its own service.

2. Do i have to install it twice?


yes, you have

3. Can i use java 1.4.2 for one and java 1.5.0 for other


ok

4. I can setup one tomcat as startup job in windows, but then how do i
make
 sure that all the log files go to stdout.log and stderr.log instead of
on
 the dos window.


you can configure when tomcat write the log, but by default it is the
same.

Is there any step by step document of doing this


I don't think, there are some information but is not explicit.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



LDAP / ActiveDirectory Problem

2007-06-25 Thread Christopher Hartung

Hi there,

we are using Tomcat 5.5.23 with LDAP Auth against our ActiveDirectory. 
Everythings works fine and the user can auth themself. But in our logs 
we get error messages like this:


25.06.2007 11:07:20 org.apache.catalina.realm.JNDIRealm authenticate
SCHWERWIEGEND: Exception performing authentication
javax.naming.PartialResultException [Root exception is 
javax.naming.CommunicationException: intern.domain.com:389 [Root 
exception is java.net.ConnectException: Connection timed out]]
at 
com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:224)

at
.




25.06.2007 11:07:20 org.apache.catalina.realm.JNDIRealm authenticate
WARNUNG: Exception performing authentication
javax.naming.CommunicationException: Request: 3 cancelled; remaining 
name 'dc=intern,dc=rossmann,dc=de'

at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
at
..




here is our ldap-config in the server.xml (it's changed because of 
business information ;) ) :





Realm  className=org.apache.catalina.realm.JNDIRealm debug=99
connectionName=[EMAIL PROTECTED]
connectionPassword=password

connectionURL=ldap://server1:389;
alternateURL=ldap://server2:389;

contextFactory=com.sun.jndi.ldap.LdapCtxFactory
authentication=simple
referrals=follow
userBase=dc=intern,dc=domain,dc=tld
userSearch=(sAmAccountName={0})
userRoleName=memberOf
userSubtree=true

roleBase=dc=intern,dc=domain,dc=tld
roleSearch=(member={0})
roleSubtree=true
roleName=cn /


Do you know Problems like this?

Thx for yours answers

so long
chris


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Port-based virtual hosting

2007-06-25 Thread Caldarale, Charles R
 From: lightbulb432 [mailto:[EMAIL PROTECTED] 
 Subject: RE: Port-based virtual hosting
 
 If you somehow have multiple contexts (within the same Host 
 or Service, or within different ones in your Tomcat instance)
 that point to the same WAR file or docBase, are there multiple
 instances of that web application running

Yes.  Each non-overridden explicit or implicit Context results in a
separate webapp, regardless of the location of the code in the file
system.  Since each webapp has its own classloader, the classes involved
are distinct.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session dying

2007-06-25 Thread Jacek Munch
Hello,

Thanks to syg6 for pointing.

--
The solution - when I made
session.setMaxInactiveInterval(7200)
in jsp file it started working
---
without this line I got standard session timieout after 30 minutes
despite setting 
session-timeout120/session-timeout
in both web.xml files (for tomcat and for app)

Yours
Jacek M

-Original Message-
From: syg6 [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 1:54 PM
To: users@tomcat.apache.org
Subject: RE: session dying



Change your web.xml, both in tomcat/conf and myApp/WEB-INF to 120.

Get rid of session.setMaxInactiveInterval(120). The
setMaxInactiveInterval()
method of javax.servlet.http.Interface HttpSession takes the timeout in
SECONDS, not minutes. So you are setting your session timeout to 2
minutes.
Anyway, it's unnecessary, get rid of it.

Bob


Jacek Munch wrote:
 
 Hello,
 
 I want my app to last at least 120 minutes.
 It dies after 30 minutes ... WHY ?
 
 Cheers
 Jacek
 
 
 -Original Message-
 From: syg6 [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 25, 2007 1:18 PM
 To: users@tomcat.apache.org
 Subject: Re: session dying
 
 
 
 Not sure what you're trying to do with 480 and 600 but the
session-timeout
 is
 specified in minutes. If you want your app to timeout after 30 minutes,
 put
 
   session-config
 session-timeout30/session-timeout
   /session-config
 
 Bob
 
 Jacek Munch wrote:

 Hello,

 I looked around this list, and noticed that nobody has the similar
 problem.
 Seems I'm setting something wrong. What ?

 I have a JSP application. I start it with my browser and make it
 inactive
 for more than 30 minutes.
 My session dies, so the user has to login back again.

 In conf \ web.xlm I have
 session-config
 session-timeout600/session-timeout
 /session-config

 in myapp \ Web-inf\ web.xml I have
 session-config
 session-timeout480/session-timeout
 /session-config

 in my jsp application I have
 session.setMaxInactiveInterval(120);

 Tomcat manager shows default value of inactive time = 480
 There is nothing in Tomcat logs at debug level.

 tested on
 Tomcat 5.5.17
 Tomcat 5.5.23
 Tomcat 6.0.13

 OS
 Win XP Pro 32bit
 Win 2003 server 64bit

 JRE
 1.6.01

 Please point me what I am doing wrong
 Yours
 Jacek M



 
 --
 View this message in context:
 http://www.nabble.com/session-dying-tf3975353.html#a11284828
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 

-- 
View this message in context:
http://www.nabble.com/session-dying-tf3975353.html#a11285306
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


smime.p7s
Description: S/MIME cryptographic signature


Re: In-Process Tomcat

2007-06-25 Thread lightbulb432


Any web application that needs to scale wouldn't use httpd (or
 anything else) in front of tomcat, so the question in- or out-process
 tomcat doesn't matter. From 5 high performance application I know the
 details of, 1 is still using apache in front; more out of habbit,
 rather than by need. Others are using a hw loadbalancer in front of x
 tomcat servers, and some servers for static content (which can be
 apache httpd, but is mostly something different) which are parallel to
 the tomcat servers. So the loadbalancer decides which server to ask
 for specific content type.

You're actually the first person I've heard to say that apps that need to
scale would not use HTTPD. I've read the exact opposite on multiple
occassions, but as I'm a relative newbie to Tomcat I'm hoping people on this
mailing list can correct me. Could you expand on your point further?

How would hardware load balancers go about handling sticky sessions? Or
would you have to design for a stateless web tier so that any Tomcat
instance will do upon the next request?

You mention that when you use a static content server, it's generally
something other that HTTPD. Is there a particular reason for that? What
static servers have you generally seen in use apart from HTTPD - are there
things that just work better in the setup you described than others?
-- 
View this message in context: 
http://www.nabble.com/In-Process-Tomcat-tf3972772.html#a11288104
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: In-Process Tomcat

2007-06-25 Thread Caldarale, Charles R
 From: lightbulb432 [mailto:[EMAIL PROTECTED] 
 Subject: Re: In-Process Tomcat
 
 You're actually the first person I've heard to say that apps 
 that need to scale would not use HTTPD. I've read the exact
 opposite on multiple occassions, but as I'm a relative newbie
 to Tomcat I'm hoping people on this mailing list can correct
 me. Could you expand on your point further?

Once upon a time, Tomcat was not terribly efficient at returning static
content, and that no longer valid perception persists, unfortunately
(first impressions, and all that).  Current levels of Tomcat show about
the same performance as httpd for static content.  Consequently, placing
httpd in front of Tomcat just to serve static content does not improve
response time for those requests, and has a significant negative impact
for dynamic requests due to the added path length.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: In-Process Tomcat

2007-06-25 Thread Leon Rosenberg

On 6/25/07, lightbulb432 [EMAIL PROTECTED] wrote:



Any web application that needs to scale wouldn't use httpd (or
 anything else) in front of tomcat, so the question in- or out-process
 tomcat doesn't matter. From 5 high performance application I know the
 details of, 1 is still using apache in front; more out of habbit,
 rather than by need. Others are using a hw loadbalancer in front of x
 tomcat servers, and some servers for static content (which can be
 apache httpd, but is mostly something different) which are parallel to
 the tomcat servers. So the loadbalancer decides which server to ask
 for specific content type.

You're actually the first person I've heard to say that apps that need to
scale would not use HTTPD. I've read the exact opposite on multiple
occassions, but as I'm a relative newbie to Tomcat I'm hoping people on this
mailing list can correct me. Could you expand on your point further?


I don't want to open this can of worms again, I think there were about
1000 discussions in the past, you should check the archives if you
want the details. Basically the anti-httpd fraction (which i belong
to) states: thats usage of httpd is

a) less secure than usage of tomcat
alone (at least it doesn't add any security cause requests are passed
along, and the last security issue was in the c code of mod_jk -
httpd).

b) less performant, since you add another node which does nothing but
consumes time.



How would hardware load balancers go about handling sticky sessions? Or
would you have to design for a stateless web tier so that any Tomcat
instance will do upon the next request?


HW loadbalancers can handle sticky sessions far better than apache.
You can stick it on cookies, path elements, source ip-adresses, page
content, load, colour of users hair
On the minus side they start at 10K USD and you usually need 2 of them.




You mention that when you use a static content server, it's generally
something other that HTTPD. Is there a particular reason for that? What
static servers have you generally seen in use apart from HTTPD - are there
things that just work better in the setup you described than others?


http://lighttpd.net/


regards
Leon

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Null

2007-06-25 Thread Propes, Barry L
yeah, this seems like a good solution, too.

-Original Message-
From: PTS [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 23, 2007 12:29 PM
To: Tomcat Users List
Subject: Re: Null


I had to deal with a lot of null values coming back from a database. I may 
have been reinventing the wheel but I wrote a little DBUtil class that I 
used to sanitize the returned data. I wrote a get for each type of data and 
did a try catch. If the data came back not null I simply returned it, if it 
came back null it threw an exception and I returned back a default value in 
the catch clause.

For text:

   /** returns the row and column equivalent from the DBResults or empty 
string if null or out of bounds*/
  public String getDataP(int r, int c){
   try{
if String[])queryResults.elementAt(r))[c]).equalsIgnoreCase(null))
 return ;
   return(((String[])queryResults.elementAt(r))[c]);
  }catch(Exception e){return ;}
  }

For numbers:

   /** returns the row and column equivalent from the DBResults or string 0 
if null or out of bounds*/
  public String getDataN(int r, int c){
   try{
if String[])queryResults.elementAt(r))[c]).equalsIgnoreCase(null))
 return 0;
   return(((String[])queryResults.elementAt(r))[c]);
  }catch(Exception e){return 0;}
  }


For time:

/** returns the row and column equivalent from the DBResults or string 
00:00:00 if null or out of bounds*/
  public String getDataT(int r, int c){
   try{
if String[])queryResults.elementAt(r))[c]).equalsIgnoreCase(null))
 return 00:00:00;
   return(((String[])queryResults.elementAt(r))[c]);
  }catch(Exception e){return 00:00:00;}
  }


Doug

- Original Message - 
From: Propes, Barry L  [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, June 22, 2007 1:11 PM
Subject: RE: Null


that doesn't sound rightare you sure you're pulling back a value from a 
column that's a string?

-Original Message-
From: Mohammed Zabin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 6:02 AM
To: Tomcat Users List
Subject: Re: Null


I tried it the other way, if( rs.getString(field) == null ) but the
compiler plames that null can't be compared to string

On 6/21/07, Tim Funk [EMAIL PROTECTED] wrote:


 if (null == rs.getString(col_foo)) {
out.println(tdnbsp;/td);
 } else {
// Evil since this doesn't escape the xml - for edutainment only
out.println(td + rs.getString(col_foo) + /td);
 }

 -Tim

 Mohammed Zabin wrote:
  Hi All
 
  Anyone knows how to deal with null values in JDBC ResultSet??
 
  I am trying to render a table in jsp page that read its value from the
  database, sometimes, the database returns null values, and so, the whole
  table couldn't be rendered. Is there any way to deal with null values.
 
  Thanks
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl

Syg, interesting question

I think, that what would make it tricky, is the actually packaging of the 
solution.


In theory if you do this (I'm writing this blind, excuse the code)
import org.apache.catalina.ant.*;

StartTask startTask = new StartTask();
startTask.setUsername(admin);
startTask.setPassword();
startTask.setUrl(http://localhost:8080/manager;);
startTask.setPath(/ContextOfWebApp);
startTask.execute();

This is actually turned into a URLrequest and sent to the manager... so 
in theory
if you want to you can just simulate the GET with the required params and 
http hdrs.


and a similar thing for stopping it.

Ok, but heres the tricky bit and if you can figure out how to do it in your 
dev environment, no problem.


The required jars are in the server main package so they will be missing 
from your servlet.
To develop you can just drop them in BUT then somehow when you actually 
package it, you have to take them out.


So... you will probably have to use late binding ie Class.forname or 
something, so you can get it working in dev environment and omit the jars in 
deployment.

OR if you on an App server, just do it in a remote bean.

Anyway, I think its dead easy except for the working around the container 
class loader issue.


Try it in a seperate app, think it will be easy but when you bring it 
into another web-app, the fun will start.


Have fun

- Original Message - 
From: syg6 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 12:40 PM
Subject: Programmatically stop/start context (webapp)




Hello,

I would like to be able to start and stop my 'cache' webapp from my own
'cache-admin' webapp. These two apps usually run on the same Tomcat
instance, but not always.

I am not sure if I should use ManagerServlet or HTMLManagerServlet, or
Embedded tomcat. I have found some examples on this newsgroup and 
onjava.com

but was unable to get them to work. Any ideas?

I would also like to somehow (Ajax perhaps) grab the contents of the log
file and display it, updating every 2-3 seconds, in my 'cache-admin' 
webapp

when the 'cache' webapp is started/stopped. I am using log4j for logging.

Many thanks for any help!
Bob
--
View this message in context: 
http://www.nabble.com/Programmatically-stop-start-context-%28webapp%29-tf3975317.html#a11284321

Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple instances vs multiple hosts

2007-06-25 Thread lightbulb432

In production, for organizations that run multiple web applications, would
they run it on different instances of Tomcat (1 instance per web application
or group of related web applications), or all web applications as different
hosts on one instance of Tomcat? (Not taking into account clustering, where
everything in whatever setup is chosen would be duplicated.)

What are the tradeoffs in terms of performance, resource usage,
maintainability, etc, and what are your comments based on past experience?
What's common in production and what isn't as much?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Multiple-instances-vs-multiple-hosts-tf3976746.html#a11288124
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



securing directory

2007-06-25 Thread tomcat user

Hi all,
I would like to know if anybody can tell me how to restrict web access to my
web app's base directory and its sub directories.
i.e.  webapp Test1 has a file root.xml  (tomcat\webapps\Test1\root.xml)
While I do need read access programmatically, I need for web users to not
access that file.
I am using an isapi connector through IIS (if that helps).
I do realize that permissions for directories reside in catalina.policy but
that appears to be permissions for programmatic access (i.e. my webapp).  I
am running Tomcat version 5.x.

Thank you for your help.


RE: securing directory

2007-06-25 Thread Caldarale, Charles R
 From: tomcat user [mailto:[EMAIL PROTECTED] 
 Subject: securing directory
 
 I would like to know if anybody can tell me how to restrict 
 web access to my web app's base directory and its sub directories.

Read the servlet spec.  Anything under WEB-INF is automatically
invisible to everything but the webapp.

To access resources, don't open them via the file system, use the
mechanism described here:
http://wiki.apache.org/tomcat/HowTo#head-45c3314139cb900ddd43dde2ff67153
2e6e844bc

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Robert Bowen
Hmmm ... This seems kind of kludgy to me. Would it not be better (easier, more 
elegant) to use Tomcat's monitoring with JMX to do this? I don't have all the 
details worked out but I believe that with an MBean I can (at least) monitor 
the container and the apps running in it and (hopefully) start and stop them as 
well.

The difficulty I am having is getting a clear and concise guide to using 
JMX/MX4J in Tomcat 6. There are a bunch of different guides out there that 
explain how to do this in Tomcat 5, 5.5, 6, and they all contradict themselves!

Anyway, I think this is possible, does it seem like a good idea?

Thanks!
Bob

- Original Message 
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, June 25, 2007 5:07:47 PM
Subject: Re: Programmatically stop/start context (webapp)

Syg, interesting question

I think, that what would make it tricky, is the actually packaging of the 
solution.

In theory if you do this (I'm writing this blind, excuse the code)
import org.apache.catalina.ant.*;

StartTask startTask = new StartTask();
startTask.setUsername(admin);
startTask.setPassword();
startTask.setUrl(http://localhost:8080/manager;;);
startTask.setPath(/ContextOfWebApp);
startTask.execute();

This is actually turned into a URLrequest and sent to the manager... so 
in theory
if you want to you can just simulate the GET with the required params and 
http hdrs.

and a similar thing for stopping it.

Ok, but heres the tricky bit and if you can figure out how to do it in your 
dev environment, no problem.

The required jars are in the server main package so they will be missing 
from your servlet.
To develop you can just drop them in BUT then somehow when you actually 
package it, you have to take them out.

So... you will probably have to use late binding ie Class.forname or 
something, so you can get it working in dev environment and omit the jars in 
deployment.
OR if you on an App server, just do it in a remote bean.

Anyway, I think its dead easy except for the working around the container 
class loader issue.

Try it in a seperate app, think it will be easy but when you bring it 
into another web-app, the fun will start.

Have fun

- Original Message - 
From: syg6 [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 12:40 PM
Subject: Programmatically stop/start context (webapp)



 Hello,

 I would like to be able to start and stop my 'cache' webapp from my own
 'cache-admin' webapp. These two apps usually run on the same Tomcat
 instance, but not always.

 I am not sure if I should use ManagerServlet or HTMLManagerServlet, or
 Embedded tomcat. I have found some examples on this newsgroup and 
 onjava.com
 but was unable to get them to work. Any ideas?

 I would also like to somehow (Ajax perhaps) grab the contents of the log
 file and display it, updating every 2-3 seconds, in my 'cache-admin' 
 webapp
 when the 'cache' webapp is started/stopped. I am using log4j for logging.

 Many thanks for any help!
 Bob
 -- 
 View this message in context: 
 http://www.nabble.com/Programmatically-stop-start-context-%28webapp%29-tf3975317.html#a11284321
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433

Re: securing directory

2007-06-25 Thread tomcat user

Chuck,

I appreciate the response, but assuming that a file does need to reside
directly under the webapp folder, can it be hidden from view.  Again, I
understand the alternative, but can I secure the webapp directory?




On 6/25/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 From: tomcat user [mailto:[EMAIL PROTECTED]
 Subject: securing directory

 I would like to know if anybody can tell me how to restrict
 web access to my web app's base directory and its sub directories.

Read the servlet spec.  Anything under WEB-INF is automatically
invisible to everything but the webapp.

To access resources, don't open them via the file system, use the
mechanism described here:
http://wiki.apache.org/tomcat/HowTo#head-45c3314139cb900ddd43dde2ff67153
2e6e844bc

- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
 From: Robert Bowen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Programmatically stop/start context (webapp)
 
 The difficulty I am having is getting a clear and concise 
 guide to using JMX/MX4J in Tomcat 6. There are a bunch of 
 different guides out there that explain how to do this in 
 Tomcat 5, 5.5, 6, and they all contradict themselves!

There's only one (per level) that counts:
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

 Anyway, I think this is possible, does it seem like a good idea?

Certainly cleaner and more flexible than doing it via loopbacked HTTP
requests.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: securing directory

2007-06-25 Thread Caldarale, Charles R
 From: tomcat user [mailto:[EMAIL PROTECTED] 
 Subject: Re: securing directory
 
 assuming that a file does need to reside directly under
 the webapp folder

Why would you assume that?

 can I secure the webapp directory?

Not readily, since static content comes from there.  You could write a
filter to return an error for a request for a prohibited file.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl

Other post answers first part

Second part of you interesting question...

What you could try do is intercept the System.out streams... and pass them 
on.
It wont be your fancy log4 formating, but you should be able to see the same 
stuff, that one see's in Netbeans I think thats all it does, to capture 
information.

something like.
System.setOut(new YourCustomPrintBuffer(System.out,this));

Remember you have to pass it back to the base (super) class, or else it wont 
end up in normal logs.


Alternatively... maybe instead of this heavy stuff, you can get the info you 
need from a Listener... dont know, maybe a guru can elaborate on how these 
Tomcat monitoring apps actually work.


Good luck.


- Original Message - 
From: syg6 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 12:40 PM
Subject: Programmatically stop/start context (webapp)




Hello,

I would like to be able to start and stop my 'cache' webapp from my own
'cache-admin' webapp. These two apps usually run on the same Tomcat
instance, but not always.

I am not sure if I should use ManagerServlet or HTMLManagerServlet, or
Embedded tomcat. I have found some examples on this newsgroup and 
onjava.com

but was unable to get them to work. Any ideas?

I would also like to somehow (Ajax perhaps) grab the contents of the log
file and display it, updating every 2-3 seconds, in my 'cache-admin' 
webapp

when the 'cache' webapp is started/stopped. I am using log4j for logging.

Many thanks for any help!
Bob
--
View this message in context: 
http://www.nabble.com/Programmatically-stop-start-context-%28webapp%29-tf3975317.html#a11284321

Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: securing directory

2007-06-25 Thread tomcat user

Why would you assume that?

because.


Not readily, since static content comes from there.  You could write a
filter to return an error for a request for a prohibited file.


Thank you for your help Chuck, I just thought there had to be an easier
way.  I would think it pretty basic to want to be able to allow certain
directories to be viewed or not within a web server, but I guess not.
Thanks again.

Frank




On 6/25/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 From: tomcat user [mailto:[EMAIL PROTECTED]
 Subject: Re: securing directory

 assuming that a file does need to reside directly under
 the webapp folder

Why would you assume that?

 can I secure the webapp directory?

Not readily, since static content comes from there.  You could write a
filter to return an error for a request for a prohibited file.

- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Run multiple instances of tomcat on windows

2007-06-25 Thread Cartman

You must create the directory structure... and set the environment vars.

CATALINA_HOME/
CATALINA_HOME/bin
CATALINA_HOME/common .
.
.
.

CATALINA_BASE/
CATALINA_BASE/instance1
CATALINA_BASE/instance1/conf
CATALINA_BASE/instance1/webapps
.
.
.

CATALINA_BASE/
CATALINA_BASE/instance2
CATALINA_BASE/instance2/conf
CATALINA_BASE/instance2/webapps
.
.
.




On 6/25/07, David kerber [EMAIL PROTECTED] wrote:



Ashish Kulkarni wrote:
 Hi
 The problem i am having is, when i installed second instance of tomcat
it
 replaced the windows service for the first tomcat, so i have only one
 tomcat
Use service.bat from the .zip package to create another service.  The
easiest way to handle this is to do the windows installation, and then
unzip the .zip distribution on top of the windows installation.  That
way you have the first service to use as a model when you create the
second service.

 service in windows,
 can i install one more service in tomcat now for the first installed
 tomcat,
 if so how



 Ashish

 On 6/24/07, Cartman [EMAIL PROTECTED] wrote:

 On 6/23/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
 
  Hi
  I want to run 2 instance of tomcat on windows server, both of them
are
  5.5.20,
  1. Is it possible to have them as 2 services so i can stop and start
 them
  independently?



 yes, each instance run its own service.

 2. Do i have to install it twice?


 yes, you have

 3. Can i use java 1.4.2 for one and java 1.5.0 for other


 ok

 4. I can setup one tomcat as startup job in windows, but then how do i
 make
  sure that all the log files go to stdout.log and stderr.log instead
of
 on
  the dos window.


 you can configure when tomcat write the log, but by default it is the
 same.

 Is there any step by step document of doing this


 I don't think, there are some information but is not explicit.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Gracias.
Atentamente,
Carlos Arturo Trujillo Silva
Ingeniero de Sistemas


Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Robert Bowen
Yes, these are the ones I am following. Specifically the Tomcat 6 how-to. The 
parts I don't understand are:

1. What the 'tomcat compat package' is. I downloaded MX4J but only copied the 
mx4j-tools.jar to /tomcat/lib. But in step 1 it says Install the tomcat compat 
package. I am hoping not to have to install anything, as I don't want to use 
MC4J, I just want to use MX4J's Java classes, correct? In other words, I want 
to connect to the MBean server myself, programmatically, so I shouldn't have to 
install the MC4J app ...

2. This little tidbit is a keeper - With ${AJP.PORT}=0 no ajp connection where 
started. I have no idea what this means. I know that I already have an AJP 1.3 
connector set up at port 8009. Anyway, I tried cut-and-pasting the Connector 
... section and now my Tomcat doesn't start, no errors. I tried using port 0 
... maybe that's the problem.

3. It says to add all the parameters to the CATALINA_OPTS. In other places it 
says to add them to JAVA_OPTS. I guess CATALINA_OPTS is correct.

At any rate, when I get all this worked out the idea is to connect to the 
Tomcat MBean server, query and change its Server / Service / Engine / Host / 
Context  MBean. The first step is getting Tomcat to start with these options 
set though!!

I'll keep you all posted, thanks for the tips.

Bob

- Original Message 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, June 25, 2007 5:26:06 PM
Subject: RE: Programmatically stop/start context (webapp)

 From: Robert Bowen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Programmatically stop/start context (webapp)
 
 The difficulty I am having is getting a clear and concise 
 guide to using JMX/MX4J in Tomcat 6. There are a bunch of 
 different guides out there that explain how to do this in 
 Tomcat 5, 5.5, 6, and they all contradict themselves!

There's only one (per level) that counts:
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

 Anyway, I think this is possible, does it seem like a good idea?

Certainly cleaner and more flexible than doing it via loopbacked HTTP
requests.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl
YES, damn good idea... I'm looking at it from an embedded tomcat 
perspective, but yes sounds good, why not use an exposed interface I'd 
love to see the code that gets at those mbeans, never done it before if 
you find an example post it.


- Original Message - 
From: Robert Bowen [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, June 25, 2007 5:20 PM
Subject: Re: Programmatically stop/start context (webapp)


Hmmm ... This seems kind of kludgy to me. Would it not be better (easier, 
more elegant) to use Tomcat's monitoring with JMX to do this? I don't have 
all the details worked out but I believe that with an MBean I can (at 
least) monitor the container and the apps running in it and (hopefully) 
start and stop them as well.


The difficulty I am having is getting a clear and concise guide to using 
JMX/MX4J in Tomcat 6. There are a bunch of different guides out there that 
explain how to do this in Tomcat 5, 5.5, 6, and they all contradict 
themselves!


Anyway, I think this is possible, does it seem like a good idea?

Thanks!
Bob

- Original Message 
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, June 25, 2007 5:07:47 PM
Subject: Re: Programmatically stop/start context (webapp)

Syg, interesting question

I think, that what would make it tricky, is the actually packaging of the
solution.

In theory if you do this (I'm writing this blind, excuse the code)
import org.apache.catalina.ant.*;

StartTask startTask = new StartTask();
startTask.setUsername(admin);
startTask.setPassword();
startTask.setUrl(http://localhost:8080/manager;;);
startTask.setPath(/ContextOfWebApp);
startTask.execute();

This is actually turned into a URLrequest and sent to the manager... 
so

in theory
if you want to you can just simulate the GET with the required params and
http hdrs.

and a similar thing for stopping it.

Ok, but heres the tricky bit and if you can figure out how to do it in 
your

dev environment, no problem.

The required jars are in the server main package so they will be 
missing

from your servlet.
To develop you can just drop them in BUT then somehow when you 
actually

package it, you have to take them out.

So... you will probably have to use late binding ie Class.forname or
something, so you can get it working in dev environment and omit the jars 
in

deployment.
OR if you on an App server, just do it in a remote bean.

Anyway, I think its dead easy except for the working around the container
class loader issue.

Try it in a seperate app, think it will be easy but when you bring it
into another web-app, the fun will start.

Have fun

- Original Message - 
From: syg6 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 12:40 PM
Subject: Programmatically stop/start context (webapp)




Hello,

I would like to be able to start and stop my 'cache' webapp from my own
'cache-admin' webapp. These two apps usually run on the same Tomcat
instance, but not always.

I am not sure if I should use ManagerServlet or HTMLManagerServlet, or
Embedded tomcat. I have found some examples on this newsgroup and
onjava.com
but was unable to get them to work. Any ideas?

I would also like to somehow (Ajax perhaps) grab the contents of the log
file and display it, updating every 2-3 seconds, in my 'cache-admin'
webapp
when the 'cache' webapp is started/stopped. I am using log4j for logging.

Many thanks for any help!
Bob
--
View this message in context:
http://www.nabble.com/Programmatically-stop-start-context-%28webapp%29-tf3975317.html#a11284321
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]










Be a better Heartthrob. Get better relationship answers from someone who 
knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=listsid=396545433 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
 From: Johnny Kewl [mailto:[EMAIL PROTECTED] 
 Subject: Re: Programmatically stop/start context (webapp)
 
 I'd love to see the code that gets at those mbeans

Look at the code in the Tomcat admin (5.5 only) and manager webapps.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
 From: Robert Bowen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Programmatically stop/start context (webapp)
 
 What the 'tomcat compat package' is.

The compatibility package was for running Tomcat 5.5 on JRE 1.4; there
is no corresponding package for TC 6, since it requires JRE 1.5.  You
don't need MX4J on current JREs.

You might want to look at Lambda Probe (www.lambdaprobe.org) for playing
with the JMX stuff in Tomcat 6, since it already accesses many of the
MBeans.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: In-Process Tomcat

2007-06-25 Thread lightbulb432


 You mention that when you use a static content server, it's generally
 something other that HTTPD. Is there a particular reason for that? What
 static servers have you generally seen in use apart from HTTPD - are
 there
 things that just work better in the setup you described than others?
 
 http://lighttpd.net/

Without using hardware load balancers, how could you implement the
architecture whereby (as you described) lighttpd serves static content,
Tomcat serves dynamic content, but with the two sets of servers (lighttpd
and Tomcat) in parallel rather than lighttpd fronting Tomcat?

Would you be required to, in your JSPs, include all links to static content
using http://staticserver.site.com/...? 

What are all the available options to implement this setup? Thanks.
-- 
View this message in context: 
http://www.nabble.com/In-Process-Tomcat-tf3972772.html#a11290376
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple instances vs multiple hosts

2007-06-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

lb,

lightbulb432 wrote:
 In production, for organizations that run multiple web applications, would
 they run it on different instances of Tomcat (1 instance per web application
 or group of related web applications), or all web applications as different
 hosts on one instance of Tomcat? (Not taking into account clustering, where
 everything in whatever setup is chosen would be duplicated.)

The is completely dictated by the deployment team and includes multiple
factors. We prefer the one-Tomcat-instance-per-webapp because we want to
insulate them from each other. If one application leaks memory (for
instance), then only one JVM will be disabled when that happens.

Our current needs are limited, so we can run all our applications on a
single physical machine. Moving to multiple machines would be trivial
since the applications are already deployed separately.

To deploy in this way, with everything running over port 80 (and 443),
we need to front these Tomcat instances with a routing web server (we
chose Apache httpd).

 What are the tradeoffs in terms of performance, resource usage,
 maintainability, etc, and what are your comments based on past experience?
 What's common in production and what isn't as much?

Memory usage is certainly the most significant resource waste when
considering the above strategy. All of our applications fit comfortably
in a quarter gigabyte or so, so running multiple JVMs on the same
hardware isn't a big deal for us.

I would venture a guess that in terms of CPU performance, the difference
is negligible, depending on how your operating system treats threads
versus processes. We are deployed on Linux 2.6 which treats them about
the same, so I would expect the performance impact to be minimal.

I find this setup to be very maintainable, since sometimes Tomcat
versions and built-in libraries interfere with each other. In the
described setup, each application has its own Tomcat environment that
can be separately tested, upgraded, etc. If you need a new XML parser
but Tomcat's built-in version is interfering (used to happen... might
not after the 4.1 versions), no problem: replace the built-in XML
parser, test, deploy. No need to interfere with other applications.

In other production environments, I have typically seen large
applications clustered. One machine runs one application, and that
machine is duplicated for other members in the cluster.

Depending on your hardware, more applications per physical server might
make more sense. These days, you can get some pretty beefy commodity
64-bit hardware that can handle a lot of traffic. You will quickly find
out that SSL traffic is the most expensive thing to manage, not your
application ;)

- -chris

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

iD8DBQFGf+xs9CaO5/Lv0PARAtOwAJ0RuDEYg6VCMUlFmbLdXPXkYjUTDgCgnFlI
oiDNrR4/TcFvcyeVP86XNXE=
=aXPJ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat performance dilemma

2007-06-25 Thread Gabriela Gheorghe

Hi everybody,

I am facing a stress-testing problem using Tomcat 5.5 and Axis 1.4, and I
really need some ideas about what is happening behind the scenes.

This is the configuration: a few web services hosted on Axis 1.4 are
deployed on Tomcat. Everything runs on 2 Linux Pentium 4 machines (with
hyperthreading), one as client using Jmeter, the other one as server.

The problem is that I cannot run as many / time-consuming requests so that
the processor on the server reaches 100% CPU load. It only reaches 90%, so
the measurements for throughput that I  need to obtain by this testing,
cannot be too relevant; I want 100% of the CPU working.

So my question would be  - why is 10% of the CPU idle ? I should mention
that I already did a few performance tweaks, for the JVM memory, and
decreased the connection timeout for Tomcat to a few dozen milliseconds.
Still, it doesn;t reach 100% load, although I varied request message length,
and thread numbers.

If you have any ideas, please help.

Gabriela

--
Kind regards / Freundliche Gruesse,
Gabriela Gheorghe

Email: [EMAIL PROTECTED] / [EMAIL PROTECTED]


Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl

Even better, thanks Chuck

Look at the code in the Tomcat admin (5.5 only) and manager webapps.

- Chuck




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: In-Process Tomcat

2007-06-25 Thread Leon Rosenberg

On 6/25/07, lightbulb432 [EMAIL PROTECTED] wrote:



 You mention that when you use a static content server, it's generally
 something other that HTTPD. Is there a particular reason for that? What
 static servers have you generally seen in use apart from HTTPD - are
 there
 things that just work better in the setup you described than others?

 http://lighttpd.net/

Without using hardware load balancers, how could you implement the
architecture whereby (as you described) lighttpd serves static content,
Tomcat serves dynamic content, but with the two sets of servers (lighttpd
and Tomcat) in parallel rather than lighttpd fronting Tomcat?

Would you be required to, in your JSPs, include all links to static content
using http://staticserver.site.com/...?


That would be one very good option. I think ebay uses it and many
others. Another option would be for example puting a squid infront of
the tomcat and let it cache the static tomcat served by tomcat (and
any other cacheable content). Its almost the same as apache httpd
infront, but squid is faster in a number of things. However, I think
there are a lot of possible solutons, without knowing your usecase its
hard to pick one :-)

regards
Leon





What are all the available options to implement this setup? Thanks.
--
View this message in context: 
http://www.nabble.com/In-Process-Tomcat-tf3972772.html#a11290376
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 6 - invoker servlet?

2007-06-25 Thread Leonardo Augusto
hi,

I realized that, on tomcat 6.0.13, the invoker servlet /servlet/
doesn't work. To make it work I had to add in the file
/tomcat60/conf/context.xml the parameter privileged=true

The contents of this file will be loaded for each web application
Context reloadable=false privileged=true

Is there any security issue in tomcat 6.0.13? Can I use
privileged=true without having security break?
 
thx
 
Leonardo


Use JMX to manage applications

2007-06-25 Thread lightbulb432

How, from a web application deployed to Tomcat, can you customize the
behavior of your web application based on attributes specified in an MBean?
The link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html talks a lot
about Ant tasks, but that's not really what I'm looking to do.

How can you get programmatic access to MBeans? And how do you deploy MBeans
to Tomcat?

I'm pretty confused here...hopefully someone can clarify. Thanks.
-- 
View this message in context: 
http://www.nabble.com/Use-JMX-to-manage-applications-tf3978363.html#a11293522
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is HttpSession id a GUID

2007-06-25 Thread Ingo Düppe

Hello,

is the http session id a global unique id within a tomcat 6.0.13 cluster?
I like to use it as a unique field within the db for user tracking, so 
it should be unique within the cluster and time.


Regards
Ingo

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can't override Context className from context.xml located in webapp/META-INF dir

2007-06-25 Thread randy_hoffman

Hi,

I am running Tomcat 6.0.13 and when i specify the className attribute
in a Context element inside a context.xml file inside the META-INF
directory of my webapp, it is ignored.

If i move the context.xml file to conf/[Engine]/[Host]/webapp.xml it works.

Any ideas?  Is this a feature, a bug?  I can't  find any documentation
that specifies limitations on the attributes of a Context element
depending on where it is located.



Appreciate any thoughts.

Thanks!

--
Get a free email account with anti spam protection.
http://www.bluebottle.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is HttpSession id a GUID

2007-06-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ingo,

Ingo Düppe wrote:
 is the http session id a global unique id within a tomcat 6.0.13 cluster?

I think a better question is whether the servlet specification
guarantees a globally unique session id: it doesn't.

The reason I recommend focusing on the servlet specification is that the
servlet spec is the only place where you can find rules that all app
servers must honor. Tomcat (regardless of version) will be required to
follow those rules. Anything not covered by the servlet specification is
left up to the implementors of the app server.

If Tomcat decides to change its implementation and you are not careful,
you might go from a true GUID to something that won't satisfy your
needs. (Note that I'm pretty sure that Tomcat doesn't guarantee global
uniqueness of session ids, though it would be foolish for them not to be
unique throughout the cluster).

 I like to use it as a unique field within the db for user tracking, so
 it should be unique within the cluster and time.

I would recommend using a GUID-generation library that you know will
always work for you. When a session is created, drop a new GUID into the
session and use /that/ for your database key.

- -chris

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

iD8DBQFGgCH19CaO5/Lv0PARAirGAJwLc3XCzkNzwGHhU/ehJQslyAAEeQCggHu2
/HZT326Lifd1adgRUTl+Vps=
=umFQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Windows Native lib

2007-06-25 Thread Clive Webster
Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless since I
don't have an MS C++ compiler and don't want to buy one as I live in a Java
world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and 'openssl.exe'
but having put these onto my PATH then I no longer get the warning re not
using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address incompatible
with the requested protocol was used.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578
)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in Japanese) -
no help there.

Does anyone know how to make this work? (Sorry - not meant to sound rude,
but am starting to get a bit frustrated having gone round in circles for a
day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to no
end. Small point - but since the 'native lib' is much hyped in the docs then
why is it so bloomin hard to find a download for it that is deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Nathan Hook
To get rid of this error message and speed up Tomcat just a small amount you 
need to install the tcnative-1.dll


You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your 
$TOMCAT_HOME/bin directory.




Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless since I
don't have an MS C++ compiler and don't want to buy one as I live in a Java
world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and 'openssl.exe'
but having put these onto my PATH then I no longer get the warning re not
using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address incompatible
with the requested protocol was used.
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)

at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578
)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in Japanese) -
no help there.

Does anyone know how to make this work? (Sorry - not meant to sound rude,
but am starting to get a bit frustrated having gone round in circles for a
day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to no
end. Small point - but since the 'native lib' is much hyped in the docs then
why is it so bloomin hard to find a download for it that is deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Make every IM count. Download Messenger and join the i’m Initiative now. 
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_June07



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Clive Webster
Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount you
need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless since I
don't have an MS C++ compiler and don't want to buy one as I live in a Java
world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and 'openssl.exe'
but having put these onto my PATH then I no longer get the warning re not
using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address incompatible
with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in Japanese) -
no help there.

Does anyone know how to make this work? (Sorry - not meant to sound rude,
but am starting to get a bit frustrated having gone round in circles for a
day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to no
end. Small point - but since the 'native lib' is much hyped in the docs then
why is it so bloomin hard to find a download for it that is deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Make every IM count. Download Messenger and join the i’m Initiative now.
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_June07


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 - invoker servlet?

2007-06-25 Thread Caldarale, Charles R
 From: Leonardo Augusto [mailto:[EMAIL PROTECTED] 
 Subject: tomcat 6 - invoker servlet?
 
 I realized that, on tomcat 6.0.13, the invoker servlet /servlet/
 doesn't work.

That sounds like a good thing.  It's unfortunate that it exists at all.
http://tomcat.apache.org/faq/misc.html#invoker

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
From my own experience documented in my postings to this group under the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount
you need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless
since I don't have an MS C++ compiler and don't want to buy one as I
live in a Java world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and
'openssl.exe'
but having put these onto my PATH then I no longer get the warning re
not using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address
incompatible with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:1
16)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in
Japanese) - no help there.

Does anyone know how to make this work? (Sorry - not meant to sound
rude, but am starting to get a bit frustrated having gone round in
circles for a day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to
no end. Small point - but since the 'native lib' is much hyped in the
docs then why is it so bloomin hard to find a download for it that is
deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Make every IM count. Download Messenger and join the i'm Initiative now.
It's free. http://im.live.com/messenger/im/home/?source=TAGHM_June07


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Nathan Hook
Of course I didn't read your entire email to see that you had already found 
the tcnative-1.dll file.


That clearly would have taken too much time and would have kept me from 
putting my foot in my mouth.  :)


So, to try and help AFTER reading your entire email...

I did a google search for:

Socket bind failed tomcat

and came up with the following link that seems to be similar to what you're 
experiencing:


http://www.junlu.com/msg/224561.html

Basically, do you have two instances of tomcat running?

Then some other questions and actions to think about...
What happens when you remove the tcnative-1.dll?
Does tomcat start right back up without errors?  (Be sides the native 
library not being present.)

Was tomcat installed as a service?



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: 'Tomcat Users List' users@tomcat.apache.org
Subject: RE: Windows Native lib
Date: Mon, 25 Jun 2007 22:04:26 +0100

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount you
need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless since I
don't have an MS C++ compiler and don't want to buy one as I live in a Java
world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and 'openssl.exe'
but having put these onto my PATH then I no longer get the warning re not
using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address incompatible
with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in Japanese) -
no help there.

Does anyone know how to make this work? (Sorry - not meant to sound rude,
but am starting to get a bit frustrated having gone round in circles for a
day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to no
end. Small point - but since the 'native lib' is much hyped in the docs then
why is it so bloomin hard to find a download for it that is deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Make every IM count. Download Messenger and join the i’m Initiative now.
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_June07


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a 

Re: Is HttpSession id a GUID

2007-06-25 Thread Ingo Düppe

Hi Chris,
you are totally right, I didn't saw the solution.
Thx

Ingo


Christopher Schultz schrieb:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ingo,

Ingo Düppe wrote:
  

is the http session id a global unique id within a tomcat 6.0.13 cluster?



I think a better question is whether the servlet specification
guarantees a globally unique session id: it doesn't.

The reason I recommend focusing on the servlet specification is that the
servlet spec is the only place where you can find rules that all app
servers must honor. Tomcat (regardless of version) will be required to
follow those rules. Anything not covered by the servlet specification is
left up to the implementors of the app server.

If Tomcat decides to change its implementation and you are not careful,
you might go from a true GUID to something that won't satisfy your
needs. (Note that I'm pretty sure that Tomcat doesn't guarantee global
uniqueness of session ids, though it would be foolish for them not to be
unique throughout the cluster).

  

I like to use it as a unique field within the db for user tracking, so
it should be unique within the cluster and time.



I would recommend using a GUID-generation library that you know will
always work for you. When a session is created, drop a new GUID into the
session and use /that/ for your database key.

- -chris

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

iD8DBQFGgCH19CaO5/Lv0PARAirGAJwLc3XCzkNzwGHhU/ehJQslyAAEeQCggHu2
/HZT326Lifd1adgRUTl+Vps=
=umFQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Clive Webster
Nathan,

Here's a size 8 foot... ;-)

Yep: already seen that link which reports a [730048] error, which is close
to my [730047] error - but not quite!

Only have a single instance running (not as a service for now - but via
'startup.bat') and if I remove the dll from ${CATALINA_HOME}/bin (which is
on my PATH) and restart Tomcat then, apart from the native lib warning,
everything works fine using a WAR that has been running on Tomcat 5.0 for
two years-ish.

c

-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:27
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


Of course I didn't read your entire email to see that you had already found
the tcnative-1.dll file.

That clearly would have taken too much time and would have kept me from
putting my foot in my mouth.  :)

So, to try and help AFTER reading your entire email...

I did a google search for:

Socket bind failed tomcat

and came up with the following link that seems to be similar to what you're
experiencing:

http://www.junlu.com/msg/224561.html

Basically, do you have two instances of tomcat running?

Then some other questions and actions to think about...
What happens when you remove the tcnative-1.dll?
Does tomcat start right back up without errors?  (Be sides the native
library not being present.)
Was tomcat installed as a service?



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: 'Tomcat Users List' users@tomcat.apache.org
Subject: RE: Windows Native lib
Date: Mon, 25 Jun 2007 22:04:26 +0100

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount you
need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless since I
don't have an MS C++ compiler and don't want to buy one as I live in a Java
world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and 'openssl.exe'
but having put these onto my PATH then I no longer get the warning re not
using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address incompatible
with the requested protocol was used.
  at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
  at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
  at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
  at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578
)
  at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in Japanese) -
no help there.

Does anyone know how to make this work? (Sorry - not meant to sound rude,
but am starting to get a bit frustrated having gone round in circles for a
day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to no
end. Small point - but since the 'native lib' is much hyped in the docs then
why is it so bloomin hard to find a download for it that is deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: 

Re: Windows Native lib

2007-06-25 Thread Steve Ochani
On 25 Jun 2007 at 21:55, Clive Webster wrote:


 Have spent the last 8 hours trying to work out how to use the 'native'
 library for Tomcat 5.5.23 - without any success.
 

I hope you realize that you don't *have* to use it.



 Have managed to download lots of C++ source code - which is useless
 since I don't have an MS C++ compiler and don't want to buy one as I
 live in a Java world not a C++ world !!!
 
 Further digging revealed binaries for 'tcnative-1.dll'  and
 'openssl.exe' but having put these onto my PATH then I no longer get
 the warning re not using the native stuff but instead I get:-
 
 SEVERE: Error initializing endpoint
 java.lang.Exception: Socket bind failed: [730047] An address
 incompatible with the requested protocol was used.
 at
 org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:5
 76) at
 org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java
 :116)
 at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1017
 )
 at
 org.apache.catalina.core.StandardService.initialize(StandardService.ja
 va:578 )
 at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java
 :782)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
 ava:39 )
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
 orImpl .java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
 
 Have Googled error code 730047 and got 3 answers (including 2 in
 Japanese) - no help there.
 
 Does anyone know how to make this work? (Sorry - not meant to sound
 rude, but am starting to get a bit frustrated having gone round in
 circles for a day!).
 
 Apologies if the answer is 'obvious' but have searched FAQs etc etc 
 to no end. Small point - but since the 'native lib' is much hyped in
 the docs then why is it so bloomin hard to find a download for it that
 is deployable !! Got Tomcat itself working in a few minutes.
 
 All help greatfully received.
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED] For additional commands,
 e-mail: [EMAIL PROTECTED]
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Clive Webster
Due to the ascii sorted list on a volume then the last entry in
http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this is
the version I actually have tried, not 1.1.10.
OK - so you will now say 'try version 1.1.10' - which I've done and it gives
exactly the same exception.

Aaargh.

-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:23
To: Tomcat Users List
Subject: RE: Windows Native lib


From my own experience documented in my postings to this group under the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount
you need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless
since I don't have an MS C++ compiler and don't want to buy one as I
live in a Java world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and
'openssl.exe'
but having put these onto my PATH then I no longer get the warning re
not using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address
incompatible with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:1
16)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in
Japanese) - no help there.

Does anyone know how to make this work? (Sorry - not meant to sound
rude, but am starting to get a bit frustrated having gone round in
circles for a day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to
no end. Small point - but since the 'native lib' is much hyped in the
docs then why is it so bloomin hard to find a download for it that is
deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Make every IM count. Download Messenger and join the i'm Initiative now.
It's free. http://im.live.com/messenger/im/home/?source=TAGHM_June07


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: securing directory

2007-06-25 Thread Rainer Jung

If you really really want to it:

Read about exclusion rules in

http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

but think twice, if this is robust, i.e. if the web server admin will 
have a chance to keep this up-to-date.


Regards,

Rainer


tomcat user wrote:

Why would you assume that?

because.


Not readily, since static content comes from there.  You could write a
filter to return an error for a request for a prohibited file.


Thank you for your help Chuck, I just thought there had to be an easier
way.  I would think it pretty basic to want to be able to allow certain
directories to be viewed or not within a web server, but I guess not.
Thanks again.

Frank




On 6/25/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 From: tomcat user [mailto:[EMAIL PROTECTED]
 Subject: Re: securing directory

 assuming that a file does need to reside directly under
 the webapp folder

Why would you assume that?

 can I secure the webapp directory?

Not readily, since static content comes from there.  You could write a
filter to return an error for a request for a prohibited file.

- Chuck



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dynamic form-login-page?

2007-06-25 Thread Jon Wilmoth
I'm having problems using FORM authentication and a dynamic login page via 
Struts 2. I've tried the following web.xml/struts.xml entries with S2.0.8  
Tomcat 5.5.23, but get a 404 The requested resource (/mywebapp/login.action) 
is not available message. 

login-config 
auth-methodFORM/auth-method 
form-login-config 
form-login-page/login.action/form-login-page 
form-error-page/loginFailure.action/form-error-page 
/form-login-config 
/login-config 

action name=login 
result/login.jsp/result 
/action 

The login action loads the login.jsp just fine when called directly, but 
doesn't work when invoked by the servlet container. Instead I see the following 
in the Tomcat log: 

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] 
(org.apache.catalina.authenticator.FormAuthenticator) - Save request in session 
'930B154E1AD9BFB1283165CD888441EF' 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, 
pathInfo=null, queryString=null, name=null 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - Path Based Forward 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - Disabling the response for 
futher output 

I've asked on the Struts2 list if this should be possible to do and the 
response I got was it definitely should work. I'm wondering if there's a 
special Tomcat configuration (beyond my webapp's web.xml struts2 filter 
mapping) I need to add to enable a .action extension being used for 
form-authentication.

Thanks,
Jon

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Clive Webster
Steve,

I appreciate it 'works without it' - but not a good sales line ie we aren't
sure what it does, probably some technical stuff, but we can't figure it
out.

A Ferrari works quite well as a pedal car without an engine!

Ouch!!

But then if everyone who has made it work says 'it makes no difference' to a
live site then I'll eat my hat (in the absence of a Ferrari!).

C

-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:39
To: Tomcat Users List
Subject: Re: Windows Native lib


On 25 Jun 2007 at 21:55, Clive Webster wrote:


 Have spent the last 8 hours trying to work out how to use the 'native'
 library for Tomcat 5.5.23 - without any success.


I hope you realize that you don't *have* to use it.



 Have managed to download lots of C++ source code - which is useless
 since I don't have an MS C++ compiler and don't want to buy one as I
 live in a Java world not a C++ world !!!

 Further digging revealed binaries for 'tcnative-1.dll'  and
 'openssl.exe' but having put these onto my PATH then I no longer get
 the warning re not using the native stuff but instead I get:-

 SEVERE: Error initializing endpoint
 java.lang.Exception: Socket bind failed: [730047] An address
 incompatible with the requested protocol was used.
 at
 org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:5
 76) at
 org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java
 :116)
 at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1017
 )
 at
 org.apache.catalina.core.StandardService.initialize(StandardService.ja
 va:578 )
 at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java
 :782)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
 ava:39 )
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
 orImpl .java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

 Have Googled error code 730047 and got 3 answers (including 2 in
 Japanese) - no help there.

 Does anyone know how to make this work? (Sorry - not meant to sound
 rude, but am starting to get a bit frustrated having gone round in
 circles for a day!).

 Apologies if the answer is 'obvious' but have searched FAQs etc etc
 to no end. Small point - but since the 'native lib' is much hyped in
 the docs then why is it so bloomin hard to find a download for it that
 is deployable !! Got Tomcat itself working in a few minutes.

 All help greatfully received.



 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED] For additional commands,
 e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
No, don't try 1.1.0. I had problems with it on all platforms. I compiled
the source on Solaris and
Linux.  
If 1.1.9 does not work, check your server.xml configuration file for
your connector. 
Use address =0.0.0.0 atribute if you care for Ipv4 only. Please refer
to my posting
to this group on 05/22 under the heading Tomcat 5.5, APR, IPv6,
HTTP,HTTPS

Upto 1.1.8, whether the tcnative.dll is ipv4 version or ipv6 is
mentioned as part of the name.
If you want both to work you have to download the ipv6 version and
specify two connector elements
with appropriate address attributes.


Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 2:41 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Due to the ascii sorted list on a volume then the last entry in
http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this
is the version I actually have tried, not 1.1.10.
OK - so you will now say 'try version 1.1.10' - which I've done and it
gives exactly the same exception.

Aaargh.

-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:23
To: Tomcat Users List
Subject: RE: Windows Native lib


From my own experience documented in my postings to this group under 
the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount
you need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless
since I don't have an MS C++ compiler and don't want to buy one as I
live in a Java world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and
'openssl.exe'
but having put these onto my PATH then I no longer get the warning re
not using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address
incompatible with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:1
16)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Have Googled error code 730047 and got 3 answers (including 2 in
Japanese) - no help there.

Does anyone know how to make this work? (Sorry - not meant to sound
rude, but am starting to get a bit frustrated having gone round in
circles for a day!).

Apologies if the answer is 'obvious' but have searched FAQs etc etc  to
no end. Small point - but since the 'native lib' is much hyped in the
docs then why is it so bloomin hard to find a download for it that is
deployable !!
Got Tomcat itself working in a few minutes.

All help greatfully received.



-
To start a new topic, e-mail: 

no-cache Headers In Authenticated Zones

2007-06-25 Thread Adrian Sutton

Hi all,
It seems that Tomcat automatically adds Pragma: no-cache and a pre- 
dated Expires header whenever the user requests a page that requires  
container-based authentication. This has come up on the mailing list  
in the past:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200504.mbox/% 
[EMAIL PROTECTED]


the solution given however is for a form-based login and we're using  
basic authentication and I've been unable to adapt the solution to  
work for us.  I'd like to stop Tomcat from adding any caching  
directives and handle it manually in my webapp. I can setup a filter  
to modify the response headers, but I can't find a way to remove  
those headers - only to modify their values which doesn't seem to be  
enough to get browsers to cache the content.


We're running Tomcat 5.5. Any help would be greatly appreciated.

Regards,

Adrian Sutton
http://www.symphonious.net




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to add -Djava.library.path to tomcat

2007-06-25 Thread Yifan (Eric) Jiang
Hi,

 

I would like to load a library (.dll in windows and .so in linux) in a
Java application, so I have to add the path of the library to
LD_LIBRARY_PATH (Linux) or PATH (Windows). In addition, I also need to
add -Djava.library.path=. However this is only for a standalone java
application. But I'd like to deploy these applications as Axis web
services, so how can I do the similar thing in Tomcat? i.e. how can I
add -Djava.library.path in tomcat (in both Windows and Linux).

 

Thanks

 

Eric



RE: Windows Native lib

2007-06-25 Thread Clive Webster
Lakshmi,

Thanks for the reply. 

If what you say is true then this 'feature' of Tomcat is obviously beyond
the understanding of us 'mere mortals'. I have an application to maintain
without having to get to grips with the detailed ins-and-outs of the guts of
each Web/App/EJB server, etc, that I'm runing on. What an 'ipv4' is, and how
it compares to an 'ipv6', is quite frankly too dull to explore.  I had just
assumed that there was a dll that replaced parts of the java Tomcat runtime
and hence ran faster. Either it was loaded and 'stuff' ran faster, or it
wasn't and 'stuff' went more slowly. Call me naive. Why have they released
version 1.1.10 if it 'just does not work'?

I don't think that I'm trying to do anything weird - I'm just trying to
deploy a WAR file. So if you, or anyone else, can advise the exact details
of how to make this 'plug-in' actually 'plug in' then great.

Sorry - this isn't a rant - and its not aimed at anyone.

But how do you install the native stuff on 5.5.23 for Windows - surely
someone has done it!
Some simple instructions from someone please!
C


-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 23:03
To: Tomcat Users List
Subject: RE: Windows Native lib


No, don't try 1.1.0. I had problems with it on all platforms. I compiled
the source on Solaris and
Linux.  
If 1.1.9 does not work, check your server.xml configuration file for
your connector. 
Use address =0.0.0.0 atribute if you care for Ipv4 only. Please refer
to my posting
to this group on 05/22 under the heading Tomcat 5.5, APR, IPv6,
HTTP,HTTPS

Upto 1.1.8, whether the tcnative.dll is ipv4 version or ipv6 is
mentioned as part of the name.
If you want both to work you have to download the ipv6 version and
specify two connector elements
with appropriate address attributes.


Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 2:41 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Due to the ascii sorted list on a volume then the last entry in
http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this
is the version I actually have tried, not 1.1.10.
OK - so you will now say 'try version 1.1.10' - which I've done and it
gives exactly the same exception.

Aaargh.

-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:23
To: Tomcat Users List
Subject: RE: Windows Native lib


From my own experience documented in my postings to this group under 
the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount
you need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless
since I don't have an MS C++ compiler and don't want to buy one as I
live in a Java world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and
'openssl.exe'
but having put these onto my PATH then I no longer get the warning re
not using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address
incompatible with the requested protocol was used.
 at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
 at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:1
16)
 at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:578
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82)
 at 

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Ok, say have downloaded version 1.1.7/tcnative-1-ipv4.dll and renamed it as
tcnative-1.dll without changing anything else. 
Now everything seems to work ok - ie no more exceptions.
So what is the difference between ipv4 and ipv6 and why dont later versions
mention them. They just DONT work so why have they been released?
c

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: 26 June 2007 01:29
To: 'Tomcat Users List'
Subject: RE: Windows Native lib


Lakshmi,

Thanks for the reply. 

If what you say is true then this 'feature' of Tomcat is obviously beyond
the understanding of us 'mere mortals'. I have an application to maintain
without having to get to grips with the detailed ins-and-outs of the guts of
each Web/App/EJB server, etc, that I'm runing on. What an 'ipv4' is, and how
it compares to an 'ipv6', is quite frankly too dull to explore.  I had just
assumed that there was a dll that replaced parts of the java Tomcat runtime
and hence ran faster. Either it was loaded and 'stuff' ran faster, or it
wasn't and 'stuff' went more slowly. Call me naive. Why have they released
version 1.1.10 if it 'just does not work'?

I don't think that I'm trying to do anything weird - I'm just trying to
deploy a WAR file. So if you, or anyone else, can advise the exact details
of how to make this 'plug-in' actually 'plug in' then great.

Sorry - this isn't a rant - and its not aimed at anyone.

But how do you install the native stuff on 5.5.23 for Windows - surely
someone has done it!
Some simple instructions from someone please!
C


-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 23:03
To: Tomcat Users List
Subject: RE: Windows Native lib


No, don't try 1.1.0. I had problems with it on all platforms. I compiled
the source on Solaris and
Linux.  
If 1.1.9 does not work, check your server.xml configuration file for
your connector. 
Use address =0.0.0.0 atribute if you care for Ipv4 only. Please refer
to my posting
to this group on 05/22 under the heading Tomcat 5.5, APR, IPv6,
HTTP,HTTPS

Upto 1.1.8, whether the tcnative.dll is ipv4 version or ipv6 is
mentioned as part of the name.
If you want both to work you have to download the ipv6 version and
specify two connector elements
with appropriate address attributes.


Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 2:41 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Due to the ascii sorted list on a volume then the last entry in
http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this
is the version I actually have tried, not 1.1.10.
OK - so you will now say 'try version 1.1.10' - which I've done and it
gives exactly the same exception.

Aaargh.

-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:23
To: Tomcat Users List
Subject: RE: Windows Native lib


From my own experience documented in my postings to this group under 
the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-
From: Nathan Hook [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:02
To: users@tomcat.apache.org
Subject: RE: Windows Native lib


To get rid of this error message and speed up Tomcat just a small amount
you need to install the tcnative-1.dll

You can find this .dll file at:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

The link to the download area is:

http://tomcat.heanet.ie/native/

You will then want to get the latest version and place it in your
$TOMCAT_HOME/bin directory.



Original Message Follows
From: Clive Webster [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: Windows Native lib
Date: Mon, 25 Jun 2007 21:55:10 +0100

Have spent the last 8 hours trying to work out how to use the 'native'
library for Tomcat 5.5.23 - without any success.

Have managed to download lots of C++ source code - which is useless
since I don't have an MS C++ compiler and don't want to buy one as I
live in a Java world not a C++ world !!!

Further digging revealed binaries for 'tcnative-1.dll'  and
'openssl.exe'
but having put these onto my PATH then I no longer get the warning re
not using the native stuff but instead I get:-

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730047] An address
incompatible with the requested 

Re: Use JMX to manage applications

2007-06-25 Thread Johnny Kewl

Hi LightBulb,

If you asking this, because of Robert Bowen question Programmatically 
stop/start context from WebApp, I also wait with anticipation for the JMX 
solution.
I have a feeling that making a light weight JMX client that lives in a 
servlet, may not be that easy, we'll see what he comes up with.


Its very quiet, so I'll volunteer an explanation, and get shot down in 
flames ;) but it gets the conversation going , normal procedure ;)
You got this Servlet Management Interface to Tomcat and it calls into 
its OWN engine, and does stuff (like deploy start/stop) as well as provide 
other servlets like a JMX Proxy, that grab that JMX call, feeds in down to 
the MBean Server, and returns the XML to whatever made the call.


BUT, there is another important management interface, that is not really 
talked about much, and its very to use and very powerful, and thats what you 
seeing in that article. 
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html


If you start to think about how an IDE works its magic, and starts and 
stops, and deploys and undeploys you may at first think its talking to 
the manager servlets directly its not. In Tomcat there is another client 
Task engine, which acts as a client to the manager servlet.

Netbeans in fact uses that, through ant.
So in fact what is happening, is it calls into the CLIENT TASKS, they call 
the Manager Servlets (which can be located on any machine), and the job gets 
done.


So for example if Robert Bowen emulated the management servlet, in his own 
servlet, he will ONLY be able to control the tomcat his servlet is in, and 
will end up also having to make these CLIENT TASKS.


Now because I think its not that easy to make JMX clients, one of these 
CLIENT TASKS, is in fact a JMX client.
So you or and IDE via ant, calls the JMX CLIENT TASK, the client task 
then does the JMX stuff for you and calls the SERVLET MANAGER... it does its 
thing, returns the REMOTE tomcat answer to the LOCAL tomcat, and the ant 
script gives it back to you.


Now if you look at the little bit of code I gave Robert to start a 
server all I'm actually doing is bypassing ant, and calling the ant task 
directly, because who wants to use ant from a web-app, and note that I'm 
hitting the CLIENT TASKS, and that means it can control any server on any 
machine, not just my own.


The guys rekon its kludgy, and they right because calling into Tomcat has 
versioning issues, but I think its pretty safe, because if they changed that 
interface, IDE control of tomcat would break... Netbeans wouldnt work with 
Tomcat.
How did I get onto this just by looking at the ant script NB generates 
for tomcat.
This interface you looking at, I think is more geared towards IDE control, 
than pure JMX, else I think there would be more emphasis on the client side, 
there isnt, because its in tomcat already.


 hope that helps



- Original Message - 
From: lightbulb432 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 9:04 PM
Subject: Use JMX to manage applications




How, from a web application deployed to Tomcat, can you customize the
behavior of your web application based on attributes specified in an 
MBean?
The link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html talks a 
lot

about Ant tasks, but that's not really what I'm looking to do.

How can you get programmatic access to MBeans? And how do you deploy 
MBeans

to Tomcat?

I'm pretty confused here...hopefully someone can clarify. Thanks.
--
View this message in context: 
http://www.nabble.com/Use-JMX-to-manage-applications-tf3978363.html#a11293522

Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
Okay, I am glad that 1.1.7-ipv4 is working.  1.1.9 would have worked
with the address=0.0.0.0
attribute since it is the IPv6 version.  A README file in
http://tomcat.heanet.ie/native/ 
would have been helpful.

IPv4 is the 32 bit IP address of a device(computer, router etc.), for
example 192.1.1.1.
Since the world is running out of IPv4 addresses, IPv6 is the new
standard with 128 bit address space.
http://www.ipv6.org/
From your mail, it seems you are on IPv4, so you don't have to worry
about IPv6. 

Yes, the Tomcat folks could have done a little more on APR
documentation. 

I spent a few days unravelling everything on all 3 OS - Windows,
Solaris, Linux.
Everything had to work in my organization - HTTPS and HTTP transport
over both IPv4 and IPv6 on all the 3 OS. So I documented my experience
in the posting Tomcat 5.5, APR, IPv6, HTTP and HTTPS.

I was hoping either Mark Thomas or Mladen Turk would comment on my post,
update some document or delve into why 1.1.10 gives the errors that are
not present when any of the earlier versions were used.  But there was
no discussion on this thread and I have moved on with my working
combination.


Lakshmi


-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 5:45 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Ok, say have downloaded version 1.1.7/tcnative-1-ipv4.dll and renamed it
as tcnative-1.dll without changing anything else. 
Now everything seems to work ok - ie no more exceptions.
So what is the difference between ipv4 and ipv6 and why dont later
versions mention them. They just DONT work so why have they been
released?
c

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: 26 June 2007 01:29
To: 'Tomcat Users List'
Subject: RE: Windows Native lib


Lakshmi,

Thanks for the reply. 

If what you say is true then this 'feature' of Tomcat is obviously
beyond the understanding of us 'mere mortals'. I have an application to
maintain without having to get to grips with the detailed ins-and-outs
of the guts of each Web/App/EJB server, etc, that I'm runing on. What an
'ipv4' is, and how it compares to an 'ipv6', is quite frankly too dull
to explore.  I had just assumed that there was a dll that replaced parts
of the java Tomcat runtime and hence ran faster. Either it was loaded
and 'stuff' ran faster, or it wasn't and 'stuff' went more slowly. Call
me naive. Why have they released version 1.1.10 if it 'just does not
work'?

I don't think that I'm trying to do anything weird - I'm just trying to
deploy a WAR file. So if you, or anyone else, can advise the exact
details of how to make this 'plug-in' actually 'plug in' then great.

Sorry - this isn't a rant - and its not aimed at anyone.

But how do you install the native stuff on 5.5.23 for Windows - surely
someone has done it!
Some simple instructions from someone please!
C


-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 23:03
To: Tomcat Users List
Subject: RE: Windows Native lib


No, don't try 1.1.0. I had problems with it on all platforms. I compiled
the source on Solaris and Linux.  
If 1.1.9 does not work, check your server.xml configuration file for
your connector. 
Use address =0.0.0.0 atribute if you care for Ipv4 only. Please refer
to my posting to this group on 05/22 under the heading Tomcat 5.5, APR,
IPv6, HTTP,HTTPS

Upto 1.1.8, whether the tcnative.dll is ipv4 version or ipv6 is
mentioned as part of the name.
If you want both to work you have to download the ipv6 version and
specify two connector elements with appropriate address attributes.


Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 2:41 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Due to the ascii sorted list on a volume then the last entry in
http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this
is the version I actually have tried, not 1.1.10.
OK - so you will now say 'try version 1.1.10' - which I've done and it
gives exactly the same exception.

Aaargh.

-Original Message-
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 22:23
To: Tomcat Users List
Subject: RE: Windows Native lib


From my own experience documented in my postings to this group under 
the
subject heading:
Tomcat 5.5, IPv6, APR, HTTP,HTTPS, tcnative-1.1.10 does not work
properly. 
Please try tcnative-1.1.8 or tcnative-1.1.9. 
--Lakshmi

-Original Message-
From: Clive Webster [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 2:04 PM
To: 'Tomcat Users List'
Subject: RE: Windows Native lib

Hi Nathan,

Yep: http://tomcat.heanet.ie/native/ is where I downloaded the
tcnative-1.dll and openssl.exe from before.
And these downloads give me the Tomcat runtime error mentioned in my
original email.

So if the downloads are correct - then what else can cause the '730047'
error code ?



-Original Message-

Re: Dynamic form-login-page?

2007-06-25 Thread Jon Wilmoth
To add some more context to this, I was able to successfully use a Struts 1.x 
action in my web.xml.  Struts 1 was based on a servlet vs the ServletFilter 
that Struts 2.x is based on.  Is there anything about this architectural change 
that would require a different Tomcat configuration?  The default extension for 
struts also changed from .do to .action.   Is there anything about this that 
requires a special Tomcat configuration for form-login-pages that are handled 
by Struts2?  Any help or working examples of a S2 app deployed on Tomcat 5.5.x 
or 6.x is greatly appreciated!

- Original Message 
From: Jon Wilmoth [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 2:43:45 PM
Subject: Dynamic form-login-page?


I'm having problems using FORM authentication and a dynamic login page via 
Struts 2. I've tried the following web.xml/struts.xml entries with S2.0.8  
Tomcat 5.5.23, but get a 404 The requested resource (/mywebapp/login.action) 
is not available message. 

login-config 
auth-methodFORM/auth-method 
form-login-config 
form-login-page/login.action/form-login-page 
form-error-page/loginFailure.action/form-error-page 
/form-login-config 
/login-config 

action name=login 
result/login.jsp/result 
/action 

The login action loads the login.jsp just fine when called directly, but 
doesn't work when invoked by the servlet container. Instead I see the following 
in the Tomcat log: 

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] 
(org.apache.catalina.authenticator.FormAuthenticator) - Save request in session 
'930B154E1AD9BFB1283165CD888441EF' 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, 
pathInfo=null, queryString=null, name=null 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - Path Based Forward 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - Disabling the response for 
futher output 

I've asked on the Struts2 list if this should be possible to do and the 
response I got was it definitely should work. I'm wondering if there's a 
special Tomcat configuration (beyond my webapp's web.xml struts2 filter 
mapping) I need to add to enable a .action extension being used for 
form-authentication.

Thanks,
Jon

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Use JMX to manage applications

2007-06-25 Thread Johnny Kewl

Hi Again LightBulb,

In this good article
http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html
You will find an example JMX client, in SRC for talking directly to Tomcats 
JMXProxy


One thing I dont see in the JMX interface, maybe it is there, is a way to 
start stop webapp through JMX.


Just want to say, this thread made me have a good look at JMX in Tomcat, an 
area I never bothered with before well done!... although I think making 
JMX clients is too much hassle, looking at Tomcat through a professional JMX 
client like JConsole is pure magic.
You know if there was just a screen shot of Tomcat in the JConsole on the 
site, I think it would make people (like me) immediately see what a magic 
facility this is.


The other thought I had was that I think if TC scrapped the logging tools it 
has now, in favour of an XML format, and a standard viewer, or any other 
format one wanted if they set up a bit of XSL, I think logs would look damn 
good in JConsole as well, would be easy to server through JMX, or just in a 
web page.
The current  scheme seems to make them to hard to get at, which is actually 
a bit weird considering the things are sitting in a web server IMHO


Have fun



- Original Message - 
From: lightbulb432 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 25, 2007 9:04 PM
Subject: Use JMX to manage applications




How, from a web application deployed to Tomcat, can you customize the
behavior of your web application based on attributes specified in an 
MBean?
The link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html talks a 
lot

about Ant tasks, but that's not really what I'm looking to do.

How can you get programmatic access to MBeans? And how do you deploy 
MBeans

to Tomcat?

I'm pretty confused here...hopefully someone can clarify. Thanks.
--
View this message in context: 
http://www.nabble.com/Use-JMX-to-manage-applications-tf3978363.html#a11293522

Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]