RE: Running Tomcat 4.1.27 without Jasper (or a JDK)?

2003-09-03 Thread Jon Skeet
 Actually, removing Jasper from 3.3.1(a) is about the same as 
 for 4.1.x:  You
 just comment out the JspInterceptor element in server.xml, 
 and voila: you've
 got a JSP-less Servlet-Container.
 
I tried that at the time - I can't remember which version, I'm afraid - and if I 
didn't have Jasper present, it barfed. I didn't have *any* references to JSPs left in 
the configuration, *anywhere*. Very strange. Never mind though - seems to be fine with 
4.1.

 Ok, to be helpful, for 4.1.x, you need to comment out all 
 references to
 JspServlet in $CATALINA_HOME/conf/web.xml (including the 
 servlet-mapping).
 Then you have a JSP-less Servlet-Container.

Cheers,
Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javax.servlet.http.HttpSession.getId() returns null

2003-09-03 Thread Johann Uhrmann
Johann Uhrmann wrote:
Hello,

I am writing a single-sign-on filter that uses cookies and
a request-wrapper in order to fake a form-based login in
case the user is already authenticated in another web application.
The filter needs some internal structures to perform the single-sign-on
process, e.g. a map that associates the logon name with all
active sessions of the user.
When I try to get the id of those session objects, they sometimes
return null.
Hello again,

after reviewing my logs, it seems that session objects are being
recycled by the server and the id is set to null while they are
not in use.
Is that correct?

Is there a docu that shows what objects are pooled in Tomcat so
application developer can consider the side-effects of pooling?
In my case, I held references to session objects and it seems that
the id changed over time. That behaviour broke my filter design
and was hard to track down.
Kind regards,

Hans

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: permissions for Tomcat+Apache integration

2003-09-03 Thread Sonja Löhr
With the users: I thought of this strategy (one usr for both), too. Then
one must be able to log-in or su to the apache-user to start tomcat,
which I disallowed (book-advice ;-) by now. Or is there a way let apache
start tomcat?

 Could you clarify?

I hardly have any JSPs by now.
We unfortunately have a directory with needed files outside WEB-INF,
which I will change. 
The other thing I meant was that I find it difficult to write the [uri:]
directives when Cocoon-Apps are involved - I think I would have to adopt
the URIs used in cocoon-pipelines (and the directory structure) to the
apache+tomcat task, too, they almost never have to do anything with the
filesystem.

Sonja




Am Die, 2003-09-02 um 14.50 schrieb John Turner:
 Could you clarify?
 
 If you are using Apache, and you have *.jsp mapped correctly, your 
 programming resources won't be shown to the world.
 
 Since all servlets are under WEB-INF, all you have to be concerned about 
 are JSP.  Properties files, etc. go under WEB-INF, as well.  Applciation 
 architecture best practices says don't put anything critical in a JSP, 
 so what's the big risk?
 
 Going back to your earlier question, I simply set up a certain user 
 account for both Apache and Tomcat.  webuser or whatever.  That user 
 has restricted permissions and is a member of its own group (also 
 webuser or whatever).  Apache and Tomcat run as this user.  Since 
 developers should never have access to the command line on a production 
 server, there's no problem.
 
 John
 
 Sonja Löhr wrote:
 
  You are very right in that my greatest problem is to work out a pattern
  where to find the static content hides that Apache could perhaps serve a
  bit faster.  Unfortunately, I can't tell Apache to serve .gif etc. but
  must come the other way round, perhaps ending up with URLs to single
  servlets.
  Many people cite security-reasons for the integration of the two, but all
  I've been bothered up to now is how to prevent Apache to show my programming
  ressources to the world (those unfortunately not located in WEB-INF).
  
  I'll be thinking about doing it separately, you really calmed me down :-)
  thanks very much
  Sonja
  
  
  
  - Original Message - 
  From: Eric J. Pinnell [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Monday, September 01, 2003 4:28 PM
  Subject: Re: permissions for Tomcat+Apache integration
  
  
  Hi,
  
  The question is do you need to secure your application from the outside
  world or do you need to secure it from users that might be logging on to
  your system?  Or both?
  
  Usually you want to go with the both scenerio.
  
  But to keep it simple, pick a user that you want tomcat to run as.  Untar
  Tomcat and chown -R tomcat jakarta-4.x.x  (if the user is named tomcat
  which isn't a bad name for the Tomcat user ;)
  
  Then just run it.  It will be ok just like that.  If you are running
  Tomcat and Apache on the same machine really look at why you are running
  Apache at all.  It's a popular misconception that you _must_ run Apache in
  front of Tomcat.  That couldn't be more wrong.  Running Tomcat alone will
  save you the hassle of Apache and the connectors.  However you do need to
  run Apache if you are going to use load balanceing and the apache
  modules.  However most times people just have Apache pipe everything back
  to Tomcat.  In this case you don't need Apache at all.
  
  -e
  
  On Mon, 1 Sep 2003, [iso-8859-1] Sonja Löhr wrote:
  
  
 Hello!
 
 Here is my second question, now concerning Apache+Tomcat integration on
 Linux:
 Could someone tell me a reasonable users, groups and file permissions
 structure for apache, the tomcat-files itself and a typical webapp?  -
  
  Java
  
 security aside.
 
 1. Is it a good idea at all to place the webapps under apache's document
 root, having to care about all WEB-INF and other sensible directories with
 deny from all ?
 
 2. Which account in which group?
 Apache needs access to static files somewhere in the webapp. (Which may be
 very dispersed f.e. in case of cocoon).
  If a tomcat user and the apache user account are in the same group
  
  with
  
 restricted permissions, I can't assign permissions to a group of
  
  developers,
  
 just another owner (me ;-).  Ok, may it be. Additionally, if tomcat
  
  unpacks
  
 war files, all resulting directories are owned by tomcat alone. So should
  
  I
  
 put the apache user into the tomcat group?
 
 3.How paranoid must I be about tomcat-files (server-directory f.e)?
 Tomcat needs write access to some directories, but certainly I don't know
 all processes tomcat.
 
 You probably guess by now that I'm not grown up with Unix-systems.
 Spent my whole sunday with chmod and chown, now I would be very happy if
 someone told me something SIMPLE  :-)
 
 Thank you,
 Sonja
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL 

restart tomcat everytime I make change to servlet -- after experiment

2003-09-03 Thread Clive Luk
OK. seems i am asking a hard question here. But I did some experiment
myself. just to give out more hints to the list to help solving my problem
and I am hoping someone maybe able to help. I am sure someone in the world
will have the same problem  and been solved.

here is what i have done. after no luck with my virtual host setting. i am
trying going through tomcat directly via port 8080

* I created a directory under {$tomcat_home}/webapps/ call mytest
* I copied the WEB-INF to the default place {$tomcat_home}/webapps/mytest
* under that i have
drwxr-xr-x2 root root 4096 Sep  3 16:20 classes
-rw-r--r--1 root root  998 Sep  3 16:20 web.xml
* under classes i have
-rw-r--r--1 root root  870 Sep  3 16:39 HelloWorld.class


in {$tomcat_home}/conf/server.xml

i added that
Context path=/mytest docBase=mytest debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mytest_log. suffix=.txt
  timestamp=true/
/Context

then I can access the HelloWorld servlet by
http://localhost:8080/mytest/HelloWorld
If i made changes on HelloWorld.java, recompile and replace the old
HelloWorld.class with the new one.

I still can see tomcat knows i am making changes

WebappClassLoader:   Resource '/WEB-INF/classes/HelloWorld.class' was
modified; Date is now: Wed Sep 03 16:39:54 EST 2003 Was: Wed Sep 03 16:26:11
EST 2003

but after I refresh the http://localhost:8080/mytest/HelloWorld I still get
the bunch of java errors.

first reload saying HTTP Status 500
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception SNIP java errors

second reload saying HTTP Status 503 - Servlet HelloWorld is currently
unavailable
type Status report
message Servlet HelloWorld is currently unavailable
description The requested service (Servlet HelloWorld is currently
unavailable) is not currently available.


Then, since I can see mytest under the tomcat manager. I can reload it.
but still the same java errors happened. I had to stop and start mytest
in order to see the changes. But I don't want to do this STOP START ACTION
again and again after every single change of the servlet.

I thought the reloadable=true will handle that.

I don't really want to blame on a bug of tomcat. But would that be possible.
OR has anyone in the world has done what I want to do without using any
tools like the tomcat manager? I am greatly appreciated for any help.
THANKS.

I am going to pull all my hair out... : (

Cheers,
Clive


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Vedr.: restart tomcat everytime I make change to servlet -- afterexperiment

2003-09-03 Thread Thomas Nybro Bolding
There was a thread the other day about the same issue I think. Two persons 
answered:

Tim Funk replied:

YOu mean this?
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096

-Tim

And John Wigfield replied:

Have you applied the hotfix?

http://hillman-family.net/dist/jakarta/tomcat-4/binaries/

Their answers helped the other guy and will also probably do the job for 
you.

/Thomas




Clive Luk [EMAIL PROTECTED]
03-09-03 09:07
Besvar venligst til Tomcat Users List

 
Til:Tomcat Users List [EMAIL PROTECTED]
cc: 
Vedr.:  restart tomcat everytime I make change to servlet -- after experiment

OK. seems i am asking a hard question here. But I did some experiment
myself. just to give out more hints to the list to help solving my problem
and I am hoping someone maybe able to help. I am sure someone in the world
will have the same problem  and been solved.

here is what i have done. after no luck with my virtual host setting. i am
trying going through tomcat directly via port 8080

* I created a directory under {$tomcat_home}/webapps/ call mytest
* I copied the WEB-INF to the default place {$tomcat_home}/webapps/mytest
* under that i have
drwxr-xr-x2 root root 4096 Sep  3 16:20 classes
-rw-r--r--1 root root  998 Sep  3 16:20 web.xml
* under classes i have
-rw-r--r--1 root root  870 Sep  3 16:39 HelloWorld.class


in {$tomcat_home}/conf/server.xml

i added that
Context path=/mytest docBase=mytest debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mytest_log. suffix=.txt
  timestamp=true/
/Context

then I can access the HelloWorld servlet by
http://localhost:8080/mytest/HelloWorld
If i made changes on HelloWorld.java, recompile and replace the old
HelloWorld.class with the new one.

I still can see tomcat knows i am making changes

WebappClassLoader:   Resource '/WEB-INF/classes/HelloWorld.class' was
modified; Date is now: Wed Sep 03 16:39:54 EST 2003 Was: Wed Sep 03 
16:26:11
EST 2003

but after I refresh the http://localhost:8080/mytest/HelloWorld I still get
the bunch of java errors.

first reload saying HTTP Status 500
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception SNIP java errors

second reload saying HTTP Status 503 - Servlet HelloWorld is currently
unavailable
type Status report
message Servlet HelloWorld is currently unavailable
description The requested service (Servlet HelloWorld is currently
unavailable) is not currently available.


Then, since I can see mytest under the tomcat manager. I can reload it.
but still the same java errors happened. I had to stop and start 
mytest
in order to see the changes. But I don't want to do this STOP START ACTION
again and again after every single change of the servlet.

I thought the reloadable=true will handle that.

I don't really want to blame on a bug of tomcat. But would that be 
possible.
OR has anyone in the world has done what I want to do without using any
tools like the tomcat manager? I am greatly appreciated for any help.
THANKS.

I am going to pull all my hair out... : (

Cheers,
Clive


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



Interesting (?) classloader problem

2003-09-03 Thread Jon Skeet
As observant readers will have noticed, I'm migrating a webapp or two from Tomcat 
3.2.3 to Tomcat 4.1. Now, our apps have a very specific version of Xerces that they 
currently need to use (although I'm hoping this requirement will go away). I believe 
the version is Xerces-J 1.4.4 (at least according to the SourceSafe history). Now, 
that sounds considerably out of whack with what Tomcat ships with, and my guess is 
that Tomcat may well not be able to work properly with the version we need. (I would 
just try it, but there's always a good chance that there'll be something hiding away 
which doesn't get tested.)

I can stick the version of xerces.jar in my webapp's lib directory, but according to 
the documentation, everything in org.apache.xerces (and the org.xml.sax and 
org.w3c.dom) packages gets delegated to the parent classloader, which obviously 
wouldn't help me as I'd pick up the newer version of Xerces instead of the one I need.

There's also another wrinkle which means I need to load xerces.jar *before* any of the 
other jar files in webapps/lib. I can't remember where exactly this requirement comes 
from, but I suspect it's due to some other library we use having its own version of 
xerces (or maybe just the XML API) built in.

I can clearly modify the WebappClassLoader source to get rid of the delegation for 
org.apache.xerces: what would be the downside of this? Why does the documentation even 
say you can override common/lib/xerces.jar by putting xerces.jar into webapps/lib, 
when it's going to delegate everything anyway?

The business about loading xerces.jar first is slightly thorny - I suspect the best 
solution may be to just find out which other jar file contains the other/wrong classes 
and take them out, but I'd be interested to hear any other solutions.

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running Tomcat 4.1.27 without Jasper (or a JDK)?

2003-09-03 Thread Bill Barker
Yeah, well, it won't work with 3.3.0 (it will exhibit the intestinal
behavior that you describe :).  After the 3.3.0 release the Velocity people
lobbied for a non-JSP Servlet-container, so with 3.3.1, we (with non-default
options) gave it to them.


Jon Skeet [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Actually, removing Jasper from 3.3.1(a) is about the same as
 for 4.1.x:  You
 just comment out the JspInterceptor element in server.xml,
 and voila: you've
 got a JSP-less Servlet-Container.

I tried that at the time - I can't remember which version, I'm afraid - and
if I didn't have Jasper present, it barfed. I didn't have *any* references
to JSPs left in the configuration, *anywhere*. Very strange. Never mind
though - seems to be fine with 4.1.

 Ok, to be helpful, for 4.1.x, you need to comment out all
 references to
 JspServlet in $CATALINA_HOME/conf/web.xml (including the
 servlet-mapping).
 Then you have a JSP-less Servlet-Container.

Cheers,
Jon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



$CATALINA_BASE/temp

2003-09-03 Thread Samuel Le Berrigaud
Hi everybody,

I'm using tomcat 4.1.27 on a Linux system. It works very well ! But I 
had a little problem of disk space because of the $CATALINA_BASE/temp 
that grows up very fast in size. In that folder I found some file s like 
jar_cahe*tmp.

Does someone know how to limit the size of this directory ? Is there a 
special tomcat configuration for that Thanks,

SaM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Any contractors from HK, S.E.Asia or India in this forum ?

2003-09-03 Thread aprw00
I will GO to SE-Asia if the $$$ is right!



Quoting unplug [EMAIL PROTECTED]:

 I am exactly from HK.
 
 engp0510 wrote:
  
  From PR. China studying in Singapore.
  
  - Original Message -
  From: Clive Luk [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Wednesday, September 03, 2003 9:32 AM
  Subject: RE: Any contractors from HK, S.E.Asia or India in this forum ?
  
   I am from HK but i am working in australia... but i am still after
  help
   i can be a hk team if you don't mind...
  
   Cheers,
   Clive
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
   [EMAIL PROTECTED]
   Sent: Wednesday, September 03, 2003 9:37 AM
   To: Tomcat Users List
   Subject: Re: Any contractors from HK, S.E.Asia or India in this forum ?
  
  
   Beacuse I'm trying t put together a dedicated team in HK
  
   Santos Jha wrote:
   
dude/dudess
Why are u asking this question. Yes I am from SE Asia
.so?
   
[EMAIL PROTECTED] wrote:
   
C'mon
There are 7+ million people in HK, x-number of multi-nationals from
y-number of industry sectors.
I can't believe no HK person is contributing to or listening in on
 this
forum.
Don't be shy.

[EMAIL PROTECTED] wrote:


Hiya, all.
Any contractors in this forum specializing in java applet/servlet,
  a2s,
jndi in an apache2/tc4 environment and are from HK/China, S.E.Asia
 or
India ? Got a website?
TIA :-)

   
  

   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   
  

   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running Tomcat 4.1.27 without Jasper (or a JDK)?

2003-09-03 Thread Thomas Kellerer
Jon Skeet schrieb:

Just out of curiosity: I'm wondering why you want to do that?

The overhead of the JDK over JRE isn't that big and disk space isn't
usually a problem.


We distribute the JRE in our installation. I know these days you're allowed
to distribute tools.jar (and javac.exe?) but the JRE we distribute (which
would be inconvenient to change) doesn't allow this.
Ah! Right, I didn't think about re-distribution.

Cheers
Thomas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem in tomcat-5.0-doc/setup.html

2003-09-03 Thread Damien
Hi,

I've downloaded tomcat (jakarta-tomcat-5.0.9.tar.gz) and I'm following
the instructions found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

There is a little error that might confuse beginners :


cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc
autoconf
./configure
make
cp jsvc ..
cd ..


[EMAIL PROTECTED] jsvc]# make
[...]
make[1]: Leaving directory `/usr/local/tomcat/bin/jsvc/native'
[EMAIL PROTECTED] jsvc]# cp jsvc ..
cp: ne peut écraser le répertoire `../jsvc' par un non-répertoire

I think you should rename the folder after untar it :

cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
mv jsvc jsvc-source
cd jsvc-source
autoconf
./configure
make
cp jsvc ..
cd ..


Bye


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem in tomcat-5.0-doc/setup.html

2003-09-03 Thread Remy Maucherat
Damien wrote:
Hi,

I've downloaded tomcat (jakarta-tomcat-5.0.9.tar.gz) and I'm following
the instructions found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html
There is a little error that might confuse beginners :

cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc
autoconf
./configure
make
cp jsvc ..
cd ..
[EMAIL PROTECTED] jsvc]# make
[...]
make[1]: Leaving directory `/usr/local/tomcat/bin/jsvc/native'
[EMAIL PROTECTED] jsvc]# cp jsvc ..
cp: ne peut écraser le répertoire `../jsvc' par un non-répertoire
I think you should rename the folder after untar it :

cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
mv jsvc jsvc-source
cd jsvc-source
autoconf
./configure
make
cp jsvc ..
cd ..
I'll fix that. I was using Cygwin when I tested this, and on that 
platform, the executable name is jsvc.exe, so there's no conflict. Dumb 
mistake ;-)

--
x
Rémy Maucherat
Senior Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem with my first webapp

2003-09-03 Thread Damien
Hi,

I'm following the instrutions found in :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

I'm trying to install my first webapp in tomcat but a problem occurs :

[EMAIL PROTECTED] tomcat-test]$ ant install
Buildfile: build.xml
 
prepare:
 
compile:
 
install:
  [install] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01
Transitional//EN http://www.w3.org/TR/html4/loose.dtd;
  [install] html lang=fr
  [install] head
  [install] titleCentre de Commande de POPFile/title
  [install] link rel=stylesheet type=text/css
href=skins/SimplyBlue.css title=SimplyBlue

[...]

  [install] /body
  [install] /html
 
BUILD FAILED
file:/home/quetzalcoatl/Documents/www/tomcat-test/build.xml:364:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
 
Total time: 2 seconds
[EMAIL PROTECTED] tomcat-test]$ 

Here, we can see the index page of popfile (a mail classifier proxy)
which is under the port 8080 of my computer.

I've changed the file $CATALINA_HOME/conf/server.xml so tomcat uses the
port 8081 instead of 8080 :

 Connector port=8081
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /


But 'ant install' always output the same error message. Can somebody
help me ?

Thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javax.servlet.http.HttpSession.getId() returns null

2003-09-03 Thread Tim Funk


Johann Uhrmann wrote:

Johann Uhrmann wrote:

Hello,

I am writing a single-sign-on filter that uses cookies and
...


after reviewing my logs, it seems that session objects are being
recycled by the server and the id is set to null while they are
not in use.
Is that correct?
I think so. But in tomcat5 - I think think pooling is not done.

Is there a docu that shows what objects are pooled in Tomcat so
application developer can consider the side-effects of pooling?
Not that I know of.

In my case, I held references to session objects and it seems that
the id changed over time. That behaviour broke my filter design
and was hard to track down.
Since sessions may also passivate to some persistent store such as a file or 
database or ??? you had a good chance at having problems in the future anyways.

-Tim



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Interesting (?) classloader problem

2003-09-03 Thread Cox, Charlie
There is a typo in the documentation - you can not override the Xerces
parser used. You can replace the one in /common/endorsed and see if it works
- I don't recall which version tomcat requires. Have you tried your app with
the version that tomcat supplies?

you can't guarantee the order in which jars are loaded within the same
classloader, but if you can replace the version in /common/endorsed, then it
won't matter what xml classes any web-inf jars include.

If you modify the WebappClassLoader class, you will have to maintain it for
each tomcat upgrade. You will still need to make sure you get the xerces
jar, and not the xml classes from other jars.

Charlie

 -Original Message-
 From: Jon Skeet [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 03, 2003 3:58 AM
 To: Tomcat User List (E-mail)
 Subject: Interesting (?) classloader problem
 
 
 As observant readers will have noticed, I'm migrating a 
 webapp or two from Tomcat 3.2.3 to Tomcat 4.1. Now, our apps 
 have a very specific version of Xerces that they currently 
 need to use (although I'm hoping this requirement will go 
 away). I believe the version is Xerces-J 1.4.4 (at least 
 according to the SourceSafe history). Now, that sounds 
 considerably out of whack with what Tomcat ships with, and my 
 guess is that Tomcat may well not be able to work properly 
 with the version we need. (I would just try it, but there's 
 always a good chance that there'll be something hiding away 
 which doesn't get tested.)
 
 I can stick the version of xerces.jar in my webapp's lib 
 directory, but according to the documentation, everything in 
 org.apache.xerces (and the org.xml.sax and org.w3c.dom) 
 packages gets delegated to the parent classloader, which 
 obviously wouldn't help me as I'd pick up the newer version 
 of Xerces instead of the one I need.
 
 There's also another wrinkle which means I need to load 
 xerces.jar *before* any of the other jar files in 
 webapps/lib. I can't remember where exactly this requirement 
 comes from, but I suspect it's due to some other library we 
 use having its own version of xerces (or maybe just the XML 
 API) built in.
 
 I can clearly modify the WebappClassLoader source to get rid 
 of the delegation for org.apache.xerces: what would be the 
 downside of this? Why does the documentation even say you can 
 override common/lib/xerces.jar by putting xerces.jar into 
 webapps/lib, when it's going to delegate everything anyway?
 
 The business about loading xerces.jar first is slightly 
 thorny - I suspect the best solution may be to just find out 
 which other jar file contains the other/wrong classes and 
 take them out, but I'd be interested to hear any other solutions.
 
 Jon
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Interesting (?) classloader problem

2003-09-03 Thread Jon Skeet
 There is a typo in the documentation - you can not override the Xerces
 parser used.

Aha. That at least explains my confusion :)

 You can replace the one in /common/endorsed and 
 see if it works - I don't recall which version tomcat requires. Have you 
 tried your app with the version that tomcat supplies?

I haven't yet, to be honest - hopefully I'll be able to use that in the end, but the 
guy whose code is most likely to use internal xerces/xalan interfaces is on holiday 
this week...

 you can't guarantee the order in which jars are loaded within the same
 classloader, but if you can replace the version in 
 /common/endorsed, then it
 won't matter what xml classes any web-inf jars include.

Fortunately, I've found that isn't a problem any more. I'm not sure when it was, but 
it seems to be okay now. I checked which classes were duplicated, and they only seem 
to be the standard interfaces/base classes, not the implementations. I wish I could 
find the bug report for what was wrong before...
 
 If you modify the WebappClassLoader class, you will have to 
 maintain it for each tomcat upgrade.

Indeed. We very rarely upgrade though, to be honest, so that shouldn't be a problem - 
and hopefully I'll be able to get rid of it soon and we can use the standard xerces 
when my colleague comes back. I just wanted something to get up and running to start 
with.

Jon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: Problem with my first webapp

2003-09-03 Thread erik . itter
are you sure your build.xml is correct, my builds do not output the file 
contents...



Mail von Extern


Damien [EMAIL PROTECTED]


03.09.2003 12:44
Bitte antworten an Tomcat Users List

 
An: [EMAIL PROTECTED]
Kopie: 
Thema:  Problem with my first webapp


Hi,

I'm following the instrutions found in :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

I'm trying to install my first webapp in tomcat but a problem occurs :

[EMAIL PROTECTED] tomcat-test]$ ant install
Buildfile: build.xml
 
prepare:
 
compile:
 
install:
  [install] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01
Transitional//EN http://www.w3.org/TR/html4/loose.dtd;
  [install] html lang=fr
  [install] head
  [install] titleCentre de Commande de POPFile/title
  [install] link rel=stylesheet type=text/css
href=skins/SimplyBlue.css title=SimplyBlue

[...]

  [install] /body
  [install] /html
 
BUILD FAILED
file:/home/quetzalcoatl/Documents/www/tomcat-test/build.xml:364:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
 
Total time: 2 seconds
[EMAIL PROTECTED] tomcat-test]$ 

Here, we can see the index page of popfile (a mail classifier proxy)
which is under the port 8080 of my computer.

I've changed the file $CATALINA_HOME/conf/server.xml so tomcat uses the
port 8081 instead of 8080 :

 Connector port=8081
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /


But 'ant install' always output the same error message. Can somebody
help me ?

Thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





RE: Interesting (?) classloader problem

2003-09-03 Thread Shapira, Yoav

Howdy,
I saw from the other messages you already have a workaround, but here's
another suggestion anyways: take the xerces that comes with tomcat and
put it in $CATALINA_HOME/server/lib.  Take the one your app needs and
put it in the endorsed directory.  See what happens ;)

But as you yourself said, the better course is to upgrade to the 2.x
branch of xerces, which is now stable, mature, fast, robust, etc etc
etc.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jon Skeet [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 3:58 AM
To: Tomcat User List (E-mail)
Subject: Interesting (?) classloader problem

As observant readers will have noticed, I'm migrating a webapp or two
from
Tomcat 3.2.3 to Tomcat 4.1. Now, our apps have a very specific version
of
Xerces that they currently need to use (although I'm hoping this
requirement will go away). I believe the version is Xerces-J 1.4.4
(at
least according to the SourceSafe history). Now, that sounds
considerably
out of whack with what Tomcat ships with, and my guess is that Tomcat
may
well not be able to work properly with the version we need. (I would
just
try it, but there's always a good chance that there'll be something
hiding
away which doesn't get tested.)

I can stick the version of xerces.jar in my webapp's lib directory, but
according to the documentation, everything in org.apache.xerces (and
the
org.xml.sax and org.w3c.dom) packages gets delegated to the parent
classloader, which obviously wouldn't help me as I'd pick up the newer
version of Xerces instead of the one I need.

There's also another wrinkle which means I need to load xerces.jar
*before*
any of the other jar files in webapps/lib. I can't remember where
exactly
this requirement comes from, but I suspect it's due to some other
library
we use having its own version of xerces (or maybe just the XML API)
built
in.

I can clearly modify the WebappClassLoader source to get rid of the
delegation for org.apache.xerces: what would be the downside of this?
Why
does the documentation even say you can override common/lib/xerces.jar
by
putting xerces.jar into webapps/lib, when it's going to delegate
everything
anyway?

The business about loading xerces.jar first is slightly thorny - I
suspect
the best solution may be to just find out which other jar file contains
the
other/wrong classes and take them out, but I'd be interested to hear
any
other solutions.

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat migration problem

2003-09-03 Thread Shanta B
[EMAIL PROTECTED]



Hi
 I have an application siefriend..it had apache,jrun configuration.No w
i am migrating to apache ,tomcat4.1.18 ...now i am getting following error.

pl find my web.xml and catalina.out(sorry its big one).

Thanks in advance
shanta.B

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app

servlet
servlet-nameInitParams/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.framework.common.ServletParams/servlet-cl
ass
display-name/display-name
description/description
/servlet

servlet
servlet-nameFactoryInit/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.framework.adapters.factory.ServletInit/se
rvlet-class
display-name/display-name
description/description
load-on-startup2/load-on-startup
/servlet

servlet
servlet-nameInitUserServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.InitUser
Servlet/servlet-class
display-name/display-name
description/description
load-on-startup3/load-on-startup
/servlet

servlet
servlet-nameInitAdminServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.admin.servlet.InitA
dminServlet/servlet-class
display-name/display-name
description/description
load-on-startup4/load-on-startup
/servlet

servlet
servlet-namewebaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.WebAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup5/load-on-startup
/servlet

servlet
servlet-namewapaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.WapAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup6/load-on-startup
/servlet

servlet
servlet-nameadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.admin.servlet.Admin
AccessServlet/servlet-class
display-name/display-name
description/description
  load-on-startup7/load-on-startup
/servlet

servlet
  servlet-nameremoteadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2 /param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.remoteadmin.en
try.RemoteAdminAccess/servlet
-class
display-name/display-name
description/description
load-on-startup8/load-on-startup
/servlet

servlet
servlet-namepm/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 

RE: tomcat migration problem

2003-09-03 Thread Shapira, Yoav

Howdy,
As the parsing error clearly says, you have the wrong order of elements
in your servlet tags in web.xml.  You can't have description after
servlet-class, for example.  Use an XML editor or whatever you like to
validate your web.xml against the DTD.  It's also a better idea to use
the servlet 2.3 DTD not 2.2 like you have.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Shanta B [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 9:32 AM
To: '[EMAIL PROTECTED]'
Subject: tomcat migration problem

[EMAIL PROTECTED]



Hi
 I have an application siefriend..it had apache,jrun
configuration.No w
i am migrating to apache ,tomcat4.1.18 ...now i am getting following
error.

pl find my web.xml and catalina.out(sorry its big one).

Thanks in advance
shanta.B

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app

servlet
servlet-nameInitParams/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-classcom.siemens.mobile.framework.common.ServletParams/servl
et-
cl
ass
display-name/display-name
description/description
/servlet

servlet
servlet-nameFactoryInit/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.framework.adapters.factory.ServletInit/se
rvlet-class
display-name/display-name
description/description
load-on-startup2/load-on-startup
/servlet

servlet
servlet-nameInitUserServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.applications.siefriend.user.entry.InitUser
Servlet/servlet-class
display-name/display-name
description/description
load-on-startup3/load-on-startup
/servlet

servlet
servlet-nameInitAdminServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.applications.siefriend.admin.servlet.InitA
dminServlet/servlet-class
display-name/display-name
description/description
load-on-startup4/load-on-startup
/servlet

servlet
servlet-namewebaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.applications.siefriend.user.entry.WebAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup5/load-on-startup
/servlet

servlet
servlet-namewapaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.applications.siefriend.user.entry.WapAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup6/load-on-startup
/servlet

servlet
servlet-nameadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param

servlet-
classcom.siemens.mobile.applications.siefriend.admin.servlet.Admin
AccessServlet/servlet-class
display-name/display-name
description/description
  load-on-startup7/load-on-startup
/servlet

servlet
  servlet-nameremoteadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2 /param-value

Can not get SSL Client Certificate

2003-09-03 Thread Elif Akten
Hi,
I have been trying to get SSL client certificate during a client 
authenticated SSL session. I am using Apache 2.0 with Tomcat 4.1.27. 
Everything works succesfully: when I want to open a SSL protected JSP page 
my browser asks for my client certificate and verifies it. But when I try to 
get client certificate using request.getHeader(SSL_CLIENT_CERT) it returns 
null. Also request.getAuthType() and request.getUserPrincipal() return null 
value. Following is the relevant part from our httpd.conf file:

VirtualHost dune.net:443
SSLEngine On
SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key
JkExtractSSL On
JkHTTPSIndicator HTTPS
JkSESSIONIndicator SSL_SESSION_ID
JkCIPHERIndicator SSL_CIPHER
JkCERTSIndicator SSL_CLIENT_CERT
/VirtualHost
SSLVerifyClient require
SSLVerifyDepth 2
SSLCACertificateFile C:/Program Files/Apache Group/Apache2/conf/ssl/ca.cer
SSLCACertificatePath C:/Program Files/Apache Group/Apache2/conf/ssl
SSLCACertificateFile C:/Program Files/Apache 
Group/Apache2/conf/ssl/rootca.cer

IfModule !mod_jk.c
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.dll
/IfModule

JkWorkersFile C:/Program Files/Apache Tomcat 4.0/conf/workers.properties
JkLogFile C:/Program Files/Apache Tomcat 4.0/logs/mod_jk.log
JkLogLevel info
JkMount /examples/* ajp13
Also our ssl.conf file includes the following lines :

SSLOptions +StdEnvVars +ExportCertData
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkMount /demo/* ajp13
JkExtractSSL On
JkEnvVar SSL_CLIENT_CERT UNSET
What should I do to read the client certificate? Any help is welcome...

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: restart tomcat everytime I make change to servlet

2003-09-03 Thread Mike Curwen
Did you apply the hotfix, that is specifically for class reloading
issues in 4.1.27 ?
 


 -Original Message-
 From: Clive Luk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 02, 2003 9:13 PM
 To: [EMAIL PROTECTED]
 Subject: RE: restart tomcat everytime I make change to servlet
 
 

snip /

 
 Could that be a problem of I am using a binary of tomcat?
 
 i am using tomcat 4.1.27


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: Problem with my first webapp

2003-09-03 Thread Damien
Le mer 03/09/2003 à 14:50, [EMAIL PROTECTED] a écrit :
 are you sure your build.xml is correct, my builds do not output the file 
 contents...

I have downloaded an example build.xml, so I think it is correct.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: restart tomcat everytime I make change to servlet -- after experiment

2003-09-03 Thread Mike Curwen
Don't pull out your hair, check my reply to your first post... (class
reloading is buggy in Tomcat 4.1.27)


 -Original Message-
 From: Clive Luk [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 03, 2003 2:07 AM
 To: Tomcat Users List
 Subject: restart tomcat everytime I make change to servlet -- 
 after experiment
 

snip /

 
 I don't really want to blame on a bug of tomcat. But would 
 that be possible. OR has anyone in the world has done what I 
 want to do without using any tools like the tomcat manager? I 
 am greatly appreciated for any help. THANKS.
 
 I am going to pull all my hair out... : (
 
 Cheers,
 Clive
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can not get SSL Client Certificate

2003-09-03 Thread John Turner
First thing I would try is putting your LoadModule line ABOVE every line 
that uses Jk*, such as:

JkExtractSSL On
JkHTTPSIndicator HTTPS
JkSESSIONIndicator SSL_SESSION_ID
JkCIPHERIndicator SSL_CIPHER
JkCERTSIndicator SSL_CLIENT_CERT
As positioned in your post, the lines shown above would have no effect 
if Jk wasn't loaded until later.

John

Elif Akten wrote:
Hi,
I have been trying to get SSL client certificate during a client 
authenticated SSL session. I am using Apache 2.0 with Tomcat 4.1.27. 
Everything works succesfully: when I want to open a SSL protected JSP 
page my browser asks for my client certificate and verifies it. But when 
I try to get client certificate using 
request.getHeader(SSL_CLIENT_CERT) it returns null. Also 
request.getAuthType() and request.getUserPrincipal() return null value. 
Following is the relevant part from our httpd.conf file:

VirtualHost dune.net:443
SSLEngine On
SSLCipherSuite 
ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key

JkExtractSSL On
JkHTTPSIndicator HTTPS
JkSESSIONIndicator SSL_SESSION_ID
JkCIPHERIndicator SSL_CIPHER
JkCERTSIndicator SSL_CLIENT_CERT
/VirtualHost
SSLVerifyClient require
SSLVerifyDepth 2
SSLCACertificateFile C:/Program Files/Apache 
Group/Apache2/conf/ssl/ca.cer
SSLCACertificatePath C:/Program Files/Apache Group/Apache2/conf/ssl
SSLCACertificateFile C:/Program Files/Apache 
Group/Apache2/conf/ssl/rootca.cer

IfModule !mod_jk.c
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.dll
/IfModule

JkWorkersFile C:/Program Files/Apache Tomcat 4.0/conf/workers.properties
JkLogFile C:/Program Files/Apache Tomcat 4.0/logs/mod_jk.log
JkLogLevel info
JkMount /examples/* ajp13
Also our ssl.conf file includes the following lines :

SSLOptions +StdEnvVars +ExportCertData
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkMount /demo/* ajp13
JkExtractSSL On
JkEnvVar SSL_CLIENT_CERT UNSET
What should I do to read the client certificate? Any help is welcome...

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Counting active sessions if server restarts very often

2003-09-03 Thread Christian Hauser
Hello list

I implemented a session counter to count all active sessions. Now I have 
the problem that because the server is being restarted very often, my 
static variable activeSessions is always set to 0.

Is there an other way to implement this? Maybe by saving the variable 
activeSessions to a session (which is restored when the server has 
restarted)?

I'd like to know the previous value (= value before restart) of the 
active session count when the server has been restarted.

Thank you in advance for any hint on that.
  Christian
Here's my actual code:

public class SessionCounter implements HttpSessionListener {
  private static int activeSessions = 0;
  public synchronized void sessionCreated(HttpSessionEvent event) {
activeSessions++;
  }
  public synchronized void sessionDestroyed(HttpSessionEvent event) {
if (activeSessions  0) {
  activeSessions--;
}
  }
  public static int getActiveSessions() {
return activeSessions;
  }
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread Jon Skeet
I'm running into a problem when I try to run shutdown.bat (or use the stop parameter 
directly). I get an exception in the main Tomcat process:

java.net.BindException: Cannot assign requested address: connect
snip

I've had a look in Bugzilla, and this seems to be bug 17193. The process is hanging 
around, although Tomcat itself has stopped listening for requests on port 8080.

This isn't too bad, as our own service start/stop code quits the VM after 5 seconds, 
but it's not generally nice.


Is there a good workaround for this (use a different version of JK etc) which is 
particularly recommended?

Does anyone familiar with the code in this area know whether it's worth me even 
looking at it to try to fix it myself?

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat migration problem

2003-09-03 Thread Bodycombe, Andrew
Hi Shanta,

The order of your elements is important:

(icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),ini
t-param*,load-on-startup?,security-role-ref*)

Your servlet-class tags must appear before your init-param tags.
display-name and description must appear before servlet-class

Hope this helps
Andy

-Original Message-
From: Shanta B [mailto:[EMAIL PROTECTED] 
Sent: 03 September 2003 14:32
To: '[EMAIL PROTECTED]'
Subject: tomcat migration problem


[EMAIL PROTECTED]



Hi
 I have an application siefriend..it had apache,jrun configuration.No w
i am migrating to apache ,tomcat4.1.18 ...now i am getting following error.

pl find my web.xml and catalina.out(sorry its big one).

Thanks in advance
shanta.B

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app

servlet
servlet-nameInitParams/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.framework.common.ServletParams/servlet-cl
ass
display-name/display-name
description/description
/servlet

servlet
servlet-nameFactoryInit/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.framework.adapters.factory.ServletInit/se
rvlet-class
display-name/display-name
description/description
load-on-startup2/load-on-startup
/servlet

servlet
servlet-nameInitUserServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.InitUser
Servlet/servlet-class
display-name/display-name
description/description
load-on-startup3/load-on-startup
/servlet

servlet
servlet-nameInitAdminServlet/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.admin.servlet.InitA
dminServlet/servlet-class
display-name/display-name
description/description
load-on-startup4/load-on-startup
/servlet

servlet
servlet-namewebaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.WebAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup5/load-on-startup
/servlet

servlet
servlet-namewapaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.user.entry.WapAcces
sServlet/servlet-class
display-name/display-name
description/description
load-on-startup6/load-on-startup
/servlet

servlet
servlet-nameadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2/param-value
/init-param
 
servlet-classcom.siemens.mobile.applications.siefriend.admin.servlet.Admin
AccessServlet/servlet-class
display-name/display-name
description/description
  load-on-startup7/load-on-startup
/servlet

servlet
  servlet-nameremoteadminaccess/servlet-name
init-param
param-nameinitParam1/param-name
param-valuevalue1/param-value
/init-param
init-param
param-nameinitParam2/param-name
param-valuevalue2 /param-value
/init-param
 

RE: Antwort: Problem with my first webapp

2003-09-03 Thread Shapira, Yoav

Howdy,

Le mer 03/09/2003 à 14:50, [EMAIL PROTECTED] a écrit :
 are you sure your build.xml is correct, my builds do not output the file
 contents...

I have downloaded an example build.xml, so I think it is correct.

That's not always a good assumption ;)  Where's the build file from?

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: Re: Antwort: Problem with my first webapp

2003-09-03 Thread erik . itter
and you are sure you have a web application (structure and web.xml)?
perhaps you should post some additional information (files of you webapp 
and build.xml)



Mail von Extern


Damien [EMAIL PROTECTED]


03.09.2003 15:48
Bitte antworten an Tomcat Users List

 
An: Tomcat Users List [EMAIL PROTECTED]
Kopie: 
Thema:  Re: Antwort: Problem with my first webapp


Le mer 03/09/2003 à 14:50, [EMAIL PROTECTED] a écrit :
 are you sure your build.xml is correct, my builds do not output the file 

 contents...

I have downloaded an example build.xml, so I think it is correct.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: $CATALINA_BASE/temp

2003-09-03 Thread Fred Kreek
At 10:46 03/09/03, you wrote:
Hi everybody,

I'm using tomcat 4.1.27 on a Linux system. It works very well ! But I had 
a little problem of disk space because of the $CATALINA_BASE/temp that 
grows up very fast in size. In that folder I found some file s like 
jar_cahe*tmp.

Does someone know how to limit the size of this directory ? Is there a 
special tomcat configuration for that Thanks,

SaM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
try quota?



--
F. Kreek
Kamer J2-278   e-mail: [EMAIL PROTECTED]
Klinische InformatieKunde  tel: +31-20-566 6687
AMC - Amsterdamfax: +31-20-691 9840
Meibergdreef 15
1105 AZ Amsterdam
There are 10 types of people when it comes to binary, those that 
understand it.. and those who don't.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Counting active sessions if server restarts very often

2003-09-03 Thread Shapira, Yoav

Howdy,

Is there an other way to implement this? Maybe by saving the variable
activeSessions to a session (which is restored when the server has
restarted)?

This is not a bad idea, and might be the easiest way.  A DB write on
shutdown/read on startup is also an option.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread Shapira, Yoav

Howdy,
I think a jk2 release (v1.2.5 I believe) is very close, and has this bug
fixed.  Check the recent jk2 release thread on tomcat-dev archives for
more information.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jon Skeet [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 9:58 AM
To: Tomcat User List (E-mail)
Subject: Can't stop tomcat with shutdown.bat - bug 17193

I'm running into a problem when I try to run shutdown.bat (or use the
stop
parameter directly). I get an exception in the main Tomcat process:

java.net.BindException: Cannot assign requested address: connect
snip

I've had a look in Bugzilla, and this seems to be bug 17193. The
process is
hanging around, although Tomcat itself has stopped listening for
requests
on port 8080.

This isn't too bad, as our own service start/stop code quits the VM
after 5
seconds, but it's not generally nice.


Is there a good workaround for this (use a different version of JK etc)
which is particularly recommended?

Does anyone familiar with the code in this area know whether it's worth
me
even looking at it to try to fix it myself?

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



j_security_check gets a 404 error

2003-09-03 Thread Louise Pryor
Hi

I'm having a problem using form-based authentication. It all works
fine with standalone Tomcat, but goes pear shaped on Apache with
Tomcat. It seems to be the same problem that is described in
http://www.mail-archive.com/[EMAIL PROTECTED]/msg43091.html
(but I think it's more a Tomcat thing than a struts thing).

Basically, I'm using the securityfilter filter from
http://www.securityfilter.org/. I have a login.jsp that submits a form
to j_security_check in the usual way. The only trouble is that Apache
comes back with an Apache 404 on /path-to-login.jsp/j_security_check.  It is
clearly not passing j_security_check through to Tomcat to handle.

The URL at the top of this message suggests passing all requests
through to Tomcat (at least I think that's what it means - it uses
mod_jk, and I'm using mod_jk2, which I'm not totally expert at
anyway). First, that doesn't seem to work for me, and second, although
I could configure things that way on my local setup it's not a
realistic option for deployment, where I'm on a shared server.

The support guy at my hosting service suggested making the target of
the form /servlet/j_security_check, which at least gets it through to
Tomcat --- which then gives me a 404. Obviously this is right, because
I have no servlet mapping that would pick it up.

So is there a way of defining a servlet mapping (or indeed any other
element in web.xml) that would push things through to the right place?

Alternatively is there any way of doing this programmatically? Could I
send the form into a servlet which could then forward or redirect to
j_security_check directly, without going through Apache? If so, how?

Thanks for any help on this.

-- 
Louise Pryor 
http://www.louisepryor.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Counting active sessions if server restarts very often

2003-09-03 Thread Jon Wingfield
When the session is created add an attribute that implements 
HttpSessionActivationListener. When the server stops the 
sessionWillPassivate method will be called. When the server restarts the 
 sessionDidActivate method will be called. Use those methods in 
conjunction with your HttpSessionListener to control the count.

HTH,

Jon

Christian Hauser wrote:
Hello list

I implemented a session counter to count all active sessions. Now I have 
the problem that because the server is being restarted very often, my 
static variable activeSessions is always set to 0.

Is there an other way to implement this? Maybe by saving the variable 
activeSessions to a session (which is restored when the server has 
restarted)?

I'd like to know the previous value (= value before restart) of the 
active session count when the server has been restarted.

Thank you in advance for any hint on that.
  Christian
Here's my actual code:

public class SessionCounter implements HttpSessionListener {
  private static int activeSessions = 0;
  public synchronized void sessionCreated(HttpSessionEvent event) {
activeSessions++;
  }
  public synchronized void sessionDestroyed(HttpSessionEvent event) {
if (activeSessions  0) {
  activeSessions--;
}
  }
  public static int getActiveSessions() {
return activeSessions;
  }
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


exception in deploying webapp in tomcat4.1

2003-09-03 Thread Shailesh Modi
Hi All,
I just upgraded to tomcat 4.1 from tomcat 3.
  I have installed  setup Tomcat 4.1 and its running fine with sample web
applications.
 When i put my web application's war file into webapps folder and try to
start tomcat, it gives me following error.
 Sep 3, 2003 7:19:09 PM org.apache.commons.modeler.Registry loadRegistry
 INFO: Loading registry information
 Sep 3, 2003 7:19:10 PM org.apache.commons.modeler.Registry getRegistry
 INFO: Creating new Registry instance
 Sep 3, 2003 7:19:10 PM org.apache.commons.modeler.Registry getServer
 INFO: Creating MBeanServer
 Sep 3, 2003 7:19:12 PM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on port 8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.10
 Sep 3, 2003 7:19:29 PM org.apache.commons.digester.Digester endElement
 SEVERE: End event threw exception
 java.lang.reflect.InvocationTargetException
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
a:579)
at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
:646)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:1972)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
78)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElemen
t(XMLDocumentFragmentScannerImpl.java:1144)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
XMLDocumentFragmentScannerImpl.java:987)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116
9)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
va:282)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:257)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2191)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.IllegalArgumentException: addChild: Child name 'jsp' is
not unique
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
15)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at

RE: exception in deploying webapp in tomcat4.1

2003-09-03 Thread Shapira, Yoav

Howdy,
You need to make sure your web.xml file is compliant with the Servlet
Specification v2.3 DTD.  Post your web.xml and we can help you migrate
it.

In addition, I recommend you use the latest stable tomcat 4.1, which is
4.1.27, not 4.1.10 which you're using now.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Shailesh Modi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 10:38 AM
To: [EMAIL PROTECTED]
Subject: exception in deploying webapp in tomcat4.1

Hi All,
   I just upgraded to tomcat 4.1 from tomcat 3.
  I have installed  setup Tomcat 4.1 and its running fine with sample
web
applications.
 When i put my web application's war file into webapps folder and try
to
start tomcat, it gives me following error.
 Sep 3, 2003 7:19:09 PM org.apache.commons.modeler.Registry
loadRegistry
 INFO: Loading registry information
 Sep 3, 2003 7:19:10 PM org.apache.commons.modeler.Registry getRegistry
 INFO: Creating new Registry instance
 Sep 3, 2003 7:19:10 PM org.apache.commons.modeler.Registry getServer
 INFO: Creating MBeanServer
 Sep 3, 2003 7:19:12 PM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on port 8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.10
 Sep 3, 2003 7:19:29 PM org.apache.commons.digester.Digester endElement
 SEVERE: End event threw exception
 java.lang.reflect.InvocationTargetException
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:
228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParse
r.ja
v
a:579)
at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder
.jav
a
:646)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValid
ator
.
java:1972)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.j
ava:
8
78)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElemen
t(XMLDocumentFragmentScannerImpl.java:1144)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
XMLDocumentFragmentScannerImpl.java:987)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav
a:11
6
9)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConf
ig.j
a
va:282)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.
java
:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
r
t.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:349
3)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
ava:
8
21)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeplo
yer.
j
ava:257)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:3
68)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
r
t.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2191)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

Old fasion question - Encoding!

2003-09-03 Thread Janis_Olekss
Okey guys!

I have problems with Tomcat 4.1.x (27)

I am using struts 1.1 tiles and Co. to make my app. The first and pretty 
big problem is with encoding.
I have one of tiles which reads menu names from property file which 
contains texts with special chars. They are correct
and that's prooved.

Now what happens!

When the file is rendered I get ? instead of special chars even if I 
have set [EMAIL PROTECTED] pageEncoding=windows-1257%
That DOES NOT happen if I switch to Tomcat 4.0.6 which displays the 
characters correctly with the same (unchanged) JSP pages.
So I assume that soemthing has broken between 4.0.6 and 4.1.27! I have no 
knowledge and experience to find the differences!

Also the question about dynamic change of the  encoding.
Regarding JSP spec you can set encoding directly into response in case if 
response is not commited and fresh!
If I do the very first line 
%response.setContentType(text/html;charset=windows-1257);% then I get 
? in both servers
4.0.6 and 4.1.27 but looking into JSP page code I see that only difference 
in setting encoding into response is that in case
of @page the response.setContnetType is called before optaining 
pageContext, out, session etc... so where is
that small catch?

And I know that encoding is on BIG problem in Tomcat  :(

Tomcat 4.1.27 has this ? sign problem even if you specify [EMAIL PROTECTED] 
directive in main page and then included and struts-tiled files are
corrupted.
___
Living things are systems that tend to respond to changes in their 
environment, 
and inside themselves, in such a way as to promote their own continuation.

Janis Olekss
Exigen Latvia System Analyst
(Office) +371 7072900
(Cell) +371 9136267

RE: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread Jon Skeet
 I think a jk2 release (v1.2.5 I believe) is very close, and 
 has this bug fixed.  

That's excellent news. When it's released, will I be able to just dump a new 
tomcat-jk2.jar in server/lib, and everything should spring to life, or is there more 
to it than that?

 Check the recent jk2 release thread on tomcat-dev archives for
 more information.

Do you know the name of the thread? I'm not getting very far with the searches I'm 
doing at the moment, unfortunately :(

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



File upload Bug?

2003-09-03 Thread Tom Lyle
Hi All,

I'm using the o'reilly mutipart request classes to upload files using a
servlet and its happily working using Tomcat 4.1.18. However, i've upgraded
to the tomcat 4.1.27 and a certain file (just a jpg) causes the upload to
fail with an java.io.IOException: unexpected end of part. Now i can upload
this file to the webapp running on Tomcat 4.1.18 but not to the same webapp
running on 4.1.27. What gives?

Running on Windows 2000
with sun jdk1.4.1

Tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to get tomcat to autostart on linux

2003-09-03 Thread batristain
Greetings,
I need to know how to get tomcat to autostart on a redhat linux 8 box - can
anyone tell me?

Thanks,
Bobbie

Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread Shapira, Yoav

Howdy,

That's excellent news. When it's released, will I be able to just dump
a
new tomcat-jk2.jar in server/lib, and everything should spring to life,
or
is there more to it than that?

I don't know -- I don't use any of these connectors...

 Check the recent jk2 release thread on tomcat-dev archives for
 more information.

Do you know the name of the thread? I'm not getting very far with the
searches I'm doing at the moment, unfortunately :(

This is where the thread starts:
http://marc.theaimsgroup.com/?l=tomcat-devm=105973438132418w=2

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Bruno Armand
Please i try since one week to become this program
without error, but without success. Perrhaps can you
help me!

I write a jsp-file for calling and saving data from an
access existing database which i connect with a
odbc-driver.
The adrList.jsp ist in the directory
c:\eclipse\workspace\projectX\
I try to start it from tomcat with
http://localhost:8080/student.
The file HelloWorld.jsp in the same directory runs
without problem.

Please here are:
1. The code of the adrList.jsp and
2. The displayed errormessage.
__-
1.
html
head
%@ page language=java import = java.sql.* %
%@ page import = java.lang.* %
% 
try  
{ 
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  Properties props = new Properties();
  props.setProperty(user, );
  props.setProperty(password, );
  String url =
jdbc:odbc:http://localhost:8080:Bruno_Adress_odbc;;
  Connection con = DriverManager.getConnection(url,
props);

String sql1 = INSERT INTO Adressen (Nachname,
Adresse, +
  Postleitzahl, Land, Ort) +
  VALUES ('Bruno Armando', 'Am Vaihingen 20',
'70187',  +
'Deutschland', 'Stuttgart');

String sql2 = INSERT INTO Adressen (Nachname,
Adresse,+
  Postleitzahl, Land, Ort)  + 
 VALUES ('Becker Marlise', 'Koenigstr 78', '70174',
+
'Deutschland', 'Stuttgart');

String query = SELECT * FROM Adressen;

Statement stmt = con.createStatement();

stmt.executeUpdate(sql1);
stmt.executeUpdate(sql2);
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int columnCount = rsmd.getColumnCount(); 
%

titleDetails-Adressen von den 5 Besten/title
/head
BODY

TABLE width='80%' border=0 align='center'
cellSpacing=5 cellPadding=2 bgcolor=#FF
bordercolor=#00 
tr
TD align=leftnbsp; /TD 
TD align=right  
 nbsp;
/TD 

td Name/td
td Street/td
td Zip/td
td Town/td
td Country/td
/tr

%
while (rs.next())
{
%
tr
 TD align=leftnbsp; /TD 
 TD align=right  nbsp; /TD
%
 for (int i = 2; i = columnCount; i++)
%
 td
 % = rs.getString(i) %
 /td
%
}
%
/trbr
%
}
rs.close();
stmt.close();
con.close();
} 
catch (SQLException ex) 
{
  System.out.println(SQLException:);
  while (ex != null)
  {
System.out.println(SQLState:  +
ex.getSQLState());
System.out.println(Nachricht:  +
ex.getMessage());
System.out.println(Anbieter:  +
ex.getErrorCode());
ex = ex.getNextException();
System.out.println();
}
%
/table
/body
/html

2. Errormessage:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error
() that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile
class for JSP

An error occurred at line: 106 in the jsp file:
/adrList.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:159:
illegal start of expression
 = rs.getString(i) 
 ^



An error occurred at line: 14 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:58:
'try' without 'catch' or 'finally'
try  
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:186:
illegal start of expression
public static Connection getConnection()
^



An error occurred at line: 14 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:61:
cannot resolve symbol
symbol  : method getConnection ()
location: class org.apache.jsp.adrList_jsp
  Connection con = getConnection();
   ^



An error occurred at line: 112 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:170:
cannot resolve symbol
symbol  : variable rs 
location: class org.apache.jsp.adrList_jsp
rs.close();
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:171:
cannot resolve symbol
symbol  : variable stmt 
location: class org.apache.jsp.adrList_jsp
stmt.close();
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp

Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:172:
cannot resolve symbol
symbol  : variable con 
location: class org.apache.jsp.adrList_jsp
con.close();
^
7 errors


at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at

Re: How to get tomcat to autostart on linux

2003-09-03 Thread John Turner
Courtesy of Oscar Carrillo:

http://daydream.stanford.edu/tomcat/install_web_services.html#daemons

You need to download his tomcatd script, and copy it to /etc/rc.d/init.d.

Then execute: /sbin/chkconfig --del tomcatd

Then execute: /sbin/chkconfig --add tomcatd

Note you will need to modify the tomcatd script to meet your needs, such 
as changing the paths, etc.

John

[EMAIL PROTECTED] wrote:

Greetings,
I need to know how to get tomcat to autostart on a redhat linux 8 box - can
anyone tell me?
Thanks,
Bobbie
Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Antwort: RE: restart tomcat everytime I make change to servlet -- afterexperiment

2003-09-03 Thread erik . itter
do you know if it is fixed in 5.0.9?



Mail von Extern


Mike Curwen [EMAIL PROTECTED]


03.09.2003 15:48
Bitte antworten an Tomcat Users List

 
An: 'Tomcat Users List' [EMAIL PROTECTED], 
[EMAIL PROTECTED]
Kopie: 
Thema:  RE: restart tomcat everytime I make change to servlet -- after 
experiment


Don't pull out your hair, check my reply to your first post... (class
reloading is buggy in Tomcat 4.1.27)


 -Original Message-
 From: Clive Luk [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 03, 2003 2:07 AM
 To: Tomcat Users List
 Subject: restart tomcat everytime I make change to servlet -- 
 after experiment
 

snip /

 
 I don't really want to blame on a bug of tomcat. But would 
 that be possible. OR has anyone in the world has done what I 
 want to do without using any tools like the tomcat manager? I 
 am greatly appreciated for any help. THANKS.
 
 I am going to pull all my hair out... : (
 
 Cheers,
 Clive
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread John Turner
Jon Skeet wrote:

I think a jk2 release (v1.2.5 I believe) is very close, and 
has this bug fixed.  


That's excellent news. When it's released, will I be able to just dump a new tomcat-jk2.jar in server/lib, and everything should spring to life, or is there more to it than that?

The release that Yoav is referencing is a new mod_jk, which is an Apache 
DSO module, not a JAR file.  So yes, I guess you will be able to sub in 
the new DSO as soon as you can build one or find a binary, but don't 
confuse it with a JAR file.

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Configuring jk2 for Apache 4.0.23/TomCat 4.0.27

2003-09-03 Thread Raj Dasgupta
After adding jk2 to my apache's httpd.conf,  I see these errors on startup.
Any ideas on what this error indicates?
 

[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:35:32 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:35:32 2003] [notice] Apache/2.0.43 (Unix) mod_jk2/2.0.2
configured -- resuming normal operations
[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:38:38 2003] [error] jk2_init() Can't find child 27367 in
scoreboard
[Wed Sep 03 10:38:38 2003] [error] shm.init(): No file
[Wed Sep 03 10:38:38 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:57:18 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27482 in
scoreboard
[Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27483 in
scoreboard
[Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2

 
Thanks
Raj
 


RE: File upload Bug?

2003-09-03 Thread Tom Lyle
I've just realised something. The machine thats running Tomcat 4.1.27 is
serving the pages with IIS and isapi_redirector2.dll, when i connect
directly to Tomcat via port 8080 it works fine.

Right, i've just searched the archives and found 2 people posting (much more
elequently) the same problem but no solution. Does anyone know how to fix
this?

thanks

Tom

 -Original Message-
 From: Tom Lyle [mailto:[EMAIL PROTECTED]
 Sent: 03 September 2003 15:53
 To: Tomcat Users List
 Subject: File upload Bug?


 Hi All,

 I'm using the o'reilly mutipart request classes to upload files using a
 servlet and its happily working using Tomcat 4.1.18. However,
 i've upgraded
 to the tomcat 4.1.27 and a certain file (just a jpg) causes the upload to
 fail with an java.io.IOException: unexpected end of part. Now i can upload
 this file to the webapp running on Tomcat 4.1.18 but not to the
 same webapp
 running on 4.1.27. What gives?

 Running on Windows 2000
 with sun jdk1.4.1

 Tom


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Which is the best way to install an application with connection p ooling

2003-09-03 Thread Kevin Passey
John,

I can easily deploy a basic app using the manager. But when it comes to
deploying something that needs additional Context information I come
un-stuck.

I basically have an app that I want to connect to an AS/400 database using
connection pooling.

The only way I can get it to work is to manually insert the entries in the
server XML file and then re-start.

Any other pointer greatly appreciated.

Regards

Kevin


-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: 02 September 2003 13:45
To: Tomcat Users List
Subject: Re: Which is the best way to install an application with
connection p ooling



There are a number of ways.

If autoDeploy = true then you can just drop the WAR file in the Host's 
appBase directory.

You can also use the manager app's various tasks (install, deploy, etc):

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

This is easily accomplished with ant.

John

Kevin Passey wrote:

 I have normally stopped the server - edited the server XML file, put my
war
 file in the webapps folder and re-started tomcat.
 
 Using the manager app - is there a way I can do this 1)from a remote
system
 and 2)without manually editing the server XML file.
 
 I've have tried putting the jndi info using the admin console but I keep
 getting NULL driver exceptions.
 
 Thanks
 
 Kevin
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with my first webapp

2003-09-03 Thread Damien
Can somebody provides me a complete tree with a simple application to
start working on ? I think it would be a good idea if somebody
'tar/gzip' the directory strutcure found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/
so a beginner is able to start with a clean project.


Thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload Bug?

2003-09-03 Thread Andy Eastham
Tom,

I found that the O'Reilly classes were totally unreliable on Solaris with
binary uploads and mod_webapp.

However, I They work fine on windows and Linux, and luckily I've not needed
them on a Solaris deployment.

I think decided it was actually caused by a bug in Solaris mod_webapp - are
you using this?

Andy

 -Original Message-
 From: Tom Lyle [mailto:[EMAIL PROTECTED]
 Sent: 03 September 2003 15:53
 To: Tomcat Users List
 Subject: File upload Bug?


 Hi All,

 I'm using the o'reilly mutipart request classes to upload files using a
 servlet and its happily working using Tomcat 4.1.18. However,
 i've upgraded
 to the tomcat 4.1.27 and a certain file (just a jpg) causes the upload to
 fail with an java.io.IOException: unexpected end of part. Now i can upload
 this file to the webapp running on Tomcat 4.1.18 but not to the
 same webapp
 running on 4.1.27. What gives?

 Running on Windows 2000
 with sun jdk1.4.1

 Tom


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: $CATALINA_BASE/temp

2003-09-03 Thread Samuel Le Berrigaud


Fred Kreek wrote:

At 10:46 03/09/03, you wrote:

Hi everybody,

I'm using tomcat 4.1.27 on a Linux system. It works very well ! But I 
had a little problem of disk space because of the $CATALINA_BASE/temp 
that grows up very fast in size. In that folder I found some file s 
like jar_cahe*tmp.

Does someone know how to limit the size of this directory ? Is there 
a special tomcat configuration for that Thanks,

SaM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
try quota?
I would have prefered a way to configure Tomcat so that it would limit 
the size of its folder itself ... Do someone know about that ?

Regards,

SaM



--
F. Kreek
Kamer J2-278   e-mail: [EMAIL PROTECTED]
Klinische InformatieKunde  tel: +31-20-566 6687
AMC - Amsterdamfax: +31-20-691 9840
Meibergdreef 15
1105 AZ Amsterdam
There are 10 types of people when it comes to binary, those that 
understand it.. and those who don't.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Jon Wingfield
try
%= rs.getString(i) %
instead of
% = rs.getString(i) %
Bruno Armand wrote:

Please i try since one week to become this program
without error, but without success. Perrhaps can you
help me!
I write a jsp-file for calling and saving data from an
access existing database which i connect with a
odbc-driver.
The adrList.jsp ist in the directory
c:\eclipse\workspace\projectX\
I try to start it from tomcat with
http://localhost:8080/student.
The file HelloWorld.jsp in the same directory runs
without problem.
Please here are:
1. The code of the adrList.jsp and
2. The displayed errormessage.
__-
1.
html
head
%@ page language=java import = java.sql.* %
%@ page import = java.lang.* %
% 
try  
{ 
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  Properties props = new Properties();
  props.setProperty(user, );
  props.setProperty(password, );
  String url =
jdbc:odbc:http://localhost:8080:Bruno_Adress_odbc;;
  Connection con = DriverManager.getConnection(url,
props);

String sql1 = INSERT INTO Adressen (Nachname,
Adresse, +
  Postleitzahl, Land, Ort) +
  VALUES ('Bruno Armando', 'Am Vaihingen 20',
'70187',  +
'Deutschland', 'Stuttgart');
String sql2 = INSERT INTO Adressen (Nachname,
Adresse,+
  Postleitzahl, Land, Ort)  + 
 VALUES ('Becker Marlise', 'Koenigstr 78', '70174',
+
'Deutschland', 'Stuttgart');

String query = SELECT * FROM Adressen;

Statement stmt = con.createStatement();

stmt.executeUpdate(sql1);
stmt.executeUpdate(sql2);
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int columnCount = rsmd.getColumnCount(); 
%

titleDetails-Adressen von den 5 Besten/title
/head
BODY
TABLE width='80%' border=0 align='center'
cellSpacing=5 cellPadding=2 bgcolor=#FF
bordercolor=#00 
tr
TD align=leftnbsp; /TD 
TD align=right  
 nbsp;
/TD 

td Name/td
td Street/td
td Zip/td
td Town/td
td Country/td
/tr
%
while (rs.next())
{
%
tr
 TD align=leftnbsp; /TD 
 TD align=right  nbsp; /TD
%
 for (int i = 2; i = columnCount; i++)
%
 td
 % = rs.getString(i) %
 /td
%
}
%
/trbr
%
}
rs.close();
stmt.close();
con.close();
} 
catch (SQLException ex) 
{
  System.out.println(SQLException:);
  while (ex != null)
  {
System.out.println(SQLState:  +
ex.getSQLState());
System.out.println(Nachricht:  +
ex.getMessage());
System.out.println(Anbieter:  +
ex.getErrorCode());
ex = ex.getNextException();
System.out.println();
}
%
/table
/body
/html

2. Errormessage:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error
() that prevented it from fulfilling this request.
exception

org.apache.jasper.JasperException: Unable to compile
class for JSP
An error occurred at line: 106 in the jsp file:
/adrList.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:159:
illegal start of expression
 = rs.getString(i) 
 ^



An error occurred at line: 14 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:58:
'try' without 'catch' or 'finally'
try  
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:186:
illegal start of expression
public static Connection getConnection()
^


An error occurred at line: 14 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:61:
cannot resolve symbol
symbol  : method getConnection ()
location: class org.apache.jsp.adrList_jsp
  Connection con = getConnection();
   ^


An error occurred at line: 112 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:170:
cannot resolve symbol
symbol  : variable rs 
location: class org.apache.jsp.adrList_jsp
rs.close();
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:171:
cannot resolve symbol
symbol  : variable stmt 
location: class org.apache.jsp.adrList_jsp
stmt.close();
^



An error occurred at line: 112 in the jsp file:
/adrList.jsp
Generated servlet error:
C:\Programme\Apache Group\Tomcat
4.1\work\Standalone\localhost\student2\adrList_jsp.java:172:
cannot resolve symbol
symbol  : variable con 
location: class org.apache.jsp.adrList_jsp
con.close();
^
7 errors

at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
  

Re: Antwort: Re: Antwort: Problem with my first webapp

2003-09-03 Thread Damien
Le mer 03/09/2003 à 16:03, [EMAIL PROTECTED] a écrit :

 and you are sure you have a web application (structure and web.xml)?
 perhaps you should post some additional information (files of you webapp 
 and build.xml)
 


Here is the structure :

[EMAIL PROTECTED] tomcat-test]$ ll -R
.:
total 40
drwxr-xr-x3 quetzalcoatl quetzalcoatl 4096 sep  3 12:37 build/
-rw-r--r--1 quetzalcoatl quetzalcoatl  260 sep  3 11:54
build.properties
-rw-r--r--1 quetzalcoatl quetzalcoatl16016 sep  3 11:50
build.xml
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 CVS/
drwxr-xr-x3 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 docs/
drwxr-xr-x4 quetzalcoatl quetzalcoatl 4096 sep  3 12:05 src/
drwxr-xr-x4 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 web/
 
./build:
total 4
drwxr-xr-x4 quetzalcoatl quetzalcoatl 4096 sep  3 12:37 WEB-INF/
 
./build/WEB-INF:
total 16
drwxr-xr-x3 quetzalcoatl quetzalcoatl 4096 sep  3 12:37 classes/
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 12:37 lib/
-rw-r--r--1 quetzalcoatl quetzalcoatl 5470 sep  3 12:37 web.xml
 
./build/WEB-INF/classes:
total 8
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 12:37
mypackage/
-rw-r--r--1 quetzalcoatl quetzalcoatl 1374 sep  3 12:37
semantic.cache
 
./build/WEB-INF/classes/mypackage:
total 4
-rw-r--r--1 quetzalcoatl quetzalcoatl 2349 sep  3 12:37
Hello.class
 
./build/WEB-INF/lib:
total 0
 
./CVS:
total 12
-rw-r--r--1 quetzalcoatl quetzalcoatl   77 sep  3 11:51 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   12 sep  3 11:51
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 11:51 Root
 
./docs:
total 8
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 CVS/
-rw-r--r--1 quetzalcoatl quetzalcoatl1 sep  3 11:50
initial.txt
 
./docs/CVS:
total 12
-rw-r--r--1 quetzalcoatl quetzalcoatl   50 sep  3 11:51 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   17 sep  3 11:51
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 11:51 Root
 
./src:
total 12
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 12:05 CVS/
drwxr-xr-x3 quetzalcoatl quetzalcoatl 4096 sep  3 12:05
mypackage/
-rw-r--r--1 quetzalcoatl quetzalcoatl 1374 sep  3 12:04
semantic.cache
 
./src/CVS:
total 16
-rw-r--r--1 quetzalcoatl quetzalcoatl2 sep  3 12:05 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   18 sep  3 12:05
Entries.Log
-rw-r--r--1 quetzalcoatl quetzalcoatl   16 sep  3 11:51
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 11:51 Root
 
./src/mypackage:
total 12
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 12:06 CVS/
-rw-r--r--1 quetzalcoatl quetzalcoatl 5166 sep  3 12:04
Hello.java
 
./src/mypackage/CVS:
total 12
-rw-r--r--1 quetzalcoatl quetzalcoatl   45 sep  3 12:06 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   26 sep  3 12:05
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 12:05 Root
 
./web:
total 8
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 CVS/
drwxr-xr-x3 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 WEB-INF/
 
./web/CVS:
total 12
-rw-r--r--1 quetzalcoatl quetzalcoatl   14 sep  3 11:51 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   16 sep  3 11:51
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 11:51 Root
 
./web/WEB-INF:
total 12
drwxr-xr-x2 quetzalcoatl quetzalcoatl 4096 sep  3 11:51 CVS/
-rw-r--r--1 quetzalcoatl quetzalcoatl 5470 sep  3 11:50 web.xml
 
./web/WEB-INF/CVS:
total 12
-rw-r--r--1 quetzalcoatl quetzalcoatl   46 sep  3 11:51 Entries
-rw-r--r--1 quetzalcoatl quetzalcoatl   24 sep  3 11:51
Repository
-rw-r--r--1 quetzalcoatl quetzalcoatl   64 sep  3 11:51 Root


Thanks for your help



Re: Which is the best way to install an application with connection p ooling

2003-09-03 Thread John Turner
If you are using a WAR file, put your entire Context block into a file 
called (your-webapp).xml and stick it in META-INF.  Whatever is legal in 
a Context block in server.xml is also legal there.  Then you can deploy 
the WAR file using the manager app froma  remote system.

The admin and manager apps themselves do the same thing, check out 
admin.xml etc in the default distribution.

John

Kevin Passey wrote:

John,

I can easily deploy a basic app using the manager. But when it comes to
deploying something that needs additional Context information I come
un-stuck.
I basically have an app that I want to connect to an AS/400 database using
connection pooling.
The only way I can get it to work is to manually insert the entries in the
server XML file and then re-start.
Any other pointer greatly appreciated.

Regards

Kevin

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: 02 September 2003 13:45
To: Tomcat Users List
Subject: Re: Which is the best way to install an application with
connection p ooling


There are a number of ways.

If autoDeploy = true then you can just drop the WAR file in the Host's 
appBase directory.

You can also use the manager app's various tasks (install, deploy, etc):

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

This is easily accomplished with ant.

John

Kevin Passey wrote:


I have normally stopped the server - edited the server XML file, put my
war

file in the webapps folder and re-started tomcat.

Using the manager app - is there a way I can do this 1)from a remote
system

and 2)without manually editing the server XML file.

I've have tried putting the jndi info using the admin console but I keep
getting NULL driver exceptions.
Thanks

Kevin





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Configuring jk2 for Apache 4.0.23/TomCat 4.0.27

2003-09-03 Thread John Turner
You don't have a shared memory file configured in your properties files, 
or if you do, it isn't accessible or writable.

John

Raj Dasgupta wrote:

After adding jk2 to my apache's httpd.conf,  I see these errors on startup.
Any ideas on what this error indicates?
 

[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:35:32 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:35:32 2003] [notice] Apache/2.0.43 (Unix) mod_jk2/2.0.2
configured -- resuming normal operations
[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
[Wed Sep 03 10:38:38 2003] [error] jk2_init() Can't find child 27367 in
scoreboard
[Wed Sep 03 10:38:38 2003] [error] shm.init(): No file
[Wed Sep 03 10:38:38 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:57:18 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27482 in
scoreboard
[Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2
[Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27483 in
scoreboard
[Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
[Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2
 
Thanks
Raj
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: File upload Bug?

2003-09-03 Thread Tom Lyle
im on Windows 2000 server. It seems to be a bug in isapi_redirect2.dll. Any
thoughts anyone?

 -Original Message-
 From: Andy Eastham [mailto:[EMAIL PROTECTED]
 Sent: 03 September 2003 16:23
 To: Tomcat Users List
 Subject: RE: File upload Bug?


 Tom,

 I found that the O'Reilly classes were totally unreliable on Solaris with
 binary uploads and mod_webapp.

 However, I They work fine on windows and Linux, and luckily I've
 not needed
 them on a Solaris deployment.

 I think decided it was actually caused by a bug in Solaris
 mod_webapp - are
 you using this?

 Andy

  -Original Message-
  From: Tom Lyle [mailto:[EMAIL PROTECTED]
  Sent: 03 September 2003 15:53
  To: Tomcat Users List
  Subject: File upload Bug?
 
 
  Hi All,
 
  I'm using the o'reilly mutipart request classes to upload files using a
  servlet and its happily working using Tomcat 4.1.18. However,
  i've upgraded
  to the tomcat 4.1.27 and a certain file (just a jpg) causes the
 upload to
  fail with an java.io.IOException: unexpected end of part. Now i
 can upload
  this file to the webapp running on Tomcat 4.1.18 but not to the
  same webapp
  running on 4.1.27. What gives?
 
  Running on Windows 2000
  with sun jdk1.4.1
 
  Tom
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File upload Bug?

2003-09-03 Thread Remy Maucherat
Tom Lyle wrote:

I've just realised something. The machine thats running Tomcat 4.1.27 is
serving the pages with IIS and isapi_redirector2.dll, when i connect
directly to Tomcat via port 8080 it works fine.
Right, i've just searched the archives and found 2 people posting (much more
elequently) the same problem but no solution. Does anyone know how to fix
this?
A BZ entry on this problem already exists:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21616
--
x
Rémy Maucherat
Senior Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problem with my first webapp

2003-09-03 Thread John Turner
$CATALINA_HOME/webapps/myApp
$CATALINA_HOME/webapps/myApp/hello.jsp
$CATALINA_HOME/webapps/myApp/WEB-INF
$CATALINA_HOME/webapps/myApp/WEB-INF/classes
$CATALINA_HOME/webapps/myApp/WEB-INF/lib
$CATALINA_HOME/webapps/myApp/WEB-INF/web.xml
hello.jsp:

%

String myVar = new String(Hello World);
out.println(div align=centerh2 + myVar = /h2/div);
%

http://localhost/myApp/hello.jsp

Post back when you are ready for servlets.

John

Damien wrote:

Can somebody provides me a complete tree with a simple application to
start working on ? I think it would be a good idea if somebody
'tar/gzip' the directory strutcure found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/
so a beginner is able to start with a clean project.
Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to get tomcat to autostart on linux

2003-09-03 Thread Filip Hanik
you can create a script in /etc/init.d/ or
in /etc/rc.local simply put 

export TOMCAT_HOME=blablabla
export CATALINA_HOME=$TOMCAT_HOME
$CATALINA_HOME/bin/startup.sh

Filip


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 7:52 AM
Subject: How to get tomcat to autostart on linux


Greetings,
I need to know how to get tomcat to autostart on a redhat linux 8 box - can
anyone tell me?

Thanks,
Bobbie

Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Antwort: Problem with my first webapp

2003-09-03 Thread Damien
Le mer 03/09/2003 à 16:01, Shapira, Yoav a écrit :
 Howdy,
 
 Le mer 03/09/2003 à 14:50, [EMAIL PROTECTED] a écrit :
  are you sure your build.xml is correct, my builds do not output the file
  contents...
 
 I have downloaded an example build.xml, so I think it is correct.
 
 That's not always a good assumption ;)  Where's the build file from?
  

I think the file comes from :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt

Thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with my first webapp

2003-09-03 Thread Shapira, Yoav

Howdy,

Can somebody provides me a complete tree with a simple application to
start working on ? I think it would be a good idea if somebody
'tar/gzip' the directory strutcure found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/
so a beginner is able to start with a clean project.

Have fun,

http://www.apache.org/~yoavs/appdevSample.zip

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get tomcat to autostart on linux

2003-09-03 Thread Carlos Cajina - Hotmail
Hi Bobbie.

Please see
http://daydream.stanford.edu/tomcat/install_web_services.html#java  At the
end of the HOW-TO you'll find what you need...

Good luck!!!

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 8:52 AM
Subject: How to get tomcat to autostart on linux


 Greetings,
 I need to know how to get tomcat to autostart on a redhat linux 8 box -
can
 anyone tell me?

 Thanks,
 Bobbie

 Bobbie Atristain
 Internet Systems Administrator
 Media General, INC.
 804.649.6156

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Help!! Deployment issue

2003-09-03 Thread Joe Zendle
I am about to deploy a struts app in production. I have been doing
development using port 8080 and a Context path of /aup-reports and a
docPath of aup-reports. My app uses BASIC authentication with a JDBC
Realm into postgres. Everything works fine in this configuration with
4.1.24 and 4.1.27 and jdk 1.4.2.

 

However, when a try to make my app the default Context by setting the
context path to  (and keep docPath to /aup-reports) I am seeing
strange behavior from the authentication module. When the app first
comes up I get the authentication prompt, I log in and I see that the
authentication is successful and that my index.jsp is accessed because
there is a new log message in Catalina.out. But I don't see my index.jsp
in the browser and the login prompt comes up immediately again. I
attempt to login again and the prompt comes back again. It comes back
continuously !?!?. If I hit escape about 15 times it allows me to see my
index.jsp but the formatting is a mess and if I attempt to access any
links the $%^ login prompt comes up again.  

 

Any one might be going on?? What is the best way to transition from a
dev conf to a production conf?

 

Joe



RE: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread Jon Skeet
 The release that Yoav is referencing is a new mod_jk, which 
 is an Apache DSO module, not a JAR file.  So yes, I guess you will be able 
 to sub in the new DSO as soon as you can build one or find a binary, but don't 
 confuse it with a JAR file.

In that case I can't see how it's going to help - I'm not running under apache, I'm 
running a standalone Tomcat, which can't shut itself down...

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with my first webapp

2003-09-03 Thread John Turner
oops, that should be:

out.println(div align='center'h2 + myVar = /h2/div);

My bad.

John

John Turner wrote:

$CATALINA_HOME/webapps/myApp
$CATALINA_HOME/webapps/myApp/hello.jsp
$CATALINA_HOME/webapps/myApp/WEB-INF
$CATALINA_HOME/webapps/myApp/WEB-INF/classes
$CATALINA_HOME/webapps/myApp/WEB-INF/lib
$CATALINA_HOME/webapps/myApp/WEB-INF/web.xml
hello.jsp:

%

String myVar = new String(Hello World);
out.println(div align=centerh2 + myVar = /h2/div);
%

http://localhost/myApp/hello.jsp

Post back when you are ready for servlets.

John

Damien wrote:

Can somebody provides me a complete tree with a simple application to
start working on ? I think it would be a good idea if somebody
'tar/gzip' the directory strutcure found in this page :
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/
so a beginner is able to start with a clean project.
Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 4.1.27 : error in FORM authentication

2003-09-03 Thread Fabio Bazzani
I'm working with JDK 1.4.0 and tomcat 4.1.27.
I configured JDBCRealm in server.xml for a FORM authentication.
When I authenticate I get a 400 error code:
message : Invalid direct reference to form login page

description : The request sent by the client was syntactically incorrect (Invalid 
direct reference to form login page).

in my login.jsp I put j_security_check in ACTION attribute in FORM tag.

What's wrong ?

Thank you

Fabio Bazzani


RE: File upload Bug?

2003-09-03 Thread Allen Hadden

I had this (or a similar problem) a long time ago.  It only occurred when connecting 
to IIS via HTTPS (SSL).  Also, my problem was with isapi_redirector.dll, not 
isapi_redirector2.dll.  It might be the same issue, though.

It was some sort of timing problem with the ISAPI redirector.  I hacked around the 
problem in the redirector by reading large POST requests to a temporary file before 
sending them to Tomcat.  This fixed the problem.  At the time, I attributed it to 
some IIS quirk.

Note that what I learned didn't point me to the O'Reilly upload code at all.

If you're interested, I can share the code.  Again, the modifications were to the 
previous version of the redirector.

Allen

 -Original Message-
 From: Tom Lyle [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 03, 2003 11:11 AM
 To: Tomcat Users List
 Subject: RE: File upload Bug?
 
 
 I've just realised something. The machine thats running 
 Tomcat 4.1.27 is
 serving the pages with IIS and isapi_redirector2.dll, when i connect
 directly to Tomcat via port 8080 it works fine.
 
 Right, i've just searched the archives and found 2 people 
 posting (much more
 elequently) the same problem but no solution. Does anyone 
 know how to fix
 this?
 
 thanks
 
 Tom
 
  -Original Message-
  From: Tom Lyle [mailto:[EMAIL PROTECTED]
  Sent: 03 September 2003 15:53
  To: Tomcat Users List
  Subject: File upload Bug?
 
 
  Hi All,
 
  I'm using the o'reilly mutipart request classes to upload 
 files using a
  servlet and its happily working using Tomcat 4.1.18. However,
  i've upgraded
  to the tomcat 4.1.27 and a certain file (just a jpg) causes 
 the upload to
  fail with an java.io.IOException: unexpected end of part. 
 Now i can upload
  this file to the webapp running on Tomcat 4.1.18 but not to the
  same webapp
  running on 4.1.27. What gives?
 
  Running on Windows 2000
  with sun jdk1.4.1
 
  Tom
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts App Execution

2003-09-03 Thread news-jakarta

I am using Apache 2 and Tomcat 4.1.24 connected with jk2.  I installed
the struts example webapp, but I can't seem to get Tomcat to execute the
.do files (I get the apache 404 screen).  What simple step am I missing?
The struts docs only seem to cover up to Tomcat 3.1 (for tomcat/apache
setup).

My workers2 entry:

[uri:/struts-example/*]
group=lb


Thanks,
Chad Arimura
AllDorm Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



apache httpd hung in W Sending Reply

2003-09-03 Thread Nicholas Ide

I have tomcat 4.1.27 front ended by apache 2.0.47 and mod_jk connector.

Occasionally I run out of apache slots because all the slots are
apparently hung while Sending Reply.  (W status from serverstatus screen).
These connections appear to all be stuck in a dialog with tomcat.
If I restart tomcat then apache cleans up the slots.

I cannot reproduce the problem myself.  I simply have to wait long
enough, perhaps 48 hours, for the planets to align and cause the problem.
I am unable to detect a pattern for the failures.
They also happened under tomcat 4.0.4 and apache 1.3.26.

Is there a configuration parameter on *either* the apache or tomcat 
side which will REALLY time out such hanging connections?
The connectionTimeout parameter in the Connector apparently
does not do the trick.  Nor does the soTimeout or serverTimeout
parameters found in jk2.properties.

Snippet from server.xml:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=@CATALINA_AJP_PORT@ minProcessors=10 
   maxProcessors=85
   enableLookups=false redirectPort=8443
   acceptCount=10 debug=0 
   connectionTimeout=1
   useURIValidationHack=false
   protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

jk2.properties:

 [EMAIL PROTECTED]@
 channelSocket.scheme=http
 channelSocket.soTimeout=5

Configuration:
 CoyoteConnector with JkCoyoteHandler
 Catalina 4.1.27-LD-jdk14
 Apache/2.0.47 (Unix) mod_jk/1.2.1
 SunOS 5.8 
 

-Nick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 4.1.27: cannot shutdown tomcat !!

2003-09-03 Thread Fabio Bazzani
I'm working with JDK 1.4.0 and tomcat 4.1.27.
I'm in advanced development and unexpectedly I cannot shutdown Tomcat.
I spent all day to try undertand the why ?

shell error message:

Stopping service Tomcat-Standalone
java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:159)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.init(Socket.java:290)
at java.net.Socket.init(Socket.java:146)
at org.apache.jk.common.ChannelSocket.destroy(ChannelSocket.java:384)
at org.apache.jk.server.JkMain.stop(JkMain.java:311)
at org.apache.jk.server.JkCoyoteHandler.destroy(JkCoyoteHandler.java:181)
at org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1205)
at org.apache.catalina.core.StandardService.stop(StandardService.java:546)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2225)
at org.apache.catalina.startup.Catalina.start(Catalina.java:543)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Does anybody know what happened ?

Thank you.

Fabio


Re: Can't stop tomcat with shutdown.bat - bug 17193

2003-09-03 Thread John Turner
I defer to Yoav, as it is entirely possible (though not probable) that I 
am on crack.  But the thread referenced is most definitely talking about 
mod_jk.

John

Jon Skeet wrote:

The release that Yoav is referencing is a new mod_jk, which 
is an Apache DSO module, not a JAR file.  So yes, I guess you will be able 
to sub in the new DSO as soon as you can build one or find a binary, but don't 
confuse it with a JAR file.


In that case I can't see how it's going to help - I'm not running under apache, I'm running a standalone Tomcat, which can't shut itself down...

Jon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat 4.1.27 : error in FORM authentication

2003-09-03 Thread Mike Curwen


 -Original Message-
 From: Fabio Bazzani [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 03, 2003 11:15 AM
 To: Tomcat Users List
 Subject: Tomcat 4.1.27 : error in FORM authentication
 
 
 I'm working with JDK 1.4.0 and tomcat 4.1.27.
 I configured JDBCRealm in server.xml for a FORM 
 authentication. When I authenticate I get a 400 error code: 

How do you 'authenticate'?  Do you browse directly to login.jsp ?   This
is the problem, if you are.  The usage scenario of container-managed
auth is:  you browse to a protected resource, the container will take
you to login.jsp, and then after that, bring you back to the originally
requested resource.  If you are browsing directly to login.jsp (the
direct reference part of the error message) then the container cannot
know where to send you after authentication.


 message : Invalid direct reference to form login page
 
 description : The request sent by the client was 
 syntactically incorrect (Invalid direct reference to form login page).
 
 in my login.jsp I put j_security_check in ACTION attribute 
 in FORM tag.
 
 What's wrong ?
 
 Thank you
 
 Fabio Bazzani
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



newbie question

2003-09-03 Thread Gustavo A. Baratto
I can see tomcat 4.1.27 working fine (including executing the examples) 
when I go to http://localhost:8080 and to http://localhost/jkstatus, but 
I am having problems connecting apache2 to tomcat through mod_jk2. I am 
getting 500 error when I go to http://localhost/examples

Another thing... I don't keep my httpd.conf in ${serverRoot}/conf, so I 
had to create this dorectory to keep workers2.properties. How do I set 
tomcat or mod_jk to look for workers2.properties in a non-standard 
directory?

This one is on a freebsd 5.1 box, with apache 2.0.47

jk2.properties is all commented out, and this is my workers2.properties:
---
# Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
worker=ajp13:localhost:8019
# define the worker
[status:status]
# Uri mapping
[uri:/jkstatus/*]
worker=status:status

This is server.xml:

Server port=8005 shutdown=SHUTDOWN debug=0
  Service name=Tomcat-Standalone
Engine name=Standalone defaultHost=localhost debug=0
	Host name=localhost debug=0 appBase=webapps
   	unpackWARs=true autoDeploy=true
		Context path=/examples debug=0 privileged=true  
docBase=examples
		/Context
	/Host
/Engine
  /Service
/Server


Any idea is very much appreciated :)

thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Memory leaks?

2003-09-03 Thread Jim Lynch
I seemed to have read that java/tomcat isn't supposed to have memory
leaks, but something seems to be running me out of memory and I don't
know what.

After a number of edit/undeploy/compile/deploy iterations I get the
following:

javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

(Big snip)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)

root cause 

java.lang.OutOfMemoryError

I'm running tomcat 4.1.24 on Linux with Apache 1.something.  Java
1.4.1_02.

So where do I start looking for the problem?  If I forget to close
Statements would that cause the problem?

Thanks,
Jim.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Any Recommended Java/Servlet Books

2003-09-03 Thread Jim Si
Hello Everyone,

Could anyone tell me some good reference books related to java
servlets?  In
addition,  any java books related to the Multimedia like showing
pictures,
playing videos and etc.

Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 4.1.27: cannot shutdown tomcat !!

2003-09-03 Thread Filip Hanik
connect is not a hostname,
looks like there is something wrong with your networking on that machine,
not Tomcat

Filip

- Original Message -
From: Fabio Bazzani [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 9:29 AM
Subject: tomcat 4.1.27: cannot shutdown tomcat !!


I'm working with JDK 1.4.0 and tomcat 4.1.27.
I'm in advanced development and unexpectedly I cannot shutdown Tomcat.
I spent all day to try undertand the why ?

shell error message:

Stopping service Tomcat-Standalone
java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:159)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.init(Socket.java:290)
at java.net.Socket.init(Socket.java:146)
at
org.apache.jk.common.ChannelSocket.destroy(ChannelSocket.java:384)
at org.apache.jk.server.JkMain.stop(JkMain.java:311)
at
org.apache.jk.server.JkCoyoteHandler.destroy(JkCoyoteHandler.java:181)
at
org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1205)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:546)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2225)
at org.apache.catalina.startup.Catalina.start(Catalina.java:543)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Does anybody know what happened ?

Thank you.

Fabio


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring jk2 for Apache 4.0.23/TomCat 4.0.27

2003-09-03 Thread Marco Tedone
Did you added the .dll under modules?

(Sorry if this it's a stupid question)
Marco
- Original Message - 
From: Raj Dasgupta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 4:10 PM
Subject: Configuring jk2 for Apache 4.0.23/TomCat 4.0.27


 After adding jk2 to my apache's httpd.conf,  I see these errors on
startup.
 Any ideas on what this error indicates?


 [Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
 [Wed Sep 03 10:35:32 2003] [error] mod_jk child init 1 -2
 [Wed Sep 03 10:35:32 2003] [notice] Apache/2.0.43 (Unix) mod_jk2/2.0.2
 configured -- resuming normal operations
 [Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
 [Wed Sep 03 10:35:32 2003] [error] shm.init(): No file
 [Wed Sep 03 10:38:38 2003] [error] jk2_init() Can't find child 27367 in
 scoreboard
 [Wed Sep 03 10:38:38 2003] [error] shm.init(): No file
 [Wed Sep 03 10:38:38 2003] [error] mod_jk child init 1 -2
 [Wed Sep 03 10:57:18 2003] [error] shm.init(): No file
 [Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27482 in
 scoreboard
 [Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
 [Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2
 [Wed Sep 03 10:57:19 2003] [error] jk2_init() Can't find child 27483 in
 scoreboard
 [Wed Sep 03 10:57:19 2003] [error] shm.init(): No file
 [Wed Sep 03 10:57:19 2003] [error] mod_jk child init 1 -2


 Thanks
 Raj






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.1.27 : error in FORM authentication

2003-09-03 Thread Fabio Bazzani
I'm sorry I was not so detailed in my problem description.
I've just done all that you said !
I made a link to a jsp page which was included in a security constraint in
web.xml.
When I click on my link before getting my page, Tomcat give me the login.jsp
to authenticate. The authentication fail !!

Whats wrong ?

Fabio.

- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 6:54 PM
Subject: RE: Tomcat 4.1.27 : error in FORM authentication




  -Original Message-
  From: Fabio Bazzani [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 03, 2003 11:15 AM
  To: Tomcat Users List
  Subject: Tomcat 4.1.27 : error in FORM authentication
 
 
  I'm working with JDK 1.4.0 and tomcat 4.1.27.
  I configured JDBCRealm in server.xml for a FORM
  authentication. When I authenticate I get a 400 error code:

 How do you 'authenticate'?  Do you browse directly to login.jsp ?   This
 is the problem, if you are.  The usage scenario of container-managed
 auth is:  you browse to a protected resource, the container will take
 you to login.jsp, and then after that, bring you back to the originally
 requested resource.  If you are browsing directly to login.jsp (the
 direct reference part of the error message) then the container cannot
 know where to send you after authentication.


  message : Invalid direct reference to form login page
 
  description : The request sent by the client was
  syntactically incorrect (Invalid direct reference to form login page).
 
  in my login.jsp I put j_security_check in ACTION attribute
  in FORM tag.
 
  What's wrong ?
 
  Thank you
 
  Fabio Bazzani
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Memory leaks?

2003-09-03 Thread Richard Hill
Try passing the jvm the -server option

-Original Message-
From: Jim Lynch [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 9:57 AM
To: tomcat
Subject: Memory leaks?


I seemed to have read that java/tomcat isn't supposed to have memory
leaks, but something seems to be running me out of memory and I don't
know what.

After a number of edit/undeploy/compile/deploy iterations I get the
following:

javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

(Big snip)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)

root cause 

java.lang.OutOfMemoryError

I'm running tomcat 4.1.24 on Linux with Apache 1.something.  Java
1.4.1_02.

So where do I start looking for the problem?  If I forget to close
Statements would that cause the problem?

Thanks,
Jim.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Any Recommended Java/Servlet Books

2003-09-03 Thread Jim Si
Hello Everyone,

Could you mention some good reference book related to java servlets?  In
addition,  any java books related to the Multimedia like showing pictures,
playing videos and etc.

Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Any Recommended Java/Servlet Books

2003-09-03 Thread Schalk
Core SERVLETS and JavaServerPages by Marty Hall published by Sun and JSP,
Servlets, MySQL  by David Harms published by mandtbooks.com

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Jim Si [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, September 03, 2003 6:32 PM
:: To: Tomcat Users List
:: Subject: Any Recommended Java/Servlet Books
:: 
:: Hello Everyone,
:: 
:: Could anyone tell me some good reference books related to java
:: servlets?  In
:: addition,  any java books related to the Multimedia like showing
:: pictures,
:: playing videos and etc.
:: 
:: Thank you.
:: 
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Any Recommended Java/Servlet Books

2003-09-03 Thread epyonne
Core Servlets.


- Original Message - 
From: Jim Si [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 11:32 AM
Subject: Any Recommended Java/Servlet Books


 Hello Everyone,
 
 Could anyone tell me some good reference books related to java
 servlets?  In
 addition,  any java books related to the Multimedia like showing
 pictures,
 playing videos and etc.
 
 Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Any Recommended Java/Servlet Books

2003-09-03 Thread John Turner
Archives, this has come up before.

John

Jim Si wrote:

Hello Everyone,

Could anyone tell me some good reference books related to java
servlets?  In
addition,  any java books related to the Multimedia like showing
pictures,
playing videos and etc.
Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


adding a servlet to my webapp

2003-09-03 Thread Jason Jesso
When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 HelloWorld.class
jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app

--
jason/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Bruno Armand
Now,

i correct all the errors (As you see n the code
below), but the jsp-page ist displayed, but without
anything written (from html or database.). Can you
know why please?

Thank!

 --- Jon Wingfield [EMAIL PROTECTED] schrieb:
 try
 %= rs.getString(i) %
 instead of
 % = rs.getString(i) %
 
 
 Bruno Armand wrote:
 
  Please i try since one week to become this program
  without error, but without success. Perrhaps can
 you
  help me!
  
  I write a jsp-file for calling and saving data
 from an
  access existing database which i connect with a
  odbc-driver.
  The adrList.jsp ist in the directory
  c:\eclipse\workspace\projectX\
  I try to start it from tomcat with
  http://localhost:8080/student.
  The file HelloWorld.jsp in the same directory runs
  without problem.
  
  Please here are:
  1. The code of the adrList.jsp and
  2. The displayed errormessage.
  __-
  1.
  html
  head
  %@ page language=java import = java.sql.* %
  %@ page import = java.lang.* %
  % 
  try  
  { 
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  String username = ;
  String password = ;
  String url = jdbc:odbc:Bruno_Adress_odbc;
  Connection con = DriverManager.getConnection(url,
username,password);

  
  String sql1 = INSERT INTO Adressen (Nachname,
  Adresse, +
Postleitzahl, Land, Ort) +
VALUES ('Bruno Armando', 'Am Vaihingen 20',
  '70187',  +
  'Deutschland', 'Stuttgart');
  
  String sql2 = INSERT INTO Adressen (Nachname,
  Adresse,+
Postleitzahl, Land, Ort)  + 
   VALUES ('Becker Marlise', 'Koenigstr 78',
 '70174',
  +
  'Deutschland', 'Stuttgart');
  
  String query = SELECT * FROM Adressen;
  
  Statement stmt = con.createStatement();
  
  stmt.executeUpdate(sql1);
  stmt.executeUpdate(sql2);
  ResultSet rs = stmt.executeQuery(query);
  ResultSetMetaData rsmd = rs.getMetaData();
  int columnCount = rsmd.getColumnCount(); 
  %
  
  titleDetails-Adressen von den 5 Besten/title
  /head
  BODY
  
  TABLE width='80%' border=0 align='center'
  cellSpacing=5 cellPadding=2 bgcolor=#FF
  bordercolor=#00 
  tr
  TD align=leftnbsp; /TD 
  TD align=right  
   nbsp;
  /TD 
  
  td Name/td
  td Street/td
  td Zip/td
  td Town/td
  td Country/td
  /tr
  
  %
  while (rs.next())
  {
  %
  tr
   TD align=leftnbsp; /TD 
   TD align=right  nbsp; /TD
  %
   for (int i = 2; i = columnCount; i++)
  %
   td
   %= rs.getString(i) %
   /td
  %
  }
  %
  /trbr
  %
  }
  rs.close();
  stmt.close();
  con.close();
  } 
  catch (SQLException ex) 
  {
System.out.println(SQLException:);
while (ex != null)
{
  System.out.println(SQLState:  +
  ex.getSQLState());
  System.out.println(Nachricht:  +
  ex.getMessage());
  System.out.println(Anbieter:  +
  ex.getErrorCode());
  ex = ex.getNextException();
  System.out.println();
  }
}
  %
  /table
  /body
  /html
  
  2. Errormessage:
  
  HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal
 error
  () that prevented it from fulfilling this request.
  
  exception
  
  org.apache.jasper.JasperException: Unable to
 compile
  class for JSP
  
  An error occurred at line: 106 in the jsp file:
  /adrList.jsp
  
  Generated servlet error:
  [javac] Compiling 1 source file
  
  C:\Programme\Apache Group\Tomcat
 

4.1\work\Standalone\localhost\student2\adrList_jsp.java:159:
  illegal start of expression
   = rs.getString(i) 
   ^
  
  
  
  An error occurred at line: 14 in the jsp file:
  /adrList.jsp
  
  Generated servlet error:
  C:\Programme\Apache Group\Tomcat
 

4.1\work\Standalone\localhost\student2\adrList_jsp.java:58:
  'try' without 'catch' or 'finally'
  try  
  ^
  
  
  
  An error occurred at line: 112 in the jsp file:
  /adrList.jsp
  
  Generated servlet error:
  C:\Programme\Apache Group\Tomcat
 

4.1\work\Standalone\localhost\student2\adrList_jsp.java:186:
  illegal start of expression
  public static Connection getConnection()
  ^
  
  
  
  An error occurred at line: 14 in the jsp file:
  /adrList.jsp
  
  Generated servlet error:
  C:\Programme\Apache Group\Tomcat
 

4.1\work\Standalone\localhost\student2\adrList_jsp.java:61:
 
=== message truncated === 

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: adding a servlet to my webapp

2003-09-03 Thread John Turner
You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 HelloWorld.class
jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How to get tomcat to autostart on linux

2003-09-03 Thread batristain
Thanks for the info

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 03, 2003 11:04 AM
To: Tomcat Users List
Subject: Re: How to get tomcat to autostart on linux



Courtesy of Oscar Carrillo:

http://daydream.stanford.edu/tomcat/install_web_services.html#daemons

You need to download his tomcatd script, and copy it to /etc/rc.d/init.d.

Then execute: /sbin/chkconfig --del tomcatd

Then execute: /sbin/chkconfig --add tomcatd

Note you will need to modify the tomcatd script to meet your needs, such 
as changing the paths, etc.

John

[EMAIL PROTECTED] wrote:

 Greetings,
 I need to know how to get tomcat to autostart on a redhat linux 8 box 
 - can anyone tell me?
 
 Thanks,
 Bobbie
 
 Bobbie Atristain
 Internet Systems Administrator
 Media General, INC.
 804.649.6156
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: adding a servlet to my webapp

2003-09-03 Thread Jason Jesso
But,  I don't want to use the invoker.  I want to be able to specify 
the servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 
HelloWorld.class

jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
jason/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Which is the best way to install an application with connecti on p ooling

2003-09-03 Thread Hookom, Jacob
I'm trying to accomplish a similar thing with an AS/400 db over JNDI.

I have my context setup in my meta-inf and from stack traces; I see that
DBCP is the one launching the error, so I know that the context binding is
loading successfully.

The problem is that DBCP is throwing and exception that the driver specified
is null, I have the jar located in the webapp's lib, the shared/lib and the
server/lib... which lib directory should contain the driver so that the
context can see it?

Note:  I'm deploying via Ant by pointing at a war file in my project.

Many Thanks!

Jacob Hookom
McKesson Medical-Surgical

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 03, 2003 10:32 AM
To: Tomcat Users List
Subject: Re: Which is the best way to install an application with connecti
on p ooling


If you are using a WAR file, put your entire Context block into a file 
called (your-webapp).xml and stick it in META-INF.  Whatever is legal in 
a Context block in server.xml is also legal there.  Then you can deploy 
the WAR file using the manager app froma  remote system.

The admin and manager apps themselves do the same thing, check out 
admin.xml etc in the default distribution.

John

Kevin Passey wrote:

 John,
 
 I can easily deploy a basic app using the manager. But when it comes to
 deploying something that needs additional Context information I come
 un-stuck.
 
 I basically have an app that I want to connect to an AS/400 database using
 connection pooling.
 
 The only way I can get it to work is to manually insert the entries in the
 server XML file and then re-start.
 
 Any other pointer greatly appreciated.
 
 Regards
 
 Kevin
 
 
 -Original Message-
 From: John Turner [mailto:[EMAIL PROTECTED]
 Sent: 02 September 2003 13:45
 To: Tomcat Users List
 Subject: Re: Which is the best way to install an application with
 connection p ooling
 
 
 
 There are a number of ways.
 
 If autoDeploy = true then you can just drop the WAR file in the Host's 
 appBase directory.
 
 You can also use the manager app's various tasks (install, deploy, etc):
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
 
 This is easily accomplished with ant.
 
 John
 
 Kevin Passey wrote:
 
 
I have normally stopped the server - edited the server XML file, put my
 
 war
 
file in the webapps folder and re-started tomcat.

Using the manager app - is there a way I can do this 1)from a remote
 
 system
 
and 2)without manually editing the server XML file.

I've have tried putting the jndi info using the admin console but I keep
getting NULL driver exceptions.

Thanks

Kevin

 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: adding a servlet to my webapp

2003-09-03 Thread John Turner
Yes, exactly.

The way you have it now is trying to use the Invoker servlet.

You are missing the servlet mapping in web.xml, as explained in option 
#3 of this post which is linked from the FAQ section:

http://marc.theaimsgroup.com/?l=tomcat-userm=103945394724196w=2

John

Jason Jesso wrote:

But,  I don't want to use the invoker.  I want to be able to specify 
the servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 
HelloWorld.class

jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: adding a servlet to my webapp

2003-09-03 Thread Justin Ruthenbeck
Jason,

John was pointing out that you're missing the servlet-mapping which 
basically says, For a URL that looks like X, send the request to servlet 
Y.  You've also got a malformed servlet-class value.  Something like 
this should work...

servlet
servlet-nameHelloWorld/servlet-name
servlet-classmypackage.HelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
justin

At 12:02 PM 9/3/2003, you wrote:
But,  I don't want to use the invoker.  I want to be able to specify the 
servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 HelloWorld.class
jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
jason/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Memory leaks?

2003-09-03 Thread Paul
Docs indicate that leaving a stmt or rs object open can cause memory leaks.
Found the following in the tomcat docs somewhere, i think:

Here is an example of properly written code to use a db connection obtained
from a connection pool:

  Connection conn = null;
  Statement stmt = null;  // Or PreparedStatement if needed
  ResultSet rs = null;
  try {
conn = ... get connection from connection pool ...
stmt = conn.createStatement(select ...);
rs = stmt.executeQuery();
... iterate through the result set ...
rs.close();
rs = null;
stmt.close();
stmt = null;
conn.close(); // Return to connection pool
conn = null;  // Make sure we don't close it twice
  } catch (SQLException e) {
... deal with errors ...
  } finally {
// Always make sure result sets and statements are closed,
// and the connection is returned to the pool
if (rs != null) {
  try { rs.close(); } catch (SQLException e) { ; }
  rs = null;
}
if (stmt != null) {
  try { stmt.close(); } catch (SQLException e) { ; }
  stmt = null;
}
if (conn != null) {
  try { conn.close(); } catch (SQLException e) { ; }
  conn = null;
}
  }



- Original Message - 
From: Jim Lynch [EMAIL PROTECTED]
To: tomcat [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 12:56 PM
Subject: Memory leaks?


 I seemed to have read that java/tomcat isn't supposed to have memory
 leaks, but something seems to be running me out of memory and I don't
 know what.

 After a number of edit/undeploy/compile/deploy iterations I get the
 following:

 javax.servlet.ServletException: Servlet execution threw an exception
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

 (Big snip)


org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
 at

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
 at java.lang.Thread.run(Thread.java:536)

 root cause

 java.lang.OutOfMemoryError

 I'm running tomcat 4.1.24 on Linux with Apache 1.something.  Java
 1.4.1_02.

 So where do I start looking for the problem?  If I forget to close
 Statements would that cause the problem?

 Thanks,
 Jim.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



setting the field focus with a servlet

2003-09-03 Thread Luke Vanderfluit
Hi,

I am working on a servlet that checks a form content without using
javascript.

Does anyone know if there is a way to set the focus to a particular
field using java?

thanks for any help :-)

kind regards,
Luke
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Jon Wingfield
Very difficult to tell ;)

Do you have any errors in the tomcat logs?
Does your debug in the SQLException catch clause get written to std out 
or catalina.out?
If a SQLException did get thrown during the inserts/select the output 
would be:

html
head
/table
/body
/html
Not quite sure how that would be rendered in a browser.

Are you sure you can load the jdbc driver? A ClassNotFoundException can 
be thrown from Class.forName(...)

Are you sure you are getting a connection to the database? Is your 
connection url correct? Also, the JdbcOdbcBridge has always been flaky 
at best.

I would recommend removing as much java code as possible from the jsp 
and use Beans or taglibs for the database access. It should make the jsp 
code a lot cleaner. For another thing it makes testing a lot easier :)

HTH,

Jon

Bruno Armand wrote:

Now,

i correct all the errors (As you see n the code
below), but the jsp-page ist displayed, but without
anything written (from html or database.). Can you
know why please?
Thank!

 --- Jon Wingfield [EMAIL PROTECTED] schrieb:

try
%= rs.getString(i) %
instead of
% = rs.getString(i) %
Bruno Armand wrote:


Please i try since one week to become this program
without error, but without success. Perrhaps can
you

help me!

I write a jsp-file for calling and saving data
from an

access existing database which i connect with a
odbc-driver.
The adrList.jsp ist in the directory
c:\eclipse\workspace\projectX\
I try to start it from tomcat with
http://localhost:8080/student.
The file HelloWorld.jsp in the same directory runs
without problem.
Please here are:
1. The code of the adrList.jsp and
2. The displayed errormessage.
__-
1.
html
head
%@ page language=java import = java.sql.* %
%@ page import = java.lang.* %
% 
try  
{ 
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  String username = ;
  String password = ;
  String url = jdbc:odbc:Bruno_Adress_odbc;
  Connection con = DriverManager.getConnection(url,
username,password);

String sql1 = INSERT INTO Adressen (Nachname,
Adresse, +
 Postleitzahl, Land, Ort) +
 VALUES ('Bruno Armando', 'Am Vaihingen 20',
'70187',  +
'Deutschland', 'Stuttgart');
String sql2 = INSERT INTO Adressen (Nachname,
Adresse,+
 Postleitzahl, Land, Ort)  + 
VALUES ('Becker Marlise', 'Koenigstr 78',
'70174',

+
'Deutschland', 'Stuttgart');
String query = SELECT * FROM Adressen;

Statement stmt = con.createStatement();

stmt.executeUpdate(sql1);
stmt.executeUpdate(sql2);
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int columnCount = rsmd.getColumnCount(); 
%

titleDetails-Adressen von den 5 Besten/title
/head
BODY
TABLE width='80%' border=0 align='center'
cellSpacing=5 cellPadding=2 bgcolor=#FF
bordercolor=#00 
tr
TD align=leftnbsp; /TD 
   TD align=right  
nbsp;
   /TD 

td Name/td
td Street/td
td Zip/td
td Town/td
td Country/td
/tr
%
while (rs.next())
{
%
tr
TD align=leftnbsp; /TD 
TD align=right  nbsp; /TD
%
for (int i = 2; i = columnCount; i++)
%
td
%= rs.getString(i) %
/td
%
}
%
/trbr
%
}
rs.close();
stmt.close();
con.close();
} 
catch (SQLException ex) 
{
 System.out.println(SQLException:);
 while (ex != null)
 {
   System.out.println(SQLState:  +
ex.getSQLState());
   System.out.println(Nachricht:  +
ex.getMessage());
   System.out.println(Anbieter:  +
ex.getErrorCode());
   ex = ex.getNextException();
   System.out.println();
}
}

%
/table
/body
/html




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: adding a servlet to my webapp

2003-09-03 Thread Jason Jesso
My guess is that this is right then:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-classHelloWorld/servlet-class
/servlet
servlet-mapping
   servlet-nameHelloWorld/servlet-name
   url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
/web-app

Do I need the mypackage thing?

With what I have above I get a HTTP Status 500 -

root cause

java.lang.ClassNotFoundException: HelloWorld





Justin Ruthenbeck wrote:

Jason,

John was pointing out that you're missing the servlet-mapping which 
basically says, For a URL that looks like X, send the request to 
servlet Y.  You've also got a malformed servlet-class value.  
Something like this should work...

servlet
servlet-nameHelloWorld/servlet-name
servlet-classmypackage.HelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
justin

At 12:02 PM 9/3/2003, you wrote:

But,  I don't want to use the invoker.  I want to be able to 
specify the servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger 
className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 
HelloWorld.class

jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
jason/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
jason/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: adding a servlet to my webapp

2003-09-03 Thread Schalk
Jason

servlet
servlet-nameHelloWorld/servlet-name
servlet-class!-- Over here you have to specify the complete path
to the servlet -- HelloWorld/servlet-class
/servlet

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Jason Jesso [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, September 03, 2003 9:36 PM
:: To: Tomcat Users List
:: Subject: Re: adding a servlet to my webapp
:: 
:: My guess is that this is right then:
:: 
:: ?xml version=1.0 encoding=ISO-8859-1?
:: 
:: !DOCTYPE web-app
:: PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
:: http://java.sun.com/dtd/web-app_2_3.dtd;
:: 
:: web-app
:: 
:: servlet
:: servlet-nameHelloWorld/servlet-name
:: servlet-classHelloWorld/servlet-class
:: /servlet
:: servlet-mapping
:: servlet-nameHelloWorld/servlet-name
:: url-pattern/servlet/foo/HelloWorld/url-pattern
:: /servlet-mapping
:: 
:: /web-app
:: 
:: Do I need the mypackage thing?
:: 
:: With what I have above I get a HTTP Status 500 -
:: 
:: root cause
:: 
:: java.lang.ClassNotFoundException: HelloWorld
:: 
:: 
:: 
:: 
:: 
:: 
:: Justin Ruthenbeck wrote:
:: 
::  Jason,
:: 
::  John was pointing out that you're missing the servlet-mapping which
::  basically says, For a URL that looks like X, send the request to
::  servlet Y.  You've also got a malformed servlet-class value.
::  Something like this should work...
:: 
::  servlet
::  servlet-nameHelloWorld/servlet-name
::  servlet-classmypackage.HelloWorld/servlet-class
::  /servlet
::  servlet-mapping
::  servlet-nameHelloWorld/servlet-name
::  url-pattern/servlet/foo/HelloWorld/url-pattern
::  /servlet-mapping
:: 
::  justin
:: 
:: 
::  At 12:02 PM 9/3/2003, you wrote:
:: 
::  But,  I don't want to use the invoker.  I want to be able to
::  specify the servlet itself in web.xml.
:: 
::  The invoker is evil according to the link you gave me.
:: 
:: 
:: 
::  John Turner wrote:
:: 
:: 
::  You have to map your servlet in web.xml.
:: 
::  FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker
:: 
::  John
:: 
::  Jason Jesso wrote:
:: 
::  When I go to my servlet I get HTTP Status 404 -
::  /jasonTest/servlet/foo/HelloWorld
:: 
::  The url is:
::  http://neptune/jasonTest/servlet/foo/HelloWorld
:: 
::  My config is as follows:  (What is wrong here??)
:: 
::  I have a webapp defined in server.xml as
:: 
::  ===
::Context path=/jasonTest
:: docBase=jasonTest
:: debug=0
:: reloadable=true
:: crossContext=true
:: Logger
::  className=org.apache.catalina.logger.FileLogger
::  prefix=jasonTest suffix=.out/
:: /Context
::  ===
:: 
:: 
::  My webapp directory structure looks like:
::  ===
::  neptune:root ls -lR jasonTest/
::  total 16
::  drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
::  -rw-r--r--   1 root software 43 Sep 03 10:10 index.html
::  jasonTest/WEB-INF:
::  total 24
::  drwxr-sr-x   3 root software512 Sep 03 11:12 classes
::  drwxr-sr-x   2 root software512 Sep 03 10:09 lib
::  -rw-r--r--   1 root software328 Sep 03 14:22 web.xml
:: 
::  jasonTest/WEB-INF/classes:
::  total 8
::  drwxr-sr-x   2 root software512 Sep 03 10:31 foo
:: 
::  jasonTest/WEB-INF/classes/foo:
::  total 8
::  -rw-r-   1 root software815 Sep 03 10:31
::  HelloWorld.class
:: 
::  jasonTest/WEB-INF/lib:
::  total 0
::  neptune:root
::  ===
:: 
::  My web.xml looks like:
:: 
::  ?xml version=1.0 encoding=ISO-8859-1?
:: 
::  !DOCTYPE web-app
:: PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
:: http://java.sun.com/dtd/web-app_2_3.dtd;
:: 
::  web-app
:: 
::  servlet
:: servlet-nameHelloWorld/servlet-name
:: servlet-class/servlet/foo/HelloWorld/servlet-class
::  /servlet
:: 
::  /web-app
:: 
:: 
:: 
:: 
::  -
::  To unsubscribe, e-mail: [EMAIL PROTECTED]
::  For additional commands, e-mail: [EMAIL PROTECTED]
:: 
:: 
::  --
::  jason/
:: 
:: 
:: 
:: 
:: 
::  -
::  To unsubscribe, e-mail: [EMAIL PROTECTED]
::  For additional commands, e-mail: [EMAIL PROTECTED]
:: 
:: 
:: 
::  
::  Justin Ruthenbeck
::  Software Engineer, NextEngine Inc.
::  justinr - AT - nextengine DOT com
::  Confidential
:: See http://www.nextengine.com/confidentiality.php
::  
:: 
:: 
::  -
::  To unsubscribe, e-mail: [EMAIL PROTECTED]
::  For additional commands, e-mail: [EMAIL 

Re: adding a servlet to my webapp

2003-09-03 Thread Justin Ruthenbeck
At 12:36 PM 9/3/2003, you wrote:
My guess is that this is right then:
servlet
   servlet-nameHelloWorld/servlet-name
   servlet-classHelloWorld/servlet-class
/servlet
servlet-mapping
   servlet-nameHelloWorld/servlet-name
   url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
Do I need the mypackage thing?
From your ls output that you gave originally, it looks like you've 
got  HelloWorld in a package called foo.  So, yes -- you need the 
mypackage thing.  It should be

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-classfoo.HelloWorld/servlet-class
/servlet
Try that out...

justin


Justin Ruthenbeck wrote:

Jason,

John was pointing out that you're missing the servlet-mapping which 
basically says, For a URL that looks like X, send the request to servlet 
Y.  You've also got a malformed servlet-class value.
Something like this should work...

servlet
servlet-nameHelloWorld/servlet-name
servlet-classmypackage.HelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
justin

At 12:02 PM 9/3/2003, you wrote:

But,  I don't want to use the invoker.  I want to be able to specify 
the servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 HelloWorld.class
jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
jason/



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: adding a servlet to my webapp

2003-09-03 Thread Roehl, Dan
I am having a similar issue with URL mapping
This used to work:
Any tips? would like URL pattern to be host:port/webappname/Form
web-app
 display-nameaeform/display-name
description
  AE form controller.
/description
   servlet
servlet-nameAeFormServlet/servlet-name
servlet-classformController.AeFormServlet/servlet-class
/servlet  
servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping
 THIS NO WORKY ANYMORE 
servlet-mapping
servlet-nameAeFormServlet/servlet-name
url-pattern*/Form/url-pattern
/servlet-mapping
/web-app

-Original Message-
From: Schalk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 2:46 PM
To: 'Tomcat Users List'
Subject: RE: adding a servlet to my webapp


Jason

servlet
servlet-nameHelloWorld/servlet-name
servlet-class!-- Over here you have to specify the complete path
to the servlet -- HelloWorld/servlet-class
/servlet

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Jason Jesso [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, September 03, 2003 9:36 PM
:: To: Tomcat Users List
:: Subject: Re: adding a servlet to my webapp
:: 
:: My guess is that this is right then:
:: 
:: ?xml version=1.0 encoding=ISO-8859-1?
:: 
:: !DOCTYPE web-app
:: PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
:: http://java.sun.com/dtd/web-app_2_3.dtd;
:: 
:: web-app
:: 
:: servlet
:: servlet-nameHelloWorld/servlet-name
:: servlet-classHelloWorld/servlet-class
:: /servlet
:: servlet-mapping
:: servlet-nameHelloWorld/servlet-name
:: url-pattern/servlet/foo/HelloWorld/url-pattern
:: /servlet-mapping
:: 
:: /web-app
:: 
:: Do I need the mypackage thing?
:: 
:: With what I have above I get a HTTP Status 500 -
:: 
:: root cause
:: 
:: java.lang.ClassNotFoundException: HelloWorld
:: 
:: 
:: 
:: 
:: 
:: 
:: Justin Ruthenbeck wrote:
:: 
::  Jason,
:: 
::  John was pointing out that you're missing the servlet-mapping which
::  basically says, For a URL that looks like X, send the request to
::  servlet Y.  You've also got a malformed servlet-class value.
::  Something like this should work...
:: 
::  servlet
::  servlet-nameHelloWorld/servlet-name
::  servlet-classmypackage.HelloWorld/servlet-class
::  /servlet
::  servlet-mapping
::  servlet-nameHelloWorld/servlet-name
::  url-pattern/servlet/foo/HelloWorld/url-pattern
::  /servlet-mapping
:: 
::  justin
:: 
:: 
::  At 12:02 PM 9/3/2003, you wrote:
:: 
::  But,  I don't want to use the invoker.  I want to be able to
::  specify the servlet itself in web.xml.
:: 
::  The invoker is evil according to the link you gave me.
:: 
:: 
:: 
::  John Turner wrote:
:: 
:: 
::  You have to map your servlet in web.xml.
:: 
::  FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker
:: 
::  John
:: 
::  Jason Jesso wrote:
:: 
::  When I go to my servlet I get HTTP Status 404 -
::  /jasonTest/servlet/foo/HelloWorld
:: 
::  The url is:
::  http://neptune/jasonTest/servlet/foo/HelloWorld
:: 
::  My config is as follows:  (What is wrong here??)
:: 
::  I have a webapp defined in server.xml as
:: 
::  ===
::Context path=/jasonTest
:: docBase=jasonTest
:: debug=0
:: reloadable=true
:: crossContext=true
:: Logger
::  className=org.apache.catalina.logger.FileLogger
::  prefix=jasonTest suffix=.out/
:: /Context
::  ===
:: 
:: 
::  My webapp directory structure looks like:
::  ===
::  neptune:root ls -lR jasonTest/
::  total 16
::  drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
::  -rw-r--r--   1 root software 43 Sep 03 10:10 index.html
::  jasonTest/WEB-INF:
::  total 24
::  drwxr-sr-x   3 root software512 Sep 03 11:12 classes
::  drwxr-sr-x   2 root software512 Sep 03 10:09 lib
::  -rw-r--r--   1 root software328 Sep 03 14:22 web.xml
:: 
::  jasonTest/WEB-INF/classes:
::  total 8
::  drwxr-sr-x   2 root software512 Sep 03 10:31 foo
:: 
::  jasonTest/WEB-INF/classes/foo:
::  total 8
::  -rw-r-   1 root software815 Sep 03 10:31
::  HelloWorld.class
:: 
::  jasonTest/WEB-INF/lib:
::  total 0
::  neptune:root
::  ===
:: 
::  My web.xml looks like:
:: 
::  ?xml version=1.0 encoding=ISO-8859-1?
:: 
::  !DOCTYPE web-app
:: PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
:: http://java.sun.com/dtd/web-app_2_3.dtd;
:: 
::  web-app
:: 
::  servlet
:: servlet-nameHelloWorld/servlet-name
:: servlet-class/servlet/foo/HelloWorld/servlet-class
::  /servlet
:: 
::  /web-app
:: 
:: 
:: 

Re: adding a servlet to my webapp

2003-09-03 Thread Jon Wingfield
Given your initial post your class HelloWorld was in
jasonTest/WEB-INF/classes/foo
So either HelloWorld must be in a package foo. ie the first code line of 
the Helloworld source is:
package foo;

or you need to put HelloWorld.class in
jasonTest/WEB-INF/classes
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html

HTH,

Jon

Jason Jesso wrote:

My guess is that this is right then:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-classHelloWorld/servlet-class
/servlet
servlet-mapping
   servlet-nameHelloWorld/servlet-name
   url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
/web-app

Do I need the mypackage thing?

With what I have above I get a HTTP Status 500 -

root cause

java.lang.ClassNotFoundException: HelloWorld





Justin Ruthenbeck wrote:

Jason,

John was pointing out that you're missing the servlet-mapping which 
basically says, For a URL that looks like X, send the request to 
servlet Y.  You've also got a malformed servlet-class value.  
Something like this should work...

servlet
servlet-nameHelloWorld/servlet-name
servlet-classmypackage.HelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/foo/HelloWorld/url-pattern
/servlet-mapping
justin

At 12:02 PM 9/3/2003, you wrote:

But,  I don't want to use the invoker.  I want to be able to 
specify the servlet itself in web.xml.

The invoker is evil according to the link you gave me.



John Turner wrote:

You have to map your servlet in web.xml.

FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

John

Jason Jesso wrote:

When I go to my servlet I get HTTP Status 404 - 
/jasonTest/servlet/foo/HelloWorld

The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:  (What is wrong here??)

I have a webapp defined in server.xml as

===
  Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true
   crossContext=true
   Logger 
className=org.apache.catalina.logger.FileLogger 
prefix=jasonTest suffix=.out/
   /Context
===

My webapp directory structure looks like:
===
neptune:root ls -lR jasonTest/
total 16
drwxr-sr-x   4 root software512 Sep 03 10:18 WEB-INF
-rw-r--r--   1 root software 43 Sep 03 10:10 index.html
jasonTest/WEB-INF:
total 24
drwxr-sr-x   3 root software512 Sep 03 11:12 classes
drwxr-sr-x   2 root software512 Sep 03 10:09 lib
-rw-r--r--   1 root software328 Sep 03 14:22 web.xml
jasonTest/WEB-INF/classes:
total 8
drwxr-sr-x   2 root software512 Sep 03 10:31 foo
jasonTest/WEB-INF/classes/foo:
total 8
-rw-r-   1 root software815 Sep 03 10:31 
HelloWorld.class

jasonTest/WEB-INF/lib:
total 0
neptune:root
===
My web.xml looks like:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

servlet
   servlet-nameHelloWorld/servlet-name
   servlet-class/servlet/foo/HelloWorld/servlet-class
/servlet
/web-app





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   >