Connection-pooling based on the Tyrex stuff is straightforward. If you do
the Tyrex install and resource setup as
indicated in the new doc, you already have everything needed to do basic
connection pooling. Below is the code
from the new doc, modified:
Context initCtx = new InitialContext();
Co
Does your cookie have a name that corresponds to a Java language token, or
is one of the following:
if (!isToken(name)
|| name.equalsIgnoreCase("Comment") // rfc2019
|| name.equalsIgnoreCase("Discard") // 2019++
|| name.equalsIgnoreCase("Domain")
Assuming you don't have any servlet-globals being shared between threads,
and that you otherwise have your
session stuff correct, the thing I would look at is proxy servers. These
will cache pages based on URI alone
-- ie, not taking cookies into account -- and so user 2 will get the page
sent
I believe this resulted from a change made in 4.0 B5, and that the plan is
to change it back.
Meanwhile, if you want to fix it yourself, try modifying Catalina.java.
line 698 or so reads:
System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);
After this line, insert:
System.se
A number of folks recently posted similar questions ...
I think things work better when you specify
"application/x-java-serialized-object" as
the content type of the data you are writing. In the code below, you're
using
"application/x-www-form-urlencoded", which definitely would not help.
- Fer
Hmm ... you may need to file a bug, or do some Tomcat debugging. One thing
to try, use:
reponse.sendRedirect( "http://beru.cariboulake.com/servlet/Servlet2"; );
I bet that would work ... looks like the code that processes sendRedirect()
first tries to
make an Url out of the specified location,
Try using telnet to connect to your servlet 1 and then see what is
returned.
You would enter something like this:
telnet beru.cariboulake.com 8765[ENTER]
GET /servlet/Servlet1 HTTP/1.0[ENTER]
[ENTER]
You should see the HTTP response from the servlet written to the console,
eg:
HTTP/1.1 302 Obj
Your source shows that you write HTML to the outputstream before you send
the redirect.
I'm surprised an exception -- like IllegalStateException -- isn't thrown.
Take out the
out.println() calls from servlet 1 and it should work.
- Fernando
I think 61 is "connection refused". My guess is that the accept() queue
length is too small. Looking through
Tomcat 4 source, it looks like the default accept backlog is 10. Possibly
there's a way to increase it?
You could always rebuild with a larger default. But if you are throwing a
lot of
Try creating a file named robots.txt at your web-server root. Put lines in
the file like so:
user-agent: *
disallow: /webapp
where "webapp" is the path to your web application.
Spiders and similar clients should read this file and follow the directives
there.
Look here: http://www.robotstxt.o
Doesn't
getServletContext().getResourceAsStream
("/WEB-INF/classes/login.xml"));
have to be
getServletContext().getResourceAsStream("/login.xml"));
?
- fs
|+--->
|| Pedro Salazar|
|| |
|
You need to setup a entry to map the servlet to a
specific URL path.
- Fernando
Hi
Id like to specify a specific sub folder path for a servlet however I am
not having any luck doing so. I have defined the servlet in the web.xml
file as
accountingxmlServlet
I think the problem is, you're using:
Object obj = pageContext.getAttribute("loginBean");
The JSP spec defines this as returning an object that occurs at *page*
scope. Try instead:
Object obj = pageContext.getAttribute("loginBean",
pageContext.SESSION_SCOPE );
This should work. As to why
Look up man page for "nohup". This will start a process that continues
executing after the console
that created it is killed. You'll need a command line that looks like:
nohup ./startup &
- Fernando
14 matches
Mail list logo