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
=
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
- 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)
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
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
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:
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
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
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
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
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
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.
--
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
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
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
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
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,
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
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
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?
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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.
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
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
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).
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).
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
// 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
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
44 matches
Mail list logo