service.bat install failure (Windows, v 6.0.18)

2008-12-09 Thread andrew
I have been running Tomcat 6.0.18 successfully on Windows Server 2003 for 
several weeks now using startup.bat.  I just got around to trying to install it 
as a service using the instructions at

http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

I see the Notice at the top of the page saying that this is now obsolete, but I 
didn't know that when I started, and would like to avoid the hassle of starting 
from scratch with the Windows Service Installer (apache-tomcat-6.0.18.exe) if 
possible.

The symptom I see is that I get "Access is denied." when catalina.bat finally 
executes the call to tomcat6.exe.  I've echoed the command line and all the 
parameters appear to be correct.

I'm hoping that there is an easy to fix Windows permissions issue here, but 
I've been unable to find any relevant posts in my searches.  (I am running
service.bat as Administrator.)  Does anyone know what might be going on?

Thanks, andrew


Re: service.bat install failure (Windows, v 6.0.18)

2008-12-09 Thread andrew
Thanks Chuck.  All good suggestions, but I _think_ I went through each one 
before posting my first message.



Why do you say "catalina.bat"?  Did you mean service.bat?


I'm sorry, you are right.  Before posting, I stepped through the execution 
of BOTH "service.bat install" and "startup.bat".  The former is the one that 
fails, and since the latter has worked flawlessly from the start, I hoped 
that I might find a clue to my problem in comparing the two.  startup.bat 
DOES call catalina.bat, which is why it was on my mind.  But I meant to type 
service.bat in my post.  Again, sorry for the confusion.


Unfortunately, as I'm sure you know, I discovered that %EXECUTABLE% resolves 
to tomcat6.exe in service.bat, but resolves to java.exe in 
startup.bat/catalina.bat. So I can't directly compare the command line 
parameters.  That said, all the paths, etc. in the batch file execution 
appear to be correct for my environment.



What are they?


Here is what gets invoked:



"C:\software\apache-tomcat-6.0.18\bin\tomcat6.exe" 
//IS//Tomcat6 --StartClass org.apache.catalina.startup.Bootstrap --StopClass 
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop

<<<

I infer from reading service.bat that, in addition to the command line 
parameters, tomcat6.exe also reads a bunch of environment variables.  I 
checked how each of these are set by service.bat (before calling 
tomcat6.exe); they appear to be correct.


Try commenting out the @echo off at the top of service.bat so you can see 
the path it takes through the script.


Hopefully you can see that I've already tried hard to get my answer by doing 
that.



Are you positive you're running as administrator?


I can't see why not.  I'm logged in as Administrator, and everything else 
that requires Administrator permissions works.  But I haven't confirmed this 
with a process monitor.


Do you already have Tomcat installed as a service?  (The service name is 
normally 'Tomcat6'.)  If so, try removing it first using the Services 
snap-in.


I did already check this carefully.  I have no service running with the 
string 'tomcat' in either the Name or Description field.  I do have a *wild* 
guess that this problem has something to do with userid that the tomcat 
service uses to "Log On As".  Usually this is something like, "Local System" 
or "Network Service".  Perhaps I am not granting needed permissions to some 
user?


- andrew



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



Re: service.bat install failure (Windows, v 6.0.18)

2008-12-09 Thread andrew

Hi Chuck,

Thanks for all the rapid responses.  I guess it's good to know that I 
haven't done anything blatantly stupid; unfortunately, I don't seem to be 
closer to a solution.



What account owns Tomcat's bin directory?


File/Directory permissions was another one of those things I checked right 
away.  The Tomcat directory is owned by Administrator, gives Administrator 
full control, and I've made sure that these permissions propagate to all 
subfolders and files.


Does your the administrator account you're using have update access to the 
Windows registry?


The answer to that has to be yes.  I use regedit a lot, and other programs 
would have failed to install if not.


Is it "the" Administrator account, or one that's a member of the 
Administrators Group?


It is "the" Administrator account.

Can you try running tomcat6.exe from a command line and specify a known 
valid account?


I suppose, but most of the currently running services Log On As "Local 
System" (so I guess that account is as "valid" as any for running services), 
and you say the Tomcat service uses "Local System".  I do notice that the 
"Log On As" user is not specified in the command line that gets executed, 
but I assume "Local System" is the default.  Please let me know if this is 
not the case and I'll try adding a --User="Local System" parameter.



Are you sure you're not running on Vista?  (Just kidding :-)


Don't get me started ;-)

BTW, the documentation mentions procrun.exe, but I don't find that in the 
distribution.  Is it correct that tomcat6.exe is just procrun.exe renamed?


andrew


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



Re: service.bat install failure (Windows, v 6.0.18)

2008-12-10 Thread andrew

Chuck,

If you're still out there, I'm "sort of" continuing the service install 
thread.  I have managed to move on to a different problem (but not real 
happy about how).


I pretty much gave up on the "Permission is denied." problem.  (I have 
another vague thought about what was happening if you care, but not the time 
or expertise to pinpoint the issue.)   I did a completely clean extract of 
the 6.0.18 tar.gz archive, and tried to see if I could install the tomcat 
service without having touched anything.  Had immediate success.


I thought I would be all set from there -- I could start deploying my apps 
little by little and see where things broke.   Unfortunately, things didn't 
go quite as planned.  What happens now is:


 1. "service.bat install" appears to work fine. (So progress, I guess.)  I 
notice that it does not start the service, so I take care of that manually.


 2. Now, from a browser, if I visit http://localhost:8080 I get the Tomcat 
Welcome Page as expected.  (Same as before deplying my app.)


 3.But if I visit http://localhost:8080/mytestapp the browser waits and 
waits forever.


 4. Note that if I stop the Tomcat service, and then start Tomcat from a 
console using startup.bat, everything works fine -- html, jsp, servlets, db 
connection  Also, there isn't so much as a warning, much less an error 
message, on startup.


 5. Just to see if it is mytestapp that is causing the problem, I did a 
completely clean extract again and tried to visit both 
http://localhost:8080/examples and http://localhost:8080/docs .  I see the 
exact same endless wait.  All these pages load fine if I start Tomcat using 
startup.bat.



I have tried to debug this on my own a couple of ways so far without 
success:


 1. I looked for a log file that might provide a clue.  I found the file 
that the Tomcat service writes to when it starts and stops, but I could not 
find a file in the logs directory that gets updated at all when I hit the 
server from a browser.  Maybe I need to start with a debug parameter?  If 
so, could you point me to info on this?


 2. Following the documentation, I unistalled the Tomcat service and tried 
to run it as

 tomcat6.exe //TS//Tomcat6 --other-startup-params
 hoping I'd see clues go to the console.  Unfortunately, I get:
   > [2008-12-10 12:54:25] [427  prunsrv.c] [error]
   > The system cannot find the file specified.
   > [2008-12-10 12:54:25] [1336 prunsrv.c] [error]
   > Load configuration failed
 I took --other-startup-params from the trace of "service.bat install", 
AND I was also careful to set all environment variables to the same values 
that "service.bat install" sets them.  To confirm I didn't make a mistake, I 
put my "tomcat6.exe //TS//..." in a batch file along with all the env set 
commands.  If I change the //TS// to a //IS// the service installs 
successfully, just like "service.bat install".  But if I change it back to 
//TS//, I get the errors above.


Any chance you know of an easy fix for this one?  (Maybe two issues - the 
failed //TS// seems different.)



Seperately, thank you much for the pointer you provided to the procrun page 
in your last note -- this looks like it could be really useful. If you know 
people who manage the online Tomcat docs, I'd suggest simply hyperlinking 
the word "procrun" (on the windows-service-howto.html page) to the procrun 
page.  This would help people like me a lot.


- andrew


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



Re: service.bat install failure (Windows, v 6.0.18)

2008-12-11 Thread andrew

Chuck,

Thanks for your patience, and all the helpful information.


> I did a completely clean extract of the 6.0.18 tar.gz archive

I usually use the .zip for Windows, but it should be the same thing.


Well, I've been counting on them being the same, but another post suggests 
that maybe there are line ending differences that create my problem.  I 
think I'll try this with the .zip archive just to be sure.  If the .zip 
archive works, I'll let you know.  I've never had a problem with .tar/.zip 
differences in the past (that is, with apps other than Tomcat), but this 
seems worth checking.  If using the .zip fixes my problem, it'll teach me to 
stop using tar on Windows, I guess.



> I notice that it does not start the service, so I take care of

 that manually.


You can, of course, set the startup mode to automatic in the Services 
snap-in.


Yes, of course.  If it had worked after manual startup, that would be the 
first thing I'd do.



> 3. But if I visit http://localhost:8080/mytestapp the
> browser waits and waits forever.

Can you take a thread dump and see what's going on?  Do JConsole or 
JVisualVM show anything interesting (e.g., a thread looping or stuck on a 
lock)?


What happens if you configure the service to run under the same account 
you use when running Tomcat with the startup.bat script?  (Use the 
tomcat6w.exe program to set the account.)


OK, will do.  Both of these are new to me though.  I've seen the Tomcat doc 
page explaining tomcat6w.exe (it's just a rename of tomcat6.exe, correct?), 
so that part should be simple enough.  I haven't used JConsole, or JVisualVM 
before; any advice or doc pointers?  I realize this is really a java 
question, not a Tomcat question, but if it isn't too much trouble


(BTW, other tasks are piling up, so I will probably have to put this issue 
aside for a couple of days.  Please don't think I've given up.)



> 4. Note that if I stop the Tomcat service, and then start
> Tomcat from a console using startup.bat, everything works
> fine -- html, jsp, servlets, db connection

By "everything", do you mean mytestapp?


Yes, *everything*.  I started using Tomcat 6.0.18 (on Windows) about a month 
ago.   During that time, I've built and deployed three webapps - two were 
pretty simple, but one was even a little complicated.  I always used 
startup.bat, and not once saw a problem.  (Looking at the docs, I figured 
that installing the TC service would be a piece of cake -- something I could 
do after things were somewhat stable.)



> Also, there isn't so much as a warning, much less an error
> message, on startup.

When running as a service, or as a regular program, or both?


Both.  I get several lines printed in the java console when using 
startup.bat, but they all start with "INFO:" and appear to be completely 
normal.



> I did a completely clean extract again and tried to visit both
> http://localhost:8080/examples and http://localhost:8080/docs.
> I see the exact same endless wait.

But the Tomcat default home page works?  Is this page possibly just being 
cached by the browser?


I've been bitten by browser caching so many times that I try to keep it 
turned off all the time.  I really thought I'd double checked this, but I 
just went back and tried again, and it appears you are right.  I now see the 
same wait behavior when visiting the default page.  Sorry, kind of 
embarrassing since I certainly meant to check this.  Don't know how I 
goofed.  I guess I've been trying so many things...



> I could not find a file in the logs directory that gets updated
> at all when I hit the server from a browser.

You have to uncomment the AccessLogValve near the bottom of 
conf/server.xml.  However, I don't think this logs anything until a 
response is sent.


OK; good to know.


> 2. Following the documentation, I uninstalled the Tomcat
> service and tried to run it as
> tomcat6.exe //TS//Tomcat6 --other-startup-params

I think you misunderstood the doc.  You have to use //IS// first to 
install the service, after which you can run it with //TS// from the 
command prompt.


Ouch, another goof.  Sorry, I'll go back and re-read.


1) Is this a 32- or 64-bit version of Windows?


32-bit.


2) What JVM do have have installed?


1.6.0_10 (build 33)

3) When you run tomcat6w.exe, what does the Java tab show (all fields, 
please)?


As I mentioned, I need to catch up on other tasks.  So I'll let you know as 
soon as I can get to trying this out.



Thanks.
-andrew


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



Re: service.bat install failure (Windows, v 6.0.18)

2008-12-12 Thread andrew
OK, I have a *procedural* resolution to my issue, however I do not yet 
understand the underlying functional mechanism to my satisfaction.  For 
those who only care about the bottom line, here it is:


* If you want to use Tomcat as a Windows service, use the .zip Tomcat
* distribution, not the .tar.gz distribution.

I think it is worth elaborating some though.  If anyone out there has 
influence on the build and/or documentation, I hope you will read further.


1. Rainer Jung suggested that the behavior difference I see between the two 
distros could be expained by line-ending differences/incompatibilities 
(particularly in config files).  This does NOT appear to be true in my case. 
I've looked at the .xml files in the /conf directory, and they have *nix 
style line endings in BOTH distros.


 1.1. The fact that the .tar.gz version is so close to correct on Windows, 
makes me hope to eventually track down the precise cause of failure; it 
might be interesting.  Remember, I have seen Tomcat work flawlessly for more 
than a month when run as an app, and the Windows service installs without 
visible error.  It is only that the server won't return pages when run as a 
service.


2. If the .tar.gz archive is targeted for *nix only, it sure would be nice 
if this was stated explicitly on the download page: 
http://tomcat.apache.org/download-60.cgi


  2.1. I followed the README link -- it only goes to a page that says 
"Hosted by Linux resources"
  2.2. In the file RUNNING.txt, there is also no explicit mention of 
differences.  In fact, I get the strong impression that both are equivalent 
since the instructions just say to use different startup scripts for the 
different platforms.  At very least, can I suggest adding my experience as 
"Troubleshooting" issue (4) at the bottom of this file?


3. From what I am seeing, it appears that the .zip and .tar.gz archives were 
actually created from different source trees, as oposed to just being 
different compressions of the same source.  The differences are minor, but 
not attributable to tar version incompatibilities, for example.  If that is 
true, then I suggest NOT adding files with extension .exe to the .tar.gz 
build/distribution.  Doing so seems like an implicit confirmation that the 
distro is meant to be run on Windows.



For those of you who think that I deserved this for being silly enough to 
extract the .tar.gz distro on Windows in the first place, well, maybe. 
I'll definitely use .zip in the future whenever there is an option.  But 
keep in mind that I've used tar quite a bit on Windows -- I haven't seen 
anything like this before.  When I first downloaded Tomcat, I remember 
thinking it was really cool that it could be offered as a platform 
independent "Binary Distribution" thanks to Java.  And man, the failure mode 
is subtle -- I didn't see it until after a month of use.



Chuck, sorry to report such a silly resolution.  But I'm still kind of glad 
for the experience.  Although a lot of your advice turned out not to be 
related to my problem, I'm a better Tomcat user as a result.  Thanks for 
your patience.


-andrew








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



Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-13 Thread Andrew Tanton
In the Tomcat "JNDI Datasource How-To" documentation page
,
there is an unusually opinionated section, which discusses the Java service
provider (driver manager) mechanism:

"*However, the implementation is fundamentally broken in all Java versions
for a servlet container environment. The problem is
that java.sql.DriverManager will scan for the drivers only once.*"

Can someone help me understand what this means in more practical terms?

The page goes on to say:

"*...web applications that have database drivers in
their WEB-INF/lib directory cannot rely on the service provider mechanism
and should register the drivers explicitly.*"

And, indeed, I have found that placing my JDBC driver in Tomcat's
$CATALINA_HOME/lib
or $CATALINA_BASE/lib will be loaded correctly, without explicit
registration.

MY QUESTIONS:

(1) I don't understand why the "scan only once" limitation results in this
behavior - so what am I missing, here, conceptually?

(2) Where is this "scan only once" behavior documented?

(3) What is it about a servlet container environment which allows this
problem to exist?

Thank you.

For reference, here is the documentation link I used above:


http://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html

(The wording in the documentation has been this way for several Tomcat
versions, going back a few years.)


Re: Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-17 Thread Andrew Tanton
Thank you - very helpful & much appreciated.

On Sat, Aug 14, 2021 at 4:24 PM Mark Thomas  wrote:

> On 14/08/2021 01:51, Andrew Tanton wrote:
> > In the Tomcat "JNDI Datasource How-To" documentation page
> > <
> http://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#comments_section
> >,
> > there is an unusually opinionated section, which discusses the Java
> service
> > provider (driver manager) mechanism:
>
> I suspect that was me after spending quite a but of time unpicking
> various issues associated with DriverManager where Tomcat was getting
> blamed. Goes to check the history...
>
> Yep. Here is the bug report:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=52025
> which triggered this doc update:
> https://svn.apache.org/viewvc?view=revision&revision=1184919
>
> > "*However, the implementation is fundamentally broken in all Java
> versions
> > for a servlet container environment. The problem is
> > that java.sql.DriverManager will scan for the drivers only once.*"
> >
> > Can someone help me understand what this means in more practical terms?
>
> This will be a lot simpler to explain with the source code to hand:
>
> https://github.com/openjdk/jdk/blob/master/src/java.sql/share/classes/java/sql/DriverManager.java
>
> > The page goes on to say:
> >
> > "*...web applications that have database drivers in
> > their WEB-INF/lib directory cannot rely on the service provider mechanism
> > and should register the drivers explicitly.*"
> >
> > And, indeed, I have found that placing my JDBC driver in Tomcat's
> > $CATALINA_HOME/lib
> > or $CATALINA_BASE/lib will be loaded correctly, without explicit
> > registration.
> >
> > MY QUESTIONS:
> >
> > (1) I don't understand why the "scan only once" limitation results in
> this
> > behavior - so what am I missing, here, conceptually?
>
> There are several inter-related elements.
>
> Scan once caused problems as if two web apps both have JDBC drivers then
> the DriverManager scan will only load the Driver for the app that
> triggers the scan first.
>
> An added complication is that the memory leak protection code
> essentially ensures that the scan is performed by Tomcat internal code
> so no JDBC drivers in WEB-INF/lib for any wweb application are seen by
> the scan. Hence, the JDBC drivers need to be in CATALINA_BASE/lib.
>   > (2) Where is this "scan only once" behavior documented?
>
> It is sort of implied in the DriverManager Javadoc but you need to read
> the source code to get a clear picture.
>
> > (3) What is it about a servlet container environment which allows this
> > problem to exist?
>
> Dynamic loading and unloading of web applications and use of a dedicated
> class loader per web application.
>
> You can also get various memory leaks associated with DriverManager as
> well (which Tomcat automatically protects you against).
>
> Mark
>
>
> >
> > Thank you.
> >
> > For reference, here is the documentation link I used above:
> >
> >
> >
> http://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html
> >
> > (The wording in the documentation has been this way for several Tomcat
> > versions, going back a few years.)
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat's scalability

2006-06-19 Thread Andrew Miehs

Biernatowski Bartosz J wrote:

I am about 90% sure the bottleneck is Tomcat or what's running on top of
Tomcat. Application uses JDBC queries to MS SQL server
Chips are Intel Xeon. My monitoring data: 


Why are you 90% sure?! Your SQL server is running on a seperate machine? 
or the same machine? What does iowait (whatever windows calls it) look 
like? how long do your queries take?




Memory utilization under 30%, CPU under 10%. Using hardcore performance
tools and systematic approach. 


Then Tomcat is probably NOT the problem - When Tomcat starts having 
memory problems, etc (not enough) you will see the CPU head up to 100% 
because it spends it whole time doing garbage collection.


Could be anything - the database



The bottom line is that Tomcat/my application combo don't seem to handle
more than a certain number of users. All I want to do is to up the # of
users by 3. 


Well - then you can either buy 3x the databases, 3x the paired tomcat 
servers, etc, etc - (and hope the data doesn't need to be connected). To 
be honest though, this probably won't fix it either.


You say the machine is at 30% CPU. What happens when you get 500 users 
on the machine? Can they still work? Does TC crash? Does everything stop.


From this description, it sounds like your database the bottleneck, but 
without looking at the application, and what it does, and HOW it tries 
to do it I can't give a better diagnosis.


If this is a REAL problem for your company, look at getting someone in 
to help you and show you how to diagnose this in future.


Andrew

-
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's scalability

2006-06-19 Thread Andrew Miehs

Ooops - forgot to add the rest

Andrew Miehs wrote:



Could be anything - the database



could be the indexes in the database, could be deadlocks, could be a 
badly programmed application, could be high packet loss on the ethernet 
interfaces, could even be tomcat -


As for the 90% guess - At least you only now have 10% of your problem 
left to look at to find the solution!


Cheers and good luck!

Andrew

PS: I can only STRONGLY recommend that you get someone in to help you 
fix this problem.


-
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's scalability

2006-06-21 Thread Andrew Miehs
Now that we are moving to the theoretical discussion, you will  
probably want to have a look at


http://www.kegel.com/c10k.html

Regards

Andrew


On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote:

I spoke recently with guy from Microsoft (project manager from  
server division).
He said that heavily loaded web server don't lose much time to  
switch processes but when you are out of free memory and server  
start to swap, performances degrade dramatically.

I though that guy definitely knew what he was thought about.

Lets see what operating system has to do when switch threads.
Just to move all registers to/from memory? Anything else?



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

2006-06-21 Thread Andrew Braae

On at least one version of Oracle (10 IIRC), the default install hijacks
port 8080 for "Oracle XDB". When you say you have installed Oracle on a
different port, perhaps you are referring to the Oracle port for database
traffic, which is normally 1521 - this is a different port which I think is
web management tool).

I had trouble getting Oracle to stop grabbing 8080 and in the end I had to
change tomcat's port. I'm sure you can change Oracle somehow though.



On 6/22/06, veena v <[EMAIL PROTECTED]> wrote:


I have windows xp installed on my system. I installed tomcat 4.1 and
it
was working properly. But after installing oracle 9i tomcat is not working
though i have installed tomcat and oracle on different port. Please do
help
me.




Re: looking for memory profiler or dump analyzer for production use

2006-06-21 Thread Andrew Miehs
The monitoring component works for the first hour after the VM is 
started in the free version. In the commercial version, the monitoring 
information is availble the whole time - as for pricing - no idea..


There as an article about JRocket in one of the last IX magazines (DE)

Andrew

Leon Rosenberg wrote:

not sure, the vm itself is free, but i think the monitoring isn't.
we couldn't find any prices ourself too
leon

On 6/21/06, charly <[EMAIL PROTECTED]> wrote:


Thanks!

Doesn't this mean that it is free:



-
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's scalability

2006-06-21 Thread Andrew Miehs

Not only.

The issue is really whether it make sense to use the operating systems 
process table as a queue or not. Up until linux new threading model in 
Linux kernel 2.6 this was definitely the case. The 2.6 threads are very 
efficient, so most programmers will not notice a real performance 
degredation due to context switching. Threads are great, as long as they 
are used for the purposes of doing multiple jobs at a single time - 
missusing them as a 'connection queue' though is IMHO not a very smart 
idea - This is why I prefer ZEUS and Lighttpd instead of Apache as web 
servers.


Andrew

Alex Turner wrote:

This discussion focuses primarily on serving static files to a client, not
processing dynamic web pages.  Most people running tomcat are processing
dynamic pages, like getting data from a database and compositing a page
based on that data.

An FTP site, or a static web site will typically be I/O bound or Network
bound, and the only way to increase throughput it to increase the number of
I/Os per second that your server can manage or increase the size of your
network interface.  A java based dynamic website is typically not I/O 
bound,

but CPU bound, which posses a different set of challenges than a static FTP
server.

Alex.

On 6/21/06, Andrew Miehs <[EMAIL PROTECTED]> wrote:



Now that we are moving to the theoretical discussion, you will
probably want to have a look at

http://www.kegel.com/c10k.html



-
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: Running code on Tomcat startup

2006-06-22 Thread Andrew Braae

I've handled this by using a servlet filter that intercepts all requests
(something like this in your web.xml file)...


 Do Startup Filter
 /*


Then inside the do.. method you can set up your object and attach to either
a context such as your session or to the ServletContext (if you want it
globally available).

However, I don't know know if this is the best way - one problem is that the
startup cost is suffered by the first user to hit the site, whereas it would
be better if the startup was performed when tomcat itself starts up. This is
not such an issue I guess for a site that is hammered the second it comes
up.



On 6/23/06, 0 8 <[EMAIL PROTECTED]> wrote:


Hello,

I have a newbie Tomcat question.

A search application I need to work with uses RMI.  When I start
Tomcat, is there a way I can run the code to create an object that I
can reference in a JSP later?

What I need to run is straight forward:

ClientServices cs =
com.mycompany.searchapp.ClientServicesFactory.getInstance("RMI",
parms); // Get the ClientServices
cs.Login(strDomain, strUser, strPassword); // Login

Can I run this and reference the object cs from my JSP?

If someone could point me in a general direction it would be
appreciated.  If there's a better way to handle this, I'm open to
suggestions.

Thanks,
Matt

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




Stateless Tomcat Application

2006-06-28 Thread Andrew Miehs

Dear List,

I have an simple application that I would like to have cached by a squid 
server. My question is, is it possible to disable the Tomcat generating 
JSESSIONIDs, as these requests are all stateless.



Thanks in advance,

Regards

Andrew

-
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: Running Tomcat as root on Linux

2006-06-28 Thread Andrew Braae

Another option if your main goal is to get tomcat bound to port 80 is to use
port forwarding (e.g. iptables works well on linux). Then tomcat can run as
any old user on a non-privileged port such as 8080 and you redirect all
incoming port 80 traffic to the actual tomcat port.

Andrew

On 6/29/06, Markus Schönhaber <[EMAIL PROTECTED]> wrote:


Sean Machin wrote:
> I'm setting up a Linux server with Tomcat that will be used for field
> trialing.  The server will be connected
> to the public Internet.  Is it typical practice to have Tomcat installed
> and running as root on a system
> like this, or should it be running as a less privileged user?

The latter.
One of the possible options you might want to consider in this case is
jsvc -
it's source code comes with the Tomcat distribution and is located in the
bin
directory. It allows you to run Tomcat without root priviledges and
nevertheless bind to privileged ports.

Regards
mks

-
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: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

More stupid question...

1 - Why are you using perl when you have tomcat - can't you just use  
a jsp?

2 - why can't you use an  tag? and have tomcat deliver the page...
3 - You are using tomcat aren't you?


Confused

Andrew

On 11/07/2006, at 11:00 PM, Mead, Jennifer L - VSCM wrote:



Hello,

I am trying to create some cgi pages for my company.  Or I should  
say I
have created some and now just want to add a header graphic in the  
main

page.  Nothing fancy.  However, I cannot get my image to display, no
matter how I embed the darned thing.  I can't even get regular html to
display from our installation.  Is it a configuration thing?  Or am  
I so
green I just don't get it?  (feel free to flame).  Here is the only  
code

I can get running that displays the image:

#!/usr/local/bin/perl -w

#
#

use warnings;
use CGI qw/:standard/;
use CGI::Carp qw( fatalsToBrowser );

use constant BUFFER_SIZE => 4_096;
use constant IMAGE_DIRECTORY => "/images";

$|=1 ;

$q = new CGI;
print $q->header( -type => "image/gif" );
binmode STDOUT;
my $buff = "";
my $image = "icc-logo.gif";

local *IMAGE;
open IMAGE, IMAGE_DIRECTORY . "/$image" or die "cannot open file  
$image:

$!";
while ( read( IMAGE, $buff, BUFFER_SIZE ) ) {
   print $buff;
} close IMAGE;





-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtBNWW126qUNSzvURAogbAJ9HHFxXIVUpt+xZFUKSMO08P6P2TgCeL1+a
DMEBngY+kTShxsFNyHjz7yM=
=EoBF
-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]



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

Hi Jennifer,

Very strange! Tomcat and perl cgi! cool - didn't know it worked...

Are you sure you are not using Apache with mod_jk, or mod_proxy?

As for the perl. Where is the page that prints the HTML?

why don't you just add

print '';

Very confused

Or could it be that you are using the wrong document root?

does http://myservername/images/icc-logo.gif deliver the correct image?

Andrew.



#!/usr/local/bin/perl -w

#
#

use warnings;
use CGI qw/:standard/;
use CGI::Carp qw( fatalsToBrowser );

use constant BUFFER_SIZE => 4_096;
use constant IMAGE_DIRECTORY => "/images";

$|=1 ;

$q = new CGI;
print $q->header( -type => "image/gif" ); binmode STDOUT; my $buff =
""; my $image = "icc-logo.gif";

local *IMAGE;
open IMAGE, IMAGE_DIRECTORY . "/$image" or die "cannot open file
$image:
$!";
while ( read( IMAGE, $buff, BUFFER_SIZE ) ) {
   print $buff;
} close IMAGE;




-
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: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:




What this does is draw the box where the image should be.  When I  
right

click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 


And where is your image on the disk?

./tomcat/webapps/ROOT/images ?

Looks as if it simply cant find it...

Andrew

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDPuW126qUNSzvURAqsaAJ9sPOCAL+bhEP2yC5QHU74H9/y5IwCgjIgI
q7JCUSODlyeQgMZ+ME9N8Ks=
=EAuh
-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]



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ahhh...

and in webapps/ROOT/

create a directory called WEB-INF (please note capitals) that should  
fix your problem...


Regards

Andrew

On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:



What this does is draw the box where the image should be.  When I  
right

click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDShW126qUNSzvURAgtxAJwPa2jrrkN0241hVlxaxDf+eZd1bgCfbfSl
5pIOXiiNKc5pHCZHpqZlO08=
=haVp
-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]



Re: Simple question, but can't figure out answer

2006-07-12 Thread Andrew Miehs


On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:


I already have that.  I really don't understand but I bet it turns out
to be something stupid (on my part).  It is pretty frustrating but for
now they get no images!  Thanks for the reply.

Jen



Does http://server/images/myimage.gif work?





-
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: Simple question, but can't figure out answer

2006-07-12 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

No I am really confused

Your server name is  ...

and looking at your perl code, you were trying to get to an image  
called icc-logo.gif

 http:///images/icc-logo.gif
replace  with the name of your server

This SHOULD display the gif...

if your tomcat is installed in /usr/local
then I would expect at least the following files to exist

/usr/local/tomcat/
/usr/local/tomcat/webapps/
/usr/local/tomcat/webapps/ROOT/
/usr/local/tomcat/webapps/ROOT/images/
/usr/local/tomcat/webapps/ROOT/images/icc-logo.gif
/usr/local/tomcat/webapps/ROOT/WEB-INF/

IF not - then we need to describe exactly what you have

Are you sure you are only running Tomcat on this box?

what does "ps auxw" say?

Andrew



On 12/07/2006, at 4:10 PM, Mead, Jennifer L - VSCM wrote:


Nope, where and what is it trying to display?

-Original Message-----
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 7:08 AM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer


On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:

I already have that.  I really don't understand but I bet it turns  
out


to be something stupid (on my part).  It is pretty frustrating but  
for



now they get no images!  Thanks for the reply.

Jen



Does http://server/images/myimage.gif work?





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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtQS5W126qUNSzvURArXWAJ4iQZnAk3PCvPOHJ/AYfoZZ2uR1IACcD92B
n1CyuDHGgXRAqOo8/Srfnz8=
=kbxT
-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]



Re: FW: Intermittant images using https on tomcat

2006-07-21 Thread Andrew Miehs

Rob wrote:

Hi Barry,

It's only IE that has the problem.  I've checked the URLs and they're fine.
Sometimes the images appear and other times they don't, like there's a
timeout problem in the https connector or something like that.  Images under
http work fine - haven't see any broken images yet.

Rob



Have you turned on access logs in Tomcat?

Once the images stop appearing - do you need to restart your browser to 
see any images? or is it just every nth image that is missing?


Andrew

-
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: Problem with next error during login: Number of simultaneous users reached

2006-07-25 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html

This is per default installed with Tomcat 5.0

You will need to add a role to tomcat/conf/users.xml

Regards

Andrew



On 25/07/2006, at 2:51 PM, Jan Line wrote:

Thanks Leon for the pointer. I see that lambdaprobe may help with  
our issue.
  But we cannot install this new application because our production  
environment
  is very concerned about new tools. That is the reason we are  
trying to get some
  info with solaris tools. We are limited but for the moment is the  
only toolkit

  we may use.

  See you,


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFExhXmW126qUNSzvURAsRmAJ40FYMpgKuz3n01tiOcl8hhOvHdUQCfSoUx
L01NDzMrUykavkQx9V6ydT8=
=41eh
-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]



Re: Problem with next error during login: Number of simultaneous users reached

2006-07-25 Thread Andrew Miehs

I do not really understand what you are trying to do here...

But you may get more information from http:///manager/status

As for 'maxUsers' in web.xml - no idea what that command does - never  
seen it before.



Regards

Andrew



On 25/07/2006, at 4:03 PM, Jan Line wrote:


Andrew,

  I have read your pointed link and now I am able to check the  
number of active
  sessions for our application. I cannot modify anything on the  
target machine
  but the ant tool was already installed so we prepared a build.xml  
file with a project with default target list (using the example  
provided on the link) and we got this useful info:



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

2006-07-28 Thread Andrew Miehs


On 28/07/2006, at 6:55 PM, [EMAIL PROTECTED] wrote:


Anyone know of website which has a step by step procedure to upgrade?



What exactly is your problem with upgrading? The 'webapp' or the  
installation of tomcat 5?


I would just install a new version of tomcat, with the JVM that you  
want, parallel, then then install your webapp - and see what happens.  
I don't quite understand the problem...


Regards

Andrew

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

2006-07-31 Thread Andrew Miehs

Hi Ibrahim,

What do you mean you don't want to do a parallel installation?!

How do you want to check if it works?!

Install TC 5.5 and java 1.4+compat libs or JVM 1.5 on the test machine,
copy the stuff across, and start it and see what happens.

You do have a test system? don't you?!

Worried...

Andrew

[EMAIL PROTECTED] wrote:

Andrew,

  Our website is developed using Vignette Content Management components. 
These comprise of VCMS and VMCM.
  We need to upgrade these two versions and due to matrix compatibility 
issues, we are forced to upgrade Tomcat  to 4.1.12.
  In this upgrade, we don't want to do a parallel installation, rather 
work w/the existing system. So would your steps

  be correct for such a scenario?


Thanks,
Ibrahim



-
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: difference between thread and session

2006-08-14 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear anonymous

You may want to invest a few dollars and buy yourself this book...

http://www.oreilly.com/catalog/headservletsjsp/


Regards

Andrew

On 14/08/2006, at 2:40 PM, Tomcat wrote:


Hello

what is the difference between thread and session in tomcat ?
I was thinking that they are the same, but  in server setting of  
tomcat manager
it shows different thread number to session number in application  
list.


Thanks for help


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE4HE3W126qUNSzvURAusbAJ9OHPLZT7Z+3LYOBZ9ZBc9alah5BwCfVdX7
sA8yThu6CruTtzdoiVGDCAQ=
=MxLW
-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]



Re: NPE in log4j while reloading webapp

2006-08-14 Thread Andrew Stepanenko

hello,

this issue has already been discussed before. Pls, search the archives.
AFAIK, you need to put log4j JAR to $CATALINA_HOME/common/lib dir in
addition to your WEB-INF/lib.

Regards.
Andrew Stepanenko

On 8/14/06, Daniel Serodio <[EMAIL PROTECTED]> wrote:

When I try to reload an application in Tomcat, I get the following error:

log4j:ERROR Error occured while converting date.
java.lang.NullPointerException: null array passed into arraycopy
at
java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown
Source)
at
java.lang.AbstractStringBuilder.getChars(AbstractStringBuilder.java:331)
at java.lang.StringBuffer.getChars(StringBuffer.java:202)
at
org.apache.log4j.helpers.ISO8601DateFormat.format(ISO8601DateFormat.java:128)
at java.text.DateFormat.format(DateFormat.java:314)
at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)
at
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:64)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:503)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at
org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
at
org.apache.catalina.core.ApplicationContext.log(ApplicationContext.java:638)
at
org.apache.catalina.core.ApplicationContextFacade.log(ApplicationContextFacade.java:249)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:176)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2988)
at
org.jstripe.tomcat.probe.controllers.ReloadContextController.executeAction(ReloadContextController.java:25)
at
org.jstripe.tomcat.probe.controllers.NoSelfContextHandlerController.handleContext(NoSelfContextHandlerController.java:34)
at
org.jstripe.tomcat.probe.controllers.ContextHandlerController.handleRequestInternal(ContextHandlerController.java:39)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
at
org.jstripe.tomcat.probe.ProbeServlet.doDispatch(ProbeServlet.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)

This stacktrace is from a specific webapp (Lambda Probe), but I get
similar errors with any webapp I try to reload via Tomcat Manager.

What can I do to fix this problem? I asked in the log4j list, and got
the following answer from Curt Arnold:

> Might try asking on the tomcat-user list.  I've seen some surprising
> behavior during class reloading and it isn't an area that I have any
> experience with.  If you do get an analysis, I would appreciate your
> giving us a heads up by posting the resolution back here.

> I did look at the code in question.  If lastTimeString was somehow not
> initialized on class reload, then there could be a NPE on the call to
> getChars().  However, short of a some failure in the VM or a class
> reloading hack, I don't see how lastTimeString could be null.

> When you post to the tomcat list, please identify the version of
> log4j, tomcat and the Java VM and platform.

The webapp has log4j.properties in WEB-INF/classes and log4j-1.2.13.jar
in WEB-INF/lib
I'm running Tomcat 5.5.15 on Linux with JRockit 1.5.0_06-b05, but I see
the same behaviour on Windows and/or with the Sun VM, so I dont't think
it'a VM-related problem.

Thanks in advance,
Daniel Serodio


-
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: do I need Apache httpd?

2006-08-20 Thread Andrew Miehs
No you do not need Apache, unless your static content is MUCH greater 
than your dynamic content - And even then, with a low volume site, it 
really doesnt make any difference



Regards

Andrew

Nolan Johnson wrote:

I've got a webapp that's entirely dynamic.  That is, all of the content is 
produced by servlets through Tomcat.  The only static content for the site is a 
.css file and a small error page.  Is there any reason for me to have Apache 
httpd listening on port 80 and have that connected to Tomcat with mod_jk2, or 
should I just have Tomcat's http server listen on port 80?
 



-
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 virtual hosts and ssl certificates

2006-08-25 Thread Andrew Miehs

You can only have 1 ssl certificate per IP address

Andrew


On 25/08/2006, at 11:09 AM, teknokrat wrote:

I am trying to set up tomcat with multiple virtual hosts, each with  
their own SSL certificate. Is this possible? Do I add each  
certificate to the main keystore as per one host?





-
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 virtual hosts and ssl certificates

2006-08-25 Thread Andrew Miehs


Peter is correct - I was just being a bit lazy in my answer...

The ssl connection is setup BEFORE any 'hostname' information is  
passed over the link, and therefore the server would not know 'which'  
virtual hostname's ssl certificate to use.


Therefore - 1 certificate per IP Address/ Port combination.


Cheers

Andrew

On 25/08/2006, at 12:22 PM, Peter Crowther wrote:


From: Andrés González [mailto:[EMAIL PROTECTED]
I mean, what are you saying? That tomcat can only have 1 ssl
certificate per IP address, or that it is a "general" limitation of
the architecture of SSL certificates.


It is a general limitation of SSL.  To be strict: you can only have  
one certificate per *endpoint*, that is, IP address/port combination.




-
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: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

What is this supposed to become?

Do you want 10,000 domains on the tomcat? or do you want 10,000 webapps?

The JVM will die if you do this with 10,000 webapps

Andrew


On 26/08/2006, at 11:36 AM, Mladen Turk wrote:


KEGan wrote:

Hi,
I am wondering if anyone has added 10,000 virtual hosts to Tomcat  
before,

and whether Tomcat can handle this.



There are no limits except memory available to the JVM.
The performance itself should depend only on
the file system, and I would suggest not to
put all 1 homes inside the same directory root.


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE8BevW126qUNSzvURAuUvAJ9imCr0QgPH9GtRWoP+Rn17cKrYgACfTmoy
HaoJLfqu8Y+gtR7sU1PAPCA=
=lN6F
-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]



Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

Ok - Theoretically it may work...

Who do you know that has a machine with Terabytes of memory? And is  
using it for web hosting?!


The JVM will spend all its time doing context switching and garbage  
collection...


Andrew


On 26/08/2006, at 11:49 AM, Mladen Turk wrote:


Andrew Miehs wrote:

The JVM will die if you do this with 10,000 webapps


Why do you think it will die?
There are systems with 64-bit JVM's and terabytes of
memory.



-
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: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

If you are only delivering static content, then use Apache or Lighttpd

http://www.lighttpd.net/

This is NOT what tomcat is designed for

As for how much memory, no idea - but it cant be good

Andrew


On 26/08/2006, at 12:00 PM, KEGan wrote:


Thanks Mladen for the valueable reply.

Andrew, on your question : it is 10,000 domains that serves 10,000  
different

static HTML. One HTML for each domain.

How much memory does 1 webapp takes in Tomcat ? Would it be ok with  
10,000
domains pointing to 10,000 webapps but each webapp serves only  
static HTML?


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE8B1vW126qUNSzvURAsa7AJ0ThoV+7mOGrdOMGhHBbJPtxv75OQCfUa4Z
R2X7ESQkd1h/vRuak0MdD4w=
=jIyr
-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]



Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

Dear Mladen,

Are we referring to 10,000 Virtual servers or 10,000 Connections?
And the answer is yes to 1 connections.

Yes I would use worker-mpm or better still an epoll based httpd  
daemon, like lighttpd or zeus.


Regards

Andrew


On 26/08/2006, at 12:18 PM, Mladen Turk wrote:


Andrew Miehs wrote:
If you are only delivering static content, then use Apache or  
Lighttpd

http://www.lighttpd.net/
This is NOT what tomcat is designed for



In theory the threaded model should consume less memory
and less CPU cycles compared with prefork model.
Of course if your application is stable then you
should always prefer worker-mpm over the prefork-mpm.

Did you ever tried to hit the Httpd with 1 concurrent
connections? I did, and Tomcat uses less memory then
Apache httpd, and that's why it is 2 times faster then
httpd.



-
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: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

Stupid question,

Why don't you implement the 'virtual' hosts inside the one 'webapp'?
And not create 10,000 web apps?

That the App itself deals with the virtual hosts (by reading the host  
header), and not tomcat?


Andrew

On 26/08/2006, at 12:30 PM, KEGan wrote:


I tried to use only Tomcat since the static content is dynamically
generated. Think blogging application.

However, users dont update the data that often, that's why I  
generate the
content and make it static for web access, as oppose to dynamically  
generate

the content each time it is requested. Using minimal CPU cycles.

Also, I tried to use ONLY Tomcat and do away with integration of  
Apache HTTP
+ Tomcat, or Lighthttpd + Tomcat, because its would be easier to  
maintain.





-
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: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

?! Now I am confused ?!

10,000 connections and 10,000 virtual hosts have NOTHING to do with  
one another.


As to 10,000 virtual hosts in Tomcat, vs 10,000 virtual hosts in  
Apache


No idea - I don't think 10,000 virtual hosts on either is a good idea.
But with Tomcat, you have 10,000 'WebApps' ie: at least 10,000  
objects, ignoring what ever else the webapp initialises, vs a look up  
table (probably a hash) in Apache.


I don't think it is a very scalable solution.

According to the original poster, all 10,000 webapps, are the same,  
so I would look at only having 1 web app, and dealing with the  
'virtual hosting' inside my webapp.



Andrew




On 26/08/2006, at 12:47 PM, Mladen Turk wrote:


Andrew Miehs wrote:


Are we referring to 10,000 Virtual servers or 10,000 Connections?
And the answer is yes to 1 connections.



It does not matter. 1 Virtual hosts in Apache
would require as much memory as 1 Hosts in Tomcat.
Once when you break the JVM latency, there is no much
difference between Java or any other 'optimized' program.


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE8CwcW126qUNSzvURAugcAJ45GILi2sXmzBb3ATCGClEXKv478gCfbRPT
B84NfMcmZ9ezOSm5Vi07eHw=
=f4EQ
-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]



Re: Tool for monitoring Tomcat from the client side

2006-08-30 Thread Andrew Miehs

Why do you need c?

Works with perl and shell scripts...
You could even use java if you wanted

Andrew


On 30/08/2006, at 10:36 AM, Bruno M Luque wrote:

I would use Nagios, its worth the effort of dealing with C, you  
dont have

that meny choices!,

cheers



-
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: Tool for monitoring Tomcat from the client side

2006-08-30 Thread Andrew Miehs

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

When APR is enabled, the HTTP connector will use sendfile for hadling 
large static files (all such files will be sent ansychronously using 
high performance kernel level calls), and will use a socket poller for 
keepalive, increasing scalability of the server.


On Linux, epoll is used if available.

Regards

Andrew


Caldarale, Charles R wrote:
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Subject: Re: Tool for monitoring Tomcat from the client side


This slightly besser performance, is it achieved by C or by 
using epoll?


Good question, and I don't know the answer.  It would be interesting to
see if there's any performance difference by recoding the pure Java
request handler in Tomcat to use NIO and its polling capability.  Any
volunteers?



-
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: Low performance with Tomcat APR

2006-09-05 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Which kernel are you using? 2.6 or 2.4?

Andrew

On 05/09/2006, at 3:34 PM, José Manuel Molina Pascual wrote:


Hello, I just installed Tomcat APR on a SUSE 9 and found that the
performance has fallen dramatically (I fact, performance with APR it's
half than without it).

I followed the instructions of the Tomcat Documentation.

I suppose that this must be some configuration issue.

I'm using Apache APR 1.2.7, OpenSSL 0.9.7d and Tomcat 5.5.17.

Thanks in advance.

--
Peace Sells.. But Who's Buying?

When all you have is a hammer, everything looks like a nail.

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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE/X/UW126qUNSzvURApeeAKCLsZGjOsxZGMqXVnIf8OEHrdUlkwCcCoxe
N8wWBqgIRWfizB0ttVxkKl0=
=/g93
-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]



Re: max memory..

2006-09-05 Thread Andrew Miehs
I discovered no difference in performance between running 1 tomcat, or 4 
tomcats on the one machine - same performance.


The machine was a 4x Opteron 870 with 8GB RAM, running Java 1.5.6 32bit.

Andrew

Boris Unckel wrote:

Hello,

 >> can I move to 2048mb without any problem ?
Leon Rosenberg wrote:

are you using a 64bit version? If yes than the answer is yes.
Otherwise its probably no :-)
Is this really just a 32 vs 64bit decision? What about garbage 
collection cycles?
What about more than one instance of tomcat for the same application on 
the same machine

(scaling somehow vertically)?

Regards
Boris


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



Server cannot access http://localhost:8080 after unknown event

2006-09-07 Thread Andrew Greene
We have applications that rely on Apache's ability to route requests to
Tomcat. Periodically Apache is unable to access Tomcat. We have tracked
down the issue to the server being unable to access Tomcat using
http://localhost:8080. During the time that the server cannot access
Tomcat, any other networked PC can access it using
http://servername:8080. (The server cannot get to Tomcat using the
Network IP address, the servername, localhost or 127.0.0.1.)  This issue
comes up at random intervals. Usually it happens about once a week, but
it has gone as long as six weeks between incidences. We have been unable
so far to find anything else happening at the same time to correlate to
the issue. Our best guess is that is has something to do with the
combination of the specific hardware and software we are running. (We
have a development machine installed on VMWare that has never had the
issue, but it does not get the same usage as the production server.) I
am hoping someone on the list has seen something similar in their
environment and can either point me to a solution or to further steps to
take to track down the issue. Thanks,-Andrew  Vital Stats:Server:IBM
BladeServer Model 8832M1XWindows 2003 SP1Dual 3 GHz Xeon2.5 GB
RAMBladeCenter Chassis:Model 86772XXTomcat:5.5.17Apache:2.0.55


Re: JNDI, Hibernate, Tomcat

2006-09-11 Thread Andrew Stepanenko

hello,

we have a working tomcat + hibernate setup in our project. What error
do you get?
Post some logs.

Regards,
--
Andrew Stepanenko,
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil State Economic University
Shevchenko Street 9, Office 24-25
Ternopil, 46000 UKRAINE
Tel: +38 (0352) 43 52 41
fax: +38 (0352) 43 52 45
Web: http://unf.tane.edu.ua


On 9/11/06, Li <[EMAIL PROTECTED]> wrote:

Hi all,

I am using JNDI context in my hibernate (factory lookup). Any one knows how
to setup JNDI for hibernate with tomcat.
(I know how to use hibernate with tomcat, but it doesnt work when i use JNDI
for my hibernate session factory lookup)

Regards

Li




-
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: moving to linux

2006-09-11 Thread Andrew Miehs

Hi Rodrigo,

How long is a piece of string?

The 'Brand' of linux only really makes a difference for  
administration purposes. Performance will be about the same on all,  
depending mainly on which version of the kernel you are running.


Should you decide to go Linux, I would look at something with a  
kernel > 2.6.12...


As for how many users - this really depends on how your app works,  
and what hardware you have running in the background. Are the tomcats  
even the problem? or is it the database in the backend?


You will find the new threading library in Linux 2.6 to be very  
beneficial for tomcat with lots of threads.



Andrew

On 11/09/2006, at 10:37 PM, Asensio, Rodrigo wrote:


CentOS & Debian  with tomcat, how many users are you handling ?
Here with 350 logged users our Win2003-Serv is suffering a lot all the
time.
I really want to know the capacity of tomcat handling lot of sessions
concurrently.

Thanks.
R

--


-
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: System requirements

2006-09-19 Thread Andrew Miehs

Hi Nicolas,

Tomcat works best with large hardware. I have found that using a Sun  
Enterprise 15K with 1 processor per online user gives me the best  
performance.


Regards

Andrew

PS: Maybe you should give us slightly more detailed information about  
your requirements if you want someone to be able to help you



On 19/09/2006, at 2:26 PM, DEMESY Nicolas wrote:


Hi,

I would like to know what are the system requirements for using  
Tomcat in a production server, with 50-100 users, on a Red Hat  
Advanced Server 3.

Where can I find benchmarks ?

Thank you for your advices,
Nicolas DEMESY



-
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: Struggling with basic database connection

2006-09-23 Thread Andrew Stepanenko

Hello,

there is a difference between how resources are defined in 5.0 and
5.5. In 5.0 you could provide your resource definitions right in the
server.xml, but in 5.5 you need to create a separate context.xml file
($CATALINA_HOME/conf/Catalina//context.xml) and put resource
definitions there.
See this link: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

I also had this problem when migrating from 5.0 to 5.5. After I
defined a separate context.xml it started to work again.

Regards,
--
Andrew Stepanenko,
http://unf.tane.edu.ua

On 9/23/06, Alan Chandler <[EMAIL PROTECTED]> wrote:

I am struggling to figure out why my Tomcat installation is failing to allow
me to connect my java web application to a database.  I am looking for ideas
as to how to find out what is wrong.  I have (what I think) is the same setup
on another machine and it works fine.  The only difference between these is
that the working one in tomcat 5.0 and this machine is tomcat 5.5 (although I
am just about and try with a 5.0 setup).

I am trying with this simple piece of code - plucked from the tomcat docs.

Context initCtx;
try {
initCtx = new InitialContext();
Context envCtx = (Context) 
initCtx.lookup("java:comp/env");
DataSource ds = (DataSource) 
envCtx.lookup("jdbc/akcmoney");
Connection conn = ds.getConnection();
} catch (Exception e1) {
e1.printStackTrace();
}

and with debug, I can see that initCtX, envCtx and ds all are assigned non
null values, but the ds.getConnection() results in the following.

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'

I have the postgresql jdbc driver jar in $CATALINA.BASE/common/lib

Server.xml contains

 
  

 
  factory
  org.apache.commons.dbcp.BasicDataSourceFactory
 
 
  driverClassName
  org.postgresql.Driver
 
 
  url
  jdbc:postgresql://127.0.0.1:5432/akcmoney
 
 
  username
  tomcat4
 
 
 password
  xxx
 
 
  maxActive
  20
 
 
  maxIdle
  10
 
 
  maxWait
  -1
 



 

my WEB-INF/web.xml contains this reference.


AKCMoney Database
jdbc/akcmoney
javax.sql.DataSource
Container
Shareable


Anyone any ideas where I am going wrong, or how to look at the contents of the
nitCtX, envCtx and ds variables in the above code snippet to understand how
far I have got


--
Alan Chandler
http://www.chandlerfamily.org.uk


-
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: Struggling with basic database connection

2006-09-23 Thread Andrew Stepanenko

Hello,

looks like the docs I gave a link to describe the old approach, sorry.
Here is what I have in my context.xml:

##



   
   WEB-INF/web.xml



#

also, the format of  has been changed. Now, all
configuration data should be provided as attributes and not nested
tags.

Regards,
Andrew Stepanenko,
http://unf.tane.edu.ua

On 9/23/06, Alan Chandler <[EMAIL PROTECTED]> wrote:

On Saturday 23 September 2006 09:57, Andrew Stepanenko wrote:
> Hello,
>
> there is a difference between how resources are defined in 5.0 and
> 5.5. In 5.0 you could provide your resource definitions right in the
> server.xml, but in 5.5 you need to create a separate context.xml file
> ($CATALINA_HOME/conf/Catalina//context.xml) and put resource
> definitions there.
> See this link:
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
>
> I also had this problem when migrating from 5.0 to 5.5. After I
> defined a separate context.xml it started to work again.

The docs seem very vague on this issue,  but it does imply that I could still
use $CATALINA_HOME/conf/server.xml

One question that isn't answered in the docs is what the root element should
be - the best seems to be the example for accessing a database, and even
there it puts 

I tried with context.xml in the directory you mentioned and it said it
couldn't find the webapp "context", so I renamed it to my application and
tried again.  But it didn't work.

So still stumped

--
Alan Chandler
http://www.chandlerfamily.org.uk


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





--
Andrew Stepanenko,
Ph.D. student,
Dept. of Information Computing Systems and Control,
Web: http://www.tanet.edu.te.ua/icsc/
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil State Economic University
Shevchenko Street 9, Office 24-25
Ternopil, 46000 UKRAINE
Tel: +38 (0352) 43 52 41
fax: +38 (0352) 43 52 45
Web: http://unf.tane.edu.ua

-
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: threads, performance, and exceptions

2006-10-01 Thread Andrew Miehs
You may want to try turning off keepalives in your tomcat. (I assume  
you are only using tomcat, and not proxying through mod_jk and  
apache/ IIS).


In your connector settings have a look at 'maxKeepAliveRequests="1"'

If you really have that many threads, you will probably be best of  
using Linux, with a 2.6 Kernel due to the way Linux deals with threads.



Regards


Andrew


On 02/10/2006, at 5:16 AM, Peter Warren wrote:



My question is: how can I best improve the performance?  Is the server
really refusing client connections or is the load test bogging down  
and

reporting spurious messages (the load test uses many threads as well)?
Is the high # of threads on the server a problem?  Would running on
Linux or another OS help?  Is there a way for me to minimize the # of
servlet threads required?




-
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: Max Memory Reading

2006-10-13 Thread Andrew Miehs

Nope - the 32Bit JVM can only deal with about 1.5GB Ram

Andrew

On 13/10/2006, at 2:51 PM, Alan Flisch wrote:



I thought you were safe up to 4000m (in practice a little lower)  
for the

32 bit VM.

Regards,
Alan



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



Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager

2005-11-01 Thread andrew cooke

I have a JSP page that includes:
   
   
and when the second line is commented out, the page prints
   class org.acooke.collaborate.data.transport.Name

However, when the second line is present, I get the error shown below. 
The appropriate code in the compiled JSP is:
_jspx_th_data_name_0.setValue(
 (org.acooke.collaborate.data.transport.Name)
   org.apache.jasper.runtime.JspRuntimeLibrary.
   getValueFromPropertyEditorManager(
 org.acooke.collaborate.data.transport.Name.class,
 "value", "${name}"));
which corresponds directly to the line quoted above, and which has the
correct class name.

The class name is also declared for the data:name tag, although as far as
I can see the problem is in the page code rather than the tag:
   <%@ include file="/WEB-INF/jsp/include/headers.jsp" %>
   <%@ tag body-content="empty" %>
   <%@ attribute name="value" required="true"
  type="org.acooke.collaborate.data.transport.Name" %>
   ...

Is this a bug?  I can find nothing in the bug database, but the code
appears OK

Thanks,
Andrew


2005-11-01 23:12:21,356 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/collaborate].[jsp]]
- Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: jsp.error.beans.property.conversion
at
org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)
at
org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp._jspx_meth_data_name_0(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:361)
at
org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:307)
at
org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp.access$9(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:285)
at
org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp$contacts_jspHelper.invoke4(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:768)
at
org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp$contacts_jspHelper.invoke(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:928)


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



Passing values to tags [Was: Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager]

2005-11-01 Thread andrew cooke

More generally, I can't see how to pass a value at all!

If I change my tag to accept a string, then the value it receives if
${name} (literally).  This is true even if rtexprtype is explicitly set to
true.

I can force evaluation by calling

  

but that forces conversion to a String which is what I am trying to avoid...

Please can someone explain what I am missing?

Thanks/sorry,
Andrew

andrew cooke said:
>
> I have a JSP page that includes:
>
>
> and when the second line is commented out, the page prints
>class org.acooke.collaborate.data.transport.Name
>
> However, when the second line is present, I get the error shown below.
> The appropriate code in the compiled JSP is:
> _jspx_th_data_name_0.setValue(
>  (org.acooke.collaborate.data.transport.Name)
>org.apache.jasper.runtime.JspRuntimeLibrary.
>getValueFromPropertyEditorManager(
>  org.acooke.collaborate.data.transport.Name.class,
>  "value", "${name}"));
> which corresponds directly to the line quoted above, and which has the
> correct class name.
>
> The class name is also declared for the data:name tag, although as far as
> I can see the problem is in the page code rather than the tag:
><%@ include file="/WEB-INF/jsp/include/headers.jsp" %>
><%@ tag body-content="empty" %>
><%@ attribute name="value" required="true"
>   type="org.acooke.collaborate.data.transport.Name" %>
>...
>
> Is this a bug?  I can find nothing in the bug database, but the code
> appears OK
>
> Thanks,
> Andrew
>
>
> 2005-11-01 23:12:21,356 ERROR
> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/collaborate].[jsp]]
> - Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: jsp.error.beans.property.conversion
>   at
> org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)
>   at
> org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp._jspx_meth_data_name_0(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:361)
>   at
> org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:307)
>   at
> org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp.access$9(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:285)
>   at
> org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp$contacts_jspHelper.invoke4(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:768)
>   at
> org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp$contacts_jspHelper.invoke(org.apache.jsp.WEB_002dINF.jsp.member.contacts_jsp:928)
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: Passing values to tags [Was: Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager]

2005-11-02 Thread andrew cooke

Thanks!  I don't yet have it (the page I asked about) running, but
changing the web.xml to follow the spec (using the schema rather than the
old 2_3 DTD) has cleared up a whole slew of strange behaviour.  Suddenly
everything works as as it appears in the docs, error messages are helpful,
etc etc...

Cheers,
Andrew


Rahul Akolkar said:
> On 11/1/05, andrew cooke <[EMAIL PROTECTED]> wrote:
>>
>> More generally, I can't see how to pass a value at all!
>>
>> If I change my tag to accept a string, then the value it receives if
>> ${name} (literally).  This is true even if rtexprtype is explicitly set
>> to
>> true.
>>
>> I can force evaluation by calling
>> 
>>  
>> 
>> but that forces conversion to a String which is what I am trying to
>> avoid...
>>
>> Please can someone explain what I am missing?
>>
> 
>
> A Servlet 2.4 web application descriptor, most likely.
>
> -Rahul
>
>
>> Thanks/sorry,
>> Andrew
>>
>> andrew cooke said:
>> >
>> > I have a JSP page that includes:
>> >
>> >
>> > and when the second line is commented out, the page prints
>> >class org.acooke.collaborate.data.transport.Name
>> >
>> > However, when the second line is present, I get the error shown below.
>> > The appropriate code in the compiled JSP is:
>> > _jspx_th_data_name_0.setValue(
>> >  (org.acooke.collaborate.data.transport.Name)
>> >org.apache.jasper.runtime.JspRuntimeLibrary.
>> >getValueFromPropertyEditorManager(
>> >  org.acooke.collaborate.data.transport.Name.class,
>> >  "value", "${name}"));
>> > which corresponds directly to the line quoted above, and which has the
>> > correct class name.
>> >
>> > The class name is also declared for the data:name tag, although as far
>> as
>> > I can see the problem is in the page code rather than the tag:
>> ><%@ include file="/WEB-INF/jsp/include/headers.jsp" %>
>> ><%@ tag body-content="empty" %>
>> ><%@ attribute name="value" required="true"
>> >   type="org.acooke.collaborate.data.transport.Name" %>
>> >...
>> >
>> > Is this a bug?  I can find nothing in the bug database, but the code
>> > appears OK
>> >
>> > Thanks,
>> > Andrew
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


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



Re: suppress tomcat version numbers

2005-11-23 Thread Andrew Miehs

Hi Charles,

This seems to be a new option for TC 5.5. Do you know of anything  
similar for 5.0?


Thanks

Andrew

On Nov 22, 2005, at 4:52 PM, Caldarale, Charles R wrote:


From: Kiarna Boyd [mailto:[EMAIL PROTECTED]
Subject: suppress tomcat version numbers

Hi I'm trying to suppress the version number Tomcat gives in its
headers.


Read the doc on the  tag.  You're looking for the "server"
attribute (the description mentions something about being  
paranoid :-).




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



JasperException: No tag "xhtml" defined in tag library associated with uri "urn:jsptagdir:/WEB-INF/tags

2006-01-09 Thread Andrew Brock
Hi,

 

I am trying to support an existing web site in jspx. I have setup Tomcat
on a Windows server as a test environment before I deploy my changes.
However I cannot open the index page. I get this error and I am not sure
how to fix it http://localhost:8080/viewscast/index.jspx:

 


HTTP Status 500 - 

  _  


type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

org.apache.jasper.JasperException: No tag "xhtml" defined in tag library
associated with uri "urn:jsptagdir:/WEB-INF/tags"
 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)
 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause 

org.apache.jasper.JasperException: No tag "xhtml" defined in tag library
associated with uri "urn:jsptagdir:/WEB-INF/tags"
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:50)

...



 

The following is the code from the index.jspx page:

 

http://java.sun.com/JSP/Page";
xmlns:c="http://java.sun.com/jsp/jstl/core";
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
xmlns:syn="http://www.synovate.com/core";
xmlns="http://www.w3.org/1999/xhtml";>

 

















 





























 
 





 


 


 


   



 
More news »

























 





 

I have tried downloading the xtags and adding them to the WEB_INF folder
in the ROOT directory but this has not helped. Any assistance would be
greatly appreciated.

 

Many thanks

 

Andrew 

 

 



Multiple HTTP GET from MS Word/Excel hyperlink

2006-01-26 Thread Andrew Chapman
Whilst investigating a strange bug some of our customers were experiencing
using links in Excel to our web application I discovered that the root of it
was this strange behaviour in Excel.

After monitoring the http requests I discovered that clicking a hyperlink in
Excel creates the following multiple HTTP GET requests:

--

GET /test.jsp HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: localhost:8088
Connection: Keep-Alive
Cookie: JSESSIONID=04E1A0B6BD7532F746F2BFCAE167422F

GET /test.jsp HTTP/1.1
Accept: */*
Accept-Language: en-gb
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: localhost:8088
Connection: Keep-Alive 

--

Notice the lack of JSESSIONID on the second request, this basically results
in a new session being created and the previous session (and data) being
lost.
 
I have searched in vain for any information on this. Have any of you
knowledgable web veterans seen this before or do you know of any fix,
workaround or Tomcat related fix?

Thanks in advance

Andy Chapman




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



New to apache / Tomcat

2006-02-15 Thread Andrew English


I work for a company that had to recently let go its IT/Dev staff
because of issues.

This company runs Tomcat 4.03 on Windows 2003 Server with Catalina, and
has Apache running on a Linux machine. Being use to IIS and not really
having a lot of experience with Tomcat I had hit a few road blocks and
require help.

The companies network is structured so that HTTP requests for their web
site come into the Linux box and then are redirected to the Windows 2003
Server running Tomcat on port 8082.

My problem is I have not been able to figure out how or where the
configuration is for this Tomcat server because on the Linux box for
instance the redirection points to
http://192.168.1.10:8082/ssapp/asn.html

As for the Windows Tomcat server it looks something like
c:\asnweb\jboss_tomcat\jboss\catalina\ssar.e\ssapp (as example), and
when you look for the asn.html file on the windows machine you find it
in totally separate folder than the ssapp folder. 

If I http://localhost/ on the tomcat box its takes me the web site of
the company (notice I didn't add the 8082). However not everything works
partly because the Linux box also flips the HTTP connection into a HTTPS
connection, the apache or linux box contains the certs too.

So what I am looking for the actual config for tomcat so I can create a
document of were things are, were they are going etc.. Also we are
thinking of replacing the crappy WatchGuard firewall they have with ISA
server; so we need to find out lots of info...

Thanks
Andrew


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



RE: New to apache / Tomcat

2006-02-15 Thread Andrew English
Hi Chuck, 

Could it be they are running both?

Their folder structure is:

ASNWeb\JbossTomcat\catalina
ASNWeb\JbossTomcat\jboss

I know that catalina runs under Windows Services along with 3 other
services related to it, and I know from looking in the catalina folder
and reading the readme.txt file that it's a Tomcat Server product. 

I looked through all the jboss folders and found nothing related to
catalina just the files which make up the web site itself. 

Andrew
 

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 15, 2006 6:48 PM
To: Tomcat Users List
Subject: RE: New to apache / Tomcat

> From: Andrew English [mailto:[EMAIL PROTECTED] 
> Subject: New to apache / Tomcat
> 
> As for the Windows Tomcat server it looks something like
> c:\asnweb\jboss_tomcat\jboss\catalina\ssar.e\ssapp (as example), and
> when you look for the asn.html file on the windows machine you find it
> in totally separate folder than the ssapp folder. 

Judging from the directory names, I suspect you're really running JBoss,
not Tomcat.  Tomcat is embedded in JBoss, but in such a scenario, all
configuration is through JBoss, not Tomcat.

 - Chuck


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

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


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



RE: New to apache / Tomcat

2006-02-16 Thread Andrew English


Does Jboss have Catalina as a component to it, or is Catalina a apache
component only?

Andrew


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 15, 2006 10:58 PM
To: Tomcat Users List
Subject: RE: New to apache / Tomcat

> From: Andrew English [mailto:[EMAIL PROTECTED] 
> Subject: RE: New to apache / Tomcat
> 
> Could it be they are running both?

Certainly could be, but I would have to wonder why...

> I looked through all the jboss folders and found nothing related to
> catalina just the files which make up the web site itself. 

I suppose it could be just left-over naming from some ambitious full
J2EE project that ended up needing only Servlet/JSP capabilities.

What are the dates on some of the files?  Tomcat 4.0.3 came out in the
spring of 2002, whereas JBoss 4.0.3 is fairly recent (mid-year 2005, SP1
in the fall).

You might try downloading whichever one corresponds to the dates you
find, and comparing the directory structure of that with what you've got
in hand.  The Tomcat 4.0.3 archive is here:
http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/

 - Chuck


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

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


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



Java Question

2006-02-22 Thread Andrew English

Does anyone know of a mailing list were I can ask some java related
questions?

The number one question I have is if it's possible to write code within
Java that changes all your HTML files back to their original default? 

A client of mine runs, dare I say it here JBoss 2.4 and I found two
copies of JBoss running, one on their production server, the other on a
Test server. Anyhow I had to go and make changes to the HTML files
within the JBoss, removed the previous CTO's name, fixed spelling
errors, removed some dates, etc. 

Anyhow initially without taking the Test server into account when I made
changes to the HTML files, at around 12:38AM the files are modified back
to their original state. So I searched all the servers HIGH and LOW for
these files and only came across the Test server having them too.. So I
put the modified copies on the Test server and the production server
yesterday, now they are back to the original copies again.. BIGH SIGH

I have looked through all the scheduled tasks and not found anything, my
thought is it could be embedded somewhere in the Jave?? 

Andrew

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



RE: Java Question

2006-02-22 Thread Andrew English
I have looked for the filenames.* on all the servers including the linux
ones and not come up with anything except for what's on the two servers.
I have not had a chance to check all the jar files, are ear files like
jar files if so what's a good tool for opening both Jar and Ear files?

Thanks
Andrew


-Original Message-
From: Robert Harper [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 10:10 AM
To: 'Tomcat Users List'
Subject: RE: Java Question

Are the pages static or is there some process, servlet, script, or
something
else that creates these? There could also be another system somewhere
that
is allowed access to the areas that hold the HTML files and is creating
them
in some nightly process.

I don't know that this is a Java question. Almost anything is possible
as
long as the access rights and permissions are set.

Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: Andrew English [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 8:12 AM
To: Tomcat Users List
Subject: Java Question


Does anyone know of a mailing list were I can ask some java related
questions?

The number one question I have is if it's possible to write code within
Java that changes all your HTML files back to their original default? 

A client of mine runs, dare I say it here JBoss 2.4 and I found two
copies of JBoss running, one on their production server, the other on a
Test server. Anyhow I had to go and make changes to the HTML files
within the JBoss, removed the previous CTO's name, fixed spelling
errors, removed some dates, etc. 

Anyhow initially without taking the Test server into account when I made
changes to the HTML files, at around 12:38AM the files are modified back
to their original state. So I searched all the servers HIGH and LOW for
these files and only came across the Test server having them too.. So I
put the modified copies on the Test server and the production server
yesterday, now they are back to the original copies again.. BIGH SIGH

I have looked through all the scheduled tasks and not found anything, my
thought is it could be embedded somewhere in the Jave?? 

Andrew

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





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


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



RE: Java Question

2006-02-22 Thread Andrew English
Is there anyway to check this theory?

Andrew

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 11:22 AM
To: Tomcat Users List
Subject: RE: Java Question

> From: Andrew English [mailto:[EMAIL PROTECTED] 
> I have looked for the filenames.* on all the servers 
> including the linux
> ones and not come up with anything except for what's on the 
> two servers.

I suspect an operations issue.  Has someone configured a revision
control system (such as CVS or Subversion) on the production server,
such that it does nightly checkouts of the 'known good' content, to
assist in staging content from the development to the production server?

- Peter

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


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



RE: Java Question

2006-02-22 Thread Andrew English
Thanks for the info. 

However I want to reinstate one point I made earlier or didn't make
clearly. On the test box I copied over all the changed HTML files to it,
and did the same to the production server thinking the Test server must
have been copying all the files over to the production box. 

This morning both the test and production box were covered back to the
original html files. 

I am looking at using Sysinternals FileMon to see if I can pin point the
actual process that is copying the original files back. But one thing
for sure it I plan to take the TEST box down. 

They also run into another problem which is database related and I am
willing to be it has to do with the Test box multicasting. Sometimes
when they post their items in the database the items disappear
themselves completely after a couple of minutes! :(

Andrew

-Original Message-
From: Sethuraman, Prabhu (Cognizant)
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 5:18 PM
To: Tomcat Users List
Subject: RE: Java Question


Andrew,

You will be surprised but here is what it is:

JBoss is actually sending the calls made to your production server to
the test server. This is because of the failover mechanism that is
available within JBoss. Your testserver must be in multicast mode. Try
dropping the test server off multicase mode and you might not get to see
the CEOs picture itself :)

No kidding.

We did have the same issue, where a critical transaction in a Production
system was trying to get data from an EJB which was running in a test
system.

Prabhu S


-Original Message-
From: Andrew English [mailto:[EMAIL PROTECTED]

Sent: Wednesday, February 22, 2006 9:12 AM
To: Tomcat Users List
Subject: Java Question


Does anyone know of a mailing list were I can ask some java related
questions?

The number one question I have is if it's possible to write code within
Java that changes all your HTML files back to their original default?


A client of mine runs, dare I say it here JBoss 2.4 and I found two
copies of JBoss running, one on their production server, the other on a
Test server. Anyhow I had to go and make changes to the HTML files
within the JBoss, removed the previous CTO's name, fixed spelling
errors, removed some dates, etc.


Anyhow initially without taking the Test server into account when I made
changes to the HTML files, at around 12:38AM the files are modified back
to their original state. So I searched all the servers HIGH and LOW for
these files and only came across the Test server having them too.. So I
put the modified copies on the Test server and the production server
yesterday, now they are back to the original copies again.. BIGH SIGH

I have looked through all the scheduled tasks and not found anything, my
thought is it could be embedded somewhere in the Jave??


Andrew

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly

prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

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


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



RE: Java Question

2006-02-22 Thread Andrew English
Hi Doug, 

JBoss 2.4 uses Tomcat 4.0x if I recall. Regarding the archive is there
something similar to how Tomcat does this that I can look for and
possibly find under JBoss?

I have already talked to JBoss who has informed me that 2.4 has been
long since discontinued, they have 4.03 now, and 3.24 is the oldest
version they have information on. :(

Thanks
Andrew


-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]

Sent: Wednesday, February 22, 2006 9:15 PM
To: Tomcat Users List
Subject: Re: Java Question

Okay. Now for a few of my hair brain ideas. Every once in a while I get 
lucky and actually suggest something that works.

As for the files returning to the original state:

I am totally ignorant on JBoss. If there is an archive of any type
present 
my guess is that either the app is running from archive and thus checks
it 
for changes. Since the files do not match the app is redeployed from the

archive.

Or:

The app is exploded from the archive and the system redeploys the app on
a 
regular basis.

Either way you will need to make your changes inside of the archive and 
either redeploy it or allow it to redeploy.

Changing the source outside of the archive is not a good idea.

For the database issue, look into the code for transactions. It sounds
like 
there is a transaction failure that is causing a rollback and thus the 
removal of the data. Other than an explicit deletion of data(code
written to 
do it), it is about the only way data is going to be removed.

Doug


- Original Message - 
From: "Andrew English" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, February 22, 2006 5:47 PM
Subject: RE: Java Question


Thanks for the info.

However I want to reinstate one point I made earlier or didn't make
clearly. On the test box I copied over all the changed HTML files to it,
and did the same to the production server thinking the Test server must
have been copying all the files over to the production box.

This morning both the test and production box were covered back to the
original html files.

I am looking at using Sysinternals FileMon to see if I can pin point the
actual process that is copying the original files back. But one thing
for sure it I plan to take the TEST box down.

They also run into another problem which is database related and I am
willing to be it has to do with the Test box multicasting. Sometimes
when they post their items in the database the items disappear
themselves completely after a couple of minutes! :(

Andrew

-Original Message-
From: Sethuraman, Prabhu (Cognizant)
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 5:18 PM
To: Tomcat Users List
Subject: RE: Java Question


Andrew,

You will be surprised but here is what it is:

JBoss is actually sending the calls made to your production server to
the test server. This is because of the failover mechanism that is
available within JBoss. Your testserver must be in multicast mode. Try
dropping the test server off multicase mode and you might not get to see
the CEOs picture itself :)

No kidding.

We did have the same issue, where a critical transaction in a Production
system was trying to get data from an EJB which was running in a test
system.

Prabhu S


-----Original Message-
From: Andrew English [mailto:[EMAIL PROTECTED]

Sent: Wednesday, February 22, 2006 9:12 AM
To: Tomcat Users List
Subject: Java Question


Does anyone know of a mailing list were I can ask some java related
questions?

The number one question I have is if it's possible to write code within
Java that changes all your HTML files back to their original default?


A client of mine runs, dare I say it here JBoss 2.4 and I found two
copies of JBoss running, one on their production server, the other on a
Test server. Anyhow I had to go and make changes to the HTML files
within the JBoss, removed the previous CTO's name, fixed spelling
errors, removed some dates, etc.


Anyhow initially without taking the Test server into account when I made
changes to the HTML files, at around 12:38AM the files are modified back
to their original state. So I searched all the servers HIGH and LOW for
these files and only came across the Test server having them too.. So I
put the modified copies on the Test server and the production server
yesterday, now they are back to the original copies again.. BIGH SIGH

I have looked through all the scheduled tasks and not found anything, my
thought is it could be embedded somewhere in the Jave??


Andrew

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance o

Question

2006-03-01 Thread Andrew English
Were do I need to look to figure out what SQL server tomcat/jboss 2.4 is 
pointing at? 
 
I am trying to figure out what table and server this old POS is looking at when 
I am looking at the inactive users list which is a .jsp page. 
 
Thanks!
 
Regards,
Andrew
 

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

javaservice.exe

2006-03-01 Thread Andrew English
Is there anyway to force close the javaservice.exe on windows? When I tried to 
do it under Taskmanager (as Administrator) it tells me "could not be 
completed.. access denied".
 
Regards,
Andrew

 

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

Programmatic access to error 500 stack trace

2006-03-13 Thread Andrew Stepanenko

Hello,

In our web app I as a developer want to know when the error 500 occurred 
(either because of OutOfMemory or whatever). So, I defined a custom 
error page in my web.xml and put there email sending logic. It is easy 
for me to get the error code, but can I access the actual exception 
stack trace so that I may embed it into my email message?


Thank you,
Andrew Stepanenko.

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



Re: Programmatic access to error 500 stack trace

2006-03-15 Thread Andrew Stepanenko

Hello Eduard,

thank you for your answer. But I actually asked about run-time 
exceptions, like OutOfMemoryError. Do you think this approach will go 
for them too?


Andrew.

Eduard Wirch wrote:

Use this:

} catch (Exception e) {
java.io.StringWriter stackTrace = new java.io.StringWriter();
e.printStackTrace(new java.io.PrintWriter(stackTrace));
request.setAttribute("error", stackTrace.toString());
} 


-Ursprüngliche Nachricht-
Von: Andrew Stepanenko [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 14. März 2006 08:33

An: users@tomcat.apache.org
Betreff: Programmatic access to error 500 stack trace

Hello,

In our web app I as a developer want to know when the error 500 occurred 
(either because of OutOfMemory or whatever). So, I defined a custom 
error page in my web.xml and put there email sending logic. It is easy 
for me to get the error code, but can I access the actual exception 
stack trace so that I may embed it into my email message?


Thank you,
Andrew Stepanenko.

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


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




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



noverify option for Tomcat 5 Service

2006-04-05 Thread Andrew Flanagan

Hello

I need to use the -noverify option for Tomcat running as a service. I am
able to add this option when I run it by launching the startup.bat script
and this works properly, as shown below:

set JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
-noverify

I have tried in vain to make the service (tomcatw.exe) work in this way. I
tried:

tomcat5/exe //US//tomcat5 ++JvmOptions -noverify

but it did not work. I also tried typing the -noverify option in the "Java"
tab on the Tomcat service console window but this did not work either. (I
was restarting the service, and sometimes rebooting the PC after the
changes). I have even tried amending the registry keys without joy.

Do I need to re-install the service after an installation of Tomcat itself?
Are there Windows permissions (admin rights) issues to deal with also?

Any help is appreciated.

Thanks.
--
View this message in context: 
http://www.nabble.com/noverify-option-for-Tomcat-5-Service-t1398686.html#a3761924
Sent from the Tomcat - User forum at Nabble.com.


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



Embedded Tomcat stops deploying WARs when using custom ClassLoader

2006-04-13 Thread Andrew McDowall
Hi,

I am currently working on a fairly complex system which provides a means
to incorporate 'pluggable' functionality using an embedded Tomcat -
essentially it allows WARs to be dropped into a specific directory, the
embedded Tomcat then unpacks and deploys the WAR.

This has been working without any problems up until a few days ago when
I started incorporating our own proprietary ClassLoader into the system.
The rationale behind the ClassLoader is that I need to provide a degree
of separation between certain sub-components of the system while still
providing common shared libraries for all components - much like the
ClassLoading solution provided by Catalina.  My own ClassLoader now
allows me to navigate a tree of child ClassLoaders in an order different
to that of the standard Java delegation model ie: in my solution I wish
to perform a depth-first search rather than simply being limited to one
branch. 

The solution implemented is working (give or take a few minor flaws)
except for now the embedded Tomcat no longer deploys WARs.  At first I
believed this to be an issue with the ContextClassLoader for the Thread
in which the embedded Tomcat runs, but after investigation I am not so
sure.  It should be noted that the embedded Tomcat itself does not
produce any errors so I am at a loss to understand exactly why it has
stopped working, it's as if it is failing silently.  None of the
configuration for Tomcat has changed between the versions using the
System ClassLoader and the new version using the new custom ClassLoader.

I would be very grateful for any help with this problem, thanks in
advance.

 

Andy McDowall



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

RE: Embedded Tomcat stops deploying WARs when using custom ClassLoader

2006-04-14 Thread Andrew McDowall
It would appear that my problem was solved by simply changing the line
'new Catalina();' to 'new Embedded();', so now it unpacks.

-Original Message-
From: Andrew McDowall [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2006 16:56
To: users@tomcat.apache.org
Subject: Embedded Tomcat stops deploying WARs when using custom
ClassLoader

Hi,

I am currently working on a fairly complex system which provides a means
to incorporate 'pluggable' functionality using an embedded Tomcat -
essentially it allows WARs to be dropped into a specific directory, the
embedded Tomcat then unpacks and deploys the WAR.

This has been working without any problems up until a few days ago when
I started incorporating our own proprietary ClassLoader into the system.
The rationale behind the ClassLoader is that I need to provide a degree
of separation between certain sub-components of the system while still
providing common shared libraries for all components - much like the
ClassLoading solution provided by Catalina.  My own ClassLoader now
allows me to navigate a tree of child ClassLoaders in an order different
to that of the standard Java delegation model ie: in my solution I wish
to perform a depth-first search rather than simply being limited to one
branch. 

The solution implemented is working (give or take a few minor flaws)
except for now the embedded Tomcat no longer deploys WARs.  At first I
believed this to be an issue with the ContextClassLoader for the Thread
in which the embedded Tomcat runs, but after investigation I am not so
sure.  It should be noted that the embedded Tomcat itself does not
produce any errors so I am at a loss to understand exactly why it has
stopped working, it's as if it is failing silently.  None of the
configuration for Tomcat has changed between the versions using the
System ClassLoader and the new version using the new custom ClassLoader.

I would be very grateful for any help with this problem, thanks in
advance.

 

Andy McDowall



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina
Software, this communication is to be treated as confidential and the
information in it may not be used or disclosed except for the purpose
for which it has been sent. If you have reason to believe that you are
not the intended recipient of this communication, please contact the
sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



WebappClassLoader delegates to SystemClassLoader, not CustomClassLoader

2006-04-14 Thread Andrew McDowall
Hi,

I'm running into ClassLoader problems when using a custom ClassLoader
with an embedded Tomcat.  The problem, as I understand it, is arising
due to multiple versions of log4j being loaded by different ClassLoaders
resulting in ClassCastExceptions or expected interfaces not being
implemented.

In my main application's libraries I have log4j.jar - this is loaded by
a URLClassLoader, while in my WebApp's libraries I have a different
log4j.jar which is loaded by Tomcat's WebAppClassLoader.  Within my main
application I have an embedded Tomcat which is also loaded using the
URLClassLoader, thus Tomcat expects to use log4j classes that are bound
to the URLClassLoader, unfortunately the WebAppClassLoader does not
appear to be searching the URLClassLoader and instead loads log4j from
its own libraries.

As far as I can tell, the search order for the WebAppClassLoader never
actually delegates up beyond the Common-classLoader, instead it skips
straight to the SystemClassLoader avoiding my URLClassLoader.  I should
add that I have successfully implemented a 'hack' to my system which
uses the SystemClassLoader and have not encountered the same problems -
since when the WebAppClassLoader interrogates the SystemClassLoader the
expected version of log4j would be loaded.

Does anybody know of a way to get round this?  I'd assume that setting
my URLClassLoader to be the parent of the Common-ClassLoader would work
but I can't seem to find any documentation on how to achieve this.
Failing that is there a way to specify that Tomcat uses a subclass of
WebAppClassLoader (which I could write)?

 

Thanks in advance.

Andy McDowall.



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

j-_security_check session problem with load balancer

2006-04-24 Thread Andrew Arrow

Hello,

We are using tomcat 5.5.16 with a Redline Networks Enterprise
Application Processor load balancer between two machines.  The balancer
is session sticky.  Every so often we get a problem with users not being
able to log in.  (We are using JDBC Realm form authentication.)  The
error the users sees is the URL .../j_security_check and a standard
browser cannot connect error.  It seems Tomcat needs the user to hit the
same machine for the security check as it did for the 1st connect.  i.e.
I can simulate the problem by going to my apps login screen,
stop/starting the webapp via the manager in another browser window, and
trying to now login back in the first browser window.  I get the same
/j_security_check error.  Questions:

1. Why doesn't tomcat just send me back to the login screen if the
session is invalid?

2. Any idea why the load balancer would sometimes show this same
behavior?

Thanks.

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



Tomcat + IIS + SSL

2006-04-25 Thread Andrew Bubnic
Hi,

 

We are currently running tomcat on port 8080 and IIS 6 on port 80, and
depending on what directory the user selects, e.g
http://www.blah.com/redirectToTomcat

 

The request gets forwarded to the appropriate tomcat webapp on port
8080. We are using the Jakarta Isapi Redirector isapi_redirect.dll to do
this. This has worked fine for months.

 

The second I uncomment this section in tomcat's server.xml:

 





IIS redirection hangs. Accessing tomcat webapp using :8080 still works,
but IIS does not forward to it any longer. I also tried changing the
connector port from 8443 to 9443 but same problem. 

 

To be honest, I'm not sure if I should use an SSL certificate for IIS
and somehow have it take care of security, or to simply add it to the
8443 connector in Tomcat. (that's a less important story)

 

What I really need to know is how to make them work together using
https, with the minimum being IIS redirecting say https://./blahblah
to tomcat https://.:8443/blahblah. I've tried this and get the
hanging problem as described above. I've gotten tomcat to work fine with
SSL on my development machine (which does not have IIS redirection at
all) but not on our server which does use IIS.

 

Unfortunately I haven't been able to find anything very useful on this
on Google/forums etc and have minimum time frames to play around testing
different options on the server.

 

I'd appreciate any help/ideas. Thanks.

 

 



How to access WebService implementation from Context?

2006-05-01 Thread Andrew McDowall
Hi,

I have a WebService that implements a specific interface (Registerable),
and a Valve who's actions depend upon whether the WebService dealing
with a given request implements this Registerable interface.  What I
need to be able to do, in the invoke method of the Valve, is somehow
say:

if(Request.getContext() ... instanceof Registerable)
{
   // Do some Registration stuff
}

Is there anyway to do this sort of operation?  I tried searching through
Javadocs, Source-Code, and mailing lists but could not find any answers.
Thanks in advance.

 

Andy McDowall. 



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

Applet sharing utility class with Servlet

2006-05-01 Thread Andrew Bubnic
Hi guys, hoping someone has an answer to this:

 

I have a servlet and an applet running in the same webapp. The servlet
needs to access a class the applet .jar contains. The applet is visible
to the browser.

 

Problem is: I need to access this applet utility class (or it could be
any class really, outside the WEB-INF folder but inside the current
webapp) from the servlet. I don't want to actually access the running
applet on the user's end, just the .class on the server webapp (so I can
instantiate it etc). I also don't want to have to keep a copy of this
utility class with the servlet class as a work-around as it's rather
inelegant.

 

I have heard you can modify web.xml in the webapp\WEB-INF folder to
allow access to any .class/.jar in the current webapp but I haven't been
able to find how to do this.

 

If you have any ideas or leads about this problem, please let us know.
Thanks guys.

 

 



RE: Applet sharing utility class with Servlet

2006-05-01 Thread Andrew Bubnic
Thanks for the quick reply. Looks like I'm keeping two copies.. serves
me right for making my own storage objects for niceness.

-Original Message-
From: Jess Holle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 02 May 2006 12:06 PM
To: Tomcat Users List
Subject: Re: Applet sharing utility class with Servlet

This is a "feature" of the servlet spec.

To use a class from both client and server you're forced to have 
multiple copies of it in your web app -- or alternatively to do 
non-standard adjustments to the web app loader / classpath.

If you don't have too many of these copy cases, I advise just having 
your build process produce the necessary copies.

Unfortunately, some of us have *lots* of these cases.  The lack of a 
"common" area which is accessible to client and server classloaders is a

very unfortunate gap in the servlet spec in this case.

Andrew Bubnic wrote:
> Hi guys, hoping someone has an answer to this:
>
> I have a servlet and an applet running in the same webapp. The servlet
> needs to access a class the applet .jar contains. The applet is
visible
> to the browser.
>
> Problem is: I need to access this applet utility class (or it could be
> any class really, outside the WEB-INF folder but inside the current
> webapp) from the servlet. I don't want to actually access the running
> applet on the user's end, just the .class on the server webapp (so I
can
> instantiate it etc). I also don't want to have to keep a copy of this
> utility class with the servlet class as a work-around as it's rather
> inelegant.
>
> I have heard you can modify web.xml in the webapp\WEB-INF folder to
> allow access to any .class/.jar in the current webapp but I haven't
been
> able to find how to do this.
>
> If you have any ideas or leads about this problem, please let us know.
> Thanks guys.
>   

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


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



RE: Applet sharing utility class with Servlet - Solution..

2006-05-02 Thread Andrew Bubnic
I didn't even realise that the JDBC drivers I was using in the servlet
(previously applet) resided in the main and visible webapps folder in
the Applet code base - in the code base, but not jar'd with the applet. 

A simple Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver")
from the servlet, was able to retrieve the class from the applet
codebase area.

There you go. Too bad I've already modified my design.


-Original Message-
From: Andrew Bubnic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 02 May 2006 01:48 PM
To: Tomcat Users List
Subject: RE: Applet sharing utility class with Servlet

Thanks for the quick reply. Looks like I'm keeping two copies.. serves
me right for making my own storage objects for niceness.

-Original Message-
From: Jess Holle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 02 May 2006 12:06 PM
To: Tomcat Users List
Subject: Re: Applet sharing utility class with Servlet

This is a "feature" of the servlet spec.

To use a class from both client and server you're forced to have 
multiple copies of it in your web app -- or alternatively to do 
non-standard adjustments to the web app loader / classpath.

If you don't have too many of these copy cases, I advise just having 
your build process produce the necessary copies.

Unfortunately, some of us have *lots* of these cases.  The lack of a 
"common" area which is accessible to client and server classloaders is a

very unfortunate gap in the servlet spec in this case.

Andrew Bubnic wrote:
> Hi guys, hoping someone has an answer to this:
>
> I have a servlet and an applet running in the same webapp. The servlet
> needs to access a class the applet .jar contains. The applet is
visible
> to the browser.
>
> Problem is: I need to access this applet utility class (or it could be
> any class really, outside the WEB-INF folder but inside the current
> webapp) from the servlet. I don't want to actually access the running
> applet on the user's end, just the .class on the server webapp (so I
can
> instantiate it etc). I also don't want to have to keep a copy of this
> utility class with the servlet class as a work-around as it's rather
> inelegant.
>
> I have heard you can modify web.xml in the webapp\WEB-INF folder to
> allow access to any .class/.jar in the current webapp but I haven't
been
> able to find how to do this.
>
> If you have any ideas or leads about this problem, please let us know.
> Thanks guys.
>   

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


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


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



Using Tomcat as a reverse proxy

2006-05-03 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear List,

I have an application where I need to use tomcat as a reverse proxy  
for certain URLs.


Yes - I know normally it is the other way around, but not in this case.

Is there a reverse proxy solution already out there for tomcat? or do  
I need to

implement it myself.

Thanks for any information,


Regards

Andrew
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEWMdhW126qUNSzvURArvNAJ90h/oSx49rACCR++vFXGTn3CtmqQCfQ3VO
np0UJk4by7kDUHu7bsLPE6Q=
=ffpd
-END PGP SIGNATURE-

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



Re: Using Tomcat as a reverse proxy

2006-05-03 Thread Andrew Miehs

Dear Chris,

I am well aware of this - which is why I said it is NORMALLY the  
other way around.
In our case though, our static content - images, etc are handled by  
stand alone
image servers - ie: image.mydomain.com and our dynamic content comes  
from www.mydomain.com.


I have the issue that I have a few things hosted externally from my  
servers that need to
be reachable under www.mydomain.com/mypath . These make about 0.1% of  
my total requests to
www.mydomain.com - and therefore makes very little sense to include  
the latency of Apache

or Squid as a reverse proxy in front of the tomcats...

Thats why my question - Does anyone know of a reverse proxy that I  
can install in tomcat.


Thanks

Andrew

On 03/05/2006, at 5:19 PM, Chris Berthold wrote:


The Apache web server already has this functionality built in using
mod_proxy.  I would think Tomcat would not be well suited for doing  
this
sort of task. Apache is going to be much more I/O efficient and has  
been

tested and debugged for a VERY long time.



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



Re: Using Tomcat as a reverse proxy

2006-05-03 Thread Andrew Miehs

Thanks Tim,
Thanks Peter,

I have been looking all day, and only found entries for how to use  
mod_proxy

to connect to tomcat - rather than the other way around!

Will definitely have a look at these!

Thanks again,

Andrew

PS: Have you ever compared running (mod_proxy|mod_jk)+apache+tomcat  
versus
just running tomcat?! We doubled our requests per second by throwing  
away

Apache. The HTTP connector in Tomcat 5.0/ 5.5 is actually REALLY usable.

(And besides - I use lighttpd and not Apache) :-)



On 03/05/2006, at 5:48 PM, Peter Rossbach wrote:


Look here:

PippoProxy
http://www.javaworld.com/javaworld/jw-02-2005/jw-0228-pippo_p.html

Last year at google summer camp

http://j2ep.sourceforge.net/

But Apache mod_proxy has very much good perfomance and configure  
options :-)


Regards
Peter


Am 03.05.2006 um 17:08 schrieb Andrew Miehs:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear List,

I have an application where I need to use tomcat as a reverse  
proxy for certain URLs.


Yes - I know normally it is the other way around, but not in this  
case.


Is there a reverse proxy solution already out there for tomcat? or  
do I need to

implement it myself.

Thanks for any information,


Regards

Andrew
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEWMdhW126qUNSzvURArvNAJ90h/oSx49rACCR++vFXGTn3CtmqQCfQ3VO
np0UJk4by7kDUHu7bsLPE6Q=
=ffpd
-END PGP SIGNATURE-

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





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




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



Re: Allow web access to /WEB-INF?

2006-05-04 Thread Andrew Miehs

Do you have an Apache up front as a reverse proxy?

If so, you could make a separate mapping there...

Andrew


On 03/05/2006, at 6:12 PM, Dong, Roland wrote:



Is there a way to have web access to /WEB-INF? I want to have this
capability to access a directory under /WEB-INF by URL. Is there a way
to configure that?

I understand the secruity concern on this, but it is an internal
application and we want to use WebDav to access that directory.

Thanks

Richard

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




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



Re: Tomcat on a Memory Stick

2006-05-26 Thread Andrew Miehs

I am not sure I understand the problem?

Are you running on Windoz or a UNIX(tm) based system?

Why do you not define JAVA_HOME and CATALINA_HOME in the startup  
scripts?
How do they start TOMCAT in your scenario - why don't you just do a  
'pwd'

and base the other variables relative to that?

I would also put JAVA on your stick - so that you know where
your JRE is.

Andrew

PS: Be careful with sticks - they have have a limited number of write  
cycles per
block before the block dies. ext2 has been reported to kill them  
quite quickly

(especially the ones that don't move blocks around)...







On 26/05/2006, at 11:07 AM, Markus-Alexander Metz wrote:


Hi David

Thank you very much for your feedback :-) ... I have no problems when
running tomcat on my memory stick ... the problem is another one. For
getting running tomcat you have define CATALINA_HOME and JAVA_HOME.  
This
values have to be defined on every pc, on which I wanna run tomcat.  
So the

app server isn't portable anymore.

It would be nice, if tomcat would read this values for example from  
a config
file so that tomcat became portable. And I'm looking for a  
solution, which

would solve this problem, so that tomcat is portable an I could use my
flavour development environment at home, as well as in my job

Perhaps you see a solution for my problem. Thanks for all

Markus



-
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 on a Memory Stick

2006-05-26 Thread Andrew Miehs
The issue is, he doesn't know which drive letter he is being assigned  
in windows


the start.sh script would need to call

DIRECTORY = `cd`
and then base JAVA_HOME on this

but don't ask me how to do this in deMeSDOS....

Andrew

On 26/05/2006, at 1:15 PM, Harshal Joshi wrote:


Hi,

I am sending sample command which u can write in bat file...

cd\
set JAVA_HOME = C:\jdk142_04;

set CATALINA_HOME = C:\Tomcat 5_0_28;

just write appropriate path of your Java & Tomcat in above  
code...now save

above file with ext. of bat & run it...

I hope this is what you want & will help you to solve your problem.  
Best of

Luck...

Cheers,

Harshal Joshi




-Original Message-
From: Markus-Alexander Metz [mailto:[EMAIL PROTECTED]
Sent: Friday, May 26, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: Tomcat on a Memory Stick



Hi Andrew

Thanks for your feedback. I'm running the stick under windows based
systems..
Java (jre and SDK) is also installed on the stick. You wrote:

Why do you not define JAVA_HOME and CATALINA_HOME in the startup  
scripts?


This would be the solutions I was seeking. But how does this script  
has to

look like? I guess I have to write a .bat file and set the environment
variables inside. And start this .bat File by the autorun.inf.

But how has this script looks like to set the environment  
variables? Does
someone has any idea, cause I'm not very familiar in writing such  
scripts?


Thanks for your help

Markus


2006/5/26, Andrew Miehs <[EMAIL PROTECTED]>:


I am not sure I understand the problem?

Are you running on Windoz or a UNIX(tm) based system?

Why do you not define JAVA_HOME and CATALINA_HOME in the startup
scripts?
How do they start TOMCAT in your scenario - why don't you just do a
'pwd'
and base the other variables relative to that?

I would also put JAVA on your stick - so that you know where
your JRE is.

Andrew

PS: Be careful with sticks - they have have a limited number of write
cycles per
block before the block dies. ext2 has been reported to kill them
quite quickly
(especially the ones that don't move blocks around)...







On 26/05/2006, at 11:07 AM, Markus-Alexander Metz wrote:


Hi David

Thank you very much for your feedback :-) ... I have no problems  
when
running tomcat on my memory stick ... the problem is another one.  
For

getting running tomcat you have define CATALINA_HOME and JAVA_HOME.
This
values have to be defined on every pc, on which I wanna run tomcat.
So the
app server isn't portable anymore.

It would be nice, if tomcat would read this values for example from
a config
file so that tomcat became portable. And I'm looking for a
solution, which
would solve this problem, so that tomcat is portable an I could  
use my

flavour development environment at home, as well as in my job

Perhaps you see a solution for my problem. Thanks for all

Markus



-
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: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I missed the start of this thread...

- - And the whole path is readable?

ie:
ls -l /
ls -l /nextdir
ls -l /nextdir/nextdir ?

Andrew

On 31/05/2006, at 10:38 AM, ks.foong wrote:


No problems. Hoping maybe others can give a hand on this...:-)


Foong Kim Seong


-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 4:31 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
The setclasspath.sh consist of this information, after I have  
issued ls -l


-rwxr-xr-x for that file.

So, it's reading and able to excute.

Further more, I am issusing that command as root, and that file is  
owned

by

root.


Then I'm out of ideas, sorry.

Regards
  mks

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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEfVpOW126qUNSzvURAmx+AKCFNsDPfR2m7cpg4J1qucFZ8zzpAgCfZzBF
NffMYiZfhXeSr30Wamhy868=
=keNv
-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]



Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

2006-05-31 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


echo $JAVA_HOME

what does this return?

cd /Project/Tomcat
./bin/startup.sh


But no idea what is installed where on FreeBSD

Why don't you just pull the package from Apache directly?
Especially if you are not installing in the FreeBSD paths?


Andrew




On 31/05/2006, at 11:05 AM, ks.foong wrote:

Guys, I am installing the Tomcat in FreeBSD. And I am using this  
command,


/usr/ports/www/Jakarta-tomcat5.0/make all install clean

I am wondering is anyone familiar with FreeBSD and maybe I can  
instruct the
installation to my /Project/Tomcat instead the default location  
which is

/usr/local/Jakarta-tomcat5.0

Any ideas?


Foong Kim Seong


-Original Message-
From: ks.foong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 4:38 PM
To: 'Tomcat Users List'; users@tomcat.apache.org
Subject: RE: Changing the Tomcat 5.0 Directory installed in FreeBSD

No problems. Hoping maybe others can give a hand on this...:-)


Foong Kim Seong


-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 4:31 PM
To: Tomcat Users List
Subject: Re: Changing the Tomcat 5.0 Directory installed in FreeBSD

ks.foong wrote:
The setclasspath.sh consist of this information, after I have  
issued ls -l


-rwxr-xr-x for that file.

So, it's reading and able to excute.

Further more, I am issusing that command as root, and that file is  
owned

by

root.


Then I'm out of ideas, sorry.

Regards
  mks

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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEfV2mW126qUNSzvURAqETAJ9gUlo/8+nwq5KlFR04Mo9KPzORrQCZAQzt
Dmq6II8YZ2UoxNY/6eMvOMg=
=GBJd
-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]



Re: Tomcat as a standalone webserver. Why not?

2006-06-01 Thread Andrew Miehs
If you are running a big site with multiple servers, you do NOT want  
to run

Apache in front of your Tomcats -

All that you do is increase latency, and half your performance. The HTTP
connector in TC 5.x is more than adequate to deal with heavy traffic  
loads.


To be honest, I try not to use Apache at all any more, and tend  
towards lighttpd

- depending of course on the requirements.

We deliver our images via a separate url ie: img.domain.com and  
www.domain.com.


We have the images delivered via a lighttpd, and our dynamic content  
delivered
via tomcat - we currently do our load balacing with an F5 BigIP for  
these two
fully qualified host names. Yes - you can do all sorts of snazzy  
things with
a proxy (like apache and mod_proxy/ mod_jk) out front - but I do not  
think

it is worth the cost of the performance that is lost...

We did some tests 2 years ago for our system and discovered, with  
Apache and TC

running on the same machine

With mod_jk, apache 2.0 and TC 5.0
50 requests/ sec

With just TC5.0
100 request/ sec

...

As for security - you have TC running in both cases - mod_jk passes  
the requests

unfiltered straight through

Therefore by adding Apache, you are only adding something else to go  
wrong -

be broken - not solving any problems...

Andrew


On 01/06/2006, at 5:39 PM, Nikola Milutinovic wrote:


--- Tim Funk <[EMAIL PROTECTED]> wrote:

Personally - I like having apache in front of tomcat because I  
find it easier


to do CGI, static content directory aliasing, and the volume of  
available
modules to be very convenient. It also allows my site to be up  
with a higher

uptime since I can restart / replace a tomcat and in those periods of
downtime - I can reconfigure apache to have an outage message.


Hi Tim.

And all of you out there. There is one thing that keeps bothering  
me. I AM a
configuration fanatic and when I build my own version of Apache  
(Tru64 UNIX, in
case anyone is screaming "use RPM!"), I tend to build it loaded  
with modules,

mod_jk1/2 included.



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



ajax response from tomcat by including JSP from a servlet - fails silently when HTML is badly formed.

2006-06-03 Thread Andrew Braae

I am having great trouble with an error that does not show up in the tomcat
logging. Hours of googling and frigging around and I am no closer. Would
really appreciate any help on this one.

Basically I am using a blend of servlets and JSP to build up a response to
an ajax request (using rico on the browser). The response itself is a
fragment of HTML, wrapped inside some XML.

However if the JSP that produces the HTML content produces anything less
than perfectly-formed HTML, then the response fails - worse still, it fails
silently, with no output to the tomcat log files. This makes debugging a
nightmare of examining every line of the JSP searching for badly-formed
HTML.

I really need to get tomcat logging working so that I can see the error that
is occurring. I am using Tomcat 5.5, with the basic log4j.properties setup
and file as per tomcat distribution.

For example my code is as follows:

// this is my controller servlet
public void doGet(HttpServletRequest request, HttpServletResponse response)
   throws IOException, ServletException{

  response.setContentType("text/xml");
  PrintWriter out = response.getWriter();

  out.print(""); // standard rico format

  request.getRequestDispatcher("/jsp/MyJSP.jsp").include(request,
response); // dispatch to jsp

  out.print("");
  out.close();

  return;
}


This is the JSP that I call from the servlet

<%@ page
import="com.mystuff.*"
%>

HelloWorld


The above JSP will fail, silently - however if I change the JSP so that the
 tag is strictly correct XHTML, then it works fine...

<%@ page
import="com.mystuff.*"
%>

HelloWorld


Among the many things I have tried to resolve this problem are:
1) wrapping the HTML response inside CDATA
2) Flushing out before and after JSP invocation
3) Using text/html instead of text/xml, and even just not setting content
type at all.

Any assistance greatly appreciated. As I say, I would really like to get the
tomcat logging working, though would also be happy if there was some way to
repvent tomcat from being so harsh, and allowing manky HTML through.


Re: ajax response from tomcat by including JSP from a servlet - fails silently when HTML is badly formed.

2006-06-04 Thread Andrew Braae

Thank you to Mladen and to everyone else who helped, this problem is not
a problem at all. Yes, very embarrassing but I have just found using
Fiddler that the response was coming back fine, there is nothing wrong
at the Tomcat end, and it is just that rico does not like badly formed
HTML. One of those cases where the trees are completely obscured by the
woods. THank you all again.
Andrew



On 6/4/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote:


Andrew Braae wrote:
> However if the JSP that produces the HTML content produces anything less
> than perfectly-formed HTML, then the response fails - worse still, it
> fails
> silently, with no output to the tomcat log files.
You can generate malformed HTML from JSP pages and it is OK, so I assume
your problem is in rico or ajax related stuff. I think your problem is
on the client side - client doesn't know to handle imperfectly formed
HTML in ajax response.
I had JSP which had errors and warnings  in HTML validator  :) But no
problem in Tomcat with that :).

Are you sure the problem is in Tomcat?

--
Mladen Adamovic
http://home.blic.net/adamm  http://www.shortopedia.com
http://www.froola.com   http://www.online-utility.org


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

2006-06-06 Thread Andrew Miehs


In both tomcat/conf directories do a

grep 'port=' server.xml


Regards

Andrew


On 06/06/2006, at 4:25 PM, Christian Jean wrote:

JDK 1.5 (AMD 64-bit) had been installed for several months already  
with

JAVA_HOME configured correctly.

Jeach!

On 6/6/06, Bob Hall <[EMAIL PROTECTED]> wrote:


--- Christian Jean <[EMAIL PROTECTED]> wrote:

> I've been successfully using various version of
> Tomcat for serveral years
> with the same certificate... all worked well.
>
> I wanted to test the stability of Tomcat 5.5.17, so
> I installed in on the
> same server but renamed all the 8XXX ports to 9XXX
> so that it could be run
> in parallel to the 5.0.28 server.  When I started
> the 5.5.17 server, I
> noticed that I could not get the HTTPS (SSL) pages
> working correctly.  The
> normal HTTP pages were working correctly though.
>
> Then the real trouble started!!  I could not load
> any HTTPS pages from any
> server thereafter...
>
> The SSL pages DID work on the 5.0.28 prior to
> testing the 5.5.17, but now
> HTTPS no longer works at all.  When trying to load
> the ssl pages from the
> browser it says nothing... just a timeout occures.
>
> The logs don't show a single trace that something (a
> page) was not properly
> sent.
>
> Using 'netstat -ln' shows that the ports are
> successfully bound.
>
> The only message I'm capable of getting is with
> lynx:
>
>  bash>   lynx https://localhost:8443
>
> Will display the following line:
>
>   SSL error:Can't find common name in
> certificate-Continue? (y)
>
> Appart from installing and running server 5.5.17,
> nothing has changed on my
> server, so its weird that my production 5.0.28
> should stop working because
> of this test???
>

Christian,

You mention that no other changes were made on
the server, but did you happen to also install
jdk/jre 1.5 and/or change JAVA_HOME?

-Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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: Urgent...

2006-06-06 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bingo bongo -

If you want them to run at the same time - both tomcats need to use  
different ports


so in the 5.5.17 config

change port 8005 to 18005
change port 8080 to 18080
change port 8443 to 18443

Regards

Andrew


On 06/06/2006, at 4:39 PM, Christian Jean wrote:


Here is the result for 'jakarta-tomcat-5.0.28/conf/server.xml':


   
   Note that I'm using a slightly modified version of 'server- 
minimal.xml' for
the 5.5, but even using the standard server.xml (with SSL enabled)  
gives me

the same results.

Thanks,

Jeach!

On 6/6/06, Andrew Miehs <[EMAIL PROTECTED]> wrote:



In both tomcat/conf directories do a

grep 'port=' server.xml


Regards

Andrew


On 06/06/2006, at 4:25 PM, Christian Jean wrote:

> JDK 1.5 (AMD 64-bit) had been installed for several months already
> with
> JAVA_HOME configured correctly.
>
> Jeach!
>
> On 6/6/06, Bob Hall <[EMAIL PROTECTED]> wrote:
>>
>> --- Christian Jean <[EMAIL PROTECTED]> wrote:
>>
>> > I've been successfully using various version of
>> > Tomcat for serveral years
>> > with the same certificate... all worked well.
>> >
>> > I wanted to test the stability of Tomcat 5.5.17, so
>> > I installed in on the
>> > same server but renamed all the 8XXX ports to 9XXX
>> > so that it could be run
>> > in parallel to the 5.0.28 server.  When I started
>> > the 5.5.17 server, I
>> > noticed that I could not get the HTTPS (SSL) pages
>> > working correctly.  The
>> > normal HTTP pages were working correctly though.
>> >
>> > Then the real trouble started!!  I could not load
>> > any HTTPS pages from any
>> > server thereafter...
>> >
>> > The SSL pages DID work on the 5.0.28 prior to
>> > testing the 5.5.17, but now
>> > HTTPS no longer works at all.  When trying to load
>> > the ssl pages from the
>> > browser it says nothing... just a timeout occures.
>> >
>> > The logs don't show a single trace that something (a
>> > page) was not properly
>> > sent.
>> >
>> > Using 'netstat -ln' shows that the ports are
>> > successfully bound.
>> >
>> > The only message I'm capable of getting is with
>> > lynx:
>> >
>> >  bash>   lynx https://localhost:8443
>> >
>> > Will display the following line:
>> >
>> >   SSL error:Can't find common name in
>> > certificate-Continue? (y)
>> >
>> > Appart from installing and running server 5.5.17,
>> > nothing has changed on my
>> > server, so its weird that my production 5.0.28
>> > should stop working because
>> > of this test???
>> >
>>
>> Christian,
>>
>> You mention that no other changes were made on
>> the server, but did you happen to also install
>> jdk/jre 1.5 and/or change JAVA_HOME?
>>
>> -Bob
>>
>> __
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.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]




-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEhZaeW126qUNSzvURAp+IAJ4gzDQLi/RnVNkKLkhNut94pvGkEgCeIpVQ
aeyP00DZ8io8rVGo/fCuMAc=
=uFub
-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]



Re: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Andrew Miehs

@Mark,

as Peter wrote, have a look in /etc/hosts.

It probably looks like

127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine

You should change this to

127.0.0.1   localhost testmachine
192.168.0.2 testmachine.domain.com

Just be careful if you are using Solaris - you may end up configuring  
your ethernet
to 127.0.0.1 if you have not used a fully qualified domain name in / 
etc/hostname.interfacename


Regards

Andrew


On 12/06/2006, at 3:08 PM, Peter Crowther wrote:


From: Mark Claassen [mailto:[EMAIL PROTECTED]
Say Tomcat is on a machine called TestMachine.
If I put "127.0.0.1" in the address field, it accepts
connections of the
form "http: //127.0.0.1/..." only
It does not accept connections from "http:
//TestMachine/...", even though
the server is this same machine.
I was hoping that it would accept all connections from the
local machine,
regardless of what the connection was called.

Is there a way to do this?


Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.



-
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: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Andrew Miehs
The configuration in the connector is so that java know on which  
interface to 'BIND' to on the machine.


Do a
netstat -anp |grep LISTEN

on your machine. This shows which interface which processes are bound  
to.


The only process (generally speaking) that can connect to 127.0.0.1  
is one that is running on the

machine itself.

/etc/hosts just stores a list of aliases for mapping names to  
addresses - this does not suddenly

allow me to connect to anything but just entering the correct details.

If your process is NOT listening to 192.168.0.2 - no-one can connect  
to it...


Andrew






On 12/06/2006, at 3:32 PM, Mark Claassen wrote:


We do have something similar to your first example.


127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine


So we can probably move testmachine like you did.  But does this  
mean that

accesses by "testmachine.domain.com" will not comply?

I was just hoping that the restriction would be based on some  
intrinsic

information and not just on the name that was used.

Providing I don't let anyone hack into my /etc/hosts file, can this be
spoofed?



-
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 paths to one application

2006-11-02 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Doesn't this only work if your application replaces the 'ROOT'  
application?


Andrew

On 02/11/2006, at 9:56 AM, Stephan Schöffel wrote:

if you map them to one app in your web.xml you can have different  
paths link to one app.


like:


   MyServlet
   my.Servlet
   
   
   MyServlet
   /path1/servlet1
   

   MyServlet
   /path2/servlet2
   

both links would map to MyServlet ie my.Servlet.class


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFSbbPW126qUNSzvURAn4qAKCUxRJ5gzOEVTINFsLzggswi6n1VACfc+mE
GHpg8SLtzz0o5x4op7JhmNg=
=4vxd
-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]



Re: AW: Multiple paths to one application

2006-11-02 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I hope that this is not really the reason why you want two paths to  
the application?


Tomcat has user authentication built in!? Why not use it?! Otherwise,  
some smart user is

going to have the idea of connecting directly to your tomcat instance...

If you have 'two' copies of the same web app, you may also end up  
with other side-effects, depending on how the thing works
... Two copies using the same database, when they each believe that  
they are the only one connected! :-)



Andrew


On 02/11/2006, at 4:01 PM, Peter Neu wrote:

This means when I configure it like this it makes no difference to  
just

deploying the same application twice with different paths, right?

My problem is that I have parts of my application which are  
restricted and
I just want to filter the path requests with the httpd server which  
sits

in front of tomcat so that I don't to configure any additional realms.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFSgoCW126qUNSzvURAn0uAJ9M8hRTpOCxPE+z7NOhho8tdVA39wCcDWpn
Cfj3u/04QUinjCoTLAYc6FU=
=jcI6
-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]



Re: Thread pool per webapp?

2006-11-04 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

As a quick hack

If you only want to partition between 2 webapps you could always use  
the nasty method of using 2 tomcats. The other alternative would be  
to configure a second HTTP connector, and then use one for the one  
webapp, and the other for the second.



Andrew


On 04/11/2006, at 1:31 AM, David Smith wrote:

Well I was actually holding off because the internal threading of  
tomcat isn't my area.  But if you insist, I have never seen any  
configuration parameters that effectively partition threads between  
webapps.


--David



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFTHTtW126qUNSzvURAvAMAJ9pvkib8k77yvt6PR3mzPXlGZaQOACffYpm
Q91JSlFMVHKoJa8KNepAq5E=
=Dcd/
-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]



Re: Thread pool per webapp?

2006-11-04 Thread Andrew Miehs
Why not, as i asked before, just start two tomcats? - not pretty but  
it works...


ie:

Tomcat1 (webapp1) - Port 8080
Tomcat2 (webapp2) - Port 8081

- Then setup tomcat1 with 70 threads, and tomcat2 with 30 threads

Cheers

Andrew

On 04/11/2006, at 9:56 PM, David Smith wrote:


Quoting the original question:

"Let's say I have webapps A and B, and A is more critical webapp.   
Let's say my connector's pool size is 100, and there are 100  
concurrent requests destined for A and B each (so total 200  
requests here).  I would like to allocate 70 threads to process A's  
requests, and only 30 for B's."


Allocating a portion of the total number of threads to a specific  
webapp is partitioning the thread pool.  Think of it as analogous  
to partitioning a drive.  The term seemed to fit very well when I  
wrote the message.


--David



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



Extracting certificate information

2006-11-08 Thread Andrew Friebel
I wish to extract certificate information from my servlet that is
running within tomcat.  The problem that I get is that my x509
certificate array is always null.  The code snippet that I am attempting
to use is:
 
X509Certificate[] certs = (X509Certificate[])
request.getAttribute("javax.servlet.request.X509Certificate");

if (certs == null) {
// do non-ssl items
} else {

// Attempt to extract principal name from Subject:
   String clientDN = certs[0].getSubjectDN().getName();
   System.out.println("Client DN = " + clientDN);
}
 
My understanding is that when I use the getAttribute as I have above, I
am supposed to get an array of X509Certificate objects.  Instead, certs
is always null.  The above code is in the doPost method of a servlet
that has received data sent to it using SSL.
 
I am running tomcat 5.0.27 with java 1.4.2_06.
 
Any ideas?
 
 
Regards,
Andrew Friebel
 


Extracting certificate information

2006-11-08 Thread Andrew Friebel
I wish to extract certificate information from my servlet that is
running within tomcat.  The problem that I get is that my x509
certificate array is always null.  The code snippet that I am attempting
to use is:
 
X509Certificate[] certs = (X509Certificate[])
request.getAttribute("javax.servlet.request.X509Certificate");

if (certs == null) {
// do non-ssl items
} else {

// Attempt to extract principal name from Subject:
   String clientDN = certs[0].getSubjectDN().getName();
   System.out.println("Client DN = " + clientDN);
}
 
My understanding is that when I use the getAttribute as I have above, I
am supposed to get an array of X509Certificate objects.  Instead, certs
is always null.  The above code is in the doPost method of a servlet
that has received data sent to it using SSL.
 
I am running tomcat 5.0.27 with java 1.4.2_06.
 
Any ideas?
 
 
Regards,
Andrew Friebel
 


  1   2   3   4   5   6   >