Re: netstat -a localhost to localhost

2002-06-18 Thread Christopher K. St. John
chad kellerman wrote: > > Tomcat 4.0.1 running with mod webapp both securely and > non-securely. ... When I run a netstat -a I notice many > connection from and to localhost from the ports I > designated in my server.xml configuration file. > mod_webapp keeps several connections open all the t

Re: AW: Ordering of parameters in HTTPRequest Object

2001-12-17 Thread Christopher K. St. John
Ralph Einfeldt wrote: > > The servlet spec doesn't promise to save the order of parameters > True. > The browsers don't do either. > OTOH, the HTML spec does guarantee the order, at least for application/x-www-form-urlencoded. ref section 17.13.4: "The control names/values are listed in th

Re: session timeout action

2001-12-17 Thread Christopher K. St. John
"Sobeck, James (ISS Atlanta)" wrote: > > is there a way to check to see if > the session has timed out? > For 2.3, try: javax.servlet.http.HttpSessionListener, for <=2.3, try: javax.servlet.http.HttpSessionBindingListener The javadocs have more info. -- Christopher St. John [EMAI

Re: Ordering of parameters in HTTPRequest Object

2001-12-17 Thread Christopher K. St. John
"Craig R. McClanahan" wrote: > > There are no guarantees that a browser will send the > request parameters in the order they appear on the form > http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 application/x-www-form-urlencoded This is the default content type. Forms submitte

Re: Ordering of parameters in HTTPRequest Object

2001-12-17 Thread Christopher K. St. John
Tom Drake wrote: > > It seems to me that making your servlet / jsp dependant on the > order of the parameters is a huge mistake, even if this order > is guaranteed by all browsers and by Tomcat and all other > servlet containers. > Mechanism not policy. If you thing maintaining the order of

Re: replacing /servlet/ with /xxx/ in tomcat 4.0

2002-03-13 Thread Christopher K . St . John
"Paul, Debra, & 4 Kids Mendelson" wrote: > > In tomcat 3.2 I could map /servlet/ to /somethingelse/ > ... > How do I do the equivalent in Tomcat 4.0? > In conf/web.xml: invoker /servlet/* Change to something else. This will change the default for all the web

Re: replacing /servlet/ with /xxx/ in tomcat 4.0

2002-03-13 Thread Christopher K . St . John
> What do I need to put around the ... > construct to make it fit within the default tomcat web.xml? > There's already an entry. It's the first one under the comment: Just search for it in conf/web.xml and change it to whatever you want. You don't need to add a new one. -- Christopher S

Re: JDBC, tomcat setup question

2002-03-13 Thread Christopher K . St . John
Leila Lappin wrote: > > the problem I'm trying to resolve is how I may avoid placing > jar files under tomcat's directory structure in order to have > them picked up. > I might be misunderstanding your question, but does putting them in WEB-INF/lib not do what you want? -- Christopher St. Jo

Re: request.getLocale() always returns "en_US" ..?!

2002-03-14 Thread Christopher K . St . John
chris brown wrote: > > I'm trying to use the method "getLocale()" on HttpServletRequest objects... > however, it always seems to return "en_US"! This is despite my browser > sending "fr,en-gb;q=0.5" as the "accept-language" header! (I've checked this > last point by calling request.getHeader("Ac

Re: Charts in Jsp doesn't work

2002-03-14 Thread Christopher K . St . John
Andy Eastham wrote: > > 1) To run in headless mode, you do need to modify tomcat.sh, > $ export CATALINA_OPTS="-Djava.awt.headless=true" $ bin/startup.sh No need to actually modify the catalina.sh code, it will automatically pick up the environment variable. -- Christopher St. John

Re: Charts in Jsp doesn't work

2002-03-14 Thread Christopher K . St . John
"Christopher K.St.John" wrote: > >$ export CATALINA_OPTS="-Djava.awt.headless=true" >$ bin/startup.sh > > No need to actually modify the catalina.sh code, it will > automatically pick up the environment variable. > Oops, I see from an earlier posting that you are running 3.3, so neve

Re: Integration of Tomcat and custom Server

2002-03-26 Thread Christopher K. St. John
"Karthik M." wrote: > > I want to integrate Tomcat web server > will our Server. Basically I want to start Tomcat from our server and deploy > wars in it. Is there any proper interface in tomcat to do this and how to > use it. For Tomcat 4, check out org.apache.catalina.startup.Embedded. Ther

Re: Is Tomcat small when embedded?

2002-03-26 Thread Christopher K. St. John
Petar Maymounkov wrote: > 3. If I don't need any fancy features for my purposes, how > small can I make Tomcat as an embedded server? > It's kind of tricky. The 'Embedded' interface doesn't, by itself, make Tomcat 4 any smaller. It's just an alternative to the config files. There are lots of e

Re: Extending Valve

2002-03-29 Thread Christopher K. St. John
Ian Huynh wrote: > > I need to extend (tweak) a few behaviors in > org.apache.catalina.valves.CertificatesValve without > having to recompile TC. Is there a way to configure TC > to use a custom CertificateValve? If you get a better answer, go with it, but for what it's worth, there's code li

Re: How do you do embedded Tomcat?

2002-03-29 Thread Christopher K. St. John
> The problem I still have now is where do I put the > server.xml file The whole point of the o.a.c.startup.Embedded is that it allows you to do a lot of the server setup work by hand. So you don't need server.xml at all. Are you getting some error message that says you need it? Can you give a

Re: problem with large servlets( classes )?

2002-04-03 Thread Christopher K. St. John
"Craig R. McClanahan" wrote: > > Just as a comparison, I did a quick scan of all the classes in Tomcat 4 -- > the largest single class in the entire server is around 28k (it's the > class that dynamically deploys a new webapp, called by the Manager > servlet). > $ cd catalina/build/server/cla

Re: Tomcat4 on a Cobalt box

2002-04-05 Thread Christopher K. St. John
Alan Williamson wrote: > > Is there an official release for the COBALT box? > Official? Not sure. But somebody has managed it: http://www.spaceprogram.com/knowledge/tomcat4_on_cobalt_setup.html -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com -- To un

Re: RES: How can I automatically start a servlet in a specific time?

2002-04-10 Thread Christopher K. St. John
Kelly Prudente Pereira wrote: > > Yes Ken, I mean I don't want to load it until a specific time. > I need to load it to do a specific job at a certain time. > Do you know how can I do this? > That's not really what servlets are for. If you do decide to do it using a servlet, you should know th

Re: How can I automatically start a servlet in a specific time?

2002-04-11 Thread Christopher K. St. John
Steven Elliott wrote: > > I wholeheartedly disagree with the FAQ @ Distributopia. I > think servlets are the best way to schedule tasks > I'd say that's going a bit far. There are obvious drawbacks. > and they can be packaged with your application on whatever > platform that you deploy on. >

Re: DTD of server.xml

2002-04-11 Thread Christopher K. St. John
Enrique Riesgo wrote: > > Does anybody know how can I get the DTD for the Tomcat 4.X server.xml > configuration file? > There's no proper DTD for server.xml. The startup code figures out the legal attributes for the elements at runtime, by using introspection. For example, it's legal to do:

Re: Tomcar 4.0.1 Installation

2001-12-30 Thread Christopher K. St. John
Stan Levine wrote: > > In the instructions for "Building The Tomcat 4.0 Servlet/JSP Container", > several steps say to download into a convenient location. I'm not sure > what "convenient location" means. > Jump forward to step (23), which is where you edit the build.properties file to point t

Re: no enviroment space

2002-01-17 Thread Christopher K. St. John
"Otávio Augusto R. de França" wrote: > > ... the server works very slowly. I have to wait up to one > minute until I can load a page on my browser, and it has never > happened before. > Is it just the first request? If so: http://www.jguru.com/faq/view.jsp?EID=448699 Or maybe you're usin

Re: Just trying to make some sense out of all this tomcat(newbie)

2002-01-17 Thread Christopher K. St. John
Donald Lee wrote: > > I went to the simplest one called HelloWorldExample. > The examples webapp depends on Tomcat-specific extensions that aren't part of the servlet spec. The whole "/examples/servlet/ServletName" thing isn't exactly standard, and you shouldn't do it that way in your own code.

Re: Servlet deployment without using web.xml?!

2002-01-18 Thread Christopher K. St. John
"Thomas Åhlen" wrote: > > 1. First I define one servlet(Controller) in the web.xml file > 2. I want my Controller servlet to be able to add and remove > servlets(modules) from the application context. > ... > Is this possible? I would see no reason to why there couldn't be some > interface betwee

Re: Accessing resources from other web-apps

2002-01-18 Thread Christopher K. St. John
Sergei Batiuk wrote: > > I have two web-apps (main.war and employees.war). employees.war needs to > obtain a dynamically-generated web page ('commonHeader.jsp') from the > main.war. > Check out the javadocs for: javax.servlet.Context.getContext() javax.servelt.Context.getRequestDispatch

Re: Tomcat-4.0.1 parse error on 'run-as' element in web.xml

2002-01-18 Thread Christopher K. St. John
Pete Spenler wrote: > > web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" >"http://java.sun.com/dtd/web-app_2_3.dtd";> Try "//DTD Web Application 2.3//EN", yours says "2.2". -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com --

Re: New ROOT

2002-01-21 Thread Christopher K. St. John
John Kolvereid wrote: > > How does one respecify the default directory which > is shipped as: $CATALINA_HOME/webapps/ROOT > In server.xml: > Is it in the server.xml, or the web.xml, or somewhere > else. I sure can't find it. > Somewhere else. If you auto-deploy and don't specify a root C

Re: j2ee and Tomcat 4.0

2002-01-21 Thread Christopher K. St. John
Micael Padraig Og mac Grene wrote: > > I want to know essentially how Tomcat gets the servlet > and jsp classes > Everything you need to run servlets and jsp's is provided with the Tomcat download. > and whether I have to provide j2ee for that purpose. > No. -- Christopher St. John [EM

Tomcat 4, IOExceptions,

2002-02-05 Thread Christopher K. St. John
Tomcat 4 throws away servlet generated IOExceptions. For example: public void doGet(HttpServletRequest req, HttpServletResponse rsp) throws IOException, ServletException { PrintWriter pwrt = rsp.getWriter(); pwrt.println("HELLO"); throw new IOException("my

Re: Tomcat 4, IOExceptions,

2002-02-05 Thread Christopher K. St. John
Kirby Vandivort wrote: > > I brought this up back in early january... > It's close, it's a similiar issue, but it's not the same issue. What I'm saying is that Tomcat 4 will never match: java.io.IOException /ioexception.html because all servlet-generated IOExceptions are s

Re: How do I define Tomcats CLASSPATH - tools.jar not found

2002-02-08 Thread Christopher K. St. John
Antony Stace wrote: > > I started Tomcat and got an error which > after some investigation said I needed tools.jar in my CLASSPATH. > Have you set JAVA_HOME correctly? What script are you using to start Tomcat? What does the script print when it starts up? What, exactly, is the error message yo

Re: setMaxAge getMaxAge cookie problem

2002-02-08 Thread Christopher K. St. John
Hammonds Nicholas wrote: > > One thing I have > done is to use the setMaxAge method on a cookie object. But when I > interrogate the cookie using getMaxAge in the other servlet the value is > always -1 reagardless of what I originaly set it to. > It's not Tomcat-specific, that's how it's supp

Re: Tomcat and j2se1.4 with headless support

2002-02-08 Thread Christopher K. St. John
[EMAIL PROTECTED] wrote: > > I modified catalina.sh file inserting > if [ -z "$CATALINA_OPTS" ] ; > then CATALINA_OPTS="-Djava.awt.headless=true" headless support > I think the idea is that you just need to do a: $ export CATALINA_OPTS="-Djava.awt.headless=true" $ bin/startup.sh

Little tiny embedded Catalina?

2002-02-12 Thread Christopher K. St. John
I've got a distributed tool that uses servlets for its admin interface. I'm currently using a little hand rolled server that implements just enough of the servlet api to allow the admin servlets to run. I'd like to use Catalina instead. I started with o.a.c.startup.Embedded, and it works well

Re: Help with url-pattern in web.xml

2002-02-13 Thread Christopher K. St. John
"Press, Michael" wrote: > > Where can I find the definition for valid entries in the url-pattern > element of the servlet-mapping in web.xml? ...I'm also interested in > finding a reference for web.xml - a document or DTD that defines/describes > the possible URL patterns. > http://java.sun.com

Re: Redirect after session expires?

2002-02-13 Thread Christopher K. St. John
Michael Molloy wrote: > > ... if there is a setting for web.xml or something > to foward all pages that throw exceptions to a certain > url, that's what I'm looking for. > In web.xml: MyException /myexception.html the servlet spec[1] has a complete description in section SR

Re: Loading property files using ClassLoader.getSystemResource()

2002-02-13 Thread Christopher K. St. John
Bryan Austad wrote: > > I use a class with static methods to load properties. getResource() does > not return a static URL, so I cannot use it within my static method. > getSystemResource() returns a static URL. > static URL? Do you mean that getSystemResource() is a static method in ClassL

Re: Loading property files using ClassLoader.getSystemResource()

2002-02-13 Thread Christopher K. St. John
Bryan Austad wrote: > > I call this static method from another static method.. When > I try using ClassLoader.getResource(fName), I get a compile > error: non-static method getResource(java.lang.String) cannot > be referenced from a static context > > How do I get around this? > The simplest

Re: How do I get Fancy Indexing?

2002-02-13 Thread Christopher K. St. John
"Sfikas, Ted" wrote: > > Can't find this in documentation -- How do we turn Fancy Indexing on in Tomcat? > Standalone Tomcat's DefaultServlet is responsible for serving static content. It doesn't support Apache style FancyIndexing/IndexOptions. You can write your own if you want. You can brows

Re: Custom error page in Tomcat.

2002-02-14 Thread Christopher K. St. John
Allan Kamau wrote: > > How do I configure an error page in Tomcat (TC4x) > across all contexts and within each context. > What changes are expected in the web.xml. > Take a look at conf/web.xml. Entries made there will apply to all contexts. The format is identical to the context-specific WEB-I

Re: Compilation error with ant...

2002-02-14 Thread Christopher K. St. John
Jean-Luc BEAUDET wrote: > > When i compil tomcat 4.0.2 with ant, i've got 2 set of warnings: > [javadoc] javadoc: warning - Tag @see: Class or Package not found: > http://java.sun.com/j2se/javadoc/faq.html#namenotreferenced -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.di

Re: TC4 Realm Problem

2002-02-14 Thread Christopher K. St. John
Mark Thill wrote: > > if I place a servlet in a non-secure area and a jsp page in > a secure area I can use: > > getRequestDispatcher(url).forward(request, response); > > to seemingly bypass the security. Can anyone tell me if > this is by design > SRV.12.2 Declarative Security The

Re: Scale Tomcat-Apache - Is this true?

2002-02-14 Thread Christopher K. St. John
Brown Bay wrote: > > http://www.apachelabs.org/tomcat-user/200112.mbox/%3C01f101c17e30$577e27a0$4 > [EMAIL PROTECTED]%3E > http://mikal.org/interests/java/tomcat/archive/view?mesg=55280 "Highlights in this release include: Full support for the AJP 1.3 and 1.4 native connector proto

Re: security-role-ref not working with Tomcat 4.0.1 & .2

2002-02-14 Thread Christopher K. St. John
Mark Teegarden wrote: > > Try adding an entry of the following to the end of web.xml > in examples before the tag: > The element is declared as part of a , not a : There's an example in the servlet spec in SRV.13.4.2 "An Example of Security". -- Christopher St. John [EMAIL PROTECTED] Di

Re: Determining User Connection Speed

2002-02-15 Thread Christopher K. St. John
Jim Urban wrote: > > Is there a way to determine the speed a user is connected to the > internet at from within a servlet? > No. If you explain more about why you want to know, maybe someone could suggest something that would solve your problem without requiring the user's connection speed.

Re: Determining User Connection Speed

2002-02-15 Thread Christopher K. St. John
Jim Urban wrote: > > Our clients run our application on both the internet and intranet. > > If we could tell when a user is on a dialup (slow) connection we could > compress the data and not compressing it for those on a LAN connection. > If it's an intranet then (as mentioned in other posts

Re: Making Tomcat listen on a specific IP.

2002-02-15 Thread Christopher K. St. John
Bob Dushok wrote: > > I'm running Tomcat 4.0.2 on a Red Hat box with seven IP addresses. I've > been trying to configure Tomcat to listen to only one of these seven IPs > but haven't had any success. > You're running in standalone mode with the HTTP/1.1 connector? Have you looked at: http

Re: Threading my app

2002-02-28 Thread Christopher K . St . John
Dominic Clay wrote: > > The issue is this can take up to 200 seconds to complete. > ... I want to put this processing in a separate thread > which is called when Page1 appears. > It's not really the same problem, but there's some info at: http://www.distributopia.com/servlet_stuff/backgroun

Re: Meaning of /xxxx/* .... ???

2002-02-28 Thread Christopher K . St . John
Thomas Stiller wrote: > > What does that (only wildcard-part interesting: "*" !!!) > inside a servlet-mapping mean: > > //* > SRV.11.2 Specification of Mappings, from version 2.3 of the servlet spec, should have all the information you need. The servlet spec isn't (for the most part) wr

[ANNOUNCE] Fancy/DirServlet prerelease

2002-03-04 Thread Christopher K . St . John
DirServlet and FancyDirServlet are drop-in replacements for o.a.c.s.DefaultServlet that provide enhanced directory index generation. The contexts of the gzip'ed tar file and the zip file are identical. The tar file is smaller but some Windows users may be happier with the zip: Unix users: ht

Re: tomcat startup problems on Linux box.

2002-03-05 Thread Christopher K . St . John
Patrick Lee wrote: > > I've noticed that "catalina.sh shutdown" doesn't always stop Tomcat. > It's easy to get around it, you can manually kill the Java process that > runs Tomcat. Tomcat won't start if there is already a running version. > To automate this, you can modify catalina.sh (just add t

Re: BASIC Authentication Question

2002-03-07 Thread Christopher K . St . John
Mark Shaw wrote: > > In subsequent requests I pass back the sessionID (in a cookie > labeled "jsessionid"...) instead of the BASIC authentication > You need to include the authentication information with every request for a protected resource, or you're going to get another challenge. rfc2617

Re: Load-on-startup

2002-03-08 Thread Christopher K . St . John
"PELOQUIN,JEFFREY (Non-HP-Boise,ex1)" wrote: > > However, I have noticed that if I restart the context using the manager, the > servlet are initialized according to their physical order in web.xml, thus > ignoring the load-on-startup tag. > You might want to just go ahead and report it as a bu

Re: jsp parameters. Urgent!

2002-03-08 Thread Christopher K . St . John
Nancy Crisostomo Martinez wrote: > > I have a jsp ... please tell me where I can find > information. > Sun runs a JSP mailing list: http://archives.java.sun.com/archives/jsp-interest.html The list has lots of well informed and helpful subscribers. -- Christopher St. John [EMAIL PROT

Re: Writing my own valve to do extra logging

2002-03-08 Thread Christopher K . St . John
"Dr. Evil" wrote: > > So my solution is to write a valve ... Then I edited > bin/catalina.sh so that mylogger.jar was on the java > classpath > Don't edit bin/catalina.sh to change the classpath on the command line. Just put the jar in the right place (as defined by the classloader howto, it lo