precompile question

2005-01-18 Thread Matt Bathje
Hi All -
When pre-compiling using an ant task, is there a way to exclude certain 
files from being precompiled? I tried using an exclude tag on the 
jasper2 task, but it tells me that it does not support that. It looks 
like the deprecated jspc task that used to come with apache support 
include/exclude filters...

If I put the exclude on the javac part of the precompile, then the file 
does not get compiled, but it is still included in the generated web.xml 
file, and makes it so tomcat throws an error, so that doesn't help.

If there is a way to implicitly include all the files that need 
compiling, I would be willing to settle for that as well.

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


Re: precompile question

2005-01-18 Thread Matt Bathje
Thanks for the info. I'll just have ant move the files to a temporary 
extension before the jasper2 task, then back to .jsp when it is done.

Thanks,
Matt
Tim Funk wrote:
No, there are no way to exclude files. If you have a file which has an 
extension of jsp, then consider it to be a jsp. If its not a jsp - it 
should be a different file extension. (For example .jspf for a jsp 
fragment - files with an extention of .jspf are excluded)

-Tim
Matt Bathje wrote:
Hi All -
When pre-compiling using an ant task, is there a way to exclude 
certain files from being precompiled? I tried using an exclude tag 
on the jasper2 task, but it tells me that it does not support that. It 
looks like the deprecated jspc task that used to come with apache 
support include/exclude filters...

If I put the exclude on the javac part of the precompile, then the 
file does not get compiled, but it is still included in the generated 
web.xml file, and makes it so tomcat throws an error, so that doesn't 
help.

If there is a way to implicitly include all the files that need 
compiling, I would be willing to settle for that as well.

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


Does tomcat cache compiled JSPs?

2005-01-13 Thread Matt Bathje
Hey everybody -
I am trying to get Tomcat to dynamically compile JSPs that are uploaded 
through a web interface. I am using the org.apache.jasper.JspC ant task 
trough code to do it.

After a bit of work, I am able to get the file parsed and compiled into 
the proper directory, which as far as I know is:
TOMCAT_HOME/work/Catalina/mysite/org/apache/jsp/WEB_INF/tiles/public/layouts/
(I got this based on the fact that if I update the .jsp file by hand and 
wait for the scheduled jasper compile, the file in this directory gets 
updated.)

Both the .class and the .java files are updated with a time stamp of 
right around when the upload occurred, and if I view source on the .java 
file, it contains whatever change I uploaded into the .jsp file, so 
everything seems like it should work.

When browsing the site though, the updated version of the file is not 
used. If I restart the site (either through manager stop/start or 
reload, or through restarting tomcat) the new file is then used. Waiting 
for the scheduled jasper compile does NOT recompile the file (as would 
be expected I think...) If I change the .jsp file by hand after my 
upload/compile process, and wait for the scheduled jasper compile, the 
hand-updated version of the file is used.

It seems as though I am missing something when I do my compile. I looked 
through the JspC (and related) code, and it seems as though if any files 
were changed, it reloads the JSPServlet, and this somehow makes the 
updated files be used.

So - I guess the questions I have are:
- Does tomcat cache the compiled JSPs somewhere?
- If so, how to reload that cache?
- Does that fact that the newly-compiled file is always called from a 
jsp:include page=xxx.jsp / make a difference?
- Is there a way to use the running jsp compiler instead of using the 
JspC ant task - I think using the JSPServlet would solve all my problems 
actually, but I see no way to call it from my code.

Thanks,
Matt
PS - I am 99.% sure that this is not a browser/proxy caching issue. 
It happens on multiple browsers/computers, and I see no other caching 
issues on the site when changes are made, this is the only time/place.

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


Re: Does tomcat cache compiled JSPs?

2005-01-13 Thread Matt Bathje
Woodchuck wrote:
--- Matt Bathje [EMAIL PROTECTED] wrote:

- Does that fact that the newly-compiled file is always called from a
jsp:include page=xxx.jsp / make a difference?

try %@ include file=xxx.jsp %

This would not be an ideal situation as the path to include is 
dynamically calculated - but in any case, I tried hard-coding it and 
doing the include, and it did not help the situation any.

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


Re: Does tomcat cache compiled JSPs?

2005-01-13 Thread Matt Bathje
is the jsp doing the %@ include being jsp:include-ed itself into
another jsp?
It isn't being included, but it is being called as part of a 
struts/tiles definition.

also, are you using tomcat 5?  if you are i believe you can use EL to
do something like:
%@ include file=${your_object.dynamic_file_name} %

Doesn't seem to work:
2005-01-13 12:22:56 StandardContext[]Background compile failed
org.apache.jasper.JasperException: 
/WEB-INF/tiles/public/layouts/index.jsp(54,0) File 
/WEB-INF/tiles/public/layouts/${pathToInclude} not found

I didn't see anything in the JSP documentation that would indicate you 
can use EL in the include directive myself.

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


Re: dynamically compile JSPs

2005-01-12 Thread Matt Bathje
So it looks like I need to send in classpath and destination directory 
configuration stuff to the JspC task (using setClassPath and 
setOutputDir on antTask I think)

Where do I get the proper information from though? (The proper 
information to me means the same classpath and output directory that 
tomcats jasper servlet uses) Is there a way to read the jasper servlets 
configuration variables in my serlvet? Of can I figure it out from the 
JspC(and related) source code? I haven't seen anything helpful there yet.


Hey all - replying to myself yet again. I got this working now, it 
parses and compiles the JSP file to the proper directory under 
TOMCAT_HOME/work/

Now - I have another problem - there are 2 types of files that I do this 
with. They both wind up being Struts/Tiles layout files, just in 
different directories basically.

When I upload/compile to one of the directories, it works perfectly for 
me - the JSP file is parsed and compiled, and when I view the pages the 
changes are properly reflected.

In the other directory, it parses/compiles the uploaded JSP page, but 
for some reason Tomcat never displays the updated JSP page until I 
restart the server. There is nothing special about this directory that I 
know of, it is just the parent directory of the one that is actually 
working.

Any idea how to fix that little problem? I was looking through the JspC 
code, and it looks like it reloads the JSP Servlet after a compile is 
done -but I'm not sure that would fix my problem (and as far as I know, 
there is no way to set JSPServletWrapper.reload to true from my serlvet.)

Any ideas on this last problem would be greatly appreciated.
Thanks,
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: dynamically compile JSPs

2005-01-11 Thread Matt Bathje
I was messing around with the code a little bit, and tried this:
JspC antTask = new JspC();
antTask.setArgs(new String[] { -compile, uploadTileFilePath });
antTask.execute();
but this always gave me an error that javax.servlet package could not be 
found.


Replying to myself here - but I got a bit further with this and need 
more support if anybody has any ideas.

I thought at first that this code would parse/compile the uploaded JSP 
page using the same paths/classpath/etc. that the Jasper servlet setup 
in web.xml uses.

It turns out I am wrong and it seems like it is using some sort of 
default for the classpath and output directory.

The classpath just has the classes from the jars for my local site 
(hence no tomcat jars and there error being seen above.

It is outputting the jsp file to a .java file under 
TOMCAT_HOME\org\apache\jsp\WEB_INF\tiles\public_\file_jsp.java (and 
presumably if I could get compilation to work it would compile to that 
directory as well.)

So it looks like I need to send in classpath and destination directory 
configuration stuff to the JspC task (using setClassPath and 
setOutputDir on antTask I think)

Where do I get the proper information from though? (The proper 
information to me means the same classpath and output directory that 
tomcats jasper servlet uses) Is there a way to read the jasper servlets 
configuration variables in my serlvet? Of can I figure it out from the 
JspC(and related) source code? I haven't seen anything helpful there yet.

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


Re: dynamically compile JSPs

2005-01-10 Thread Matt Bathje
[EMAIL PROTECTED] wrote:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper/docs/api/index.html
Usage of the JspC class.  This should be what you want.
I work in Windows 95% of the time, and I'm a simplicity freak, so I tend do do 
things, most of the time, with batch files called from UltraEdit.  Anyway, this 
is relevant because one of the steps in my typical build process is a 
compilation of all JSP's.  I use this class to do that.  I can give you the two 
lines from my batch file that does this if it would be helpful, but I tend to 
think the javadocs will get you where you want to go.


This is kind of an old thread I'm replying to - but I implemented what I 
thought would work for this, and haven't been able to get anything 
working reliably. As a refresher, the scenario is this:
- a Tomcat 5.0.x server with Jasper setup in development=false mode
- I upload a jsp page through a web interface, and want it to be 
compiled/usable immediately, instead of waiting for the scheduled jasper 
compilation
- putting ?jsp_compile=true on the page doesn't seem to work
- making development=true isn't an option

After looking through the JspC documentation a little bit, I tried this 
code in my class after the JSP file is uploaded:

JspC antTask = new JspC();
antTask.setArgs(new String[] { uploadTileFilePath });
antTask.execute();
And this does not seem to compile the file reliably. It does seem like 
something is happening, because the upload/compile action takes about 
25-30 seconds longer to load when the jsp compilation code is included. 
In my work directory, the .java and .class files are never updated (new 
time stamp) right away.

Sometimes if I wait a bit (5-10 minutes) the files are updated properly, 
but this seems to be the normal scheduled compilation.

Sometimes if I load the page up in a browser after it has been 
uploaded/compiled, it seems to be compiled on access, but this does 
not always happen.

I was messing around with the code a little bit, and tried this:
JspC antTask = new JspC();
antTask.setArgs(new String[] { -compile, uploadTileFilePath });
antTask.execute();
but this always gave me an error that javax.servlet package could not be 
found.

I then tried:
JspC antTask = new JspC();
antTask.setArgs(new String[] { uploadTileFilePath });
antTask.execute();
antTask.setArgs(new String[] { -compile, uploadTileFilePath });
antTask.execute();
and this seemed to make it (so far) that the JSP page always gets 
compiled the next time it is loaded in a browser.

This is passable if it must be the solution, but what I would really 
like is that the file gets completely compiled during the upload/compile 
action. The reason for this is that I want the person uploading to have 
to deal with the extra processing time, and not the person loading the page.

Any help with solving this problem would be greatly appreciated.
Thanks,
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


dynamically compile JSPs

2004-12-22 Thread Matt Bathje
Hi all -
If you have your tomcat servers setup with development=false (compiling 
every 5 minutes) - is there a way to dynamically compile certain JSP 
pages from inside your servlet code? (Or at least to trigger a compile 
to happen off of the schedule?)

If so - are there any side effects of doing this?

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


Re: dynamically compile JSPs

2004-12-22 Thread Matt Bathje
I can't seem to find any solid documentation on this (I downloaded the 
JSP 2.0 spec and don't see it mentioned, even though based on a google 
search it seems like it is is a JSP thing and not a tomcat thing)

But anyways - it doesn't seem to work for me, and I think the reason is 
that the jsp I want to compile dynamically is a struts/tiles layout 
page. There is no way to access the file directly through the browser.

I may be able to get away with putting jsp_compile=true in the tile 
definition path, but I'd like to avoid that because (if my understanding 
of this parameter is true) the page will get recompiled on every page 
load, which is really not what I want, and would probably hurt 
performance a lot.

Any other ideas for dynamic JSP compilation? Calling the compiler from 
inside the code (a struts action) if possible is not out of the question 
as long as there is no serious downside.

Thanks,
Matt

Tim Funk wrote:
I would think that making the query string be jsp_compile=true would do it.
For example:  mypage.jsp?jsp_compile=true
[I never tried it]
-Tim
Matt Bathje wrote:
Hi all -
If you have your tomcat servers setup with development=false 
(compiling every 5 minutes) - is there a way to dynamically compile 
certain JSP pages from inside your servlet code? (Or at least to 
trigger a compile to happen off of the schedule?)

If so - are there any side effects of doing this?
 

-
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: dynamically compile JSPs

2004-12-22 Thread Matt Bathje
Well they are being precompiled at first. The problem is that some of 
the pages are being uploaded/overwritten through a web interface, and 
the changes aren't immediately visible to users. (They have to wait for 
the scheduled recompile to happen to see the changes they made.)

Matt
Dale, Matt wrote:
This might be a long way round but you could call a system ant job to compile 
them. Or if it is appropriate in your environment you should just precompile 
them anyway, this way there will be no performance hit at all on your 
production server when a new deployment is made.
Ta
Matt
-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: 22 December 2004 17:01
To: Tomcat Users List
Subject: Re: dynamically compile JSPs
I can't seem to find any solid documentation on this (I downloaded the 
JSP 2.0 spec and don't see it mentioned, even though based on a google 
search it seems like it is is a JSP thing and not a tomcat thing)

But anyways - it doesn't seem to work for me, and I think the reason is 
that the jsp I want to compile dynamically is a struts/tiles layout 
page. There is no way to access the file directly through the browser.

I may be able to get away with putting jsp_compile=true in the tile 
definition path, but I'd like to avoid that because (if my understanding 
of this parameter is true) the page will get recompiled on every page 
load, which is really not what I want, and would probably hurt 
performance a lot.

Any other ideas for dynamic JSP compilation? Calling the compiler from 
inside the code (a struts action) if possible is not out of the question 
as long as there is no serious downside.

Thanks,
Matt

Tim Funk wrote:
I would think that making the query string be jsp_compile=true would do it.
For example:  mypage.jsp?jsp_compile=true
[I never tried it]
-Tim
Matt Bathje wrote:

Hi all -
If you have your tomcat servers setup with development=false 
(compiling every 5 minutes) - is there a way to dynamically compile 
certain JSP pages from inside your servlet code? (Or at least to 
trigger a compile to happen off of the schedule?)

If so - are there any side effects of doing this?


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

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


Re: dynamically compile JSPs

2004-12-22 Thread Matt Bathje
Oh, and setting development=true isn't really an option :)
Matt
Matt Bathje wrote:
Well they are being precompiled at first. The problem is that some of 
the pages are being uploaded/overwritten through a web interface, and 
the changes aren't immediately visible to users. (They have to wait for 
the scheduled recompile to happen to see the changes they made.)

Matt
Dale, Matt wrote:
This might be a long way round but you could call a system ant job to 
compile them. Or if it is appropriate in your environment you should 
just precompile them anyway, this way there will be no performance hit 
at all on your production server when a new deployment is made.

Ta
Matt
-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: 22 December 2004 17:01
To: Tomcat Users List
Subject: Re: dynamically compile JSPs
I can't seem to find any solid documentation on this (I downloaded the 
JSP 2.0 spec and don't see it mentioned, even though based on a google 
search it seems like it is is a JSP thing and not a tomcat thing)

But anyways - it doesn't seem to work for me, and I think the reason 
is that the jsp I want to compile dynamically is a struts/tiles layout 
page. There is no way to access the file directly through the browser.

I may be able to get away with putting jsp_compile=true in the tile 
definition path, but I'd like to avoid that because (if my 
understanding of this parameter is true) the page will get recompiled 
on every page load, which is really not what I want, and would 
probably hurt performance a lot.

Any other ideas for dynamic JSP compilation? Calling the compiler from 
inside the code (a struts action) if possible is not out of the 
question as long as there is no serious downside.

Thanks,
Matt

Tim Funk wrote:
I would think that making the query string be jsp_compile=true would 
do it.
For example:  mypage.jsp?jsp_compile=true

[I never tried it]
-Tim
Matt Bathje wrote:

Hi all -
If you have your tomcat servers setup with development=false 
(compiling every 5 minutes) - is there a way to dynamically compile 
certain JSP pages from inside your servlet code? (Or at least to 
trigger a compile to happen off of the schedule?)

If so - are there any side effects of doing this?


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


Re: dynamically compile JSPs

2004-12-22 Thread Matt Bathje
[EMAIL PROTECTED] wrote:
If they are uploaded via a web interface, I assume it's your own interface... 
If so, why not just make part of the upload process a compilation?  You can 
compile it and overwrite the working copy in Tomcat, changes should be there 
instantly.  A bigger plus too is that you can catch any compile-time errors at 
that point and report back to the user with the trace, so you would never have 
any bad JSP's in production.

Well...that is my question...I can't figure out how to do that 
compilation :)

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


Fedora Core 3

2004-12-01 Thread Matt Bathje
Hey all -
I searched around on mail-archive and google for a bit and couldn't find 
anybody mentioning that they upgraded their Tomcat machines to use 
Fedora Core 3 yet.

Has anybody done so? Any issues with Java or Tomcat after the upgrade?
Thanks,
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Fedora Core 3

2004-12-01 Thread Matt Bathje
I'm using tomcat 5.0 (I think 5.0.25 specifically right now) but I was 
more just wondering in general as I've seen no mention of FC3 yet.

If tomcat 5.0.x has problems in FC3 it wouldn't be a huge deal, because 
once I upgraded to the new OS I would have to retest the app anyway, so 
a Tomcat upgrade wouldn't cause any extra headache.


Matt

Elihu Smails wrote:
what version of tomcat?
--- Matt Bathje [EMAIL PROTECTED] wrote:

Hey all -
I searched around on mail-archive and google for a
bit and couldn't find 
anybody mentioning that they upgraded their Tomcat
machines to use 
Fedora Core 3 yet.

Has anybody done so? Any issues with Java or Tomcat
after the upgrade?
Thanks,
Matt

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



		
__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

-
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, Apache connected in interesting way

2004-11-23 Thread Matt Bathje
Joshua Szmajda wrote:
Hi all,
I run a pretty high traffic site using Tomcat. We've gone through a 
number of configurations in the past, and I wanted to share with you the 
newest setup that we're using. It's a bit unorthodox perhaps, and I was 
wondering if anyone could think of possible problems? It does seem to be 
the fastest and most stable setup we've had yet.

Previously we've used Apache and Tomcat connected through jk1 and jk2. 
Also we've run direct to tomcat's http connector. JK1 was ok, but very 
slow. JK2 was fast (using unixSocket communication), but very buggy and 
crash prone. Tomcat alone was good, but it lacked some advanced apache 
stuff we wanted (Mostly URL Rewriting and good SSL handling).

After reading about the upcoming mod_proxy ajp connector for apache 2.2, 
I had the idea to use stuff that's in the current RHEL apache 2.0 
release to accomplish what I feel to be a similar effect. We've set up 
apache to reverse proxy requests for .jsp and .do (we're using struts) 
to tomcat's standard http connector.
 From the httpd.conf:

Proxy *
 Order deny,allow
 Allow from all
/Proxy
ProxyRequests off
RewriteEngine on
RewriteRule ^/$ http://128.121.26.205/index.jsp [P,NC]
RewriteRule ^/(.*.jsp.*)$ http://128.121.26.205/$1 [P,NC]
RewriteRule ^/(.*.do.*)$ http://128.121.26.205/$1 [P,NC]
This allows apache to process additional rewriting things (I left them 
out) and also to serve images and other static content. I felt that 
apache would be better at handling static content than tomcat in 
general, so this will be an overall speed improvement.

Anyway, any flaws here I should be aware of? Comments? Thanks!

Joshua -
Are tomcat and apache running on the same server? If so, it appears from 
what you have here that they are on the same port...so...what am I missing?

Also, how do you handle .jsps and .dos that need to be handled by Tomcat 
securely (using SSL). This seems to pass them all off to the non-secure 
version. Would it just be a more complex RewriteRule that tests for 
https vs. http?


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


[OT] Re: Form based login german umlaut

2004-10-27 Thread Matt Bathje
Replying to an unrelated message, even with a different subject, may not 
be the best idea either.

People using a threaded mail reader will most likely see your message 
threaded under the topic you replied to instead of as a new thread. If 
somebody is ignoring the thread you replied to, this will wind up making 
your message get ignored as well.

It is best to add the tomcat user list to your address book and start a 
new message using that when you have a new topic.

Matt


Robert Humble wrote:
I am sorry I hit reply and pressed the send button before I changed the
subject. You know it is like when you let the car door go just as you
realize that you have left the keys in the car.
Sorry Robert
On Wed, 2004-10-27 at 11:06, Mark Doppelfeld wrote:
Hi,
Robert I'm not sure if this thread is the place where to put your question.
I've got a problem with my web apps form based / JDBCRelam authentication.
It' nothing related to the manager app of tomcat.
Regards
Mark
Robert Humble wrote:

Hi, I would like to be able to limit the access in Tomcat manager. I
would like to be able to setup a user account that is able to start,
stop and remove the examples application, but only the example
application. The problem is that when I give a user the role manager
they have access to shutdown and start all the other application. How
would I set it up so that they can only use the commands for the app
they are responsible for?
 Thanks
Robert
-
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]

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


ROOT context using admin webapp

2004-09-01 Thread Matt Bathje
I sent this a wihle back and didn't get a response, so I'm going to try 
again. This applies to both Tomcat 5.0.25 and 5.0.27.

Is it possible to add a ROOT context to a host using the administrative 
webapp? I know how to do it by editing the server.xml (or 
Catalina/host/context.xml) file, but with the admin webapp I can't get a 
valid ROOT context added.

If I try to add the ROOT context with a blank path (). I get an error 
that the path must start with a slash (/).

If I try to add the ROOT context with a single slash (/), all links 
and stylesheet/javascript includes contain a slash at the front of them, 
which causes many problems. When I look at the context.xml file, it 
seems as though the path gets written to the file as / instead of as 
 as it should be for a ROOT context.

I looked through bugzilla, and found this issue:
http://issues.apache.org/bugzilla/show_bug.cgi?id=26399
The closing comment is very confusing to me though. It says that 
management tools will refer to ROOT contexts as /. It also says that 
internally (and the xml config files count as internal) ROOT contexts 
will be referred to as . He concludes by saying this is not a bug anyway

Now to me this seems like a bug - I am attempting to add a ROOT context 
using /, and it gets added in server.xml as / instead of as .

I'm hoping that I am just doing something wrong and there is no bug - 
so, does anybody know how to add a ROOT context to a host using the 
administrative webapp?

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


adding root context with admin webapp

2004-08-26 Thread Matt Bathje
Hi all.

This message applies to tomcat 5.0.25 and tomcat 5.0.27.

Is it possible to add a root context with the admin webapp? I try to add
it with a single slash (/) but when I do, my whole site gets messed up
with a slash at the front of all style sheets, images and links. You
can't add the root context as blank () through the admin webapp.

Looking at the context xml file, it seems as though when added with a
slash (/) the context is created with the path as / instead of as
.

I looked through bugzilla, and found this:

http://issues.apache.org/bugzilla/show_bug.cgi?id=26399


The message left is very confusing - it says that the root context will
be displayed as / in manager apps, but as  internally and in
server.xml - which is fine - but it also says there is no bug (with
creating root contexts?)

Anyway - I haven't been able to figure out how to do this. Could someone
please let me know if there is a way?


Thanks,
Matt


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



Errors using admin tool

2004-07-23 Thread Matt Bathje
Hi all.

I am trying to get the Tomcat 5.0.25 administration tool working, and am
having some issue. If I try to add a host I get:

HTTP Status 500 - Error invoking operation createStandardHost

and in the catalina.out:
Jul 23, 2004 10:07:22 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 23, 2004 10:07:22 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jul 23, 2004 10:07:22 AM org.apache.commons.modeler.BaseModelMBean invoke
SEVERE: Exception invoking method createStandardHost
java.lang.NullPointerException


BUT, the host says it is created.

Now, if I try to add a context to that host (or any other host) I get the
error:

HTTP Status 500 - Error invoking operation createStandardContext

and in the catalina.out:
Jul 23, 2004 10:09:53 AM org.apache.commons.modeler.BaseModelMBean invoke
SEVERE: Exception invoking method createStandardContext
java.lang.NullPointerException
at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.j
ava:834)
at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.j
ava:794)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:501)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanSer
verInterceptor.java:209)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:123)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanS
erverInterceptor.java:79)
 (there are about 50 more lines to this error, if anybody thinks they
will be helpful I will gladly supply them


Any idea what is going on? As far as I can tell the tomcat user has
permission to access the conf directory (and it's subdirectories...) so I'm
pretty sure it is not a permissions issue...but I'm kind of lost here.


Thanks,
Matt Bathje


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



java server mode vs. client mode

2004-06-16 Thread Matt Bathje
I posted this on the struts list this morning, but it might get better
answers here.

I was reading the stories here:

http://www.sys-con.com/story/?storyid=45250
http://www.kano.net/javabench/

Summary:
Java in server mode is faster than C++ in the benchmarks run. Java in client
mode is much more iffy, sometimes faster, sometimes slower, and sometimes
the same.


So my question becomes - does anybody have any experience running their
Tomcat jvm using the -server option instead of letting it default to client?

Based on what the tester says, the only downside of running the jvm in
server mode is a longer startup time, but the Java code still beat C++ even
with the longer times, so it can't be too bad.

So anybody have any experience/thoughts on this?


Thanks,
Matt Bathje


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



Re: java server mode vs. client mode

2004-06-16 Thread Matt Bathje
Thanks for the pointer to the article, don't know why I didn't just think to
look their in the first place.

I was sure it was something that has been mentioned on the list before, but
I wasn't able to find a way to search for it that yielded good results.


Thanks again for the info!
Matt Bathje


- Original Message - 
From: Peter Lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 2:54 PM
Subject: Re: java server mode vs. client mode



 this has been mentioned countless times on the mailing list and I have
tons of numbers comparing client to server in my article on the resources
page of tomcat.

 if you want hard numbers, I would suggest look at the article, or run some
stress tests on your own apps. a quick test will give you hard numbers to
prove/disprove the benefit/non-benefit of running in -server mode.

 i hope that helps

 peter



 Matt Bathje [EMAIL PROTECTED] wrote:
 I posted this on the struts list this morning, but it might get better
 answers here.

 I was reading the stories here:

 http://www.sys-con.com/story/?storyid=45250
 http://www.kano.net/javabench/

 Summary:
 Java in server mode is faster than C++ in the benchmarks run. Java in
client
 mode is much more iffy, sometimes faster, sometimes slower, and sometimes
 the same.


 So my question becomes - does anybody have any experience running their
 Tomcat jvm using the -server option instead of letting it default to
client?

 Based on what the tester says, the only downside of running the jvm in
 server mode is a longer startup time, but the Java code still beat C++
even
 with the longer times, so it can't be too bad.

 So anybody have any experience/thoughts on this?


 Thanks,
 Matt Bathje


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



 -
 Do you Yahoo!?
 Read only the mail you want - Yahoo! Mail SpamGuard.


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



[OT] Re: java server mode vs. client mode

2004-06-16 Thread Matt Bathje
Yes, I understand that it may not be completley accurate, but I was less
interested in the Java/C++ comparison than the client/server mode
comparison.

Thanks,
Matt Bathje


- Original Message - 
From: Eric VERGNAUD [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 3:12 PM
Subject: Re: java server mode vs. client mode


 le 16/06/04 21:50, Matt Bathje à [EMAIL PROTECTED] a écrit :

  I posted this on the struts list this morning, but it might get better
  answers here.
 
  I was reading the stories here:
 
  http://www.sys-con.com/story/?storyid=45250
  http://www.kano.net/javabench/
 
  Summary:
  Java in server mode is faster than C++ in the benchmarks run. Java in
client
  mode is much more iffy, sometimes faster, sometimes slower, and
sometimes
  the same.
 
 
  So my question becomes - does anybody have any experience running their
  Tomcat jvm using the -server option instead of letting it default to
client?
 
  Based on what the tester says, the only downside of running the jvm in
  server mode is a longer startup time, but the Java code still beat C++
even
  with the longer times, so it can't be too bad.
 
  So anybody have any experience/thoughts on this?
 
 
  Thanks,
  Matt Bathje
 

 Matt,

 No one can really believe Java is faster than C or C++, because Java is
 itself written in C and C++.

 I haven't been through the benchmark code throroughly, but there's
 definitely a bias somewhere.

 ---
 Eric VERGNAUD - JLynx Software
 Cutting-edge technologies and
 services for software companies
 web: http://www.jlynx.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]