Jay,
>>> once in my .WAR, and once as a result of my Ant deploy task
I have yet to move to that plane of confusion. I'm not using a META-INF directory
or a .WAR file since I'm still trying to figure out WHAT to deploy. I am manually
editing
* the conf/server.xml file (to change the def
Doug,
The application directory under webapps is named "timesheet", therefore, the context
fragment in conf/Catalina/localhost is "timesheet.xml" to match the context name. The
beginning of the element in timesheet.xml is
to match the directory name under webapps. So, I think as far as
Adam,
The following line occurs in stdout.log:
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Group\Tomcat 5.0.18\conf\Catalina\localhost\timesheet.xml
so it appears to be getting the correct context fragment.
Merrill
Doug,
>>> "Timesheet" vs. "timesheet"
Good catch, but it didn't make any difference.
I originally had three entries for names "Timesheet", (the way I thought
of it), "timesheet" (for those who don't want to use the shift key), and "ts" (for
those diehard Unix freaks who believe anythi
Ken,
I didn't intend to include the password in ANY of my posts, but I guess some slipped
though. In the version that running, the password is there. And, even if I had
fumble fingered the password, THAT would have simply gotten a convention MySQL error
rather than a NameNotFoundException for
Doug,
I noticed the class name discrepancy myself between the name I had used for
DriverManager and the one the DataSource example had. However, when I peeked inside
the Connector/J jar file, I found both .class files, altough they are of different
sizes.
I tried it with your alternative, but
Jay,
Context initialContext = new InitialContext();
Context envContext = (Context) initialContext.lookup("java:comp/env");
this.dataSource = (DataSource) envContext.lookup("jdbc/TimesheetsDB ");
Ah ha! I was missing the second step. When I added the second step, it still fails,
but the c
David,
I THINK I've figure out that MySQL's Connector/J jar worked in jre/lib/ex when I was
using DriverManager because only MySQL needed to see it, and it knew to look in
jre/lib/ex. However, with DataSource, I'm assuming it's Tomcat who needs to see it,
so it needs to be in Tomcat's common/l
I think I read the using named pipes is faster, but that's not going to be a problem
here. If I can't get named pipes to work, then I'll try using TCP/IP restricted to
localhost.
Actually, this whole DataSource experiment has a questionable return on investment. I
already have it working just
Jay,
Thanks for your comments.
I think the problem may be that I don't have the MySQL Connector/J jar in the
common/lib. When using DriverManager, it worked fine in jre/lib/ext, which is one of
the places the MySQL documentation recommended. I need to try again with it in the
new location.
I'm running
* Tomcat 5.0.18 running as a Wndows service,
* MySQL 4.0.16 running as a Windows service, and
* MySQL Connector/J 3.0.10 stable
all on Windows 2000 Server, which is where I'm also doing the testing (i.e., on
localhost).
A number of tomcat-user mailing list denizens have give
I'm running Tomcat 5.0.18 under Windows and I don't see a jspc script in the Tomcat
bin directory.
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ankur
Replace the "exception-code" with the "error-code" tag and you'll be in
business.
Agh! (But thanks.)
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I'm trying to learn filters by writing one to detect when someone who
has not logged in tries to access a JSP page that requires login. From
what I've read, this seems to be one common use of filters.
I think I understand how to write the filter, but to determine whether
the session had been l
Jake,
Well, I've managed to show that the element itself isn't being
ignored. I modified it so that typing "ts" on the URL would execute the
"timesheet" app in webapps. However, the sub-element that
defines a custom log file name for the application still doesn't seem to
be active. I wond
In the last day or two, each message I send to this mailing list gets a
response with the subject line "Symantec Mail Security detected that you
sent a message containing prohibited content" I initially assumed it
thought the XML fragments I was including in my posts were some attempt
to inser
I originally had errorPage declarations at the top of all my JSP pages,
which worked. Then I heard about the element in web.xml.
So I replaced all of the individual errorPage declarations with:
java.lang.Exception
/errorPage.jsp
in my application's web.xml, and it worked fine. Next
Below is the Context element I'm using for my application. It was
originally created for Tomcat 4.1. With this Context element in
server.xml in Tomcat 4.1, a log file of "localhost_timesheet_log.txt"
appeared in the %CATALINA%\log directory.
reloadable="true" crossContext="tru
Remy,
No, it does not. .xml files in the Host appBase will be ignored.
[Sigh...] I thought I had it. Checking back, I see that only the
balancer sample app has it context description file there.
You need to put your Context elements in XML files next to the ones
for the manager and admin, an
I have Windows XP Pro at home and Windows 2000 at work. I run Tomcat on
both of them, and I try to keep identical environments on both.
However, it's not easy.
Under 5.0.16, I would run it as a server on XP, but not 2000. Under
5.0.18, I got it running as a server on 2000 immediately while
I (accidently) figured out the problem with the . The problem
was in the Connector definition for port 80 in server.xml. The excerpt from
server.xml that I posted was correct because it was inadvertently from the 5.0.16
installation. (The editor helpfully "remembered" it for me.)
In the 5.0.1
I had been running Tomcat 5.0.16 standalone (it wouldn't start as a service) on
Windows 2000 and j2sdk1.4.2 successfully. Yesterday, I installed 5.0.18 and was
finally able to get it to run as a service. However, when I launch my timesheet
application in the usual way, "http://localhost/times
ost() throws list, the compiler complains
that the overloaded method didn't originally throw SQLException.
So, what is the problem way to get exceptions thrown in a servlet conveyed to the
error page recorded in the element of
Does Tomcat see any difference in a servlet that calls setContentType() before
generating a page for output versus not calling setContentType() but including an HTML
tag in the generated page?
Merrill
-
To unsubscribe, e-mail:
>>> I don't want to check for whether user is logged in or not in every page
Is there any particular reason why? The extra time is in the noise. The code is
boilerplate, and you can hige that behind a function call if you want.
Merrill
---
I'm confused.
>>> I don't want the user to have to log in, ...
>>> I can't find in the docs how Tomcat knows whether the user has logged in yet,
Question: Do you want your users to log in or not--nevermind who does it?
>>> I want to have my "guard" servlet authenticate the user
How is that
I think I know the answer to this, but I would like reassurance.
I'm building a timesheet application using JSP, servlets, and Tomcat. So far, I been
very careful to keep all non-contant data out of servlet class instance variables so
everything should be thread safe and there should be no inte
session is an implicit object in a JSP page. Therefore, you should just reference
session rather than "getting" it. Perhaps the get is creating a new session.
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
a
warning that W32Time couldn't find a Domain Controller.
Tomcat 5.0.16 is installed and runs standalone on this machine just fine, however that
standalone version was not running when the service installation took place.
Any ideas?
ind anything to
specify where Tomcat is to look for the .keystore file.
Anyone have any suggestions as to how to make Tomcat look in C:\Document
Settings or how to make keytool generate a .keystore file in
C:\WINDOWS\System32\config\systemprofile where it's looki
Betty,
As nearly as I can tell, Tomcat 4 was distributed for Windows as a .exe
file which included an installer. That installer which could do the
service install. However, Tomcat 5 is distributed (so far, at least) as
a .zip file, which has no installer. I can run Tomcat 5 standalone, as
I apologize for the off-topic question, but can someone point me to
where I can find out how to print to a remote printer on the LAN from
Java.
While Java seems to have many "printing" classes, none of them appear to
actually reference a physical printer. While that's obviously in
keeping wi
George,
Unfortunately, your logic is flawed.
Yes, that's very clear at this point. :-)
I understand that the sendRedirect() does NOT terminate the execution
flow that it is in. That's why I follow each one with a return.
However, I think I now recognize my problem.
In my mind, I've always
did main servlet processing appear to continue (allowing the second
sendRedirect() to cause a problem) after the exception was triggered?
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Well--I think I've found the cause for my sudden IllegalStateException,
although I'm still not sure why.
Because it was claiming an IllegalStateException, and it was pointing to
the sendRedirect() statement, I assumed the sendRedirect() was the
CAUSE. So--
I started probing the code by inserti
Ben,
Yes, I can post the code, but now I'm not sure that will help.
Yesterday I tried my old standby debugging technique of commenting out
virtually all of the code in the servlet. It worked. I then started
uncommenting portions until it stopped working. For a while, I thought
I was winning
Ben,
I don't know if it's a good idea or not, but I separate the HTML stuff
into the JSP pages and use the servlets solely for program logic.
Therefore, my servlets never output content.. Instead they merely
redirect to a JSP page which then contains only enough Java logic to
collect the dat
Howard,
There are three sendRedirect() calls in the servlet. The first two
redirect back to the login page if with the login user id is not found
or the login password doesn't match. In both cases, the sendRedirect()
is immediately followed by a return. (I learned to use explicit returns
a
Howard,
I had already read the misc.html#illegalstate. In my case, I KNOW the
illegal state was triggered by sendRedirect() since that's what's in the
trace back. Also, I've already verified that immediately before the
call to sendRedirect(), both session and response are OK.
I forgot to men
d response variables have reasonable values.
Can any one suggest what I may have changed to suddenly get an illegal
state exception?
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Riaan,
I run Tomcat with ZoneAlarm Pro at home and it works. Not only does Tomcat need to
be able to access the Internet (even though it's not actually accessing anything
outside the localhost) as Phil said, but the browser you are using also needs to be
able to access the Internet.
The
>>> you have to go out of your way to declare instance variables in a JSP (by putting
>>> them in a <%! //declaration block %>
John,
After I posted the question, I started browsing the generated _jsp file in earnest.
I had decided that <% ... %> stuff was safe since it gets up in its own m
ot;
documentation on how to keep JSPs and servlets thread safe.
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Bill,
Thanks for the information. I was worried about the command line length. Where
can I find documentation for the various //?// commands?
Thanks again,
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
ation)
*> System Information <*
Computer Name: MERRILL
User Name: Merrill Cornish
Terminal Session Id: 0
Number of Processors: 1
Processor Type: x86 Family 6 Model 8 Stepping 1
Windows Version: 5.1
Current Build: 2600
Serv
. ... Please tell Microsoft about this problem. ... [Send Error
Report]/[Don't Send]
There is no Apache Tomcat5 service in the services list.
I tried rebooting and running the batch file from a clean system, but the same thing
happened. Any ideas?
Merrill Co
[Sound of head pounding on keyboard...]
Yes. I did forget to add the mapping for the new servlet. Mea culpa. I
had even briefly thought about the server.xml and web.xml files--but
then dismissed them as "they are already set up." If I had just taken a
look. . .
Thanks for the kick in the memor
ctly like all of
its brothers, except the browser can't find it. Any suggestions?
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Bill,
Yes, I should have thought of the --StdOutFile and --StdErrorFile arguments.
However, specifying them does no good. The files are created, but they are empty.
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
OK, I'm answering myself.
The first time I saw that page of jakarta.apache.org and tried it, it didn't work. I
tried again just now, and the command line command did seem to work (although it looks
like it's over the 256 byte limit). The result is a Tomcat entry in the services
list, set for
Bill,
I had seen that page before, but I'll have to admit I didn't understand it fully.
It says, in part:
" To install the service, you need to use the //IS// parameter. ...
" tomcat //IS//Tomcat5 ...
I know this sounds dumb, but is "//IS//" what you actually enter on the com
an installer; but the
5.0.16 binaries are offered as a ZIP file without installer. Any
suggestions for how to install 5.0.16 as a Windows service?
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
If you really want a trusted certificate, shop around. There are companies other than
VeriSign. I found one for $50/year.
Merrill Cornish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Asad,
You need to define a "context" in the conf/server.xml file:
The path attribute represents the path that appears in the URL following
"http://localhost"; while the docbase attribute represents the directory
under webapps where the the JSP/HTML files will be found.
Merrill
--
>>> my firewall (Zone Alarm Pro) was blocking session cookies.
Interesting. I'm also using Zone Alert Pro. I'll try turning it off and see what
happens.
Thanks,
Merrill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
he return to the servlet. This all implies that I'm constantly getting a different
session object.
getMaxInactiveInterval() = 1800, so the session isn't being artificially invalidated
by a ultra-short timeout.
Any suggestions?
Merrill Cornish
56 matches
Mail list logo