ternals, you can break
it into little pieces and bits and hammer to fit to support your protocol.
Also, there's the book "How Tomcat Works" which is actually a pretty good
book if you want to know how to write a network server in Java.
Regards,
Will Hartung
([EMAIL PROTECTED])
---
Finally, you can add a bit of code to your app to see if it's out of sync,
download it your self, then quit with a message saying "Updated -- please
restart".
All sorts of scary things you can do.
Since you're talking OS/X and
then I get the NoClassDefFoundError again.
So, it's not my JSPs (which don't use hibernate), and appears to be JspC
itself!
I don't see anything resembling a Hibernate jar in the Tomcat distro, so I'm
just curious where this might cropping up.
Any ideas?
Regar
ogger and record a days traffic, and then replay it
against a test server (with all the monitoring etc.), then I can more easily
reproduce the problem without heavily impacting performance of the
production server.
Anyone have any ideas?
Regards,
Will Hartung
([EMAIL PROT
refactor
Jasper into my webapp. When I deploy my webapp on to a stock Tomcat (or,
ideally, any other compliant container), the user now gets two copies of
Jasper -- the installed version and my version in the webapp.
Doesn't that seem redundant? It just seems like a painful hoop to jump
through.
I&
th the specification. One of the notable bits
about it is simply the fact that within the spec, you're pretty much not
guaranteed writeable access to the file system at all (save for a temporary
area, and it's simply that -- temporary). But the reality is that most
engines give you access
a precondition that this not be the case
(and for 99% of most systems, it simply isn't an issue).
But, shouldn't this pretty much work with most common servlet containers?
Thanx for any insight...
Regards,
Will Hartung
([EMAIL PROTECTED])
---
ck in the servlet init() method:
You can also simply use the ClassLoaders getResource methods, and place
things in your classes directory.
(Though I think you're better off getting the ServletContext.getResource()
to work)
Rega
ike its imploding with something to do with UNICODE, so
perhaps you have some kind of strange Locale issue.
Is that matrixone stuff actually your JDBC driver? Any reason you can't use
the Oracle thin (JDBC Type 4) drivers?
This looks to me to be a
lement FTP on top of a Servlet
container.
But poke around Jakarta, they have frameworks to make it easier to write
socket server application, rather than just HTTP based server applicatons.
Conecptually you could do this in tomcat, but it's kind of off the main path
of what Tomcat does
make sure that your listener is even being instantiated.
Tomcat is pretty quiet with things like Listners, it doens't write error or
output where you typically see it for you application.
Check all of your logs to make sure the class is loading and starting up
correctly.
Rega
> From: "Steve Kirk" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 24, 2005 5:02 AM
> I don't see how you will do that without installing some kind of dynamic
> webserver on each PC, whether that be apache-hpptd, tomcat, or other, plus
> the web application (which n
or client side validation is still a valid and worthwhile pursuit, you
just need to be redundant on the server side.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t;%= something %>
There are, of course, innumerable frameworks and such that can present HTML
elements and forms to your Java code as objects (JSF for one), but the above
is the basic of basics on how it all works and is inevitably done.
Regards,
Will Hartung
([EMAIL PROTECTED])
urse be
> a coding issue in a JSP or what have you, but my error logs are not
> pointing to anything unusual.
What do your GC stats look like? (-verbose:gc) Is TC out of memory and
fighting itself? Even worse, is Tomcat swapping? (Java no like swapping, no
sir. Bad. Really Bad.) Remember tha
age the nice things that it does for you rather than
reinventing the assorted wheels.
So, you'll get things like Filters, Sessions, Event listeners, Request
processing, Forwarding, etc. The whole HTTP stack.
Regards,
Will Hartung
([EMAIL PROTECTED])
---
nnot add/change/delete users or groups in the
> database from the Tomcat Admin consol. In other words authentication will
> be indirectly performed using an external DB.
I would suggest you go take a look at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html quickly to
mak
another web server.
Not to discount the XML-RPC and SOAPs, they have their place most certainly.
No doubt XML-RPC started just like this and grew from there (and then into
SOAP), but its just a simple example of how easy this can be when you have
control over the whole shebang.
Regards,
Will Hart
ms pretty static).
I simply sort by subject, select them en masse, and delete them my self,
then I resort by recieved date like normal.
I'm confident the Powers That Be are working diligently to fix the problem,
whatever the problem may be, so I'm not taking any dramatic measures.
Re
mcat is indeed for
whatever reason loading the entire applet into memory before streaming it,
then it would do the same thing before compressing it, so it wouldn't help
there either.
> 2. Is there a way to queue connections so that tomcat will wait until
> it has available memory
> From: "Richard Mixon (qwest)" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 17, 2005 7:53 AM
> Will,
>
> Thanks - that may be the simplest solution. It just seems errors prone
> (i.e. updating one of the httpd.conf files, but not the other). Still
> its appe
send
everybody to "site down come back later" static site, then we simply bounce
Apache with the new config.
It's is not particularly subtle, but we're not a 24x7 site so much, and it's
more to let folks coming in know what's happening.
But i
log out), I imagine that you're talking about an
internal system where this may not really be an issue.
Of course, when you add that 21st webapp, you will have a new problem.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To
he classloader for WebappA, and
another object of ClassX loaded by WebappB, and in WebappA you try:
ClassX myObject = (ClassX)getObjectFromWebappB();
That will fail with a class cast exception, because WebappA.ClassX !=
WebappB.ClassX.
Using a "clustering" style caching solution helps r
ked at using an XML Entity reference?
I'm not the XML guru, but I saw this snippet from Suns App server sample
build scripts:
]>
...
&sampleCommonCommands;
...
So, you might be able leverage that capability and use it as an Include for
your
this.
> Also, I'm still hoping someone has already done something similar. Any
> ideas on similar projects?
I'm not familiar with any, but that doesn't mean anything.
Regards,
Will Hartung
([EMAIL PROTECTED])
--
> From: "Kellner, Peter" <[EMAIL PROTECTED]>
> Sent: Thursday, May 12, 2005 6:14 PM
> I have a particular web page that hits a servlet and I'm finding that
> certain users suck out huge bandwidth. Does anyone know of any products
> or open source projects t
> From: "Tim Funk" <[EMAIL PROTECTED]>
> Sent: Thursday, May 12, 2005 5:17 PM
> The realm logic will be called before the filter logic. No way around it.
Yup, my major complaint with Servlet Authentication. You either use all of
it or none of it. I'd like to thin
> From: "David Wall" <[EMAIL PROTECTED]>
> Sent: Thursday, May 12, 2005 10:31 AM
> How will you configure multiple IP addresses on a single NIC? Normally,
> you have one NIC per IP address. You will need to use two keystores for
> each system, and configure the
of the other Tomcat session
infrastructure for free. Your webapp won't be portable if you really on this
though, since you have to change Tomcat itself to make it work.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscr
of the request, if not the spirit!
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ttleneck may be your DB server and the extra tomcat may not help
you at all, for example).
But, either way, testing is the key here to make sure everything is working
as planned (and unplanned) since the new configuration is that much more
complicated than it was before.
Regards,
Will Hartung
> From: "Wendy Smoak" <[EMAIL PROTECTED]>
> Sent: Wednesday, May 11, 2005 10:42 AM
Subject: Memory for JSP Compliation in 4.1
> Will adding
>JAVA_OPTS=-Xmx128M
> to catalina.sh help with running out of memory during JSP compilation in
> 4.1?
>
>
th is session replication so that
when you fail your primary Tomcat, the stand by will have the same sessions
in play.
Once you have the sessions clustered, then it's a matter of redirecting
traffic from the primary to secondary.
This is what a load balancer system can do for you, in that
does is call 'catalina.sh
version' (I'd like to think that script is executable for you). And all THAT
does is run the ServerInfo class.
Given all that, you should be able to figure something out.
Regards,
Will Hartung
([EMAIL PROTECTED])
---
rty app (passing in the context name key for them to
look it up)?
Context ctx = new InitialContext();
ctx.bind("yourDBPool", getNewDBPool());
Can you leverage a Custom Resource Factory to do this for you (assuming
simply binding it do
> From: "Tuan, Frank" <[EMAIL PROTECTED]>
> Sent: Friday, April 29, 2005 11:35 AM
> I'm trying to change the InputStream of the request. I don't think the
wrapper
> allows me to change the InputStream.
It's deeper in the ServletRequestWrapper, but
or something else.
One thing you can do is to put a "reset" directory in the top level of your
WAR, then put a ResetProperties class within there (in the "reset" package,
of course). Then, in your webapp protect the "reset" url with an invalid
role.
Finally, when t
gone, but that actual
data for the file is still around. When the file is finally closed, the
system realizes there are no more references to it, and removes the actual
data.
Just clearing up the process..
Regards,
Will Hartung
([EMAIL PROTECTED])
-
new InputStream
pointing to the stuff you just loaded in.
You can do that by loading the request into a byte buffer, and tying a
ByteArrayInputStream in the new Request that you forward from your Filter.
This has the downside of caching the entire request in RAM, so just be
aware.
Regards,
Wi
> From: "David Whitehurst" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 27, 2005 9:15 AM
> Will , I do editing application software for clients like BMW and
> Volkswagen, and my application had an issue where e.g. 2 records in
> 22,000 edits had the same data tied
Serializable)) {
throw new BoomBoomException();
}
}
Then, it's kind of adhering to the letter of the spec, but not really the
spirit of the spec.
It's fine to say that if you have Objects that are not Serializable in your
Session, the session will not be persisted, if and when
ware
sessions.
But, even the generic base version would try to persist session between
restarts.
Finally, if you're having issues, you can always wrap you non-serialized
items into a class that IS serializable, and either simply lie (so that if
it actually TRIES to serialize it, it will fail an
> From: "Just another UFO mechanic" <[EMAIL PROTECTED]>
> Sent: Sunday, April 24, 2005 10:42 AM
> Check out this new to the 1.5 JRE this will help with the memory and GC
> stuff.
> http://java.sun.com/j2se/1.5.0/docs/guide/management/SNMP.html
>
> Fantastic we
SPs/etc. are totally ignorant of the change, and
you can move ahead with very little knowledge of how the blogging software
works or is configured. It's a nice, non-invasive system to do exactly what
you want.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
s and measure your peak times if you
like. Trust me, you're not stressing anything here, and Tomcat will have no
problems whatsoever handling that traffic. Would it handle the 1000 users if
they all showed up at once? Probably not, but you'd be fixing other things
before Tomcat then any
ng to your site? If you're like a
majority of sites, not enough that the benefit of Apache is going to really
be noticable.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s. (And thus we see some of the
limits of replication, at least some of the things you need to be aware of.)
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
te(...)) which as far as i have found in
> the docs, is not replicated.
You need a cluster aware caching solution. Session replication is more for
failover and such.
Look at something like OSCache and its ilk to get the functionality that you
need.
okay... so disregard this. It turns out the servlet was parsing the
configuration document into a static variable that was not being reset
between tests. All is well with the world again.
-
To unsubscribe, e-mail: [EMAIL PROTECT
> From: "Shed Hollaway" <[EMAIL PROTECTED]>
> Sent: Thursday, January 06, 2005 6:59 PM
> Svein
>
> Did you ever get an answer to you question? If so, how separate the
logging
> for webapps?
The exceptions will log out to your log file if you actually bother to
c
figure over the phone with a random end user.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
to
manage the security bits, either hunting down a Unix Realm or writing my
own, that shouldn't be too hard.
In fact, I'm betting a bunch of this is in Tomcat somewhere (directory
browsing et al), so I was kind of hoping someone might have some hints on
stuff I can leverage to pull thi
lly, even if there is some overall continual performance overhead for
having an application loaded, yet unused, how many apps would you have to
have to where this overhead would actually be measurable, much less make any
kind of dif
put stream and server logic). When the source has data ready to read and
the sink is ready to take data, the NIO server grabs a chunk from the source
and feeds it to the sink, and then moves on to the other sources/sinks
within its queue.
The main thread of an NIO server can NOT block waiting for so
the container that I'm, frankly,
completely uninterested in.
Anyone have any tips on using Commons Logging within a Webapp without
interfereing with TOMCAT itself?
Thanx!
Regards,
Will Hartung
([EMAIL PROTECTED])
---
ess. You could also try added
RAM to the machine as well.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
the basic problem. I'll have to see how this works on a UNIX
box (i.e. does it write to a ~/.java_prefs directory, or what).
By using this API, you can plop a WAR on a server, then when the user first
tries to use it, run them through a "configu
Y and "it feels
slow", that alone narrows down the problem.
For monitoring some behaviors, try BEA JRockit, it comes with a nice memory
profiler system built in. It also has a method profiler.
Finally, if you're looking for production logging, none of the tools
mentioned will help there at
,
and you certainly can't write to a resource that's bundled in a Jar file.
On the other hand, you can get access to a Temp directory, and persist
information there, but there is no guarantee that the information will be
there when the container restarts.
What this means is that you can
still need to constantly update the
session information. It's not enough to know that "Bob signed in at 10am,
and expires at 10:30". If Bob actively uses the site, you want the time out
to be since last activity.
How are
Did you ever manage to get this to work? We're having similar issues but
don't find much in terms of resolution to the problems. Any luck??
Regards,
Will Hartung
([EMAIL PROTECTED])
- Original Message -
From: "Rodney Leger" <[EMAIL PROTECTED]>
To: <[EMAIL
t;
> So if you have patches - don't JAR them.
>
> Since the spec doesn't specify JAR order, it may be different between
> containers, containers version, or even OS's.
Right, it's "implementation dependent" :-/
I could also make my own jar, but I wa
quot;
I've gotten a simple standalone client app working, so it's pretty clear to
be the complicated class loader environment of the Tomcat that's tripping me
up here.
Any help at all would be welcome. The hole in my wall, monitor and desk is
ever expanding and my head Reall
If I have jars that I'd like to put in to the WARs lib directory (or, say,
shared/lib), is there any way I can, perhaps, name them to guarantee use
order?
For example, say I have:
mystuff.jar and mystuff_patch.jar
If I have CLASSPATH=mystuff_patch.jar:mystuff.jar, then, ordinarily, Java
ner quit, you can reload
and process those requests later after restart.
Like I said, JMS does exactly what you want, but if your needs are fairly
limited, writing your own is not overly complicated. A simple queue, a few
threads, a little DB work.
http://openjms.sourceforge.net/ is a free impleme
hether a user is qualified to go
to that link.
I appreciate this isn't the complete answer you were looking for, as it
would be nice to just throw the URL at the container and have IT figure it
out, but the current Container Managed security is pretty darn basic and
doesn't expos
Servlets
I'm under the impression that the Container Security layer is ABOVE the
Filter layer. So, if you have a Container Security Managed resource that is
also a Filtered Resource, then the Security will hit first before the Filter
has a chance to do anything (in this example check a cookie
ality or
functionality, and David may well be able to lift it and use it straighaway.
I'm just pointing out that this does not interact in any way with the
Container provided security infrastructure.
FYI
Regards,
Will Hartung
([EMAIL PROTECTED])
> From: "David Reed" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 05, 2003 2:10 PM
> Subject: Re: remember password HOW-TO?
> Thanks Will, So what are my alternatives to container
> based authentication?
Common wisdom today would be to use Filters, as the
y within your
web app.
The only other solution is to implement all security using standard
mechanisms with Servlets et al, but that's a big wheel to re carve out of
stone.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
bination
of the class and its class loader.
If you place the classes outside of the WAR, then those class loaders will
not be reinitialized when the app is restarted.
Of course, should those classes change, you'll need to restart Tomcat.
Also, you should still, I feel, bundle those classes
Look through the archives. On Dec 18, John Turner wrote a pretty good post
on the various connectors.
Regards,
Will Hartung
([EMAIL PROTECTED])
- Original Message -
From: "Deepa Raja" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 3:33
en for the socket of the webservice, as
it may not come up until after your dependent app is finished initializing.
You can't "wait" for the other application, as if it's the first one to
start up, it will block and the second webapp may never get a chance to
initialize.
H
e within different contexts
and would actually share very little. So if you're expecting the shared
servlet to see something set by WebApp A when run in Web App B, then you'll
be disappointed.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
t only is he working too hard, but
what he is doing may not even work. The assumption is that getResource will
return a URL to which the getPath part actually points to a File. That's not
guaranteed at all, I don't believe, particularly if the resource is buried
in a JAR.
I
ion didn't have application scope?
> If it isn't true for session scope then it's a design not JDK issue..
It's a JDK issue, so it's super duper global scope.
It's an interesting nit. It's a shame that they buried thi
, so you really can't win.
As someone else mentioned, you might try caching the sessions into a global
map with a filter if you'd like to track users, but, particularly with
session persistence and reloading, there's no guarantee that a session is
the "same&quo
opriate for one-off "code generation"
tasks.
If you keep the original HTML around, then you don't have to worry editing
in place, simply edit the master, run the filter, and re cut-n-paste.
Here's a simple
What I like is
pretty much irrelevant, as there's no way to change it or "enforce". Silly
rules I say. It's just part of the way folks deal with mailing lists.
Welcome to the Internet.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Original Message -
From: "Ayhan Peker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 1:29 AM
Subject: crontab problems
> Hi everybody ,
> I have a problem..I am trying to write an application , which will run
from
> crona
involved is NOT cheap (hell, it's not even "reasonable").
Apache's mod_proxy can "kinda sorta maybe almost" do it, but you lose
session affinity and other "nice" things.
Regards,
Will Hartung
([EMAIL PROTECTED])
at startup or
shutdown, but the PersistentManager will swap "old" sessions in and out of
the JVM, though it's marked as experimental in the docs
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html).
Now, you mentioned that you're not a Java person, so it's
rity in the Servlet Spec. This wheel has
already been invented for you.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
feedback" from
their messages. But, if your staff creates the data out of the view of the
consumers, then your consumers have no expectations of when new data will
appear in the system, so a delay between data submission and site update can
be minutes or hours or even days.
But, anyway, c
to restructure your code so that anything
that might throw an exception is done before you actually start streaming
the result. Granted, that's a lot more work.
However, setting the buffer size larger is legitimate, and perhaps something
you can do for development (no doubt your exception wil
at the file open code must scan the directory and perform this
match on the each of the results rather than rely on the file system to do
it instead. As you can imagine, the file system will do this MUCH faster
than Java/Tomcat can.
Second, you have the issue of potential name conflicts. If you have bo
> From: "Etienne"
> Sent: Friday, February 21, 2003 11:06 AM
> Subject: RE: Servlet filter and listerner best practices
> Thanks Will,
>
> The filter servlet is only for logging checking and parameter init. I
> would have like to learn more about (J2EE) patt
could organize your pages in a hierarchy so you
could simply put the filter on a parent directory part of the path would
help reduce the load on the web.xml file.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Another thing you can try is to time how long it takes to get the FIRST
record, rather than the entire thing. Sometimes the actual result set is
fully realized until after the first row is fetched.
Once the result set is realized on Oracle, fetching should be pretty quick.
Regards,
Will Hartung
way to access the internals bits of the server
from a desktop application without actually embedding Tomcat into it.
Finally, as for getting environment variables, System.getEnv() exists, but
it's deprecated, so it's probably best t
authentication
before in order to bypass the containers inherent authentication mechanism.
But, the API doesn't let you do this.
Which means you have to implement all of your own security some other way.
Which is a drag.
Regards,
Will Hartung
([EMAIL PROTECTED])
---
does not compile.
However, this SHOULD work:
Class c = anObject.getClass();
boolean b = c.isInstance(anObject);
I think that's what he wants. (I haven't tested this).
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
as no portable place to store this data, you're stuck specifying a
> location outside the war and we're back to the same problem.
Yup! Pain in the neck. Plus, you can not provide a "configuration free" web
interface to adjust those parameters. You will always need at least
t area
available.
Minimally, it would be nice if the container was supposed to offer up a
persitent implemenation of the Preferences API, or a writeable JNDI
implementation.
However, to be fair, I think a lot of that motivation is being sucked into
the J2EE side of t
Or is it fair to say that anything with
an "absolute" path off of the ROOT of the context is available?
(Mind, I'm not denying that it works, I'm curious if it working is a fluke,
or is it "guaranteed" across platforms.)
Regards,
Will Hartung
([EMAIL PROTECTED])
---
. Folks tend to forget about this mechanism and wonder where Things
Are Coming From when they don't seem them on the CLASSPATH variable.
However, I also agree with the other poster that CLASSPATH is really a
non-issue.
Regards,
Will Hartung
([EMAIL PROTECTED])
. I was reading
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html and
these two paragraphs are confusing:
The web application used to process each HTTP request is selected by
Catalina based on matching the longest possible prefix of the Request URI
against the context path of each define
write a generic Servlet, to spec, using the
Servlet API security mechanism, and have an application specific security
mechanism handle the details of the authentication.
Huh. Bother.
Yeah, that's a pain I think from a portability stan
ible things.
I'd be very interested to hear why a Filter would NOT work in this case, but
as I said, I haven't been totally following the thread here. It's probably
glaringly pointed out on line 12 of the initial post (RTFML Will! STFU!).
Humbly...
Regards,
Will Hartung
([EMAI
1 - 100 of 311 matches
Mail list logo