Let me try to explain this better,
The problem seems to be that Tomcat is shutting down the asynchronous
threads
BEFORE I can cleanly tell them to shutdown (from my servlet
contextDestroyed() method).
I tried getting control with finalize() in the thread instance, but this
didn't seem to get
Thanks for all the responses.
I have another question about shutdown.
My app has several asynchronous threads which it spins off. I need to
get them shut down cleanly.
These threads are not servlets and if I add a listener spec to web.xml
for them I get the startup message:
Thanks for the responses.
I tried using ServletContextListener and added my code to the
contextDestroyed() method.
It never seems to get called.
My servlet is listed in web.xml under a servlet tag and is initialized
just fine.
I also saw that there is a destroy() method which
I found the answer to my questions:
Documentation on ServletContextListener:
http://developer.java.sun.com/developer/technicalArticles/Servlets/servl
etapi2.3/
In order to ge the servlet invoked, you need a listener tag, e.g.,
listener
I've looked through a lot of documentation, forums and the Jakarta site
and cannot find any documentation that tells me how my Tomcat
application can get notified when Tomcat gets a shutdown.
I have cleanup I need to do.
I would appreciate any pointers to documentation or the
correct
Send the Authentication header with the username:password but
encoded in base64
Donie
Thanks, but how do I do that from a JSP-generated HTML page?
-- Frank
Is there any way to change the logged in user during a session?
I tried setting j_username in the session to the new user name
but then Tomcat throws a security error.
Is there some legal way to change the user during the session?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens
=someonepassword=base64pwd/.
Is there some way to set the userid and password in
the header from a page (genrated by a JSP) sent
from the server to the client
so that the login occurs silently (e.g. a page with just
javascript that does an automatic submit or a redirect
from the server)?
Thanks,
Frank Lawlor
java.security.AllPermission;
};
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list
My theory is that there are really six different people
named Craig McClanahan ;-)
Seriously, I agree Craig has been a great help to
many people.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software
When you make changes under WEB-INF/classes you
should use the manager app to restart your application.
See the manager app documentation in the 4.x
distribution (very easy to use).
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating
I'm not sure I understand you post, but
you could be having a problem with the
browser caching. Flush the browser
cache, set the browser options to always
check for a new page, etc.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating
Take a look at previous posts on this topic.
Take a look at what is in your log files.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED
I started with the directions for Tomcat 3.2 and jk_nt_service.exe
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html
and its copy of wrapper.properties.
I made the following additions/changes to wrapper.properties:
The only thing I found I needed in the classpath was
If you use a non-relative DTD reference you might need to
specify a proper file URI, e.g. something like:
file:///foo/bar
Note also the forward slashes.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy
this provide proper operation.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles
There are many books on online articles (@ Sun, Apache, etc.)
that describe the basics of how to organize web applications.
You might look specifically for Model 2 Architecture.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating
A couple of things to check
Is your servlet class really ActionServlet and not something
like com.mycom.ActionServlet?
If it IS ActionServlet then
the class file should be in WEB-INF/classes (if it is
com.mycom.ActionServlet then it should be in
WEB-INF/classes/com/mycom/).
Frank Lawlor
You can pass (possibly encrypted) information that
only the two parties know. This is essentially
authentication like your username/password.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software
of the
xml file. It does not do this when it is in WEB-INF/lib. This is
clearly unusable since the web app author has no idea where
the startup dir will be and no way to get the DTDs there.
Am I missing something here on how this is supposed to
operate or are these legitimate bugs?
Frank Lawlor
There seems to be a problem related to security when loading
jars from WEB-INF/lib. This was reported earlier by Sergey
V. Udaltsov
in the post titled policy for classes in WEB-INF/lib/my.jar.
It's not clear to me that this is a bug.
The exception goes away because the default
look in the logs you should see some more infromation.
By turning on more debug info, esp. for the ContextManager,
you should see more mapping information which will help
you see how it is trying to resolve the URL.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee
. Be very sure the wrapper.tomcat_home and
wrapper.java_home are correct.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional
I could install as many as I wanted but only one would run at a time.
Some possibilities:
- you didn't give each a unique service name
- you are encountering the JVM 3.0 service shutdown bug,
(see other posts: search on -Xrs)
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group
Just the /generator/* mapping should be sufficient.
What is the full URL you are entering? Should be
something like http://host:port/your_webapp/generator/TestView
What do the logs say? Turn on debugging for ContextManager
to see how it is trying to resolve the mapping.
Frank Lawlor
Athens
?
Obviously there is something MORE than just the class name that
is being used to distinguish them.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED
This is normal then. Class foo loaded by class
loader A is not castable to class foo loaded
by class loader B (if they are really independent,
of course - if A is the parent of B and B
delegates, it will work). You have to
put the class in a spot shared by both
webapps (that means the
Thanks. I packaged the classes in a jar and put them
in common\lib and now things work fine.
I'm still curious tho on how RMI/EJB clients manage
to do this without having the same class/classloader.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting
accept, I don't need to worry about inappropriate behavior
by the backend jsps.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional
.
There are lots of books with introductory examples,
tutorials online, and I think an example in the tomcat
distribution.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
How did you deploy the new classes? Just place the war file
in webapps or did you explode the war or place the new classes
where they belong yourself?
The manager documentation does mention that there are some
problems that seem to be related to re-deploying a war with the
same name.
Frank
Sounds like you have your http server (IIS, Apache?)
set to provide security. Turn it off.
(are you serving everything, even html, from tomcat?)
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software
I've started looking at some of the security issues
but I'm still behind where you are in the area of
your questions.
Where did you find this document that has
section 8 on Existing Risks and Problems
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned
. It will
do any housekeeping, including counting accesses and
then forwarding on to the desired servlet.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
Joel,
You asked for help from Someone who knows what they're doing
so I probably don't qualify, but you might try putting the xerces jar in
your
jre/lib/ext and see if it helps.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating
Have you read
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
If this doesn't answer your questions, then it might be good to
identify it here and try to get the howto updated.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned
access mounted drives
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
as URLs.
The best approach I could think of was to add a
simple tomcat web-app whose only purpose is to
hold the contents of New.
Any problems with this approach? Is there a
better/simpler approach?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm
should have been a set of APIs
which could be invoked programmatically (e.g.
addSecurityConstraint()) so this could be done more
dynamically without having to bounce the app to read
a rigidly structured xml file.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned
I don't know what the right answer is, but I got my app to
pick up the xerces parser by putting it in the jre lib\ext
directory (e.g. F:\jdk1.3.1\jre\lib\ext).
You might also try the tomcat common\lib.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned
of this
function.
I'd call this a bug.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
it (there is a MIME for .text)?
What are the WebDAV servlet invocation parameters and
what do they mean?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
There is usually some information in the log files even at debug=0.
If it clearly says that login is failing, check you case (must match),
that userid and pwd are varchar in the DB, etc. Maybe you REALLY
are not matching.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group
for 1
instance(s) to be deallocated
and then everything hangs.
Is this because the app is trying to restart itself? Do I
need to create another app just to do the restart? Sure
would be nice if an app could restart itself (e.g., to pick
up web.xml or other changes)
Frank
=$(wrapper.javabin)
-Xrs -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
-Dcatalina.home=C:\jakarta-tomcat-4.0-rc2
-classpath $(wrapper.class_path)
$(wrapper.startup_class)
-config $(wrapper.server_xml) start
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group
and that seemed to fix it. Again, not all these may be necessary
and there may be others that are for reasons I haven't discovered.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
).
It wasn't clear to me how you are passing your ResultSet, but
since it is not generally serializable (it is a live connection
to the database) you cannot pass it over RMI (e.g. from an
EJB). But I would expect this to throw a serialization error.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600
Third try since I never saw this show up:
Do you need to specify a security provider in java.security, e.g.,
security.provider.3=com.sun.crypto.provider.SunJCE
(the above is for Sun's encryption provider).
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned
the connection
itself.
It seems like this is something the servlet spec should address.
Any suggestions?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
Many of the especially older jdbc drivers did a very
poor job of implementing the spec and many of the
methods were not implemented.
What database/driever are you using?
Often the documentation was poor. You can try
getting the latest driver and checking what was
supported.
Frank Lawlor
is
non-unique IDs), then you need to still force people thru a specific
login.
Re object in a session.
- Note that this can be fabricated by a hacker. For real security
you need to look at encrypting it with varying keys.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group
Does anyone have any references or information on using
native windows security (NTLM?) for Tomcat security?
Are there any Java JNI wrappers for the native system calls?
Are there any higher-lever implementations to some other
more usable interface (JAAS, LDAP, etc.)?
Thanks,
Frank Lawlor
setting which Jasper generates when nothing is
specified?
Is this a bug?
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
why not use
%= Recordset.getString(CLASS_NAME) %
for everything?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
What error are you getting? FIle not found? Security error?
Not found would be a path problem. Security error would
be more related to the java.policy of the user you are
running under. Is the file on a mounted drive? (service
can't access these). etc.
Frank Lawlor
Athens Group, Inc.
(512
.
What are the pros and cons of the various approaches
(e.g., single vs. multiple realms)?
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
is a removable
drive. Why it stops and puts up a message is a
mystery to me. Anyway, fixing the path or forcing
it to something acceptable in the .cmd file cures
the problem.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy
this?
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
in Server.xml.
It is either a bug or some strange semantics I don't understand.
I worked around it by doing a sendRedirect with an explicit path
rather than forward.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy
.
After passing thru a couple of servlets, why is now insisting on adding
security/login to the path?
I have worked around the problem by just doing a sendRedirect, but
the above behavior confuses me and seems to contradict the spec.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group
I get this message if I replace one of my classes while Tomcat is
running. Try restarting Tomcat.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
in the work directory and no error
messages in any log.
I tried putting tools.jar in the Tomcat lib, adding it
to the service classpath, but it doesn't help.
Any ideas why jasper is hanging and how to fix/identify
the problem?
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens
lib to jre\lib\ext, what/how system properties must be set?
Thanks,
-- Frank
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
be applied
to make the FORM reference work, but I don't know what it is
(anyone know?).
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
is not only a
workaround, but a more maintainable way of doing things.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
. A
number of
them give this error. If I directly invoke the other pages I get no error
and when I
then invoke the main page, it is fine.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
.
Weird. Any ideas on what is caching the pages? How to
stop it.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
environment (e.g., IIS + Tomacat). The Apache.org
site only has a few of the pieces.
Are there any good references?
Thanks,
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.
file without the code for the % String =...
resulting in a compiler error that s is not define.
Stopping and restarting Tomcat and VAJ don't help. Re-booting
does.
Any suggestions?
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating
69 matches
Mail list logo