Re: Updated Docs for Tomcat 4

2001-09-10 Thread Fernando_Salazar
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

Re: Cookie name is a reserved token

2001-08-07 Thread Fernando_Salazar
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")

Re: data cross pollination, sync issue?

2001-07-25 Thread Fernando_Salazar
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

Re: About jndi

2001-07-23 Thread Fernando_Salazar
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

Re: Application to Servlet communication

2001-07-11 Thread Fernando_Salazar
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

RE: problem with getPort()

2001-07-10 Thread Fernando_Salazar
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,

RE: problem with getPort()

2001-07-09 Thread Fernando_Salazar
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

RE: problem with getPort()

2001-07-09 Thread Fernando_Salazar
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

Re: Socket problems under heavy load on Win2K

2001-06-29 Thread Fernando_Salazar
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

Re: Preventing Proxy Servers From Hitting JSP Pages?

2001-06-29 Thread Fernando_Salazar
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

Re: SERVLET : transform XSL+XML ->OUTPUT = blank page

2001-06-27 Thread Fernando_Salazar
Doesn't getServletContext().getResourceAsStream ("/WEB-INF/classes/login.xml")); have to be getServletContext().getResourceAsStream("/login.xml")); ? - fs |+---> || Pedro Salazar| || | |

Re: Servlet HTTP path

2001-06-25 Thread Fernando_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

Re: Tomcat not putting session objects into JSP page context? (repost...)

2001-06-25 Thread Fernando_Salazar
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

Re: start up tomcat from a virtual terminal

2001-06-20 Thread Fernando_Salazar
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