Re: how to include an external config file in tha main file server.xml?

2004-05-17 Thread QM
On Mon, May 17, 2004 at 01:13:02PM +0200, wsedio wrote:
: But it looks like you have to put in the full file path, otherwise 
: Tomcat will throw a file not found error.
: 
: Is it possible to use relative path in some way?

Not to my knowledge. (Not *reliably*, at least.)
Search the archives for discussions on Tomcat's/a webapp's
current directory and you'll see what I mean.

What part of the server.xml keeps changing?  Is it the vhost defs
themselves, or the contents of the Context elements?  In the latter
case you can use per-webapp context.xml.  That stays with the webapp
itself, so there's no need to change the main server.xml each time an
app migrates.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: taglib - O'Reilly tutorial problem

2004-05-17 Thread QM
On Mon, May 17, 2004 at 01:49:18PM -0400, Zollinhofer, Matt wrote:
: The last part of the tutorial is creating custom tags, and when I
: implement that part of the tutorial, I receive a
: javax.servlet.ServletException:
: javax.servlet.jsp.tagext.TagInfo.init(...) exception.  Googling the
: error didn't turn up any seemingly useful information, and the end of
: the article also did not show anyone else having the same issue.  

: !--   bWelcome : %= request.getAttribute(USER)%/b --
:bonjava:hello / : %= request.getAttribute(USER) %/b


What's the full stack trace?

Barring that, I'll take a stab in the dark: does the custom tag take an
argument, either as body content or an attribute? e.g.

onjava:hello %= ... % /onjava:hello

?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Is it possible to intercept all requests and be serviced by a ser vlet?

2004-05-17 Thread QM
On Mon, May 17, 2004 at 10:19:29PM -0400, Chippada, Sreeni wrote:
:  I am using Tomcat 5. I need all the requests be serviced by a
: particular servlet irrespective of the web apps deployed. Is there a way to
: do it?

Have you tried putting it in the global web.xml?  Not 
{context}/WEB-INF/web.xml

I mean the one in
{tomcat install}/conf/web.xml


What that means as far as classloading issues, and whether all webapps
will see the *same instance* of that servlet class, I can't tell you...
but I'm sure that's in the docs.


A more portable solution would be to just include that same servlet in
each webapp, but you know your app/setup better than I...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Ant 1.6.1 configuration : runant.pl

2004-05-17 Thread QM
On Mon, May 17, 2004 at 06:52:37PM -0700, Mike Pakrer wrote:
: I am attempting to use md_jk2, Tomcat5.0.19 , Ant
: 1.6.1 , and Apache 2

Which OS and JDK?
-and how did you install Ant?  (tarball, RPM, etc.)

Check ${HOME}/.antrc to confirm that the $ANT_HOME declared there points
to the proper place.  Also, check the current $ANT_HOME in your shell
environment.

There may also be an antrc or ant.conf file in /etc somewhere.  I recall
once than an Ant RPM left such a file and caused quite the runaround...
=)

I point at this just because I have Ant 1.6.1 working out of the box, so
I'd be wary of touching any files.


: I am told through various tutorials that
: I need all of these working together to be able to run
: jsp pages.

Not true.  All you need to run JSPs is:

1/ a properly configured container (say, Tomcat)
2/ a text editor

Please, that's not a stab at you; I just get frustrated when I see
tutorials throw the kitchen sink at someone.

Ant will make your life easier as you start doing more Java work, and
Apache/mod_jk(2) may help in the long run, but they are certainly not
required to get started with basic JSP/servlet work.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: taglib - O'Reilly tutorial problem

2004-05-17 Thread QM
I just got another look at that exception: it's from the TagInfo class,
not the tag itself.  If the TagInfo ctor is choking, I'd check the tld
itself.

The only other thing that comes to mind is the article's date -- it's a
couple of years old (2001), and there have been changes in both the JDK
and taglib processing (some out in the open, some under the hood).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-15 Thread QM

On Sat, May 15, 2004 at 03:17:02PM -0400, Kevin D. Offet wrote:
: i don't know about other OS, but the process control features of the
: bash shell on linux would allow what i think you are trying to achieve.

Yes, shortly after I posted that message I did more digging on Java
threads and realized the flaw. ;)  Back to the ListenExec idea...


: String command = /where/your/script/lives/scriptname restart disown;
: getRuntime().exec(command);

Called from the container, that may cause other problems: Runtime.exec()
forks a process from the parent JVM.

Solaris, for one, implements COW for fork()'d processes but still
requires there be enough memory for the new process to have a full copy
should it need it.  On a dedicated machine, when the JVM holds most of
the RAM, that would make the fork() impossible.

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-14 Thread QM
On Fri, May 14, 2004 at 01:06:17PM -0400, Shapira, Yoav wrote:
: 
: Any portable solutions (that would work on windows, not just unix, and
: on MacOS)?

A *very* alpha-tasting version is available at:

 http://downloads.brandxdev.net/tomcat-479785/listenexec-0.1.0alpha.tar.gz

(written in Java)

The premise is that this network listener, after performing some
rudimentary authentication, accepts an alias from the client.

In turn, the alias is mapped internally to a command that gets passed to
Runtime.exec().  The aliases/commands are loaded from a properties file, 
one entry of which could be

restart_tomcat : /etc/init.d/tomcat restart

There's plenty of room to grow here, some of which is mentioned in the
included readme.


The code is still proof-of-concept (not a lot of error checking) but
that will change with time.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-14 Thread QM
On Fri, May 14, 2004 at 03:05:41PM -0400, Shapira, Yoav wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
: How would the webapp invoke this listener?

The listener would be started outside of the container, in a separate
process.  A (protected) JSP/servlet run wihtin the container would
contact the listener with a socket call.

Having it run outside of the container helps in situations where
commons-daemon, as root, is used to bind to the port before switching
uid's to the unprivileged Tomcat user.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-14 Thread QM

It just hit me --
what about a (protected) servlet that spawns a daemon thread, which in
turn calls Runtime.exec( tomcat stop / start script)?

Admittedly, I'm hazy on my Java threading right now, but if that would
work then it's something that's completley within the container, and no
more than a few lines of code.

-or am I off my rocker? ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-13 Thread QM
On Thu, May 13, 2004 at 11:23:17AM -0400, Shapira, Yoav wrote:
: I, on the other hand, would be interested to see what you come up with,
: so don't stop your train of thought on my account.

If you're looking for a full restart, there are several ways (in varying
levels of hackishness).

Once you've figured out the trigger (described below), it's a matter of
having that call:
{tomcat script} stop ; {tomcat script} start


Triggers:

1 changes in a file: under Linux, you could use FAM to monitor a file
  (say, server.xml).  Under OSs that don't support FAM you'd have to do
  a periodic poll(), which may cause problems if there are many other
  processes poll()ing for files.

2 Tomcat request: under Linux/Unix, a servlet/JSP could fire a
  System.exec() that calls an at job.  That would put the call
  to the script outside of the current process.
  (Not sure how calls to System.exec() are prohibited by the default
  security manager.)

3 Without the at job, the container could create/update a specified
  file watched by the FAM/poll() app...

etc, etc.

If anyone's interested in #1, I'd be happy to drive it.  I've been
experimenting with FAM lately, and could probably whip up something that
supports non-FAM OSs, too...  If you wanted to stick with Java (make it
cross-platform) that should be fairly straightforward, as well.

If you're looking to reload the *app* on file change, that's probably a
matter of having the trigger kick a JMX action.  -but I've reached total
stream-of-consciousness here so I'll stop rambling... ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat having strange 'hickups'

2004-05-13 Thread QM
On Thu, May 13, 2004 at 06:51:15PM +0200, Wojciech Sobczuk wrote:
: Any nice website about tuning the garbage collector?  

Um, Google?

Sun's website should have, in the very least, docs on the types of GC
algorithms available and how to invoke them.


: How to make it so it seamlessly works in the background and does not 
: halt the whole server?

That depends on which GC algo you choose, which, in turn, depends on
heap analysis from profiling.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Revoking or deleting a client certificate

2004-05-13 Thread QM

:I think previously I misunderstood you - now just for my understanding -
:I should create a selfsigned CA just for signing the server certificate
:and then import in the keystore the client certificates which are signed
:with the org's standard CA cert. And then the client browsers  should be
:made aware of this selfsigned CA in addition so that they can verify
:the server authenticity?

:Is that right? (it sounds actually logical to me :-))

At least, theoretically, it should work.
That's the basic idea of a trust hierarchy.

Give it a shot, and please report results back to the list.

I haven't pondered the long-term effects of maintaining two separate CAs
(there are ups and downs) but I'll leave that as an exercise for you. ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat reboot runtime

2004-05-13 Thread QM

: [snip: discussion re: ways to restart Tomcat, preferably
:  through Tomcat itself]

Option #4: a listener that exists outside the Tomcat process, which
calls the container start/stop scripts on command.

I'm whipping up a prototype now: it's a basic socket listener that
stores the path to the Tomcat script and calls it when a certain command
is sent to the port.


I'll have a link tomorrow...



: NB As a relative novice to Tomcat it astonishs me that the Tomcat Manager does not 
provide the functionnality to reboot the server at runtime (taking in account that it 
services become unavailable during reboot time).

It's *possible*, certainly.  The source code's available for anyone to
work it out and submit patches back to the Apache group.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: unable to compile class for JSP

2004-05-12 Thread QM
: 
/usr/local/jakarta-tomcat-4.1.30-LE-jdk14/work/foo/surge.foo.net/_/examples/jsp/num/numguess_jsp.java:7:
: package num does not exist
: import num.NumberGuessBean;


Where is the class file NumberGuessBean, or the JAR file that contains
it?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: unable to compile class for JSP

2004-05-12 Thread QM
On Wed, May 12, 2004 at 03:18:45PM -0400, Chris Purcell wrote:
: Binary file webapps/examples/WEB-INF/classes/num/NumberGuessBean.class

So far, so good.

Next step: what are the perms on the class file, and all dirs leading up
to it?  Is everything accessible to the tomcat user?

The short version of this test, substituting within the {}'s as needed:

su - {tomcat user} -c file {path to class file}

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Revoking or deleting a client certificate

2004-05-12 Thread QM
On Wed, May 12, 2004 at 10:57:30PM +0200, Plamen Neykov wrote:
: I have standalone tomcat installation with client authentication switched on
: as described in the tomcat documentation. The problem is that anybody who has
: a signed certificate from my CA can connect to tomcat - even if the client
: certificate is not in the tomcat keystore .

Yes, that's considered a strong selling point of SSL trust
chains/hierarchies.  ;)


: How can I make sure that only
: clients with certificates existing in the tomcat keystore are allowed to
: connect?

Remove the CA cert from the keystore and install only the certs (pub
keys, that is) of clients that should be allowed to connect.

Barring that, create a special CA for just Tomcat connections and store
that in the keystore.  That would spare you the trouble of adding
clients to the keystore individually.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Revoking or deleting a client certificate

2004-05-12 Thread QM
On Wed, May 12, 2004 at 11:31:11PM +0200, Plamen Neykov wrote:
: Thanks for the very quick reply!

Please, don't think me till it works. ;)


: But  I had the certificates of the clients only initially in the keystore
: (no CA cert!) but I had trouble with MSIE and Mozilla - both denied to
: present the certificate to the server so that no connection was possible from
: those browsers :-(

Was this a CA from a commercial entity, or a homegrown/self-signed CA?

I don't see why a browser would refuse to present its client cert to the
server.  Sounds more like the client couldn't verify the server CA and
stopped there.  (IIRC, the server gives its cert and then (optionally)
requests the client's cert.)


: On the second suggestion - it would be not very practical to send to every
: client a new CA cert. every time someone leaves the community

Not at all, but that's not quite what I meant: the idea was to create a
new, single CA and store *that* pub key in the keystore.  Certs for
clients are issued from/signed by this new, Tomcat-only CA.

iow, you'd separate your general CA work (for the rest of your
organization) from the certs needed for Tomcat connections.

This is essentially the same as what you have now, except replace your
current CA with this new Tomcat-only CA.

If I've misunderstood your scenario completely, please reexplain.


: Is the Apache http server better on that or is it a kind of basic SSL problem
: here?

Sounds more like an SSL infrastructure issue.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: log in page using tomcat

2004-05-11 Thread QM
On Tue, May 11, 2004 at 07:53:48PM -0600, Arora, Avinash wrote:
:Does tomcat provides any help in creating the log in page. I want
: to create a login page, that will accept same username and password
: specified in server.xml particular data source context (for logging to
: database) in the ResourceParams tag.

If I understand your question:
- check the Tomcat docs for Realms.
- check the servlet spec for authentication.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Apache2/Tomcat5/mod_jk2 problems

2004-05-11 Thread QM
On Tue, May 11, 2004 at 11:05:34AM +0100, Adrian Barnett wrote:
: After trying numerous different things, suspicion falls on mod_jk2. The 
: docs on mod_jk2 are not very helpful. Some say that mod_jk2 is better than 
: mod_jk and should be used in place of it, others say that mod_jk2 is not 
: stable enough for production use yet and mod_jk should be used instead.

Why not just try mod_jk and rerun your tests?
If you don't experience a memory leak in that case, then you'll know
that mod_jk2 (in its current state) isn't stable enough for your site.


: Also, we are using the JNI mode of communication for mod_jk2, rather than 
: Unix sockets.

What happens when you use sockets?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: apache, mod_jk, tomcat hungs

2004-05-11 Thread QM
On Tue, May 11, 2004 at 12:26:47PM +0200, Beat De Martin wrote:
: I'm using Tomcat 3.3.1, Apache 1.3.27 and mod_jk 1.2.4.
   ^
Do you have a test system on which you can try out Tomcat 4.1 or 5?
Even if you've found a legit Tomcat 3.x bug, IIRC that product is not
under active development...


: Every two days my Tomcat hungs and I have to restart it.
: Before Tomcat hungs I can see the following in mod_jk.log:
:  ERROR: can't receive the response message from tomcat, network problems or
: tomcat is down. err=-1
:   [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down
: or network problems.
:   [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed, recoverable
: operation. err=0
:  [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop.
: err=0

Before you restart, what sort of forensics do you do? e.g.
- check whether the Tomcat process really is unavailable
- check network connectivity between Apache/Tomcat
- check limits on the Tomcat and Apache processes, such as number
  of open sockets

etc., etc., etc.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Authentication with custom access control

2004-05-10 Thread QM
On Mon, May 10, 2004 at 10:30:13AM +0100, Cain, Simon wrote:
: I need to set up my Tomcat server to receive requests using BASIC
: authentication, but then allow me to authorize them using my own application
: database. I do not want Tomcat to check against the users in the
: tomcat-users.xml file, I want to do the checking programmatically..

Hello,

Check the archives and docs for JAAS and custom realm.

This was recently discussed on the list, but I do not recall how
much specific info was posted.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: the requested resource is unavailable

2004-05-07 Thread QM
On Fri, May 07, 2004 at 12:17:09PM -0400, Matt Tucker wrote:
:  servlet
:servlet-nameRequestMobileID/servlet-name
:display-nameRequestMobileID/display-name
:
: servlet-classcom.Optima.Results.MobileServlets.RequestMobileID/servlet-class
:  /servlet

What's the servlet-mapping entry?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat 5 is live, but won't display pages for me.

2004-05-07 Thread QM
On Fri, May 07, 2004 at 04:01:30PM -0400, Parker, Mike wrote:
: I have seen in a tutorial:
: http://www.dougsparling.com/comp/howto/Ent...ux-HOWTO-4.html

Could you provide the full URL, please?
It would be easier to see what may have gone wrong if the rest of us can
see all of the steps you took.

You should also list which versions of Tomcat and the JDK you're
running.


: I took the helloJava.class file, and put it in the classes
: ($CAT_HOME/webapps/sparling/WEB-INF/classes ) directory.

If you're running Tomcat 5, you'll have to put the class in a pacakge.
This will not work as-is.


: The instructions said that now I can run this servlett by going to :
: http://localhost:8080/sparling/servlet/HelloWorld

Chances are, your instructions assume the invoker servlet is loaded.
It's off by default in Tomcat 5, and (IIRC think) Tomcat 4.1.

Check out Sun's servlet spec for how to use a web.xml file that maps
servlet classes to URIs.  That should solve the problem.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: What version of tomcat am I using?

2004-05-06 Thread QM
On Thu, May 06, 2004 at 10:08:51AM -0400, Glanville, Jay wrote:
: Is there a way to programmatically determine what version of tomcat is
: installed on my system?

method:
org/apache/catalina/util/ServerInfo.getServerInfo()

and resource bundle:
/org/apache/catalina/util/ServerInfo.properties

I haven't actually *tried* them, though -- these are results
of a source grep.

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: What version of tomcat am I using?

2004-05-06 Thread QM
On Thu, May 06, 2004 at 12:04:58PM -0400, Jay Glanville wrote:
: Ah, the latter looks useable, although requires a little more jumping
: through hoops then I was hoping for.  Baring any easier solutions, I'll
: start using that property file.

Is your upgrade tool (or any part of it) written in Java?
You could load the properties file as a resource.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Load-Balancing

2004-05-06 Thread QM
On Thu, May 06, 2004 at 12:36:49PM -0400, Adam T. Gautier wrote:

: The configuration would be easier, definatly...

configuration, maybe. 
maintenance, probably not.  ;)

One of my clients had a large-scale J2EE setup. (Not Tomcat, but bear
with me.)  Several VMs ran on the server, but a single VM would host up
to, say, 5-6 apps.

Coordination between the apps was a headache.  Code migrations required
a VM restart; app X didn't want the downtime when app Y had to do a code
push.  There were also several conflicts over intra-VM resources: no one
wanted to share a container with a memory hog...

etc, etc, etc.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: (newbie q) Connector vs running standalone Tomcat as root

2004-05-06 Thread QM
On Thu, May 06, 2004 at 03:45:13PM -0500, Barnet Wagman wrote:
: As I understand it, under Linux (and other unixes), ports  1000 must be 
: run as root.

Yes and no.  The port must be *bound* by root, at which point the
process may switch to another user to perform the real work.



: I gather that the alternative is to run Tomcat via a 
: connector from Apache.

That's one of several options.
Others range from proxying to f/w redirects to commons-daemon ...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat Crashes with this is catalina.out

2004-05-05 Thread QM
On Wed, May 05, 2004 at 08:51:23AM -0400, Shapira, Yoav wrote:
: You may wish to file a bug report with Sun.

-and with BEA, as well, if JRockit has been the root of your stability
problems.

Call me old-fashioned... I'll take slow-and-steady over fast-and-crashy
any day. ;)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Strange error

2004-05-05 Thread QM
On Tue, May 04, 2004 at 02:30:16PM -0600, Nathan Maves wrote:
: What could cause this error in Tomcat 5.0.19.
: 
: 2004-05-04 14:21:02 StandardContext[/manager]HTMLManager:  
: ManagerServlet.reload[/ReportViewer]
: java.lang.ThreadDeath
: at  
: org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader 
: .java:1270)
: [snip]
: It happens when I place an object in the session and then click reload  
: from the webapp manager.


Any object, or a particular object?
(especially a custom object)

Does said object do anything with threads, such as calling ::stop()?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: jndi (jdbc) access out of container

2004-05-05 Thread QM
On Thu, May 06, 2004 at 12:44:57AM +, snpe wrote:
:   Can I access jndi out of container (from simple test application) ?

In other words, you would like to access Tomcat's JNDI provider
outside of a Tomcat-managed webapp?

Not possible.
This has been discussed on the list before.

What is your end-goal here?  There may be another way.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: startupw.exe classpath

2004-05-03 Thread QM
On Mon, May 03, 2004 at 10:46:50AM -0700, Justin McReynolds wrote:
: I want to include a directory that is outside of the tomcat install dir,
: e.g. c:\mydir, but I don't know how to add that directory to the
: classpath.
: 
: I can edit setclasspath.bat to include that directory, and then start
: Tomcat with either startup.bat or catalina.bat and it works fine; is
: there an analogous file for tomcatw.exe?

Is there any reason you're not putting these classes/jars in (standard)
dirs:

{tomcat install}/common/lib
{tomcat install}/common/classes

{webapp context}/WEB-INF/lib
{webapp context}/WEB-INF/classes

?

Those are the Tomcat standards.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat Filter Apache Axis ?

2004-05-03 Thread QM

On Mon, May 03, 2004 at 09:37:12PM +0100, Rui Zhang wrote:
:The Axis 1.1 does not support a filter.../filter in its web.xml. And if I 
insert
: the Filter into the Tomcat default web.xml, Axis even won't return its
: index.html page. The Filter, however, works fine with other webapps in my
: Tomcat.

What's the XML doctype declaration for the Axis web.xml?

Servlet filters were introduced in servlet spec 2.3.

If your doctype declaration specifies 2.2 or earlier, the DTD won't
recognize the filter (and related) tags.

(Solution: specify the 2.3 DTD or 2.4 schema.)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: ?how configure tomcat to auto startup in linux?

2004-05-03 Thread QM
On Mon, May 03, 2004 at 06:20:04PM -0700, Ing. Enrique de la Barrera Perez wrote:
: Hello Tomcat users ???
: ?could somebody tell when to find documentation to configure tomcat to auto
: startup in linux?

Check /etc/init.d for examples of start scripts.
Clone one of those and you're in business.

You can then use plain old su, jsvc (search apache.org), or
erni (brandxdev.net) to start the process as the Tomcat user
instead of root.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Need Solution to authenticated webpages and forms

2004-05-03 Thread QM
On Mon, May 03, 2004 at 05:43:03PM -0400, Pleasant, Tracy wrote:
: The form that I am using has a lot of drop down boxes (basic numbers
: which I created functions with javascript). However, if the user hits
: submit and comes to a confirmation page then they will have to go back
: to the form and they wont' be able to, all the data will be lost...
: unless I create some kind of back button but not sure how to handle
: that with the javascript population of the drop down since javascript
: and jsp runs on client/server two different places.

Essentially, you're looking for a (browser-neutral) way to maintain form
input values between page clicks, especially for users clicking the
back button.  Is that correct?

If so:

1/ Use session variables to hold the data.

2/ The Struts framework does a lot of this for you, at the expense of 
   the learning curve.  It's a toss-up between that, and designing your
   own framework for this purpose.

3/ This question isn't really a Tomcat issue.  A general Java (servlets,
   JSP) forum may have more answers for you.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: jasper: out.write() for every tag

2004-04-25 Thread QM
On Sun, Apr 25, 2004 at 11:36:10AM +0200, Folke Behrens wrote:
: AFAIK the javac and the jit compiler are both not allowed to optimize 
: this. So this must somewhat hurt performance, right?

What does your profiler tell you?

If you're adventurous, you could take the generated Java source and fold
all of those write()s into a single call, then compare.


: I did some search and read earlier posts in the tomcat-* lists but 
: couldn't find any information about this. Have you any tips/URLs for me?

Well, since you asked for tips ;)
don't worry about it

Better yet,
don't worry about it
until you're having an IO-based performance problem
and a profiler has determined that out.write() is at fault

If JSPWriter is buffered (should be), buffering offsets the impact of
the write() calls.

It's not as though every call to write() sends data across the wire.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Re: Bean's problem

2004-04-25 Thread QM
On Sun, Apr 25, 2004 at 12:57:53PM +0200, [EMAIL PROTECTED] wrote:
: Yeah, I've changed my source code and add
: package beanservlets; situation is the same.

I'll assume the following:
Tomcat sees the new, corrected .class file and not the old one
(in WEB-INF/lib)

Tomcat was restarted

My only other idea is that there's a rogue JAR in one of:

WEB-INF/lib
{tomcat install}/common/lib
{tomcat install}/server/lib

Duplicate jars cause some very misleading error messages.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Bean's problem

2004-04-23 Thread QM
On Fri, Apr 23, 2004 at 09:21:51AM +0200, Wojtek Gnus wrote:
: I've changed my CLASPATH - didnt help me.
: Any ideas?

Yes, and this is the big tipoff:

[javac] class file contains wrong class: Select_zmiana

Have you changed the source files to match the package designation?

That is, you've placed the files in a package dir of
{...}/WEB-INF/classes/beanservlets/


but did you add
package beanservlets ;

to the head of the source file?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: A word of caution upgrading Tomcat

2004-04-23 Thread QM
On Fri, Apr 23, 2004 at 02:37:04PM -0400, John H wrote:
: I hate to open a can of worms, but I see no other choice. Something needs to
: be done about features that appear and disappear seemingly randomly between
: versions.

This isn't a flame, so please don't take it as such:

Products evolve.  

As noted by another poster, sometimes it's per the spec.
(SingleThreadModel, anyone?)  Other times, it's just a necessity.
(Perhaps the lead dev on a given feature no longer has the time/energy
to support it, and no one else picked up the torch.)

Even commercial products make dramatic changes between releases, some of
them not well-documented.  I've handled SunOS-Solaris, WebLogic 5-8,
etc.  Some apps had to be rebuilt, even recoded, but frustrations were
kept to a minimum when we didn't expect slam-dunk-then-Miller-Time. ;)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: FW: Tomcat stops loading when I run my servlet with load-on-startup

2004-04-23 Thread QM
On Fri, Apr 23, 2004 at 08:21:54PM -0400, Adrian Klingel wrote:
: Just to restate the issue, my servlet hangs because it needs to obtain an
: XML Schema from localhost:8080.  But it can't get it, because Tomcat won't
: finish loading until the servlet is finished.  But the servlet won't finish
: until Tomcat finishes loading.  Etcetera, etcetera ad infinitum.

I missed the full details of your original post, but is there any reason
the servlet *must* retrieve the schema through an HTTP request?  What
about making the file available off the classpath, and using
getResourceAsStream()?  (Google for examples, there are plenty.)

If it's an XML doc that's calling the schema, you could use a custom
EntityResolver to do the classpath-loading bit I described above.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Cannot use JK2 with Tomcat5 and IIS 5

2004-04-22 Thread QM
On Thu, Apr 22, 2004 at 11:40:37AM -0400, Moran Ben-David wrote:
: complain
: [snip] 
: /complaint

I missed your original post.  Is there any reason you must use JK2
instead of JK?  JK2 has given many people fits and starts over the past
few months. It sounds like it's still maturing.

As always, YMMV.

In defense of Tomcat and the developers:
I've also worked with commercial behemoths such as WebLogic and
WebSphere, and Tomcat has consistently proven itself to have an
appreciable balance of feature set vs ease-of-use.  (WebLogic's catching
up, but it still comes with a hefty price tag. ;)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Cannot use JK2 with Tomcat5 and IIS 5

2004-04-22 Thread QM
On Thu, Apr 22, 2004 at 01:14:03PM -0400, Moran Ben-David wrote:
: 
: Thanks for the warning.. I'm using JK2 on the assumption that JK2 would be
: better and didn't want to be left behind.

Sort-of yes, sort-of no:
JK is newer, and it's certainly going to get more development attention
for the time being... just like Tomcat5.

For the archives, and in the hopes that I alleviate some frustrations:

A lot of people out there seem to think Apache2 and/or Tomcat5 requires
JK2. That's NOT the case.

I run Apache2 + jk + Tomcat5 and it's been fine.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: java.mail.Session TC5 woes

2004-04-22 Thread QM
On Thu, Apr 22, 2004 at 11:21:55PM +0200, Mark Lowe wrote:
: Yeah .. Tried in both, either, or. ..
: 
: and in shared/lib to boot but no joy.

common/lib should be fine.

NoClassDefFoundError usually means that the class was found, but it's
not quite what was expected by the calling coe.

Are these the same versions of these jars that were used to build your
app?  -or have you rebuilt your app on these jars?

-and there's not another jar in the classpath (or in one of the /lib
dirs) with a conflicting class?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: mod_jk2 + tomcat 5. All processors in error state after some time under heavy load

2004-04-21 Thread QM
On Wed, Apr 21, 2004 at 09:21:28AM +0200, Thomas Lange wrote:
: I'm implementing a chat application, which sends all the chatting
: output for each user in just one long query (servlet), which last
: for the entire chatting session.
: 
: On leaving the chatroom, the client simply closes the connection,
: thus makeing the query fail, leaving the processor in an error state.

If the chat data is being stored in a session object, you could wrap
this up in a SessionListener:

. one member var (StringBuffer) holds the chat info

. when the session expires, call a PreparedStatement that inserts
  the StringBuffer's contents

This way, the data is comitted to the DB even if the user just closes
the window: sooner or later, the session will expire, the listener will
be triggered, and the data is stored.

-or did I misunderstand your question?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Deploy a directory on Tomcat 5.0

2004-04-20 Thread QM
On Tue, Apr 20, 2004 at 09:23:18AM -0400, [EMAIL PROTECTED] wrote:
: I have a directory that contains servlets. This directory, named testdir,
: sits on the server, but not in Tomcat 5.0 ( or webapps/WEB-INF/classes).
: How do I deploy this directory?

This and other questions are answered in:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

You may also want to check out the servlet spec.  I don't have the URL,
but you can search for it at java.sun.com

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Container calling destroy() method

2004-04-15 Thread QM
On Thu, Apr 15, 2004 at 02:42:06PM -0600, Yansheng Lin wrote:
: How about this approach?  Override the destroy() method in custom servlet so
: that it doesn't notify the container that the servlet has been marked
: destroyed.  I got a bad feeling about this one though:).

Is there any reason to dodge the spec on this? ;) 

In all seriousness: for the OP, what's your end goal? Why would you not
want a servlet's destroy() method called?  Better stated, what are you
trying to preserve that gets cleaned up when the servlet is removed from
service?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Container calling destroy() method

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 11:16:09AM +0530, [EMAIL PROTECTED] wrote:
: How do I control the webcontainer from calling the destroy() method of the
: servlets or JSP? Where do I make the appropriate settings?

Quoting the Servlet Spec v2.3, p 26:

- - - 8 - - - - - - - - - - - - -
SRV.2.3.4 End of Service

The servlet container is not required to keep a servlet loaded for any
particular period of time. A servlet instance may be kept active in a
servlet container for a period of milliseconds, for the lifetime of the
servlet container (which could be a number of days, months, or years),
or any amount of time in between.

When the servlet container determines that a servlet should be removed
from service, it calls the destroy method of the Servlet interface to
allow the servlet to release any resources it is using and save any
persistent state. For example, the container may do this when it wants
to conserve memory resources, or when it itself is being shut down.
- - - 8 - - - - - - - - - - - - -

Short version: not possible.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: [OT] JAVA_OPTS in catalina.sh

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 06:46:35PM +0800, Thomas Chua wrote:
: but i am not familiar with linux so i do not know whether this minor 
: difference
: will cause the VM to crash.

The RH kernels leave their .config file in /boot (I forget the exact
name).  Run a diff between the two files and you'll see the options for
each one.


That said, there could be other differences between the two machines --
libraries, physical memory problems, etc.

Have you had any luck posting finding this problem in the Java forums on
Sun's website?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: [OT] JAVA_OPTS in catalina.sh

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 10:15:36AM -0600, Jeff Tulley wrote:
: Could this possibly be a time to try setting LD_ASSUME_KERNEL to 2.4?


perhaps -- but I thought that only affected the underlying NTPL
threading functionality...

Did RH backport NPTL that long ago (RH ES 2.1)?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Garbage collection of classes with static variable

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 09:46:12PM +0100, Tiago Matias wrote:
: As a side question, if the singleton life cycle can not be easily 
: controlled or known, what is the best way to perform an one-time 
: expensive initialization?

If it's just general init activity (say, loading a config file),
do a web search for ContextListener

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: running SaxonServlet under Tomcat 5 and saxon 7

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 05:00:23PM -0400, Cindy Girard wrote:
:   I'm running the newest versions of jdk, tomcat, and saxon.
:   Saxon is running under tomcat (it sees the directory structure in
:   http://localhost:8080/saxon , but I can't get it to see
:   SaxonServlet. I've tried putting SaxonServlet.class in every
:   WEB-INF/classes directory I could find with no result.

If Saxon is just another webapp (or lone servlet, or whatever) you
should only have to put it in {context}/WEB-INF/classes or a jar in
{context}/WEB-INF/lib.  Putting it in other dirs may give you trouble
down the line.

What does the Tomcat log say when the servlet fails?

What's the web.xml entry for the servlet declaration and mapping?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: No Java compiler was found error from time to time

2004-04-14 Thread QM
On Wed, Apr 14, 2004 at 03:28:35PM -0700, Fedor Smirnoff wrote:
: Besides that for some reason no matter what I do I cannot change the heap
: size it stays at 66MB. Going to Windows System Enviroment variables and
: setting JAVA_OPTS to be (-Xmx512m -Xms256m) does not affect it at all, I
: don't think I need to restart server do I? restarting Tomcat doesn't help

You probably don't want that as a systemwide setting.  All Java
processes would claim a 256m min heap. ;)

You could edit the start script (catalina.bat, under Windows, iirc) and
put the params there.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: headers --

2004-04-13 Thread QM
On Tue, Apr 13, 2004 at 07:14:26AM -0400, Alex wrote:
: is there a way in tomcat that session info is duplicated between
: ssl/non-ssl ?

This has been discussed recently on the list -- please check the
archives.

A search for session hijacking in the message body should give you the
whats and whys (or why nots)...

btw -- please start new threads, instead of replying to old messages.  

Thanks!

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: deployment questions

2004-04-13 Thread QM
On Tue, Apr 13, 2004 at 03:09:04AM -0700, Riaan Oberholzer wrote:
: precompiled JSP's aren't always detected and instead
: Apache web server searches for the actual jsp file,
: which does not exist.

This follows some of my experience: Apache's URI resolution requires the
.jsp files to exist before it decides to pass the handling of those
files off to mod_jk.  You could leave the .jsp files there, or have some
creative Ant work zero out the files before it packs up the .war.


A general note re: your hosting company: perhaps you could get them to
clue you in on specifics of their setup?  Explain that you'd like your
dev environment (or a separate staging environment) to mimic theirs,
to reduce your deployment headaches.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Using the request object and EL

2004-04-12 Thread QM
On Mon, Apr 12, 2004 at 07:14:19AM -0400, John Trollinger wrote:
: 
: I have a jsp page that has the following code
: [snip]
:   request as EL: ${request.contextPath} br/
:   request using page context as EL:
: ${pageContext.request.contextPath} br/

You're using JSTL EL, but you're not closing those expressions in JSTL
tags.  That's the only way the page is going to know what you've
included is meant to be JSTL-style dynamic content.

btw, change request to requestScope inside JSTL EL.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Using the request object and EL

2004-04-12 Thread QM
On Mon, Apr 12, 2004 at 10:03:09AM -0400, John Trollinger wrote:
: But the ${pageContext.request.contextPath} prints fine its only the
: ${request.contextPath} that does not display

Fair cup -- I can't tell you what you've seen; I can only tell you what
(I thought) shouldn't work ;)

You're using one of the new JSP 2.0 JSP file tags, I take it?


: And if I do a c:if ${empty request} it returns true but a c:if
: ${empty pageContext.request} returns false.

What about the other info I gave you? Changing request to
requestScope w/in JSTL EL?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Apache2+Jk2+Tomcat5

2004-04-12 Thread QM
On Mon, Apr 12, 2004 at 07:37:31PM -0400, Yang Xiao wrote:
: I'm trying to get Apache 2.0.49/JK2/Tomcat 5.0.19 to work
: I was able to get JK2 to compile and placed the mod_jk2.so and libjkjni.so
: in /usr/local/apache/modules
: But when I start the Tomcat server, I'm getting this error
: 
: INFO: APR not loaded, disabling jni components: java.io.IOException:
: java.lang.UnsatisfiedLinkError: /usr/local/apache/modules/libjkjni.so:
: /usr/local/apache/modules/libjkjni.so: undefined symbol: apr_md5_final

The error message is your big clue here ;)

Do a web search for the details of what this message means, then run
ldd on libjkjni.so to determine which shared libs it requires. 

Notice which libs ldd says don't exist, and set (or append)
$LD_LIBRARY_PATH accordingly.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Request parameters getting lost

2004-04-12 Thread QM
On Mon, Apr 12, 2004 at 07:50:55PM -0400, Frank W. Zammetti wrote:
: So, my question is twofold... One, has anyone ever seen such an issue as
: missing parameters before, and if so, what information can you share with me
: about it?  Two, am I off my rocker to think that connector config is way out
: of wack, and assuming it is, what suggestions would you guys have to fix it,
: given the approximate load I've stated here?

The params may never reach Tomcat:

- do your end-users use a different browser than you?
- does the app rely on javascript to set any params?

See what I mean?

Maybe you could use a servlet filter, to track params as they enter the
container?  You mentioned this is an intermittent problem, though, so
you could burn a lot of log space in the hopes of tracking down the
bug...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Struts with Tomcat and Apache

2004-04-10 Thread QM
On Sat, Apr 10, 2004 at 12:24:11PM +0200, Ralf Schneider wrote:
: No, I'm not new to Tomcat. I've some experiences with it together with 
: Apache2. My job is to move a project using these two players towards Struts. 
: So, one requirement is that the basic infrastructure remains as it is. 

Understood.  My idea to start with just Tomcat was to help you get the
Tomcat+Struts up and running before putting Apache in the picture.  It
wasn't a suggestion to go to production w/o Apache, if the app needs it.


: I know. And as John suggested, I also read a book (in german) about Struts, 
: but it only explains how to use it with Tomcat without Apache.

I suppose, then, I don't understand your question.

What sort of specific problems have you run into?

Admittedly, it's been a while since I've done a struts setup from scratch,
but I don't recall anything special about putting Apache in front.  -that
is, nothing special beyond what you'd do for putting Apache in front of any
webapp (i.e. mod_jk or jk2 configuration).

Assuming you have all of the prerequisite JAR files -- and I think there's
a version of struts-blank.war that includes them -- then you just drop the
WAR file into Tomcat's webapps/ dir and it runs.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: directory structure and porting issues

2004-04-10 Thread QM


: - Is there an online guide that helps app developers select a directory 
: structure that is portable across servlet containers?

The servlet spec.

Do a search at java.sun.com for it.  You'll want 2.3 if you're running
Tomcat 4, or 2.4 if you're running Tomcat 5.  Either way, it's available
as a PDF. 


As a Java web developer, the spec is your guide to webapp standards and
portability.  At the risk of sounding facetious, it answers all of your
questions except this one:


: - Finally, is it the best practice to hard-code the 'context' prefix in 
: your application?

JSTL.  I forget the exact tag names, but any JSTL reference will have
them listed.  There's a tag for creating context-relative links, and (I
believe) one for creating context-relative image tags.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Struts with Tomcat and Apache

2004-04-10 Thread QM
On Sat, Apr 10, 2004 at 05:19:18PM +0200, Ralf Schneider wrote:
: javax.servlet.ServletException: 
: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V
: org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256)
: javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
: 
: root cause
: 
: java.lang.NoSuchMethodError: 
: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V

For grins and giggles, I dropped struts-blank.war into a test Tomcat5
deployment.  It worked without a problem.

- what JDK are you using? 1.3 or 1.4?
- did you see the list of prerequisite software on the Struts page?

After that, it's time to hunt for rogue jars...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Trying to start tomcat. Should be so simple

2004-04-10 Thread QM
On Sat, Apr 10, 2004 at 12:46:02PM -0500, Randy Paries wrote:
: I have two identical boxes. Tomcat starts on one and not the other
: 
: The jar that it says it can not find is there. 
: /WEB-INF/lib/mm.mysql-2.0.2-bin.jar
: If I do ls -ls /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar 
: It is there
: [snip]
: - Root Cause -
: java.io.FileNotFoundException


What are the perms on said file? i.e. what's the output of ls -l on
each host?

If the jar is a symlink, try ls -lL

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Multi Threads

2004-04-09 Thread QM
On Fri, Apr 09, 2004 at 03:29:47PM -0400, shyam wrote:
: I have a question. When tomcat starts , I have a loadonstartup servlet
: which creates new thread and this thread will not die. Now the question
: is when I shut down tomcat , I want this thread to die . I want to know
: how tomcat notifies its sub processes about the shut down.

Sounds like a job for a ContextListener.

Not only were they designed specifically for this purpose, but they're
part of the servlet spec (2.3 and above, I believe) and thus portable
outside of Tomcat.

-not that anyone would migrate away from Tomcat, of course... ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Struts with Tomcat and Apache

2004-04-09 Thread QM
On Fri, Apr 09, 2004 at 11:38:38PM +0200, Ralf Schneider wrote:
: I want to use Struts 1.1 with Tomcat 5.0.16 and Apache 2.0.48. The Struts
: documentation only talks about Tomcat 3.x.

Setting up Apache+Tomcat and Tomcat+Struts are two separate processes
that don't necessarily have to be done at the same time:

* If you're new to Tomcat, you'd do well to start with a basic
  Tomcat+Struts approach first, then add Apache later on.

* If you want only to experiment with Struts from a development point of
  view, leave Apache out of the picture altogether.


As someone else mentioned, the struts-blank app is just a standard webapp.
The Tomcat docs describe the process of deploying a webapp.

http://jakarta.apache.org/tomcat

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Struts with Tomcat and Apache

2004-04-09 Thread QM
On Fri, Apr 09, 2004 at 03:01:30PM -0700, David Short wrote:
: Hey John,
: 
: When you get home, would you mind posting the names of the books?

I'm not John, but I'll play him on TV. ;)

Seriously:

Struts in Action (Husted et al, Manning Press) has been my guide.
It's a little heavy on the theory at times, but I find that much more
useful than the quick-hit books that leave you stranded the minute you
want to do something advanced.

This text covers Tiles, I18N, declarative exception handling, and
several other topics that other books (at the time, at least) either
glossed over or omitted entirely. 

Don't be fooled by its age: it's technically written for Struts 1.0
(with a chapter or two on 1.1), but much of the book is Overall Struts
Concepts which makes it largely version-independent.

Just be careful of which printing you get: the first printing was rife
with typos. For a while I had two bookmarks: one, for the page I was
reading; the other, for the page I'd made corrections based on the
publisher's errata site... ;)


If you're interested, there was also a recent thread on the struts-user
list of this same topic.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: JSPC not finding servlet files

2004-04-08 Thread QM
On Thu, Apr 08, 2004 at 04:27:50PM +0100, Allistair Crossley wrote:
: Last night I used the JSPC ant build to precompile all my JSPs. This created a
: SRC folder under my WEB-INF and a file called generated_web.xml but no
: classes? Therefore when I placed the web.xml entries and restarted and tried
: to run my apps lots of servlet not found exceptions occured. I noted in the
: build.xml that the classes should be compiled into WEB-INF/classes but they
: were not??? evern though the build said successful after compiling 94
: classes...there was however 1 class that did not compile ... would this have
: caused NO classes to be compiled and saved or did they go somewhere else?

Which version of Tomcat?
What's in your build.xml??

By JSPC, do you mean org.apache.jasper.JspC aka jasper2 in most
docs?

This class produces the raw Java sources from the JSP files. After that,
you still have to call javac to compile the sources.

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat Security Constraints

2004-04-08 Thread QM
On Thu, Apr 08, 2004 at 06:36:16PM +0200, Malcolm Warren wrote:
: Surely the authorization should be requested in all places and at all 
: times, whereever the request is coming from, even if from an include in an 
: unprotected page?

Clearly not, if it's going through. ;)

My understanding of the spec is that the security constraints are for
the originally-requested URI only.  

It's up to the developers to make sure content doesn't get include'd
or forward()'d to the wrong place.


: It has happened that I forget to type https:// and type http:// instead.
: So if a nasty, mean person is listening in, he can see my password 
: unencrypted, right?

Yes.


: How can I prevent this?

Use all SSL, all the time. -and I'm not being facetious there.  If the
data is that sensitive, why not?

Other than that, I believe there are auth restraints in web.xml that
require SSL auth.  I'd be more specific, but I'm deep into a C++ project
right today so my servlet spec knowledge is a little hazy.


btw, what's wrong with form auth?  I don't recall it requiring that much
extra programming.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: IllegalStateException

2004-04-08 Thread QM
On Wed, Jul 07, 2004 at 10:28:25PM +0200, Dr. Franz X. Steinparz wrote:
: The application works fine within Oracles IDE and it's built in servlet
: runner. However after deploying the app to Tomcat, Tomcat raises an
: IllegalStateException 
: (java.lang.IllegalStateException
: 
org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:399)
: ... 
: when a reponse object is handed over to another servlet.

Perhaps:

http://www.jguru.com/faq/view.jsp?EID=501393

Otherwise:
Full stack trace, please?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: dedicated Tomcat instances

2004-04-07 Thread QM
On Thu, Apr 08, 2004 at 01:41:59AM +0200, wsedio wrote:
: What is the best way to give dedicated Tomcat instances and accomplish 
: the above aims?

I forget the URL, so search the archives and/or Tomcat docs for
CATALINA_BASE... There's a doc on doing just this. YMMV but it's
been nothing but wonderful for me. ;)


: How many resources (CPU/memory) does each Tomcat instace require 
: approximately?

As much as they need (CPU) and are given (mem).

You can (sort of) cap the mem by setting JVM heap sizes with -Xmx etc.
I believe the default max heap size is 64m (?128m?).

CPU is a little tougher to restrict.  It's more a game of spot the
resource hog and then use the profiler.

I've found top and ps great at pinpointing the hogs in large-scale
environments. ;)


-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Inter Servlet Communication

2004-04-07 Thread QM
On Wed, Apr 07, 2004 at 11:47:50PM +0100, Gareth Western wrote:
: Can someone fill me in as to what I need to do to make objects that are 
: instanstiated in one servlet available to another servlet? I tried using  
: getServletContext().setAttribute(some.name, myObj) however I was unable 
: to retrieve the object in the other servlet. 

Silly question 1:
is myObj null in the servlet that calls setAttribute()?
(have to ask)

Silly question 2:
single Tomcat install, or clustered? i.e. are getAttribute()
and setAttribute() being called from the same host, same
webapp?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat 4.1.30 - servlets no longer working

2004-04-05 Thread QM
On Mon, Apr 05, 2004 at 03:56:02PM +0200, Support wrote:
: HTTP Status 404 - /servlets
: The requested resource (/servlets) is not available.
: [snip]
: .jsp against it are still working fine.

Let's trade: you provide some details about your setup, and perhaps
someone can hint at a solution.

Are you accessing Tomcat through Apache (mod_jk)? 
If so, check whether a jkMount directive got whacked.

If you're hitting Tomcat directly, what do the error logs say?
etc., etc.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Apache 2 Tomcat 5 connector location and configuration

2004-04-05 Thread QM
On Mon, Apr 05, 2004 at 10:42:18AM -0400, Myles Moutoux wrote:
: Does anyone know where the connectors for 
: other linux platforms are located? Does anyone have a functional 
: configuration that I could use as an example.


Have you checked the archives yet?
I'm pretty sure this has been discussed recently, and at great length.

Somewhere along the lines I've seen posts that detail instructions on
how to compile jk2, configure, etc.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Apache 2 Tomcat 5 connector location and configuration

2004-04-05 Thread QM
On Mon, Apr 05, 2004 at 11:08:26AM -0400, Myles Moutoux wrote:
: I have checked the archives and there is nothing for tomcat 5, which is 
: supposed to be the newest release. I have also seen quite a few of the 
: post, but, again they all refer to prior versions and I've tried using 
: the MOD_JK.so from tomcat 4.x and it doesn't seem to have the proper 
: linkages for Apache 2.0.49. It errors out when you try to load it thru 
: the config file.


What about this?

Tomcat 5 on Linux Step-By-Step
http://cymulacrum.net/writings/tomcat5/c831.html

The compilation instructions are for RH9 but my guess it should be
the same once the prerequisite packages are installed...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Re: problem with new 2.04 mod_jk2

2004-04-03 Thread QM
On Sat, Apr 03, 2004 at 11:38:37PM -0500, Daniel Savard wrote:

: I know it's no longer a Tomcat question, but anyone knows what can
: influence the result of the ldd command? A but? A problem with the glibc
: library? Anyone has ever encountered such a problem?


Smells like $LD_PRELOAD.

What's the result of a diff between env | sort for each user?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Virtual Hosts Kill My JSPs

2004-04-02 Thread QM
On Fri, Apr 02, 2004 at 09:18:54AM -0800, Lisa Simaki wrote:
: Host name=xxx.test2.com debug=0
:   appBase=C:\TestWebSites\test2
:   unpackWARs=true deployOnStartup='true'
:   autoDeploy=false
:Context path=/ docBase= debug=0
: reloadable=false /
: /Host
: 
: Host name=xxx.test1.com debug=0
:   appBase=C:\TestWebSites\test1
:   unpackWARs=true deployOnStartup='true'
:   autoDeploy=false
:   Context path=/ docBase= debug=0
:reloadable=false /
: /Host

It's a stretch, but:
I know using workDir has been recommended already; but
did you restart Tomcat after adding it?

-also, did said dirs already exist?  

For example,

Host name=xxx.test1.com
workDir=c:\temp\TomcatWork-test1.com ...
Host name=xxx.test2.com
workDir=c:\temp\TomcatWork-test2.com ...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Installation Help Needed

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 12:16:49AM -0500, Stormblade wrote:
: Then I tried to access my box from another machine and there
: is no answer. www.mymachinedomain:8080 doesn't even give me the default
: page.


What's the result of

lsof -i -a -u {tomcat user}

?

-or better still,

lsof -n -i -a -u {tomcat user}  ## show IP addresses

Does that IP address match what your workstation (browser) thinks is
www.mymachinedomain? e.g. do you have some sort of split-domain DNS
going, or a rogue hosts file?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Of .war and .jar files - and .jsp class files

2004-04-01 Thread QM

: The automatically generated .class files in Tomcat are in the 
: org.apache.jsp package, but the folders /org/apache/jsp aren't there in 
: the file system, if you see what I mean. It would have been nice if the 
: package logic had been followed through.

?
I'm not sure I follow.
I just checked my own jar of precompiled JSPs and saw the following:

org/apache/jsp/index_jsp.class
(etc, etc ...)

Perhaps I missed this in your original post: do you run Tomcat4 or 5?  

My knowledge of (Tomcat) precomp is solely from the 5.x series.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: How does Tomcat manage Form-based authentication?

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 04:38:49PM +0200, Malcolm Warren wrote:
: With BASIC authorization, which I used to use, the browser was sent an 
: Authorization header.
: 
: This doesn't happen with FORM-based authorization.
: I believe Tomcat deals with it all, but how? Anybody know?

Not sure I understand your question -- with FORM-based auth:
- the container detects an attempt to access a protected resource
- container sends requestor to designated form page, which posts
  to the blackbox j_security_check
- success = user is taken to originally-requested page
- failure = user is taken designated no-go page

Is that the answer to your question?

btw, please start new threads for new topics -- replying to an old
message plays hell with thread-aware mail readers, even if you change
the subject. ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Re: Installation Help Needed

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 10:14:52AM -0500, Stormblade wrote:
: Forgive me but I'm unfamiliar with that command. I typed it exactly 
: as you had it above. Copy and paste even.

For the archives:

lsof is a tool to LiSt Open Files.  It lets admins match a port to a
process, among other things.  Invaluable for troubleshooting.

Back to the original post:

{tomcat user} = use the name of the tomcat process owner ;)
You could also have run:

lsof -i :8080

I should've suggested that instead.


No big deal.  The fact that you didn't see anything is the key:
Tomcat didn't successfully start.

So now it's a matter of digging through the logs.
Look for a file catalina.out


: I did do a lsof -i -a and got a listing. I didn't see tomcat user or 
: anything that said tomcat even. Was I supposed to create a tomcat 
: user? I installed tomcat from the rpm.

I believe the RPM creates a user and group tomcat for you.  


-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Re: Re: Installation Help Needed

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 11:07:21AM -0500, Stormblade wrote:
: java19217 root5u  IPv4 811539   TCP *:webcache (LISTEN)

OK, so Tomcat is up and listening.
(I'll assume that webcache = 8080; that's for you to confirm.)


Next step: from the Tomcat host, try to interact with the port.
Use Lynx if it's available; otherwise send raw HTTP requests to the
port, e.g. telnet localhost 8080

Don't worry about specifying valid webapp paths and such: IIRC tomcat 
doesn't even send an error page when you connect from the browser,
right?


If that works -- even a tomcat error page -- try the same technique from
your other machine.
(telnet tomcat-host 8080 or lynx http://tomcat-host:8080/something)

If that fails, then you're pretty much down to a networking problem
(fw/router/host file/DNS mixup).

Run ifconfig on the tomcat server to confirm the IPs are what you think
they are.  Issue requests to the IPs, if need be.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat 4.1Configuration 404 error

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 11:26:54PM +0530, Taj wrote:
: web-app
:servlet
: servlet-nameGetInput/servlet-name
: servlet-classGetInput/servlet-class
:/servlet
: 
: Even after all this I get the 404 error: the required source was not found.


Which JDK are you using? Are your classes are really called
GetInput and not some.package.GetInput? JDK 1.4.x will give
you a few headaches if your classes are not in proper packages.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Automatic gzip of tomcat logs in Linux?

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 01:33:09PM -0500, Rhino wrote:
: It would surprise me if Tomcat is the culprit here since Tomcat 4.1.24 on my
: Windows XP doesn't zip its logs but I thought I'd ask anyway. If anyone else
: is using Tomcat 4.1.x on Mandrake, maybe you can suggest an alternate cause
: for this behaviour. I don't want to throw stones, I just want to stop this
: behaviour.

I'm going out on a limb here, but does Mandrake use logrotate?
Check /etc/logrotate.conf and /etc/logrotate.d for references to Tomcat
logs.

If you installed from a prebuilt package, perhaps that made an entry in
/etc/logrotate.d ; if by hand, perhaps one of your sysadmins made the
entry for you.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Getting all these errors in my mod_jk_4.log

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 12:46:29PM -0600, Randy Paries wrote:
: everytime one of the other sites gets access i get the following entry in
: the mod_jk.log file
: [Thu Apr 01 12:02:13 2004]  [jk_uri_worker_map.c (500)]: Attempting to map
: URI '/ldirectordping.html'
: [Thu Apr 01 12:02:13 2004]  [jk_uri_worker_map.c (618)]:
: jk_uri_worker_map_t::map_uri_to_worker, done without a match

Does this happen literally /every/ time, or just every so often?
IIRC the requested URI is related to Linux Virtual Server (LVS),
to confirm whether a given host is up and running (and failover
to a secondary if it's not).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Apache Tomcat Context

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 09:35:10PM +, Hari Om wrote:
: However, I would like to access namaste application by using only:
: http://khar.bazee.com and NOT using http://khar.bazee.com/namaste
: 
: Can anyone give some hints/informaiton as to how to proceed in doing that?

2 hints:

1/ read up on contexts in the Tomcat docs.  Specifically, root context

-or-

2/ play with mod_rewrite in Apache

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: tomcat xinetd

2004-04-01 Thread QM
On Thu, Apr 01, 2004 at 11:37:29PM +0200, Gianni Pucciani wrote:
: I'm using Tomcat 4.1 with Axis on a RH9 to develop a simple web service, 
: and I'm trying to improve securety starting Tomcat with xinetd supervision.
:  [snip]
: I've searched the net for help about tomcat  xinetd but I didn't find 
: anything, so I wonder if u could just tell me something.

xinetd works by listening on a given port, then firing up the specified
service when a request comes in on that port.

Are you sure this is what you want?

Even if this were to work, you'd end up starting a new Tomcat server
for each connection. =)


What about using a firewall, and/or some of the access-control valves
(I forget the exact names, but they let you limit access based on
incoming IP, etc.)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Of .war and .jar files - and .jsp class files

2004-03-31 Thread QM
On Wed, Mar 31, 2004 at 12:02:40PM +0200, Malcolm Warren wrote:
: Jrun gave an additional security possibility that I am unable to extend to 
: Tomcat. In Jrun you do not need to place your .jsp files, nor the 
: automatically generated .java files on your production server. I could 
: simply .jar up the automatically generated .class files and place the .jar 
: file in the /WEB-INF/jsp folder on the production server.


Tomcat does something similar:

- As one poster already mentioned, keep all of your jar files in
  WEB-INF/lib.

- make sure the JSPs are mapped to servlet paths in WEB-INF/web.xml.

(I'm out on a limb here, but it sounds as if Jrun automagically loads
your JSP jar file and creates the mappings for you.)

If the latter sounds like a pain in the rear, there are Ant tasks to do
the precompilation for you and generate the web.xml snippet.


: If I create a .war file for the production server then the .war file 
: contains no compiled .jsps, just the original .jsp files - is that right?

Not true.  The war file contains whatever you put in it.  JSPs, images,
jars, whatever.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: JSP problems

2004-03-31 Thread QM
On Wed, Mar 31, 2004 at 01:59:56PM +0200, Dennis Thrys?e wrote:
: I'm still having the problem I already wrote about, as a result of 
: upgrading a tomcat 4.0.1 installation to 4.1.30.

I missed your first message.  If what I say here doesn't help, please
refresh me on the problem.



: [snip] the classes are declared in the package org.apache.jsp.
: 
: Any ideas, how I can make tomcat (jasper?) load the classes that it just 
: generated and then compiled?

So then, you're precompiling the JSPs?

I recall from my 4.x days that precomiling directly into the /work dir
had some issues with package naming.

I don't have any URLs -- do a web search -- but there are examples for
building the JSPs into WEB-INF/classes and having Ant create the servlet
mappings (for web.xml) for you.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Of .war and .jar files - and .jsp class files

2004-03-31 Thread QM
On Wed, Mar 31, 2004 at 02:55:16PM +0200, Malcolm Warren wrote:
: Now when I transfer everything to my production server I would like to 
: eliminate all of the .jsp pages from the application, and all of the .java 
: files, and just send a .jar file containing the .class files in 
: /work/Standalone/localhost/$applicationDir.

You can do this.
Sort of.

That's what precompilation is all about.
Please bear with me:

- JSPs get compiled down to servlets, either by you (precompiling) or by
  the container (at runtime).

- when the container compiles a JSP for you, it takes care of mapping
  the servlet to the context-relative URI that matches the JSP. So
  /x/y.jsp is mapped, behind the scenes, to some.package.x.y_jsp.class.

  To precompile the JSPs means you must tell Tomcat yourself which
  classes map to given URIs.  Hence the autogenerated file full of
  servlet and servlet-mapping entries I described in my last
  message.

- When you precompile, you have can even put the classes into a jar file,
  but that jar file must be in {dist}/WEB-INF/lib.  That's the only way
  Tomcat's classloader will find the jar.

- With the JSPs compiled down to code, and properly mapped in web.xml,
  you can remove the JSPs from your app.

See 


http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation

for more details on the precompilation process (assuming TC5).  It
mentions the generated web.xml fragment of which I spoke.



: That way the compilation is already done, and nobody can study my .jsp 
: files. In theory I could just create a directory tree somewhere of 
: org/apache/jsp/ copy all the automatically generated .class files into 
: this directory tree and .jar it all up, and Tomcat should find them either 
: in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it 
: doesn't.

Close, except that the jar of JSPs must exist in {dist}/WEB-INF/lib.
Tomcat won't load a jar from the context dir itself, aka
.//localhost/$applicationDir.  Just not how Tomcat works. ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Tomcat4 performance issue when manually removing compiledjsps in work folder

2004-03-30 Thread QM
On Fri, Mar 26, 2004 at 03:39:13AM -0600, Duncan Krebs wrote:
: But when I continue to load any jsp pages from the existing web app, my cpu
: hits 60%, the response time is slower and they seem to be getting recompiled
: on every request. Makes no sense, both the new and old jsp page have the
: same content but the old one seems to keep getting recompiled on every
: request. Do you have any ideas why Tomcat would be doing this?

That the files have the same content is irrelevant -- Tomcat sees each
JSP as a separate entity.

The question is, exactly what happens between page refreshes?  Are you
redeploying your webapp (i.e., overwriting a JSP with the same content,
like when you pull the files out of source code control)?

Is something else on your machine adjusting the files' timestamps,
causing Tomcat to think the file has changed and must thus be rebuilt?


fwiw, it's my experience that restarting Tomcat has no effect on the
compiled files in the /work dir -- Tomcat will still compare the
compiled version to the original.

-QM

-- 
software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: tomcat 5 send emails

2004-03-30 Thread QM
On Tue, Mar 30, 2004 at 11:35:44AM +0100, zhicheng wang wrote:
: i am trying to upgrade form tomcat4 to 5. but the send
: mail does not work.

Tomcat5 no longer ships with the JavaMail and Activation jars.
Simply grab those from Sun (or, if you're not feeling adventurous, from
your old Tomcat4 install) and put them in {tomcat5}/common/lib.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: tomcat5/tomcat4 comparison

2004-03-30 Thread QM
On Tue, Mar 30, 2004 at 09:44:23AM -0800, Neil MacMillan wrote:
: Hi all, I'm trying to gather all the information I can about pros/cons of
: migrating  10-15 servers from tomcat4 to tomcat5.  I have been unsuccessful in
: finding some good performance comparisons, and major feature differences
: between the two (major)versions.  Can anyone provide some links/docs for
: this?

Jokes aside, have you checked the release docs?  I don't have
the exact URL but they're on the website.

just a few TC5 new features/improvements that come to mind:
- support for servlet spec 2.4 and JSP spec 2.0
- clustering
- improved manager app (IIRC)

Unless you see some total whiz-bang feature that you've been
craving, then it's a matter of deciding whether you want to 
upgrade just for the heck of it, or to be running the latest
version. (-and that's not necessarily a bad thing.)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Error configuring application listener of class com.sun.faces.config.ConfigListener

2004-03-30 Thread QM
On Tue, Mar 30, 2004 at 09:51:04PM +0200, pkhadra24 wrote:
:  I can't start my application because of this error.
: Please help me how to resolve it:
: 
: 2004-03-30 21:37:47 StandardContext[/projet]Error configuring application
: listener of class com.sun.faces.config.ConfigListener

Help us help you -- what version of Tomcat are you running?

Apparently there's a known issue w/ certain JSF releases that magically
disappears in Tomcat 5.0.19.

I can't take all the credit for that -- I had some help:

http://www.google.com/search?hl=enlr=ie=UTF-8oe=UTF-8q=%22signer+information+does+not+match+signer+information+of+other+classes+in+the+same+package%22btnG=Search

;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: error running JSP Config on tomcat examples - tomcat 5.0.19

2004-03-22 Thread QM
On Mon, Mar 22, 2004 at 02:20:03PM -0800, Erin O'Neill wrote:
: My error message says this (in a small part):
: org.apache.jasper.JasperException: Unable to compile class for JSP

Two gut feelings strike me:

1/ the Java you have installed, what version is it?  You said you
have 1.4.x, but which one is Tomcat calling?

${JAVA_HOME}/bin/java -version

Back in the day, and perhaps still, Solaris shipped with Java version
1.2 in /usr/bin.


2/  JDK or JRE?  -as in, do you have

${JAVA_HOME}/bin/javac

If this is still a no-go for you, I'll think it over when I'm awake. ;)
-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Java Mail Real Email

2004-03-19 Thread QM
: Unable to complete :javax.mail.NoSuchProviderException: No provider for
: Address type: rfc822

The phrase completely functioning on another server is the tipoff --
what's in the working server's {tomcat inst}/common/lib?  Anything
JavaMail related?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: a question on viewing servlets

2004-02-23 Thread QM
On Mon, Feb 23, 2004 at 02:28:30AM -0800, ches_nutsy wrote:
: Yes.. um but i dont know anthing about xml, could you pleas please tell me how to do 
your saying?? i dont know how to configure any xml code... please... thanks.
: do i just have to write the directory where i save my servlets??

You may want to start here:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/deployment.html

There's even a link to a sample web.xml.

For a more in-depth look, the full servlet 2.4 spec is available at:

http://jcp.org/aboutJava/communityprocess/final/jsr154/index.htm

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: using jar files in place of class files

2004-02-22 Thread QM
On Sun, Feb 22, 2004 at 09:37:13AM -0500, Christopher Molnar wrote:
: 
: I am not sure if it possible. I have a web app that has about 30 class 
: files. I would like to be able to create a jar file that contains these 
: class files for ease of distribution (about 10 laptops). Is this 
: possible, and if so what do I need to put in the web.xml file to make 
: it work?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
section Quick Start

aka, Servlet Spec 2.3, Section 9.5 

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Does the isThreadSafe page directive work in Tomcat 5.0.18?

2004-02-22 Thread QM
On Sun, Feb 22, 2004 at 12:57:26PM -0800, Josh Rehman wrote:
: I changed this directive to false and looked at the generated servlet. 
: I was expecting to see that it implements SingleThreadModel but there 
: was no change to the generated servlet code. Have I missed something? 


Tomcat5 is a servlet spec 2.4 / JSP spec 2.0 container.  Those specs
deprecate SingleThreadModel and isThreadSafe, respectively.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Does the isThreadSafe page directive work in Tomcat 5.0.18?

2004-02-22 Thread QM
: Would it be a good idea for Tomcat to print out a warning about this 
: deprecation?

Not my say -- I'm neither on Sun's board for specs, nor a Tomcat
developer. ;)


Seriously, though: this is an issue that could argued either way, so my
guess is that the Tomcat crew decided in favor of the one way and that's
how it turned out.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: FAQ, but help!

2004-02-20 Thread QM
On Fri, Feb 20, 2004 at 07:58:29AM -0600, Tony Nakamura wrote:

: I do have one more question to ask, if I may.  Is there a list of
: all throwable exceptions by servlet and jsp?

Yes and no. ;)

1/ Yes: check the servlet spec for method signatures. For example, a
servlet's doGet() throws (IIRC) just a ServletException; so any Servlet
subclasses must wrap exceptions up in a ServletException.

2/ No: #1 excludes subclasses of RuntimeException (e.g.
NullPointerException) and Error, which can be thrown at any time yet
needn't be declared in a method signature.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Servlet won't run init()

2004-02-18 Thread QM
: Hello,
: I want a servlet to run its init() method when I start Tomcat.  I put 
: the following entry in web.xml but that doesn't do it:
: [snip]

Please, humour me: put load-on-startup after init-param. I believe
that's the order per the servlet spec.

Humour me, part 2: verify the method signature of your servlet's init().
A small typo makes the difference between overload and override...

Other than that, some details would be nice: Tomcat version, log
messages, what have you...


On an unrelated note: is there any reason you're using load-on-startup
instead of lifecycle listeners?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: jsp deployment

2004-02-12 Thread QM

: Tomcat chokes when the jsp is requested.  I get a 404
: error, the requested resoruce is not available.
:
: What do I need to configure to get Tomcat to serve the jsp?


Chances are it's a permissions issue on the file.  (Unless you've
tweaked Tomcat's config, it should already be able to serve JSPs.)

-QM

-- 

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


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



<    3   4   5   6   7   8   9   >