most
"rich" web applications these days.)
I ask this out of curiosity, I suppose - after all, it seems like sticky
sessions are the way to go and that would preclude the above issue
completely.
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mailto:veerukrish...@hotmail.co
go to ensure greater
application consistency, this leads to the question that with all the
benefits of sticky sessions, using what criteria would anyone decide against
using them? What's the tradeoff here?
Thanks.
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mai
I have a question about the section from the documentation below:
Distributed locking and pages using frames Tomcat does not keep session
instances in sync across the cluster. The implementation of such logic would
be to much overhead and cause all kinds of problems. If your client accesses
the s
In a web application that loads resources expecting them to be available on
the classpath (e.g. ResourceBundle.getInstance("resource")), is there a way
to alter what locations the web context classloader includes?
I'd like to add a URL to the search path of the web context classloader, so
that in
such a feature request?
Thanks.
lightbulb432 wrote:
>
> When deploying a WAR file whose code uses information stored in classpath
> configuration resources, where should you store these configuration files
> if outside of the WAR file?
>
> If you want to keep these configurat
When deploying a WAR file whose code uses information stored in classpath
configuration resources, where should you store these configuration files if
outside of the WAR file?
If you want to keep these configuration files outside of the WAR file to
make for easier deployment in multiple environme
t = org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.Threshold = WARN
> log4j.appender.stdout.Target = System.out
> log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L]
> :
> %m%n
I'm running Tomcat not from the command-line but from the Bootstrap class's
start() method. When I start it using the command-line, a logs/tomcat.log is
created in CATALINA_BASE, but not when I start from the Bootstrap class. In
fact, I get the "log4j:WARN Please initialize the log4j system proper
When a context is set with reloadable="true" and a change is made to one of
the appropriate folders, causing a context reload, what is and isn't
undeployed and redeployed?
I ask because, surprisingly, a static variable kept its state across the
automatic reload. Is this expected behavior? I thoug
I'm getting the output I expect if I don't comment out the first line in
catalina.bat. However, if I comment out "@echo off" as you suggested, I get
output where every line in the batch file seems to be executing on its own
line, executing as a command - why might this be happening?
e.g. commandl
arles R wrote:
>
>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>> Subject: Specify context path when context.xml is in META-INF
>>
>> Is there a way, when you have your context.xml in META-INF rather than
>> specifying the Context element in server.xml or elsewh
When starting Tomcat from the command-line in Windows using the "startup"
command, the first command-line window opens up another one. This second
window displays an error message but closes too quickly to tell what the
error message read.
If I place a "pause" statement after ":end" in the last l
Is there a way, when you have your context.xml in META-INF rather than
specifying the Context element in server.xml or elsewhere, to customize the
context path?
I'd like to use context.xml in META-INF because of the benefits of this
approach, but there seems to be no way to change the context pat
There's a requirement to allow code anywhere throughout the application to
store and access application-wide state by using a class as shown below. The
code cannot directly touch the ServletContext class, but may do so through
an interface (shown below).
public class ApplicationState {
private
I know people like to avoid those, but get real: refreshing a failed
> POST ought to re-POST the data (that will fail again). You should really
> only redirect on success.
Agreed, it's a much bigger consideration on success than failure. But once
you figure out a good way of approaching the issu
? That way, am I correct to say you
have a good solution - no race condition, no messages in query string, and
you can use redirects as desired?
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Mark,
>
> Mark Thomas wrote:
>> ligh
I have a question about whether there is a race condition with the following
technique for displaying messages across redirects.
If you submit a form with an invalid value on page P1 and the receiving
servlet S redirects to another page P2, you'd like page P2 to contain a
message saying "You ente
Rather than using Tomcat's own HttpSession, I may be implementing HttpSession
to write to shared storage or to the client. (Or if for no other reason,
then to learn something.)
Do you know of any HttpSession implementations that are publicly available,
as the task of storing session state in plac
Christopher Schultz-2 wrote:
>
>> What does Tomcat do when, in production, a new version of a WAR file
>> that's
>> currently being accessed is deployed? I've heard generally that you don't
>> enable the auto-deployment feature in production, but assume you're
>> aiming
>> for a five-nines envi
What does Tomcat do when, in production, a new version of a WAR file that's
currently being accessed is deployed? I've heard generally that you don't
enable the auto-deployment feature in production, but assume you're aiming
for a five-nines environment and the requirement is hot redeployment of t
What are the things you do when a user logs out? Some options include
invalidating the entire HttpSession, keeping the session alive but setting
some attribute (e.g. "loggedIn") to false, or doing something else I haven't
thought of.
I was thinking that upon logout the simplest thing to do is inv
e sender immediately by telephone or email and destroy the original
> message without making a copy. Thank you.
>
> - Original Message -
> From: "Bill Barker" <[EMAIL PROTECTED]>
> To:
> Sent: Friday, September 07, 2007 10:33 PM
> Subject: Re: Co
I'm reading some book concurrency books that talk about potential thread
safety issues with HttpSession. Specific cases follow:
- When the web container passivates an HttpSession while a user's request
modifies it
- When the web container replicates an HttpSession while a user's request
modifies
if
I'm correct, how would you override this? (My guess is the servlet class
pointed to by the text "j_security_check" is hardcoded somewhere within
Tomcat?)
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Lb,
>
> light
Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Lb,
>
> lightbulb432 wrote:
>> The requirement doesn't accept having two tables (i.e. userTableA and
>> userTableB), partly because increased maintenance, the possibility of
>&g
Great response. Follow-up questions below:
Christopher Schultz-2 wrote:
> When you login using form-based authentication, where invalid login
> attempts
>> redirect to the "form-error-page", how do you add a custom message to
>> that
>> page saying "Login Failed"? I ask because common practice i
Here's the case where three credentials are necessary: there is a requirement
to host multiple applications on a single database, and data such as users
are in a single, shared table. Therefore, someone logging into app A would
enter username and password of user1 and pass1, and someone else loggi
I have several questions about authentication and authorization in Tomcat
below, so answer only what you can :) Thanks.
Where does Tomcat authentication fit into the request processing lifecycle?
Does it happen before even the very first filter gets called? What happens
just before and just after
That sounds about right. Don't forget that you can't be stateless if you
> need logins of some type (unless you use BASIC auth, which looks ugly
> from a user point of view).
Why is this? Others who answered to this thread and discussions in general
around web applications describe statelessness
TH session affinity, or would that be completely
useless?
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Lightbulb,
>
> lightbulb432 wrote:
>> How are you designing your current applications, and what
>> implications has
Although the debate between session replication vs stateless can't be
definitively solved and depends on the application, I'd like to hear about
your experiences with both. How are you designing your current applications,
and what implications has the choice that you might not have expected -
woul
under commons.apache.org - so is this specific to an Apache
JMX implementation, part of JMX, or something else?
lightbulb432 wrote:
>
> The following link describes using JMX with Tomcat. Step #4 talks about
> the mbeans-descriptors.xml file, but it seems to make no difference when
> usi
orresponding setter, etc. Then
what is the use of this file if updating it to keep in sync with the MBean
interface makes no difference? Is it necessary to begin with?
Thanks.
lightbulb432 wrote:
>
> How, from a web application deployed to Tomcat, can you customize the
> behavior of y
MBeanServer to be returned? If so, how would that happen, and how would your
code deal with it?
Thanks.
lightbulb432 wrote:
>
> How, from a web application deployed to Tomcat, can you customize the
> behavior of your web application based on attributes specified in an
> MBean? Th
true, severly cripple one 8 GB instance serving 2*n users compared to two
4 GB instances serving only n users?
http://www.webperformanceinc.com/library/reports/windows_vs_linux_part1/index.html
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
&
If you have a gigantic server with something like 8 GB of memory, what would
be the best way to run Tomcat 6 on it? One instance, multiple instances, or
divide it up into two or more virtualized servers each with one instance?
Is Tomcat meant to run as one instance with that much memory, or is it
What is the minimum set of folders and files needed for Tomcat to run on
Linux? I ask because if you dedicate a server for Tomcat and nothing else,
you must want to minimize the size of the filesystem, disable/delete all
extra services, and more to increase the performance and decrease memory
util
s outputting UTF-16 encoded text to the actual response bytes)
Am I speaking rubbish here, or am I thinking about these concepts in the
right way?
Thanks a lot.
P.S. How did you learn all of that?!
Christopher Schultz-2 wrote:
>
> Lightbulb,
>
> lightbulb432 wrote:
>>
Why is the URIEncoding attribute specified on the connector rather than on a
host, for example? Does this mean that the number of virtual hosts that can
listen on the same port on the same box are limited by whether they all use
the same encodings in their URIs? Now that I think about it, wouldn't
ience, then shouldn't it be on the HttpServletRequest class as well?
If that's just the way it is, then that's fine... But is there some design
reason you can think of that the method is in the session but not request
object? Am I missing something here?
Caldarale, Charles R w
Why is it that you need an HttpSession in order to get a ServletContext? I
tried to obtain a ServletContext using an HttpServletRequest, but this isn't
possible in the API, unless you do a
request.getSession().getServletContext().
This creates a session, however, and I'm not sure I need a session
Could somebody explain when in the request process getLastModified is called
on a servlet? Is it before everything - all servlets, filters, listeners,
anything else?
If you have multiple filters, how does this fit into the process - are they
all guaranteed to see the process through before the ge
t in RAM (ok, maybe in
> swap files) nobody else using that machine can find them, and they go away
> when the browser ends.
>
> -Original Message-
> From: lightbulb432 [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 12:15 PM
> To: users@tomcat.apache.org
> S
How, from a web application deployed to Tomcat, can you customize the
behavior of your web application based on attributes specified in an MBean?
The link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html talks a lot
about Ant tasks, but that's not really what I'm looking to do.
How can you
> You mention that when you use a static content server, it's generally
>> something other that HTTPD. Is there a particular reason for that? What
>> static servers have you generally seen in use apart from HTTPD - are
>> there
>> things that just work "better" in the setup you described than oth
In production, for organizations that run multiple web applications, would
they run it on different instances of Tomcat (1 instance per web application
or group of related web applications), or all web applications as different
hosts on one instance of Tomcat? (Not taking into account clustering,
Any web application that needs to scale wouldn't use httpd (or
> anything else) in front of tomcat, so the question in- or out-process
> tomcat doesn't matter. From 5 high performance application I know the
> details of, 1 is still using apache in front; more out of habbit,
> rather than by need.
ks.
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>> Subject: Port-based virtual hosting
>>
>> Is there any functional difference between the two
>> options - if they're both even possible? Which would
>> you
Thanks for your detailed response. See questions below.
In-process Tomcat is to have Tomcat running in the same process space as
> Apache HTTPD, IIS, or other web server. Since most of the web servers
> are implemented in C/C++, you will have to use JNI to integrate with
> Java-based Tomcat, an
I read a few things that explained the difference (in configurations where
you must front Tomcat with Apache HTTPD) between in-process Tomcat and
out-of-process Tomcat, and have a couple of questions.
It said that in-process Tomcat will reduce latency (which I understand) but
decrease both stabil
To conserve resources when multiple elements are configured.
> No point in having a multitude of idle threads when some s
> are only lightly used or the usage pattern varies with time.
Is it safe to assume that this is the way to go, or are there ever, ever any
times when it would be less desir
Was just thinking about this, and am curious to know (though it's pretty
trivial)... Is there any functional difference between the two options - if
they're both even possible? Which would you go with?
- 1 Service element with 5 HTTP connectors (each on a different port) and
one Engine with 5 Hos
Thanks again. This has been a very enlightening thread (no pun intended).
Caldarale, Charles R wrote:
>
> Normally, there's a thread pool per . Tomcat 6 introduces
> the ability to share thread pools across multiple s, via the
> element. (I haven't tried it.)
>
When might an advanced Tomca
values in the session listeners that are inserted elsewhere in the same
request that created/invalidated a session, or bound/unbound a session
attribute.
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>> Subject: Re: Is ThreadLocal safe to use in ser
layers of code. But you should set and reset them properly, best in a
> filter.
>
> regards
> Leon
>
> On 6/2/07, lightbulb432 <[EMAIL PROTECTED]> wrote:
>>
>> Are ThreadLocal variables safe to use with servlets? There are some cases
>> where it could rea
During development, I'd like my sessions to stick around while I reload the
context or restart the container, so that when I make a change to a servlet,
for example, that requires a context reload, I don't have to relogin in the
application.
I notice the saveOnRestart attribute, which is supposed
I've set listings to true on TOMCAT_BASE/conf/web.xml's DefaultServlet, but
that allows directories to be seen for all contexts. Is there a way to set
directory listings for certain contexts but not others?
Thanks.
--
View this message in context:
http://www.nabble.com/Directory-listings-on-a-p
Can requests potentially arrive at a servlet before the
ServletContextListener's contextInitialized method has completed? I ask
because the method occurs as a notification once the servlet context is
ready to accept requests. Is there a chance, then, that a request could
begin being served while y
Are ThreadLocal variables safe to use with servlets? There are some cases
where it could really simplify my code if used correctly, but first I want
to make sure there aren't any horrible problems with doing so. (I've read
that the implementation of ThreadLocals has gotten much better with the las
When using the tomcat-dbcp DataSource, when my web application code gets a
connection:
myConnection = myDataSource.getConnection();
then executes multiple separate statements
myStatement1 = myConnection.createStatement();
myStatement1.execute();
myStatement2 = myConnection.createStatement();
m
How are extremely large web applications divided up into contexts (as I’d
imagine these applications don’t reside within just a single WAR)? Let’s say
you have different functional areas, like user registration, search, file
management, etc, could each of those be divided up into its own context,
When testing my application that uses sessions, I don't seem to see a cookie
with domain localhost in my browser's cookies folder. Does Tomcat use some
internal folder to put its cookies, or am I just doing something else wrong?
I do have cookies enabled, so it's not writing the session id to the
, the more my development (pre-deployment) would be as
close to production as possible, I'm guessing...
Thanks.
Rashmi Rubdi-2 wrote:
>
> On 5/25/07, lightbulb432 <[EMAIL PROTECTED]> wrote:
>>
>> The JSP spec says that if you precompile JSPs you can reduce the
I can't seem to find either of those two files in the Tomcat 6
distribution...interesting.
Bill Barker-2 wrote:
>
>
> "lightbulb432" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>
>> The JSP spec says that if you precom
;
> The precompiled JSP classes are placed inside WEB-INF/classes/jsp. I
> guess you can also probably archive
> these files in a WAR file.
>
>
> --Lakshmi
>
> -Original Message-
> From: lightbulb432 [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 25, 2007 10
The JSP spec says that if you precompile JSPs you can reduce the JSP
container footprint by excluding the JSP compiler. How can this be done in
Tomcat?
Thanks.
--
View this message in context:
http://www.nabble.com/Excluding-JSP-compiler-from-Tomcat-tf3817429.html#a10807251
Sent from the Tomcat
I took a look at JAASRealm and its authenticate method only takes two
parameters (username and "credentials", which is really just a single
password string).
Is it possible to pass my other credentials to the JAASRealm so that I can
pass everything at one time (username, password, other credentia
with your own, put your jar
> into "$CATALINA_HOME/server/lib, restart -> voilá
>
> had to do that once, however, it's a bad hack
>
> On 5/24/07, lightbulb432 <[EMAIL PROTECTED]> wrote:
>
>> implementation. Could somebody describe the difference between y
asses that I'd
be calling, right?)
Any thoughts?
lightbulb432 wrote:
>
> I know the cause of the problem - my use of embedded tomcat. When I tried
> it with the standalone Tomcat, it works fine. What I'm confused about,
> then, is how to fix the following code to make it wo
Thanks for pointing me to that class. How can I specify my overriden version
in a configuration file or programmatically so that it can be used?
Also, I was looking into how to solve the problem from my original post, and
came across the concept multiple times of providing my own Realm
implementa
Is it correct to say that you lose the ability to have single-sign on across
multiple contexts if you go with a custom login solution (e.g. checking
login form fields in a servlet and, if correct, setting a “login” session
attribute to true) as opposed to standard form-based authentication?
How c
ng is appearing underneath
CATALINA_BASE/work/Catalina/localhost/myapp, regardless of the number of
servlets or JSPs I've deployed and accessed, and regardless of whether it's
with standalone or embedded Tomcat.
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mailto:
ted in my "work"
directory?
What other effects might one expect using the invoker servlet?
Caldarale, Charles R wrote:
>
>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>> Subject: Reloadable attribute not working
>>
>> I am using Tomcat 6 and have set
The tomcat-dbcp library doesn't seem to be available from the Maven
repository for Tomcat at http://tomcat.apache.org/dev/dist/m2-repository or
repo1.maven.org...am I just missing another maven repository that I should
be looking at, or must I manually install this JAR into my own local
repository
When I update a servlet class and it gets compiled automatically into
WEB-INF/classes, my context does not reload automatically. It is only when I
restart Tomcat that the changes to the servlet are viewable.
I am using Tomcat 6 and have set reloadable to true in context.xml in my
META-INF/context
Thanks for your thorough answer.
What should be considered when making a decision between running with
unpackWARs to true (running out of the exploded WAR in appBase) or false
(forcing it to run out of the work directory)?
What are the tradeoffs or considerations, in terms of performance,
mainte
d be somewhere but I just don't know where to find it, as my folder
structure (Tomcat home, Tomcat base, application files, etc) is all over my
filesystem.
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Lightbulb,
>
> lightbulb432 w
the "work" folder?
(I thought the concept of a work folder was essentially a cache... - if not,
what is its purpose?)
Thanks.
Christopher Schultz-2 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Lightbulb,
>
> lightbulb432 wrote:
>> I
I noticed that in my exploded WAR file, if I make changes to a Facelet
(similar to JSP) or stylesheet while Tomcat is running, I see the change
when I navigate to that page in my browser.
What changes are automatically picked up, and what requires a redeploy?
Things include changes to the server
t 6's JARs.)
Could somebody point me to the documentation that explains how to take
advantage of this with Tomcat 6?
Bill Barker-2 wrote:
>
>
> "lightbulb432" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>
>> Why is there no embedded Tom
partially going to depend on what feature you use (or don't
> use). I would download the embedded tomcat .zip and take a look at the
> jars provided in server/lib, common/lib and bin directories.
>
> --David
>
> lightbulb432 wrote:
>> I'd like to use Tomca
Why is there no embedded Tomcat download for Tomcat 6, while there is for
Tomcat 5.5?
What's the difference between regular and embedded Tomcat, in terms of
functionality and what the distributions come with?
--
View this message in context:
http://www.nabble.com/Embedded-Tomcat-6-tf3736013.ht
to V2.0.7 of /yourapp
> Move traffic from TC2 to TC1
>
> I've tested the latter and it worked during testing, but we've not had
> sufficient need to make use of it in production.
>
> HTH,
> Tim
>
>
>> -Original Message-
>> From: lightbulb43
The following regarding Context Descriptors is in the documentation for
Tomcat 6. I'm wondering why the included contexts such as /examples, /docs,
/host-manager, and ROOT (/) don't have Context Descriptors generated as
described below.
The locations for Context Descriptors are;
$CATALINA_HOM
What can I do to get multiple Tomcat instances running under Tomcat 6? I've
installed Tomcat, set CATALINA_HOME environment variable, and in my startup
script I say the following:
startup -Dcatalina.base="pathToBaseDir"
Right now the baseDir that I point to in the startup script is completely
em
How can I tell Tomcat to automatically redeploy an application when any file
within it is updated? I realize that this happens for new WARs or JSP
updates without needing an application redeploy.
But what I'm asking is if I update a Java class file within an application's
folder, how can I tell T
t; javax.servlet
> jsp-api
> 2.0
> provided
>
>
> I can't imagine a need for tomcat specific jars in any project.
>
> --David
>
>
> lightbulb432 wrote:
>
>>I'd like to obtain Tomcat JARs using Maven, but I don't know which of its
I'd like to obtain Tomcat JARs using Maven, but I don't know which of its
JARs from the following URL are required:
http://tomcat.apache.org/dev/dist/m2-repository/org/apache/tomcat/
Which of those JARs are required for Tomcat?
Could somebody who uses Maven with Tomcat comment on how they use i
submits a form in a cached page, wouldn't
they still be directed to their same session on the server? (Whether the
session ID is stored in URL, cookie, or hidden form field.)
Thanks.
Rashmi Rubdi-2 wrote:
>
> On 4/28/07, lightbulb432 <[EMAIL PROTECTED]> wrote:
>>
>>
Is it possible for a Tomcat session keep the session alive for a certain
period of time (say, 2 hours), but remove all objects within it after a
default period of time (like half an hour)? This way the user doesn't have
to re-login as per your usual session timeout but their session state
doesn't
A lot of industry-standard measurement and monitoring tools/applications
seem, from my uninformed perspective, to not integrate with Java but rather
things like PHP, Perl, etc. As I’m sure some of you manage large web
applications that require such measurement and monitoring, how do you go
about d
What are the strategies you might use to update an application running on
multiple Tomcat instances (clustered with Apache mod_jk) with a seamless
transition for somebody who's using the application at the time the
application is redeployed? I've always wondered how web applications that
cannot af
ve properly set up your cluster.
>
> If you use synchronous replication you don't need sticky sessions as all
> tomcats should have the session updates before the response is sent.
>
> Tim
>
>> -Original Message-
>> From: lightbulb432 [mailto:[EMAIL PROTE
I've configured mod_jk and have sticky sessions, but every request is going
to the exact same Tomcat instance and not the other instance. I've tried
setting the loadbalancer method to both Request and Busyness, but they both
do the same thing.
It works as expected when sticky sessions are disable
I want to get rid of the trailing slash for style issues (really a small
concern) and also to learn about customization within Tomcat as well as URL
rewriting.
Regarding URL rewriting, did you mean the following?
Testing trailing slash.
(.*)/
$1
Perhaps that wo
Could anyone please expand a little more on what's meant by the two
statements below?
Len Popp wrote:
>
> It doesn't matter if it's done by URLRewriteFilter or some other
> method because it's the browser that interprets the relative URLs, not
> the server.
>
> If the containing page's URL
I noticed that Tomcat adds a trailing slash automatically when it detects
that the requested resource points to an existing directory. While I know
that Apache web server offers plenty of configuration options to control and
customize this behavior, I'm unfamiliar with similar customization
capabi
97 matches
Mail list logo