Re: HttpSessionbindingListener

2003-01-23 Thread Garrett Smith
Sessions are created automatically by the container, which handles all the implementation details. An HttpSession is an interface; the container determines the session's true runtime type. Test it on your container: %= session.getClass() % valueBound/Unbound call back to the object that

ping

2003-01-18 Thread Garrett Smith
= http://dhtmlkitchen.com/ JSP | Servlets | DHTML Garrett Needs A Job __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional

Connection Pooling: Communication link failure: java.io.IOException

2003-01-18 Thread Garrett Smith
- Root Cause - java.sql.SQLException: Communication link failure: java.io.IOException at org.gjt.mm.mysql.MysqlIO.clearAllReceive(Unknown Source) at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source) at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)

JDBC pooling prob: javax.servlet.ServletException: Communication link failure: java.io.IOException

2003-01-17 Thread Garrett Smith
I got a tip here from Craig about using a query in server.xml to make sure the connection was good before executing a statement, but I lost it. Is this correct? parameter namevalidationQuery/name valueSELECT 0;/value /parameter Also, should I use ; or not? an extra ; will

Re: Class loading issue with JavaMail 1.3 and Tomcat 4.1?

2002-12-14 Thread Garrett Smith
I had that before. happyaxis.jsp [attached] helped me find the other class. You've got StandardClassLoader and WebappClassLoader. TC uses to the list, happyaxis.jsp can be found from the axis page on xml.apache.org (If I remember correctly). Hope it helps. Garrett --- Mike Meehan [EMAIL

HttpSessionListener beforeSessionDestroyed (Craig, Sean)?

2002-12-13 Thread Garrett Smith
Hello Everyone in Java Land, I want to use beforeSessionDestroyed. Before going off and extending HttpSessionListener, I decided to see if it'd been done (why reinvent the wheel?). I searched on google for my aptly-named method, and found this:

RE: HttpSessionListener beforeSessionDestroyed? no, HttpSessionActivationListener

2002-12-13 Thread Garrett Smith
Hello, Thanks much, Noel. I don't waste my time trying to write my own implementation. You know, it's not a very appropriate name for what I want to do. I'd like HttpSessionDeactivationListener or maybe to have this in HttpSessionListener would be most appropriate. It's not something that's

Re: How do you select to call doPost or doGet method?

2002-12-06 Thread Garrett Smith
What did you forward from? If you're forwarding from a doPost method, the servlet you're forwarding to will call doPost. Same principal applies to a RequestDispatcher forwarding from a doGet method. ServletA doPost -forward - ServletB doPost The HttpServletRequest has

RE: Not getting CSS with XML

2002-12-06 Thread Garrett Smith
Paul, Did you look at the source code for both? Use your browser's view source option for both the static and the jsp docs. Compare them side by side and tell us what you see. Garrett --- Durham David Cntr 805CSS/SCBE [EMAIL PROTECTED] wrote: Is it possible that you made a change to the xml

Session cookie not recognized in www. subdomain alias

2002-12-01 Thread Garrett Smith
Hello Tomcat Users, I am having a problem with access to the www. alias of my site having a different session cookie. What is the proper way to make tomcat use .dhtmlkitchen.com for my session cookie? To see what I mean, go to http://dhtmlkitchen.com/ and then to

Re: Session with subdomain alias [solved] --discussion continues

2002-12-01 Thread Garrett Smith
don't want to do this, but I wonder if it's possible. If so, would it be possible to selcectively add subdomains such as www.hostname.com, but not xyz.hostname.com? Garrett --- Craig R. McClanahan [EMAIL PROTECTED] wrote: On Sun, 1 Dec 2002, Garrett Smith wrote: Date: Sun, 1 Dec 2002 07

Re: JNDI Connection pooling defaults

2002-11-12 Thread Garrett Smith
If I understand correctly, you want to have more initial connections to the database. !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --

Did default content-type change between tc 4.0 to 4.1?

2002-11-10 Thread Garrett Smith
Hello, Two part question: 1. Is text/html still the default content-type? 2. If so, then why must I explicitly use response.setContentType(text/html) to avoid seeing html source in the browser? Problem: server sends out text/plain header for jsp documents that are included with a

Re: servlet as the default file

2002-11-08 Thread Garrett Smith
Did you try a servlet mapping? Here, maybe like so: servlet servlet-nameview/servlet-name display-nameview/display-name description A picture of my hairy balls. /description

Re: servlet as the default file

2002-11-08 Thread Garrett Smith
reqURL = request.getRequestURL.toString(); // Need we invoke the BallViewer? if(reqURL.trim().endsWith(/)){ } } --- Garrett Smith [EMAIL PROTECTED] wrote: Did you try a servlet mapping? Here, maybe like so: servlet servlet-nameview/servlet-name

Re: NEWBIE: Intercepting the jsp request before its written as a java file

2002-11-07 Thread Garrett Smith
Jan-Michael, If you haven't started using filters yet, that's the way to go. You make a class that implements javax.servlet.Filter interface. This should allow you to do what you want, but may require a different approach. Garrett --- Jan-Michael Ong [EMAIL PROTECTED] wrote: Thank you for

Re: Search engines and MVC--to clarify

2002-11-07 Thread Garrett Smith
Hey, So you want the search engine to crawl your pages and your using MVC approach. I do to. Search google for DHTML and you'll find my site pops up pretty high. It really makes no difference if you use mvc approach or not. A search engine crawls your site looking for links. When it finds them,

[tomcat java.io.File] Reading a file from /WEB-INF/classes

2002-11-07 Thread Garrett Smith
Hello Everyone, I want to read the file /WEB-INF/classes/confirmation.txt The file is read from /WEB-INF/classes/com/dhtmlkitchen/reg/mail/FileFormatter.java File formatter.java snip: class FileFormatter { private FileFormatter(){} /** formatFile accepts a filename

Re: tag errors

2002-11-06 Thread Garrett Smith
You say you have errors in your logfile and that those errors are expected but that you don't have errors in the jsp. Did you reduce this to a simple case? Can you provide a URL with sample code and demo? The only thing I can think of is if you forgot to include a taglib directive in your

Re: server.xml won't change

2002-11-05 Thread Garrett Smith
in your Context docBase= --- Ian Hunter [EMAIL PROTECTED] wrote: I'm having the same problem. If you request a file OTHER than index.jsp, you'll get the correct file, but http://servername/index.jsp is ALWAYS the same file, even if you delete the webapps/ROOT directory. Can anyone help?

index.jsp + index$jsp.java + index$jsp.class == wasted-space.

2002-10-31 Thread Garrett Smith
Can I eliminate this wasted space somehow? How about compressing the orig. file? What about elimination of index$jsp.java after the class file is created? Any caching options? Thanks, Garrett = http://dhtmlkitchen.com/ JSP | Servlets | DHTML Garrett Needs A Job

Re: Setting up an InitialContextFactory in a properties file...

2002-10-31 Thread Garrett Smith
Hey, In Tomcat, I've been told that it should be done in server.xml within your app's Context. The properties are in the context (not a properties file). Check Administrators how to's. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/index.html See

Re: Tomcat on Thru64 Unix (OSF1)

2002-10-30 Thread Garrett Smith
Hi, I haven't used the examples, but I'm going to make a guess: Did you try using /examples/servlet/servletName? notice servlet/ instead of servlets/ Garrett --- Denys Sene dos Santos [EMAIL PROTECTED] wrote: Hi, I'm having some troubles while running Tomcat 4.1.12-LE

Re: Configure JNDI

2002-10-29 Thread Garrett Smith
Mohan, By having the configuration inside of your context in server.xml, I don't think it's possible. I tried jocl, but couldn't get it to work with tc. Craig McClanahan advised me to set up a context in server.xml instead to using jocl. This makes it very time consuming to develop webapps, and

RE: JAR Files needed

2002-10-29 Thread Garrett Smith
Add servlet.jar to your classpath: CATALINA_HOME/common/lib/servlet.jar You do this with an Ant task if you're using Ant. Garrett --- Julius Davies [EMAIL PROTECTED] wrote: Brian Brookwell, Officially, you need J2EE (Java 2, Enterprise Edition). Go to http://java.sun.com to download

Re: tomcat classloader bug

2002-10-27 Thread Garrett Smith
javax.mail.Session obj = (javax.mail.Session)Mailer.envCtx.lookup( Mailer.url ); --- [EMAIL PROTECTED] wrote: did you import the right Session class? On Sunday, October 27, 2002, at 02:31 AM, Garrett Smith wrote: Hey, I am trying to cast a javax.mail.Session into a javax.mail.Session

tc session bug in root context

2002-10-27 Thread Garrett Smith
problem: session becomes invalidated from root context. circumstances: root context has a directory that contains the name of a sibling webapp. 127.0.0.1/registration/path/extra/info App name: (root) servlet name: registration if I have a webapp in webapps directory named reg, regis, regist,

Re: Where to put Java files/classes

2002-10-26 Thread Garrett Smith
you put any classes and packages here: /webapps/your-app-name/WEB-INF/classes/ jar files (such as mm.mysql) go here: /webapps/your-app-name/WEB-INF/lib/ Core Servlets and JavaServer Pages by Marty Hall explains all the details related to the basic issues of configuration (and more advanced

tomcat classloader bug

2002-10-26 Thread Garrett Smith
Hey, I am trying to cast a javax.mail.Session into a javax.mail.Session and I am getting a ClassCastException. this code: Session session; try{ session = (Session) envCtx.lookup(Mailer.url); } catch(ClassCastException cce){ throw new

Re: Servlet as Virtual Include in ASP file

2002-10-23 Thread Garrett Smith
Maybe you can include the asp from the servlet. default.asp - controller controller action: include real asp resource (/incl/default.asp) controller action: do some stuff I don't know if IIS let's you get away with that. Sorry for your situation (having to use asp). --- Kurisu QT [EMAIL

[MVC] best practice: Filter or Controller?

2002-10-22 Thread garrett smith
Hey, I am using a controller servlet. Maybe I should be using a filter, instead. If the action is successful, the location will be the successURL, otherwise, it will be failureURL. In my controller's init, I use config.getInitParam to get successURL and failureURL. In web.xml, I have the init

RE: Tomcat Connection Pooling

2002-10-22 Thread garrett smith
It's on the tomcat page under documentation. click on tomcat 4.0 here: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html It's basically the same, but you have to download all the jars, so more work to set up. --- Lior Shliechkorn [EMAIL PROTECTED] wrote: Is this feature is not

Re: Startup Bootstrap error message

2002-10-22 Thread garrett smith
You brought up a good point. I sometimes have a stupid error in web.xml and this is not logged in the logfile. I would appreciate better logging mechanism for tomcat-start-up. --- Michael Langan [EMAIL PROTECTED] wrote: Hello. Apologies for bringing up perhaps the oldest error in the book

Error handling in ServletContextListener/investigating tomcat startup errors

2002-10-20 Thread garrett smith
Hey, If I have problems in an implementation of ServletContextListener, TC refuses to give me a reason. How can I log the error message? To generate an error, I divided by zero. A more likely (and less avoidable) exception is NamingException (what I expect). [code] public void

Re: General HTML/jsp question, any one

2002-09-04 Thread garrett smith
To convert the string to xml compliant string, you could use a custom tag to convert to quot;, to lt;, et c. instead of having an input tag, you could have a custom tag such as filtered-input. This custom tag would replace with quot; You could try to use single-quotes for attributes, but

Get an InitialContext w/o using a Context in server.xml

2002-09-03 Thread garrett smith
I want to set up connection pooling as described in the Tomcat how-to. Is it possible to get an InitialContext without using server.xml? I can use web.xml or .properties files and I can put jar files in my WEB-INF/lib directory. I am using a shared instance of Tomcat with Manager. AFIK, there's

Re: Index.html/default welcome file

2002-08-31 Thread garrett smith
index.html, index.htm, index.jsp, welcome.do, If welcome-file-list really does work, then it is not necessary to name your file index.htm from index.html. welcome-file-list really does work, so it is not necessary to name your file index.htm from index.html. I don't have a solution, though.

Re: deploying war file and Document base ... does not exist

2002-08-31 Thread garrett smith
Daniel, Tomcat will unjar (unwar?) the archived file by default. The Context entry should be in $CATALINA_HOME/lib/server.xml Garrett --- Daniel Kehoe [EMAIL PROTECTED] wrote: Using TC4.1.9beta, I've got a myapp.war file (and matching myapp.xml configuration file) I install successfully

Re: Index.html/default welcome file

2002-08-31 Thread garrett smith
Still having troubles? On Mac OS, the OS will add an extra extension based on file type. This is done to make the computer more user-friendly, although it is exactly the opposite: it is counter-intuitive. I had to check Show Info on right-click menu and remove the hidden extension. I don't

Re: Bugs in Tomcat 4.1.9 Manager Servlet on Windows 2000

2002-08-30 Thread garrett smith
Hey, I too have tried: http://localhost:8080/manager/install?path=war= And got the FAIL message. According to the instructions, leaving an empty string for the value of path (no value) will result in ROOT context. This never worked for me using tomcat 4.0.1 on Linux (my host hasn't upgraded).

Re: Bugs in Tomcat 4.1.9 Manager Servlet on Windows 2000

2002-08-30 Thread garrett smith
Hey, I too have tried: http://localhost:8080/manager/install?path=war= And got the FAIL message. According to the instructions, leaving an empty string for the value of path (no value) will result in ROOT context. This never worked for me using tomcat 4.0.1 on Linux (my host hasn't upgraded).

Can I create InitialContext with properties file?

2002-08-28 Thread garrett smith
Hey, I made a program called WebPool that has a main for testing purposes. (I am not using JUnit yet). It's not working, though! I get these errors when trying to create an initial context: java com/dhtmlkitchen/login/db/WebPool

RE: need to find out the URL of the page that sent the request

2002-08-28 Thread garrett smith
// get the requested location. String location = request.getRequestUri(); Study the javadoc. HttpServletRequest, HttpServletResponse, Session, and Cookie, how much do you know about these? --- Peter Choe [EMAIL PROTECTED] wrote: i think i found the problem. i was linking to the jsp page

SSI in TC3.3?

2002-03-02 Thread Garrett Smith
Does Tomcat 3.3 support server-side includes for static content? I know that JSPs support including other JSPs or other static html files, but I imagine that this is a relatively expensive process, since JSPs are compiled and executed. Thanks, Garrett -- To unsubscribe: mailto:[EMAIL