Ugrade document - tomcat 3.2.23 to 4.1.24

2003-07-24 Thread Sarika Inamdar
Hi All,

We are upgrading tomcat from 3.2.23 to tomcat 4.1.24. Is there any
upgrade document which we could refer  to?

We see a lot of changes from 3.2 version to 4.1.24 .

Please help us on this.

Thanks,
Sarika



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



AW: No printers when run as service.

2003-07-24 Thread Hamidene, Anis Ben
Hi,
 i am having problems too with tomcat when run as a service. Which other
reply do you mean? 

Best regrads 

Anis B.H.
  



 -Ursprüngliche Nachricht-
 Von: Anthony Cunningham [mailto:[EMAIL PROTECTED] 
 Gesendet: Donnerstag, 24. Juli 2003 06:14
 An: Tomcat Users List
 Betreff: Re: No printers when run as service.
 
 
 thanks that worked
 the other reply is correct also
 Printservice and Tomcat was a previous thread on this issue 
 if anyone else needs more information
 
 John Corrigan wrote:
 
  You might try changing the user which tomcat runs as and 
 see if that 
  helps.
 
  -Original Message-
  From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 21, 2003 10:46 PM
  To: Tomcat Users List
  Subject: No printers when run as service.
 
  I tried searching the archives and google for this but without 
  success.
 
  I am running Tomcat 4.0.4 on Windows NT 4.0 Service pack 6 
 (Japanese). 
  Due to the nature of our application we are using Adobe 
 PDFWriter as a 
  virtual printer to create a PDF file on the harddrive which is then 
  streamed to the user and deleted.  When Tomcat is run from 
 the command 
  line it works ok however when run as a service the error 
 below occurs. 
  Does anyone know why this might happen and a possible solution?
 
  thanks for the help,
  Anthony Cunningham
 
  java.awt.print.PrinterException: No printer found.
   at sun.awt.windows.WPrinterJob._startDoc(Native Method)
   at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
   at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
   at
  
 ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/Prin
  tReport.java:371)
 
   at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)  at 
  ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)  at 
  ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)  at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispa
  tcher.java:683)
 
   at
  
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDi
  spatcher.java:431)
 
   at
  
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp
  atcher.java:355)
 
   at ajs.wgfw.ctrl.SubController.gotoPage(SubController.java:1579)
   at ajs.wgfw.ctrl.SubController.execute(SubController.java:323)
   at
  
 ajs.wgfw.ctrl.AbstractMainController.doMain(AbstractMainController.jav
  a:657)
 
   at
  
 ajs.wgfw.ctrl.AbstractMainController.doGet(AbstractMainController.java
  :436)
 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
  cationFilterChain.java:247)
 
   at
  
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
  lterChain.java:193)
 
   at
  
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
  lve.java:243)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:566)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
  :472)
 
   at
  
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
  lve.java:190)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:566)
 
   at
  
 org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.
  java:246)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:564)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
  :472)
 
   at
  
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
  347)
 
   at
  
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
  va:180)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:566)
 
   at
  
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
  Valve.java:170)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:564)
 
   at
  
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
  va:170)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:564)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
  :472)
 
   at
  
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apach
  
 e.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:17
  4)
 
   at
  
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
  java:566)
 
   at
  
 

Re: AW: No printers when run as service.

2003-07-24 Thread Anthony Cunningham
The one about PrintService and Tomcat being a previous thread

If you are using NT/2000 in the services list you can select Apache Tomcat.
In NT double clicking the Apache Tomcat service will give you a property
dialog for the service.  Here you can choose a user to run as.  You should
choose one that has access to the printers.

Hamidene, Anis Ben wrote:

 Hi,
  i am having problems too with tomcat when run as a service. Which other
 reply do you mean?

 Best regrads

 Anis B.H.


  -Ursprüngliche Nachricht-
  Von: Anthony Cunningham [mailto:[EMAIL PROTECTED]
  Gesendet: Donnerstag, 24. Juli 2003 06:14
  An: Tomcat Users List
  Betreff: Re: No printers when run as service.
 
 
  thanks that worked
  the other reply is correct also
  Printservice and Tomcat was a previous thread on this issue
  if anyone else needs more information
 
  John Corrigan wrote:
 
   You might try changing the user which tomcat runs as and
  see if that
   helps.
  
   -Original Message-
   From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
   Sent: Monday, July 21, 2003 10:46 PM
   To: Tomcat Users List
   Subject: No printers when run as service.
  
   I tried searching the archives and google for this but without
   success.
  
   I am running Tomcat 4.0.4 on Windows NT 4.0 Service pack 6
  (Japanese).
   Due to the nature of our application we are using Adobe
  PDFWriter as a
   virtual printer to create a PDF file on the harddrive which is then
   streamed to the user and deleted.  When Tomcat is run from
  the command
   line it works ok however when run as a service the error
  below occurs.
   Does anyone know why this might happen and a possible solution?
  
   thanks for the help,
   Anthony Cunningham
  
   java.awt.print.PrinterException: No printer found.
at sun.awt.windows.WPrinterJob._startDoc(Native Method)
at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
at
  
  ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/Prin
   tReport.java:371)
  
at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)  at
   ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)  at
   ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)  at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
  
  org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispa
   tcher.java:683)
  
at
  
  org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDi
   spatcher.java:431)
  
at
  
  org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp
   atcher.java:355)
  
at ajs.wgfw.ctrl.SubController.gotoPage(SubController.java:1579)
at ajs.wgfw.ctrl.SubController.execute(SubController.java:323)
at
  
  ajs.wgfw.ctrl.AbstractMainController.doMain(AbstractMainController.jav
   a:657)
  
at
  
  ajs.wgfw.ctrl.AbstractMainController.doGet(AbstractMainController.java
   :436)
  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
  
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
   cationFilterChain.java:247)
  
at
  
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
   lterChain.java:193)
  
at
  
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
   lve.java:243)
  
at
  
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
   java:566)
  
at
  
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
   :472)
  
at
  
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
  
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
   lve.java:190)
  
at
  
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
   java:566)
  
at
  
  org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.
   java:246)
  
at
  
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
   java:564)
  
at
  
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
   :472)
  
at
  
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
  
  org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
   347)
  
at
  
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
   va:180)
  
at
  
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
   java:566)
  
at
  
  org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
   Valve.java:170)
  
at
  
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
   java:564)
  
at
  
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
   va:170)
  
at
  
  

Re: Pb Form authentication

2003-07-24 Thread v.siguier
Thanks for your help !
I understand what is wrong : on error page I must recall the entry page of my web site.

Vincent


 Here is your problem.
 
 You can't do this.  You are navigating directly to login.jsp.
 
 a href='%= response.encodeURL(login.jsp) %'again/a.
 
 Rick
 
 v.siguier wrote:
  I am agree with you but I don't try to access directly to login.jsp, I call the 
  site presentation page index.jsp.
  Following are my to authentication jsp pages :
  
  Login.jsp :
  -
  html
  head
  titleLogin Page for Examples/title
  body bgcolor=white
  form method=POST action='%= response.encodeURL(j_security_check) %' 
table border=0 cellspacing=5
  tr
th align=rightUsername:/th
td align=leftinput type=text name=j_username/td
  /tr
  tr
th align=rightPassword:/th
td align=leftinput type=password name=j_password/td
  /tr
  tr
td align=rightinput type=submit value=Log In/td
td align=leftinput type=reset/td
  /tr
/table
  /form
  /body
  /html
  
  
  Error.jsp :
  
  html
  head
  titleError Page For Examples/title
  /head
  body bgcolor=white
  Invalid username and/or password, please try
  a href='%= response.encodeURL(login.jsp) %'again/a.
  /body
  /html
  
  
 If I understand the question, then:
 
 It sounds like you are trying to navigate directly to login.jsp which your not 
 suppose to do.
 
 Reason:
 j_security_check intercepts your request and checks to see if your are currently 
 authorized to go to that URI.  If you are then it forwards you to that location. 
   If you navigate directly to login.jsp, then j_security_check doesn't know 
 where to forward you to.
 
 
 v.siguier wrote:
 
 Hello,
 
 I work with Tomcat 4.1.24 and I have a problem with authentication (I use 
 DataSourceRealm) at runtime.
 
 On login page, if I enter login - password existing in database with the rigth 
 role to access to the specified ressource it is OK 
 (the targeted page is displayed).
 The problem happens when I enter an existing login - password with the wrong role 
 : my error page is displayed and when I 
 click the login page link and enter an existing login - password with the rigth 
 role or wrong role, I have following Tomcat error 
 message :
 
 404 HTTP error - /context_root/jsp/j_security_check
 
 message /context_root/jsp/j_security_check
 description Asked ressource (/context_root/jsp/j_security_check) is not available.
 
 Does anybody know what is the problem ?
 Thanks for your help.
 
 Vincent
 
 
 --
 
 Faites un voeu et puis Voila ! www.voila.fr 
 
 -- 
 ***
 * Rick Roberts*
 * Advanced Information Technologies, Inc. *
 ***
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
--

Faites un voeu et puis Voila ! www.voila.fr 



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



tomcat connection/port problem

2003-07-24 Thread Astrid Wagner
Hi,
I use tomcat 4.1.24, jdk 1.4.0 and Apache 1.3 on Solaris 8.
I am able to run a servlet with my configuration but when I submit in 
this first page I receive an errror.
The catalina.out log file simply says:
Jul 24, 2003 8:53:58 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Jul 24, 2003 8:53:58 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Jul 24, 2003 8:54:01 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Jul 24, 2003 8:54:04 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
Jul 24, 2003 8:54:31 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Jul 24, 2003 8:54:32 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jul 24, 2003 8:54:32 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=44/437  
config=/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jaka
rta-tomcat-4.1.24/conf/jk2.properties
[EMAIL PROTECTED](): empty constructor:  // this is  printout 
from my code
[EMAIL PROTECTED]() start:  // this 
is  printout from my code
[EMAIL PROTECTED]() before getting system.mode: // this is 
printout from my code
Stopping service Tomcat-Standalone

The mod_jk printout says this :
[Thu Jul 24 09:01:26 2003]  [jk_ajp_common.c (642)]: sending to ajp13 #79
[Thu Jul 24 09:01:27 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response mes
sage from tomcat, network problems or tomcat is down.
...

I remember having seen some port 8080 in use problem error message but 
not in the above test.
Apache is configured to run on a different port (7778) and server.xml has:
 Service name=Tomcat-Standalone
   !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=2
  useURIValidationHack=false disableUploadTimeout=true /
   !-- Note : To disable connection timeouts, set connectionTimeout value
to -1 --
   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=0
  useURIValidationHack=false
  
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
 /Service

Do I have to use a different connector? Why does the problem occur not 
right away if it is a port problem?
The error comes when I try to read an external java resource bundle 
(.properties file) even
though this may not have sth. to do with the error because the resource 
bundle is successfully found
prior to the error.
Thanks for your help.

BTW: Is it advisable to use the above configuration since we have an 
quite old version of Apache?
E.g Has anyone experienced mayor problems running relativly new versions 
of tomcat with an old 1.3
Apache version??

Astrid






NT Service with jvm options

2003-07-24 Thread Jean-Louis
Hello,

I have created a NT Service to run Tomcat 4.1.24 on Windows NT with this command :

%CATALINA_HOME%\tomcat.exe -install Tomcat-4.1.24
%JAVA_HOME%\jre\bin\hotspot\jvm.dll  -showversion -verbose:gc -Xmx200M -Xms64M -Xrs
-Djava.class.path=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar
-Dcatalina.base=%CATALINA_HOME%
-Dcatalina.home=%CATALINA_HOME%
-Djava.endorsed.dirs=%CATALINA_HOME%\bin;%CATALINA_HOME%\common\endorsed
-start org.apache.catalina.startup.BootstrapService -params start
-stop org.apache.catalina.startup.BootstrapService -params stop
-out %CATALINA_HOME%\logs\jvm.stdout.log
-err %CATALINA_HOME%\logs\jvm.stderr.log
-current %CATALINA_HOME%
-path c:\;d:\

JAVA_HOME is set to the JDK root directory
PATH=%JAVA_HOME%\bin;%PATH%

The service was correctly created and Tomcat works fine.

But the -showversion and the -verbose:gc options don't produce any
entry in the jvm.stdout.log or jvm.stderr.log log files.
I tried whith the Sun JDKs 1.3.0_02 and 1.3.1_08.

When I run Tomcat with %CATALINA_HOME%\bin\startup.bat with the same jvm options
(set on CATALINA_OPTS), the logs are ok.

With Tomcat 3.2.1 and jk_nt_service.exe there was no problem with these jvm options.

What's wrong ?

Thanks for any advice
Jean-Louis

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



FW: question

2003-07-24 Thread Vansant Kris
Question :
 
I've made a servlet and I can run it when I type the url :
http://server.mynetwork.be:8080 http://server.mynetwork.be:8080
The URL will automatically switch to
https://server.mynetwork.be:8443/index.html
https://server.mynetwork.be:8443/index.html , this is ok.
 
But if anyone types the URL  http://server.mynetwork.be:8443
http://server.mynetwork.be:8443 (so no secure html, but on the secured port
8443) 
than I get some strange things :
 
With Netscape I get a dialog : You have chosen to download a file of type:
application/octet-stream from  http://server.mynetwork.be:8443/
http://server.mynetwork.be:8443/,
   What shoul Netscape 6 do with
this file ? * Open Using    * Save to Disk 
 
With I.E. , the file opens immediately in the browser, displaying ' '.
The name of the file is always random.
 
How can I prevent this ?
Is there a way that if someone types  http://server.mynetwork.be:8443/
http://server.mynetwork.be:8443 this person will get redirected to
https://server.mynetwork.be:8443/index.html
https://server.mynetwork.be:8443/index.html  instead ?
 
 
Greetings,
 
Kris Vansant 
SIEMENS Atea 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
phone:   +32 14 253049 
mobile:  
Fax:   +32 14 22 29 94 

Mobile Solutions 
and Enabling Services
http://www.ic.siemens.be http://www.ic.siemens.be/eng/default_rd.shtm


The only thing more accurate than incoming enemy fire is incoming friendly
fire.

 


jk2/apache2 ignores apache virtual hosts

2003-07-24 Thread Baldur Norddahl
Hi,

We have a setup with multiple tomcat4 servers and a single apache2
acting as a front for them.

VirtualHost *:81
ServerName vacuum1.xentive.com:81
ServerAlias xentive.com
ServerAlias www.xentive.com
DocumentRoot /var/www/apache2-default/
Location /oplayer/
  JkUriSet worker ajp13:misc
/Location
Location /
  JkUriSet worker ajp13:smsc
/Location

ErrorLog /var/log/apache2/vacuum1-error.log
CustomLog /var/log/apache2/vacuum1-access.log combined
/VirtualHost

The above configuration directs http://vacuum1.xentive.com:81/oplayer/
to the 'misc' tomcat, while everything else goes to the 'smsc' tomcat.
This works as long we specify the least specific location tag last.

But when we add another virtual host:

VirtualHost *:81
ServerName admin.mobilegamez.com:81
DocumentRoot /var/www/apache2-default/
RewriteEngine on
RewriteLog /var/log/apache2/rewrite.log
Location /
  JkUriSet worker ajp13:misc
/Location

ErrorLog /var/log/apache2/vacuum1-error.log
CustomLog /var/log/apache2/vacuum1-access.log combined
/VirtualHost

Now everything goes to 'misc', even http://vacuum1.xentive.com:81/ which
before went to 'smsc'.

This effectively prevents us from deploying multiple applications in the
root context on different virtual hosts to different tomcat4 servers.

Is there a better way to do it (one that works)?

Baldur

-- 
Baldur Norddahl [EMAIL PROTECTED]


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



mod_rewrite and mod_jk

2003-07-24 Thread Aviv Eliezer
I've seen many posts on the subject, yet none helped me.
I've got a tomcat 4.1.24 webapp, connected via mod_jk to apache 2.0.46.
for some reason, mod_jk takes precedence over mod_rewrite, for all urls
mapped to mod_jk with JkMount directives.
 
I tried switching the order of the LoadModules (jk before rewrite and
vice versa), and tried moving around the mod_rewrite directives into the
virtual host / server config- but still, mod_rewrite works only for urls
which aren't mapped to mod_jk.
 
does anyone have any idea?
 
thanks,
ori.


Re: HOW TO INSTALL THE JDBC FOR TOMCAT

2003-07-24 Thread Zach Gatu
Don't forget to put the jdbc jar file in your
CATALINA_HOME/webapps/YOUR_CONTEXT/WEB-INF/lib directory.


epyonne wrote:

 Since you are using MySQL, you can download the Connector-J from MySQL site.
 It is the JDBC driver.
 
 Hope this helps.
 
 
 - Original Message -
 From: frankie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 22, 2003 02:49 AM
 Subject: HOW TO INSTALL THE JDBC FOR TOMCAT
 
 
 
Dear ALL,
   now i have setuped and intergated the apache and Tomat
successfully!Also,i have installed the J2SDK and mysql too.
now i want to install the JDBC but i cannot find the document that can
 
 teach
 
me how to do it!!Anyone can give me guideline of Install JDBC or some
 
 webite
 
for reference??

--
Frankie

Webmail


-
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 5.0.4 fails to serve form-login-error page properly

2003-07-24 Thread Oleg S. Estehin
Hi

I am porting my application from Tomcat 4.1.24 to Tomcat 5.0.4 (i.e. porting
from Servlets 2.3/JSP 1.2 to Servlets 2.4/JSP 2.0).

I have a servlet mapped to /auth that produces the page with login form.
Form based authentication is set with the following fragment of the
deployment descriptor:

login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/auth/form-login-page
form-error-page/auth?action=error/form-error-page
  /form-login-config
/login-config

When the servlet is called with ?action=error query string it displays
additional warning besides the login form.

It was working perfectly in Tomcat 4.1.24 but it works in Tomcat 5.0.4 only
in half:

When user tries to access protected page he is presented with login page. If
he enters valid login/password then he receives access to the resourse.

But if the user enters invalid login/password then instead of
form-error-page Tomcat displays HTTP Status 405 - HTTP method POST is not
supported by this URL error with URL http://myhost.here/j_security_check;.


I have tried to set up AccessLogValve and RequestDumpValve and to set debug
attribute on every element in servlet.xml and my context.xml (where
applicable) in order to try to understand what is going on inside Tomcat 5,
but no luck so far - request damp just shows that 1) there was request to
protected resourse 2) Tomcat returned form-login-page 3) user sent it back
with invalid login/password 4) Tomcat returned error 405.

I had expected that there should be output from Realm between 3) and 4) but
there is not.

So, at the moment the conclusion is that the code that worked perfectly in
Tomcat 4.1.24 doesn't work in Tomcat 5.0.4 and i don't know why but i would
be delighted if somebody will help me to find this out :)


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



Re: Problems with dir structure

2003-07-24 Thread bernd pier
hi,
you can put servlets in every dir you have create.it had to be this 
structure /webapps/WEB-INF/classes and there must be a web.xml file. 
look into the webapps/examples dir as a template.this question is often 
discussed in this list.

Lenandlar Singh schrieb:

Hello,

where do i put static html files and servlets so that the can be called in tomcat 4.1

-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
 



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


startup problems part 1

2003-07-24 Thread Bradley Haughn
I have a weird error.=20
I 'had' tomcat installed (4.1.24) and it was working fine. I had to =
uninstall my java versions though and reinstall the latest 1.3 version =
(1.3.1_08) for work. Thus tomcat wouldn't work. No worries. I = uninstalled
it to reinstall (it would find my new java) and I got some = interesting
startup errors.
 
Whenever I try and start up Tomcat I get :
 
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080 Starting
service Tomcat-Standalone Apache Tomcat/4.1.24
java.lang.reflect.InvocationTargetException: =
java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission
at =
org.apache.naming.resources.DirContextURLStreamHandler.openConnection(Dir=
ContextURLStreamHandler.java:135)
at java.net.URL.openConnection(URL.java:776)
at =
sun.net.www.protocol.jar.JarURLConnection.init(JarURLConnection.java:62=
)
at =
sun.net.www.protocol.jar.Handler.openConnection(Handler.java:22)
at java.net.URL.openConnection(URL.java:776)
at =
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:9=
03)
at =
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)=
 
at =
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at =
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.ja=
va:243)
at =
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSup=
port.java:166)
at =
org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)=
 
at =
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.jav=
a:821)
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.addChild(StandardHostDeploy=
er.java:700)
at java.lang.reflect.Method.invoke(Native Method)
at =
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:25=
2)
at =
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at =
org.apache.commons.digester.Digester.endElement(Digester.java:1064)
at = org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at =
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unkn=
own Source)
at =
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDisp=
atcher.dispatc(Unknown Source)
at =
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknow=
n Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown =
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown =
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown =
Source)
at =
org.apache.commons.digester.Digester.parse(Digester.java:1562)
at =
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploye=
r.java:385)
at =
org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
at =
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:=
442)
at =
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399)
at =
org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at =
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358=
)
at =
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSup=
port.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:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at =
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at =
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at =
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] Digester - -End event threw exception =
java.lang.reflect.InvocationTarge
tException
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080 [INFO]
ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009 [INFO] JkMain
- -Jk running ID=3D0 time=3D20/161  

startup problems part 2

2003-07-24 Thread Bradley Haughn
 
 
If I remove the admin.xml, I don't get these errors on startup, but the =
startup window hangs around and anytime I try and open a jsp I get = another
long list of errors, that are mostly the same. But just in case = they
aren't when opening http://localhost:8080/index.jsp
http://localhost:8080/index.jsp  http://localhost:8080/index.jsp
http://localhost:8080/index.jsp   they're:
 
HTTP Status 500 -=20
 
-=
---
 
type Exception report
 
message=20
 
description The server encountered an internal error () that prevented = it
from fulfilling this request.
 
exception=20
 
javax.servlet.ServletException: org/apache/naming/JndiPermission
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at =
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat=
ionFilterChain.java:247)
  at =
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte=
rChain.java:193)
  at =
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve=
.java:256)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
  at =
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
  at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at =
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve=
.java:191)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
  at =
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
  at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at =
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415=
)
  at =
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:=
180)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
  at =
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVal=
ve.java:171)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:641)
  at =
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:=
172)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:641)
  at =
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
  at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at =
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j=
ava:174)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
  at =
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
  at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at =
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
  at =
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594=
)
  at =
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(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:479)
 
 
root cause=20
 
java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission
  at =
org.apache.naming.resources.DirContextURLStreamHandler.openConnection(Dir=
ContextURLStreamHandler.java:135)
  at java.net.URL.openConnection(URL.java:776)
  at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:410)
  at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)
  at =
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.jav=
a:471)
  at =
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav=
a:190)
  at =
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at =
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat=
ionFilterChain.java:247)
  at =
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte=
rChain.java:193)
  at =
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve=
.java:256)
  at =
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
  at =

tomcat startup problem

2003-07-24 Thread Gayathrie Gunawardene
Hi,

I get the following message when I run startup command.  
Using CATALINA_BASE:   E:\TomCat4.1

Using CATALINA_HOME:   E:\TomCat4.1

Using CATALINA_TMPDIR: E:\TomCat4.1\temp

Using JAVA_HOME:   E:\jdk1.4

I see a tomcat window open and suddenly disappear. No matter how hard I tried to run, 
the result is the same all the time. I use tomcat4.1 and JDK1.4 on Windows 2000 adv. 
server platform.

Pls Help

GG

[EMAIL PROTECTED]



Re: Problem with Dir Structure...

2003-07-24 Thread bernd pier
hi,
i think this should be your servlet mapping:
   servlet-mapping
   servlet-nameShowParameters/servlet-name
   url-pattern/testapp/ShowParameters/url-pattern
   /servlet-mapping
and so far as i know you had to do in html
action='ShowParameters' method='.. and so on.
Lenandlar Singh wrote:

 

Hello,

I have the following directory structure for an application under 
Tomcat 4.1.

c:\Tomcat 4.1\webapps\testapp\postform.html 
c:\Tomcat 4.1\webapps\testapp\Web-inf\classes\ShowParameters.class
where testapp is my application directory.

How do i set the path for the Action attribute in postform.html?

My Action is action = /ShowParameters

Thanks.

Len.



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
   



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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
 



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


JDK Issue

2003-07-24 Thread Hari Om
I installed IBMJava2SDK on my IBM Power PC which has Red Hat Linux on it. I 
installed it under /usr/downloads/IBMJava2-ppc64-141 directory.

Later when I check the version by typing and executing java -version it 
shows Cannot find java

So I added the directory in PATH and CLASSPATH but then it give following 
error:
-
bash:/usr/downloads/IBMJava2-ppc64-141/jre/bin/java: No such file or 
directory
-

can anyone help me out on this?

_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


JDK Installation Problems

2003-07-24 Thread Hari Om
I have problems on installing JDK on Red Hat Linux 7.1 power PC.
I downloaded j2sdk-1_4_1_03-linux-i586-rpm.bin - Linux RPM in self 
extracting file and followed the insturctions on Installation page.

1) # chmod a+x j2sdk-1_4_1_03-linux-i586-rpm.bin
2) ./j2sdk-1_4_1_03-linux-i586-rpm.bin
...it prompts for License Accept yes or no on which after typing y I get 
following ERROR wonder why

Do you agree to the above license terms? [yes or no]
y
Unpacking...
Checksumming...
0
0
Extracting...
./j2sdk-1_4_1_03-linux-i586-rpm.bin: ./install.sfx.3299: cannot execute 
binary file
Done.


The above is supposed to create a RPM file which I could then use RPM 
command to installbut cannot pass throug the above process - wonder why

Any related information is appreciated

THANKS!

_
The new MSN 8: smart spam 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]


Creating a custom realm (I don't know how?)

2003-07-24 Thread Hung San
Hi there,

How do I create my own custom realm and plug it into
Tomcat for my web application?  I created CustomRealm
that implements Realm.  But when I added a realm
element in my context.xml and loaded up my
application, it complained that CustomRealm could not
be found (ClassNotFoundException).  

My CustomRealm class is in my app/WEB-INF/classes
directory so I'm sure (as far as my application is
concerned) that the class is in the proper classpath. 
I also placed the file in tomcat.home/common/lib but
the error still persists.

Any help would be appreciated.

By the way, I'm using Tomcat 4.1.24

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Tomcat 4.1.24 causes refresh problem ... 4.1.18 does not.

2003-07-24 Thread Zach Gatu
This is what I use to prevent caching and it has worked for me:

%
response.setHeader(Cache-Control,no-store); // HTTP 1.1
response.setHeader(Pragma,no-cache); // HTTP 1.0
response.setDateHeader (Expires, 0); // prevents caching at the proxy 
server
%

I think the first setting is more important as most browsers use HTTP 1.1

Mufaddal Khumri wrote:

Hi,

Added :

%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
The problem still persists.

This problem does not occur with tomcat 4.1.18, but occurs with tomcat 
4.1.24. IE , Netscape
and Safari work fine with 4.1.18. Safari does not work well with 4.1.24 
in regards to refresh.

Am using safari on mac os X with tomcat 4.1.24 ...

I have two .jsp files - LocationInformation.jsp and EditLocation.jsp

LocationInformation.jsp shows me the information of a location from the 
database.
EditLocation.jsp is used to edit the information for a location and 
saved to the database.

On the LocationInformation.jsp I have a link to EditLocation.jsp. When I 
edit the location
information by entering data in the form on EditLocation.jsp and then 
say submit, the data
gets entered in the database and I take the user to the 
LocationInformation.jsp where it shows
the updated information from the database. When I click the link to 
EditLocation.jsp on this page,
it takes me to EditLocation.jsp and the form on EditLocation.jsp shows 
me the old information. When
I click the refresh button in the browser the form shows me the updated 
data.

Does anybody know why or how to solve this problem ?

Thanks.

On Tuesday, July 22, 2003, at 11:28  AM, Bill Barker wrote:

Probably Safari doesn't read META tags.  You could try instead:
%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
Mufaddal Khumri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Well i have the following in all my jsp pages.

meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Pragma content=no-cache
meta http-equiv=Expires content=0
Am using safari on mac os X ... Lets say I have a location. I edit the
location and submit the form .. the new data is entered in the database
and the new data is also reflected on the location description page.
The information shown on this page is correct. I have a link to edit
this location on this location information page (.jsp) ... when the
location edit form appears .. it has the old data and when i click
refresh .. it shows me the new data i had entered. This behaviour only
occurs with Safari. IE and Navigator are working fine. Does anybody
know why ?
On Tuesday, July 22, 2003, at 04:06  AM, Tim Funk wrote:

Heh?

Automagic refresh can be done via a meta tag. (Google is your friend)

Page caching is also easy. Again - google is your friend. (cache jsp)

-Tim

Mufaddal Khumri wrote:

hi,
Is there a way to control the refreshing of html pages in tomcat ?
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]




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


Re: LifecycleListener Do not work

2003-07-24 Thread Zach Gatu
Have a look at this tech tip:

http://developer.java.sun.com/developer/EJTechTips/2003/tt0626.html#2

Adi Katz wrote:
Hello,

I implemented org.apache.catalina.LifecycleListener and registered it in server.xml in the following way:

Context path=/myapp ...
  ...
  Listener className=mypackage.MyListener/
  ...
/Context
Naturally mypackage.MyListener is in my webapp but it seems that when server.xml is being parsed on tomcat startup my listener class is not accessible from catalina side. and i get a classNotFound Exception.

I feel there is something very messy with the class loading going on in tomcat side.

Does anybody have an idea/examople how to implement a org.apache.catalina.LifecycleListener and to use it in server.xml ?

Thanks,
Adi




-
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: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian

2003-07-24 Thread Zach Gatu
You need to use the JDK not the JRE.  So if, for example, you downloaded 
the jdk 1.4.2 and unpacked it into /usr/java/j2sdk1.4.2, your JAVA_HOME 
entry should read JAVA_HOME=/usr/java/j2sdk1.4.2

Zach.

Christian Platzer wrote:

Hi there.
I have a problem while starting the Tomcat Server.
On my server runs a Debian woody system
I've installed the 4.1.24 tomcat with jdk 1.4.1_02.
Both are not the debian packages, but downloaded from the jakarta project and sun.
the JAVA_HOME variable is set to /usr/lib/j2se/j2re1.4.1, where locates the java
installation
the CATALINA_HOME variable is set to /usr/share/jakarta-tomcat.
When i try to start the tomcat server with the startup.sh script, the only output on
the shell is that the JAVA_HOME variable isn't set properly.
I don't know where's the problem.

Thanks a lot for helping me, and sorry for my poor english.

Christian

-
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: Help needed in configuring tomcat 4.1.24

2003-07-24 Thread Zach Gatu
Make sure the your Connector directive ends with / or /Connector, 
i.e. make sure that it's a valid xml tag.

Also take out !-- WEB_PORT -- from within Connector ... /

Restart Tomcat and see if you can shut it down without errors.

Zach.

Sarika Inamdar wrote:

Hi All,

We need to start tomcat with a user-defined port. To enable the same ,
in server.xml, we give the following 

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
!-- WEB_PORT --port=8080  
   minProcessors=5 maxProcessors=75

In our start script, we grep for WEB_PORT and replace the default port
value with a user-defined port.
With this modification, tomcat starts properly. But when I give
shutdown.sh command to stop tomcat , I get the following parse exception
:
bash-2.03# ./shutdown.sh 
Using CATALINA_BASE:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24
Using CATALINA_HOME:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24
Using CATALINA_TMPDIR:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24/temp
Using JAVA_HOME:   /export/spare/CSCOPerfE/tools/jdk
Jul 23, 2003 3:12:03 PM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 93 column 5: Element type Connector
must be followed by either attribute specifications,  or /.
org.xml.sax.SAXParseException: Element type Connector must be followed
by either attribute specifications,  or /.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkno
wn Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source)

Is there anyway we can avoid this exception ? Any help in this regard
would be useful.
Thanks in Advance,
Sarika






-
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]


startup error

2003-07-24 Thread Bradley Haughn
I found someone had posted the same error that I'm having but I'm having
trouble finding the answer. Heres what Yakov Belov had posted:
 
Dear All,
 
when I try to start up tomcat I receive the following exception:
 
Exception during startup processing
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError:

org/apache/naming/JndiPermission
at 
org.apache.naming.resources.DirContextURLStreamHandler.openConnection(DirCon
textURLStreamHandler.java:135)
at java.net.URL.openConnection(URL.java:781)
at
sun.net.www.protocol.jar.JarURLConnection.init(JarURLConnection.java:67)
at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:27)
at java.net.URL.openConnection(URL.java:781)
at 
org.apache.catalina.startup.ContextConfig.tldConfigJar(ContextConfig.java:10
91)
at
org.apache.catalina.startup.ContextConfig.tldConfig(ContextConfig.java:1042)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:828)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
224)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3334)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 
am I missing a jar file somewhere or something else is wrong?
 
Best Regards,
Yakov Belov
 
Hope someone has that answer on file somewhere for me.
 
Brad Haughn
 
If a tree falls in the woods and no one is around to see it and it lands
on a mime, does anybody care?
 


Re: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian

2003-07-24 Thread Zach Gatu
You need j2sdk1.4.2-linux-i586.bin not j2re1.4.2-linux-i586.bin.

Try also adding JAVA_HOME/bin to your PATH, if you haven't already.

Zach.

Christian Platzer wrote:
Nothing.
Always the same problem
I try to execute 'export JAVA_HOME', before catalina.sh or startup.sh, but always
the same problem.
A question.
The file for the java JDK, is it the j2re1.4.2-linux-i586.bin, or the
j2sdk1.4.2-linux-i586.bin?
The sun site isn't very clearly

BTW.
I i try to execute java -version, it gives me the right version (1.4.2)
Thanks
Christian
Chris Halstead ([EMAIL PROTECTED]) schrieb:

Having JAVA_HOME set and having it exported are two different things.
Just before calling catalina.sh, execute the command 'export JAVA_HOME'
and see if it helps...
-chris

On Wed, 2003-07-23 at 07:39, Christian Platzer wrote:

Hi chris.
Thanks for response...
Yes, if i try echo $JAVA_HOME it gives me the right path to the j2re1.4.2 directory.
I've installed the j2re1.4.2-linux-i586.bin file from sun.
Thanks

Christian

Chris Halstead ([EMAIL PROTECTED]) schrieb:

Are you sure you've exported JAVA_HOME?

-chris

On Wed, 2003-07-23 at 06:02, Christian Platzer wrote:

Hi there.
I have a problem while starting the Tomcat Server.
On my server runs a Debian woody system
I've installed the 4.1.24 tomcat with jdk 1.4.1_02.
Both are not the debian packages, but downloaded from the jakarta project and sun.
the JAVA_HOME variable is set to /usr/lib/j2se/j2re1.4.1, where locates the java
installation
the CATALINA_HOME variable is set to /usr/share/jakarta-tomcat.
When i try to start the tomcat server with the startup.sh script, the only
output on

the shell is that the JAVA_HOME variable isn't set properly.

I don't know where's the problem.

Thanks a lot for helping me, and sorry for my poor english.

Christian

-
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]


JDK for Linux on Power PC

2003-07-24 Thread Hari Om
where can I find JDK for Linux on Power PC

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


JDK Problems - libjava.so

2003-07-24 Thread Hari Om
I downloaded and installed j2sdk-1.3.1-02b-FCS-linux-ppc.bin from the 
penguinppc.org web site and followed the instructions. I was able to INSTALL 
under /usr/local and also changed my PATH variable.but later when I test 
my java version it gives following error - wonder why

#./java -version
Error: can't find libjava.so.


I am using IBM PowerPC (pseries) with Red Hat Linux 7.1

Any related information on this is appreciated.

THANKS!

HARI OM

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Creating a custom realm [I don't know how]

2003-07-24 Thread Hung San
Hi there,

How do I create my own custom realm and plug it into
Tomcat for my web application?  I created CustomRealm
that implements Realm.  But when I added a realm
element in my context.xml and loaded up my
application, it complained that CustomRealm could not
be found (ClassNotFoundException).  

My CustomRealm class is in my app/WEB-INF/classes
directory so I'm sure (as far as my application is
concerned) that the class is in the proper classpath. 
I also placed the file in tomcat.home/common/lib but
the error still persists.

Any help would be appreciated.

By the way, I'm using Tomcat 4.1.24

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



need Help

2003-07-24 Thread Prashant Kadam


I have installed tomcat 4.1.6
I have created Prashant folder under  webApps
My Folder structure is

webapps-
|_Prashant
|_Web-inf
 |_Classes-
 |_ web.xml |_myservlet
in server.xml. I  added
context path=/Prashant docBase=Prashant
debug=0 reloadable=true crossContext=true /
I could run JSP pages with URL http://localhost:8080/Prashant/myjsp.jsp;
but my servlets are not runnng.
To run this servlet I entered URLhttp://localhost:8080/Prashant/MyServlet;
I added following lines to web.xml files
servlet
servlet-nameMyServlet/servlet-name
servlet-classtestServlet/servlet-class
/servlet
servlet-mapping
servlet-nameMyServlet/servlet-name
url-pattern/MyServlet/url-pattern
/servlet-mapping
What should I do to run this servlet.

I my trying to use JDBC in JSP file, I added following lines to my 
servler.xml

context path=/Prashant docBase=Prashant
debug=0 reloadable=true crossContext=true 
NamingResources
Resource name=jdbc/conversion auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/conversion
parameter
nameusernane/name
valuesa/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namedriverClassName/name
valuesun.jdbc.odbc.JdbcOdbcDriver/value
/parameter
parameter
nameurl/name
valuejdbc:odbc:test/value
/parameter
/ResourceParams
/NamingResources
/context

in web.xml
Resource name=jdbc/conversion auth=Container
 type=javax.sql.DataSource/
But it throws Exception and gives message Name jdbc is not bound in this 
Context
following codes are written in JSP files

Context init = new InitialContext();
Context ctx = (Context) init.lookup(java:comp/env);
DataSource ds = (DataSource) ctx.lookup(jdbc/conversion);
Connection conn = ds.getConnection();
What else  should I do to run these applications successfuly

can anybody help me. My mail id is [EMAIL PROTECTED]

_
Travel plans? Click here. http://www.msn.co.in/Travel Sit back  relax!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IIS and isapi_redirect.dll

2003-07-24 Thread scolson
Wow, here's a topic that has been hashed and rehashed... unfortunately after countless 
hours of list archives and googling around, I haven't found an answer to why I can't 
get IIS to play nice with tomcat. Here's the skinny:

W2k server SP3 (5.00.2195)
IIS 5
Tomcat 4.1.24
j2sdk 1.4.2 installed

Tomcat runs fine as a standalone server on 8080. IIS runs fine as a standalone server 
on 80. Following the ever-referenced how-to's to the letter, I have successfully 
gotten IIS to not relay jsp's to tomcat with isapi_redirect.dll.

After checking the registery (and having coworkers check it too), it appears fine per 
the instructions. I've also followed up on the corrupted dll problem by using various 
computers to download various versions of the connector to no avail. Additionally, the 
system was rebooted.

The error in Component Services is the typical The data is the error and in the data 
box, I have
: 02 00 00 00

References for file and reg structure are below. Any help would be greatly appriciated!

-s

###
Tomcat dir layout:
C:\Tomcat4 contains \isapi\isapi_redirect.dll \logs and \conf
\conf\ contains uriworkermap.properties and workers.properties

Reg layout:
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Group\Jakarta Isapi Redirector\1.0]
(Default)=c:\Tomcat4\isapi\isapi_redirect.dll
extension_uri=/jakarta/isapi_redirect.dll
log_file=c:\Tomcat4\logs\jk_iis.log
log_level=debug
worker_file=c:\Tomcat4\conf\workers.properties
worker_mount_file=c:\Tomcat4\conf\uriworkermap.properties

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters]
..
Filter DLLs=C:\Tomcat4\isapi\isapi_redirect.dll
..

IIS layout:
site root= C:\Inetpub\wwwroot
vdir /jakarta = C:\Tomcat4\isapi and has read and execute set.

Permissions:
The connector, workers.properties, and uriworkermap.properties have modify, read  
execute, read, and write set for the everyone group.

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



IIS and the isapi_redirect.dll

2003-07-24 Thread scolson
Sorry if this was posted twice, my email client was not behaving.  
 

Well, here's a topic that has been hashed and rehashed before on this list... 
unfortunately after countless hours of reading the archives and googling around, I 
haven't found an answer as to why IIS won't play nice with Tomcat. Here's the skinny:

W2k sp3 (5.00.2195)
IIS 5
Tomcat 4.1.24
j2sdk 1.4.2 installed
isapi_redirect.dll 1.2.4

I have checked the registery settings as well as had coworkers check them multiple 
times. I have also followed up on the possibility of the corrupted DLL by downloading 
different versions of the connector on to different servers on my network to no avail. 
Multiple restarts have also ensued. The error that is being logged in Component 
Services is your basic The data is the error and the data section of the error 
window reads:
: 02 00 00 00   

If anyone has any other possibilities, or has fixed this problem before, any help 
would be greatly appriciated. For those that are interested, the details on the 
enviornment are below. Thanks in advance!

-s



Tomcat install:
C:\Tomcat4
\isapi\isapi_redirect.dll
\conf\uriworkermap.properties
  workers.properties
\logs

Registery:
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Group\Jakarta Isapi Redirector\1.0]
extension_uri=/jakarta/isapi_redirect.dll
worker_file=c:\Tomcat4\conf\workers.properties
worker_mount_file=c:\Tomcat4\conf\uriworkermap.properties
log_file=c:\Tomcat4\logs\jk_iis.log
log_level=debug
@=c:\Tomcat4\isapi\isapi_redirect.dll

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters]
..
Filter DLLs=C:\Tomcat4\isapi\isapi_redirect.dll
..

IIS:
site root=C:\Inetpub\wwwroot
vdir jakarta=C:\Tomcat4\isapi with read and execute set

Permissions:
All .properties files, the isapi_redirect.dll, and the folders that house them have 
modify, read  execute, read, write enabled for the everyone group.

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



RE: TOMCAT problem

2003-07-24 Thread dr.ahab
haifeng,

to ask a couple of stupid questions... have you reloaded your webapp or
restarted tomcat after your changes? was the original version of the webapp
deployed through a .war file and same is still in catalina_homewebapps/ ?
if so, remove that and reload your app once more.

jan

 -Original Message-
 From: Liu Haifeng [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 8:12 AM
 To: Anandkumar Ayyachamy
 Cc: [EMAIL PROTECTED]
 Subject: Re: TOMCAT problem


 Thanks Anand, but I do have deleted the files under the directory
 tomcat/work/localhost_myapp/.  Also I have cleared the cache of
 my browser.
 It does not work.  Just wondering where the old copies of the classes are
 stored in the Tomcat server.

 Regards
 Haifeng
 - Original Message -
 From: Anandkumar Ayyachamy [EMAIL PROTECTED]
 To: Liu Haifeng [EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 2:15 PM
 Subject: Re: TOMCAT problem


  I face this problem with the jsp as there is always a copy of the
  compiled jsp in the
  work folder under tomcat. I am not sure about the classes though. Try to
  delete the myapp
  folder in tomcat/work/Standalone/localhost. or anywhere under work. Hope
  this helps.
  Cheers,
  Anand
 
  Liu Haifeng wrote:
 
  Hi,
  
  I am not sure if this is the right place for me to ask the question.
 Just
  hope to get some clues.  I am implementing a JSP web application  under
  linux and Tomcat.  After the application has successfully run for a
 period,
  I made some changes on the source codes of the application, and
  compiled them.  Then restarted Tomcat.  However, I am always
 getting the
  results related to the old version codes that no longer exist in the
 server.
  So anybody can help here?  Thanks.   (the codes are located under
  Tomcat/webapps/myapp/WEB-INF/classes.)
  
  Regards
  Haifeng
  
  
  
  
 
 


 --
 MySQL Java Mailing List
 For list archives: http://lists.mysql.com/java
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



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



[Q] Form-based authentication with DatasourceRealm

2003-07-24 Thread Riaan Oberholzer
Hi,

I'm trying to use Realms for the first time. The
documentation of Tomcat is pretty straight foward and
everything is clear (and surprisingly simple), except
how I must name the action=??? paramaters for my
form in which the authentication is done.

The Tomcat example is:
form method=POST action='%=
response.encodeURL(j_security_check) %' 

for a MemoryRealm

Is this standard for all Realms and can/should I use
it as is, or how does it look for a Datasource Realm?

Thanks!


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian

2003-07-24 Thread Vansant Kris
Hello,

How the h*ll do I unsubscribe from this list ?
I already sended 5 mails to [EMAIL PROTECTED] but
I keep receiving a mail every 30 secs !!



-Original Message-
From: Zach Gatu [mailto:[EMAIL PROTECTED]
Sent: woensdag 23 juli 2003 12:16
To: Tomcat Users List
Subject: Re: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian


You need to use the JDK not the JRE.  So if, for example, you downloaded 
the jdk 1.4.2 and unpacked it into /usr/java/j2sdk1.4.2, your JAVA_HOME 
entry should read JAVA_HOME=/usr/java/j2sdk1.4.2

Zach.

Christian Platzer wrote:

 Hi there.
 I have a problem while starting the Tomcat Server.
 On my server runs a Debian woody system
 I've installed the 4.1.24 tomcat with jdk 1.4.1_02.
 Both are not the debian packages, but downloaded from the jakarta project
and sun.
 the JAVA_HOME variable is set to /usr/lib/j2se/j2re1.4.1, where locates
the java
 installation
 the CATALINA_HOME variable is set to /usr/share/jakarta-tomcat.
 When i try to start the tomcat server with the startup.sh script, the only
output on
 the shell is that the JAVA_HOME variable isn't set properly.
 
 I don't know where's the problem.
 
 Thanks a lot for helping me, and sorry for my poor english.
 
 Christian
 
 
 -
 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: JDK Issue

2003-07-24 Thread Kris Wolff







what says whereis java and find / -name java ???


Kris

Am 22 Jul 2003 um 20:12 hat Hari Om geschrieben:

 I installed IBMJava2SDK on my IBM Power PC which has Red Hat Linux on it. I 
 installed it under /usr/downloads/IBMJava2-ppc64-141 directory.
 
 Later when I check the version by typing and executing java -version it 
 shows Cannot find java
 
 So I added the directory in PATH and CLASSPATH but then it give following 
 error:
 -
 bash:/usr/downloads/IBMJava2-ppc64-141/jre/bin/java: No such file or 
 directory
 -
 
 can anyone help me out on this?
 
 _
 Add photos to your messages with MSN 8. Get 2 months FREE*.  
 http://join.msn.com/?page=features/featuredemail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Kris Wolff
Application Developer
dietzk. Interactive OHG
Am Kirchplatz 41-43
D-65779 Kelkheim
Fon +49 (0) 6195 72 42- 15
Fax +49 (0) 6195 72 42- 29
[EMAIL PROTECTED]
http://www.dietzk.de


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



RE: Creating a custom realm (I don't know how?)

2003-07-24 Thread Andrew Liles
There are some tricky issues due to do with scope of classes that Tomcat
needs to see (to operate your Realm for you) and what normal web
applications can see (they normally don't need to see the internals of the
Servlet/JSP implementation).  It is described here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
but if you are looking for a quick fix 

1) and your Realm DOES NOT need to interact with classes in the application
space then just move your custom realm class into  tomcat/server/classes (or
../lib)

2) and you Realm DOES require interaction with classes in the application
space then here is a really ugly and security-prone issue (security of rogue
apps that is).  
   Move all jars from tomcat/server/lib to tomcat/common/lib
   Move any jars of yours to tomcat/common/lib or classes to
tomcat/common/classes

Andrew.

 -Original Message-
 From: Hung San [mailto:[EMAIL PROTECTED]
 Sent: 23 July 2003 02:01
 To: [EMAIL PROTECTED]
 Subject: Creating a custom realm (I don't know how?)
 
 
 Hi there,
 
 How do I create my own custom realm and plug it into
 Tomcat for my web application?  I created CustomRealm
 that implements Realm.  But when I added a realm
 element in my context.xml and loaded up my
 application, it complained that CustomRealm could not
 be found (ClassNotFoundException).  
 
 My CustomRealm class is in my app/WEB-INF/classes
 directory so I'm sure (as far as my application is
 concerned) that the class is in the proper classpath. 
 I also placed the file in tomcat.home/common/lib but
 the error still persists.
 
 Any help would be appreciated.
 
 By the way, I'm using Tomcat 4.1.24
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 This e-mail has been scanned for viruses by MessageLabs.
 

_
This e-mail has been scanned for viruses by MessageLabs.

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



RE: tomcat startup problem - tomcat window disappears

2003-07-24 Thread Andrew Liles
Edit 
tomcat/bin/startup.bat

in one of the last lines change the keyword start to run.  Then go into
a DOS box and run startup.bat.  This time any faults will remain on the
screen and you can start debugging from there.

 -Original Message-
 From: Gayathrie Gunawardene [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2003 19:15
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; 
 [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: tomcat startup problem
 
 
 Hi,
 
 I get the following message when I run startup command.  
 Using CATALINA_BASE:   E:\TomCat4.1
 
 Using CATALINA_HOME:   E:\TomCat4.1
 
 Using CATALINA_TMPDIR: E:\TomCat4.1\temp
 
 Using JAVA_HOME:   E:\jdk1.4
 
 I see a tomcat window open and suddenly disappear. No matter 
 how hard I tried to run, the result is the same all the time. 
 I use tomcat4.1 and JDK1.4 on Windows 2000 adv. server platform.
 
 Pls Help
 
 GG
 
 [EMAIL PROTECTED]
 
 
 
 _
 This e-mail has been scanned for viruses by MessageLabs.
 

_
This e-mail has been scanned for viruses by MessageLabs.

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



Re: Tomcat deployment problem: Exception processing TLD--SOLVED

2003-07-24 Thread Aurele Venet
I am putting this in case some one refers to it in the future...

I found the error by scanning old archives, basically the web.xml file 
in the module that was deployed contained references to tag-libs even 
though they were not used.  This is because the developer of that 
perticular moduled used a we.xml example file that he picked in a 
tutorial which has a lot of extra tag declarations.



Aurele Venet wrote:

Hola,

we've just upgrade our tomcat server from 4.0.3 to 4.1.24 and after a 
few teething problems which I managed to fix, I am left with one app 
that refused to start up.  This webapp worked fine in the previous 
installation.  Here is the log error message I get, can any one be so 
kind as to suggest some fix?

--log of error message--

2003-07-23 09:50:35 ContextConfig[/report] Exception processing TLD at 
resource path /WEB-INF/jsp/example-taglib.tld
javax.servlet.ServletException: Exception processing TLD at resource 
path /WEB-INF/jsp/example-taglib.tld
   at 
org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java:1010) 

   at 
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870)

---

I am a bit perplexed because there is no such dir as /WEB-INF/jsp/ in 
the app, and furthermore, this does not appear to be using any tag 
libraries.

many thanks for any help

Vrata





--
V
. . . . . . . . . 
tel:+34.918.131.331



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


RE: [Q] Form-based authentication with DatasourceRealm

2003-07-24 Thread Andrew Liles
This is a three part problem.

First you have a process that does the challenging of access.  In the case
of Form Based Authentication this means 
redirecting the user to a login page.

Second you have a scheme to take the credentials the user provides and
validate them.  This is the job of the realm.  You should simply need to
replace the Realm element in Server.xml that currently refers to your
MemoryRealm and put in place the 
Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/
element which is provided in the default server.xml (but commented out).  

Next this Realm is dependent on the 3rd part of the equation - the
UserDatabase resource.

This may be of some use:
http://www.servlets.com/jservlet2/examples/ch08/index.html

 -Original Message-
 From: Riaan Oberholzer [mailto:[EMAIL PROTECTED]
 Sent: 24 July 2003 09:51
 To: [EMAIL PROTECTED]
 Subject: [Q] Form-based authentication with DatasourceRealm
 
 
 Hi,
 
 I'm trying to use Realms for the first time. The
 documentation of Tomcat is pretty straight foward and
 everything is clear (and surprisingly simple), except
 how I must name the action=??? paramaters for my
 form in which the authentication is done.
 
 The Tomcat example is:
 form method=POST action='%=
 response.encodeURL(j_security_check) %' 
 
 for a MemoryRealm
 
 Is this standard for all Realms and can/should I use
 it as is, or how does it look for a Datasource Realm?
 
 Thanks!
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 This e-mail has been scanned for viruses by MessageLabs.
 

_
This e-mail has been scanned for viruses by MessageLabs.

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



[Q] Extending a Realm

2003-07-24 Thread Riaan Oberholzer
Is it possible to extend the standard Realms, or do
you have to re-do it from scratch by implementing the
interface again?

I want everything the Datasource Realm provides,
except when the authentication succeeds, I want to
update the user db table to indicate the date/time
this occurred.

Can it be done?   

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Session persistance after server restart: a bug?

2003-07-24 Thread Aurele Venet
Hello,

I am having a strange effect with my tomcat server.  My web app sends a 
session cookie (JSESSIONID) to the browser for session tracking.  This 
keeps a boolean flag to say wether or not a user is logged in.  I find 
that when I stop and restart the server, the cookie is sent back from 
the browser to the server, and the session id is recognised as a a valid 
ongoing session.  I then find that the boolean flag is true and I am not 
presented with the login form.  Has anyone had a similar experience? 

At first I thought it must be due to some error in my code, however, i 
have monitored the http exchanges as well as  before any session 
variable settings (ie when the first servlet is accessed (2 simple html 
static files are accessed before where frames are set, and the servlet 
is invoked) I print the values that are currently in the session, and I 
find that indeed the session id given to the new session is exactly the 
same as the previous one, recorded in the cookie, and that the boolean 
flag is already set!

Any ideas why this is?

My env:

tomcat: 4.1.24 (also tested on 4.0.3 with same results)
browser: mozilla 1.4
OS: Sun Solaris 2.8
thanks

vrta

--
V
. . . . . . . . . 
tel:+34.918.131.331



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


RE: tomcat connection/port problem

2003-07-24 Thread Ralph Einfeldt
What makes you so shure that you have a port problem ?
I think that you are searching in the wrong direction.

As I understand the log message mod_jk complains about
not getting an answer from tomcat after it successfully
sent a request to tomcat. At this point I cann't imagine 
a port problem (with that the request would have failed,
not the response)

This can have several causes:
- tomcat is down (e.g. jvm crash)
- the thread is not responding at all (deadlock)
- the thread is not responding quick enough (it take to long to create the response)
- ...

 -Original Message-
 From: Astrid Wagner [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 9:25 AM
 To: [EMAIL PROTECTED]
 Subject: tomcat connection/port problem
 
 
 [Thu Jul 24 09:01:26 2003]  [jk_ajp_common.c (642)]: sending 
 to ajp13 #79
 [Thu Jul 24 09:01:27 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
 receive the response message from tomcat, network problems or tomcat is down.
 ...
 

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



To PEM or not to PEM in OpenSSL ???

2003-07-24 Thread achana
Hi. My quixotic tilt at mod_ssl continues...
I am into my second book on this subject matter. Okay, let's put that in
that too-hard basket for the moment.
Let's make OpenSSL work first. It does.
It asks me whether I want to DER or PEM. I take PEM.
Then it tells me not enough random data. So I did this:
# openssl -rand  -des3 -out server.key 1024
That skipped the PEM bit, BUT how do I get it to challenge with a pass
phrase dialogue ?
Do all of you use PEM ?

Regards,
Discombobulated...
Perplexed in search of perspicacity is the first sign of neurosis.

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



RE: JDK Problems - libjava.so

2003-07-24 Thread reitinger franz
This is not really a jdk-problem - it is more or less a natter of
configuration.
Like other Unix-systems Linux uses shared libs and an environment variable
(LD_LIBRARY_PATH) informs the system about the pathes for the shared libs.

Therefore you only have to modify your LD_LIBRARY_PATH environment variable
by adding the path of the libjava.so-file.

franzR



-Original Message-
From: Hari Om [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 5:50 PM
To: [EMAIL PROTECTED]
Subject: JDK Problems - libjava.so



I downloaded and installed j2sdk-1.3.1-02b-FCS-linux-ppc.bin from the
penguinppc.org web site and followed the instructions. I was able to INSTALL
under /usr/local and also changed my PATH variable.but later when I test
my java version it gives following error - wonder why

#./java -version
Error: can't find libjava.so.


I am using IBM PowerPC (pseries) with Red Hat Linux 7.1

Any related information on this is appreciated.

THANKS!

HARI OM

_
STOP MORE SPAM with the new MSN 8 and get 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]



Re: mod_jk2 with jni+pcre, what for?

2003-07-24 Thread Nicolas
Hi

I'm trying different setups of mod_jk2 for our JSP
application with Apache 2.0 acting as frontend.
 

With the help of apachewiki and Simon Pabst I've
succesfuly setup Tomcat 4.1.24 with Apache 2.0.47,
running Sun JDK 1.4.1 with mod_jk2 2.0.2 (jni and pcre
enabled), using Unix sockets (not TCP). Obviously
Tomcat is running on the same machine as Apache...
 

did that too

My question is: Why would I like to use this setup
instead of the easier TCP/IP method? Would jni+Unix
Sockets be faster?
yes

What does the Perl Regular Expressions do in all this thing

i guess this is neccessary if you want to use them with uri directives.

what really would be interessting to know what benefits using
channel sockets discribed here:
http://www.cymulacrum.net/tomcat/channel_sockets.html
or APR sockets or JNI Channel listed on this page
http://www.cymulacrum.net/tomcat/tomcat_mod_jk2.html
regards nicolas

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


Re: Session persistance after server restart: a bug?

2003-07-24 Thread Jon Wingfield
Not a bug. Standard behaviour. Chack out the Manager element in the 
server.xml

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

If you haven't got a Manager explicitly added in the server.xml a 
default is used (stores serialized sessions in a file SESSIONS.ser under 
the work directory. If you don't fancy changing the server.xml you can 
delete all SESSIONS.ser under work before you start tomcat)

Aurele Venet wrote:
Hello,

I am having a strange effect with my tomcat server.  My web app sends a 
session cookie (JSESSIONID) to the browser for session tracking.  This 
keeps a boolean flag to say wether or not a user is logged in.  I find 
that when I stop and restart the server, the cookie is sent back from 
the browser to the server, and the session id is recognised as a a valid 
ongoing session.  I then find that the boolean flag is true and I am not 
presented with the login form.  Has anyone had a similar experience?
At first I thought it must be due to some error in my code, however, i 
have monitored the http exchanges as well as  before any session 
variable settings (ie when the first servlet is accessed (2 simple html 
static files are accessed before where frames are set, and the servlet 
is invoked) I print the values that are currently in the session, and I 
find that indeed the session id given to the new session is exactly the 
same as the previous one, recorded in the cookie, and that the boolean 
flag is already set!

Any ideas why this is?

My env:

tomcat: 4.1.24 (also tested on 4.0.3 with same results)
browser: mozilla 1.4
OS: Sun Solaris 2.8
thanks

vrta





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


Get rid of socket write error

2003-07-24 Thread Feltesse Julien
Hi,


We're using Tomcat 4.1.18.
Our problem is that when a client hits the stop button in his browser,
or double-click links, we can see in the logs :

StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw
exception
org.apache.jasper.JasperException: Connection reset by peer: socket
write error
[...]
- Root Cause -
java.net.SocketException: Connection reset by peer: socket write error

This is somehow logical, but may anyone know how to 'tell' Tomcat :
When you trap such an error don't display it (or partially display it)
in the logs.

In fact, in the company where the app runs the clients often hit twice
links because of slow response times. As a result, at the end of the day
the logs' size is HUGE compared to what it should be, because 2/3 of the
logs are filled with the long long long stack trace of the socket write
error...

Thanks in advance.


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



Re: tomcat connection/port problem

2003-07-24 Thread Astrid Wagner
Yes you are rigth.  The resource property was not found in
in the resource file that's why it crashed. I simply thought
I would get some java error (and not only that tomcat was shut down)
that would have made it easier for me to debug.
Sorry for the confusion.
Astrid
Ralph Einfeldt wrote:

What makes you so shure that you have a port problem ?
I think that you are searching in the wrong direction.
As I understand the log message mod_jk complains about
not getting an answer from tomcat after it successfully
sent a request to tomcat. At this point I cann't imagine 
a port problem (with that the request would have failed,
not the response)

This can have several causes:
- tomcat is down (e.g. jvm crash)
- the thread is not responding at all (deadlock)
- the thread is not responding quick enough (it take to long to create the response)
- ...
 

-Original Message-
From: Astrid Wagner [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: tomcat connection/port problem
[Thu Jul 24 09:01:26 2003]  [jk_ajp_common.c (642)]: sending 
to ajp13 #79
[Thu Jul 24 09:01:27 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from tomcat, network problems or tomcat is down.
...

   

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




AW: tomcat startup problem - tomcat window disappears

2003-07-24 Thread Fischer, Ilona
Alternative:
open a cmd-line
go to your Tomcat-Installation-Path ( E:\TomCat4.1)
change to bin ( E:\TomCat4.1\bin)
call catalina.bat run

:o)
Ilona


-Ursprüngliche Nachricht-
Von: Andrew Liles [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 24. Juli 2003 11:05
An: 'Tomcat Users List'
Betreff: RE: tomcat startup problem - tomcat window disappears


Edit 
tomcat/bin/startup.bat

in one of the last lines change the keyword start to run. 
 Then go into
a DOS box and run startup.bat.  This time any faults will 
remain on the
screen and you can start debugging from there.

 -Original Message-
 From: Gayathrie Gunawardene [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2003 19:15
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; 
 [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: tomcat startup problem
 
 
 Hi,
 
 I get the following message when I run startup command.  
 Using CATALINA_BASE:   E:\TomCat4.1
 
 Using CATALINA_HOME:   E:\TomCat4.1
 
 Using CATALINA_TMPDIR: E:\TomCat4.1\temp
 
 Using JAVA_HOME:   E:\jdk1.4
 
 I see a tomcat window open and suddenly disappear. No matter 
 how hard I tried to run, the result is the same all the time. 
 I use tomcat4.1 and JDK1.4 on Windows 2000 adv. server platform.
 
 Pls Help
 
 GG
 
 [EMAIL PROTECTED]
 
 
 
 
_
 This e-mail has been scanned for viruses by MessageLabs.
 

_
This e-mail has been scanned for viruses by MessageLabs.

-
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: To PEM or not to PEM in OpenSSL ???

2003-07-24 Thread Simon Pabst
1. Generate a private key:
openssl genrsa -des3 -out privkey.pem 2048
(this should prompt you for a 
passphrase)http://www.openssl.org/docs/HOWTO/keys.txt

2. a) Generate a self-signed test certificate:
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
2. b) If you want to use a Trust-Center signed SSL certificate,
you need to create a certificate signing request (CSR) and submit it to a 
Certificate Authority (CA):
openssl req -new -key privkey.pem -out cert.csr

http://www.openssl.org/docs/HOWTO/certificates.txt

Some Certificate Authorities:
http://www.verisign.com/
http://www.thawte.com/
http://www.instantssl.com/


At 17:27 24.07.2003 +1000, you wrote:
Hi. My quixotic tilt at mod_ssl continues...
I am into my second book on this subject matter. Okay, let's put that in
that too-hard basket for the moment.
Let's make OpenSSL work first. It does.
It asks me whether I want to DER or PEM. I take PEM.
Then it tells me not enough random data. So I did this:
# openssl -rand  -des3 -out server.key 1024
That skipped the PEM bit, BUT how do I get it to challenge with a pass
phrase dialogue ?
Do all of you use PEM ?
Regards,
Discombobulated...
Perplexed in search of perspicacity is the first sign of neurosis.
-
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]


how to change this example JSP and servlet?

2003-07-24 Thread tommy stone
Hi..  I have a example JSP javamail page..  the sendmail.jsp (see below for the full 
syntax), it prompt us to input 1)From which email 2)To which email 3)Subject 4) Content
 
But now, I want to fix , it can only send to my email   [EMAIL PROTECTED], how do I 
fix it?? See below, the point to SendMailServlet and the parameter is mailto.  It 
will pass the mailto to the SendMailServlet?  Where can I fix it to make to send 
only to [EMAIL PROTECTED]  Should I change the SendMailServlet?  But how do I change 
the SendMailServlet? I can't even see the content!!  Please teach me!!
 
form method=POST action=../../SendMailServlet

input type=text name=mailto size=60

---Content of the Javamail JSP  
--sendmail.jsp-
html
head
titleExample Mail Sending Form/title
/head
body bgcolor=white
pThis page will send an electronic mail message via the
codejavax.mail.Session/code resource factory that is configured into
the JNDI context for this web application.  Before it can be used
successfully, you must take note of the following:/p
ul
liThe default configuration assumes that there is an SMTP server running
on stronglocalhost/strong.  If this is not the case, edit your
codeconf/server.xml/code file and change the value for the
codemail.smtp.host/code parameter to the name of a host that provides
SMTP service for your network./li
liThe application logic assumes that no user authentication is required
by your SMTP server before accepting mail messages to be sent./li
liAll of the fields below are required./li
/ul
form method=POST action=../../SendMailServlet
table
  tr
th align=center colspan=2
  Enter The Email Message To Be Sent
/th
  /tr
  tr
th align=rightFrom:/th
td align=left
  input type=text name=mailfrom size=60
/td
  /tr
  tr
th align=rightTo:/th
td align=left
  input type=text name=mailto size=60
/td
  /tr
  tr
th align=rightSubject:/th
td align=left
  input type=text name=mailsubject size=60
/td
  /tr
  tr
td colspan=2
  textarea name=mailcontent rows=10 cols=80
  /textarea
/td 
  /tr
  tr
td align=right
  input type=submit value=Send
/td
td align=left
  input type=reset value=Reset
/td
  /tr
/table
/form
/body
/html



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

RE: War files don't work

2003-07-24 Thread EPugh
I'm joining this thread late, but I posted a couple weeks ago the same
problem..  I am running JDK1.4.2 and Tomcat 4.1.24.  If I have a context
specified in server.xml, then the war file DOESN'T unpack.  If I don't have
a context specified, then it DOES unpack.

Setting the docBase to fortius.war versus fortius doesn't seem to matter
at all.   

I am building my war file using Maven..  could that be the problem?

Eric Pugh 

-Original Message-
From: Rick Roberts
To: Tomcat Users List
Sent: 7/23/03 3:26 PM
Subject: Re: War files don't work

Making docBase = nsfs.war vice nsfs works!! :)

However; the war file is not being unpacked.

It seems that unpackWARs=true works the same as unpackWARs=false

Thanks,

Rick

John Turner wrote:
 
  From the docs for Context:
 
 The Document Base (also known as the Context Root) directory for this

 web application, or the pathname to the web application archive file
(if 
 this web application is being executed directly from the WAR file).
You 
 may specify an absolute pathname for this directory or WAR file, or a 
 pathname that is relative to the appBase directory of the owning
Host.
 
 Thus, if you're going to put a Context entry in server.xml for nsfs,

 make the docBase nsfs.war, not nsfs.
 
 Further:
 

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat
ic%20Application%20Deployment 
 
 
 John
 
 Rick Roberts wrote:
 
 Does the nsfs.war file go into webapps directory or into webapps/nsfs

 directory?
 Currently, the webapps/nsfs dir does not exist.  There is only the 
 nsfs.war file setting in the webapps directory.  I am assuming that 
 Tomcat will create the webapps/nsfs directory for me when it expands 
 the war file.

 I have temporarily set permissions to 777 on the webapps directory
and 
 it still does not expand, nor try to use, the war file.


 Rick

 John Turner wrote:


 You've told Tomcat the docBase is nsfs.

 Tomcat thusly looks for a directory called nsfs in the Host's
appBase.

 If it finds it, and unpackWars is true, it will unpack your WAR file

 into that directory (webapps/nsfs, NOT webapps).  Thus, Tomcat needs

 r+w on webapps/nsfs.

 Does Tomcat have r+w on webapps/nsfs?

 Alternatively, make unpackWars false.

 John

 Rick Roberts wrote:

 My directory permissions are as follows:

 drwxrwx---7 root tomcat4  4096 Jul 23 12:17 webapps

 ps -ef shows me this, which is think is Tomcat, which is run by
user 
 tomcat4:

 tomcat4   6199 1  0 12:17 pts/200:00:36 
 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath 
 /usr/java/jdk1.4/lib/tools.jar:/var

 Thanks,

 Rick

 Shapira, Yoav wrote:

 Howdy,


 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start
failed:
 java.lang.IllegalArgumentException: Document base
 /var/tomcat4/webapps/nsfs does not exist or is not a
 readable directory





 Well explain it to me! :)

 There is a /var/tomcat4/webapps/nsfs.war file.

 There should not be a /var/tomcat4/webapps/nsfs directory.






 If you have unpackWARS=true tomcat will try to explode your war
into
 the directory specified as the docBase, which is nsfs under 
 webapps.  If
 it can't create this directory or read/write into it, you get the 
 above
 error.  Check file permissions on webapps.

 Yoav Shapira

-- 
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


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


Re: Where is mod_jk2?

2003-07-24 Thread Simon Pabst
Latest (source) releases with mod_jk2 (from oldest to newest) :
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.24/src/jakarta-tomcat-connectors-4.1.24-src.tar.gz
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/release/v1.1M1/
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.26-alpha/src/jakarta-tomcat-connectors-4.1.26-src.tar.gz
Latest binary releases:
Linux i386: 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1/bin/linux/i386/
Win32: 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/bin/win32/
Redhat 7.2: http://www.johnturner.com/howto/mod_jk2/rh72-2.0.2-mod_jk2.so

The various guides have also often links to them:
http://jakarta.apache.org/tomcat/faq/connectors.html
I agree its a shambles though :-)

At 21:10 23.07.2003 -0700, you wrote:
Maybe I overlooked something, but I cannot find a link
to download mod_jk2 (or coyote) for Apache 1.3.27 to
talk with Tomcat at the jk2 website
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html).
 Does anyone know where the link to download mod_jk2
is?  I find it incredible that there is no link to
download jk2 at the jk2 website.  There is only a link
for mod_jk.
TIA.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
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: War files don't work

2003-07-24 Thread Bodycombe, Andrew
You need to make sure that you delete the webapps/nsfs directory before
starting tomcat, or tomcat won't unpack the .war file. Place the .war file
directly in the webapps directory.


From: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html

Copy the web application archive file into directory
$CATALINA_HOME/webapps/. When Tomcat is started, it will automatically
expand the web application archive file into its unpacked form, and execute
the application that way. This approach would typically be used to install
an additional application, provided by a third party vendor or by your
internal development staff, into an existing Tomcat installation. NOTE - If
you use this approach, and wish to update your application later, you must
both replace the web application archive file AND delete the expanded
directory that Tomcat created, and then restart Tomcat, in order to reflect
your changes. 

-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED] 
Sent: 23 July 2003 20:27
To: Tomcat Users List
Subject: Re: War files don't work


Making docBase = nsfs.war vice nsfs works!! :)

However; the war file is not being unpacked.

It seems that unpackWARs=true works the same as unpackWARs=false

Thanks,

Rick

John Turner wrote:
 
  From the docs for Context:
 
 The Document Base (also known as the Context Root) directory for this 
 web application, or the pathname to the web application archive file (if 
 this web application is being executed directly from the WAR file). You 
 may specify an absolute pathname for this directory or WAR file, or a 
 pathname that is relative to the appBase directory of the owning Host.
 
 Thus, if you're going to put a Context entry in server.xml for nsfs, 
 make the docBase nsfs.war, not nsfs.
 
 Further:
 

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%2
0Application%20Deployment 
 
 
 John
 
 Rick Roberts wrote:
 
 Does the nsfs.war file go into webapps directory or into webapps/nsfs 
 directory?
 Currently, the webapps/nsfs dir does not exist.  There is only the 
 nsfs.war file setting in the webapps directory.  I am assuming that 
 Tomcat will create the webapps/nsfs directory for me when it expands 
 the war file.

 I have temporarily set permissions to 777 on the webapps directory and 
 it still does not expand, nor try to use, the war file.


 Rick

 John Turner wrote:


 You've told Tomcat the docBase is nsfs.

 Tomcat thusly looks for a directory called nsfs in the Host's appBase.

 If it finds it, and unpackWars is true, it will unpack your WAR file 
 into that directory (webapps/nsfs, NOT webapps).  Thus, Tomcat needs 
 r+w on webapps/nsfs.

 Does Tomcat have r+w on webapps/nsfs?

 Alternatively, make unpackWars false.

 John

 Rick Roberts wrote:

 My directory permissions are as follows:

 drwxrwx---7 root tomcat4  4096 Jul 23 12:17 webapps

 ps -ef shows me this, which is think is Tomcat, which is run by user 
 tomcat4:

 tomcat4   6199 1  0 12:17 pts/200:00:36 
 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath 
 /usr/java/jdk1.4/lib/tools.jar:/var

 Thanks,

 Rick

 Shapira, Yoav wrote:

 Howdy,


 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed:
 java.lang.IllegalArgumentException: Document base
 /var/tomcat4/webapps/nsfs does not exist or is not a
 readable directory





 Well explain it to me! :)

 There is a /var/tomcat4/webapps/nsfs.war file.

 There should not be a /var/tomcat4/webapps/nsfs directory.






 If you have unpackWARS=true tomcat will try to explode your war into
 the directory specified as the docBase, which is nsfs under 
 webapps.  If
 it can't create this directory or read/write into it, you get the 
 above
 error.  Check file permissions on webapps.

 Yoav Shapira

-- 
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


-
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: FW: question

2003-07-24 Thread Simon Pabst
At 10:42 24.07.2003 +0200, you wrote:
Question :

I've made a servlet and I can run it when I type the url :
http://server.mynetwork.be:8080 http://server.mynetwork.be:8080
The URL will automatically switch to
https://server.mynetwork.be:8443/index.html
https://server.mynetwork.be:8443/index.html , this is ok.
But if anyone types the URL  http://server.mynetwork.be:8443
http://server.mynetwork.be:8443 (so no secure html, but on the secured port
8443)
than I get some strange things :
With Netscape I get a dialog : You have chosen to download a file of type:
application/octet-stream from  http://server.mynetwork.be:8443/
http://server.mynetwork.be:8443/,
   What shoul Netscape 6 do with
this file ? * Open Using    * Save to Disk 
With I.E. , the file opens immediately in the browser, displaying ''.
The name of the file is always random.
Apache is better regarding that, it puts out an error message, saying that 
you're speaking plain http to a https port.
That isn't implemented in Tomcat i guess, so the browsers get some weird 
content and behave each in another way then.

How can I prevent this ?
Is there a way that if someone types  http://server.mynetwork.be:8443/
http://server.mynetwork.be:8443 this person will get redirected to
https://server.mynetwork.be:8443/index.html
https://server.mynetwork.be:8443/index.html  instead ?
Don't know if it's possible to do redirects in Tomcat itself,
however you could put Apache with mod_rewrite in front to do that.

Greetings,

Kris Vansant
SIEMENS Atea
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
phone:   +32 14 253049
mobile:
Fax:   +32 14 22 29 94
Mobile Solutions
and Enabling Services
http://www.ic.siemens.be http://www.ic.siemens.be/eng/default_rd.shtm
The only thing more accurate than incoming enemy fire is incoming friendly
fire.



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


problem finding css

2003-07-24 Thread Astrid Wagner
Hi,
I am using Apache 1.3 with tomcat 4.1.24.
When I use netscape 7 to run my web application everything works fine.
When I use e.g netscape 4 the style sheets can not be found.
How do I have to configure Apache/tomcat ?
In the html page the source is refered to as:
  link href=/main.css rel=stylesheet type=text/css

Right now  I have in http.conf:
VirtualHost *
 DocumentRoot 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webapps/iprweb
 ServerName upolu.sps.mot.com
 JkMount /iprweb/* ajp13
/VirtualHost

   Alias   /html/  /home/minerva/servers/upolu/ipr_files/static_html/

The main.css is installed in 
/home/minerva/servers/upolu/ipr_files/static_html.
Thanks for any hint ..

Astrid


Diff betw ssh and my OpenSSL server.key and ca.key ?

2003-07-24 Thread achana
In RH7.1 under /etc/ssh there are several ssh_host_*  keys and config
files. 
They seem to be for remote client logins.
Would my newly generated OpenSSL keys and certificate conflict with them
???
What's the difference between the two ???
Sorry for the newbie questions...

Simon Pabst wrote:
 
 1. Generate a private key:
 openssl genrsa -des3 -out privkey.pem 2048
 (this should prompt you for a
 passphrase)http://www.openssl.org/docs/HOWTO/keys.txt
 
 2. a) Generate a self-signed test certificate:
 openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
 
 2. b) If you want to use a Trust-Center signed SSL certificate,
 you need to create a certificate signing request (CSR) and submit it to a
 Certificate Authority (CA):
 openssl req -new -key privkey.pem -out cert.csr
 
 http://www.openssl.org/docs/HOWTO/certificates.txt
 
 Some Certificate Authorities:
 http://www.verisign.com/
 http://www.thawte.com/
 http://www.instantssl.com/
 
 At 17:27 24.07.2003 +1000, you wrote:
 Hi. My quixotic tilt at mod_ssl continues...
 I am into my second book on this subject matter. Okay, let's put that in
 that too-hard basket for the moment.
 Let's make OpenSSL work first. It does.
 It asks me whether I want to DER or PEM. I take PEM.
 Then it tells me not enough random data. So I did this:
 # openssl -rand  -des3 -out server.key 1024
 That skipped the PEM bit, BUT how do I get it to challenge with a pass
 phrase dialogue ?
 Do all of you use PEM ?
 
 Regards,
 Discombobulated...
 Perplexed in search of perspicacity is the first sign of neurosis.
 
 -
 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: Installing mod_ssl on Apache2+Tomcat+mod_jk setup...

2003-07-24 Thread Simon Pabst
Hmm i guess $APACHE_HOME points to Redhats Apache Home or where?
The make should be done in the source directory, not in the Apache 
installation home.
Just forget about the Redhat Apache and build apache completely from source,
here's a step by step list (YMMV):
=

# Download the latest source (httpd-2.0.47.tar.gz) from 
http://httpd.apache.org/download.cgi
tar -zxf httpd-2.0.47.tar.gz
cd httpd-2.0.47

./configure \
--prefix=/opt/apache2 \
--with-mpm=worker \
--enable-so \
--enable-rewrite \
--enable-ssl \
--with-ssl=/path/to/latest/openssl \
--enable-proxy
# prefix sets the installation directory
# mpm=worker compiles apache with multithreading support, needed for 
current mod_jk1/2 load balancing round robin to work properly
# mod_so is needed for DSO support (so you can install other modules later 
without rebuilding the whole thing, recommended for mod_jk(2)
# mod_rewrite is the swiss army knife for URL manipulation and always handy
# mod_proxy is not really needed, but a possible alternative to connect to 
Tomcat
# See http://httpd.apache.org/docs-2.0/mod/

make
make install
=

And that openssl version problem,
i'd suggest you try upgrading with a more recent openssl rpm if there is any,
or you build and install the latest openssl yourself:
# Download http://www.openssl.org/source/openssl-0.9.7b.tar.gz
gtar -zxf openssl-0.9.7b.tar.gz
cd openssl-0.9.7b
./configure --prefix=/path/to/somewhere/else/than/redhat_ssl
make
make install
If you happen to run into any compilation problems,
you propably have to upgrade some other system libraries as well.
At 12:38 24.07.2003 +1000, you wrote:
Well yes, I did that and configure ran normally after a make
distclean (I think I maight have left some junk there from last
time)...
Then I tried doing this :
# cd $APACHE_HOME
# make
# make certificate
# make install
make didn't work and complained No targets specified and no Makefile
found. Stop
I can clearly see makefile there !
Then I checked Apache, like this :
# apachectl -l
I do not see mod_ssl compiled into it.
Having said all that, I still have another major concern about
openssl-0.9.6-3 vulnerability. It seems that I am going through a lot of
trouble installing a faulted version. All the research I have done sofar
recommends installing a second openssl-0.9.7 alongside 0.9.6-3 because
redHat7.1 has dependency problems otherside.
This is very irritating !
TIA (DIV=danke im voraus?)
:(
Simon Pabst wrote:

 That configure of yours is not quite right:

 the following is required for Apache with SSL/HTTPS Support (still called
 mod_ssl):
 --enable-ssl

 this is only required if the auto detection of apache can't fint the
 installed open ssl:
 --with-ssl=/path/to/openssl

 At 17:49 23.07.2003 +1000, you wrote:
 Hiya, thanks for the tip.
 When I ran ./configure --help, the option --enable-ssl is missing.
 So I tried this :
 ./configure
--with-apache=
--with-ssl=
--prefix=
 So komme ich auch nicht weiter !
 Those options are not available in configure !?!
 TIA :(
 
 Simon Pabst wrote:
  
   This should go to Apache Mailing List propably.
  
   Apache 2 has its own mod_ssl included.
   You still need an installed OpenSSL to use mod_ssl,
   as how to configure:
  
   httpd-2.0.45 # ./configure --help|grep -i ssl
 --enable-sslSSL/TLS support (mod_ssl)
 --with-ssl=DIR  SSL/TLS toolkit (OpenSSL)
  
   Tomcat Users List [EMAIL PROTECTED] schrieb am
  14.07.03 09:56:52:
   
Apache2.0.40 seems to ship with mod_ssl in the directory
.../httpd-2.0.40/modules/ssl.
But no mention of OpenSSL, although both ssl_util_ssl.c and
ssl_util_ssl.h refer to OpenSSL.
I ftp-ed openssl-0.9.76b.tar.gz , but they only tralk about Apache
1.3.24 as in :
# configure with-apache=../apache_1.3.24 
with-ssl=./open22l-0.9.6c  etc
Am I to understand there is no mod_ssl for Apache2+  ???
   
hr
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
   --
   Simon Pabst
  
   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 

Re: mod_jk2 with jni+pcre, what for?

2003-07-24 Thread Simon Pabst
Unix sockets are a bit faster because the connection to Tomcat doesn't have 
to go through the whole tcp/ip layers.

However with current hardware the difference with unix sockets is not so 
noticeable in most cases (your requests may get served one-two seconds faster),
and using Jni/unix sockets may cause you more trouble than its worth that 
difference,
it's worth a try though.

Besides you're encouraged to use it, because the more people use it, the 
better it will become :-)

At 01:22 24.07.2003 +0100, you wrote:
Hi everybody,

I'm trying different setups of mod_jk2 for our JSP
application with Apache 2.0 acting as frontend.
With the help of apachewiki and Simon Pabst I've
succesfuly setup Tomcat 4.1.24 with Apache 2.0.47,
running Sun JDK 1.4.1 with mod_jk2 2.0.2 (jni and pcre
enabled), using Unix sockets (not TCP). Obviously
Tomcat is running on the same machine as Apache...
My question is: Why would I like to use this setup
instead of the easier TCP/IP method? Would jni+Unix
Sockets be faster? What does the Perl Regular
Expressions do in all this thing?
Thanks everybody,

Ivan


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
-
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: Diff betw ssh and my OpenSSL server.key and ca.key ?

2003-07-24 Thread Simon Pabst
SSL Web-Server Certificates have nothing to do with ssh_host keys, since 
SSH is something entirely different than HTTP(S)...

ssh_host keys are used for verifying that remote machines can be trusted, 
when doing remote connections to other machines using SSH.

The pem files you generated shouldn't go anywhere in those directories,
but somewhere in a Tomcat or Apache directory:
For Tomcat:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
For Apache:
put the privkey.pem into apache/conf/ssl.key directory
put the cacert.pem into apache/conf/ssl.crt directory
At 18:51 24.07.2003 +1000, you wrote:
In RH7.1 under /etc/ssh there are several ssh_host_*  keys and config
files.
They seem to be for remote client logins.
Would my newly generated OpenSSL keys and certificate conflict with them
???
What's the difference between the two ???
Sorry for the newbie questions...
Simon Pabst wrote:

 1. Generate a private key:
 openssl genrsa -des3 -out privkey.pem 2048
 (this should prompt you for a
 passphrase)http://www.openssl.org/docs/HOWTO/keys.txt

 2. a) Generate a self-signed test certificate:
 openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095

 2. b) If you want to use a Trust-Center signed SSL certificate,
 you need to create a certificate signing request (CSR) and submit it to a
 Certificate Authority (CA):
 openssl req -new -key privkey.pem -out cert.csr

 http://www.openssl.org/docs/HOWTO/certificates.txt

 Some Certificate Authorities:
 http://www.verisign.com/
 http://www.thawte.com/
 http://www.instantssl.com/

 At 17:27 24.07.2003 +1000, you wrote:
 Hi. My quixotic tilt at mod_ssl continues...
 I am into my second book on this subject matter. Okay, let's put that in
 that too-hard basket for the moment.
 Let's make OpenSSL work first. It does.
 It asks me whether I want to DER or PEM. I take PEM.
 Then it tells me not enough random data. So I did this:
 # openssl -rand  -des3 -out server.key 1024
 That skipped the PEM bit, BUT how do I get it to challenge with a pass
 phrase dialogue ?
 Do all of you use PEM ?
 
 Regards,
 Discombobulated...
 Perplexed in search of perspicacity is the first sign of neurosis.
 
 -
 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: problem finding css

2003-07-24 Thread Ralph Einfeldt
I would expect that you have to use link href=/html/main.css ...
to get the file. Otherwise the alias directive won't match.

 -Original Message-
 From: Astrid Wagner [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 12:35 PM
 To: [EMAIL PROTECTED]
 Subject: problem finding css 
 
 
 
link href=/main.css rel=stylesheet type=text/css
 
 Alias   /html/  /home/minerva/servers/upolu/ipr_files/static_html/
 
 The main.css is installed in 
 /home/minerva/servers/upolu/ipr_files/static_html.

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



Re: problem finding css

2003-07-24 Thread Simon Pabst
href=/main.css looks like wrong syntax,

either use:
href=main.css
(if your html files linking to that css file are in the same directory)
or:
href=/html/main.css
(if your html files are somewhere else, you need to specify the URI to the 
CSS file, i.e. the local part of the URL without the Host- or DNS-name)

At 12:34 24.07.2003 +0200, you wrote:
Hi,
I am using Apache 1.3 with tomcat 4.1.24.
When I use netscape 7 to run my web application everything works fine.
When I use e.g netscape 4 the style sheets can not be found.
How do I have to configure Apache/tomcat ?
In the html page the source is refered to as:
  link href=/main.css rel=stylesheet type=text/css

Right now  I have in http.conf:
VirtualHost *
 DocumentRoot 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webapps/iprweb
 ServerName upolu.sps.mot.com
 JkMount /iprweb/* ajp13
/VirtualHost

   Alias   /html/  /home/minerva/servers/upolu/ipr_files/static_html/

The main.css is installed in 
/home/minerva/servers/upolu/ipr_files/static_html.
Thanks for any hint ..

Astrid


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


Re: problem finding css

2003-07-24 Thread Astrid Wagner
No I forgot to state that http.conf has also:
DocumentRoot /home/minerva/servers/upolu//ipr_files/static_html
otherwise it wouldn't  find it in any case.
I assume the main.css is looked up in 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webapps/iprweb
because of my:
VirtualHost *
 DocumentRoot 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webapps/iprweb
 ServerName upolu.sps.mot.com
 JkMount /iprweb/* ajp13
/VirtualHost
directive.
Somehow new netscape versions seem to go to the next DocumentRoot to 
find a resource when not found in first because
as stated before it works with netscape 7.
My problem is therefore:
How do I tell Apache to take main.css from the global DocumentRoot in 
http.conf and only the web
application from the one in the VirtualHost directive. Static text as 
well as web should use the same machine/port number.
I guess I have to read about the VirtualHost tag more.
Thanks anyway.
Astrid

Ralph Einfeldt wrote:

I would expect that you have to use link href=/html/main.css ...
to get the file. Otherwise the alias directive won't match.
 

-Original Message-
From: Astrid Wagner [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: problem finding css 



  link href=/main.css rel=stylesheet type=text/css

   Alias   /html/  /home/minerva/servers/upolu/ipr_files/static_html/

The main.css is installed in 
/home/minerva/servers/upolu/ipr_files/static_html.
   

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




Re: [Q] Extending a Realm

2003-07-24 Thread Tim Funk
Yup - as long as the methods your extending are not declared as final. Just 
make sure your class lives in the /server/ classloader.

-Tim

Riaan Oberholzer wrote:
Is it possible to extend the standard Realms, or do
you have to re-do it from scratch by implementing the
interface again?
I want everything the Datasource Realm provides,
except when the authentication succeeds, I want to
update the user db table to indicate the date/time
this occurred.
Can it be done?   



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


how to use SSL. (apache)

2003-07-24 Thread Anil Garg
Hi,

I installed apache_1.3.27.tgz .
I want to make ssl run from browser. Which additional package do i need to
install? OR some changes in httpd.conf will enable ssl.

Thanks and regads
anil.



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



Tomcat user list

2003-07-24 Thread Yves Lambert
As the tomcat user list does not tag the subject line, please don't 
blind copy to the list. CC or To but not BCC
--
free.fr.commentaires.signatures le groupe mythique
* TagZilla 0.041

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


Forwarding with parameters

2003-07-24 Thread Gil Hauer
Hello,

I have code in a servlet that, based on transaction status, forwards to
another target page. The code snippet is:

String target = /index.jsp;
ServletContext c = getServletContext();
RequestDispatcher d = c.getRequestDispatcher(target);
response.setContentType(text/html);
d.forward(request, response);

How can I set new parameters for the target page? Is it as simple as
setting
String target = /index.jsp?param=val;

I ask this since it doesn't seem to work -- that parameter does not seem
to get set.

Also, at this point I'm in an https session and I'd like to transfer to
unencrypted protocol -- how can I do that?

Thanks in advance,
Gil



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



Re: how to use SSL. (apache)

2003-07-24 Thread Simon Pabst
Download http://www.modssl.org/source/mod_ssl-2.8.14-1.3.27.tar.gz and 
follow the included INSTALL instructions.

At 16:35 24.07.2003 +0530, you wrote:
Hi,

I installed apache_1.3.27.tgz .
I want to make ssl run from browser. Which additional package do i need to
install? OR some changes in httpd.conf will enable ssl.
Thanks and regads
anil.


-
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 finding css

2003-07-24 Thread Ralph Einfeldt
Now your are confusing me.

This is what I believe to be true:

   Any request can just be served from one DocumentRoot.

   Which DocumentRoot is used, is defined by the way you 
   configure apache

   If the request contains a server name that matches a 
   given virtual host, the setting for this host take 
   precedence. If this virtual host has an own DocumentRoot 
   this is used and nothing else. If the server name can't 
   be matched, the global definitions are used.

   So to get files from the global DocumentRoot the request 
   has to contain a different servername than upolu.sps.mot.com.

What different versions of netscape could do, to produce 
the behaviour that you describe is unclear to me.

Recommended Solution:
  I think that you don't need the DocumentRoot definition in
  your virtual host. (Unless you have static files in that
  directory that should be served through apache).
  (As I'm currently not using tomcat behind apache I'm not 
  completely shure)

 -Original Message-
 From: Astrid Wagner [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 1:29 PM
 To: Tomcat Users List
 Subject: Re: problem finding css
 
 
 DocumentRoot /home/minerva/servers/upolu//ipr_files/static_html
 
 VirtualHost *
   DocumentRoot 
 /home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.
 1.24/webapps/iprweb
   ServerName upolu.sps.mot.com
   JkMount /iprweb/* ajp13
 /VirtualHost

 Somehow new netscape versions seem to go to the next DocumentRoot to 
 find a resource when not found in first because as stated before it 
 works with netscape 7.

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



Re: problem finding css

2003-07-24 Thread Astrid Wagner
For my purposes it was wrong to use the VirtualHost directive because
my web appl. runs on same host /port.
I just left the JkMount directive and it works with old and new netscape 
version.
The mapping to the web appl. doc root is done by workers.properties and
server.xml and I thought I have to do this in httpd.conf
Thanks.
Astrid

Astrid Wagner wrote:

No I forgot to state that http.conf has also:
DocumentRoot /home/minerva/servers/upolu//ipr_files/static_html
otherwise it wouldn't  find it in any case.
I assume the main.css is looked up in 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webap
ps/iprweb
because of my:
VirtualHost *
 DocumentRoot 
/home/oraedt/app/oracle/product/9iAS_1.0.2.2/jakarta-tomcat-4.1.24/webap
ps/iprweb
 ServerName upolu.sps.mot.com
 JkMount /iprweb/* ajp13
/VirtualHost
directive.
Somehow new netscape versions seem to go to the next DocumentRoot to 
find a resource when not found in first because
as stated before it works with netscape 7.
My problem is therefore:
How do I tell Apache to take main.css from the global DocumentRoot 
in http.conf and only the web
application from the one in the VirtualHost directive. Static text 
as well as web should use the same machine/port number.
I guess I have to read about the VirtualHost tag more.
Thanks anyway.
Astrid

Ralph Einfeldt wrote:

I would expect that you have to use link href=/html/main.css ...
to get the file. Otherwise the alias directive won't match.
 

-Original Message-
From: Astrid Wagner [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: problem finding css
  link href=/main.css rel=stylesheet type=text/css

   Alias   /html/  /home/minerva/servers/upolu/ipr_files/static_html/

The main.css is installed in 
/home/minerva/servers/upolu/ipr_files/static_html.
  


-
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: [Q] Extending a Realm

2003-07-24 Thread Martin Jacobson
Riaan Oberholzer wrote:
Is it possible to extend the standard Realms, or do
you have to re-do it from scratch by implementing the
interface again?
I want everything the Datasource Realm provides,
except when the authentication succeeds, I want to
update the user db table to indicate the date/time
this occurred.
Can it be done?   
You want to record the data  time of last login, right? I wouldn't 
modify/subclass the Realm at all - instead, I would write an 
HTTPSessionListener class, and do it in the sessionCreated() method.

Martin

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


Re: how to change this example JSP and servlet?

2003-07-24 Thread bernd pier
hi tommy,
what you see is the html side of the servlet. you can go to 
tomcat/webapps/examples/WEB-INF/classes there you`ll find the 
SendMailServlet. you`ll see to files one end with .java and one with 
.class. when you open the .java file you`ll see the source of the java 
serlvet which you can edit and change and do anything to it you like. 
you can open the java file with any editor or with an IDE.
i prefer netbeans, no matter you can use jbuilder or something else, but 
netbeans is free and has tomcat build in.
hope that helps a little bit.
bernd
tommy stone schrieb:

Hi..  I have a example JSP javamail page..  the sendmail.jsp (see below for the full syntax), it prompt us to input 1)From which email 2)To which email 3)Subject 4) Content

But now, I want to fix , it can only send to my email   [EMAIL PROTECTED], how do I fix it?? See below, the point to SendMailServlet and the parameter is mailto.  It will pass the mailto to the SendMailServlet?  Where can I fix it to make to send only to [EMAIL PROTECTED]  Should I change the SendMailServlet?  But how do I change the SendMailServlet? I can't even see the content!!  Please teach me!!

form method=POST action=../../SendMailServlet

input type=text name=mailto size=60

---Content of the Javamail JSP  --sendmail.jsp-
html
head
titleExample Mail Sending Form/title
/head
body bgcolor=white
pThis page will send an electronic mail message via the
codejavax.mail.Session/code resource factory that is configured into
the JNDI context for this web application.  Before it can be used
successfully, you must take note of the following:/p
ul
liThe default configuration assumes that there is an SMTP server running
   on stronglocalhost/strong.  If this is not the case, edit your
   codeconf/server.xml/code file and change the value for the
   codemail.smtp.host/code parameter to the name of a host that provides
   SMTP service for your network./li
liThe application logic assumes that no user authentication is required
   by your SMTP server before accepting mail messages to be sent./li
liAll of the fields below are required./li
/ul
form method=POST action=../../SendMailServlet
table
 tr
   th align=center colspan=2
 Enter The Email Message To Be Sent
   /th
 /tr
 tr
   th align=rightFrom:/th
   td align=left
 input type=text name=mailfrom size=60
   /td
 /tr
 tr
   th align=rightTo:/th
   td align=left
 input type=text name=mailto size=60
   /td
 /tr
 tr
   th align=rightSubject:/th
   td align=left
 input type=text name=mailsubject size=60
   /td
 /tr
 tr
   td colspan=2
 textarea name=mailcontent rows=10 cols=80
 /textarea
   /td 
 /tr
 tr
   td align=right
 input type=submit value=Send
   /td
   td align=left
 input type=reset value=Reset
   /td
 /tr
/table
/form
/body
/html



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
 



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


Problems with Jakarta Tomcat as Windows Service

2003-07-24 Thread Christoph . Mehne
Hi everybody,
I got a problem running my Tomcat 3.2.4 Version as a service under WinNT4.0 SP6
+ OptionPack.
Installing Tomcat as a service was no problem. All pathes I use, i.e. as stated
in wrapper.properties are on local harddisk drives.
But starting the service didn't work. The command
   net start Tomcat
ended with
   System  Error 1067: process was unexpectedly stopped.

I tried it later giving full rights on folders D:\Tomcat 3.2.4 and D:\jdk1.1.8
to System but nothing changed.
As an application it works fine so far. The only thing is, that there appeares
an error message as follows:

A nonfatal internal JIT (3.00.072b(x)) error 'Relocation error: NULL relocation
target' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cgi

Does anyone have an idea, what can be tried.
Thanx for helping

Chris






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



Re: IIS and the isapi_redirect.dll

2003-07-24 Thread Nathan Ward
What does your jk_iis.log file and also your IIS log file (in
c:\winnt\system32\LogFiles\W3SVC1 directory) show? I'll include a copy of
mine at the end of this message. The jk_iis.log file should show that it
accesses the registry and reads the workers.properties and
uriworkermap.properties files, and also show the urls patterns that it found
in uriworkermap.properties. IIS log should indicate that IIS got a 200
response code from the isapi_redirect.dll. You can also set the debug level
on the connector listening on 8009 in server.xml to 5 to get info that will
show that the connector is running. That has never helped me very much
though.

I found that the book Professional Apache Tomcat had the best description
of configuring IIS/Tomcat including very good troubleshooting tips.

Have you tried configuring IIS on another machine to talk to Tomcat? You can
leave Tomcat on one machine and IIS on another by just changing the
worker.host field in workers.properties to be the ip of the machine running
Tomcat.

   Nathan

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 3:51 PM
Subject: IIS and the isapi_redirect.dll


 Sorry if this was posted twice, my email client was not behaving.

 Well, here's a topic that has been hashed and rehashed before on this
list... unfortunately after countless hours of reading the archives and
googling around, I haven't found an answer as to why IIS won't play nice
with Tomcat. Here's the skinny:

 W2k sp3 (5.00.2195)
 IIS 5
 Tomcat 4.1.24
 j2sdk 1.4.2 installed
 isapi_redirect.dll 1.2.4

 I have checked the registery settings as well as had coworkers check them
multiple times. I have also followed up on the possibility of the corrupted
DLL by downloading different versions of the connector on to different
servers on my network to no avail. Multiple restarts have also ensued. The
error that is being logged in Component Services is your basic The data is
the error and the data section of the error window reads:
 : 02 00 00 00   

 If anyone has any other possibilities, or has fixed this problem before,
any help would be greatly appriciated. For those that are interested, the
details on the enviornment are below. Thanks in advance!

 -s


 
 Tomcat install:
 C:\Tomcat4
 \isapi\isapi_redirect.dll
 \conf\uriworkermap.properties
   workers.properties
 \logs

 Registery:
 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Group\Jakarta Isapi Redirector\1.0]
 extension_uri=/jakarta/isapi_redirect.dll
 worker_file=c:\Tomcat4\conf\workers.properties
 worker_mount_file=c:\Tomcat4\conf\uriworkermap.properties
 log_file=c:\Tomcat4\logs\jk_iis.log
 log_level=debug
 @=c:\Tomcat4\isapi\isapi_redirect.dll

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters]
 ..
 Filter DLLs=C:\Tomcat4\isapi\isapi_redirect.dll
 ..

 IIS:
 site root=C:\Inetpub\wwwroot
 vdir jakarta=C:\Tomcat4\isapi with read and execute set

 Permissions:
 All .properties files, the isapi_redirect.dll, and the folders that house
them have modify, read  execute, read, write enabled for the everyone
group.

 -
 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: [Q] Extending a Realm

2003-07-24 Thread Riaan Oberholzer
/server/ classloader? What does this mean... I have to
have the custom Realm available to a wider context
than just in my application .war?



--- Tim Funk [EMAIL PROTECTED] wrote:
 Yup - as long as the methods your extending are not
 declared as final. Just 
 make sure your class lives in the /server/
 classloader.
 
 -Tim
 
 Riaan Oberholzer wrote:
  Is it possible to extend the standard Realms, or
 do
  you have to re-do it from scratch by implementing
 the
  interface again?
  
  I want everything the Datasource Realm provides,
  except when the authentication succeeds, I want to
  update the user db table to indicate the date/time
  this occurred.
  
  Can it be done?   
  
 
 

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [Q] Extending a Realm

2003-07-24 Thread Riaan Oberholzer
That's a good idea, thanks

Can you also e.g. in this method add the user object
to the session so that jsp's have instant access to
it?


--- Martin Jacobson [EMAIL PROTECTED] wrote:
 Riaan Oberholzer wrote:
  Is it possible to extend the standard Realms, or
 do
  you have to re-do it from scratch by implementing
 the
  interface again?
  
  I want everything the Datasource Realm provides,
  except when the authentication succeeds, I want to
  update the user db table to indicate the date/time
  this occurred.
  
  Can it be done?   
 
 You want to record the data  time of last login,
 right? I wouldn't 
 modify/subclass the Realm at all - instead, I would
 write an 
 HTTPSessionListener class, and do it in the
 sessionCreated() method.
 
 Martin
 
 

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [Q] Extending a Realm

2003-07-24 Thread Riaan Oberholzer
Just thought about it having a session doesn't
mean you are successfully logged in, does it? The
moment you open the browser and gets directed to the
logon JSP, you have a session, right? That does not
mean you have logged in successfully... or what am I
missing here?


--- Martin Jacobson [EMAIL PROTECTED] wrote:
 Riaan Oberholzer wrote:
  Is it possible to extend the standard Realms, or
 do
  you have to re-do it from scratch by implementing
 the
  interface again?
  
  I want everything the Datasource Realm provides,
  except when the authentication succeeds, I want to
  update the user db table to indicate the date/time
  this occurred.
  
  Can it be done?   
 
 You want to record the data  time of last login,
 right? I wouldn't 
 modify/subclass the Realm at all - instead, I would
 write an 
 HTTPSessionListener class, and do it in the
 sessionCreated() method.
 
 Martin
 
 

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: IIS and the isapi_redirect.dll

2003-07-24 Thread Nathan Ward
Here's the log files that I meant to include before.

Also, what url did you go to test the configuration? Welcome pages won't be
displayed when accessed via IIS, e.g. http://localhost/examples doesn't work
but http://localhost/examples/servlet/index.html does work.

What is in your workers.properties and uriworkermap.properties files? Please
also send the connector for port 8009 from your server.xml file.

My ISAPI Redirector log file:
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1018)]: Using registry.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1020)]: Using log file
C:\apps\jakarta-tomcat-4.1.24\logs\iis_redirect.log.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1021)]: Using log level 0.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1022)]: Using extension uri
/tomcat/isapi_redirector.dll.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1023)]: Using worker file
C:\apps\jakarta-tomcat-4.1.24\conf\workers.properties.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1024)]: Using worker mount
file C:\apps\jakarta-tomcat-4.1.24\conf\uriworkermap.properties.
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (1025)]: Using uri select 0.
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (172)]: Into
jk_uri_worker_map_t::uri_worker_map_alloc
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (375)]: Into
jk_uri_worker_map_t::uri_worker_map_open
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (396)]:
jk_uri_worker_map_t::uri_worker_map_open, rule map size is 1
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (321)]: Into
jk_uri_worker_map_t::uri_worker_map_open, match rule /rms/=ajp13Worker was
added
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (408)]: Into
jk_uri_worker_map_t::uri_worker_map_open, there are 1 rules
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (422)]:
jk_uri_worker_map_t::uri_worker_map_open, done
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (88)]: Into wc_open
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (224)]: Into build_worker_map,
creating 1 workers
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (230)]: build_worker_map, creating
worker ajp13Worker
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (148)]: Into wc_create_worker
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (260)]: Factory :ajp12
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (260)]: Factory :ajp13
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (164)]: wc_create_worker, about to
create instance ajp13Worker of ajp13
[Wed Jul 23 16:18:12 2003]  [jk_ajp13_worker.c (108)]: Into
ajp13_worker_factory
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (173)]: wc_create_worker, about to
validate and init ajp13Worker
[Wed Jul 23 16:18:12 2003]  [jk_ajp_common.c (1206)]: Into
jk_worker_t::validate
[Wed Jul 23 16:18:12 2003]  [jk_ajp_common.c (1226)]: In
jk_worker_t::validate for worker ajp13Worker contact is localhost:8009
[Wed Jul 23 16:18:12 2003]  [jk_ajp_common.c (1254)]: Into jk_worker_t::init
[Wed Jul 23 16:18:12 2003]  [jk_ajp_common.c (1274)]: In jk_worker_t::init,
setting socket timeout to 0
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (189)]: wc_create_worker, done
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (240)]: build_worker_map, removing
old ajp13Worker worker
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (252)]: build_worker_map, done
[Wed Jul 23 16:18:12 2003]  [jk_worker.c (111)]: wc_open, done 1
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (655)]: Detected IIS = 5.0
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (696)]: HttpFilterProc
started
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (759)]: In HttpFilterProc
Virtual Host redirection of /localhost/rms/Main.jsp
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/localhost/rms/Main.jsp'
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (765)]: In HttpFilterProc
test Default redirection of /rms/Main.jsp
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/rms/Main.jsp'
[Wed Jul 23 16:18:12 2003]  [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13Worker -
/rms/
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (775)]: HttpFilterProc
[/rms/Main.jsp] is a servlet url - should redirect to ajp13Worker
[Wed Jul 23 16:18:12 2003]  [jk_isapi_plugin.c (838)]: HttpFilterProc check
if [/rms/Main.jsp] is points to the web-inf directory

My IIS log file:
#Software: Microsoft Internet Information Services 5.0
#Version: 1.0
#Date: 2003-07-23 17:02:10
#Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port
cs-method cs-uri-stem sc-status
2003-07-23 17:02:10 127.0.0.1 - W3SVC1 NWARDLT 127.0.0.1 80 GET
/jakarta/isapi_redirect.dll 200
2003-07-23 17:02:10 127.0.0.1 - W3SVC1 NWARDLT 127.0.0.1 80 GET

RE: HELP! Client Authentication in Tomcat 4.1.24

2003-07-24 Thread Farrell, Patrick
That's what I thought.  I'm not using Tomcat with Apache/IIS/SunONE, but
rather standalone.  

You mentioned that I need to be using the MemoryRealm.  I looked in my
server.xml file and found the following lines .. which would seem to
indicate that the UserDatabaseRealm is being used instead of the MemoryRealm
..

Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=99 
   resourceName=UserDatabase validate=true/

Should this be changed to look like the following?  

Realm className=org.apache.catalina.realm.MemoryRealm debug=99 
   resourceName=UserDatabase validate=true/

One other question..  In the web.xml file, there is a login-config element
that may contain an optional realm-name.  Must I specify the realm-name
in my login-config and if so, what name do I use?  Should it be whatever
appears in the resourceName attribute of the Realm element in the
server.xml file?

login-config 
auth-methodCLIENT-CERT/auth-method
realm-name/realm-name
/login-config

Thanks,

Pat

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 11:08 PM
To: [EMAIL PROTECTED]
Subject: Re: HELP! Client Authentication in Tomcat 4.1.24


Bug #15790 is only if you are fronting Tomcat with Apache/IIS/SunONE.  If
you are using the stand-alone connector, it doesn't apply.  I'm guessing
that this isn't your problem, since you'd get a different error.

To use this setup, you need to be using MemoryRealm.  The default
DataSourceRealm doesn't handle CLIENT-CERT authentication.  When I'm testing
this, I usually get rid of the 'Resource name=UserDatabase ...', since
it has a bad habit of messing up cert subjects when it re-saves the file
:-).

With 4.1.26, if you enable TRACE logging, it will print the cert out to the
log (I use this to cut-and-paste the Subject to tomcat-users.xml).  If you
have log4j in common/lib, then add:
   log4j.logger.org.apache.tomcat.util.net.jsse=TRACE
to your log4j.properties.

Farrell, Patrick [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
..
 Thanks,

 I had seen the bug you are referring to, but didn't think that this was my
 problem since I don't see that exception anywhere.  Is there anywhere that
I
 may look to find that exception just to ensure that this is truely my
 problem?

 Pat

 -Original Message-
 From: Jay Garala [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 1:44 PM
 To: 'Tomcat Users List'
 Subject: RE: HELP! Client Authentication in Tomcat 4.1.24


 This is the part you were missing.  Unfortunately, the handling of Client
 certs in the Jk-Coyote connector is broken in 4.1.24 (see
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15790).

 Wait for 4.1.26 or grab alpha from CVS

 -Original Message-
 From: Farrell, Patrick [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 1:02 PM
 To: '[EMAIL PROTECTED]'
 Subject: HELP! Client Authentication in Tomcat 4.1.24


 I am attempting to use client certificate authentication with Tomcat
4.1.24,
 but each time I connect via a browser (Internet Explorer) Tomcat indicates
 that it is unable to authenticate with the provided credentials.

 My client certificate is a personal certificate from Thawte.  The
 corresponding root certificate already exists in my truststore.

 Shown below is my tomcat-users.xml file.

 ?xml version='1.0' encoding='utf-8'?
 tomcat-users
   role rolename=user description=Authenticated User/
   role rolename=manager description=Tomcat Manager/
   role rolename=admin description=Tomcat Administrator/
   user username=administrator password=password
roles=admin,manager/
   user username=[EMAIL PROTECTED], CN=Thawte Freemail
 Member password=null roles=user/
 /tomcat-users

 Must I do anything with the client certificate in order for the server to
 trust it, or does the server simply grab the DN from the certificate and
 look in the realm for a user with the corresponding DN?

 Does anyone have any information or links on how to configure tomcat users
 with client authentication?

 Pat

 ***
 This message is intended only for the use of the intended recipient and
 may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
 are not the intended recipient, you are hereby notified that any use,
 dissemination, disclosure or copying of this communication is strictly
 prohibited.  If you have received this communication in error, please
 destroy all copies of this message and its attachments and notify us
 immediately.
 ***


 -
 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: [Q] Extending a Realm

2003-07-24 Thread Tim Funk
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

-Tim

Riaan Oberholzer wrote:
/server/ classloader? What does this mean... I have to
have the custom Realm available to a wider context
than just in my application .war?


--- Tim Funk [EMAIL PROTECTED] wrote:

Yup - as long as the methods your extending are not
declared as final. Just 
make sure your class lives in the /server/
classloader.

-Tim



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


RE: Forwarding with parameters

2003-07-24 Thread René Vangsgaard ML
You cannot change protocol inside a reuqest. To change protocol you have to
send a redirect to the browser.

-Original Message-
From: Gil Hauer
To: Tomcat Users List
Sent: 24-07-03 13:44
Subject: Forwarding with parameters

Hello,

I have code in a servlet that, based on transaction status, forwards to
another target page. The code snippet is:

String target = /index.jsp;
ServletContext c = getServletContext();
RequestDispatcher d = c.getRequestDispatcher(target);
response.setContentType(text/html);
d.forward(request, response);

How can I set new parameters for the target page? Is it as simple as
setting
String target = /index.jsp?param=val;

I ask this since it doesn't seem to work -- that parameter does not seem
to get set.

Also, at this point I'm in an https session and I'd like to transfer to
unencrypted protocol -- how can I do that?

Thanks in advance,
Gil



-
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: mod_rewrite and mod_jk

2003-07-24 Thread John Turner
Did you try putting [PT] on your rewrite rules?  There was a thread on 
this just yesterday, as well as a couple of weeks ago.

John

Aviv Eliezer wrote:
I've seen many posts on the subject, yet none helped me.
I've got a tomcat 4.1.24 webapp, connected via mod_jk to apache 2.0.46.
for some reason, mod_jk takes precedence over mod_rewrite, for all urls
mapped to mod_jk with JkMount directives.
 
I tried switching the order of the LoadModules (jk before rewrite and
vice versa), and tried moving around the mod_rewrite directives into the
virtual host / server config- but still, mod_rewrite works only for urls
which aren't mapped to mod_jk.
 
does anyone have any idea?
 
thanks,
ori.



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


Re: Session persistance after server restart: a bug?

2003-07-24 Thread Aurele Venet
could not find the SESSION.ser file anywhere, however  declaring a 
Manager within  my context tag worked and allowed me to fine tune the 
session persist. 

Many thanks for your help!

vrta

Jon Wingfield wrote:

Not a bug. Standard behaviour. Chack out the Manager element in the 
server.xml

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

If you haven't got a Manager explicitly added in the server.xml a 
default is used (stores serialized sessions in a file SESSIONS.ser 
under the work directory. If you don't fancy changing the server.xml 
you can delete all SESSIONS.ser under work before you start tomcat)

Aurele Venet wrote:

Hello,

I am having a strange effect with my tomcat server.  My web app sends 
a session cookie (JSESSIONID) to the browser for session tracking.  
This keeps a boolean flag to say wether or not a user is logged in.  
I find that when I stop and restart the server, the cookie is sent 
back from the browser to the server, and the session id is recognised 
as a a valid ongoing session.  I then find that the boolean flag is 
true and I am not presented with the login form.  Has anyone had a 
similar experience?
At first I thought it must be due to some error in my code, however, 
i have monitored the http exchanges as well as  before any session 
variable settings (ie when the first servlet is accessed (2 simple 
html static files are accessed before where frames are set, and the 
servlet is invoked) I print the values that are currently in the 
session, and I find that indeed the session id given to the new 
session is exactly the same as the previous one, recorded in the 
cookie, and that the boolean flag is already set!

Any ideas why this is?

My env:

tomcat: 4.1.24 (also tested on 4.0.3 with same results)
browser: mozilla 1.4
OS: Sun Solaris 2.8
thanks

vrta





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



--
V
. . . . . . . . . 
tel:+34.918.131.331



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


Re: tomcat startup problem - tomcat window disappears

2003-07-24 Thread John Turner
Better yet, don't change anything, and execute catalina.bat run 
instead of startup.bat.

John

Andrew Liles wrote:

Edit 
tomcat/bin/startup.bat

in one of the last lines change the keyword start to run.  Then go into
a DOS box and run startup.bat.  This time any faults will remain on the
screen and you can start debugging from there.

-Original Message-
From: Gayathrie Gunawardene [mailto:[EMAIL PROTECTED]
Sent: 21 July 2003 19:15
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; 
[EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: tomcat startup problem

Hi,

I get the following message when I run startup command.  
Using CATALINA_BASE:   E:\TomCat4.1

Using CATALINA_HOME:   E:\TomCat4.1

Using CATALINA_TMPDIR: E:\TomCat4.1\temp

Using JAVA_HOME:   E:\jdk1.4

I see a tomcat window open and suddenly disappear. No matter 
how hard I tried to run, the result is the same all the time. 
I use tomcat4.1 and JDK1.4 on Windows 2000 adv. server platform.

Pls Help

GG

[EMAIL PROTECTED]



_
This e-mail has been scanned for viruses by MessageLabs.


_
This e-mail has been scanned for viruses by MessageLabs.
-
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: Newbie : Probs tomcat 4.1.24 with apache 1.3 (sunOS)

2003-07-24 Thread srevilak
 From: Olivier Marie [EMAIL PROTECTED]
 Subject: Newbie : Probs tomcat 4.1.24 with apache 1.3 (sunOS)


 Tomcat works alone (port 8080)
 Apache works too.

 When i try to display a JSP page, i obtain in mod_jserv.log :
 (EMERGENCY) ajp12[1]: cannot scan servlet headers  (500)
 (ERROR) an error returned handling request via protocol ajpv12

 I use jserv_module to permits apache to communicate with tomcat.
 I have in my server.xml :

 I tried ApJServDefaultProtocol ajpv13 but it seems to be less simple than
 that...
 Thanks for advices and excuse me for the poor level of my configuration
 knowledge.

I think that mod_jserv is your problem.

Although mod_jserv and (say) mod_jk use ajp13, the two seem to
implement it differently.  If you replace the servlet container with a
small debugging program that prints out data sent by the apache module
to the servlet container's port, you'll see that mod_jserv and mod_jk
each send different stuff.  The best suggestion I'd give is to use
mod_jk to talk to tomcat, and mod_jserv to talk to ApacheJServ.  From
my experience, you can't mix and match modules to servlet containers.

If you're in the position of trying to migrate from jserv to tomcat,
you might consider doing it gradually, on a VirtualHost by VirtualHost
basis.  For example, if the apache server has vhosts X, Y, Z; you
should be able to do something like

 - load mod_jk and mod_jserv in the main apache config

 - Vhost X uses JK directives to communicate with tomcat (there are no
   mod_jserv directives within the scope of X)

 - Y and Z use mod_jserv directives to communicate with an apache
   jserv.  (there are no mod_jk directives within the scope of Y, Z)

(eg - the jserv/tomcat use does not overlap).

-- 
Steve

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



Re: tomcat startup problem

2003-07-24 Thread John Turner
Run catalina.bat run instead of startup.bat.

Have you checked the log files?

John

Gayathrie Gunawardene wrote:

Hi,

I get the following message when I run startup command.  
Using CATALINA_BASE:   E:\TomCat4.1

Using CATALINA_HOME:   E:\TomCat4.1

Using CATALINA_TMPDIR: E:\TomCat4.1\temp

Using JAVA_HOME:   E:\jdk1.4

I see a tomcat window open and suddenly disappear. No matter how hard I tried to run, the result is the same all the time. I use tomcat4.1 and JDK1.4 on Windows 2000 adv. server platform.

Pls Help

GG

[EMAIL PROTECTED]




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


Extending a Realm

2003-07-24 Thread Jan Bodey
Hi

I have just joined this list, and I notice that there is already a thread 
going on subject Extending a Realm.  I myself wish to do this.  I have 
extended JAASRealm to my own class.  I have put the jar containing this 
class into the server/lib directory.  However, whenever I try to start my 
application, I get anException: java.lang.Exception: ManagedBean is not 
found with MyJAASRealm.

Can anybody assist me with this?  Also, if there was anything that may be of 
use to me in the recent thread, could someone forward that to me?

Cheers

Jan.

_
The new MSN 8: smart spam 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: logs of tomcat

2003-07-24 Thread John Turner
Make sure your JkMount statements aren't something like /* and are 
instead something like /*.jsp and /servlet/*.

John

Dionisio Ruiz de Zarate wrote:

Hello.
In my tomcat log file (mod_jk.og) appears a lot of lines as the next line:
[Wed Jul 23 23:20:58 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/graphics/image.gif'
my tomcat logs the all of my images. how can i say to the tomcat to not log,
and not process the images (gif.¡,jpg...) or toher files
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: Get rid of socket write error

2003-07-24 Thread John Turner
1. Figure out why there is slow response time and fix it.

2. Train your users to only click once.

3. Rotate your logs every 24 hours using logrotate.

4. Use log4j and tell your developers to stop using System.out.println 
for printing stack traces when they have an exception.

John

Feltesse Julien wrote:

Hi,

We're using Tomcat 4.1.18.
Our problem is that when a client hits the stop button in his browser,
or double-click links, we can see in the logs :
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw
exception
org.apache.jasper.JasperException: Connection reset by peer: socket
write error
[...]
- Root Cause -
java.net.SocketException: Connection reset by peer: socket write error
This is somehow logical, but may anyone know how to 'tell' Tomcat :
When you trap such an error don't display it (or partially display it)
in the logs.
In fact, in the company where the app runs the clients often hit twice
links because of slow response times. As a result, at the end of the day
the logs' size is HUGE compared to what it should be, because 2/3 of the
logs are filled with the long long long stack trace of the socket write
error...
Thanks in advance.

-
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: Extending a Realm

2003-07-24 Thread Tim Funk
When creating your own Realm/Valve, you also need add an mbean_descriptor ...

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

-Tim

Jan Bodey wrote:
Hi

I have just joined this list, and I notice that there is already a 
thread going on subject Extending a Realm.  I myself wish to do this.  
I have extended JAASRealm to my own class.  I have put the jar 
containing this class into the server/lib directory.  However, whenever 
I try to start my application, I get anException: java.lang.Exception: 
ManagedBean is not found with MyJAASRealm.

Can anybody assist me with this?  Also, if there was anything that may 
be of use to me in the recent thread, could someone forward that to me?

Cheers

Jan.

_
The new MSN 8: smart spam 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]


Re: JDK Problems - libjava.so

2003-07-24 Thread Reginald Oake
Hi.

One of the things that typically gives a 'can't find *.so' error the
problem is that the path to the so (shared object) file is not in the
LD_LIBRARY_PATH environment variable.

You can check this by bringing up a terminal window and entering the
following command...
set | grep LD_LIBRARY_PATH

The first thing I would do is find out where the libjava.so file is
(typically path to your java install/jre/lib/arch/libjava.so where
path to your java install is the path to the root of the java install
and arch is something like i386 -- probably ppc or ppc64 or something
like it in your case). If you can't find it then the problem is that the
install of java did not complete properly or the installer is broken. If
this is the case you will need to find a different j2sdk or jre or check
with the site where you got the installer for further help.

Second, try the following set of commands...
export JAVA_HOME=path to your java install
export PATH=$PATH:$JAVA_HOME
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/arch
java -version
The setting of the JAVA_HOME environment variable is not strictly
necessary but is required by Tomcat and it helps with the following
commands. Of course arch and path to your java install will have to
be replaced with the appropriate values for your system as above. If
this works then you simply need to take the first three lines of the
above commands and modify your /etc/profile file such that it does this
for you.

Hope this helps.


Reg


On Wed, 2003-07-23 at 09:50, Hari Om wrote:
 I downloaded and installed j2sdk-1.3.1-02b-FCS-linux-ppc.bin from the 
 penguinppc.org web site and followed the instructions. I was able to INSTALL 
 under /usr/local and also changed my PATH variable.but later when I test 
 my java version it gives following error - wonder why
 
 #./java -version
 Error: can't find libjava.so.
 
 
 I am using IBM PowerPC (pseries) with Red Hat Linux 7.1
 
 Any related information on this is appreciated.
 
 THANKS!
 
 HARI OM
 
 _
 STOP MORE SPAM with the new MSN 8 and get 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]



IIS and isapi_redirect

2003-07-24 Thread Stephen Colson
I may be posting this for the second or third time, and if this is the 
case, my humble apologies. I don't believe the webmail application I 
was using actually sent the prior attempts to post to this list, and I 
haven't seen my post(s) or any subsequent replies, so here it goes 
again. If either of my other attempts did make it on list, please 
respond to me directly so I can figure out what the problem was. 
Thanks. On with the program...

Well, here's a topic that has been hashed and rehashed before on this 
list... unfortunately after countless hours of reading the archives and 
googling around, I haven't found an answer as to why IIS won't play 
nice with Tomcat. Here's the skinny:

W2k sp3 (5.00.2195)
IIS 5
Tomcat 4.1.24
j2sdk 1.4.2 installed
isapi_redirect.dll 1.2.4
I have checked the registery settings as well as had coworkers check 
them multiple times. I have also followed up on the possibility of the 
corrupted DLL by downloading different versions of the connector on to 
different servers on my network to no avail. Multiple restarts have 
also ensued. The error that is being logged in Component Services is 
your basic The data is the error and the data section of the error 
window reads:
: 02 00 00 00   

If anyone has any other possibilities, or has fixed this problem 
before, any help would be greatly appriciated. For those that are 
interested, the details on the enviornment are below. Thanks in advance!

-s


Tomcat install:
C:\Tomcat4
\isapi\isapi_redirect.dll
\conf\uriworkermap.properties
  workers.properties
\logs
Registery:
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Group\Jakarta Isapi Redirector\1.0]
extension_uri=/jakarta/isapi_redirect.dll
worker_file=c:\Tomcat4\conf\workers.properties
worker_mount_file=c:\Tomcat4\conf\uriworkermap.properties
log_file=c:\Tomcat4\logs\jk_iis.log
log_level=debug
@=c:\Tomcat4\isapi\isapi_redirect.dll
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters]
...
Filter DLLs=C:\Tomcat4\isapi\isapi_redirect.dll
...
IIS:
site root=C:\Inetpub\wwwroot
vdir jakarta=C:\Tomcat4\isapi with read and execute set
Permissions:
All .properties files, the isapi_redirect.dll, and the folders that 
house them have modify, read  execute, read, write enabled for the 
everyone group.

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


Logfile for isapi_redirector2.dll?

2003-07-24 Thread Nathan Ward
Does isapi_redirector2.dll write a log file? If so, where does it put the file? I 
don't see any registry settings in the documentation that specifies the log file 
location.

   Nathan


RE: HOWTO obtain UserDatabase from a servlet? [SOLVED]

2003-07-24 Thread Andrew Liles
I am going to answer my own question, for the benefit of anyone else who has
the same question.

The question arose because I wanted to permit a webapp to change password in
the Memory database that backed the authentication scheme I was using.

server.xml:
in the context your code will run in, add this link to a global resource...

  Context path=
docBase=ROOT
debug=0
ResourceLink name=glbUserDatabase
  global=UserDatabase
  type=org.apache.catalina.UserDatabase /
  /Context

this assumes you have this Global resource:
  GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
  /GlobalNamingResources

java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
UserDatabase db = (UserDatabase) envCtx.lookup(glbUserDatabase);

Then the next issue, is that you need to get hold of the interface
UserDatabase.  This is in catalina.jar but this resides in a Classloader
that is not normally allowed to be seen by Web Applications.

The issues:
1) the Web Apps don't normally get permission to see the internal Tomcat
Server classes
2) if you place your class where it CAN see the Tomcat Server classes then
your class cannot see the rest of your application 

A really ugly and security-prone solution is to   
   Move all jars from tomcat/server/lib to tomcat/common/lib
   Move any jars of yours to tomcat/common/lib or classes to
tomcat/common/classes

The security risk is that webapps now have unfettered access to the Tomcat
server code; which in my case is not a problem.

[Request for feature: could the Tomcat team create a .jar with the just the
wrapper interfaces in them??? Then I think you could put in code for
UserDatabase manipulation in tomcat/common/lib without needing to move and
expose the full server code.]

 -Original Message-
 From: Andrew Liles [mailto:[EMAIL PROTECTED]
 Sent: 10 July 2003 16:30
 To: '[EMAIL PROTECTED]'
 Subject: HOWTO obtain UserDatabase from a servlet?
 
 
 I wish to secure a website with a simple realm/user database
 setup for a low usage site with low numbers of users.
 
 UserDatabaseRealm (underpinned by MemoryUserDatabase) would
 seem to be ideally suited.
 
 How do I access the MemoryUserDatabase from a regular
 application to be able to SET passwords, etc.
 
 Once I have got a UserDatabase interface I know I can then
 use findUser(..), but how do I get something implementing
 the interface in the first case?  Is it some JNDI lookup or
 ServletContext access?
 
 I would appreciate your pointing me to some HOWTO
 documentation.
 
 Andrew.

_
This e-mail has been scanned for viruses by MessageLabs.

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



RE: Forwarding with parameters

2003-07-24 Thread Shapira, Yoav

Howdy,
Yup, use sendRedirect.

Or add a filter with a servlet request wrapper mapped to index.jsp that checks and 
adds parameters as needed.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: René Vangsgaard ML [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 8:34 AM
To: 'Gil Hauer '; 'Tomcat Users List '
Subject: RE: Forwarding with parameters

You cannot change protocol inside a reuqest. To change protocol you have to
send a redirect to the browser.

-Original Message-
From: Gil Hauer
To: Tomcat Users List
Sent: 24-07-03 13:44
Subject: Forwarding with parameters

Hello,

I have code in a servlet that, based on transaction status, forwards to
another target page. The code snippet is:

String target = /index.jsp;
ServletContext c = getServletContext();
RequestDispatcher d = c.getRequestDispatcher(target);
response.setContentType(text/html);
d.forward(request, response);

How can I set new parameters for the target page? Is it as simple as
setting
   String target = /index.jsp?param=val;

I ask this since it doesn't seem to work -- that parameter does not seem
to get set.

Also, at this point I'm in an https session and I'd like to transfer to
unencrypted protocol -- how can I do that?

Thanks in advance,
Gil



-
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]




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: Problem with Dir Structure...

2003-07-24 Thread Shapira, Yoav

Howdy,

i think this should be your servlet mapping:

servlet-mapping
servlet-nameShowParameters/servlet-name
url-pattern/testapp/ShowParameters/url-pattern
/servlet-mapping

No: url-pattern is relative to the app docBase and should not include
the app name.

(The above would let the servlet be access via
http://host:port/testapp/testapp/ShowParameters which is not what he
wants)

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: Tomcat training

2003-07-24 Thread Shapira, Yoav

Howdy,
The best is this list ;) ;) ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Norris Shelton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 4:38 PM
To: [EMAIL PROTECTED]
Subject: Tomcat training

I saw the e-mail about the tomcat training offered by
http://www.galatea.com/training.  Is this worth going to?  Are
there others?  What is the best?

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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]



running as diff. account

2003-07-24 Thread Astrid Wagner
Hi,
This may be off topic but maybe someone else had this requirement:
I need to call a system call running in a different account than the
account the web application runs:
E.g All web applications etc. run as accountA but my web application needs
to call a rsh command (via native interface) run as accountB.
Thanks a lot.
Astrid
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: running as diff. account

2003-07-24 Thread John Turner
Use the -l command option for rsh to designate the remote username 
that should be used.

John

Astrid Wagner wrote:

Hi,
This may be off topic but maybe someone else had this requirement:
I need to call a system call running in a different account than the
account the web application runs:
E.g All web applications etc. run as accountA but my web application 
needs
to call a rsh command (via native interface) run as accountB.
Thanks a lot.
Astrid

-
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 as diff. account

2003-07-24 Thread Juan Nin
From: Astrid Wagner [EMAIL PROTECTED]

 This may be off topic but maybe someone else had this requirement:
 I need to call a system call running in a different account than the
 account the web application runs:
 E.g All web applications etc. run as accountA but my web application
needs
 to call a rsh command (via native interface) run as accountB.

maybe you can use su or maybe you can make a copy of rsh, whose owner is
the user you need
not sure if any of those would work, but..

Regards,

Juan


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



  1   2   3   >