Re: session timeout not working anymore :(

2003-02-05 Thread Bill Barker
I admit not not looking at this in detail.  But the lack or a 'return;'
statement after the jsp:forward is a major red flag.

Sundar Narasimhan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi, I'm running out of options -- but is there a problem with
 getSession(false)?

 Sigh. We used to have a piece of code included in our jsp's like so:
 header-inc
 % if (request.getSession(false) == null) { %
   jsp:forward page=logout.jsp?TIMEOUT=60 /jsp:forward
 % } %
 jsp:useBean id=user scope=session class=webapps.common.User/
 header-inc
 and that was included in our files like so. That used to work.. but
 now when I have struts-html and struts-bean.. it always fails.
 Is there something wrong with getSession(false) now?

 The stack doesn't seem to include the struts generated servlets.. so
 I'm really puzzled!!

 Any help will be much appreciated even if it's only to say.. it's not
 struts :)

 I'm running Tomcat 4.18 on Windows XP.
 Thanks.
 main.jsp
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 html:html
 HEAD
 %@ page
 language=java
 contentType=text/html; charset=ISO-8859-1
 pageEncoding=ISO-8859-1
 %
 META http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1
 META name=GENERATOR content=IBM WebSphere Studio
 META http-equiv=Content-Style-Type content=text/css
 LINK href=theme/tigris.css rel=stylesheet type=text/css
 TITLE/TITLE
 /HEAD

 body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0
 class=composite
 %@ include file=header-inc.jsp %

 ---
 javax.servlet.ServletException: class com.ascent.webapps.common.User :
 java.lang.InstantiationException: com.ascent.webapps.common.User
   at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
 at
 org.apache.jsp.contactus_jsp._jspService(contactus_jsp.java:355)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
 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(Application
FilterChain.java:247)
 at

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

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 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.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 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:432)
 at

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

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
 at 

Setting up Tomcat to run JSP pages...

2003-02-05 Thread Nicholas J Campbell
Hi,
I'm new to Tomcat, using 4.1, and have set up Tomcat to run with
Apache...that works. However my question is how can I put a JSP page or
servlet in my site directory and have Tomcat recognize it and render it
even though it's in a folder outside of web-inf? I'm using windowsXP
right now.
Thank you, in advance, for the help.

-Nicholas Campbell
 
In a world without walls and barriers, what need is there for windows
and gates! - a mac ad
-
I never let schooling get in the way of my education. - MT
-
Live Penguine! - Tux the linux mascot
Vivez le penguine!, ¡Viva en penguine!, Lang lebe der Pinguin!, Viva no
penguine!, Viva sul penguine!
-
There are 10 kinds of people in this world...those who understand
binary...and those who don't! - ThinkGeek.com
 
 




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




RE: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF

2003-02-05 Thread Tam, Michael
Maybe you can post a segment of the code or example to illustrate your
problem.

Michael

-Original Message-
From: Andy Meadows [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 2:25 PM
To: Tomcat Users List
Subject: Re: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


Doing that.

Actually, further testing reveals that the problem occurs with the
statement.  If an exception occurs while the statement is being prepared,
then an exception is thrown.  However, it would appear that this exception
is thrown after a cursor is opened (internally) and that cursor is never
closed.  A call to close on the statement in turn throws a NPE because a
value was never assigned to it.  Thus, I'm left with an open cursor on an
object that I can't reach.

Can anyone else validate this?

Andy



- Original Message -
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 4:22 PM
Subject: RE: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


 Have seen this problem before.
 It is the JDBC code.  The best solution is to explicitly close RESULTSET,
 STATEMENT (of any kind), and CONNECTION as soon as you finished using the
 object ( or else close them in the FINALLY block)

 Regards,
 Michael

 -Original Message-
 From: Sean Dockery [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 1:04 PM
 To: Tomcat Users List
 Subject: Re: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


 Try explicitly closing your ResultSet variables as well.  See if the
 problem persists.

 At 13:58 2003-02-04, you wrote:
 Configuring Tomcat to provide a JNDI connection pool was no problem.
Now,
 however, we are getting error ORA-01000: maximum cursors opened.  Logging
 shows that any statement and connection that is opened is again closed
 which, according to everything I read, release the cursors.  This is
 obviously not the case.
 
 Has anyone else experienced this problem and, if so, what was the
 resolution -- other than increasing opened cursor counts.
 
 Andy Meadows
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.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]



-
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: LE vs. Full

2003-02-05 Thread Joe Tomcat
On Tue, 2003-02-04 at 23:21, Rick Fincher wrote:
 Type java -version from the command line where you are running the RPM to be
 sure you are getting 1.4.1.  RH 8.0 ships with a JDK 1.3.1.
 
 JAVA_HOME doesn't have any effect on the shell, only on Tomcat.  You have to
 set your path so that the shell finds 1.4.1 before 1.3.1, so it can find all
 the 1.4.1 stuff it is looking for for the dependency checks.
 
 Since a Tomcat install doesn't install any libraries or do anything except
 upack the files you might be able to roll your own simple RPM to install it.
 Or just write a script that unpacks Tomcat with the assumption that 1.4.1 is
 already installed.

I looked at it some more.  This is what the tomcat rpm requires:

# rpm -q -p tomcat4-4.1.18-le.1jpp.noarch.rpm -R
jaxp_parser_impl
xml-commons-apis
/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) = 4.0-1
rpmlib(CompressedFileNames) = 3.0.4-1
/bin/sh

And this is what the j2sdk rpm provides:

# rpm -q --provides j2sdk-1.4.1-fcs
j2sdk = 2000:1.4.1-fcs

It seems like Sun's Java rpm doesn't indicate that it provides
jaxp_parser_impl or xml-commons-apis, so the Tomcat rpm doesn't work.  I
tried it like this:

# rpm --install -v --nodeps tomcat4-4.1.18-le.1jpp.noarch.rpm
Preparing packages for installation...
tomcat4-4.1.18-le.1jpp
couldn't find /usr/share/java/jaxp_parser_impl.jar
make sure to have a JAXP_PARSER RPM installed and make a symlink :
ln -s /usr/share/java/jaxp_parser.jar /var/tomcat4/common/endorsed/
couldn't find /usr/share/java/xml-commons-apis.jar
make sure to have  xml-commons-apis RPM installed and make a symlink :
ln -s /usr/share/java/xml-commons-apis.jar /var/tomcat4/common/endorsed/

which forces it to install without checking dependencies.  It complains
that it wants a jaxp_parser_impl.jar and a xml-commons-apis.jar
somewhere.  However, I disregarded those complaints from it, and ran it
and it works fine.

So my suggestion is this: Maybe the tomcat-4-4.1.18-le.rpm should
check for j2sdk-1.4 instead of looking for jaxp_parser and xml-commons? 
If it worked that way, I could just do rpm install of the Sun j2sdk, and
then rpm install tomcat-le, and it would be done.  Otherwise, I will
just use --nodeps, but that is somewhat contrary to the idea of an rpm,
right?

Thanks!



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




To: Tony F. White

2003-02-05 Thread Trevor Baker
Hi Tony,

Just want to say thanks for the help (not on the subscribe list here thus
the new message). It worked BTW but you already knew that ;-)

Just one more question for you if you don't mind... where did you find that
gem of info about JkSet? I'd like to get my hands on some docs on the area
especially some examples of JkUriSet. Any pointing to the right direction is
much appreciated (except for jakarta's jk2 doc page).

Thanks again,
Trevor Baker

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: DataSource.getConnection() hangs

2003-02-05 Thread Maris Orbidans

I have it:

  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/BooksDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

 -Original Message-
 From: Lindomar [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 7:16 PM
 To: Tomcat Users List
 Subject: Re: DataSource.getConnection() hangs
 
 
 Put this:
 ==
 resource-ref
   descriptionany description/description
   res-ref-namejdbc/BooksDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 ==
 In web.xml of your application.
 
 See too
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
 e-examples-how
 to.html
 
 Ok.
 
 - Original Message -
 From: Maris Orbidans [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 15:47
 Subject: DataSource.getConnection() hangs
 
 
 E-mail Premium BOL
 Antivírus, anti-spam e até 100 MB de espaço. Assine já!
 http://email.bol.com.br/
 
 ok, I configured data source,  wrote those lines you can see below in
 server.xml, inside Context tag.
 
 Now Tomcat just hangs, when I call DataSource method 
 getConnection.  I use
 Tomcat 4.1.18
 
 has anybody experienced this ?
 
 Maris Orbidans
 
 
 ResourceParams name=jdbc/BooksDB
 parameter
 namevalidationQuery/name
 value/
 /parameter
 parameter
 nameurl/name
 valuejdbc:mysql://localhost/booksdb/value
 /parameter
 parameter
 namepassword/name
 valuehh/value
 /parameter
 parameter
 namemaxActive/name
 value16/value
 /parameter
 parameter
 namemaxWait/name
 value5000/value
 /parameter
 parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
 nameusername/name
 valuepoweruser/value
 /parameter
 parameter
 namemaxIdle/name
 value2/value
 /parameter
 /ResourceParams
 
 
  -Original Message-
  From: Cristian Draghici [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 30, 2003 11:07 AM
  To: Tomcat Users List
  Subject: RE: Cannot load JDBC driver class 'null'
 
 
  yes it will
 
  shutdown tomcat and edit the server.xml file by hand.
  (add the ResourceParams entry under your context)
  add the necessary entries, start tomcat and the admin console
  should work.
 
  (at least that's what happens with my tomcat 4.1.18)
  hope this helps,
  cristi
 
  -Original Message-
  From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 30, 2003 11:03 AM
  To: Tomcat Users List
  Subject: Cannot load JDBC driver class 'null'
 
 
  hello
 
  I have run into that problem too, I defined a datasource and
  put driver and
  common/lib and defined resource-ref in web.xml
  of my web. app.  but if throws exception when I try to get a
  connection from
  datasource I have found.
 
  I tried to do it at home with different database with the
  same result, so I
  dont think I have mistyped something.
 
  I know this problem has been adressed before but I havent
  found any solution
  from maillist archives.
 
  BTW I have found one related thing:  If you open Tomcat admin
  tool, choose
  host - context - context name - Data sources
  it will throw an exception:
 
  org.apache.jasper.JasperException: Exception retrieving attribute
  'driverClassName'
 
  so...
 
  I there any known solution ?
 
 
  Maris Orbidans
  www.datapro.lv
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




RE: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread ps
Yes, it's there, I mean, is in lib since tomcat 3.2.4 have not the
common\lib structure.

On Tue, 2003-02-04 at 21:40, Zabel, Ian wrote:
 I'm assuming you copied the commons-dbcp.jar into 3.2.4's common\lib
 directory.
 
 Did you remember to also copy commons-collections.jar which dbcp needs?
 
 Ian.
 
 -Original Message-
 From: ps [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, February 04, 2003 4:35 PM
 To: Tomcat Users List
 Subject: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)
 
 Greetings,
 
 I'm downgrading my web application to work on tomcat 3.2.4 (initially
 was developed and tested OK on tomcat 4.1.18). I'm using DBCP1.0.
 
 problem:
 
 I can't get a datasource through JNDI that usually worked fine in tomcat
 4.1.x, instead I'm getting an exception! Since I'm not aware about the
 compatibility versions of tomcat, I ask for your help.
 
 exception:
 --
 
 javax.naming.NoInitialContextException: Need to specify class name in
 environment or system property, or as an applet parameter, or in an
 application resource file:  java.naming.factory.initial
 at
 javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
 at
 javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
 at
 javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:2
 80)
 at javax.naming.InitialContext.lookup(InitialContext.java:347)
 ...
 
 
 And is caused on the following server code:
 
 try{
   Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env/);
 this.ds = (DataSource)envCtx.lookup(/jdbc/ngincaredb);
 }
 catch(NamingException e){
 logger.fatal(datasource error, e);
 }
 
 
 web.xml:
 
 resource-ref
   res-ref-namejdbc/ngincaredb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 
 
 server.xml:
 ---
 Context path=/ngincare 
  docBase=webapps/ngincare 
  crossContext=true
  debug=9 
  reloadable=true 
  trusted=false 
 
Resource name=jdbc/ngincaredb auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/ngincaredb
  parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
   ...
   /ResourceParams
 
 /Context
   
 thanks,
 Pedro Salazar
 
 -- 
 ps 
 [EMAIL PROTECTED]
 key id: 0E129E31D803BC61
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




RE: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread ps
Its also there! I just downgraded from tomcat 4.1.x but I brought all
the dependent files.

See the exception error that has a strange message and probably has
something to do with JNDI...

thanks,
Pedro Salazar

On Tue, 2003-02-04 at 21:40, Zabel, Ian wrote:
 Whoops, and commons-pool.jar?
 
 -Original Message-
 From: ps [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, February 04, 2003 4:35 PM
 To: Tomcat Users List
 Subject: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)
 
 Greetings,
 
 I'm downgrading my web application to work on tomcat 3.2.4 (initially
 was developed and tested OK on tomcat 4.1.18). I'm using DBCP1.0.
 
 problem:
 
 I can't get a datasource through JNDI that usually worked fine in tomcat
 4.1.x, instead I'm getting an exception! Since I'm not aware about the
 compatibility versions of tomcat, I ask for your help.
 
 exception:
 --
 
 javax.naming.NoInitialContextException: Need to specify class name in
 environment or system property, or as an applet parameter, or in an
 application resource file:  java.naming.factory.initial
 at
 javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
 at
 javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
 at
 javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:2
 80)
 at javax.naming.InitialContext.lookup(InitialContext.java:347)
 ...
 
 
 And is caused on the following server code:
 
 try{
   Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env/);
 this.ds = (DataSource)envCtx.lookup(/jdbc/ngincaredb);
 }
 catch(NamingException e){
 logger.fatal(datasource error, e);
 }
 
 
 web.xml:
 
 resource-ref
   res-ref-namejdbc/ngincaredb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 
 
 server.xml:
 ---
 Context path=/ngincare 
  docBase=webapps/ngincare 
  crossContext=true
  debug=9 
  reloadable=true 
  trusted=false 
 
Resource name=jdbc/ngincaredb auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/ngincaredb
  parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
   ...
   /ResourceParams
 
 /Context
   
 thanks,
 Pedro Salazar
 
 -- 
 ps 
 [EMAIL PROTECTED]
 key id: 0E129E31D803BC61
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




Re: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread ps

On Tue, 2003-02-04 at 22:38, Sean Dockery wrote:
 Weird that your envCtx.lookup is done on /jdbc/ngincaredb.  I've never seen 
 it done on an absolute path before.  :-)

Yes, I don't know why I put it like that, maybe I was guided by an
example, maybe it was a writing mistake that worked fine in tomcat
4.1.x, ... I don't know :-|

 
 Please provide all of the parameters that you are declaring under the 
 ResourceParams section.  (I don't want to know your username and 
 password--I just want to know the entire list...)
 

Sure! I just didn't put that here because I was thinking in a macro
structure and maybe the rest (password or not) was not relevant to debug
my problem. But as you request it, I will post the complete resource
here.

Resource name=jdbc/ngincaredb auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/ngincaredb
   parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
nameusername/name
valueuser/value
   /parameter
   parameter
namepassword/name
valuepass/value
   /parameter
   parameter
nameurl/name 
valuejdbc:oracle:thin:@192.168.89.52:1521:dbdev817/value
   /parameter
   parameter
namemaxActive/name
value25/value
   /parameter
   parameter
namemaxWait/name
value50/value
   /parameter
   parameter
namemaxIdle/name
value15/value
   /parameter
   parameter
namevalidationQuery/name
valueselect 1 as test from dual/value
   /parameter
   parameter
nameremoveAbandoned/name
valuetrue/value
   /parameter
   parameter
nameremoveAbandonedTimeout/name
value60/value
   /parameter
/ResourceParams

Thanks,
Pedro Salazar

 At 14:34 2003-02-04, you wrote:
 And is caused on the following server code:
 
 try{
  Context initCtx = new InitialContext();
  Context envCtx = (Context)initCtx.lookup(java:comp/env/);
  this.ds = (DataSource)envCtx.lookup(/jdbc/ngincaredb);
 }
 catch(NamingException e){
  logger.fatal(datasource error, e);
 }
 
 
 web.xml:
 
 resource-ref
  res-ref-namejdbc/ngincaredb/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
 /resource-ref
 
 
 server.xml:
 ---
 Context path=/ngincare
   docBase=webapps/ngincare
   crossContext=true
   debug=9
   reloadable=true
   trusted=false 
 
 Resource name=jdbc/ngincaredb auth=Container
  type=javax.sql.DataSource/
ResourceParams name=jdbc/ngincaredb
   parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  ...
/ResourceParams
 
 /Context
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.com
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




singleton creation (ot)

2003-02-05 Thread Felipe Schnack
  I was wondering... this code is valid to avoid excessive use of
synchronized code? I think so, but we never know :-)
  This is the default getInstance() method of a singleton (simplified):

public Object getInstance()
{
  if (INSTANCE == null)
  {
synchronized (this)
{
  if (INSTANCE == null)
  {
INSTANCE = this.getClass().newInstance();
  }
}
  }
  return INSTANCE;
}

-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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




RE: singleton creation (ot)

2003-02-05 Thread Daniel Brown
The simple answer is 'no'.

For the more complex answer, read the 'Double-Checked Locking is Broken'
declaration at:

http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

To complicate matters even further, check out the JavaDoc to the Fast*
utilities in the Jakarta commons. For example:

http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect
ions/FastTreeMap.html

(apologies for the wrap).

Dan.

 -Original Message-
 From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
 Sent: 05 February 2003 11:21
 To: Tomcat Users List
 Subject: singleton creation (ot)


   I was wondering... this code is valid to avoid excessive use of
 synchronized code? I think so, but we never know :-)
   This is the default getInstance() method of a singleton (simplified):

 public Object getInstance()
 {
   if (INSTANCE == null)
   {
 synchronized (this)
 {
   if (INSTANCE == null)
   {
 INSTANCE = this.getClass().newInstance();
   }
 }
   }
   return INSTANCE;
 }

 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Centro Universitário Ritter dos Reis
 http://www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303341


 -
 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: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread ps
Please, how should I interpret the exception message header below:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial

I'm using jdk1.4.1 (SUN) and tomcat 3.2.4.

thanks,
Pedro Salazar.

On Tue, 2003-02-04 at 21:34, ps wrote:
 Greetings,
 
 I'm downgrading my web application to work on tomcat 3.2.4 (initially
 was developed and tested OK on tomcat 4.1.18). I'm using DBCP1.0.
 
 problem:
 
 I can't get a datasource through JNDI that usually worked fine in tomcat
 4.1.x, instead I'm getting an exception! Since I'm not aware about the
 compatibility versions of tomcat, I ask for your help.
 
 exception:
 --
 
 javax.naming.NoInitialContextException: Need to specify class name in
 environment or system property, or as an applet parameter, or in an
 application resource file:  java.naming.factory.initial
 at
 javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
 at
 javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
 at
 javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
 at javax.naming.InitialContext.lookup(InitialContext.java:347)
 ...
 
 
 And is caused on the following server code:
 
 try{
   Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env/);
 this.ds = (DataSource)envCtx.lookup(/jdbc/ngincaredb);
 }
 catch(NamingException e){
 logger.fatal(datasource error, e);
 }
 
 
 web.xml:
 
 resource-ref
   res-ref-namejdbc/ngincaredb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 
 
 server.xml:
 ---
 Context path=/ngincare 
  docBase=webapps/ngincare 
  crossContext=true
  debug=9 
  reloadable=true 
  trusted=false 
 
Resource name=jdbc/ngincaredb auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/ngincaredb
  parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
   ...
   /ResourceParams
 
 /Context
   
 thanks,
 Pedro Salazar
 
 -- 
 ps 
 [EMAIL PROTECTED]
 key id: 0E129E31D803BC61
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




RE: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
  Hmm... nice links!
  The first one said about a proposal of solving this problem through
the use of volatile keyword... this was implemented in jdk 1.4? It
seems that site is older than this release...
  I'm not sure yet of how I will do it... I would not like to
synchronize the entire method because it'll probably be called million
of times in my app

On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
 The simple answer is 'no'.
 
 For the more complex answer, read the 'Double-Checked Locking is Broken'
 declaration at:
 
 http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
 
 To complicate matters even further, check out the JavaDoc to the Fast*
 utilities in the Jakarta commons. For example:
 
 http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect
 ions/FastTreeMap.html
 
 (apologies for the wrap).
 
 Dan.
 
  -Original Message-
  From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
  Sent: 05 February 2003 11:21
  To: Tomcat Users List
  Subject: singleton creation (ot)
 
 
I was wondering... this code is valid to avoid excessive use of
  synchronized code? I think so, but we never know :-)
This is the default getInstance() method of a singleton (simplified):
 
  public Object getInstance()
  {
if (INSTANCE == null)
{
  synchronized (this)
  {
if (INSTANCE == null)
{
  INSTANCE = this.getClass().newInstance();
}
  }
}
return INSTANCE;
  }
 
  --
 
  Felipe Schnack
  Analista de Sistemas
  [EMAIL PROTECTED]
  Cel.: (51)91287530
  Linux Counter #281893
 
  Centro Universitário Ritter dos Reis
  http://www.ritterdosreis.br
  [EMAIL PROTECTED]
  Fone/Fax.: (51)32303341
 
 
  -
  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]
 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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




RE: Why won't anyone help me out??

2003-02-05 Thread Turner, John

I was not talking to you, Steve.  I actually shouldn't even be replying now,
but I see you've changed your email address which is how this got past my
filter, and I would like to try and help (I really would), but I honestly
don't have the time.  Even if I did, I am primarily a systems administrator,
not a developer, so I doubt I could answer your Java programming questions.
I've tried and tried and tried to help you in the past, as have other
people, and it just isn't an effective, efficient use of my time.

My suggestion: buy a book (like the two O'Reilly books dealing with servlets
and JSPs) and subscribe to a java-user list.  You'll probably get a lot more
response for your beginning Java questions there than you will here.   I'm
not being arrogant or mighty when I say that (I'm actually a very humble
person but with an extremely direct and blunt demeanor), I am simply making
an observation.  You've been posting here for months (at least 8) and are
still having problems, the most recent of which are not related to Tomcat.
I think that may be a good indicator for you that this list is not the list
that can help you, and is not a list where you can get help the quickest.
I'm sure there are other lists out there that can give you the full and
complete answer you are looking for, and do so in the timeframe you demand.

John

-Original Message-
From: Steve Burrus [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 1:25 AM
To: Tomcat Users List
Subject: RE: Why won't anyone help me out??



Hi John, were you directly addressing me in your post or that other guy who
wrote me that little choice email?? I don't wanna perpetuate this flame
war which I seem to be momentarily bogged down in right now, but I was
just a little bit curious as to who you were talking to!!!

 Surely the mighty John Turner hasn't broken his self-imposed silence as
far as dealing with little pathetic me, because IF you have possibly
broken that silence, then I have a doozy of a program that I could
certainly refer to you and yer expertise in all things tomcat! The program
is a simple login.jsp that authenticates a user's pw and username to then
let him/her into their email inbox say. If you happen to know a Filip Hanik
of our group, ask him for the details of my particular problem because I
just now emailed him all of the required files which I have been using in
the program.  

 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




Re: java processes after tomcat exits

2003-02-05 Thread Sven Koehler
Are you on Linux? Do you have LD_KERNEL_ASSUME=2.2.5 set?


Do i need this for JDK1.4?
i thought it's only needed for JDK1.3



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




Tomcat 3.2.1, IIS 5 and AJPv12

2003-02-05 Thread derrick . robertson
I am currently running the above for my servlet application.
(tomcat 3.2.1, IIS 5 and AJPv12)

Cant get more than 250 syncronous users with this setup!! Is 250 users to
much for this system. What can i improve to get more than this

My problem is that I am getting a page not found error(405.htm i think)
when I push the number of simultaneous threads up to 250. I can set my
server up to a limit on 200 threads (get 403-9.htm) and dont get the
previous error page.

When I look in my ISAPI.log file fore errors, i get this:
jk_ajp12_worker.c : ajpv12_handle_response, error writing back to server
jk_isapi_plugin.c : jk_ws_service_t::write, writeclient failed

(basically lots of these ajp12 worker and isapi plugin error messages)
No other errors noted, except instead of JSP page, I get a default error
page as mentioned previously.

I am running a default connection pool through my tomcat configuration!!
What is likely to be the problem!!

Is 250 threads to hardcore for this setup!
Is it my memory or server (dual-700 x86 nt)
Has anybody had this setup over 250 threads??

Any ideas on how to test this further to find out where the bottleneck is, I
would most apprechiate.

Derrick D Robertson
BTexact Technologies
Business Solutions Research Lab
Communications rep for Business Systems Research Lab
http://technology.intra.bt.com/enterprise-research/labs/bus-sys%20lab.htm
e-mail:  [EMAIL PROTECTED]
tel: (+44)(0)1473 606521
mob: (+44)(0)7718923254
MLBG pp13, Adastral Park, Martlesham, Ipswich IP5 3RE

BTexact Technologies is a trademark of British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ 
Registered in England no. 180 
This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.



-Original Message-
From: Sven Koehler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:52 AM
To: [EMAIL PROTECTED]
Subject: Re: java processes after tomcat exits


 Are you on Linux? Do you have LD_KERNEL_ASSUME=2.2.5 set?

Do i need this for JDK1.4?
i thought it's only needed for JDK1.3



-
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: Why won't anyone help me out??

2003-02-05 Thread Turner, John

Steve, if you're going to post to a list, please get acquainted with the
concept of threaded discussions.

My first reply in this thread was not to you, but to the person known as
jsp.

His reply of live long and prosper was directed to me, to my reponse.  You
can see this because he included my post in his (her?) reply.

You will have a LOT LESS frustration if you take some time and become
acquainted with the concept of threaded discussions and replies.  Just
because you start a topic does not mean every reply in that topic is
directed to you.  Just like a conversation in the real world, an
email/list discussion has the ability to go off on tangents.

You'll be doing yourself a big favor and help make your time MUCH MORE
effective and make more progress getting a solution as soon as you
understand that 1) not everyone hates you, 2) not everyone is directing
their replies directly to you even though you started the topic, and 3) the
people on this list would love to help you and have tried to so
significantly in the past but, like you, are getting frustrated.  A lot of
us are extremely busy, and we like to see our time being used effectively
and efficiently (we can help more people that way), and we get annoyed and
irritated when people submit posts that have critical or demanding tone,
implied or explicit insults and criticisms, and unreasonable demands,
especially if they do so repeatedly in spite of polite requests to stop.

Remember, this list is free.  Nobody is required to be here, and nobody is
required to help anyone else.  Getting adamant and abusive about not getting
help isn't going to help you, and isn't going to get you any progress.

Call me arrogant if you want, it's simply not the case.  I am trying to
explain to you how to get the most out of this list and help decrease your
frustration level.  As I'm sure others do, I just want my time to be spent
as effectively as possible...time is too valuable.

John

-Original Message-
From: Steve Burrus [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 1:32 AM
To: Tomcat Users List
Subject: RE: Why won't anyone help me out??


JSP, right before I go to beddie bye for the nite, I just had to ask u
directly what in the hell you meant by the damned phrase Live long, and
prosper? Were you trying/attempting to be cute or something because we
really don't need that kind of cuteness in our little newsgroup!!!
Capiche?!

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: Tomcat 4.1.18 will not start for me(Hello am to facing the same problem is there anyone to help us out)

2003-02-05 Thread Turner, John

Never saw that error before, but if I was getting it I would investigate two
things:

1) JDK version

2) file system permissions

Neither may be correct, that's just what I would look for first.

John


-Original Message-
From: zaf nasha [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 1:04 AM
To: Tomcat Users List
Subject: Re: Tomcat 4.1.18 will not start for me(Hello am to facing the same
problem is there anyone to help us out)



Dear John
If u get the way to solve this problem pls do reply me and send me solution,
i would be really  very grateful for your this kind help. zafar  John-P King
[EMAIL PROTECTED] wrote:I am trying to get tomcat version 4.1.18 to run
on a Windows 2000 server. 
But after installing the JDK and then the tomcat server I cannot get it to 
startup. When I try to start it a command window pops up and then goes 
away without any text written to the window. I looked at the log files and 
I see this: 
stderr:
---
java.lang.NullPointerException
at 
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java, 
Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java, 
Compiled Code) 
stdout:
---
Bootstrap: Create Catalina server
Bootstrap: Class loader creation threw exception
java.lang.IllegalMonitorStateException: current thread not owner at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java, 
Compiled Code)
at 
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java, 
Compiled Code)
at 
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java, 
Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java, 
Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java, 
Compiled Code) 

Any guru's out there that might be able to help me out


-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




Realm url-pattern problems

2003-02-05 Thread afterz
Hi, I am working on an application using Realm.
I'm trying to use /*.htm in the ur-pattern tag but it is
 not working.
Is that a bug? Am I doing anything wrong?

security-constraint
web-resource-collection
web-resource-nameSample/web-resource-name
url-pattern/*.htm/url-pattern
/web-resource-collection
auth-constraint
role-nameguest/role-name
/auth-constraint
/security-constraint

I'll appreciate all help.
Thanks.

Ricardo Kohler Costa.

Don't E-Mail, ZipMail! http://www.zipmail.com/

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




RE: tomcat's serlvet container and http

2003-02-05 Thread Turner, John

Perhaps you could also post this on tomcat-dev.  You might get a quicker
response.

John


-Original Message-
From: rf [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 12:37 AM
To: [EMAIL PROTECTED]
Subject: Re: tomcat's serlvet container and http


Hello
No answer to any of the questions below? 
Rf

Subject:  tomcat's serlvet container and http
From: rf rufoo2001 () yahoo ! com
Date: 2003-02-03 1:59:58

Hello
I have some questions related to how tomcat's servlet
container handles some HTTP/1.1 issues. Understanding
these, I think, would be beneficial in improving the performance of my
web-application. Here they go:

1. How can my servlet respond with transfer encoding
as chunked? When is my serlvet's OutputStream
committed? I dont have all my data ready, I want send
it out in chunks - how do I do it?

2. How can I use 100 Continue response header? This
is usually used on slow links, but I want to use it
when my processing is slow. My servlet is doing some
processing and is going to take some more time - how
do I inform this to my client? Can I just set HttpServletResponse.setStatus
(SC_CONTINUE)? (Can this response be sent more than once?) If this method is
not right for the scenario, what is the recommended way of informing the
client to patiently wait for some more time?

3. The response in HTTP/1.1 can have footers in
addition to headers, how do I set a footer? I
guess we cannot use HttpServletResponse.setHeader
because the servlet spec says setting a header has no
effect if the response is already committed.

4. Persistant connections - is this configurable in a
tomcat? It might be the case that this is not
something a user should bother about, the servlet
container will take care of it. What does tomcat do?
Whenever needed, I want to recommend my client to use
a persistant connection for following requests. Can I
do it? An IE question: what factors determine that IE
should use a persistant connection?

5. If-modified-since header. There is a
getLastModified method in the servlet interface, this
returns a long(for date). I guess I should implement
this method for tomcat to respect the
if-modified-since header. I recently implemented a
caching filter, which intelligently uses the default
servlet to serve cached static content. But since the
former method is simple and more effective, I would
like to know when IE uses this header. Since this
header is optional, how do I recommend IE to use it?

Thank you,
~rf


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: Why won't anyone help me out??

2003-02-05 Thread Donie Kelly
constant whiner writes:
 I will try to be more charming and gracious in my dealings with our
newsgroup in the future, I promise you!
and then continues on with...
JSP, right before I go to beddie bye for the nite, I just had to ask u
directly what in the hell you meant by the damned phrase Live long, and
prosper? Were you trying/attempting to be cute or something because we
really don't need that kind of cuteness in our little newsgroup!!!
Capiche?!
From my experience on this list you attitude will get you nowhere and you
should take the advice as given. Most of your problems are because you are
in over your head and maybe you need to stand back and get the little things
working first and develop an understanding of how this stuff works before
begging for answers. None of us have time for that kind of detail. We have
work to do ourselves you know... If you have a specific technical problem
that goes beyond reading the first pages of a servlets book then we will
gladly help. Otherwise have a look at www.amazon.com 
Donie



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




Re: DBCP+TOMCAT 3.2.4 - javax.naming.NoInitialContextException

2003-02-05 Thread ps
It appears that it needs more than an empty constructor in
InitialContext():

try{
   Context initCtx = new InitialContext();
   Context envCtx = (Context)initCtx.lookup(java:comp/env/);
   this.ds = (DataSource)envCtx.lookup(/jdbc/ngincaredb);
}
catch(NamingException e){
   logger.fatal(datasource error, e);
}

So, the solution maybe doing something like this:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, );
Context initCtx = new InitialContext(env);

But the obvious question (and unknown for me) is what should be the
tomcat 3.2.4 default JNDI factory to put in
Context.INITIAL_CONTEXT_FACTORY attribute?? And why in tomcat 4.1.x it's
enough put a empty InitialContext()?? 

I don't find docs for tomcat 3.2.x about the resources/jndi...

thanks,
Pedro Salazar.

On Wed, 2003-02-05 at 11:48, ps wrote:
 Please, how should I interpret the exception message header below:
 
 javax.naming.NoInitialContextException: Need to specify class name in
 environment or system property, or as an applet parameter, or in an
 application resource file:  java.naming.factory.initial
 
 I'm using jdk1.4.1 (SUN) and tomcat 3.2.4.
 
 thanks,
 Pedro Salazar.
 

-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




Re: Does TC 4.1.18 actually reuse tag handler instances?

2003-02-05 Thread Peter Lin

having done profiling in OptimizeIt with tomcat +
JSTL, I can say with confidence it does reuse the
tags.  How do I know?

I've ran profiles with jasper1 and jasper2. With
jasper 1 if I have say 200 tags in a page, it makes
200 tag objects. With jasper2, it makes one of each
tag. So if  have say 20 c:if tags in a page, there's
only one.

if you look at the generated source in the working
folder, you'll see this. You can easily verify this by
running 4.0.3 with jasper1 and compare the source
generated. It looks like you're using custom tags
which you've written yourself. Whether your tags are
written to take advantage of tag pooling is another
topic.

peter lin



--- David M. Karr [EMAIL PROTECTED] wrote:
 I've been following some of the discussions about
 reusing tag handlers, but
 after trying some test cases, I'm having trouble
 with a test case that is
 behaving differently than I expected.  I have a tag
 inside a Struts
 logic-el:iterate loop, and all the attributes of
 the tag are plain strings,
 not scriptlet expressions (although one is a JSTL EL
 expression).
 
 On the first iteration, the setter method is called
 on the attribute.  On the
 second iteration, I would have expected it to reuse
 the original tag handler,
 and NOT call the setter method.  I know it did reuse
 the tag handler, because I
 set a breakpoint in an empty default constructor in
 the tag, and it got there
 on the first iteration, but not on the second
 iteration.  On the second
 iteration, however, it DID call the setter method,
 which I believe, according
 to the specification, should not happen.
 
 I happen to know that a similar test case run under
 the Resin web container IS
 behaving as I would expect, by NOT calling the
 setter method on the second
 iteration, although I haven't seen the exact test
 case, but I'm pretty sure
 it's ver similar.  I don't have Resin installed.
 
 Just for completeness, here's the excerpt from my
 jsp page:
 
 
  logic-el:iterate
 collection=${testbean.stringArray} id=foo
indexId=ctr
   td
html-el:text name=testbean
 property=stringIndexed value=${foo}
  indexed=true/
   /td
  /logic-el:iterate 
 
 
 -- 

===
 David M. Karr  ; Java/J2EE/XML/Unix/C++
 [EMAIL PROTECTED]   ; SCJP; SCWCD
 
 
 
 

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


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: DataSource.getConnection() hangs

2003-02-05 Thread Roberts, Eric
Hi,

I had this problem a while ago.

Mine was caused by DBCP attempting to open a pool of Db connections when receiving the 
first getConnection() request - and my Db was not configured to handle that many 
connections - and it just hung waiting for the maxActive value to become available.

I omitted minIdle and maxActive parameters so that they defaulted (in my case 4 and 2) 
then it worked. I then got my DBA to reconfigure his startup parameters to something 
realistic.

HTH

-Original Message-
From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 05. Februar 2003 11:33
To: Tomcat Users List
Subject: RE: DataSource.getConnection() hangs



I have it:

  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/BooksDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

 -Original Message-
 From: Lindomar [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 7:16 PM
 To: Tomcat Users List
 Subject: Re: DataSource.getConnection() hangs
 
 
 Put this:
 ==
 resource-ref
   descriptionany description/description
   res-ref-namejdbc/BooksDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 ==
 In web.xml of your application.
 
 See too
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
 e-examples-how
 to.html
 
 Ok.
 
 - Original Message -
 From: Maris Orbidans [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 15:47
 Subject: DataSource.getConnection() hangs
 
 
 E-mail Premium BOL
 Antivírus, anti-spam e até 100 MB de espaço. Assine já!
 http://email.bol.com.br/
 
 ok, I configured data source,  wrote those lines you can see below in
 server.xml, inside Context tag.
 
 Now Tomcat just hangs, when I call DataSource method 
 getConnection.  I use
 Tomcat 4.1.18
 
 has anybody experienced this ?
 
 Maris Orbidans
 
 
 ResourceParams name=jdbc/BooksDB
 parameter
 namevalidationQuery/name
 value/
 /parameter
 parameter
 nameurl/name
 valuejdbc:mysql://localhost/booksdb/value
 /parameter
 parameter
 namepassword/name
 valuehh/value
 /parameter
 parameter
 namemaxActive/name
 value16/value
 /parameter
 parameter
 namemaxWait/name
 value5000/value
 /parameter
 parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
 nameusername/name
 valuepoweruser/value
 /parameter
 parameter
 namemaxIdle/name
 value2/value
 /parameter
 /ResourceParams
 
 
  -Original Message-
  From: Cristian Draghici [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 30, 2003 11:07 AM
  To: Tomcat Users List
  Subject: RE: Cannot load JDBC driver class 'null'
 
 
  yes it will
 
  shutdown tomcat and edit the server.xml file by hand.
  (add the ResourceParams entry under your context)
  add the necessary entries, start tomcat and the admin console
  should work.
 
  (at least that's what happens with my tomcat 4.1.18)
  hope this helps,
  cristi
 
  -Original Message-
  From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 30, 2003 11:03 AM
  To: Tomcat Users List
  Subject: Cannot load JDBC driver class 'null'
 
 
  hello
 
  I have run into that problem too, I defined a datasource and
  put driver and
  common/lib and defined resource-ref in web.xml
  of my web. app.  but if throws exception when I try to get a
  connection from
  datasource I have found.
 
  I tried to do it at home with different database with the
  same result, so I
  dont think I have mistyped something.
 
  I know this problem has been adressed before but I havent
  found any solution
  from maillist archives.
 
  BTW I have found one related thing:  If you open Tomcat admin
  tool, choose
  host - context - context name - Data sources
  it will throw an exception:
 
  org.apache.jasper.JasperException: Exception retrieving attribute
  'driverClassName'
 
  so...
 
  I there any known solution ?
 
 
  Maris Orbidans
  www.datapro.lv
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


-
To 

Missing from Documentation: Windows Multiple instances note

2003-02-05 Thread Powell.Kris
Installed Tomcat 4.1.18 for WinNT recently and have come across something
that isn't covered in the documentation.

When trying to get multiple instances of Tomcat running (in Windows), it
also needs a 'temp' directory in $CATALINA_BASE as well as the 'webapps',
'conf', etc...

Don't know if anyone here could add a note to the official documentation...



Apache+Tomcat+Ldap

2003-02-05 Thread Christoph Fischer
Hello,

I have tomcat linked to apache server. To get to the
tomcat server the user has to authenticate himself
to a web-site on the apache server which checks the password
against a ldap-server.
Is it possible to get the user name from the apache/ldap login
in my tomcat application ?

Chris


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




Apache JK problem

2003-02-05 Thread Stefan Berg
 
Hi,
 
I'm having problems with connecting Apache httpd 1.3.26 to Tomcat 4.1.18
using mod_jk.
 
My operating system is Solaris 8.
 
The error message I get in the apache httpd error log is this:
[Wed Feb  5 13:57:19 2003] [error] (2)No such file or directory: Error
while opening the workers, jk will not work 
 
I have done the following:
 
* Downloaded the binary distribution of mod_jk.so for apache without ssl,
and put it in the libexec-catalog under httpd.
* Enabled the auto config generation in server.xml to generate the
$CATALINA_HOME/conf/auto/mod_jk.conf
* included the auto-generated mod_jk.conf i my httpd.conf
* Enabled the Ajp 13 listener in server.xml
* Created the $CATALINA_HOME/conf/jk/workers.properties file (simple config
equal to example in docs)
* Specified the location to the mod_jk.so in server.xml using the
ApacheConfig-directive
 
Any ideas about this? 
 
I can't really work what the error message is about. The reference to the
workers.properties file within mod_jk.conf seems correct. Also the log file
looks ok. Have checked permissions on the log file as well just to be sure.
 
/Stefan



RE: Apache+Tomcat+Ldap

2003-02-05 Thread Collins, Jim
You can call javax.servlet.http.HttpServletRequest.getRemoteUser(). This
will return the username if the user has been authenticated otherwise null.

Regards

Jim.

 -Original Message-
 From: Christoph Fischer [mailto:[EMAIL PROTECTED]]
 Sent: 05 February 2003 13:24
 To: Tomcat Users List
 Subject: Apache+Tomcat+Ldap
 
 
 Hello,
 
 I have tomcat linked to apache server. To get to the
 tomcat server the user has to authenticate himself
 to a web-site on the apache server which checks the password
 against a ldap-server.
 Is it possible to get the user name from the apache/ldap login
 in my tomcat application ?
 
 Chris
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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




RE: Realm url-pattern problems

2003-02-05 Thread Jacob Hookom
/*.htm should just be *.htm

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 05, 2003 6:20 AM
| To: [EMAIL PROTECTED]
| Subject: Realm url-pattern problems
| 
| Hi, I am working on an application using Realm.
| I'm trying to use /*.htm in the ur-pattern tag but it is
|  not working.
| Is that a bug? Am I doing anything wrong?
| 
|   security-constraint
|   web-resource-collection
|   web-resource-nameSample/web-resource-name
|   url-pattern/*.htm/url-pattern
|   /web-resource-collection
|   auth-constraint
|   role-nameguest/role-name
|   /auth-constraint
|   /security-constraint
| 
| I'll appreciate all help.
| Thanks.
| 
| Ricardo Kohler Costa.
| 
| Don't E-Mail, ZipMail! http://www.zipmail.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]




Unwanted header when using Tomcat 3.2.4

2003-02-05 Thread Robert Veen, ten
Hello Tomcat users,
 
I'm using Tomcat 3.2.4 with jdk 1.2.2.009 on a Windows 2000 server with
IIS (Tomcat integrated in IIS). 
When I open the main page of an application, the page shows the header: 
 

(HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Mon, 30 Dec 2002
10:10:30 GMT Connection: close Content-Type: text/html;
charset=iso-8859-1 Servlet-Engine: Tomcat Web Server/3.2.4 (JSP 1.1;
Servlet 2.2; Java 1.2.2; Windows NT 5.0 x86; java.vendor=Sun
Microsystems Inc.)
The first few lines of source of the page look like this: 
//17 lines of white
 

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 17 Jan 2003 11:11:52 GMT
Connection: close
Content-Type: text/html; charset=iso-8859-1
Servlet-Engine: Tomcat Web Server/3.2.4 (JSP 1.1; Servlet 2.2; Java
1.2.2; Windows NT 5.0 x86; java.vendor=Sun Microsystems Inc.)
//18 lines of white 
 
 html
 head
  meta http-equiv=pragma content=no-cache
  meta http-equiv=expires content=-1
  meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1 /
 
  titleInfotelligence/title
  link rel=stylesheet type=text/css href=../../portalinabox.css
 
  script language=JavaScript
   !--
   window.name = mainWindow;
   function getDate()
What can I do to stop Tomcat showing the header?
 
Robert ten Veen



Preventing Session saving

2003-02-05 Thread Powell.Kris
I'm running Tomcat 4.1.18 on WinNT.

Is there a setting in the context, manager, etc where I can specify not to
try to continue sessions if the application crashes/ is reloaded?

My application can't serialize it's session data (doesn't implement
serializable) and if the application is reloaded I get
NullPointerExceptions. I think it's because the JSession cookie is submitted
by the user again -- however the session variables referred to no longer
exist and I get NullPointerExceptions. Any ideas?

Cheers, Kris



localhost:8080 connection refused

2003-02-05 Thread David Nelson
I have heard similar posts but after trying everything I can get my hands
on, Tomcat is still refusing to work  I get a connection refused.

Here are a few system details and what I've done.
OS RH 8.0
Tomcat 4.1.18
Apache 2.0.44
mod_jk-2.0.43.so
java2 1.4 (tested manually and works)
$JAVA_HOME and $CATALINA_HOME are set

httpd.conf has
LoadModule jk_module modules/mod_jk-2.0.43.so
Include /user/local/tomcat/conf/auto/mod_jk.conf

incidentally, the mod_jk.conf is not being generated.

Inside Tomcat's server.xml
Server port=8005 shutdown=SHUTDOWN debug=0
  Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /


Host name=localhost debug=0 appBase=webapps unpackWARs=true
  autoDeploy=true
   Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
append=true
   forwardAll=false
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /


Any ideas what I'm missing?

Thanks for any help.


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




localhost:8080 connection refused

2003-02-05 Thread David Nelson
I have heard similar posts but after trying everything I can get my hands
on, Tomcat is still refusing to work  I get a connection refused.

Here are a few system details and what I've done.
OS RH 8.0
Tomcat 4.1.18
Apache 2.0.44
mod_jk-2.0.43.so
java2 1.4 (tested manually and works)
$JAVA_HOME and $CATALINA_HOME are set

httpd.conf has
LoadModule jk_module modules/mod_jk-2.0.43.so
Include /user/local/tomcat/conf/auto/mod_jk.conf

incidentally, the mod_jk.conf is not being generated.

Inside Tomcat's server.xml
Server port=8005 shutdown=SHUTDOWN debug=0
  Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /


Host name=localhost debug=0 appBase=webapps unpackWARs=true
  autoDeploy=true
   Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
append=true
   forwardAll=false
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /


Any ideas what I'm missing?

Thanks for any help.


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




Re: Tomcat 4.1.18 will not start for me(Hello am to facing the same problemis there anyone to help us out)

2003-02-05 Thread John-P King
Zafar,

I have not heard any good advice yet but I will be sure to pass along 
anything of value that I hear.  Let me know if you have any luck as well!

John

--
Deutsche Asset Management
222 Riverside Plaza
Chicago, IL  60657
Phone: (312) 537-1763
E-Mail:  [EMAIL PROTECTED]
Fax:   (312) 537-2280




zaf nasha [EMAIL PROTECTED]
02/05/03 12:04 AM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:Re: Tomcat 4.1.18 will not start for me(Hello am to facing the 
same 
problem is there anyone to help us out)



Dear John
If u get the way to solve this problem pls do reply me and send me 
solution, i would be really  very grateful for your this kind help.
zafar
 John-P King [EMAIL PROTECTED] wrote:I am trying to get tomcat version 
4.1.18 to run on a Windows 2000 server. 
But after installing the JDK and then the tomcat server I cannot get it to 

startup. When I try to start it a command window pops up and then goes 
away without any text written to the window. I looked at the log files and 

I see this: 
stderr:
---
java.lang.NullPointerException
at 
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java, 
Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java, 
Compiled Code) 
stdout:
---
Bootstrap: Create Catalina server
Bootstrap: Class loader creation threw exception
java.lang.IllegalMonitorStateException: current thread not owner
at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java,
 

Compiled Code)
at 
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java, 
Compiled Code)
at 
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java,
 

Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java, 
Compiled Code)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java, 
Compiled Code) 

Any guru's out there that might be able to help me out


-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now




DBCP Log

2003-02-05 Thread Chanan Braunstein
Hi,
Is there a way to get DBCP to print out a log? It would be
useful for optimizing the maxidle and active to know at say one minute
interval how many connection I have open in any given pool. I already
use logAbandoned which is very helpful, but I need more information then
that.

Thanks,

Chanan Braunstein
knovel Corp.
Web Development Manager
607-648-4770 x672
http://www.knovel.com


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




how do i turn off tomcat's default error?

2003-02-05 Thread unix guy

-- 
___
Get your free Verizonmail at www.verizonmail.com


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




Re: localhost:8080 connection refused

2003-02-05 Thread Bill
David

Default RH installations have a firewall, did you not install the
firewall or adjust it to accept connections on port 8080?  Just a
thought...

Also, you havent included any log entriesis there nothing in the
logs?

-b


On Wed, 2003-02-05 at 10:22, David Nelson wrote:
 I have heard similar posts but after trying everything I can get my hands
 on, Tomcat is still refusing to work  I get a connection refused.
 
 Here are a few system details and what I've done.
 OS RH 8.0
 Tomcat 4.1.18
 Apache 2.0.44
 mod_jk-2.0.43.so
 java2 1.4 (tested manually and works)
 $JAVA_HOME and $CATALINA_HOME are set
 
 httpd.conf has
 LoadModule jk_module modules/mod_jk-2.0.43.so
 Include /user/local/tomcat/conf/auto/mod_jk.conf
 
 incidentally, the mod_jk.conf is not being generated.
 
 Inside Tomcat's server.xml
 Server port=8005 shutdown=SHUTDOWN debug=0
   Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
   modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
 
 
 Host name=localhost debug=0 appBase=webapps unpackWARs=true
   autoDeploy=true
Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
 append=true
forwardAll=false
 modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
 
 
 Any ideas what I'm missing?
 
 Thanks for any help.
 
 
 -
 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]




Server.xml / App Context / Redirect question

2003-02-05 Thread Noncubicle Corp
Hi,
I am having trouble configuring Tomcat (server.xml) to use my application, 
which is (and always will be) the only Java app. running on my server. I am 
using the built in web server, as I have very little traffic and virtually 
no static content, so coupling it with Apache is not necessary.

How do I configure Server.xml to go directly to a directory of my choosing 
by just typing in the name of server on the host? (I have successfully 
changed the port to 80 from 8080, so that is not an issue. I also changed 
host files on my Intranet so every box knows the name of my server)

For example, if I have a server named Titan (this is on an Intranet, not the 
Internet) with an application in a directory called projectX, I wish to 
simply launch a browser and type in http://Titan and be directed directly to 
my web-app's (projectX) front door. I had this working, but somehow I 
changed something and I am now being directed to the default Tomcat home 
page. I am having to type http://Titan/projectX into the address bar to get 
to my app.

I did add the default context as such: Context path= docbase=projectX 
debug=0 /

What am I doing wrong?

Also, I should NEVER append /projectX/ to a file name when using a 
response.sendRedirect(), correct? (Ex: 
response.sendRedirect(/projectX/main.jsp))
This would result in very non-portable code, right? But I DO need the slash 
before the file name, right? (Ex: response.sendRedirect(/main.jsp))

Any info appreciated.

JW





_
Help STOP 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]



RE: singleton creation (ot)

2003-02-05 Thread Daniel Brown
Here's the best I could do on how to write singletons:

http://developer.java.sun.com/developer/technicalArticles/Programming/single
tons/

On the locking front, I can't find anything that suggests that the semantics
of volatile have been changed to make double-checked locking work.

I'd love to hear different, or if anyone is aware of anything upcoming to
make the issue more obvious/go away...

 -Original Message-
 From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
 Sent: 05 February 2003 12:06
 To: [EMAIL PROTECTED]; Tomcat Users List
 Subject: RE: singleton creation (ot)


   Hmm... nice links!
   The first one said about a proposal of solving this problem through
 the use of volatile keyword... this was implemented in jdk 1.4? It
 seems that site is older than this release...
   I'm not sure yet of how I will do it... I would not like to
 synchronize the entire method because it'll probably be called million
 of times in my app

 On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
  The simple answer is 'no'.
 
  For the more complex answer, read the 'Double-Checked Locking is Broken'
  declaration at:
 
  http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
 
  To complicate matters even further, check out the JavaDoc to the Fast*
  utilities in the Jakarta commons. For example:
 
 
 http://jakarta.apache.org/commons/collections/api/org/apache/commo
 ns/collect
  ions/FastTreeMap.html
 
  (apologies for the wrap).
 
  Dan.
 
   -Original Message-
   From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
   Sent: 05 February 2003 11:21
   To: Tomcat Users List
   Subject: singleton creation (ot)
  
  
 I was wondering... this code is valid to avoid excessive use of
   synchronized code? I think so, but we never know :-)
 This is the default getInstance() method of a singleton
 (simplified):
  
   public Object getInstance()
   {
 if (INSTANCE == null)
 {
   synchronized (this)
   {
 if (INSTANCE == null)
 {
   INSTANCE = this.getClass().newInstance();
 }
   }
 }
 return INSTANCE;
   }
  
   --
  
   Felipe Schnack
   Analista de Sistemas
   [EMAIL PROTECTED]
   Cel.: (51)91287530
   Linux Counter #281893
  
   Centro Universitário Ritter dos Reis
   http://www.ritterdosreis.br
   [EMAIL PROTECTED]
   Fone/Fax.: (51)32303341
  
  
   -
   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]
 
 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Centro Universitário Ritter dos Reis
 http://www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303341


 -
 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 maintain session attributes in a frameset?

2003-02-05 Thread Johann Uhrmann
Hi,

I'm using the following configuration:

- Tomcat 4.1.12
- Struts 1.1b3
- JSTL 1.0
- a frameset containing two frames (all JSP)

The JSP containing the frameset sets session attributes using the
c:set tag from JSTL. The frameset is built by using the Struts tag
html:frame ... (relative URLs to frame in the same web-app).

The session attributes which are set in the frameset-page cannot be
retrieved in the frames because the frames could not be assigned to
the session that was created by the frameset.

This behaviour occured in all tested browsers (IE 6, Mozilla 4+7, Opera 
7). When using Mozilla 7, I deleted the session cookie JSESSIONID. 
Afterwards, the application worked as intended. However Mozilla did not
create any new session cookie.

Using URL-rewriting in the frameset showed no effect.

Is this a known problem and is there any work-around?

Thanks in advance,

Johann Uhrmann

--
Johann Uhrmann
xpecto AG | Lindenstrasse 81 | D-84030 Ergolding
Telefon: 0700 xpecto 00 (0700 973286 00)
Telefax: 0700 xpecto 10 (0700 973286 10)
Internet: www.xpecto.com


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



Re: definitive answer on JSPC?

2003-02-05 Thread Chris McNeilly
Don't know how 'definitive' this is, but here are my experiences.

Its a bug/feature of jspc, depending on how you look at it.  As it loads
all relevant jsp files into memory to compile, it only used the file
name, not the full path, making the compiler see all your index.jsps as
the same, which causes the error.  I believe there is a fix for this out
there somewhere.  I found a pointer to the fix on an Ant message board. 
I also added functionality to Ant that compiles each jsp in its own
memory space, thus working around the bug.  Let me know if you can't
find the fix (it might already be part of the next Tomcat build) and
want to dork around with my effort.  The work I did on it was back about
3 months ago, so I don't know what has been done recently.

Chris

On Tue, 2003-02-04 at 23:15, Brett Porter wrote:
 Hi,
 
 I'm looking for a definitive answer about JSPC in Tomcat 4.1 and 
 precompilation. Searching the archives hasn't yielded answers to the 
 questions I've been curious about. It'd be great to get definitive 
 answers for the archive, and perhaps a FAQ as it is not covered in 
 either tomcat-user, the doco, or JGuru.
 
 Background: In TC3.2.4 I currently precompile all JSPs using the ant 
 jspc task and the TC3.2 jasper/webserver jars.  I then munged the 
 generated java files into the format required by TC3.2.4 and compiled 
 them, then renamed them again to match. A little weird, but it worked 
 since it used a flat directory structure, formatting the filenames 
 with_002f etc. I dropped this into /WEB-INF/classes/precompiled_jsp and 
 symlinked it from work/localhost_8080%2Fapps.
 
 The reason this was necessary was that the server choked under the load 
 trying to compile the JSPs. There seemed to be no deadlocking so it 
 would spawn numerous javacs and start swapping, and you get the picture :)
 
 With TC4.1 I can't take this approach because of the (albeit nicer) 
 directory approach. However, because of duplicate names and the same 
 package being used, I will need to compile each java file individually, 
 complicating the build process considerably.
 
 BTW, I'm aware of ?jsp_precompile=1 and it's not suitable.
 
 Here are my questions regarding jspc from ant/cmd line:
 1) is the definitive way to do it supposed to be the web.xml include 
 method? If so, shouldn't JSP take a web.xml input and output a processed 
 one? Regardless, doesn't this have negative side effects, like not then 
 being able to edit the JSPs to make changes? (note that while we 
 precompile, we may need to change some, and filtering them out would be 
 a fair nuisance).
 2) is there a way to do what I am looking for above, generating classes 
 for all JSPs that are not fragments (for static include) which can be 
 placed in the work dir? Does it have to have the same layout as the 
 server to work?
 3) what is the reason for the current layout and differences between cmd 
 line and server compilation? ie. different dirs but same package.
 
 My desired requirements for JSPC to work would be:
 1) both JSPC and server generate the same java files to the same locations.
 2) javac can be executed on the base directory on **/*.java, and the 
 resulting classes dropped into the work directory. They would be used as 
 long as their timestamps were newer than the jsp in question.
 
 To achieve this, I'd suggest this:
 1) package name is org.apache.jsp.PATH.TO.FILE (substituting/eliminating 
 special characters - eg WEB-INF - WEBINF)
 2) class remains myJsp_jsp.java
 3) have TC not only look under work but /WEB-INF/classes to avoid the 
 symlink (ie if I specified my package as precompiled_jsp I'd get the 
 result as I have for 3.2.4).
 
 And a final question: how likely am I to encounter the problems had with 
 3.2.4 if I upgrade to 4.1? I believe the jasper2 compiler is designed to 
 be much more effecient - will it avoid generating the java files more 
 than once and hence compiling them more than once, instead synchronizing 
 on the operation? (this is effectively enough, although precompilation 
 would still be even faster).
 
 I'd appreciate any responses regarding this, and apologise for the 
 verbosity level of the email! :)
 
 Thanks,
 Brett
 
 
 
 -
 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]




TC 3.2.x : How to get DataSource (Resource) defined on server.xml?

2003-02-05 Thread ps
Greetings,

could anyone tell me if it's *POSSIBLE* in *TOMCAT 3.2.4* to define a
resource of a datasource in server.xml for DBCP, a resource-ref in
web.xml, and retrieve it on init() of a servlet using JNDI??

I'm trying to do it as I do with TOMCAT 4.1.x, but I'm getting this
exception related to JNDI:


javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
...


I'm doing this:

Context initCtx = new InitialContext();
this.ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/ngincaredb);

but probably I should initialize the context like this (not necessary on
TOMCAT 4.1.x):

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, );
Context initCtx = new InitialContext(env);

But, I have no clue what should I put in ?? for use in tomcat
3.2.4...

please, can anyone give me a hint or if it's possible or not?

Or should I have to initialize a DBCP on my code using some properties?

thanks,
Pedro Salazar.

-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




Re: localhost:8080 connection refused

2003-02-05 Thread David Nelson
Thanks for the reply Bill,

I'm not too savvy regarding the firewall installation.  I took the default
settings on install.  Additionally, whose logs should I be looking at and
what should I look for?


- Original Message -
From: Bill [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 10:30 AM
Subject: Re: localhost:8080 connection refused


 David

 Default RH installations have a firewall, did you not install the
 firewall or adjust it to accept connections on port 8080?  Just a
 thought...

 Also, you havent included any log entriesis there nothing in the
 logs?

 -b


 On Wed, 2003-02-05 at 10:22, David Nelson wrote:
  I have heard similar posts but after trying everything I can get my
hands
  on, Tomcat is still refusing to work  I get a connection refused.
 
  Here are a few system details and what I've done.
  OS RH 8.0
  Tomcat 4.1.18
  Apache 2.0.44
  mod_jk-2.0.43.so
  java2 1.4 (tested manually and works)
  $JAVA_HOME and $CATALINA_HOME are set
 
  httpd.conf has
  LoadModule jk_module modules/mod_jk-2.0.43.so
  Include /user/local/tomcat/conf/auto/mod_jk.conf
 
  incidentally, the mod_jk.conf is not being generated.
 
  Inside Tomcat's server.xml
  Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true
 Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
  append=true
 forwardAll=false
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Any ideas what I'm missing?
 
  Thanks for any help.
 
 
  -
  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: VirtualHost www.zcompany.com:80 overlaps VirtualHost www.abc.com:80

2003-02-05 Thread tomcat guy
Is that the way you have yours configured?
(i.e. virtualhost abc.com )
It's not working here, everything goes to the localHost...

I don't know what is going on here.  I had things working ok earlier then I
made the switch to jk2, to see if Tomcat would run the way it was suppose to
(if I had the proper config), and had ALL kinds of problems!  Not enough
documentation on it...
I went back to my original configuration and ppphhhttt...  I used the exact
same copies of mod_jk, workers, server.xml, etc

It is just a warning should I ignore the darn thing?


- Original Message -
From: Oscar Carrillo [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 3:27 AM
Subject: Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost
www.abc.com:80


 Like I said I'm not an expert on apache configuration, but I have it as my
 domainname. One of the other messages someone followed up with said it has
 to be the actual domainname that is going to host the virtual hosts.

 I'm pretty sure you need to NOT have the asterisk in the VirtualHost *
 line you have. Look below to see the lines I would change.

 I can't get to it right now, but I'll post my related configuration
 tonight.

 Oscar


 On Tue, 4 Feb 2003, chris schild wrote:

  Oscar, per the docs that I used NameVirutalHost is suppose to use the *.
 
  - Original Message -
  From: Oscar Carrillo [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Monday, February 03, 2003 10:26 AM
  Subject: Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost
  www.abc.com:80
 
 
   I'm not very familiar with Apache configuration, but shouldn't your
*
   be replaced with the ServerName. I'm not sure what NameVirtualHost
   should be set at. I have mine set to the servername of the only
servername
   I have.
  
   Oscar
  
  
   On Mon, 3 Feb 2003, chris schild wrote:
  
Sorry, here is the error from apache.exe -t
   
VirtualHost www.zcompany.com:80 overlaps with VirtualHost
  www.abc.com:80,
the first has precedence, perhaps you need a NameVirtualHost
directive
   
- Original Message -
   
From: Oscar Carrillo [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 8:59 AM
Subject: Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost
www.abc.com:80
   
   
 What error?

 Oscar

 On Mon, 3 Feb 2003, tomcat guy wrote:

  Has anyone come across  this warning?  Any guesses as to what is
  wrong?
 
  Here is the httpd.conf definition:
 
  NameVirtualHost *
   NameVirtualHost cde.com #assuming cde.com is your dns name
 
  VirtualHost *
   VirtualHost cde.com #Edit this
  ServerName cde.com
  ServerAlias www.cde.com
  DocumentRoot /apache/Tomcat4.1/CDE
  JkMount /*.jsp ajp13
  JkMount /servlet/* ajp13
  ErrorLog logs/cde.com-error_log
  CustomLog logs/cde.com-access_log common
  /VirtualHost
 
  VirtualHost *
   VirtualHost qv.com #edit this
  ServerName qv.com
  ServerAlias www.qv.com
  DocumentRoot /apache/Tomcat4.1/QV
  JkMount /*.jsp ajp13
  JkMount /servlet/* ajp13
  ErrorLog logs/qv.com-error_log
  CustomLog logs/qv.com-access_log common
  /VirtualHost
 
  VirtualHost *
   VirtualHost abc.com #edit this
  ServerName abc.com
  ServerAlias www.abc.com
  DocumentRoot /apache/Tomcat4.1/AMW
  JkMount /*.jsp ajp13
  JkMount /servlet/* ajp13
  ErrorLog logs/abc.com-error_log
  CustomLog logs/abc.com-access_log common
  /VirtualHost
 
 
  # !-- !!! added workers file for apache tomcat integration  --
  JkWorkersFile d:\Apache\Tomcat4.1\conf\jk\workers.properties
  JkLogFile d:\Apache\Tomcat4.1\logs\mod_jk.log
  Include d:/Apache/Tomcat4.1/conf/auto/mod_jk.conf
 
 
  everything appears to be working normally but why the error???


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

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


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




Re: localhost:8080 connection refused

2003-02-05 Thread David Nelson
After having a look at Catalina.out, here are a few errors:

java.util.zip.ZipException: error in opening zip file
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:117)
 at java.util.jar.JarFile.init(JarFile.java:55)
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: error in opening zip file
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)

The block above repeats for each time I start Tomcat.  It doesn't look too
promising.

 Original Message -
From: Bill [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 10:30 AM
Subject: Re: localhost:8080 connection refused


 David

 Default RH installations have a firewall, did you not install the
 firewall or adjust it to accept connections on port 8080?  Just a
 thought...

 Also, you havent included any log entriesis there nothing in the
 logs?

 -b


 On Wed, 2003-02-05 at 10:22, David Nelson wrote:
  I have heard similar posts but after trying everything I can get my
hands
  on, Tomcat is still refusing to work  I get a connection refused.
 
  Here are a few system details and what I've done.
  OS RH 8.0
  Tomcat 4.1.18
  Apache 2.0.44
  mod_jk-2.0.43.so
  java2 1.4 (tested manually and works)
  $JAVA_HOME and $CATALINA_HOME are set
 
  httpd.conf has
  LoadModule jk_module modules/mod_jk-2.0.43.so
  Include /user/local/tomcat/conf/auto/mod_jk.conf
 
  incidentally, the mod_jk.conf is not being generated.
 
  Inside Tomcat's server.xml
  Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true
 Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
  append=true
 forwardAll=false
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Any ideas what I'm missing?
 
  Thanks for any help.
 
 
  -
  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]




CGI environment vars

2003-02-05 Thread Madere, Colin
Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that Tomcat
uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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




RE: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
  Very nice reading, but I'm getting convinced that I should not use
Singleton pattern in my case... I just wonder what should I do then :-)
  As I said, the method will be called millions of times... so I think
it shouldn't be synch'd (for performance). Certainly I could solve most
of my problems if I could instantiate my singleton in its static
constructor, right? But what I'm really implementing is an abstract
class, and all of its subclasses should be Singletons. I would like to
implement the singleton instantiation routines in the superclass, but I
can't call this.getClass() (as in my code sample) from an static
context...

On Wed, 2003-02-05 at 13:40, Daniel Brown wrote:
 Here's the best I could do on how to write singletons:
 

http://developer.java.sun.com/developer/technicalArticles/Programming/single
 tons/
 
 On the locking front, I can't find anything that suggests that the
semantics
 of volatile have been changed to make double-checked locking work.
 
 I'd love to hear different, or if anyone is aware of anything upcoming
to
 make the issue more obvious/go away...
 
  -Original Message-
  From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
  Sent: 05 February 2003 12:06
  To: [EMAIL PROTECTED]; Tomcat Users List
  Subject: RE: singleton creation (ot)
 
 
Hmm... nice links!
The first one said about a proposal of solving this problem
through
  the use of volatile keyword... this was implemented in jdk 1.4? It
  seems that site is older than this release...
I'm not sure yet of how I will do it... I would not like to
  synchronize the entire method because it'll probably be called
million
  of times in my app
 
  On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
   The simple answer is 'no'.
  
   For the more complex answer, read the 'Double-Checked Locking is
Broken'
   declaration at:
  
  
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
  
   To complicate matters even further, check out the JavaDoc to the
Fast*
   utilities in the Jakarta commons. For example:
  
  
  http://jakarta.apache.org/commons/collections/api/org/apache/commo
  ns/collect
   ions/FastTreeMap.html
  
   (apologies for the wrap).
  
   Dan.
  
-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 11:21
To: Tomcat Users List
Subject: singleton creation (ot)
   
   
  I was wondering... this code is valid to avoid excessive use
of
synchronized code? I think so, but we never know :-)
  This is the default getInstance() method of a singleton
  (simplified):
   
public Object getInstance()
{
  if (INSTANCE == null)
  {
synchronized (this)
{
  if (INSTANCE == null)
  {
INSTANCE = this.getClass().newInstance();
  }
}
  }
  return INSTANCE;
}
   
--
   
Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893
   
Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341
   
   
   
-
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]
  
  --
 
  Felipe Schnack
  Analista de Sistemas
  [EMAIL PROTECTED]
  Cel.: (51)91287530
  Linux Counter #281893
 
  Centro Universitário Ritter dos Reis
  http://www.ritterdosreis.br
  [EMAIL PROTECTED]
  Fone/Fax.: (51)32303341
 
 
 
-
  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]
 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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




RE: localhost:8080 connection refused

2003-02-05 Thread Turner, John

That's why you are getting connection refused.  Tomcat isn't even
starting.

Can you post the entire contents of catalina.out for a full startup attempt,
instead of just the error message?  It might help in debugging if we can see
exactly when in the sequence this error is thrown.  Just null out
catalina.out, then try and start Tomcat again.

Also, how did you do the installs for Tomcat and Apache?  RPM? Source?
Binary?  Do you have zip/unzip or gzip/gunzip on your system?  The error
message is calling a native method.

John


-Original Message-
From: David Nelson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 11:23 AM
To: Tomcat Users List
Subject: Re: localhost:8080 connection refused


After having a look at Catalina.out, here are a few errors:

java.util.zip.ZipException: error in opening zip file
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:117)
 at java.util.jar.JarFile.init(JarFile.java:55)
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: error in opening zip file
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)

The block above repeats for each time I start Tomcat.  It doesn't look too
promising.

 Original Message -
From: Bill [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 10:30 AM
Subject: Re: localhost:8080 connection refused


 David

 Default RH installations have a firewall, did you not install the 
 firewall or adjust it to accept connections on port 8080?  Just a 
 thought...

 Also, you havent included any log entriesis there nothing in the 
 logs?

 -b


 On Wed, 2003-02-05 at 10:22, David Nelson wrote:
  I have heard similar posts but after trying everything I can get my
hands
  on, Tomcat is still refusing to work  I get a connection refused.
 
  Here are a few system details and what I've done.
  OS RH 8.0
  Tomcat 4.1.18
  Apache 2.0.44
  mod_jk-2.0.43.so
  java2 1.4 (tested manually and works)
  $JAVA_HOME and $CATALINA_HOME are set
 
  httpd.conf has
  LoadModule jk_module modules/mod_jk-2.0.43.so
  Include /user/local/tomcat/conf/auto/mod_jk.conf
 
  incidentally, the mod_jk.conf is not being generated.
 
  Inside Tomcat's server.xml
  Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so / 
 
  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true
 Listener 
  className=org.apache.ajp.Tomcat4.config.ApacheConfig
  append=true
 forwardAll=false
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Any ideas what I'm missing?
 
  Thanks for any help.
 
 
  
  -
  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]

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: localhost:8080 connection refused

2003-02-05 Thread Turner, John

As far as I know, the medium firewall on RH allows any/any for to/from
localhost.

John


-Original Message-
From: Bill [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 11:30 AM
To: Tomcat Users List
Subject: Re: localhost:8080 connection refused


David

Default RH installations have a firewall, did you not install the firewall
or adjust it to accept connections on port 8080?  Just a thought...

Also, you havent included any log entriesis there nothing in the logs?

-b


On Wed, 2003-02-05 at 10:22, David Nelson wrote:
 I have heard similar posts but after trying everything I can get my 
 hands on, Tomcat is still refusing to work  I get a connection 
 refused.
 
 Here are a few system details and what I've done.
 OS RH 8.0
 Tomcat 4.1.18
 Apache 2.0.44
 mod_jk-2.0.43.so
 java2 1.4 (tested manually and works)
 $JAVA_HOME and $CATALINA_HOME are set
 
 httpd.conf has
 LoadModule jk_module modules/mod_jk-2.0.43.so
 Include /user/local/tomcat/conf/auto/mod_jk.conf
 
 incidentally, the mod_jk.conf is not being generated.
 
 Inside Tomcat's server.xml
 Server port=8005 shutdown=SHUTDOWN debug=0
   Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
   modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
 
 
 Host name=localhost debug=0 appBase=webapps unpackWARs=true
   autoDeploy=true
Listener 
 className=org.apache.ajp.Tomcat4.config.ApacheConfig
 append=true
forwardAll=false
 modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
 
 
 Any ideas what I'm missing?
 
 Thanks for any help.
 
 
 -
 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]

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: singleton creation (ot)

2003-02-05 Thread Robert Priest
Here is a brief article on Singletons and Subclassing Singletons.
http://members.tripod.com/rwald/java/articles/Singleton_in_Java.html

-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:52 AM
To: Tomcat Users List
Subject: RE: singleton creation (ot)


  Very nice reading, but I'm getting convinced that I should not use
Singleton pattern in my case... I just wonder what should I do then :-)
  As I said, the method will be called millions of times... so I think
it shouldn't be synch'd (for performance). Certainly I could solve most
of my problems if I could instantiate my singleton in its static
constructor, right? But what I'm really implementing is an abstract
class, and all of its subclasses should be Singletons. I would like to
implement the singleton instantiation routines in the superclass, but I
can't call this.getClass() (as in my code sample) from an static
context...

On Wed, 2003-02-05 at 13:40, Daniel Brown wrote:
 Here's the best I could do on how to write singletons:
 

http://developer.java.sun.com/developer/technicalArticles/Programming/single
 tons/
 
 On the locking front, I can't find anything that suggests that the
semantics
 of volatile have been changed to make double-checked locking work.
 
 I'd love to hear different, or if anyone is aware of anything upcoming
to
 make the issue more obvious/go away...
 
  -Original Message-
  From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
  Sent: 05 February 2003 12:06
  To: [EMAIL PROTECTED]; Tomcat Users List
  Subject: RE: singleton creation (ot)
 
 
Hmm... nice links!
The first one said about a proposal of solving this problem
through
  the use of volatile keyword... this was implemented in jdk 1.4? It
  seems that site is older than this release...
I'm not sure yet of how I will do it... I would not like to
  synchronize the entire method because it'll probably be called
million
  of times in my app
 
  On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
   The simple answer is 'no'.
  
   For the more complex answer, read the 'Double-Checked Locking is
Broken'
   declaration at:
  
  
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
  
   To complicate matters even further, check out the JavaDoc to the
Fast*
   utilities in the Jakarta commons. For example:
  
  
  http://jakarta.apache.org/commons/collections/api/org/apache/commo
  ns/collect
   ions/FastTreeMap.html
  
   (apologies for the wrap).
  
   Dan.
  
-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 11:21
To: Tomcat Users List
Subject: singleton creation (ot)
   
   
  I was wondering... this code is valid to avoid excessive use
of
synchronized code? I think so, but we never know :-)
  This is the default getInstance() method of a singleton
  (simplified):
   
public Object getInstance()
{
  if (INSTANCE == null)
  {
synchronized (this)
{
  if (INSTANCE == null)
  {
INSTANCE = this.getClass().newInstance();
  }
}
  }
  return INSTANCE;
}
   
--
   
Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893
   
Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341
   
   
   
-
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]
  
  --
 
  Felipe Schnack
  Analista de Sistemas
  [EMAIL PROTECTED]
  Cel.: (51)91287530
  Linux Counter #281893
 
  Centro Universitário Ritter dos Reis
  http://www.ritterdosreis.br
  [EMAIL PROTECTED]
  Fone/Fax.: (51)32303341
 
 
 
-
  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]
 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


-
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: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread Craig R. McClanahan


On Wed, 5 Feb 2003, ps wrote:

 Date: 05 Feb 2003 11:48:15 +
 From: ps [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

 Please, how should I interpret the exception message header below:

 javax.naming.NoInitialContextException: Need to specify class name in
 environment or system property, or as an applet parameter, or in an
 application resource file:  java.naming.factory.initial

 I'm using jdk1.4.1 (SUN) and tomcat 3.2.4.


Tomcat 3.2.4 does not support JNDI resources at all.  You'll need to stick
with current versions if you want that to work.

 thanks,
 Pedro Salazar.


Craig

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




Re: JSP's in other directories

2003-02-05 Thread Erik Price


Nicholas J Campbell wrote:

Hi,
	I have a question, I want to be able to access JSP pages that
are outside of the web-inf directory setup by tomcat…I do not know how
to do it, obviously. I have Apache 2 installed and use that at my main
server and then am running tomcat for the purposes of Servlets and JSP’s
and I want to know what I have to do to make myself be able to access a
jsp page that is in a directory like c:\site


You should generally be able to refer to resources in your site by using 
a path relative to the context.  For instance, I have the following site 
structure:

/MyApp
 index.jsp
 main.jsp
 others.jsp
 /WEB-INF
  /classes
   /com
/ptc
 /myapp
  SomeClass.class
  OtherClass.class
  /server
   SomeServlet.class
   OtherServlet.class
  /lib
   somejar.jar

To access one of my JSPs from another JSP, I just use a relative path in 
the HTML part of the JSP.  To forward to one of my JSPs from a 
servlet, I use the following line of code:

  String TARGET_JSP = /main.jsp;

  javax.servlet.ServletContext sc = this.getServletContext();
  javax.servlet.RequestDispatcher rd =
 sc.getRequestDispatcher(TARGET_JSP);
  rd.forward();

That's one way to do it, even though the servlet is in 
/MyApp/WEB-INF/classes and the JSP is in /MyApp.



Erik


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



Re: localhost:8080 connection refused

2003-02-05 Thread Sean Dockery
I remember an issue with Tomcat (circa 3.3) not being able to load an 
Oracle JDBC driver which was packaged in a .zip file.  Our solution was to 
change the Oracle driver package extension from .zip to .jar.

By the way, does anyone know if the class path case sensitive on 
Windows?  Would foo.ZIP be different from foo.zip, for example?


At 10:22 2003-02-05 -0600, you wrote:
After having a look at Catalina.out, here are a few errors:

java.util.zip.ZipException: error in opening zip file
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:117)
 at java.util.jar.JarFile.init(JarFile.java:55)
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: error in opening zip file
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)

The block above repeats for each time I start Tomcat.  It doesn't look too
promising.

 Original Message -
From: Bill [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 10:30 AM
Subject: Re: localhost:8080 connection refused


 David

 Default RH installations have a firewall, did you not install the
 firewall or adjust it to accept connections on port 8080?  Just a
 thought...

 Also, you havent included any log entriesis there nothing in the
 logs?

 -b


 On Wed, 2003-02-05 at 10:22, David Nelson wrote:
  I have heard similar posts but after trying everything I can get my
hands
  on, Tomcat is still refusing to work  I get a connection refused.
 
  Here are a few system details and what I've done.
  OS RH 8.0
  Tomcat 4.1.18
  Apache 2.0.44
  mod_jk-2.0.43.so
  java2 1.4 (tested manually and works)
  $JAVA_HOME and $CATALINA_HOME are set
 
  httpd.conf has
  LoadModule jk_module modules/mod_jk-2.0.43.so
  Include /user/local/tomcat/conf/auto/mod_jk.conf
 
  incidentally, the mod_jk.conf is not being generated.
 
  Inside Tomcat's server.xml
  Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true
 Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
  append=true
 forwardAll=false
  modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so /
  
 
  Any ideas what I'm missing?
 
  Thanks for any help.
 
 
  -
  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]


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: CGI environment vars

2003-02-05 Thread Filip Hanik
how about you do it yourself, I assume that you launch your CGI script using 
Runtime.exec
in that case, use the method that 

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that Tomcat
uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


-
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: CGI environment vars

2003-02-05 Thread Madere, Colin
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that 
 
 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
 
 take a look at
 
 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
 
 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars
 
 
 Tomcat 4.1.18 : UMN Mapserver CGI
 
 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that Tomcat
 uses to run CGIs seeded with that variable.
 
 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.
 
 Anyone have an idea?
 
 Colin
 
 
 -
 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: DataSource.getConnection() hangs

2003-02-05 Thread Sean Dockery
Very very cool thing to know.  I've seen this behavior before but never 
knew what was causing it.

At 14:11 2003-02-05 +0100, you wrote:
Hi,

I had this problem a while ago.

Mine was caused by DBCP attempting to open a pool of Db connections when 
receiving the first getConnection() request - and my Db was not configured 
to handle that many connections - and it just hung waiting for the 
maxActive value to become available.

I omitted minIdle and maxActive parameters so that they defaulted (in my 
case 4 and 2) then it worked. I then got my DBA to reconfigure his startup 
parameters to something realistic.

HTH

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: CGI environment vars

2003-02-05 Thread Filip Hanik
Looking at the source code of the CGIServlet, these variables are not set anywhere.
My recommendation would be that you modify this servlet to fit your needs, or even 
easier,
why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?

Filip

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 9:23 AM
To: 'Tomcat Users List'
Subject: RE: CGI environment vars


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that 
 
 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
 
 take a look at
 
 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
 
 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars
 
 
 Tomcat 4.1.18 : UMN Mapserver CGI
 
 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that Tomcat
 uses to run CGIs seeded with that variable.
 
 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.
 
 Anyone have an idea?
 
 Colin
 
 
 -
 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: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread ps
On Wed, 2003-02-05 at 17:07, Craig R. McClanahan wrote:
 
 
 On Wed, 5 Feb 2003, ps wrote:
 
  Date: 05 Feb 2003 11:48:15 +
  From: ps [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Re: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)
 
  Please, how should I interpret the exception message header below:
 
  javax.naming.NoInitialContextException: Need to specify class name in
  environment or system property, or as an applet parameter, or in an
  application resource file:  java.naming.factory.initial
 
  I'm using jdk1.4.1 (SUN) and tomcat 3.2.4.
 
 
 Tomcat 3.2.4 does not support JNDI resources at all.  You'll need to stick
 with current versions if you want that to work.

OK, thanks Graig. 
I wasn't sure about that but I was suspecting something *ugly* and
*stupid* like that. For one side I'm frustrated about that confirmation,
but I feel also relieved because I was struggling about configurations
and more configurations...

...I don't know much about the persistence of the using of tomcat 3.2.x
for production purposes but I have to resign to the power of politics in
force :-|

thanks,
Pedro Salazar.
-- 
ps 
[EMAIL PROTECTED]
key id: 0E129E31D803BC61


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




Re: TC 3.2.x : How to get DataSource (Resource) defined onserver.xml?

2003-02-05 Thread ps
I find recently by Graig that JNDI is not available in tomcat 3.2.x :-





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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars

 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that

 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

 take a look at

 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars


 Tomcat 4.1.18 : UMN Mapserver CGI

 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that Tomcat
 uses to run CGIs seeded with that variable.

 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.

 Anyone have an idea?

 Colin


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: Tomcat 4.1.18 will not start for me(Hello am to facing the same problem is there anyone to help us out)

2003-02-05 Thread Nicole Hibbard
Did you set PATH, CLASSPATH, and JAVA_HOME variables?  Verify that JDK is
configured properly by opening a DOS window and typing java -version.

-Original Message-
From: John-P King [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 7:27 AM
To: Tomcat Users List
Subject: Re: Tomcat 4.1.18 will not start for me(Hello am to facing the
same problem is there anyone to help us out)


Zafar,

I have not heard any good advice yet but I will be sure to pass along
anything of value that I hear.  Let me know if you have any luck as well!

John

--
Deutsche Asset Management
222 Riverside Plaza
Chicago, IL  60657
Phone: (312) 537-1763
E-Mail:  [EMAIL PROTECTED]
Fax:   (312) 537-2280




zaf nasha [EMAIL PROTECTED]
02/05/03 12:04 AM
Please respond to Tomcat Users List


To: Tomcat Users List [EMAIL PROTECTED]
cc:
Subject:Re: Tomcat 4.1.18 will not start for me(Hello am to
facing the same
problem is there anyone to help us out)



Dear John
If u get the way to solve this problem pls do reply me and send me
solution, i would be really  very grateful for your this kind help.
zafar
 John-P King [EMAIL PROTECTED] wrote:I am trying to get tomcat version
4.1.18 to run on a Windows 2000 server.
But after installing the JDK and then the tomcat server I cannot get it to

startup. When I try to start it a command window pops up and then goes
away without any text written to the window. I looked at the log files and

I see this:
stderr:
---
java.lang.NullPointerException
at
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java,
Compiled Code)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java,
Compiled Code)
stdout:
---
Bootstrap: Create Catalina server
Bootstrap: Class loader creation threw exception
java.lang.IllegalMonitorStateException: current thread not owner
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java,

Compiled Code)
at
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java,
Compiled Code)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java,

Compiled Code)
at
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java,
Compiled Code)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java,
Compiled Code)

Any guru's out there that might be able to help me out


-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now



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




Re: Server.xml / App Context / Redirect question

2003-02-05 Thread Sean Dockery
Host ... appBase=C:\myWebSite\webapps name=localhost ... 

  Context ... docBase=C:\myWebSite\webapps\projectX path= ... 
  /Context


/Host

Copy everything in your projectX web application to 
C:\myWebSite\webapps\projectX.  That is...

C:\...\projectX\WEB-INF
...etc...
C:\...\projectX\index.jsp
...etc...

At 10:35 2003-02-05 -0500, you wrote:
Hi,
I am having trouble configuring Tomcat (server.xml) to use my application, 
which is (and always will be) the only Java app. running on my server. I 
am using the built in web server, as I have very little traffic and 
virtually no static content, so coupling it with Apache is not necessary.

How do I configure Server.xml to go directly to a directory of my choosing 
by just typing in the name of server on the host? (I have successfully 
changed the port to 80 from 8080, so that is not an issue. I also changed 
host files on my Intranet so every box knows the name of my server)

For example, if I have a server named Titan (this is on an Intranet, not 
the Internet) with an application in a directory called projectX, I wish 
to simply launch a browser and type in http://Titan and be directed 
directly to my web-app's (projectX) front door. I had this working, but 
somehow I changed something and I am now being directed to the default 
Tomcat home page. I am having to type http://Titan/projectX into the 
address bar to get to my app.

I did add the default context as such: Context path= docbase=projectX 
debug=0 /

What am I doing wrong?

Also, I should NEVER append /projectX/ to a file name when using a 
response.sendRedirect(), correct? (Ex: 
response.sendRedirect(/projectX/main.jsp))
This would result in very non-portable code, right? But I DO need the 
slash before the file name, right? (Ex: response.sendRedirect(/main.jsp))

Any info appreciated.

JW





_
Help STOP 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]

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




Re: TC 3.2.x : How to get DataSource (Resource) defined on server.xml?

2003-02-05 Thread Sean Dockery
Ouch!  That's Craig...  Not Graig.  :-)

At 17:38 2003-02-05 +, you wrote:

I find recently by Graig that JNDI is not available in tomcat 3.2.x :-

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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




FW: jsp:include semantics?

2003-02-05 Thread David Keyes
Hello.

What are the semantics of jsp:include in Tomcat 4.0.x?  It seems to me that if I 
jsp:include another jsp, things work fine.  But if I try to include a servlet (one 
that was registered in my web.xml, e.g. url == /mywebapp/myservlet) the servlet is 
treated as if it were a traditional resource (that is, Tomcat tries to find a file 
named /mywebapp/myservlet), which of course can't be found since it doesn't exist.  

Is this behaviour correct?  Should I be bugging the Jasper people about this one?  Are 
there any non-standards-breaking ways of getting around this?

Thanks...

Dave Keyes

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




Re: CGI environment vars

2003-02-05 Thread Kenny G. Dubuisson, Jr.
I don't know if this info will help but here it is.  I had the same problem
but in Apache.  I had to use the mod_env module in Apache to set the
environment variable to show up to my CGI scripts.  Maybe Tomcat has
something similar.  Just a thought...
Kenny

- Original Message -
From: Filip Hanik [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 11:36 AM
Subject: RE: CGI environment vars


Looking at the source code of the CGIServlet, these variables are not set
anywhere.
My recommendation would be that you modify this servlet to fit your needs,
or even easier,
why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?

Filip

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 9:23 AM
To: 'Tomcat Users List'
Subject: RE: CGI environment vars


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To: Tomcat Users List
 Subject: RE: CGI environment vars

 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that

 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

 take a look at

 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars


 Tomcat 4.1.18 : UMN Mapserver CGI

 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that Tomcat
 uses to run CGIs seeded with that variable.

 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.

 Anyone have an idea?

 Colin


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


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

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









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


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




Re: JSP's in other directories

2003-02-05 Thread Ming Zhao
You use JK2 as the connector between Apache and
Tomcat? If so, you can map your jsp in the
workers2.properties. Still I have a question: how can
you set the main directory of your page files and call
Tomcat to deal with jsp files under your main
directory?

--- Erik Price [EMAIL PROTECTED] wrote:
 
 
 Nicholas J Campbell wrote:
  Hi,
  I have a question, I want to be able to access
 JSP pages that
  are outside of the web-inf directory setup by
 tomcat…I do not know how
  to do it, obviously. I have Apache 2 installed and
 use that at my main
  server and then am running tomcat for the purposes
 of Servlets and JSP’s
  and I want to know what I have to do to make
 myself be able to access a
  jsp page that is in a directory like c:\site
 
 You should generally be able to refer to resources
 in your site by using 
 a path relative to the context.  For instance, I
 have the following site 
 structure:
 
 /MyApp
   index.jsp
   main.jsp
   others.jsp
   /WEB-INF
/classes
 /com
  /ptc
   /myapp
SomeClass.class
OtherClass.class
/server
 SomeServlet.class
 OtherServlet.class
/lib
 somejar.jar
 
 To access one of my JSPs from another JSP, I just
 use a relative path in 
 the HTML part of the JSP.  To forward to one of my
 JSPs from a 
 servlet, I use the following line of code:
 
String TARGET_JSP = /main.jsp;
 
javax.servlet.ServletContext sc =
 this.getServletContext();
javax.servlet.RequestDispatcher rd =
  
 sc.getRequestDispatcher(TARGET_JSP);
rd.forward();
 
 That's one way to do it, even though the servlet is
 in 
 /MyApp/WEB-INF/classes and the JSP is in /MyApp.
 
 
 
 Erik
 
 

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


__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

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




Re: DBCP+TOMCAT 3.2.4 (-4.1.x WORKED OK)

2003-02-05 Thread Sean Dockery
You can still use DBCP in Tomcat 3.x, right?  You just can't deploy the 
data source through JNDI automatically...

Could this be done manually?  That is, could I not write a context listener 
that deployed the DBCP factory through JNDI when the application was 
started?  I know that it would involve changing the catalina.policy file so 
that JNDI wasn't read-only to web applications, but could it not be done?

At 09:07 2003-02-05 -0800, you wrote:

Tomcat 3.2.4 does not support JNDI resources at all.  You'll need to stick
with current versions if you want that to work.

Craig

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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




Tomcat 4.1.12 available on HP-UX

2003-02-05 Thread PELOQUIN,JEFFREY (HP-Boise,ex1)
For those of you using Tomcat on an HP-UX machine

HP appears to have finally bundled Tomcat 4.1.12 into its Apache/Tomcat
depot file

for more info see
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo
.pl?productNumber=HPUXWSSUITE

Jeff

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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
Other possible solution attempts include an env-entry/ tag in web.xml or 
an Environment/ tag in the server.xml.

At 10:43 2003-02-05 -0700, you wrote:
What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars

 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that

 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

 take a look at

 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars


 Tomcat 4.1.18 : UMN Mapserver CGI

 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that Tomcat
 uses to run CGIs seeded with that variable.

 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.

 Anyone have an idea?

 Colin


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




Redirecting HTTP to HTTPS

2003-02-05 Thread Sterin, Ilya
Hi, I'm having a problem with redirecting HTTP to HTTPS

When a user logs in, and a session variable is created, I then want to
redirect them to a secure connection for only one page, which submits
private information.  If I go directly to https of my server, everything
work, since the key is configured correctly.  But when I first log into the
site and then redirect to https the server or browser hangs, not sure which
one.  Sometimes it will render half of the page and then hang, sometimes it
just hangs.

I guess my question is there a problem or something I need to configure.
(There are no messages in the error log)

Second is what's the best way to redirect to https.  Are sessions preserved,
or do I have to URL rewrite them?

Also, is it a good idea to use a Filter to redirect the pages?  Or how would
I insure that the connection is secure?

Thanks for any help in advance.

Ilya



RE: JSP's in other directories

2003-02-05 Thread David Keyes
If what you REALLY want to do is make your webapp be able to access resources outside 
of the webapp structure, and if you want to be non-J2EE, then you can write your own 
implementation of a JNDI DirContext, and allow it to find resources any way that you 
want.  You just have to register that DirContext implementation using the Resources 
element for your context...

I've done this very thing to allow my Tomcat development environment to access 
jsp/html/css/etc files from MANY different locations outside of the webapp structure.  
It works great for a development environment where all of your resources aren't in the 
shape of a webapp, but you want to be able to have a context running against them as 
you work... ;)

Dave Keyes

-Original Message-
From: Ming Zhao [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:00 PM
To: Tomcat Users List
Subject: Re: JSP's in other directories


You use JK2 as the connector between Apache and
Tomcat? If so, you can map your jsp in the
workers2.properties. Still I have a question: how can
you set the main directory of your page files and call
Tomcat to deal with jsp files under your main
directory?

--- Erik Price [EMAIL PROTECTED] wrote:
 
 
 Nicholas J Campbell wrote:
  Hi,
  I have a question, I want to be able to access
 JSP pages that
  are outside of the web-inf directory setup by
 tomcat...I do not know how
  to do it, obviously. I have Apache 2 installed and
 use that at my main
  server and then am running tomcat for the purposes
 of Servlets and JSP's
  and I want to know what I have to do to make
 myself be able to access a
  jsp page that is in a directory like c:\site
 
 You should generally be able to refer to resources
 in your site by using 
 a path relative to the context.  For instance, I
 have the following site 
 structure:
 
 /MyApp
   index.jsp
   main.jsp
   others.jsp
   /WEB-INF
/classes
 /com
  /ptc
   /myapp
SomeClass.class
OtherClass.class
/server
 SomeServlet.class
 OtherServlet.class
/lib
 somejar.jar
 
 To access one of my JSPs from another JSP, I just
 use a relative path in 
 the HTML part of the JSP.  To forward to one of my
 JSPs from a 
 servlet, I use the following line of code:
 
String TARGET_JSP = /main.jsp;
 
javax.servlet.ServletContext sc =
 this.getServletContext();
javax.servlet.RequestDispatcher rd =
  
 sc.getRequestDispatcher(TARGET_JSP);
rd.forward();
 
 That's one way to do it, even though the servlet is
 in 
 /MyApp/WEB-INF/classes and the JSP is in /MyApp.
 
 
 
 Erik
 
 

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


__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.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: RE: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF

2003-02-05 Thread Robert Dana
Not sure if this is any help, but I do have some related information.  I believe the 
problems you are experiencing relate directly to a known bug in the Oracle JDBC 
drivers.  In my case, I found that using a PreparedStatement object in a servlet 
resulted in 2 or 3 (depending on the complexity of the statement) overhead cursors 
being opened by Oracle.  These cursors did not close, even when the PreparedStatement 
itself was closed in my code.  The orphan cursors only seemed to close if the 
connection itself was closed -  a major problem if one is trying to use any kind of 
efficient connection pooling.  This problem has been acknowledged by Oracle, but they 
have not, to my knowledge, fixed it.  For me, the best solution was to de-tune my 
connection pool to force connections to be closed sooner than I normally would, in 
combination with setting a very high value for MAXCURSORS in the init.ora file.  After 
some experimentation, I found a combination of those 2 factors that resulted in no 
more maximum open cursors errors, with only a modest degradation in performance.  A 
compromise solution to be sure, but one that worked out OK for me.

I hope that is useful information.

Robert Dana

-Original Message-
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Date: Tue, 4 Feb 2003 18:48:16 -0500 
Subject: RE: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF

Maybe you can post a segment of the code or example to illustrate your
problem.

Michael

-Original Message-
From: Andy Meadows [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 2:25 PM
To: Tomcat Users List
Subject: Re: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


Doing that.

Actually, further testing reveals that the problem occurs with the
statement.  If an exception occurs while the statement is being prepared,
then an exception is thrown.  However, it would appear that this exception
is thrown after a cursor is opened (internally) and that cursor is never
closed.  A call to close on the statement in turn throws a NPE because a
value was never assigned to it.  Thus, I'm left with an open cursor on an
object that I can't reach.

Can anyone else validate this?

Andy



- Original Message -
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 4:22 PM
Subject: RE: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


 Have seen this problem before.
 It is the JDBC code.  The best solution is to explicitly close RESULTSET,
 STATEMENT (of any kind), and CONNECTION as soon as you finished using the
 object ( or else close them in the FINALLY block)

 Regards,
 Michael

 -Original Message-
 From: Sean Dockery [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 1:04 PM
 To: Tomcat Users List
 Subject: Re: Oracle cursor problem with Tomcat 4.1.12 and Commons BDSF


 Try explicitly closing your ResultSet variables as well.  See if the
 problem persists.

 At 13:58 2003-02-04, you wrote:
 Configuring Tomcat to provide a JNDI connection pool was no problem.
Now,
 however, we are getting error ORA-01000: maximum cursors opened.  Logging
 shows that any statement and connection that is opened is again closed
 which, according to everything I read, release the cursors.  This is
 obviously not the case.
 
 Has anyone else experienced this problem and, if so, what was the
 resolution -- other than increasing opened cursor counts.
 
 Andy Meadows
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.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]



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


a

 -
 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: Why won't anyone help me out??

2003-02-05 Thread Goehring, Chuck Mr., RCI - San Diego
Steve,

One way to learn these types of things is to download an open-source product and open 
the jars and look at the source to see how they have done things.  This method costs 
you nothing and accommodates whatever schedule you are on.  Also, there are some 
examples with Tomcat itself.  

Chuck

-Original Message-
From: Steve Burrus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 1:36 PM
To: [EMAIL PROTECTED]
Subject: Why won't anyone help me out??



Well, seeing how no one, so far, has seen fit to respond back to my plea for 
help/assistance, I will re-post this from late last nite!! I am getting quite 
desperate the longer that I have to go on without getting this right!

 

Hello again, Filip, I tried to package up the 2 required files, login.jsp and 
LDAPAuth.java into a newly created org.burrus.test folder, and then compiled them 
into that same folder/directory to create 2 .class files, but then when I tried to 
run the whole program in my JBuilder 8, I STILL got, for my efforts, the old 505 
server error page:

Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Errortype Exception 
reportmessage Internal Server Errordescription The server encountered an internal 
error 
(Internal Server Error) that prevented it from fulfilling this request.exception 
org.apache.jasper.JasperException: Unable to compile class for JSPNote: 
sun.tools.javac.Main has been deprecated.


An error occurred at line: 4 in the jsp file: /login.jsp

Generated servlet error:
C:\Documents and Settings\Steven R. 
Burrus\jbproject\thirdjavaproj\Tomcat\work\login$jsp.java:64: Class 
org.apache.jsp.LDAPAuthBean not found.
LDAPAuthBean auth = null;
^


An error occurred at line: 4 in the jsp file: /login.jsp

Generated servlet error:
C:\Documents and Settings\Steven R. 
Burrus\jbproject\thirdjavaproj\Tomcat\work\login$jsp.java:67: Class 
org.apache.jsp.LDAPAuthBean not found.
auth= (LDAPAuthBean)
   ^


An error occurred at line: 4 in the jsp file: /login.jsp

Generated servlet error:
C:\Documents and Settings\Steven R. 
Burrus\jbproject\thirdjavaproj\Tomcat\work\login$jsp.java:72: Class 
org.apache.jsp.LDAPAuthBean not found.
auth = (LDAPAuthBean) 
java.beans.Beans.instantiate(this.getClass().getClassLoader(), LDAPAuthBean);
^
Note: C:\Documents and Settings\Steven R. 
Burrus\jbproject\thirdjavaproj\Tomcat\work\login$jsp.java uses or overrides a 
deprecated API.  Recompile with 
-deprecation for details.
3 errors, 2 warnings

 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.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(StandardContextValve.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:2347)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: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 

Re: FW: jsp:include semantics?

2003-02-05 Thread Sean Dockery
Strange.

What is your servlet-mapping url-pattern?  What is the jsp:forward call 
that you're attempting to use.

Remember that all jsp:forward calls are routed at the context 
root.  Meaning that if your web app resides at /theapp, then jsp:include 
page=/header.jsp is really /theapp/header.jsp externally.  So too with 
servlet mappings.  (I hope that you are not including /mywebapp in your 
jsp:forward action.)

At 12:59 2003-02-05 -0500, you wrote:
Hello.

What are the semantics of jsp:include in Tomcat 4.0.x?  It seems to me 
that if I jsp:include another jsp, things work fine.  But if I try to 
include a servlet (one that was registered in my web.xml, e.g. url == 
/mywebapp/myservlet) the servlet is treated as if it were a traditional 
resource (that is, Tomcat tries to find a file named 
/mywebapp/myservlet), which of course can't be found since it doesn't 
exist.

Is this behaviour correct?  Should I be bugging the Jasper people about 
this one?  Are there any non-standards-breaking ways of getting around this?

Thanks...

Dave Keyes

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

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




MySQL control center

2003-02-05 Thread tomcat guy
Could anyone tell me about the MySQL interfaceMySQLCC?  Any basic information about it 
would be great (i.e. stability, accuracy, easy of use).



RE: Tomcat 4.1.18 will not start for me(Hello am to facing thesame problem is there anyone to help

2003-02-05 Thread Jeff Tulley
Maybe I missed this earlier in the conversation, but what exact JVM
version are you using?
I have seen something similar running Tomcat 4.1.18 on JVM 1.3.1_06 on
NetWare, using the Symantec JIT 3.10.21
We think it is a JIT bug, and it seems to fail a little bit sooner than
yours does (oddly enough, since yours fails early on)
But there might be a connection.  

snip /

 John-P King [EMAIL PROTECTED] wrote:I am trying to get tomcat
version
4.1.18 to run on a Windows 2000 server.
But after installing the JDK and then the tomcat server I cannot get it
to

startup. When I try to start it a command window pops up and then goes
away without any text written to the window. I looked at the log files
and

I see this:
stderr:
---
java.lang.NullPointerException
at
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java,
Compiled Code)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java,
Compiled Code)
stdout:
---
Bootstrap: Create Catalina server
Bootstrap: Class loader creation threw exception
java.lang.IllegalMonitorStateException: current thread not owner
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java,

Compiled Code)
at
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java,
Compiled Code)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java,

Compiled Code)
at
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java,
Compiled Code)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java,
Compiled Code)

Any guru's out there that might be able to help me out


-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now



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


Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com

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




Re: Setting up Tomcat to run JSP pages...

2003-02-05 Thread Sean Dockery
Tomcat will compile JSP files inside your web application context folder 
(but outside the WEB-INF folder) into servlets and run them 
automatically.  You could also put JSP files in the WEB-INF folder, but you 
would have to declare it as a servlet and create a mapping for it.  See my 
message in the thread RE: JSP's in other directories for an example of 
how to do this.

The only method by which I could imagine that you could execute a servlet 
outside the WEB-INF folder is if the servlet class file is in the class 
path.  So, it could be done.  But I definitely would not recommend this 
approach.  I cannot think of any legitimate reason to do something like this.

The standard practice is to place servlet class files inside 
WEB-INF/classes and mapping requests to them in the web.xml file.  What 
reason would you have for deviating from the standard practice?

If you really want to learn how to write web application using servlets and 
JSPs, I recommend picking up a copy of Core Servlets and JavaServer Pages 
by Marty Hall.  You can get an electronic copy of the book online at 
http://pdf.coreservlets.com/.

At 18:59 2003-02-04 -0500, you wrote:
Hi,
I'm new to Tomcat, using 4.1, and have set up Tomcat to run with
Apache...that works. However my question is how can I put a JSP page or
servlet in my site directory and have Tomcat recognize it and render it
even though it's in a folder outside of web-inf? I'm using windowsXP
right now.
Thank you, in advance, for the help.

-Nicholas Campbell

In a world without walls and barriers, what need is there for windows
and gates! - a mac ad
-
I never let schooling get in the way of my education. - MT
-
Live Penguine! - Tux the linux mascot
Vivez le penguine!, ¡Viva en penguine!, Lang lebe der Pinguin!, Viva no
penguine!, Viva sul penguine!
-
There are 10 kinds of people in this world...those who understand
binary...and those who don't! - ThinkGeek.com






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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: MySQL control center

2003-02-05 Thread Jacob Hookom
I just started using it, the one thing to point out is that their user
management doesn't work properly.  Whenever you update security settings for
a user, then their password is resaved in a non hashed format causing your
password to become invalid if you previously set one.

-Bocaj

| -Original Message-
| From: tomcat guy [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 05, 2003 12:42 PM
| To: Tomcat Users List
| Subject: MySQL control center
| 
| Could anyone tell me about the MySQL interfaceMySQLCC?  Any basic
| information about it would be great (i.e. stability, accuracy, easy of
| use).


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




Re[2]: singleton creation (ot)

2003-02-05 Thread Jacob Kjome
Hello Felipe,

just use

MyClass.class in static contexts.  The only issue is that if you
change the class name, you will also have to change any case where you
did MyClass.class to match the new name of the class.

Jake

Wednesday, February 05, 2003, 10:52:20 AM, you wrote:

FS   Very nice reading, but I'm getting convinced that I should not use
FS Singleton pattern in my case... I just wonder what should I do then :-)
FS   As I said, the method will be called millions of times... so I think
FS it shouldn't be synch'd (for performance). Certainly I could solve most
FS of my problems if I could instantiate my singleton in its static
FS constructor, right? But what I'm really implementing is an abstract
FS class, and all of its subclasses should be Singletons. I would like to
FS implement the singleton instantiation routines in the superclass, but I
FS can't call this.getClass() (as in my code sample) from an static
FS context...

FS On Wed, 2003-02-05 at 13:40, Daniel Brown wrote:
 Here's the best I could do on how to write singletons:
 

FS http://developer.java.sun.com/developer/technicalArticles/Programming/single
 tons/
 
 On the locking front, I can't find anything that suggests that the
FS semantics
 of volatile have been changed to make double-checked locking work.
 
 I'd love to hear different, or if anyone is aware of anything upcoming
FS to
 make the issue more obvious/go away...
 
  -Original Message-
  From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
  Sent: 05 February 2003 12:06
  To: [EMAIL PROTECTED]; Tomcat Users List
  Subject: RE: singleton creation (ot)
 
 
Hmm... nice links!
The first one said about a proposal of solving this problem
FS through
  the use of volatile keyword... this was implemented in jdk 1.4? It
  seems that site is older than this release...
I'm not sure yet of how I will do it... I would not like to
  synchronize the entire method because it'll probably be called
FS million
  of times in my app
 
  On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
   The simple answer is 'no'.
  
   For the more complex answer, read the 'Double-Checked Locking is
FS Broken'
   declaration at:
  
  
FS http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
  
   To complicate matters even further, check out the JavaDoc to the
FS Fast*
   utilities in the Jakarta commons. For example:
  
  
  http://jakarta.apache.org/commons/collections/api/org/apache/commo
  ns/collect
   ions/FastTreeMap.html
  
   (apologies for the wrap).
  
   Dan.
  
-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 11:21
To: Tomcat Users List
Subject: singleton creation (ot)
   
   
  I was wondering... this code is valid to avoid excessive use
FS of
synchronized code? I think so, but we never know :-)
  This is the default getInstance() method of a singleton
  (simplified):
   
public Object getInstance()
{
  if (INSTANCE == null)
  {
synchronized (this)
{
  if (INSTANCE == null)
  {
INSTANCE = this.getClass().newInstance();
  }
}
  }
  return INSTANCE;
}
   
--
   
Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893
   
Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341
   
   
   
FS -
To unsubscribe, e-mail:
FS [EMAIL PROTECTED]
For additional commands, e-mail:
FS [EMAIL PROTECTED]
   
  
  
  
FS -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
FS [EMAIL PROTECTED]
  
  --
 
  Felipe Schnack
  Analista de Sistemas
  [EMAIL PROTECTED]
  Cel.: (51)91287530
  Linux Counter #281893
 
  Centro Universitário Ritter dos Reis
  http://www.ritterdosreis.br
  [EMAIL PROTECTED]
  Fone/Fax.: (51)32303341
 
 
 
FS -
  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]
 



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




Re: Re[2]: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
  Yes, but this doesn't work as a generic implementation... what I want
to do is write an abstract class that all its subclasses must be
singletons... I would like that who extends my class have no need to
implement the getInstance() method

On Wed, 2003-02-05 at 16:48, Jacob Kjome wrote:
 Hello Felipe,
 
 just use
 
 MyClass.class in static contexts.  The only issue is that if you
 change the class name, you will also have to change any case where you
 did MyClass.class to match the new name of the class.
 
 Jake
 
 Wednesday, February 05, 2003, 10:52:20 AM, you wrote:
 
 FS   Very nice reading, but I'm getting convinced that I should not use
 FS Singleton pattern in my case... I just wonder what should I do then :-)
 FS   As I said, the method will be called millions of times... so I think
 FS it shouldn't be synch'd (for performance). Certainly I could solve most
 FS of my problems if I could instantiate my singleton in its static
 FS constructor, right? But what I'm really implementing is an abstract
 FS class, and all of its subclasses should be Singletons. I would like to
 FS implement the singleton instantiation routines in the superclass, but I
 FS can't call this.getClass() (as in my code sample) from an static
 FS context...
 
 FS On Wed, 2003-02-05 at 13:40, Daniel Brown wrote:
  Here's the best I could do on how to write singletons:
  
 
 FS http://developer.java.sun.com/developer/technicalArticles/Programming/single
  tons/
  
  On the locking front, I can't find anything that suggests that the
 FS semantics
  of volatile have been changed to make double-checked locking work.
  
  I'd love to hear different, or if anyone is aware of anything upcoming
 FS to
  make the issue more obvious/go away...
  
   -Original Message-
   From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
   Sent: 05 February 2003 12:06
   To: [EMAIL PROTECTED]; Tomcat Users List
   Subject: RE: singleton creation (ot)
  
  
 Hmm... nice links!
 The first one said about a proposal of solving this problem
 FS through
   the use of volatile keyword... this was implemented in jdk 1.4? It
   seems that site is older than this release...
 I'm not sure yet of how I will do it... I would not like to
   synchronize the entire method because it'll probably be called
 FS million
   of times in my app
  
   On Wed, 2003-02-05 at 09:42, Daniel Brown wrote:
The simple answer is 'no'.
   
For the more complex answer, read the 'Double-Checked Locking is
 FS Broken'
declaration at:
   
   
 FS http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
   
To complicate matters even further, check out the JavaDoc to the
 FS Fast*
utilities in the Jakarta commons. For example:
   
   
   http://jakarta.apache.org/commons/collections/api/org/apache/commo
   ns/collect
ions/FastTreeMap.html
   
(apologies for the wrap).
   
Dan.
   
 -Original Message-
 From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
 Sent: 05 February 2003 11:21
 To: Tomcat Users List
 Subject: singleton creation (ot)


   I was wondering... this code is valid to avoid excessive use
 FS of
 synchronized code? I think so, but we never know :-)
   This is the default getInstance() method of a singleton
   (simplified):

 public Object getInstance()
 {
   if (INSTANCE == null)
   {
 synchronized (this)
 {
   if (INSTANCE == null)
   {
 INSTANCE = this.getClass().newInstance();
   }
 }
   }
   return INSTANCE;
 }

 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Centro Universitário Ritter dos Reis
 http://www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303341



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

   
   
   
 FS -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
 FS [EMAIL PROTECTED]
   
   --
  
   Felipe Schnack
   Analista de Sistemas
   [EMAIL PROTECTED]
   Cel.: (51)91287530
   Linux Counter #281893
  
   Centro Universitário Ritter dos Reis
   http://www.ritterdosreis.br
   [EMAIL PROTECTED]
   Fone/Fax.: (51)32303341
  
  
  
 FS -
   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]
  
 
 
 
 -- 
 Best regards,
  Jacobmailto:[EMAIL PROTECTED]
 
 
 

RE: MySQL control center

2003-02-05 Thread Luc Foisy
I use it. It works fine for me. Even user permission changes.
Its stable enough. It's easy enough. Accurate? Sure.
But you should post your question to [EMAIL PROTECTED]
and you should look here http://www.mysql.com/products/mysqlcc/index.html for info
and you should download it here http://www.mysql.com/downloads/mysqlcc.html

 -Original Message-
 From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 1:45 PM
 To: 'Tomcat Users List'
 Subject: RE: MySQL control center
 
 
 I just started using it, the one thing to point out is that their user
 management doesn't work properly.  Whenever you update 
 security settings for
 a user, then their password is resaved in a non hashed format 
 causing your
 password to become invalid if you previously set one.
 
 -Bocaj
 
 | -Original Message-
 | From: tomcat guy [mailto:[EMAIL PROTECTED]]
 | Sent: Wednesday, February 05, 2003 12:42 PM
 | To: Tomcat Users List
 | Subject: MySQL control center
 | 
 | Could anyone tell me about the MySQL interfaceMySQLCC?  Any basic
 | information about it would be great (i.e. stability, 
 accuracy, easy of
 | use).
 
 
 -
 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: singleton creation (ot)

2003-02-05 Thread Will Hartung
 From: Felipe Schnack [EMAIL PROTECTED]
 Sent: Wednesday, February 05, 2003 4:05 AM
 Subject: RE: singleton creation (ot)


  I'm not sure yet of how I will do it... I would not like to
 synchronize the entire method because it'll probably be called million
 of times in my app

Then don't call it a million times in your app. Call it once at startup and
stick it in a property in the Context. (Of course, calls to get properties
out of the context may be synchronized, I haven't looked.)

Or simply don't synchronize it and load the singleton at startup, when you
are in more control of the environment and have confidence that a race
condition isn't happening, or at least is not important.

The whole point of the synchronize is to serialize requests during race
conditions. Make the requests when this isn't happening and be done with it.

The generic Singleton pattern works fine when applied genericly to generic
code. In this case you have a higher knowledge of how its being used and can
make decisions based upon that knowledge.

Finally, as a self-rebuttal, Don't worry about it at all unless it becomes
a problem. Early optimization is the source of many evils.

Regards,

Will Hartung
([EMAIL PROTECTED])




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




Tomcat 4.1.18 constantly crashes

2003-02-05 Thread Dietmar Kling
Hi,

i am experiencing under Redhat Linux with apache and tomcat 4.1.18 the 
same problem that this user described

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52122.html

Unexpected Signal : 11 occurred at PC=0x405696DC
Function=array_addressing__5Parse9BasicTypeiPPC4Type+0x118
Library=/usr/java/j2sdk1.4.1_01/jre/lib/i386/server/libjvm.so


Does anybody know a solution to this?

Regards
Dietmar


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



Re: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
  Man... you're actually completely right! I CAN instantiate all of them
at startup! :-
  (these classes must be referenced in an config file, so it's ok)
  Thanks!

On Wed, 2003-02-05 at 16:58, Will Hartung wrote:
  From: Felipe Schnack [EMAIL PROTECTED]
  Sent: Wednesday, February 05, 2003 4:05 AM
  Subject: RE: singleton creation (ot)
 
 
   I'm not sure yet of how I will do it... I would not like to
  synchronize the entire method because it'll probably be called million
  of times in my app
 
 Then don't call it a million times in your app. Call it once at startup and
 stick it in a property in the Context. (Of course, calls to get properties
 out of the context may be synchronized, I haven't looked.)
 
 Or simply don't synchronize it and load the singleton at startup, when you
 are in more control of the environment and have confidence that a race
 condition isn't happening, or at least is not important.
 
 The whole point of the synchronize is to serialize requests during race
 conditions. Make the requests when this isn't happening and be done with it.
 
 The generic Singleton pattern works fine when applied genericly to generic
 code. In this case you have a higher knowledge of how its being used and can
 make decisions based upon that knowledge.
 
 Finally, as a self-rebuttal, Don't worry about it at all unless it becomes
 a problem. Early optimization is the source of many evils.
 
 Regards,
 
 Will Hartung
 ([EMAIL PROTECTED])
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
I was wondering if there was something of this sort that would work.  I saw
a reference to it.  I'll have to try that, but I think it might be just for
the servlet and not necessarily the env the CGI is executed in.

 -Original Message-
 From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 12:08 PM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 Other possible solution attempts include an env-entry/ tag in web.xml or
 
 an Environment/ tag in the server.xml.
 
 At 10:43 2003-02-05 -0700, you wrote:
 What about setting the variable yourself in the catalina.sh script?  If 
 that doesn't work, make sure that the variable is exported (so that it 
 remains in the super shell when the sub shell exits).  Example:
 
 LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
 
 At 11:23 2003-02-05 -0600, you wrote:
 no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
 a
 servlet set up to handle it already, and the CGI is getting executed but
 the
 logs show that it's getting an error loading ld.so because it can't find
 it
 (which is also the case when trying to run it in a shell without having
 LD_LIBRARY_PATH set appropriately).
 
   -Original Message-
   From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
   Sent: Wednesday, February 05, 2003 11:21 AM
   To:   Tomcat Users List
   Subject:  RE: CGI environment vars
  
   how about you do it yourself, I assume that you launch your CGI
 script
   using Runtime.exec
   in that case, use the method that
  
   http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
  
   take a look at
  
   Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
  
   -Original Message-
   From: Madere, Colin [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 05, 2003 8:44 AM
   To: [EMAIL PROTECTED]
   Subject: CGI environment vars
  
  
   Tomcat 4.1.18 : UMN Mapserver CGI
  
   I have a CGI which needs to see the LD_LIBRARY_PATH to get to
 shared
   libraries to run.  However, I can't seem to get whatever shell that
 Tomcat
   uses to run CGIs seeded with that variable.
  
   I tried putting it in the setenv.sh which is checked for and used
 in
   catalina.sh, but that doesn't seem to have any effect on CGIs.
  
   Anyone have an idea?
  
   Colin
  
  
   -
   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]
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.com
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.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: CGI environment vars

2003-02-05 Thread Madere, Colin
Already tried this and it didn't work.  Both in the setenv.sh (checked for
and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.

 -Original Message-
 From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:44 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 What about setting the variable yourself in the catalina.sh script?  If 
 that doesn't work, make sure that the variable is exported (so that it 
 remains in the super shell when the sub shell exits).  Example:
 
 LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
 
 At 11:23 2003-02-05 -0600, you wrote:
 no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
 a
 servlet set up to handle it already, and the CGI is getting executed but
 the
 logs show that it's getting an error loading ld.so because it can't find
 it
 (which is also the case when trying to run it in a shell without having
 LD_LIBRARY_PATH set appropriately).
 
   -Original Message-
   From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
   Sent: Wednesday, February 05, 2003 11:21 AM
   To:   Tomcat Users List
   Subject:  RE: CGI environment vars
  
   how about you do it yourself, I assume that you launch your CGI script
   using Runtime.exec
   in that case, use the method that
  
   http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
  
   take a look at
  
   Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
  
   -Original Message-
   From: Madere, Colin [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 05, 2003 8:44 AM
   To: [EMAIL PROTECTED]
   Subject: CGI environment vars
  
  
   Tomcat 4.1.18 : UMN Mapserver CGI
  
   I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
   libraries to run.  However, I can't seem to get whatever shell that
 Tomcat
   uses to run CGIs seeded with that variable.
  
   I tried putting it in the setenv.sh which is checked for and used in
   catalina.sh, but that doesn't seem to have any effect on CGIs.
  
   Anyone have an idea?
  
   Colin
  
  
   -
   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]
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.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: CGI environment vars

2003-02-05 Thread Madere, Colin
Script isn't written by me, compiled C code.  I'll probably modify the
CGIServlet to include it in the env that execs the script, if possible.
Seems like a better idea than having to modify every CGI or having to modify
every version as I upgrade.

 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:36 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 Looking at the source code of the CGIServlet, these variables are not set
 anywhere.
 My recommendation would be that you modify this servlet to fit your needs,
 or even easier,
 why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?
 
 Filip
 
 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 9:23 AM
 To: 'Tomcat Users List'
 Subject: RE: CGI environment vars
 
 
 no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
 servlet set up to handle it already, and the CGI is getting executed but
 the
 logs show that it's getting an error loading ld.so because it can't find
 it
 (which is also the case when trying to run it in a shell without having
 LD_LIBRARY_PATH set appropriately).
 
  -Original Message-
  From:   Filip Hanik [SMTP:[EMAIL PROTECTED]]
  Sent:   Wednesday, February 05, 2003 11:21 AM
  To: Tomcat Users List
  Subject:RE: CGI environment vars
  
  how about you do it yourself, I assume that you launch your CGI script
  using Runtime.exec
  in that case, use the method that 
  
  http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
  
  take a look at
  
  Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
  
  -Original Message-
  From: Madere, Colin [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 05, 2003 8:44 AM
  To: [EMAIL PROTECTED]
  Subject: CGI environment vars
  
  
  Tomcat 4.1.18 : UMN Mapserver CGI
  
  I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
  libraries to run.  However, I can't seem to get whatever shell that
 Tomcat
  uses to run CGIs seeded with that variable.
  
  I tried putting it in the setenv.sh which is checked for and used in
  catalina.sh, but that doesn't seem to have any effect on CGIs.
  
  Anyone have an idea?
  
  Colin
  
  
  -
  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]
 
   File: ATT343620.txt  

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




Re: localhost:8080 connection refused

2003-02-05 Thread David Nelson
I apologize for taking a bit to get back to you.  Below are the contents of
Catalina.out

java.util.zip.ZipException: error in opening zip file
 at java.util.zip.Zip.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:117)
 at java.util.jar.JarFile.init(JarFile.java:55)
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: error in opening zip file
 at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
 at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
 at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)

Additionally, I both were gzip  from Apache.org.

Thanks again for your help.


- Original Message -
From: Turner, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 10:59 AM
Subject: RE: localhost:8080 connection refused



 That's why you are getting connection refused.  Tomcat isn't even
 starting.

 Can you post the entire contents of catalina.out for a full startup
attempt,
 instead of just the error message?  It might help in debugging if we can
see
 exactly when in the sequence this error is thrown.  Just null out
 catalina.out, then try and start Tomcat again.

 Also, how did you do the installs for Tomcat and Apache?  RPM? Source?
 Binary?  Do you have zip/unzip or gzip/gunzip on your system?  The error
 message is calling a native method.

 John


 -Original Message-
 From: David Nelson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:23 AM
 To: Tomcat Users List
 Subject: Re: localhost:8080 connection refused


 After having a look at Catalina.out, here are a few errors:

 java.util.zip.ZipException: error in opening zip file
  at java.util.zip.ZipFile.open(Native Method)
  at java.util.zip.ZipFile.init(ZipFile.java:112)
  at java.util.jar.JarFile.init(JarFile.java:117)
  at java.util.jar.JarFile.init(JarFile.java:55)
  at

org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
 dClassLoader.java:1082)
  at

org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
 va:200)
  at

org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
 Factory.java:202)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
 Bootstrap: Class loader creation threw exception
 java.lang.IllegalArgumentException: addRepositoryInternal:
 java.util.zip.ZipException: error in opening zip file
  at

org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
 dClassLoader.java:1110)
  at

org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
 va:200)
  at

org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
 Factory.java:202)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)

 The block above repeats for each time I start Tomcat.  It doesn't look too
 promising.

  Original Message -
 From: Bill [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, February 05, 2003 10:30 AM
 Subject: Re: localhost:8080 connection refused


  David
 
  Default RH installations have a firewall, did you not install the
  firewall or adjust it to accept connections on port 8080?  Just a
  thought...
 
  Also, you havent included any log entriesis there nothing in the
  logs?
 
  -b
 
 
  On Wed, 2003-02-05 at 10:22, David Nelson wrote:
   I have heard similar posts but after trying everything I can get my
 hands
   on, Tomcat is still refusing to work  I get a connection refused.
  
   Here are a few system details and what I've done.
   OS RH 8.0
   Tomcat 4.1.18
   Apache 2.0.44
   mod_jk-2.0.43.so
   java2 1.4 (tested manually and works)
   $JAVA_HOME and $CATALINA_HOME are set
  
   httpd.conf has
   LoadModule jk_module modules/mod_jk-2.0.43.so
   Include /user/local/tomcat/conf/auto/mod_jk.conf
  
   incidentally, the mod_jk.conf is not being generated.
  
   Inside Tomcat's server.xml
   Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.ajp.Tomcat4.config.ApacheConfig
 modJk=/usr/local/apache2/modules/mod_jk-2.0.43.so / 
  
   Host name=localhost debug=0 appBase=webapps unpackWARs=true
 autoDeploy=true
  Listener
   className=org.apache.ajp.Tomcat4.config.ApacheConfig
   append=true
  forwardAll=false
   

mod_jk redirect simple question

2003-02-05 Thread SSchaubach
Hi,
  when you finally get your site up. How can you configure apache to do the
following:

http://IPaddress1.com   --- redirect http://IPaddress1.com/dir/myfile.jsp

Best,

Stephen



Re: CGI environment vars

2003-02-05 Thread Tim Funk
I haven;t seen this discussed yet, you are exporting your variables in 
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:
Already tried this and it didn't work.  Both in the setenv.sh (checked for
and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.



-Original Message-
From:	Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 11:44 AM
To:	Tomcat Users List
Subject:	RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:

no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's


a


servlet set up to handle it already, and the CGI is getting executed but


the


logs show that it's getting an error loading ld.so because it can't find


it


(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).



-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that


Tomcat


uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.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]





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




Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost www.abc.com:80

2003-02-05 Thread Oscar Carrillo
Yes, that's the way I have mine. I just noticed now that you say that
everything is working OK in your original message. So I imagine that it is
just a redundancy. I would try and pulling out the relevant info in
mod_jk.conf and putting it in http.conf manually. I mention it below.

Where are you seeing this warning? Is it in tomcat logs or apache logs?

I only have 2 virtual hosts, one for SSL and one for non-SSL. I had to
have virtual hosts, so that I could completely separate out SSL and
non-SSL traffic, so that non-ssl traffic would be re-directed to a
different webapp than ssl traffic. I'm not doing exactly what you're doing 
so my setup may not be completely applicable.

I commented out the
#Include /path/to/mod_jk.conf
because that would make the JkMounts global. You might want to try and do 
the same. 

Here are my recent notes on my configuration that I did after the fact, so 
I haven't fully tested this to make sure this is exactly what I did.
But maybe this helps you. You may notice that I have struts too, so I have 
a map to *.do files too.

You might also want to check how things work from the same computer and 
from another computer over the network. And see if the behavior is the 
same.

Good luck,
Oscar

--CONFIGURE APACHE/NON-SSL---
#Look for similar lines.
#Make sure you have lines that say this in conf/http.conf:
Listen myhost.mydomain:80

#Same with this line:
ServerName myhost.mydomain:80

#Same with this line:
NameVirtualHost myhost.mydomain

#Make sure you have VirtualHost like this
--
VirtualHost myhost.mydomain:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/http_nonsecure
ServerName myhost.mydomain:80
ErrorLog logs/webapp_public-error_log
CustomLog logs/webapp_public-access_log common

# Static files
Alias /mywebapp 
/usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp_nonsecure

Directory 
/usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp_nonsecure
Options Indexes FollowSymLinks
DirectoryIndex index.jsp
/Directory

# Deny direct access to WEB-INF and META-INF
#
Location /mywebapp_nonsecure/WEB-INF/*

AllowOverride None
deny from all
/Location

Location /mywebapp_nonsecure/META-INF/*
AllowOverride None
deny from all
/Location

#Add these lines too
#It's likely you don't want people to access your
#secure site via plain old http. So I tell it to go
#somewhere else where I may have useful but unsecured
#site
JkMount /mywebapp_nonsecure/*.do  ajp13
JkMount /mywebapp_nonsecure/*.jsp  ajp13
 /VirtualHost

#Make sure you add these lines too
JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log

--CONFIGURE APACHE/SSL---
#Now make changes in ssl.conf
#Look for similar lines and make sure it looks like this:

VirtualHost _default_:443

#  General setup for the virtual host
DocumentRoot /usr/local/http_secure
#ServerName new.host.name:443
ServerName myhost.mydomain:443
ServerAdmin [EMAIL PROTECTED]
ErrorLog logs/error_log
TransferLog logs/access_log

Redirect / https://myhost.mydomain/mywebapp

# Static files
Alias /mywebapp /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp

Directory /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp
Options Indexes FollowSymLinks
DirectoryIndex index.jsp
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /mywebapp/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /mywebapp/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /mywebapp/*.do  ajp13
JkMount /mywebapp/*.jsp  ajp13
--



On Wed, 5 Feb 2003, tomcat guy wrote:

 Is that the way you have yours configured?
 (i.e. virtualhost abc.com )
 It's not working here, everything goes to the localHost...
 
 I don't know what is going on here.  I had things working ok earlier then I
 made the switch to jk2, to see if Tomcat would run the way it was suppose to
 (if I had the proper config), and had ALL kinds of problems!  Not enough
 documentation on it...
 I went back to my original configuration and ppphhhttt...  I used the exact
 same copies of mod_jk, workers, server.xml, etc
 
 It is just a warning should I ignore the darn thing?
 
 
 - Original Message -
 From: Oscar Carrillo [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, February 04, 2003 3:27 AM
 Subject: Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost
 www.abc.com:80
 
 
  Like I said I'm not an expert on apache configuration, but I have it as my
  domainname. One of the other messages someone followed up with said it has
  to be the actual domainname that is going to host the virtual hosts.
 
  I'm pretty sure you need to NOT have the asterisk in the VirtualHost *
  line you have. Look below to see the lines I would change.
 
  

RE: CGI environment vars

2003-02-05 Thread Madere, Colin
Yep.. tried both the sh and csh syntax, no luck.

 -Original Message-
 From: Tim Funk [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 1:28 PM
 To:   Tomcat Users List
 Subject:  Re: CGI environment vars
 
 I haven;t seen this discussed yet, you are exporting your variables in 
 setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?
 
 Example:
 
 export WACKY=very
 
 or
 
 ANSWER=42
 export ANSWER
 
 
 -Tim
 
 
 Madere, Colin wrote:
  Already tried this and it didn't work.  Both in the setenv.sh (checked
 for
  and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
  running environment but is not transferred to the CGIServlet's exec
  environment.
  
  
 -Original Message-
 From:   Sean Dockery [SMTP:[EMAIL PROTECTED]]
 Sent:   Wednesday, February 05, 2003 11:44 AM
 To: Tomcat Users List
 Subject:RE: CGI environment vars
 
 What about setting the variable yourself in the catalina.sh script?  If 
 that doesn't work, make sure that the variable is exported (so that it 
 remains in the super shell when the sub shell exits).  Example:
 
 LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
 
 At 11:23 2003-02-05 -0600, you wrote:
 
 no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).
 There's
 
 a
 
 servlet set up to handle it already, and the CGI is getting executed
 but
 
 the
 
 logs show that it's getting an error loading ld.so because it can't
 find
 
 it
 
 (which is also the case when trying to run it in a shell without having
 LD_LIBRARY_PATH set appropriately).
 
 
 -Original Message-
 From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 11:21 AM
 To:   Tomcat Users List
 Subject:  RE: CGI environment vars
 
 how about you do it yourself, I assume that you launch your CGI script
 using Runtime.exec
 in that case, use the method that
 
 http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
 
 take a look at
 
 Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
 
 -Original Message-
 From: Madere, Colin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 05, 2003 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: CGI environment vars
 
 
 Tomcat 4.1.18 : UMN Mapserver CGI
 
 I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
 libraries to run.  However, I can't seem to get whatever shell that
 
 Tomcat
 
 uses to run CGIs seeded with that variable.
 
 I tried putting it in the setenv.sh which is checked for and used in
 catalina.sh, but that doesn't seem to have any effect on CGIs.
 
 Anyone have an idea?
 
 Colin
 
 
 -
 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]
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.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]
  
  
 
 
 -
 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: CGI environment vars

2003-02-05 Thread Tim Funk
O sweet sweet source code for CGIServlet.java 

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=1.11content-type=text/vnd.viewcvs-markup


Heres the deal: Look for the method:
protected boolean setCGIEnvironment(HttpServletRequest req)

and you'll see the environment be created. This environment is passed to 
the script. So you are SOL I think.

But there is hope ... write a wrapper shell script around your real CGI 
script like this and you might luck out:
--
#!/bin/sh
export CRAP=mycrap
. /pull/in/some/file

exec real_cgi_name
--

-Tim

Madere, Colin wrote:
Yep.. tried both the sh and csh syntax, no luck.



-Original Message-
From:	Tim Funk [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 1:28 PM
To:	Tomcat Users List
Subject:	Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in 
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:

Already tried this and it didn't work.  Both in the setenv.sh (checked


for


and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.




-Original Message-
From:	Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 11:44 AM
To:	Tomcat Users List
Subject:	RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).


There's


a



servlet set up to handle it already, and the CGI is getting executed


but


the



logs show that it's getting an error loading ld.so because it can't


find


it



(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).




-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that


Tomcat



uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.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]





-
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: CGI environment vars

2003-02-05 Thread Jim Urban
It's been years since I worked with unix (ok, aix).  However I do recall a
file .profile (I think it was in your home directory) which is where we set
our environment vars.  It was executed by the shell when you logged on.
Have you tried this?  If this is way off, please ignore it, I don't need to
be flamed (having a rough day).

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:28 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:
 Already tried this and it didn't work.  Both in the setenv.sh (checked for
 and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
 running environment but is not transferred to the CGIServlet's exec
 environment.


-Original Message-
From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:44 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If
that doesn't work, make sure that the variable is exported (so that it
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:

no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's

a

servlet set up to handle it already, and the CGI is getting executed but

the

logs show that it's getting an error loading ld.so because it can't find

it

(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).


-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that

Tomcat

uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.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]




-
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: MySQL control center

2003-02-05 Thread tomcat guy
so everytime you change a users password you should update it in the shell
?


- Original Message -
From: Jacob Hookom [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 12:45 PM
Subject: RE: MySQL control center


I just started using it, the one thing to point out is that their user
management doesn't work properly.  Whenever you update security settings for
a user, then their password is resaved in a non hashed format causing your
password to become invalid if you previously set one.

-Bocaj

| -Original Message-
| From: tomcat guy [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 05, 2003 12:42 PM
| To: Tomcat Users List
| Subject: MySQL control center
|
| Could anyone tell me about the MySQL interfaceMySQLCC?  Any basic
| information about it would be great (i.e. stability, accuracy, easy of
| use).


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




mod_jk2

2003-02-05 Thread John VANSPRONSSEN
Good day,

Just wondering if anyone at all has successfully gotten mod_jk2 to work
between Apache and Tomcat on W2K.

I have installed Apache 2.0.44 right out of the box and Tomcat 4.1.18 here
at the office. jk2.properties is as it comes in the installation.

worker2.properties is as follows

# Define the communication channel 
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

I get the following in the apache error logs

[Wed Feb 05 10:31:23 2003] [error] workerEnv.init() create slot epStat.0
failed
[Wed Feb 05 10:31:23 2003] [error] lb.service() worker failed 12 for
ajp13:localhost:8009
[Wed Feb 05 10:31:23 2003] [error] lb.service() unrecoverable error...
[Wed Feb 05 10:31:23 2003] [error] mod_jk.handler() Error connecting to
tomcat 12
[Wed Feb 05 10:38:19 2003] [error] lb.getWorker() reenable
ajp13:localhost:8009
[Wed Feb 05 10:38:19 2003] [error] workerEnv.init() create slot epStat.0
failed
[Wed Feb 05 10:38:19 2003] [error] lb.service() worker failed 12 for
ajp13:localhost:8009
[Wed Feb 05 10:38:19 2003] [error] lb.service() unrecoverable error...
[Wed Feb 05 10:38:19 2003] [error] mod_jk.handler() Error connecting to
tomcat 12

This is from a completely new installation of both products and follows the
directions on the Tomcat site. 

I have been trying this at home as well but under Apache 1.37, with
precisely the same results.

I have looked thru the newsgroups, google, archives etc, and it seems that
no-one has succesfully used mod_jk2. 

So rather than point me at documents on a the site, I would like someone who
knows how this works to simply tell me what is missing from the
configuration. I have seen a lot of other people asking the same question
with no resolution that I have been able to locate. The only answers have
been check the docs on the jakarta site. 

I currently am running 4 commercial sites using Apache/Resin without any
difficulty. I thought I would have another look at Tomcat after having
thrown it out over a year ago. It would appear that not much has changed.
Given that both Apache and Tomcat are being developed under the same
roof(more or less) how is it that configuration of mod_jk2 is so difficult
or error-prone? The next logical question would be, if it is so hard to get
the Apache/Tomcat connection working, how much more difficult is it to get a
IIS/Netscape connection working?


John Vanspronssen


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




Re: mod_jk2

2003-02-05 Thread Oscar Carrillo
Hi,

I also could not mod_jk2 working after trying for 2 or 3 days.
I compiled my own but could never get it working.
I tried the combination 
RedHatLinux-7.3 w/2.4.20kernel/JDK-1.4.1_01/tomcat-4.1.18/apache-2.0.44/mod_jk2

I ended my frustration, by using a binary of mod_jk.
If I ever hear of a concrete success story with some info, I may try 
again.

I'm interested in seeing what others say about this.
Mod Parent Up... Woops wrong site.

Oscar

On Wed, 5 Feb 2003, John VANSPRONSSEN wrote:

 Good day,
 
 Just wondering if anyone at all has successfully gotten mod_jk2 to work
 between Apache and Tomcat on W2K.
 
 I have installed Apache 2.0.44 right out of the box and Tomcat 4.1.18 here
 at the office. jk2.properties is as it comes in the installation.
 
 worker2.properties is as follows
 
 # Define the communication channel 
 [channel.socket:localhost:8009]
 info=Ajp13 forwarding over socket
 tomcatId=localhost:8009
 
 # Map the Tomcat examples webapp to the Web server uri space
 [uri:/examples/*]
 info=Map the whole webapp
 
 I get the following in the apache error logs
 
 [Wed Feb 05 10:31:23 2003] [error] workerEnv.init() create slot epStat.0
 failed
 [Wed Feb 05 10:31:23 2003] [error] lb.service() worker failed 12 for
 ajp13:localhost:8009
 [Wed Feb 05 10:31:23 2003] [error] lb.service() unrecoverable error...
 [Wed Feb 05 10:31:23 2003] [error] mod_jk.handler() Error connecting to
 tomcat 12
 [Wed Feb 05 10:38:19 2003] [error] lb.getWorker() reenable
 ajp13:localhost:8009
 [Wed Feb 05 10:38:19 2003] [error] workerEnv.init() create slot epStat.0
 failed
 [Wed Feb 05 10:38:19 2003] [error] lb.service() worker failed 12 for
 ajp13:localhost:8009
 [Wed Feb 05 10:38:19 2003] [error] lb.service() unrecoverable error...
 [Wed Feb 05 10:38:19 2003] [error] mod_jk.handler() Error connecting to
 tomcat 12
 
 This is from a completely new installation of both products and follows the
 directions on the Tomcat site. 
 
 I have been trying this at home as well but under Apache 1.37, with
 precisely the same results.
 
 I have looked thru the newsgroups, google, archives etc, and it seems that
 no-one has succesfully used mod_jk2. 
 
 So rather than point me at documents on a the site, I would like someone who
 knows how this works to simply tell me what is missing from the
 configuration. I have seen a lot of other people asking the same question
 with no resolution that I have been able to locate. The only answers have
 been check the docs on the jakarta site. 
 
 I currently am running 4 commercial sites using Apache/Resin without any
 difficulty. I thought I would have another look at Tomcat after having
 thrown it out over a year ago. It would appear that not much has changed.
 Given that both Apache and Tomcat are being developed under the same
 roof(more or less) how is it that configuration of mod_jk2 is so difficult
 or error-prone? The next logical question would be, if it is so hard to get
 the Apache/Tomcat connection working, how much more difficult is it to get a
 IIS/Netscape connection working?
 
 
 John Vanspronssen
 
 
 -
 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: CGI environment vars

2003-02-05 Thread Jim Urban
Just an idea:

Extend the CGIServlet (MyCGIServlet) and override the setCGIEnvironment
method (it is protected, so you could call it and then add your variables
which you could read from a properties file or something).  Then modify the
web.xml file found in Tomcat's conf directory to invoke your CGI servlet by
changing the servlet-class attribute of the cgi servlet element
(servlet-classcom.mycomp.servlets.MyCGIServlet/servlet-class).  I don't
see why this wouldn't work.

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:38 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

O sweet sweet source code for CGIServlet.java 

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/
apache/catalina/servlets/CGIServlet.java?rev=1.11content-type=text/vnd.view
cvs-markup


Heres the deal: Look for the method:
protected boolean setCGIEnvironment(HttpServletRequest req)

and you'll see the environment be created. This environment is passed to
the script. So you are SOL I think.

But there is hope ... write a wrapper shell script around your real CGI
script like this and you might luck out:
--
#!/bin/sh
export CRAP=mycrap
. /pull/in/some/file

exec real_cgi_name
--

-Tim

Madere, Colin wrote:
 Yep.. tried both the sh and csh syntax, no luck.


-Original Message-
From: Tim Funk [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:28 PM
To:   Tomcat Users List
Subject:  Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:

Already tried this and it didn't work.  Both in the setenv.sh (checked

for

and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.



-Original Message-
From:   Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, February 05, 2003 11:44 AM
To: Tomcat Users List
Subject:RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If
that doesn't work, make sure that the variable is exported (so that it
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).

There's

a


servlet set up to handle it already, and the CGI is getting executed

but

the


logs show that it's getting an error loading ld.so because it can't

find

it


(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).



-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the LD_LIBRARY_PATH to get to shared
libraries to run.  However, I can't seem to get whatever shell that

Tomcat


uses to run CGIs seeded with that variable.

I tried putting it in the setenv.sh which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.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]




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

Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost www.abc.com:80

2003-02-05 Thread tomcat guy
Thanks Oscar, I'll see what happens.  Your example appears to be a good
example of the configuration that I am looking forssl and all...

As for the error msg, it came from doing a syntax check (i.e.
apache.exe -t).  It just suddenly appeared the other day.  Every thing
appears to perform normally but I'll have to keep it in mind if there is a
future problem with my vhosts the first has precedence part of the msg
is what bothers me...
Thanks,
Chris

- Original Message -
From: Oscar Carrillo [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 2:01 AM
Subject: Re: VirtualHost www.zcompany.com:80 overlaps VirtualHost
www.abc.com:80


 Yes, that's the way I have mine. I just noticed now that you say that
 everything is working OK in your original message. So I imagine that it is
 just a redundancy. I would try and pulling out the relevant info in
 mod_jk.conf and putting it in http.conf manually. I mention it below.

 Where are you seeing this warning? Is it in tomcat logs or apache logs?

 I only have 2 virtual hosts, one for SSL and one for non-SSL. I had to
 have virtual hosts, so that I could completely separate out SSL and
 non-SSL traffic, so that non-ssl traffic would be re-directed to a
 different webapp than ssl traffic. I'm not doing exactly what you're doing
 so my setup may not be completely applicable.

 I commented out the
 #Include /path/to/mod_jk.conf
 because that would make the JkMounts global. You might want to try and do
 the same.

 Here are my recent notes on my configuration that I did after the fact, so
 I haven't fully tested this to make sure this is exactly what I did.
 But maybe this helps you. You may notice that I have struts too, so I have
 a map to *.do files too.

 You might also want to check how things work from the same computer and
 from another computer over the network. And see if the behavior is the
 same.

 Good luck,
 Oscar

 --CONFIGURE APACHE/NON-SSL---
 #Look for similar lines.
 #Make sure you have lines that say this in conf/http.conf:
 Listen myhost.mydomain:80

 #Same with this line:
 ServerName myhost.mydomain:80

 #Same with this line:
 NameVirtualHost myhost.mydomain

 #Make sure you have VirtualHost like this
 --
 VirtualHost myhost.mydomain:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /usr/local/http_nonsecure
 ServerName myhost.mydomain:80
 ErrorLog logs/webapp_public-error_log
 CustomLog logs/webapp_public-access_log common

 # Static files
 Alias /mywebapp
 /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp_nonsecure

 Directory
 /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp_nonsecure
 Options Indexes FollowSymLinks
 DirectoryIndex index.jsp
 /Directory

 # Deny direct access to WEB-INF and META-INF
 #
 Location /mywebapp_nonsecure/WEB-INF/*

 AllowOverride None
 deny from all
 /Location

 Location /mywebapp_nonsecure/META-INF/*
 AllowOverride None
 deny from all
 /Location

 #Add these lines too
 #It's likely you don't want people to access your
 #secure site via plain old http. So I tell it to go
 #somewhere else where I may have useful but unsecured
 #site
 JkMount /mywebapp_nonsecure/*.do  ajp13
 JkMount /mywebapp_nonsecure/*.jsp  ajp13
  /VirtualHost

 #Make sure you add these lines too
 JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
 JkLogFile /usr/local/tomcat/logs/mod_jk.log

 --CONFIGURE APACHE/SSL---
 #Now make changes in ssl.conf
 #Look for similar lines and make sure it looks like this:

 VirtualHost _default_:443

 #  General setup for the virtual host
 DocumentRoot /usr/local/http_secure
 #ServerName new.host.name:443
 ServerName myhost.mydomain:443
 ServerAdmin [EMAIL PROTECTED]
 ErrorLog logs/error_log
 TransferLog logs/access_log

 Redirect / https://myhost.mydomain/mywebapp

 # Static files
 Alias /mywebapp /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp

 Directory /usr/local/jakarta-tomcat-4.1.18/webapps/mywebapp
 Options Indexes FollowSymLinks
 DirectoryIndex index.jsp
 /Directory


 # Deny direct access to WEB-INF and META-INF
 #
 Location /mywebapp/WEB-INF/*
 AllowOverride None
 deny from all
 /Location

 Location /mywebapp/META-INF/*
 AllowOverride None
 deny from all
 /Location

 JkMount /mywebapp/*.do  ajp13
 JkMount /mywebapp/*.jsp  ajp13
 --



 On Wed, 5 Feb 2003, tomcat guy wrote:

  Is that the way you have yours configured?
  (i.e. virtualhost abc.com )
  It's not working here, everything goes to the localHost...
 
  I don't know what is going on here.  I had things working ok earlier
then I
  made the switch to jk2, to see if Tomcat would run the way it was
suppose to
  (if I had the proper config), and had ALL kinds of problems!  Not enough
  documentation on it...
  I 

error loading jar files related to modified CATALINA_BASE directory

2003-02-05 Thread Evans, Michael
I am running a tomcat 4.1.18 server in the following way:
The catalina_base directory is set up as /web.  This allows me to keep the
distribution of the code seperate from the 
version of the tomcat server. It is also useful for deploying multiple
instances on the same machine.  

So, I have 
CATALINA_BASE=/web
CATALINA_HOME=/usr/jakarta-tomcat4.1.18

Here is the problem:
Any jars in the /web/webapps/application/WEB-INF/lib directory cause an
error when the context is initialized.  While starting up, tomcat finds the
jar files, but while loading gives the exception. that it can't find the
file at the requested resource (which seems odd given that it was found
during the scanning process.

the error from the logs and the server.xml file are included below


I've tried several solutions including: 
1) putting the jars in the /{tomcat}/shared/lib directory -- the classes in
the jars were not available at runtime.
2) experimenting with the appbase directory. --no effect
3) The problem is NOT related to the struts.jar file.  The same error occurs
with the mysql.jar file

The system works when CATALINA_BASE == CATALINA_HOME, but that does not fit
with what I am trying to do for the application.

Any insight would be appreciated

mike evans


2003-02-05 12:12:50 ContextConfig[]:Adding path'/WEB-INF/lib/struts.jar'
2003-02-05 12:12:50 ContextConfig[]:  Scanning TLD atresource path
'/WEB-INF/struts-bean.tld'
2003-02-05 12:12:51 ContextConfig[]:  Scanning TLD atresource path
'/WEB-INF/struts.tld'
2003-02-05 12:12:52 ContextConfig[]:  Scanning JAR atresource path
'/WEB-INF/lib/struts.jar'
2003-02-05 12:12:52 ContextConfig[] Exceptionprocessing JAR at resource path
/WEB-INF/lib/struts.jarjavax.servlet.ServletException: Exception
processingJAR at resource path /WEB-INF/lib/struts.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
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.java:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   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:2189)
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)
- Root Cause -
java.io.IOException: No such file or directory
at
java.io.UnixFileSystem.createFileExclusively(NativeMethod)
at java.io.File.checkAndCreate(File.java:1159)
at java.io.File.createTempFile(File.java:1244)
at java.io.File.createTempFile(File.java:1281)
at
sun.net.www.protocol.jar.JarFileFactory$1.run(JarFileFactory.java:190)
at
java.security.AccessController.doPrivileged(NativeMethod)
at
sun.net.www.protocol.jar.JarFileFactory.retrieve(JarFileFactory.java:183)
at
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:100)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:88)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:7
2)
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906)
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.java:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   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

  1   2   >