RE: [dbcp] Call Oracle stored procedure via DBCP?

2004-12-02 Thread Phillip Qin
If you need to get the underlying connection,

((BasicDataSource) dataSource).setAccessToUnderlyingConnectionAllowed(true);

Before you can getConnection.



-Original Message-
From: Shankar Unni [mailto:[EMAIL PROTECTED] 
Sent: December 1, 2004 5:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [dbcp] Call Oracle stored procedure via DBCP?


Sergey Karpov wrote:
 During a call of stored procedure through DBCP there is a mistake of 
 reduction of type:
 
 java.lang.ClassCastException

That's because you're assuming that dbcp returns you a naked vendor JDBC 
Connection object. It doesn't - it returns you a pooled connection 
wrapper with forwarding methods.  Ditto for CallableStatements.

If you really needed to get the underlying object, you'd have to look at 
the JavaDoc for DBCP.


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


!DSPAM:41ae4678152041696882794!


RE: Error Preventing upgrade to Tomcat 5

2004-11-30 Thread Phillip Qin
I thought it is a nice feature of Tomcat 5 since it hides the index.jsp from
http://localhost/index.jsp so that =the main link becomes http://localhost.

-Original Message-
From: Chris Cherrett [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 8:30 PM
To: Tomcat Users List
Subject: Re: Error Preventing upgrade to Tomcat 5


I have found a work around. It would require that we werite our jsps.


If I pass this to my controller it crashes in Tomcat 5
document.frmGeneral.taskService.value = /;

This works
document.frmGeneral.taskService.value = ;

Does this help?

Thanks

On Monday 29 November 2004 06:23 pm, Jean-Francois Arcand wrote:
  From the source, it possible our code need a fix. Can you open a bug

 and attach a test case? Mainly, this line is failling:
  199 // The first scenario occurs when the jsp is not
  directly under / 200 // example: /utf16/foo.jsp
  201 if (requestUri != null){
  202 String currentIncludedUri
  203 =
  requestUri.substring(requestUri.indexOf(includeUri)); 204

 probably the indexOf is returning -1

 Thanks

 -- Jeanfrancois

 Chris Cherrett wrote:
  I have tried to solve this now for awhile and can't seem to track it 
  down. The error only happens in Tomcat 5.
 
  When I call
 
  RequestDispatcher taskDispatcher =
  req.getRequestDispatcher(taskServices[c]);
 
  if (taskDispatcher != null)
  {
  taskDispatcher.include(req, res);   //crashed
  here }
 
  The request dispatcher gives me the following output:
 
  Nov 29, 2004 5:23:02 PM 
 org.apache.catalina.core.ApplicationDispatcher
  invoke SEVERE: Servlet.service() for servlet jsp threw exception
  java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  at java.lang.String.substring(String.java:1762)
  at java.lang.String.substring(String.java:1735)
  at
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:202) at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
 ionFilterChain.java:237) at
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
 rChain.java:157) at
 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatch
 er.java:674) at
 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispa
 tcher.java:576) at
 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatc
 her.java:501) at
  TSIController.TSIController.service(TSIController.java:47) at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
 ionFilterChain.java:237) at
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
 rChain.java:157) at
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve
 .java:214) at
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
 .java:178) at
 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
 126) at
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
 105) at
 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
 ava:107) at
 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:14
 8) at
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825
 ) at
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo
 nnection(Http11Protocol.java:731) at
 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.
 java:526) at
 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowe
 rWorkerThread.java:80) at
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.
 java:684) at java.lang.Thread.run(Thread.java:595)
  in exception
  java.lang.StringIndexOutOfBoundsException: String index out of range: -1
 
  Any help would be appriciated.
 
  Thanks

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

-- 
Chris Cherrett
Tracking Solutions International
1-877-TSIWARE
www.tsiware.com

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


!DSPAM:41abceba191421824712322!


RE: What Connector Should I Use?

2004-11-29 Thread Phillip Qin
I think the other reason cited in the news does not apply to me. I use
jk2. I like it because it is easy to configure. Of course, if people already
have the jk configure in production, why would they bother upgrading to jk2
and creating a new learning curve? Look at how many sites still use Apache
1.3.

-Original Message-
From: Thomas Charles Robinson [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 11:00 AM
To: [EMAIL PROTECTED]
Subject: What Connector Should I Use?


Hi,

I'm trying to determine the correct connector to use these days. I've seen
conflicting content on jakarta.apache.org:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html

15 November 2004 - JK2 is officially unsupported!
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/news/20041100.html#2004
1115.1)

Is this the connector or the protocol? is mod_jk using the JK2 protocol? I'm
very confused over this. Can some please enlighten me?

Thanks in advance

Reagards,

Tom Robinson


-- 
Thomas Robinson - IT Director Constant Stream

   Integration, Support, Development and Training
   Linux, Oracle, Windows, Networking

   (Daedalus Compass Pty Ltd)Cell: +44 (0)7879 428 968
   132 Clifden Court, Clifden Road   Work: +44 (0)20 8891 6262
   Twickenham, Middlesex, TW1 4LRFax:  +44 (0)20 8891 6363
   United Kingdom

   CONFIDENTIALITY: Copyright (C). This message with any appended or
   attached material is intended for addressees only and may not be
   copied or forwarded to or used by other parties without permission.


RE: What Connector Should I Use?

2004-11-29 Thread Phillip Qin
Will you suggest that we can now start switching jk2 to either mod_proxy or
mod_jk? I really hate jk because it is difficult to configure (am I the
first one to say that?) compared to jk2. I am kinda guy that would like to
deal with the enemy I know, in this case - jk2.

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 11:39 AM
To: Tomcat Users List
Subject: Re: What Connector Should I Use?


Phillip Qin wrote:
 I think the other reason cited in the news does not apply to me. I 
 use jk2. I like it because it is easy to configure.

You are the first one saying that :).


 Of course, if people already
 have the jk configure in production, why would they bother upgrading 
 to jk2 and creating a new learning curve? Look at how many sites still 
 use Apache 1.3.
 

Also things like pluggable protocol never went trough socket channel, and
that already works very well in the jk connector.

Instead of trying to fix all that we decided to move forward and integrate
ajp protocol directly inside the httpd's core as an extensions to proxy
module. This new feature will be available out-of-the-box within apache2.2.

As said in the news section. We'll continue to fully support jk for all
other web servers, and backport all the good stuff from jk2 (probably even
the unix sockets). A lots of work has already been done in that direction,
like new load balancer algorithm, socket timeouts, extensive logging, bug
fixing, etc...

Regards,
Mladen Turk.

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


!DSPAM:41ab50a113398119788!


RE: EJB in tomcat

2004-11-29 Thread Phillip Qin
EJB needs EJB container. Tomcat is a servlet/jsp container. However, you can
find enterprice beans through naming lookup.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 2:55 PM
To: 'Tomcat Users List'
Subject: RE: EJB in tomcat 


 Can EJB's be  deployed in tomcat ??

No. 



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


!DSPAM:41ab7ede154252114736115!


RE: Tomcat automatically serializes session on shutdown and start up on Unix

2004-11-29 Thread Phillip Qin
You can also start tomcat in your rc.d init script.

-Original Message-
From: Pek Lee [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 4:37 PM
To: Tomcat Users List
Subject: RE: Tomcat automatically serializes session on shutdown and startup
on Unix


Hi Shapira,
 
In Windows, I ran Tomcat as a service. However, in Unix I ran Tomcat from
the command line.
 
I would appreciate if you could provide some information about the
difference between the 2 modes available to startup/shutdown Tomcat.
 
Cheers,
-Pek Lee-

Shapira, Yoav [EMAIL PROTECTED] wrote:

Hi,
In my reply on jakarta-general, I asked whether when you run on windows as a
service or from the command line. Running from the command line, there
should be no difference between HPUX and windows as far as session
persistence goes.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Pek Lee [mailto:[EMAIL PROTECTED]
Sent: Monday, November 29, 2004 3:41 PM
To: [EMAIL PROTECTED]
Subject: Tomcat automatically serializes session on shutdown and
startup on
Unix


Hi there,

I have been having some trouble sending this email to this user group.
So
if you have receive this more than once, sorry! And if you have
replied to
it, please forward it to me again as I have not receive any respond so 
far...Thanks!

---

---

I am running in to known java.io.NotSerializableException issue when
Tomcat
(4.1.27) shutdown or startup.

The strange thing is that I do not get this error when running the 
application on Tomcat/Windows but seem to be encountering the problem
in
Tomcat/HP-UX 11i. Does the Tomcat shutdown or startup differently in 
Windows vs. Unix? To workaround that, I basically have to set the
Manager
component to have pathname=null and saveOnRestart=false in
server.xml.

Could anyone explain the reason I am seeing two different behaviours?

LOG:

2004-11-25 12:49:08 StandardManager[/dcm] IOException while loading 
persisted sessions: java.io.WriteAbortedEx

ception: writing aborted; java.io.NotSerializableException: 
com.documentum.web.form.FormHistory

java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: com.documentum.web.form.Form

History

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

at java.util.HashMap.readObject(HashMap.java:986)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
9)

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
l.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)

at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)

at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164
6)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

at 
org.apache.catalina.session.StandardSession.readObject(StandardSession.
java
:1369)

at 
org.apache.catalina.session.StandardSession.readObjectData(StandardSess
ion.
java:864)

at 
org.apache.catalina.session.StandardManager.load(StandardManager.java:4
40)

at
org.apache.catalina.session.StandardManager.start(StandardManager.java:
655)

at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:357
1)

at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
ava:
821)

at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)

at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)

at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeplo
yer.
java:307)

at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)

at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.jav
a:55
9)

at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)

at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:3
58)

at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
rt.java:166)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)

at
org.apache.catalina.core.StandardService.start(StandardService.java:497)

at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)

at org.apache.catalina.startup.Catalina.start(Catalina.java:512)

at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)

at 

RE: [OT] SCWCD Exam 1.4

2004-11-26 Thread Phillip Qin
So it looks more like Dummies for GMAT? I once saw a guy read that Dummies
book before he took the GMAT.

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 5:31 AM
To: Tomcat Users List
Subject: RE: [OT] SCWCD Exam 1.4


lol, thanks for that, i'll be waiting for january too in that case!

Allistair.

 -Original Message-
 From: Andoni [mailto:[EMAIL PROTECTED]
 Sent: 26 November 2004 10:30
 To: Tomcat Users List
 Subject: Re: [OT] SCWCD Exam 1.4
 
 
 Hi,
 
 After reading this mail last night I found a shop in Dublin
 which had the
 book in stock. I raced into town after work to get there 
 before the shop
 closed and got there 5 minutes before closing.
 
 I was so relieved and when I saw the book on the shelf I was
 well pleased.
 Only when I opened it to take a look did I realise the true 
 extent of what
 you meant by jokes, cartoons and fill in the blanks pages. 
 It looks more
 like a children's nursery rhyme book than a Java Certification book!
 
 I just put it back on the shelf and walked back out of the shop :-(
 
 Thanks, but no thanks, I'll be waiting until January.
 
 Andoni.
 
 - Original Message -
 From: Januski, Ken [EMAIL PROTECTED]
 Newsgroups: gmane.comp.jakarta.tomcat.user
 Sent: Wednesday, November 24, 2004 11:06 PM
 Subject: RE: [OT] SCWCD Exam 1.4
 
 
  I'm part way through the Head First book. I really didn't
 like Head First
  Java though it got rave reviews when it came out. And I did
 like the first
  version of the Manning SCWCD book.
 
  That said I'm finding the Head First Servlets and JSP book
 enjoyable,
 though
  I've only read the first 150 pages or so. The authors are from 
  www.javaranch.com and I'm sure you can get plenty of additional
 information
  there. Of course a lot of fans of the Head First books hang
 out there too.
 
  Whether you could actually use it for certification I'm not
 sure. I think
  that you probably could based on what I've read so far
 because it strives
 to
  get you to understand servlets, jsp and everything
 connected with them on
 a
  basic level. It does so with jokes, cartoons, fill in the
 blank pages,
 etc.
  I'm sure a lot of people will hate this manner of learning
 just as others
  can't stand the drier approach of the Manning book. My
 feeling is that if
  you are not someone who gets offended by jokey material
 that you can read
  this book and learn enough to pass the exam, esp. if you
 also read the
 specs
  as the book suggests. But take this with a grain of salt as
 I've not taken
  the 1.4 exam and I'm only 1/8 of the way through the book.
 
  If you like your books serious though, then steer very clear.
 
  Hope this helps,
 
  Ken
 
 
  -Original Message-
  From: Mike Curwen [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, November 24, 2004 12:57 PM
  To: 'Tomcat Users List'
  Subject: RE: [OT] SCWCD Exam 1.4
 
 
  I'd be completely remiss in not mentioning that Manning is
 putting out a
  second edition of it's SCWCD study guide.  The second
 edition has been
  updated for the new exam.
 
  Manning's ISBN is 1932394389 (that's the one scheduled for January)
 
  HeadFirst is 0596005407  (the one out now)
 
  both of them cover the new exam.
 
 
 
   -Original Message-
   From: Mike Curwen [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, November 24, 2004 11:49 AM
   To: 'Tomcat Users List'
   Subject: RE: [OT] SCWCD Exam 1.4
  
  
-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 9:25 AM
To: Tomcat Users List
Subject: RE: [OT] SCWCD Exam 1.4
   
   
The one you found Head First Servlets and JSP appears to me 
not to be a dedicated exam guide. I think the only reason it
  
   Not sure what copy you're looking at.  Mine has a black bar across 
   the top that say ... Study Guide
  
   The subtitle of the book is Passing the Sun Certified Web 
   Component Developer Exam
  
   and it mentions on the cover that it is Written by the 
   co-developers of the real SCWCD exam for J2EE 1.4.
  
  
  
  
  
   
 -
   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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: help on JDNI , DBCP with oracle

2004-11-26 Thread Phillip Qin
Wrong suggestion. It will cause NoClassDefFoundException since Tomcat has it
in common/lib.

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 6:21 AM
To: Tomcat Users List
Subject: RE: help on JDNI , DBCP with oracle


check for commons-collections.jar in your webapp's WEB-INF/lib folder. if
you don't have it download from jakarta.

 -Original Message-
 From: lydie soler [mailto:[EMAIL PROTECTED]
 Sent: 26 November 2004 11:02
 To: [EMAIL PROTECTED]
 Subject: help on JDNI , DBCP with oracle
 
 
 Hi,
 
 I am quite new at tomcat so I am asking for your help.
 
 I am trying to make tomcat deal with connection to my oracle database
 
 Here is what I do:
 
 1. I added the classes12.jar in the CATALINA_HOME\common\lib
 
 2. in the server.xml, I added the following code
 
 Context path=/BaseDeDonnees reloadable=true
 docBase=C:\Dev\eclipse\workspace\BaseDeDonnees 
 workDir=C:\Dev\eclipse\workspace\BaseDeDonnees\work 
   Logger className=org.apache.catalina.logger.SystemOutLogger 
 verbosity=4 timestamp=true/
   !-- Test pour faire gerer les connexions Oracle par Tomcat --
   Resource name=jdbc/BaseDeDonnees scope=Shareable 
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/BaseDeDonnees
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
   namedriverClassName/name
   valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
   nameurl/name
   valuejdbc:oracle:thin:@bia:1521:symp/value
   /parameter
   parameter
   nameusername/name
   valuesymprevius/value
   /parameter
   parameter
   namepassword/name
   valuesymp/value
   /parameter
 
   /ResourceParams
 /Context
 
 3. I created a web.xml file that looks like this:
 web-app
 
 display-nameBase de donnees/display-name
 description
   appli pour tester la gestion de connection par tomcat
 /description
   resource-ref
  descriptionOracle Datasource/description
  res-ref-namejdbc/BaseDeDonnees/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref
 /web-app
 
 4. I want to execute the following code:
 Context initContext = new InitialContext();
 Context envContext = (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource) envContext.lookup(jdbc/BaseDeDonnees);
 Connection conn = ds.getConnection();
 
 but I get this error:
 
 javax.servlet.ServletException: Invoker service() exception
   
 org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
 erServlet.java:524)
   
 org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
 let.java:216)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
 
 cause
 
 java.lang.NoClassDefFoundError:
 org/apache/commons/collections/CursorableLinkedList
   
 org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
 ool.java:392)
   
 org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
 ool.java:258)
   
 org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
 DataSource.java:765)
   
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
 aSource.java:518)
   
 fr.tomcat.IdentificationServlet.doPost(IdentificationServlet.java:45)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   
 org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
 erServlet.java:466)
   
 org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
 let.java:216)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
 this error occures when I try to get the connection before it
 seems to work 
 fine
 
 I anyone can help...
 
 Thanks a lot
 
 Lydie
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Tomcat not starting using startup.bat

2004-11-26 Thread Phillip Qin
For tomcat 5, you should try startup-using-launcher.bat


-Original Message-
From: Quinton Delpeche [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 10:29 AM
To: Tomcat Users List
Subject: Re: Tomcat not starting using startup.bat


On Friday 26 November 2004 17:17, Roman D wrote:
 Tomcat 5.0.28, Windows XP
 System global environment variables set:
 JAVA_HOME = c:/j2sdk1.4.2_04
 CATALINA_HOME = C:/Program Files/Apache Software Foundation/Tomcat 5.0

 Installed using jakarta-tomcat-5.0.28.exe default install options 
 (Installs to program files)

 it's not possible to start from command line using startup.bat; 
 c:\Program Files\Apache Software Foundation\Tomcat 5.0\binstartup.bat
 Using CATALINA_BASE:   C:/Program Files/Apache Software
 Foundation/Tomcat 5.0
 Using CATALINA_HOME:   C:/Program Files/Apache Software
 Foundation/Tomcat 5.0
 Using CATALINA_TMPDIR: C:/Program Files/Apache Software 
 Foundation/Tomcat 5.0\temp
 Using JAVA_HOME:   c:/j2sdk1.4.2_04
 Exception in thread main java.lang.NoClassDefFoundError: 
 Files/Apache

 Of course obvious step is to install tomcat in simple path like 
 c:\tomcat, but I need to have it working on any installation path. And 
 I need to use startup.bat, not service launcher.

Because of your Path and Operating System you will have to use the Directory

shortcut method.

I know that XP support spaces in path names from the command prompt but Java

doesn't realy.

Change Program Files to Progra~1
Change Apache Software to Apache~1

 Any suggestions?
 Thanks.

This should work. I had a similar problem in '97 when I first started 
developing in Java. :)

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

When I was crossing the border into Canada, they asked if I had any
firearms with me.  I said, `Well, what do you need?'
-- Steven Wright


RE: help on JDNI , DBCP with oracle

2004-11-26 Thread Phillip Qin
Do you mean commons-collection is no longer in 5.5.4 common/lib?

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 10:14 AM
To: Tomcat Users List
Subject: RE: help on JDNI , DBCP with oracle


not in Tomcat 5.5.4 it isn't. i have commons-collections in our web-inf/lib,
and we use jndi datasources without problem. 

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: 26 November 2004 15:05
 To: 'Tomcat Users List'
 Subject: RE: help on JDNI , DBCP with oracle
 
 
 Wrong suggestion. It will cause NoClassDefFoundException
 since Tomcat has it
 in common/lib.
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: November 26, 2004 6:21 AM
 To: Tomcat Users List
 Subject: RE: help on JDNI , DBCP with oracle
 
 
 check for commons-collections.jar in your webapp's
 WEB-INF/lib folder. if
 you don't have it download from jakarta.
 
  -Original Message-
  From: lydie soler [mailto:[EMAIL PROTECTED]
  Sent: 26 November 2004 11:02
  To: [EMAIL PROTECTED]
  Subject: help on JDNI , DBCP with oracle
  
  
  Hi,
  
  I am quite new at tomcat so I am asking for your help.
  
  I am trying to make tomcat deal with connection to my
 oracle database
  
  Here is what I do:
  
  1. I added the classes12.jar in the CATALINA_HOME\common\lib
  
  2. in the server.xml, I added the following code
  
  Context path=/BaseDeDonnees reloadable=true 
  docBase=C:\Dev\eclipse\workspace\BaseDeDonnees
  workDir=C:\Dev\eclipse\workspace\BaseDeDonnees\work 
  Logger className=org.apache.catalina.logger.SystemOutLogger
  verbosity=4 timestamp=true/
  !-- Test pour faire gerer les connexions Oracle par Tomcat --
  Resource name=jdbc/BaseDeDonnees scope=Shareable 
  type=javax.sql.DataSource/
  ResourceParams name=jdbc/BaseDeDonnees
  parameter
  namefactory/name
  
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
  nameurl/name
  valuejdbc:oracle:thin:@bia:1521:symp/value
  /parameter
  parameter
  nameusername/name
  valuesymprevius/value
  /parameter
  parameter
  namepassword/name
  valuesymp/value
  /parameter
  
  /ResourceParams
  /Context
  
  3. I created a web.xml file that looks like this:
  web-app
  
  display-nameBase de donnees/display-name
  description
  appli pour tester la gestion de connection par tomcat
  /description
  resource-ref
 descriptionOracle Datasource/description
 res-ref-namejdbc/BaseDeDonnees/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
  /resource-ref
  /web-app
  
  4. I want to execute the following code:
  Context initContext = new InitialContext();
  Context envContext = (Context)initContext.lookup(java:/comp/env);
  DataSource ds = (DataSource)
 envContext.lookup(jdbc/BaseDeDonnees);
  Connection conn = ds.getConnection();
  
  but I get this error:
  
  javax.servlet.ServletException: Invoker service() exception
  
  org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
  erServlet.java:524)
  
  org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
  let.java:216)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
  
  
  cause
  
  java.lang.NoClassDefFoundError: 
  org/apache/commons/collections/CursorableLinkedList
  
  org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
  ool.java:392)
  
  org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
  ool.java:258)
  
  org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
  DataSource.java:765)
  
  org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
  aSource.java:518)
  
  
 fr.tomcat.IdentificationServlet.doPost(IdentificationServlet.java:45)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
  
  org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
  erServlet.java:466)
  
  org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
  let.java:216)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
  
  this error occures when I try to get the connection before it seems 
  to work fine
  
  I anyone can help...
  
  Thanks a lot
  
  Lydie

RE: tomcat 5 directory layout Q.

2004-11-26 Thread Phillip Qin
TC4.1 and TC5.0 have almost the same directory structure, except in TC5.0,
${your.app}.xml is under ${catalina_home}/conf/${engine}/${host}. Oin order
to deploy your web app, put your war or expanded war into
${catalina_home}/webapps/${host}. If you use struts, drop off struts.jar to
WEB-INF/lib. If you use database stuff, drop off jdbc jar to common/lib.

-Original Message-
From: D. Stimits [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 5:03 PM
To: Tomcat Users List
Subject: Re: tomcat 5 directory layout Q.


D. Stimits wrote:
 I've been digging around on the tomcat web pages, and it appears that
 the version 4 docs are still in use under version 5 tomcat. I'm new to 
 tomcat 5 and have only used tomcat 4 to a small extent, never had to 
 administrate it before. I'm trying to make sense of the subdirectories 
 shared and common, it appears that they are almost the same thing 
 but initialized in different order. In particular, I'm interested in 
 learning batik and struts, and not really sure where to put the various 
 files since the directories used in the docs do not really correspond to 
 version 5. Can anyone direct me to a specific document on directory 
 layout for tomcat 5? Or at least suggest where to place/deploy struts 
 and batik under this newer layout to make the most general use of them?
 

Forgot to mention, I'm using 5.0.29 on Linux Fedora Core 2, with tarball 
installed in /usr/local/jakarta-tomcat-5.0.29/.

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


!DSPAM:41a7a7f492945663113039!


GlobalNamingResources

2004-11-25 Thread Phillip Qin
I setup a GlobalNamingResoruces entry in server.xml

Resource name=mail/whatever auth=Container scope=Shareable
type=javax.mail.Session/ 
ResourceParams name=mail/whatever
parameter
namemail.smtp.host/name
valuemail.whatever.com/value
/parameter
/ResourceParams

I then added resourcelink in my webapp's context.xml

ResourceLink name=mail/whatever global=java:comp/env/mail/whatever
type=javax.mail.Session/

First problem that I have is, if I do a context lookup, Tomcat complained
about not finding the binding, something like java:comp not bound. What I
did is

Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
= failed here
return (Session) context.lookup(mail/whatever);

The I realized I should use globalnamingcontext. So I changed the above code
to

StandardServer server = (StandardServer) ServerFactory.getServer();
= failed here
Context context = server.getGlobalNamingContext();
return (Session) context.lookup(mail/whatever);

Now, the error message is

java.lang.NoClassDefFoundError: org/apache/catalina/ServerFactory

com.shareowner.core.services.mailservice.MailService.findMailSession(MailSer
vice.java:36)

com.shareowner.core.services.mailservice.MailService.send(MailService.java:6
5)

com.shareowner.onlinestore.services.beanservices.AuthLogService.sendEmail(Au
thLogService.java:43)

com.shareowner.onlinestore.services.beanservices.TxnLogService.log(TxnLogSer
vice.java:33)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.wri
teAuthLog(CreditCardService.java:356)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.pos
t(CreditCardService.java:214)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.pos
tToServer(CreditCardService.java:276)

com.shareowner.onlinestore.actions.PlaceOrderAction.placeOrder(PlaceOrderAct
ion.java:81)

com.shareowner.onlinestore.actions.PlaceOrderAction.performPostValidationAct
ion(PlaceOrderAction.java:50)

com.shareowner.onlinestore.actions.BaseAppAction.execute(BaseAppAction.java:
122)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.shareowner.core.filters.HttpsFilter.doFilter(HttpsFilter.java:39)

ServerFactory is in ${catalina_home}/server/lib/catalina.jar, so there is no
reason why class loader can't find the class.

Any idea on how do I access the GlobalNamingResource from my webapp?

Approach 2 works with Tomcat Manager.


Regards,
 
 
PQ
 
Going to war for peace is like having sex for virginity


RE: GlobalNamingResources

2004-11-25 Thread Phillip Qin
I think I figured out what was wrong. The global should be mail/whatever. I
can still use context lookup. Problem solved.


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: November 25, 2004 12:46 PM
To: '[EMAIL PROTECTED]'
Subject: GlobalNamingResources


I setup a GlobalNamingResoruces entry in server.xml

Resource name=mail/whatever auth=Container scope=Shareable
type=javax.mail.Session/ 
ResourceParams name=mail/whatever
parameter
namemail.smtp.host/name
valuemail.whatever.com/value
/parameter
/ResourceParams

I then added resourcelink in my webapp's context.xml

ResourceLink name=mail/whatever global=java:comp/env/mail/whatever
type=javax.mail.Session/

First problem that I have is, if I do a context lookup, Tomcat complained
about not finding the binding, something like java:comp not bound. What I
did is

Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
= failed here
return (Session) context.lookup(mail/whatever);

The I realized I should use globalnamingcontext. So I changed the above code
to

StandardServer server = (StandardServer) ServerFactory.getServer();
= failed here
Context context = server.getGlobalNamingContext();
return (Session) context.lookup(mail/whatever);

Now, the error message is

java.lang.NoClassDefFoundError: org/apache/catalina/ServerFactory

com.shareowner.core.services.mailservice.MailService.findMailSession(MailSer
vice.java:36)

com.shareowner.core.services.mailservice.MailService.send(MailService.java:6
5)

com.shareowner.onlinestore.services.beanservices.AuthLogService.sendEmail(Au
thLogService.java:43)

com.shareowner.onlinestore.services.beanservices.TxnLogService.log(TxnLogSer
vice.java:33)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.wri
teAuthLog(CreditCardService.java:356)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.pos
t(CreditCardService.java:214)

com.shareowner.onlinestore.services.creditcardservices.CreditCardService.pos
tToServer(CreditCardService.java:276)

com.shareowner.onlinestore.actions.PlaceOrderAction.placeOrder(PlaceOrderAct
ion.java:81)

com.shareowner.onlinestore.actions.PlaceOrderAction.performPostValidationAct
ion(PlaceOrderAction.java:50)

com.shareowner.onlinestore.actions.BaseAppAction.execute(BaseAppAction.java:
122)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.shareowner.core.filters.HttpsFilter.doFilter(HttpsFilter.java:39)

ServerFactory is in ${catalina_home}/server/lib/catalina.jar, so there is no
reason why class loader can't find the class.

Any idea on how do I access the GlobalNamingResource from my webapp?

Approach 2 works with Tomcat Manager.


Regards,
 
 
PQ
 
Going to war for peace is like having sex for virginity


!DSPAM:41a61a69240991588114867!


RE: web.xml / struts-config.xml

2004-11-25 Thread Phillip Qin
By using context.getResourceAsStream you can always read any file in your
app directory.

-Original Message-
From: Brij Naald [mailto:[EMAIL PROTECTED] 
Sent: November 25, 2004 4:02 PM
To: [EMAIL PROTECTED]
Subject: web.xml / struts-config.xml


Hi
is it possible for a filter,a servlet or just another class on the server to

get to the web.xml file?

Thanks!

_
Kies nu de Site Van Het Jaar en win prachtige prijzen! 
http://www.sitevanhetjaar.be/


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


!DSPAM:41a64895262962000715395!


RE: How to disable directory listing

2004-11-24 Thread Phillip Qin
Do it in your app's web.xml

-Original Message-
From: Lee Chin Khiong [mailto:[EMAIL PROTECTED] 
Sent: November 24, 2004 1:29 AM
To: 'Tomcat Users List'
Subject: RE: How to disable directory listing



Is there any better way to configure Tomcat 5 to no Directory listing just
like IIS ?

-Original Message-
From: Quinton Delpeche [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 2:19 PM
To: [EMAIL PROTECTED]
Subject: Re: How to disable directory listing


On Wednesday 24 November 2004 08:09, Lee Chin Khiong wrote:
 How to disable directory listing under Tomcat 5 ?

I use a blank index.html file and put it in all the directories that I don't

want to have listed. :)

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

All snakes who wish to remain in Ireland will please raise their right
hands.
-- Saint Patrick


!DSPAM:41a42e6218041888736547!


RE: Tomcat 5 and Mail...

2004-11-23 Thread Phillip Qin
In 4.1.30, I set these policies

grant codeBase file:${catalina.home}/webapps/- {
  // email
  permission java.io.FilePermission
${catalina.home}/common/lib/activation.jar,read;
  permission java.io.FilePermission
${catalina.home}/common/lib/mail.jar,read;
  permission java.io.FilePermission ${java.home}/jre/lib/maicap,read;
  permission java.io.FilePermission
${java.home}/jre/lib/javamail.address.map,read;
  permission java.io.FilePermission
${java.home}/jre/lib/javamail.providers,read;
  permission java.net.SocketPermission
mail.yourdomain.com:25,connect,resolve;
};

-Original Message-
From: Quinton Delpeche [mailto:[EMAIL PROTECTED] 
Sent: November 23, 2004 8:16 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 5 and Mail...


On Tuesday 23 November 2004 15:10, Shapira, Yoav wrote:
 Hi,

Hi,

 Let's try again: which specific Tomcat 5 version, e.g. 5.0.28? ;)

Sorry.

5.0.27-9

 The reason I ask is that I broke the MailSession factory in 5.0.25, so 
 if you're using that build AND a JNDI MailSession factory, that would 
 explain your problem.

Ahhh. :)

 Yoav
Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

It's more than magnificent -- it's mediocre.
-- Sam Goldwyn


RE: problem with simultaneous query submissions

2004-11-23 Thread Phillip Qin
Your problem shouldn't occur unless you use instance variables in your
servlet. A quick fix would be put

synchronized (session) {

}

Block outside your code.

-Original Message-
From: Satish Plakote [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 10:10 PM
To: Tomcat Users List
Subject: RE: problem with simultaneous query submissions


here is my dopost method


 // Code starts here

   public void doPost(HttpServletRequest req,HttpServletResponse res)
throws IOException, ServletException
{
System.out.println(Inside doPost);

String  strQueryFlag =req.getParameter(new);

if(Integer.parseInt(strQueryFlag.toString())==NEW_QUERY)
{
   System.out.println(New Search ...+strQueryString);
   Query query = null;
   session.removeAttribute(BookObjects);
   ArrayList arLstBookDetails = new ArrayList(1);

   try {
 // Code to get data from Database or file
 } catch (Exception e) {
e.printStackTrace();
  }
   try{
   searchlog.println(--Creating  objects--+
+session.getId()+ +queryString);
   StringBuffer strDesc  = null;
   StringBuffer strBookID= null;
   StringBuffer strItemName  = null;
   StringBuffer strItemCode  = null;
   StringBuffer strPrice = null;
   StringBuffer strPageID= null;
   StringBuffer strBookName  = null;
   StringBuffer strUrl   = null;
   StringBuffer strImage = null;
   for (// access data one by one from structure )
 {
try{
 // for each element
strDesc  = // get the data and store it
strBookID= // get the data and store it
strItemName  = // get the data and store it
strItemCode  = // get the data and store it
strPrice = // get the data and store it
strPageID= // get the data and store it
strBookName  = // get the data and store it
strUrl   = // get the data and store it
strImage = // get the data and store it
strPageID= // get the data and store it

 
if(hBookFromLucene.containsKey(strBookID.toString()))
{
BookDetails
BKDetails=(BookDetails)hBookFromLucene.get(strBookID.toString());
 
BKDetails.addPageDetails(strPageID,strPrice,strItemName,strDesc,strItemCode,
strImage,strUrl);
}
else
{
BookDetails BKDetails= new
BookDetails(strBookName,strBookID);
 
BKDetails.addPageDetails(strPageID,strPrice,strItemName,strDesc,strItemCode,
strImage,strUrl);
 
hBookFromLucene.put(strBookID.toString(),BKDetails);
   // adding objects to arraylist
   arLstBookDetails.add(BKDetails);
 }
  // one  more structure to store all objects

m_objallBookDetails.addBook(strBookName,strBookID,strPageID,strPrice,strItem
Name,strDesc,strItemCode,strImage,strUrl);
}catch(Exception e)
{
System.out.print(SearchDataBean:
createBookObjects 1 +e.getMessage());
e.printStackTrace();
}
} // end of for
strBookName  =  strBookID  =  strPageID = strPrice =
strItemName = strDesc = strImage = strUrl = null;
}

searchlog.println(Putting data for session
+session.getId()+ +arLstBookDetails.size());

// These twostructures together can store 10
data individually in session.
session.setAttribute(BookObjects,arLstBookDetails);
session.setAttribute(AllBookObj,m_objallBookDetails);
searchlog.println( --- Completed---
+arLstBookDetails.size());

}catch(Exception e)
{
System.out.println(SeachDataBean:getResultData: );
e.printStackTrace();
}
}

 // Code ends here

The reason i am storing the data is session is the the user is given a lot
of filtering options and i don't want to go back to my data source retrieve
data and show.. all the filtering has to be done from objects in memory so
thatit takes the minimum possible time.

is the huge amount of  data that i am storing that causes the problem ???

rgds
satish

-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 23, 2004 7:36 AM
To: Tomcat Users List
Subject: Re: problem with simultaneous query submissions



Please post a *new* message when 

RE: Logging and Deployment best practices

2004-11-23 Thread Phillip Qin
Hi, I don't think the log will go to system32 directory. Try something like
this

log4j.rootLogger=INFO, fatalconsole, file
  |
    
 |  
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=${catalina.home}/logs/lciponline_debug.txt
log4j.appender.file.DatePattern='.'-MM-dd
log4j.appender.file.Threshold=DEBUG


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: November 23, 2004 10:14 AM
To: Tomcat Users List
Subject: RE: Logging and Deployment best practices



Hi,

a) Convert my log4j.properties file to use a RollingFileAppender.  I

This is good.

AppDirectory inside Parameters using the Registry Editor), I couldn't 
figure out how to change the home directory for Tomcat running as a

Relying on the home directory is bad.

logging; I'd rather use a relative path (something like ./logs) and 
have the logs all end up in %TOMCAT_HOME%/logs.

Log4j configuration files can have environment variables in them, e.g.
${CATALINA_HOME}/logs/mylog.txt.  Alternatively, you could use programmatic
configuration instead of log4j.properties.

b) Leave my log4j.properties file using ConsoleAppender and use a 
Logger element in my Context to have Tomcat put the output into a

This is also bad.  Loggers are gone in Tomcat 5.5.  I realize it might also
take 2 years for you to go from 5.0 to 5.5, just like it did from 4.1 to
5.0, but still it doesn't make sense to design something relying on Logger
at this point.

+ Put all of the responsibility into the webapp using log4j?  If so -

Yes.  This maximizes portability, container-independence, and control for
you.

how can I configure the home directory of Tomcat when I install the

You can, but shouldn't anyways.  Forget about any design based upon a home
directory or current working directory location.

Service?  Or should I hardwire some other location for the logs?

You can, but don't have to.  If you have a logging directory for everything
running on the production server, you can hard-wire that.

Yoav Shapira http://www.yoavshapira.com




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


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


!DSPAM:41a35416244686896713316!


RE: jstl.jar and standard.jar causes Digester, taglib error on st artup

2004-11-23 Thread Phillip Qin
Where did you use digester and jstl? I mix jstl and struts tags on my pages
and they worked fine.

-Original Message-
From: Morten Andersen [mailto:[EMAIL PROTECTED] 
Sent: November 23, 2004 10:38 AM
To: [EMAIL PROTECTED]
Subject: jstl.jar and standard.jar causes Digester, taglib error on startup


Well Ive seen this error many times:
-- org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 6 
column 19: Document root element taglib , must match DOCTYPE root null .
org.xml.sax.SAXParseException: Document root element taglib , must match 
DOCTYPE root null .
--
So, I tryed finding the error looking through the tld files, googling a bit 
and so on, until I tryed removing the jstl.jar and standard.jar from my 
web-applications. Suddenly no error was reported.

What caused the error?

I can't use jstl on tomcat. This could be due to the same problem...?

Tomcat version: 4.1.24
jstl version: 1.0 / 1.1

Regards


Morten Andersen
Master of applied mathematics and computer science
Associate professor

The Maersk Institute of Production technology at Southern Danish University 
www.mip.sdu.dk
Campusvej 55
DK-5230 Odense M
Denmark
+45 65 50 36 54
+45 61 71 11 03
Jabber id: [EMAIL PROTECTED]


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


!DSPAM:41a3603d250343371989192!


RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Phillip Qin
Remove -wT from your script.

-Original Message-
From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 3:51 PM
To: Tomcat Users List
Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


Hello Mark,

Servlet mapping:
-
!-- The mapping for the CGI Gateway servlet --
servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
-
The URL: http://zee:8080/cgi-bin/index.pl

Script index.pl:
-
#!/bin/perl

print Content type: text/html\n\n;
print Hello World\n;
-

Thank you!

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: Sunday, November 21, 2004 9:11 AM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 I'll look into this but I need a bit more info:

 1. What servlet mapping did you specify in web.xml?
 2. What URL are you requesting?

 Mark

  -Original Message-
  From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
  Sent: Saturday, November 20, 2004 12:00 AM
  To: [EMAIL PROTECTED]
  Subject: CGI Again...Servlet.service() for servlet cgi threw 
  exception
 
  Sorry guys, I gave up digging into it and haven't seen such problems 
  in archives...
 
  Tomcat 4.1.31 on Solaris.
 
  I enabled cgi scripting:
  changes in web.xml:
  --
  servlet
  servlet-namecgi/servlet-name
 
  servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-value/WEB-INF/cgi-bin//param-value
  /init-param
  load-on-startup5/load-on-startup
  /servlet
  --
  renamed servlets-cgi.jar
 
  The script is 
  /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
  (Everything is OK, Right?)
  
  when I try to access it I got the error:
  2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi, 
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
  2004-11-19 15:53:15 cgi: findCGI: 
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI: 
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at 
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
  2004-11-19 15:53:15 StandardWrapperValve[cgi]:
  Servlet.service() for servlet
  cgi threw exception
  java.lang.StringIndexOutOfBoundsException: String index out of 
  range: -2
  at java.lang.String.substring(String.java:1444)
  at java.lang.String.substring(String.java:1411)
  at 
  org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
  (CGIServlet.ja
  va:935)
  
  Why the servlet makes exception What else I need to check?
 
  Thank you!
 
  /Sergeyk
 
  (Lab Documentation -
  \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
  Phone: 604 918-6360
  Cell:  604 351-8966
 
 
  
  -
  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]


!DSPAM:41a25140121671906480252!


RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Phillip Qin
CGIServlet does not support -wT in your perl script. Those switches are for
debugging in perl. They are after your perl command, so, for example, if you
test.pl contains

 #!/bin/perl -wT

Then remove the -wT.

Other things to check:

- in your conf/web.xml, no need to put leading /

  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi-bin//param-value


Other than that, I can't think of any reason why you are unable to execute
scripts using CGIServlet.



-Original Message-
From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 4:40 PM
To: Tomcat Users List
Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


Phillip,

Where do I have -wT???

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 22, 2004 1:11 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 Remove -wT from your script.

 -Original Message-
 From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
 Sent: November 22, 2004 3:51 PM
 To: Tomcat Users List
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 Hello Mark,

 Servlet mapping:
 -
 !-- The mapping for the CGI Gateway servlet --
 servlet-mapping
 servlet-namecgi/servlet-name
 url-pattern/cgi-bin/*/url-pattern
 /servlet-mapping
 -
 The URL: http://zee:8080/cgi-bin/index.pl

 Script index.pl:
 -
 #!/bin/perl

 print Content type: text/html\n\n;
 print Hello World\n;
 -

 Thank you!

 /Sergeyk

 (Lab Documentation -
 \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
 Phone: 604 918-6360
 Cell:  604 351-8966

  -Original Message-
  From: Mark Thomas [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 21, 2004 9:11 AM
  To: 'Tomcat Users List'
  Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
  exception
 
 
  I'll look into this but I need a bit more info:
 
  1. What servlet mapping did you specify in web.xml?
  2. What URL are you requesting?
 
  Mark
 
   -Original Message-
   From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
   Sent: Saturday, November 20, 2004 12:00 AM
   To: [EMAIL PROTECTED]
   Subject: CGI Again...Servlet.service() for servlet cgi threw 
   exception
  
   Sorry guys, I gave up digging into it and haven't seen such 
   problems in archives...
  
   Tomcat 4.1.31 on Solaris.
  
   I enabled cgi scripting:
 changes in web.xml:
   --
   servlet
   servlet-namecgi/servlet-name
  
   servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
   init-param
 param-namedebug/param-name
 param-value6/param-value
   /init-param
   init-param
 param-namecgiPathPrefix/param-name
 param-value/WEB-INF/cgi-bin//param-value
   /init-param
   load-on-startup5/load-on-startup
   /servlet
   --
 renamed servlets-cgi.jar
  
   The script is 
   /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
   (Everything is OK, Right?)
   
   when I try to access it I got the error:
   2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi, 
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
   2004-11-19 15:53:15 cgi: findCGI: 
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI: 
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at 
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
   2004-11-19 15:53:15 StandardWrapperValve[cgi]:
   Servlet.service() for servlet
   cgi threw exception
   java.lang.StringIndexOutOfBoundsException: String index out of
   range: -2
   at java.lang.String.substring(String.java:1444)
   at java.lang.String.substring(String.java:1411)
   at 
   org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
   (CGIServlet.ja
   va:935)
   
   Why the servlet makes exception What else I need to check?
  
   Thank you!
  
   /Sergeyk
  
   (Lab Documentation -
   \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
   Phone: 604 918-6360
   Cell:  604 351-8966
  
  
   --
   --
   -
   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

RE: help with out of memory error

2004-11-22 Thread Phillip Qin
Have you looked at this page?

http://jakarta.apache.org/tomcat/faq/memory.html



-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 4:50 PM
To: Tomcat User
Subject: help with out of memory error


Is this just a really ambiguous error message, or are there some specific
places I can be hunting for an issue:

Nov 22, 2004 3:53:42 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception executing
[EMAIL PROTECTED], terminating thread
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(ThreadPool.
java:582)
at
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
at
org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:534)



Less than half of the 3GB of RAM on our Win2000 box was in use, and only
about 300MB was in use by Tomcat, and the site was just giving us a The
page cannot be displayed error when we would try to log into it, and yet,
the database was being updated by the web application (apparently, one or
more users had had a long operation started).  In other words, it seemed
like Tomcat/the web app was partially running, but not letting anyone else
in, or something like that.  

How do we troubleshoot this?  We allocate about 1.5GB to the JVM (for
initial and max heap size).   

Thanks,
Stephen

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


!DSPAM:41a25ef9128851503898241!


RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R eader Plug-in

2004-11-18 Thread Phillip Qin
If you can visit our site at
https://www.investments.shareowner.com/lciponline and view the sample pdf
statement, then there is something definitely wrong with your own code - do
not pointing to Tomcat.



-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED] 
Sent: November 18, 2004 12:50 PM
To: Tomcat Users List
Subject: Re: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


Here's some more input from our team, regarding the problem

We've confirmed its defintely the charset=ISO-8859-1 appended to the 
Content-Type header that is causing the problem in IE.  [I'm not saying 
IE shouldn't work with this, but we don't have a choice but to support 
it.]  We wrote a stand-alone servlet that works fine downloading a 
pdf if we leave off the charset.  When we add the charset to the header, 
it breaks.  It looks like when Tomcat is compiling our JSP code, its 
adding the charset into the response based on what we see in the 
intermediate Java code the Jasper compiler is producing.

--- Does anyone know how to override this on Tomcat 4.0.6 specifically?

FYI:  We read that this was a known issue in another forum, and some 
version of Tomcat 4.1 might be changed to leave this off.  However, we 
experimented with Tomcat 4.0.6/JDK 1.3.1, Tomcat 4.1.31/JDK 1.4.2, and 
Tomcat 5.5.4/JDK 1.5.0, and all these combinations add the charset to 
the response.


Meantime we are checking on the mis-spelled attachment for 
Content-Disposition part of the header dump we sent earlier.




David Wall wrote:

Have you tried using links like the following:

http://yourhost.com/webappcontext/download.jsp/Germany.pdf

The idea is that tomcat will find the JSP download.jsp and execute it, 
and since the link ends with the file name, some browsers will better 
detect the pdf reader launch.

If you need some params passed in, your link would look like:

http://yourhost.com/webappcontext/download.jsp/Germany.pdf?abc=xyzxyz=
abc

I don't know if your headers have a typo in your email or in 
production, but you have an invalid Content-Disposition header 
(misspelled attachment as
attachement) which would be a problem, too.

David

- Original Message -
From: Aman Raheja [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 8:47 AM
Subject: Re: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


  

Some more info to respond to the earlier responses

1) We're seeing more evidence this is a problem with Reader 6.0.1 (or 
the 6.0.2 patch).  We have a PC with Reader 6.0.0 that works Ok, as 
well as a PC with 5.0.  Our company has done a mass upgrade to Reader 
6.0.1 and IE 6.0.2, so these PCs are not the norm.
2) No SSL is being used at this point (but it will eventually).
3) No compression (that I know of -- unless Tomcat is doing it for 
us).
4) Our JSP is supposed to be a generic file downloader, handling Word,
Excel, PDF, etc.   Hence the URL ends in .jsp vs. the real file
extension.
5) Here's a typical response we're getting in IE:

HTTP/1.0 200 OK
Date: Wed, 17 Nov 2004 20:33:26 GMT
Server: Apache Tomcat/4.0.6 (HTTP/1.1 Connector)
Content-Type: application/pdf;charset=ISO-8859-1
Content-Length: 156483
Content-disposition: attachement; filename=Germany.pdf
expires: Thu, 01 Jan 1970 00:00:00 GMT
Connection: close


Thanks,
Aman Raheja



Phillip Qin wrote:



Where do you generate the pdf? In servlet? The link has to be end 
with
  

.pdf
  

(but before any query string) in order for acrobat reader active-x to
  

kick
  

in.

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED]
Sent: November 16, 2004 9:27 AM
To: Tomcat Users List
Subject: Re: Problem displaying PDF in IE6 from Tomcat using the 
ActiveX
  

R
  

eader Plug-in


We did set the Security level to low on IE.
More suggestions?
Thanks
Aman Raheja

Phillip Qin wrote:



  

There are security and privacy settings in IE affect PDF generation. 
BTW, ensurethe link before query string ends with .pdf

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED]
Sent: November 15, 2004 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem displaying PDF in IE6 from Tomcat using the ActiveX


Reader
  

Plug-in


Problem:

When we try to display a dynamically generated PDF file, IE launches 
the Adobe Acrobat Reader Plugin, but then just a blank page is 
displayed and the IE status says Done.  No error message is 
displayed.  No error is generated in the System Event logs.

The issue seems to be that every request to request to Tomcat for 
the PDF send back the request with charset=ISO-8859-1 in the 
Content-type Header. We want to figure out a way to verify that 
this is the issue. One way might be to somehow get Tomcat to not 
append the Character Set in the header. Is there a way to do this?

Environment:

- Client: Windows XP or Windows 2000
- Server: Tomcat 4.0.6/JDK 1.3.1 running on Solaris and Windows XP

RE: Errors in mod_jk2 log

2004-11-18 Thread Phillip Qin
There are tons of these messages appeared in my log. I've asked this
question before, no one seems bother answering it. Shall we post it to
connector's dev list?

-Original Message-
From: Lars George [mailto:[EMAIL PROTECTED] 
Sent: November 17, 2004 7:31 PM
To: Tomcat Users List
Subject: Errors in mod_jk2 log


Hi,

We get these errors in the Apache logs coming from mod_jk2:

[Wed Nov 17 13:37:32 2004] [error] ajp13.service() ajpGetReply 
recoverable error 3
[Wed Nov 17 13:37:32 2004] [error] ajp13.service() Error  forwarding
ajp13:b19socket 1 0 [Wed Nov 17 13:37:32 2004] [error] mod_jk2.handler()
Error connecting to tomcat 3, status 200


I read the jk_worker_ajp13.c code to see what that means, but cannot 
really make out how to determine the actual reason.

Could someone suggest how to investigate that further? Would the extra 
debug help? And where would I switch it on best? I mean on the channel 
or socket element?

Thanks,
Lars


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


!DSPAM:419bed4791457924012082!


RE: tomcat/apace

2004-11-17 Thread Phillip Qin
Not true in tc5.

-Original Message-
From: Steven Lister [mailto:[EMAIL PROTECTED] 
Sent: November 17, 2004 9:33 AM
To: Tomcat Users List
Subject: tomcat/apace


Just a quick question.  Does apache2 need to be
restarted if connected using mod_jk2 to tomcat5?
I know that I was told that under 4.1 tomcat mod_jk and
tomcat 4 you had to do it in x order, is that still true.
-- 
___
Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm


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


!DSPAM:419b612d314961930315303!


RE: tomcat/apace

2004-11-17 Thread Phillip Qin
Ypav, correct me if I were wrong - order doesn't matter.

-Original Message-
From: Steven Lister [mailto:[EMAIL PROTECTED] 
Sent: November 17, 2004 9:43 AM
To: Tomcat Users List
Subject: RE: tomcat/apace


So just as long as apache is started tomcat should find it

- Original Message - 
From: Phillip Qin 
To: 'Tomcat Users List' 
Subject: RE: tomcat/apace 
Date: Wed, 17 Nov 2004 09:37:28 -0500 

 
 Not true in tc5.
 
 -Original Message-
 From: Steven Lister [mailto:[EMAIL PROTECTED] 
 Sent: November 17, 2004 9:33 AM 
 To: Tomcat Users List 
 Subject: tomcat/apace 
 
 
 Just a quick question. Does apache2 need to be
 restarted if connected using mod_jk2 to tomcat5? 
 I know that I was told that under 4.1 tomcat mod_jk and 
 tomcat 4 you had to do it in x order, is that still true. 
 -- 
 ___ 
 Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 
 
 
  
 
-- 
___
Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm


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


!DSPAM:419b63b8315661278313514!


RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R eader Plug-in

2004-11-16 Thread Phillip Qin
Where do you generate the pdf? In servlet? The link has to be end with .pdf
(but before any query string) in order for acrobat reader active-x to kick
in.

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED] 
Sent: November 16, 2004 9:27 AM
To: Tomcat Users List
Subject: Re: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


We did set the Security level to low on IE.
More suggestions?
Thanks
Aman Raheja

Phillip Qin wrote:

There are security and privacy settings in IE affect PDF generation. 
BTW, ensurethe link before query string ends with .pdf

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED]
Sent: November 15, 2004 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem displaying PDF in IE6 from Tomcat using the ActiveX Reader
Plug-in


Problem:

When we try to display a dynamically generated PDF file, IE launches 
the
Adobe Acrobat Reader Plugin, but then just a blank page is displayed and 
the IE status says Done.  No error message is displayed.  No error is 
generated in the System Event logs.

The issue seems to be that every request to request to Tomcat for the
PDF send back the request with charset=ISO-8859-1 in the 
Content-type Header. We want to figure out a way to verify that this 
is the issue. One way might be to somehow get Tomcat to not append the 
Character Set in the header. Is there a way to do this?

Environment:

- Client: Windows XP or Windows 2000
- Server: Tomcat 4.0.6/JDK 1.3.1 running on Solaris and Windows XP
(problem exists on both)
- Adobe Reader 6.0.1 (occurs with 6.0.2 patch as well)
- IE 6.0.2800


Additional Information:

1) Our URLs are formed like this:

http://app.ourserver.com/appname/docViewAGN.jsp?RepoType=CID=18698Doc
Name=
Germanyentry=DocType=pdfcategory=Research

2) Our app is issuing GETs, not POSTs.

3) This is happening on multiple PCs.  One thing we noticed is this may
be somewhat Reader version dependent -- we have a few machines left with 
Reader 5 installed, and they do not seem to have the problem.

4) When the problem occurs, if you then launch Reader manually, the
document that didn't display in the IE window is automatically displayed 
in the full client Reader app.!!!

5) If we set Reader to not open up PDFs in browser windows, the Reader 
window launches and opens the PDF file just fine.   [This is a client 
solution, and not practical to implement across hundreds of PCs
unfortunately.]

6) We actually have one PC with Windows XP, Reader 6.0.1, and IE 6.0.2
that works.  Could this problem be caused by some specific Windows or IE 
patch?

7) We've scoured the forums and tried several things including setting
all security levels to Low in IE, adding a dummy parm at the end of the 
URL to fool IE into launching the PDF correctly (e.g. dummy=file.pdf), 
and various header settings to force caching on to 30 seconds, etc.  
None of this had any effect.

8) Also, we saw some references to problems caused by Tomcat 4.0.6
adding charset=ISO-8859-1 to the Content-Type header in the response.  
How can we override this to see if that's the problem?

Thanks
Aman Raheja


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


!DSPAM:419a0e4b161771045017228!


RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R eader Plug-in

2004-11-16 Thread Phillip Qin
Mozilla does not have the extension issue. IE does. I use struts too.

-Original Message-
From: Graff, David [mailto:[EMAIL PROTECTED] 
Sent: November 16, 2004 9:42 AM
To: 'Tomcat Users List'
Subject: RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


I've developed a couple of applications that spit back PDF files from within
Struts.

One thing I did have to do was make sure the generated PDF's response
content type was application/pdf

I don't think I've had to do anything with filename extensions.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 9:33 AM
To: 'Tomcat Users List'
Subject: RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


Where do you generate the pdf? In servlet? The link has to be end with .pdf
(but before any query string) in order for acrobat reader active-x to kick
in.

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED] 
Sent: November 16, 2004 9:27 AM
To: Tomcat Users List
Subject: Re: Problem displaying PDF in IE6 from Tomcat using the ActiveX R
eader Plug-in


We did set the Security level to low on IE.
More suggestions?
Thanks
Aman Raheja

Phillip Qin wrote:

There are security and privacy settings in IE affect PDF generation.
BTW, ensurethe link before query string ends with .pdf

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED]
Sent: November 15, 2004 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem displaying PDF in IE6 from Tomcat using the ActiveX 
Reader Plug-in


Problem:

When we try to display a dynamically generated PDF file, IE launches
the
Adobe Acrobat Reader Plugin, but then just a blank page is displayed and 
the IE status says Done.  No error message is displayed.  No error is 
generated in the System Event logs.

The issue seems to be that every request to request to Tomcat for the 
PDF send back the request with charset=ISO-8859-1 in the 
Content-type Header. We want to figure out a way to verify that this 
is the issue. One way might be to somehow get Tomcat to not append the 
Character Set in the header. Is there a way to do this?

Environment:

- Client: Windows XP or Windows 2000
- Server: Tomcat 4.0.6/JDK 1.3.1 running on Solaris and Windows XP 
(problem exists on both)
- Adobe Reader 6.0.1 (occurs with 6.0.2 patch as well)
- IE 6.0.2800


Additional Information:

1) Our URLs are formed like this:

http://app.ourserver.com/appname/docViewAGN.jsp?RepoType=CID=18698Doc
Name=
Germanyentry=DocType=pdfcategory=Research

2) Our app is issuing GETs, not POSTs.

3) This is happening on multiple PCs.  One thing we noticed is this may 
be somewhat Reader version dependent -- we have a few machines left 
with Reader 5 installed, and they do not seem to have the problem.

4) When the problem occurs, if you then launch Reader manually, the 
document that didn't display in the IE window is automatically 
displayed in the full client Reader app.!!!

5) If we set Reader to not open up PDFs in browser windows, the Reader 
window launches and opens the PDF file just fine.   [This is a client 
solution, and not practical to implement across hundreds of PCs 
unfortunately.]

6) We actually have one PC with Windows XP, Reader 6.0.1, and IE 6.0.2 
that works.  Could this problem be caused by some specific Windows or 
IE patch?

7) We've scoured the forums and tried several things including setting 
all security levels to Low in IE, adding a dummy parm at the end of the 
URL to fool IE into launching the PDF correctly (e.g. dummy=file.pdf), 
and various header settings to force caching on to 30 seconds, etc.
None of this had any effect.

8) Also, we saw some references to problems caused by Tomcat 4.0.6 
adding charset=ISO-8859-1 to the Content-Type header in the response.
How can we override this to see if that's the problem?

Thanks
Aman Raheja


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





!DSPAM:419a11f7162861134571087!


RE: JDBC transactions using MySQL / DBCP in Tomcat 5.0.28

2004-11-16 Thread Phillip Qin
Shouldn't jdbc 3.0 do the trick?

-Original Message-
From: David Boyer [mailto:[EMAIL PROTECTED] 
Sent: November 16, 2004 3:35 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: JDBC transactions using MySQL / DBCP in Tomcat 5.0.28


Prior to your first insert, do you need to execute an SQL Start
transaction? Otherwise, it sounds like autocommit will revert to the
default start of true.
 
http://dev.mysql.com/doc/mysql/en/COMMIT.html

 [EMAIL PROTECTED] 11/16/2004 12:14:13 PM 

Hi all!

In my webapp I do two db inserts into two different tables. If the 
second one fails I want to rollback the first one. My code is something

like the following:

Connection con = gotten from jndi DataSource
DBBean db = new DBBean(con);
try {
con.setAutoCommit(false);

Object o = db.getSomething();
Object o2 = db.getSomethingElse();

db.doInsert1(params);
db.doInsert2(params);

con.commit();
} catch (SQLException sqle) {
con.rollback();
throw sqle;
} finally {
if (con != null) {
con.close();
}
}

I thought that this should do the trick, but if the second insert fails

the data inserted in the first insert are still there. I am using MySQL

4.0.21-7 with InnoDB and have tested that I can use transactions with 
the MySQL client.

Anyone got any tips?


Regards

Trond

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




!DSPAM:419a64b9202861523128358!


RE: Problem displaying PDF in IE6 from Tomcat using the ActiveX R eader Plug-in

2004-11-15 Thread Phillip Qin
There are security and privacy settings in IE affect PDF generation. BTW,
ensurethe link before query string ends with .pdf

-Original Message-
From: Aman Raheja [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem displaying PDF in IE6 from Tomcat using the ActiveX Reader
Plug-in


Problem: 

When we try to display a dynamically generated PDF file, IE launches the 
Adobe Acrobat Reader Plugin, but then just a blank page is displayed and 
the IE status says Done.  No error message is displayed.  No error is 
generated in the System Event logs.

The issue seems to be that every request to request to Tomcat for the 
PDF send back the request with charset=ISO-8859-1 in the 
Content-type Header. We want to figure out a way to verify that this 
is the issue. One way might be to somehow get Tomcat to not append the 
Character Set in the header. Is there a way to do this?

Environment:

- Client: Windows XP or Windows 2000
- Server: Tomcat 4.0.6/JDK 1.3.1 running on Solaris and Windows XP 
(problem exists on both)
- Adobe Reader 6.0.1 (occurs with 6.0.2 patch as well)
- IE 6.0.2800


Additional Information:

1) Our URLs are formed like this: 

http://app.ourserver.com/appname/docViewAGN.jsp?RepoType=CID=18698DocName=
Germanyentry=DocType=pdfcategory=Research

2) Our app is issuing GETs, not POSTs.

3) This is happening on multiple PCs.  One thing we noticed is this may 
be somewhat Reader version dependent -- we have a few machines left with 
Reader 5 installed, and they do not seem to have the problem.

4) When the problem occurs, if you then launch Reader manually, the 
document that didn't display in the IE window is automatically displayed 
in the full client Reader app.!!!

5) If we set Reader to not open up PDFs in browser windows, the Reader 
window launches and opens the PDF file just fine.   [This is a client 
solution, and not practical to implement across hundreds of PCs 
unfortunately.]

6) We actually have one PC with Windows XP, Reader 6.0.1, and IE 6.0.2 
that works.  Could this problem be caused by some specific Windows or IE 
patch?

7) We've scoured the forums and tried several things including setting 
all security levels to Low in IE, adding a dummy parm at the end of the 
URL to fool IE into launching the PDF correctly (e.g. dummy=file.pdf), 
and various header settings to force caching on to 30 seconds, etc.  
None of this had any effect.

8) Also, we saw some references to problems caused by Tomcat 4.0.6 
adding charset=ISO-8859-1 to the Content-Type header in the response.  
How can we override this to see if that's the problem?

Thanks
Aman Raheja


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


!DSPAM:4198f83938781679484274!


RE: Location: redirection

2004-11-15 Thread Phillip Qin
Please refer to my previous post regarding hack into the CGIServlet.

-Original Message-
From: Lisa Soto [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:24 PM
To: [EMAIL PROTECTED]
Subject: Location: redirection


Hi, 

We're using perl within tomcat 4.1.27. The perl scripts run all right, but
the redirections don't work at all. 

If I run the script on the command line, it returns a proper Location:
directive, but it doesn't seem to show up in the web browser and/or affect
its reaction. 

Any ideas? 

Thanks,
Lisa 
-- 
Lisa Soto
[EMAIL PROTECTED]
(631) 344-2009
Systems Administrator
ITD Unix Services


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


!DSPAM:4199105e51622011559358!


RE: Rotating catalina.out with Webmin

2004-11-15 Thread Phillip Qin
I found that logrotate is the easiest.

-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:28 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Filip,
I set-up the Webmin Log Rotation entry to the following:
1) Re-create log file after rotation? Yes, with mode  and owned by user and
group
   
2) Store old rotated logs in Directory   
Same directory as log file
Default (Same directory as log file)
  
3) Extension for rotated filenames  Default

Should not this maintain the file handle?

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: Rotating catalina.out with Webmin

if you dont get webmin fixed, I recommend cronolog instead.
You cant just rotate it, cause then tomcat loses the file handle, and you
will lose all further output.

with cronolog you simply pipe it through cronolog like this


your java start command | /usr/local/sbin/cronolog
$CATALINA_BASE$/logs/%Y-%m-%d.catalina.out  /dev/null 21 

this will rotate the logs daily

Filip

- Original Message - 
From: Carlos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 15, 2004 2:05 PM
Subject: Rotating catalina.out with Webmin


Hi Forum,

 

Could someone recommend settings for using the log rotation of Webmin in
order to rotate catalina.out (any cautionary measures)?  I just created an
entry in Webmin to rotate the catalina.out file weekly with all the default
settings (keeping the last four copies).  Are there any scripts I should run
before or after the rotation is carried out?



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


!DSPAM:4199117c52001195320907!


RE: Rotating catalina.out with Webmin

2004-11-15 Thread Phillip Qin
I don't know how to use webadmin. I did it in command line (Debian)

/etc/logrotate.d


/usr/local/jakarta-tomcat-4.1.30/logs/catalina.out {
rotate 5
weekly
compress
delaycompress
notifempty
missingok
create 0640 tu3404nl tu3404nl
}


-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:37 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Phillip,
Since Webmin uses logrotate could I just create a simple entry with Webmin?
Or do I need to specify other settings?

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:31 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin

I found that logrotate is the easiest.

-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:28 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Filip,
I set-up the Webmin Log Rotation entry to the following:
1) Re-create log file after rotation? Yes, with mode  and owned by user and
group
   
2) Store old rotated logs in Directory   
Same directory as log file
Default (Same directory as log file)
  
3) Extension for rotated filenames  Default

Should not this maintain the file handle?

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: Rotating catalina.out with Webmin

if you dont get webmin fixed, I recommend cronolog instead.
You cant just rotate it, cause then tomcat loses the file handle, and you
will lose all further output.

with cronolog you simply pipe it through cronolog like this


your java start command | /usr/local/sbin/cronolog
$CATALINA_BASE$/logs/%Y-%m-%d.catalina.out  /dev/null 21 

this will rotate the logs daily

Filip

- Original Message - 
From: Carlos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 15, 2004 2:05 PM
Subject: Rotating catalina.out with Webmin


Hi Forum,

 

Could someone recommend settings for using the log rotation of Webmin in
order to rotate catalina.out (any cautionary measures)?  I just created an
entry in Webmin to rotate the catalina.out file weekly with all the default
settings (keeping the last four copies).  Are there any scripts I should run
before or after the rotation is carried out?



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


!DSPAM:4199138a52451467913336!


RE: Location: redirection

2004-11-15 Thread Phillip Qin
The redirect has to be done in inner class CGIRunner of servlet CGIServlet.
Tomcat 4.1.30/5.0.28 do not handle redirect. You have to modify method run,
in while (isRunning) add your own handling. Our cgi scripts have Status
302 for redirection, so I added header check below

if (line.startsWith(HTTP)) {
//TODO: should set status codes (NPH support)
/*
 * response.setStatus(getStatusCode(line));
 */
} else if (line.indexOf(:) = 0) {
String header =
line.substring(0, line.indexOf(:)).trim();
String value =
line.substring(line.indexOf(:) +
1).trim(); 
// PQ: quick fix for 302 redirect
if
(header.trim().compareToIgnoreCase(STATUS)==0  line.indexOf(302)-1) {
log(runCGI(my): status code=302);
response.setStatus(302);
} else {
response.addHeader(header , value);
if
((header.toLowerCase().equals(content-type))

(!value.toLowerCase().startsWith(text))) {
isBinaryContent = true;
}
}
} else {
log(runCGI: bad header line \ + line + \);
}

I know it's ugly.


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:31 PM
To: Tomcat Users List
Subject: RE: Location: redirection



Hi,

We're using perl within tomcat 4.1.27. The perl scripts run all right, 
but the redirections don't work at all.

Using an external mechanism (such as a CGI perl scripts in your case) for
redirection in Tomcat is tricky at best, and doomed to failure at worst.
The reason is that the script is not really part of the servlet
request/response pipeline.  Rather, it is invoked as an exec by a Tomcat
servlet (in your case, the CGI servlet that ships with Tomcat, I assume).  

That servlet can easily do a response redirect or request forward, but the
script cannot.

Accordingly, if you stick with the script at all, modify it to return the
redirection URL, and have the servlet (a custom extension to the CGI Servlet
that ships with Tomcat probably) read and act upon this URL by doing the
redirection.

Yoav



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


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


!DSPAM:4199125452166270918065!


RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk

2004-11-15 Thread Phillip Qin
I think you have to use package.

-Original Message-
From: Venkat Reddy Valluri [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 4:04 PM
To: Tomcat Users List
Subject: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk


Hi 
   I installed tomcat4.1.27 apache 2.0.47 on two diffrenet servers with
mod_jk(ajp13)
   when I try to execute jsp's they processed  fine with tomcat.   But one
of my jsp's having a import([EMAIL PROTECTED] import =Test%) of one java
class(Test.java) which is not included in any package( I mean it is not
having a package name. i.e dierectly placed under the root directory).  Here
I am getting compilation error saying that it is expecting Test.; 
THe same jsp processed fine with tomcat 4.0.4, apache 2.0.40 with mod_jk

Can you please xplain me Why it is bahaving like this

 
Thks  
--Venkat




!DSPAM:419919cd57631768811543!


RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk

2004-11-15 Thread Phillip Qin
I think you need to tell tomcat in sever.xml or context.xml?

-Original Message-
From: Venkat Reddy Valluri [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 4:52 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk


Thank you very much for giving information markt
   
why Tomact 4.1.27 can't acess symblic link directories where as tomcat 4.0.4
can acess those symbolic link directories








-Original Message-
From:   Mark Thomas [mailto:[EMAIL PROTECTED]
Sent:   Mon 11/15/2004 4:48 PM
To: 'Tomcat Users List'
Cc: 
Subject:RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk
No. The spec requires this. 

 -Original Message-
 From: Venkat Reddy Valluri [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 15, 2004 9:19 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk
 
 But it worked with tomcat 4.0.4 with out using any package
Do you think is there nat option to set for this
 
 Thks
 --Venkat
 
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Mon 11/15/2004 4:15 PM
 To:   'Tomcat Users List'
 Cc:   
 Subject:  RE: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk
 I think you have to use package.
 
 -Original Message-
 From: Venkat Reddy Valluri [mailto:[EMAIL PROTECTED]
 Sent: November 15, 2004 4:04 PM
 To: Tomcat Users List
 Subject: Tomcat 4.1.27 ana apache 2.0.47 with mod_jk
 
 
 Hi 
I installed tomcat4.1.27 apache 2.0.47 on two diffrenet
 servers with
 mod_jk(ajp13)
when I try to execute jsp's they processed  fine with 
 tomcat.   But one
 of my jsp's having a import([EMAIL PROTECTED] import =Test%) of one java
 class(Test.java) which is not included in any package( I mean 
 it is not
 having a package name. i.e dierectly placed under the root 
 directory).  Here
 I am getting compilation error saying that it is expecting Test.; 
 THe same jsp processed fine with tomcat 4.0.4, apache 
 2.0.40 with mod_jk
 
 Can you please xplain me Why it is bahaving like this
 
  
 Thks  
 --Venkat
 
 
 
 
 
 
 
 
 
 



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







!DSPAM:419924f160279402618921!


RE: Rotating catalina.out with Webmin

2004-11-15 Thread Phillip Qin
I don't remember. I think logrotate recreates it anyway.

-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 4:55 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Phillip,
Why do you re-create the file?  Is it not enough to truncate it?

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:53 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin

I don't know how to use webadmin. I did it in command line (Debian)

/etc/logrotate.d


/usr/local/jakarta-tomcat-4.1.30/logs/catalina.out {
rotate 5
weekly
compress
delaycompress
notifempty
missingok
create 0640 tu3404nl tu3404nl
}


-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:37 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Phillip,
Since Webmin uses logrotate could I just create a simple entry with Webmin?
Or do I need to specify other settings?

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:31 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin

I found that logrotate is the easiest.

-Original Message-
From: Carlos Oliva [mailto:[EMAIL PROTECTED] 
Sent: November 15, 2004 3:28 PM
To: 'Tomcat Users List'
Subject: RE: Rotating catalina.out with Webmin


Hi Filip,
I set-up the Webmin Log Rotation entry to the following:
1) Re-create log file after rotation? Yes, with mode  and owned by user and
group
   
2) Store old rotated logs in Directory   
Same directory as log file
Default (Same directory as log file)
  
3) Extension for rotated filenames  Default

Should not this maintain the file handle?

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: Rotating catalina.out with Webmin

if you dont get webmin fixed, I recommend cronolog instead.
You cant just rotate it, cause then tomcat loses the file handle, and you
will lose all further output.

with cronolog you simply pipe it through cronolog like this


your java start command | /usr/local/sbin/cronolog
$CATALINA_BASE$/logs/%Y-%m-%d.catalina.out  /dev/null 21 

this will rotate the logs daily

Filip

- Original Message - 
From: Carlos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 15, 2004 2:05 PM
Subject: Rotating catalina.out with Webmin


Hi Forum,

 

Could someone recommend settings for using the log rotation of Webmin in
order to rotate catalina.out (any cautionary measures)?  I just created an
entry in Webmin to rotate the catalina.out file weekly with all the default
settings (keeping the last four copies).  Are there any scripts I should run
before or after the rotation is carried out?



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


!DSPAM:419925d560433608341601!


Catalina-ant manager tasks ZipException

2004-11-10 Thread Phillip Qin
I  encounter this problem after every 20 to 30 deployments using
catalina-ant Manager tasks (update=true). A normal one takes less than 1
minute. While this abnormal deployment takes 10 minutes. My war file is
fine. My app is still deployed. However, after roughly 10 abnormal
deployments, tomcat crashs due to java.lang.OutOfMemoryError. It has
occurred on Tomcat 4.1 and is happening on 5.0.28. My jdk is 1.4.2_05, jk2
connector is 2.0.4, o/s is debian 3.0.


2004-11-10 10:48:51 StandardContext[/manager]Manager: deploy: Deploying web
application at '/'
2004-11-10 10:48:51 StandardContext[/manager]Manager: undeploy: Undeploying
web application at '/'
2004-11-10 10:48:51 StandardContext[/manager]Manager: Undeploying document
base /usr/local/jakarta-tomcat-5.0.28/webapps/www.mydomain.com/ROOT
2004-11-10 10:48:55 StandardContext[/manager]Manager: Uploading WAR file to
/usr/local/jakarta-tomcat-5.0.28/webapps/www.mydomain.com/ROOT.war
2004-11-10 10:59:00 StandardContext[/manager]Manager: Extracting XML file to
/usr/local/jakarta-tomcat-5.0.28/conf/Catalina/www.mydomain.com/ROOT.xml
2004-11-10 10:59:00 StandardContext[/manager]Manager:
managerServlet.extract[/]
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:127)
at java.util.jar.JarFile.init(JarFile.java:92)
at
org.apache.catalina.manager.ManagerServlet.extractXml(ManagerServlet.java:15
16)
at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:638)
at
org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:712)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
..
2004-11-10 10:59:00 StandardContext[/manager]Manager: deploy: Deploying web
application at '/'
2004-11-10 10:59:00 StandardContext[/manager]Manager: Uploading WAR file to
/usr/local/jakarta-tomcat-5.0.28/webapps/www.mydomain.com/ROOT.war
2004-11-10 10:59:10 StandardContext[/manager]Manager: Extracting XML file to
/usr/local/jakarta-tomcat-5.0.28/conf/Catalina/www.mydomain.com/ROOT.xml
2004-11-10 10:59:10 StandardContext[/manager]Manager: install: Installing
context configuration at
'file:/usr/local/jakarta-tomcat-5.0.28/conf/Catalina/www.mydomain.com/ROOT.x
ml' from
'jar:file:/usr/local/jakarta-tomcat-5.0.28/webapps/www.mydomain.com/ROOT.war
!/'



Regards,
 
 
PQ
 
Going to war for peace is like having sex for virginity


RE: problem in accessing / instead of /index.jsp

2004-11-10 Thread Phillip Qin
Have you set your welcome file in web.xml?



-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: November 10, 2004 2:33 PM
To: [EMAIL PROTECTED]
Subject: problem in accessing / instead of /index.jsp


very odd.  very.
if I access the page with http://www.domain/dir/index.jsp it fine. if I
access the page with http://www.domain/dir/ or http://www.domain/dir it 
give me the error.
org.apache.jasper.JasperException: String index out of range: -1

I have index.jsp in the welcome file list, but I dont think its that.

anyone have any idea?

_
Powerful Parental Controls Let your child discover the best the Internet has

to offer.  
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


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


!DSPAM:41926d8d308781137219969!


RE: problem in accessing / instead of /index.jsp

2004-11-10 Thread Phillip Qin
How about your mod_jk2 mapping in workers2.properties?

-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: November 10, 2004 3:06 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in accessing / instead of /index.jsp


tomcat/web.xml
welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list

application web.xml
welcome-file-list
welcome-fileindex.jsp/welcome-file
welcome-fileindex.html/welcome-file
/welcome-file-list

From: Phillip Qin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: problem in accessing / instead of /index.jsp
Date: Wed, 10 Nov 2004 14:47:03 -0500

Have you set your welcome file in web.xml?



-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED]
Sent: November 10, 2004 2:33 PM
To: [EMAIL PROTECTED]
Subject: problem in accessing / instead of /index.jsp


very odd.  very.
if I access the page with http://www.domain/dir/index.jsp it fine. if I 
access the page with http://www.domain/dir/ or http://www.domain/dir it 
give me the error.
org.apache.jasper.JasperException: String index out of range: -1

I have index.jsp in the welcome file list, but I dont think its that.

anyone have any idea?

_
Powerful Parental Controls Let your child discover the best the 
Internet
has

to offer. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034S
U=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
   Start enjoying all the benefits of MSN(r) Premium right now and get the
first two months FREE*.


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




_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new

MSN Search! Check it out!


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


!DSPAM:419274eb313561795282354!


RE: Apache/Tomcat problem

2004-11-10 Thread Phillip Qin
jk2_module is correct.

Have you link the libapr-0.so.0?

What is your LoadModule in httpd.conf?

-Original Message-
From: Guillaume Alleon [mailto:[EMAIL PROTECTED] 
Sent: November 10, 2004 4:01 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Apache/Tomcat problem


Hi,
I have a Linux FC1 machine running httpd (see conf below)
I have now a tomcat applocation that I want to access through httpd 
since only the port 80 is open
to this machine.
Therefore, I did install jakarta-tomcat-connectors-jk2-2.0.4-src  
jakarta-tomcat-5.0.28.
Trying apachectl configtest I got the following error:

Syntax error on line 199 of /etc/httpd/conf/httpd.conf:
Can't locate API module structure `mod_jk2' in file 
/etc/httpd/modules/mod_jk2.so: /usr/lib/libapr-0.so.0: undefined symbol: 
mod_jk2

line 199 is the fresh addition of :
LoadModule mod_jk2 modules/mod_jk2

Doing an nm on /etc/httpd/modules/mod_jk2.so does not show any 
'mod_jk2' but a 'jk2_module'...

Do you know about this problem ?
Thanks

--


Server version: Apache/2.0.51
Server built:   Oct  3 2004 10:35:33
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/etc/httpd
 -D SUEXEC_BIN=/usr/sbin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


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


!DSPAM:419281d3317799267813214!


RE: problem in accessing / instead of /index.jsp

2004-11-10 Thread Phillip Qin
I assume that dir is your webapp, add this line

[uri:www.domain.us/dir/*]


-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: November 10, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in accessing / instead of /index.jsp



[uri:www.domain.us/*]
worker=ajp13:localhost:8009

From: Phillip Qin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: problem in accessing / instead of /index.jsp
Date: Wed, 10 Nov 2004 16:46:30 -0500

How about your mod_jk2 mapping in workers2.properties?

-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED]
Sent: November 10, 2004 3:06 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in accessing / instead of /index.jsp


tomcat/web.xml
welcome-file-list
 welcome-fileindex.html/welcome-file
 welcome-fileindex.htm/welcome-file
 welcome-fileindex.jsp/welcome-file
/welcome-file-list

application web.xml
welcome-file-list
 welcome-fileindex.jsp/welcome-file
 welcome-fileindex.html/welcome-file
/welcome-file-list

 From: Phillip Qin [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: RE: problem in accessing / instead of /index.jsp
 Date: Wed, 10 Nov 2004 14:47:03 -0500
 
 Have you set your welcome file in web.xml?
 
 
 
 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED]
 Sent: November 10, 2004 2:33 PM
 To: [EMAIL PROTECTED]
 Subject: problem in accessing / instead of /index.jsp
 
 
 very odd.  very.
 if I access the page with http://www.domain/dir/index.jsp it fine. if 
 I access the page with http://www.domain/dir/ or 
 http://www.domain/dir it give me the error.
 org.apache.jasper.JasperException: String index out of range: -1
 
 I have index.jsp in the welcome file list, but I dont think its that.
 
 anyone have any idea?
 
 _
 Powerful Parental Controls Let your child discover the best the 
 Internet has
 
 to offer. 
 http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034
 S
 U=htt
 p://hotmail.com/encaHL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN(r) Premium right now and get 
the
 first two months FREE*.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx 
The
new

MSN Search! Check it out!


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




_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new

MSN Search! Check it out!


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


!DSPAM:4192917e327189629410584!


RE: Apache/Tomcat problem

2004-11-10 Thread Phillip Qin
Yup

LoadModule jk2_module modules/mod_jk2.so


-Original Message-
From: Guillaume Alleon [mailto:[EMAIL PROTECTED] 
Sent: November 10, 2004 5:07 PM
To: Tomcat Users List
Subject: Re: Apache/Tomcat problem


Phillip Qin wrote:

jk2_module is correct.

Have you link the libapr-0.so.0?

What is your LoadModule in httpd.conf?
  

OK, you give me the hint, I had to put 'jk2_module' instead of 'mod_jk2' 
in myLoadModule.
At least httpd starts, I may me  back for configuration file problems.
Thanks

-Original Message-
From: Guillaume Alleon [mailto:[EMAIL PROTECTED]
Sent: November 10, 2004 4:01 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Apache/Tomcat problem


Hi,
I have a Linux FC1 machine running httpd (see conf below)
I have now a tomcat applocation that I want to access through httpd
since only the port 80 is open
to this machine.
Therefore, I did install jakarta-tomcat-connectors-jk2-2.0.4-src  
jakarta-tomcat-5.0.28.
Trying apachectl configtest I got the following error:

Syntax error on line 199 of /etc/httpd/conf/httpd.conf:
Can't locate API module structure `mod_jk2' in file
/etc/httpd/modules/mod_jk2.so: /usr/lib/libapr-0.so.0: undefined symbol: 
mod_jk2

line 199 is the fresh addition of :
LoadModule mod_jk2 modules/mod_jk2

Doing an nm on /etc/httpd/modules/mod_jk2.so does not show any
'mod_jk2' but a 'jk2_module'...

Do you know about this problem ?
Thanks

--


Server version: Apache/2.0.51
Server built:   Oct  3 2004 10:35:33
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/etc/httpd
 -D SUEXEC_BIN=/usr/sbin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


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


!DSPAM:419290f2327091545416499!


RE: Session invalidation problem

2004-11-08 Thread Phillip Qin
Have you tried session.isNew()?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: November 8, 2004 2:52 PM
To: [EMAIL PROTECTED]
Subject: Session invalidation problem


Hello all.  I'm cross-posting this to the Tomcat and Struts lists because
I'm not sure where is more appropriate to post it.

I have an application that is throwing the following sporadic, but
thankfully infrequent, exceptions:

stack trace: java.lang.illegalstateexception: setattribute: session already
invalidated

It is on a call to session.setAttribute().  Here's the weird part... Just
before that method call I do the following:

if (session == null || session.getAttribute(sessionAlive) == null) {
  request.setAttribute(message, Your session timed out.  Please log on
again.);
  session.invalidate();
  return mapping.findForward(reload);
}

The idea of course is to tell the user their session timed out.  Now, as I
understand it, the session==null portion will always be false because
session is never null, there is always a session associated with the
request, even if it's empty.  That's the reason I put the sessionAlive
attribute in during logon and check if THAT is null with each subsequent
request to indicate whether the session has timed out or not (please keep
the comments about this not being done in the typical way to a minimum...
this is an inherited app I'm dealing with).

Any idea why I might still be seeing that exception?  The verbiage of it is
a little odd and doesn't seem to make sense, especially considering the
check right before that is indicating the session is fine.  I guess it COULD
be timing out between that first check and the call to setAttribute(), but
I'm assuming the container wouldn't invalidate a session that is attached to
a live request, logically that would make sense, so I've more or less
discounted this possibility.  I appreciate any thoughts you may have!

Frank W. Zammetti


!DSPAM:418fce80320296137119042!


RE: Connection Timeout

2004-11-05 Thread Phillip Qin
My guess is the request was serviced by Tomcat, and took that much time.
What did your request column tell? A huge request, file upload?

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 4:24 AM
To: Tomcat Users List
Subject: Connection Timeout


Dear List,

In /manager/status, I occasionally see connections where the status is 
'S' and the time column is huge!  1 ms.

Does this mean that the request is still being processed by tomcat? or 
is this a request waiting to be picked up - ie: chunked?

If so, is there any way I can set a timeout for this, as a time  10 
seconds makes very little sense with our application?

Thanks in advance,

Andrew

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


!DSPAM:418b46a1164289526310470!


RE: Connection Timeout

2004-11-05 Thread Phillip Qin
Byte recv and byte sent?

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 10:18 AM
To: Tomcat Users List
Subject: Re: Connection Timeout


Hi Phillip,

The request is for example a 10K image.

Regards

Andrew


On 05.11.2004, at 16:11, Phillip Qin wrote:


 My guess is the request was serviced by Tomcat, and took that much
 time.
 What did your request column tell? A huge request, file upload?

 -Original Message-
 From: Andrew Miehs [mailto:[EMAIL PROTECTED]
 Sent: November 5, 2004 4:24 AM
 To: Tomcat Users List
 Subject: Connection Timeout


 Dear List,

 In /manager/status, I occasionally see connections where the status is 
 'S' and the time column is huge!  1 ms.

 Does this mean that the request is still being processed by tomcat? or 
 is this a request waiting to be picked up - ie: chunked?

 If so, is there any way I can set a timeout for this, as a time  10 
 seconds makes very little sense with our application?

 Thanks in advance,

 Andrew

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


!DSPAM:418b99c3205412059510077!


RE: Why need Apache since we got Tomcat?

2004-11-05 Thread Phillip Qin
After my boss decideded to run ROOT applications on Tomcat, I had to switch
my perl apps to Tomcat using CGIServlet. However, this servlet is still
under development and I hacked a little bit in order for my perl redirect
work.

-Original Message-
From: Frank Peng [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 2:17 PM
To: Tomcat Users List
Subject: Why need Apache since we got Tomcat?



Do you have something to let those perl and PHP guys
hook up to Tomcat?

I do not worry about Tomcat kill Apache!

Thanks!




--- Ben Souther [EMAIL PROTECTED] wrote:

 Before you spend too much time and energy with the connectors... do 
 you definitely need to connect with Apache Httpd?
 
 Depending on your needs, running Tomcat behind
 another webserver might
 not only be unnecessary but less efficient than
 running as a standalone.
 
 The recent performance gains in both Java and Tomcat
 have made a lot of
 the older advise about needing to run behind another webserver in
 production obsolete. 
 
 
 
 On Fri, 2004-11-05 at 12:53, Frank Peng wrote:
  If I run ant to compile the source, ant cannot
 find a
  directory called util. You cannot find this
  directory in the binary Tomcat. If I choose
 source, it
  needs CVS and a connection to Internet, much
 trouble.
  
  If I use binary and put it in /modules at Apache,
 it
  is too hard to set up the workers.properties and
 the
  server.xml and httpd.conf files. 
  
  I cannot find a cook book all over the web.
  
  
  Thanks!
  
  Frank Peng.
  
  
  
  __ 
  Do you Yahoo!? 
  Check out the new Yahoo! Front Page. 
  www.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]
 
 




__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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


!DSPAM:418bd1ac232569953320904!


RE: How to set up Tomca t5.0.28 to work with Apache2 on Slackwar e Linux?

2004-11-05 Thread Phillip Qin
Why don't you post error message?

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 1:40 PM
To: Tomcat Users List
Subject: Re: How to set up Tomca t5.0.28 to work with Apache2 on Slackware
Linux?


Before you spend too much time and energy with the connectors... do you
definitely need to connect with Apache Httpd?

Depending on your needs, running Tomcat behind another webserver might not
only be unnecessary but less efficient than running as a standalone.

The recent performance gains in both Java and Tomcat have made a lot of the
older advise about needing to run behind another webserver in 
production obsolete. 



On Fri, 2004-11-05 at 12:53, Frank Peng wrote:
 If I run ant to compile the source, ant cannot find a directory called 
 util. You cannot find this directory in the binary Tomcat. If I 
 choose source, it needs CVS and a connection to Internet, much 
 trouble.
 
 If I use binary and put it in /modules at Apache, it
 is too hard to set up the workers.properties and the server.xml and 
 httpd.conf files.
 
 I cannot find a cook book all over the web.
 
 
 Thanks!
 
 Frank Peng.
 
 
   
 __
 Do you Yahoo!? 
 Check out the new Yahoo! Front Page. 
 www.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]


!DSPAM:418bc90e227571345318095!


RE: CGI ...yeah, I know (Tomcat 4.1.29)

2004-11-05 Thread Phillip Qin
Enable cgiservlet log (I usually set debug to 6) and see what's output in
the log (very detail).

-Original Message-
From: Mark Claassen [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 5:07 PM
To: 'Tomcat Users List'
Subject: CGI ...yeah, I know (Tomcat 4.1.29)


I know that Tomcat is not an ideal CGI server, but I am having real trouble
getting it to work at all.  Most often I get the Exception below, and it
doesn't seem to be running our perl program at all.  (We can run the perl
program by hand though).  We had a bit of trouble getting it setup in the
first place, and we got errors way different from this.  I figured that
since we were getting this, we must have everything else setup correctly.

Looking at the 4.1.27 source this is:
1686: commandsStdIn.flush();
  commandsStdIn.close();
commandsStdIn is the output stream to the process.

Anyone have any ideas on where to start looking?

Thanks,
Mark

java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:257)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1686)



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


!DSPAM:418bf9fd252211451334454!


RE: mod_jk error flushing ...

2004-11-04 Thread Phillip Qin
I kept these messages too although I only installed Tomcat 5. It happened in
Tomcat 4.1 as well.

-Original Message-
From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED] 
Sent: November 4, 2004 9:21 AM
To: Tomcat Users List
Subject: mod_jk error flushing ...



Hi everybody, 

I have installed tomcat 4.1.24, apache 2.0.47, jdk 1.4.2 and 
mod_jk2-2.0.43 in a Sun Solaris 8 machine. Everything have worked more or 
less ok since today that the system crashed !!!. I got the 
following 
error messages in the apache error_log file:


[Thu Nov 04 08:32:56 2004] [error] mod_jk child init 1 -2
[Thu Nov 04 08:34:00 2004] [error] jk2_init() Can't find child 1407 in 
scoreboard
[Thu Nov 04 08:34:00 2004] [error] mod_jk child init 1 -2
[Thu Nov 04 08:34:39 2004] [error] jk2_init() Can't find child 1414 in 
scoreboard
[Thu Nov 04 08:34:39 2004] [error] mod_jk child init 1 -2
[Thu Nov 04 08:34:39 2004] [error] jk2_init() Can't find child 1416 in 
scoreboard
[Thu Nov 04 08:34:39 2004] [error] mod_jk child init 1 -2
mod_jk: Error flushing

[Thu Nov 04 08:35:51 2004] [error] Error ajp_process_callback - write 
failed
[Thu Nov 04 08:35:51 2004] [error] ajp13.service() ajpGetReply recoverable 
error 3
[Thu Nov 04 08:35:51 2004] [error] Error ajp_process_callback - write 
failed
[Thu Nov 04 08:35:51 2004] [error] ajp13.service() ajpGetReply recoverable 
error 3
[Thu Nov 04 08:35:51 2004] [error] ajp13.service() Error  forwarding 
ajp13:localhost:8009 1 0

[Thu Nov 04 08:47:31 2004] [error] mod_jk.handler() Error connecting to 
tomcat 3


do you have any idea about why these errors are appearing ?


I would appreciate your help,


Clara



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


!DSPAM:418a3b7147583305085000!


RE: mod_jk error flushing ...

2004-11-04 Thread Phillip Qin
Sorry, typo. I mean I got these messages too since I started using Tomcat
4.1 and now Tomcat 5. 

-Original Message-
From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED] 
Sent: November 4, 2004 9:59 AM
To: Tomcat Users List
Subject: RE: mod_jk error flushing ...


On Thu, 4 Nov 2004, Phillip Qin wrote:

 I kept these messages too although I only installed Tomcat 5. It 
 happened in Tomcat 4.1 as well.
 

ok, thank you. I will try to change my tomcat version.

Clara

 -Original Message-
 From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED]
 Sent: November 4, 2004 9:21 AM
 To: Tomcat Users List
 Subject: mod_jk error flushing ...
 
 
 
 Hi everybody,
 
 I have installed tomcat 4.1.24, apache 2.0.47, jdk 1.4.2 and
 mod_jk2-2.0.43 in a Sun Solaris 8 machine. Everything have worked more or 
 less ok since today that the system crashed !!!. I got the 
 following 
 error messages in the apache error_log file:
 
 
 [Thu Nov 04 08:32:56 2004] [error] mod_jk child init 1 -2 [Thu Nov 04 
 08:34:00 2004] [error] jk2_init() Can't find child 1407 in scoreboard
 [Thu Nov 04 08:34:00 2004] [error] mod_jk child init 1 -2
 [Thu Nov 04 08:34:39 2004] [error] jk2_init() Can't find child 1414 in 
 scoreboard
 [Thu Nov 04 08:34:39 2004] [error] mod_jk child init 1 -2
 [Thu Nov 04 08:34:39 2004] [error] jk2_init() Can't find child 1416 in 
 scoreboard
 [Thu Nov 04 08:34:39 2004] [error] mod_jk child init 1 -2
 mod_jk: Error flushing
 
 [Thu Nov 04 08:35:51 2004] [error] Error ajp_process_callback - write
 failed
 [Thu Nov 04 08:35:51 2004] [error] ajp13.service() ajpGetReply recoverable

 error 3
 [Thu Nov 04 08:35:51 2004] [error] Error ajp_process_callback - write 
 failed
 [Thu Nov 04 08:35:51 2004] [error] ajp13.service() ajpGetReply recoverable

 error 3
 [Thu Nov 04 08:35:51 2004] [error] ajp13.service() Error  forwarding 
 ajp13:localhost:8009 1 0
 
 [Thu Nov 04 08:47:31 2004] [error] mod_jk.handler() Error connecting 
 to
 tomcat 3
 
 
 do you have any idea about why these errors are appearing ?
 
 
 I would appreciate your help,
 
 
 Clara
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

-- 
Clara Ines Pe¤a de Carrillo
Divisi¢n de Servicios de Informaci¢n
Universidad Industrial de Santander
Bucaramanga, Colombia




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


!DSPAM:418a443a49555369657494!


RE: Where can I get mod_jk2.dll

2004-11-03 Thread Phillip Qin
You don't need .dll. Always use .so on Windows.

-Original Message-
From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] 
Sent: November 3, 2004 9:56 AM
To: Tomcat Users List
Subject: RE: Where can I get mod_jk2.dll


I succeeded in building the mod_jk2 after copying the required files from
apache source distribution.

Now I am getting the following error message at console when I start my
apache.

.dll is garbled - perhaps this is not an apache module DSO?

Can somebody tell me what does this mean.

Regards,
Srinivas

-Original Message-
From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 03, 2004 6:28 PM
To: [EMAIL PROTECTED]
Subject: Where can I get mod_jk2.dll

I tried downloading the binary distribution, I found only .so file. I want
mod_jk2 for windows for apache web server. How can I get it.

 

I tried compiling it from source, but I could not succeed. While building it
is looking for some apr_lib.h, which is not in the source distribution of
mod_jk2.

 

I downloaded mod_jk2 from some site. It is not working. Seems that it is not
treated as valid DLL.

 

I am using Tomcat5.0+Apache1.3.31_Windows2K.

 

I appreciate any help in this regard.

 

Regards,

Srinivas


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


!DSPAM:4188f38e216532098466354!


RE: refresh problem

2004-11-02 Thread Phillip Qin
I know Tomcat 5 hides index.jsp so that the home page appears as
www.mydomain.com. I don't if it affects your links.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: November 2, 2004 2:22 PM
To: [EMAIL PROTECTED]
Subject: refresh problem


Dear hassan,

pls see two files attached.

the first one is WEB.xml from the conf directory
and second one is from the WEBAPPS directory

thankx again.

lets solve it :)

vaneet





---
[EMAIL PROTECTED] wrote:

 yes.the problem is the redirection and nothing else.

 read my first email again
 and click on export4u.co.uk
 and browse. ON the status bar , u can see the pages but on address 
 bar... only http://www.export4u.co.uk

 Also, when u visit any section, u refresh on that page, u are 
 redirected to home page.

Yes, and -- I'll repeat -- this isn't a standard behavior. Please go to 
contact us and use your browser to display Page Info (in
Moz/Firefox) or Properties (IE).

What URL does that show? http://www.export4u.co.uk/;, which is what 
will be loaded when the browser refresh button is clicked.

If you *explicitly* load http://www.export4u.co.uk/html/contact.html
and hit refresh -- surprise! that's what reloads. No problem.

Hence my suggestion that your problem is in your server|web.xml :-)

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



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




!DSPAM:4187df0a8956271612!


RE: Apache, Tomcat and mod_jk2 - question about layout

2004-10-28 Thread Phillip Qin
Think of an empty jk2.properties.

-Original Message-
From: Allen Williams [mailto:[EMAIL PROTECTED] 
Sent: October 27, 2004 7:20 PM
To: Tomcat Users List
Subject: RE: Apache, Tomcat and mod_jk2 - question about layout


Thanks so much.  I'll try it today or tomorrow.  Even though you didn't
change it, could you please post your jk2.properties?  Don't need the
httpd.conf- it's pretty straightforward.

Thanks again,
allen

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 27, 2004 10:23 AM
 To: 'Tomcat Users List'
 Subject: RE: Apache, Tomcat and mod_jk2 - question about layout


 This is my workers2.properties (not workers.properties). You don't 
 need to touch jk2.properties or httpd.conf.


 # shared memory handling.
 [shm]
 file=C:\Program Files\Apache Group\Tomcat 4.1\work\jk2.shm 
 size=1048576

 # Defines a load balancer named lb. Use even if you only have one 
 machine. #[lb:lb]

 # example socket channel, explicitly set port and host 
 [channel.socket:localhost:8009] #tomcatId=localhost:8009
 port=8009
 host=127.0.0.1
 tomcatId=jvm1

 # define the worker
 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009
 #group=lb

 # uri mapping
 #[uri:/examples/*]
 #group=lb

 [uri:investments.localhost/lciponline/*]
 #group=lb

 [uri:test.localhost/onlinestore/*]
 #group=lb

 #[uri:/investments/*]
 #group=lb

 # ROOT
 [uri:investments.localhost/*]

 [uri:test.localhost/*]

 [uri:investments.localhost/manager/*]
 #group=lb

 [uri:test.localhost/manager/*]

 [uri:investments.localhost/admin/*]

 [uri:test.localhost/admin/*]

 [status:]
 info=Status worker, displays runtime information

 [uri:investments.localhost/jkstatus/*]
 #worker=status:status
 group=status:

 [uri:test.localhost/jkstatus/*]
 #worker=status:status
 group=status:

 -Original Message-
 From: Allen Williams [mailto:[EMAIL PROTECTED]
 Sent: October 27, 2004 9:03 AM
 To: Tomcat Users List
 Subject: RE: Apache, Tomcat and mod_jk2 - question about layout


 Second request:

 Would you post what you did to integrate the two?  I've followed all 
 the clues on both apache and tomcat websites, which is exactly what 
 it says in three books I've got, and I still get a File Not Found 
 error from apache when I go to the dynamic content.

 Is there some reference and description of the parameters and values 
 for the workers.properties, jk2.properties, and httpd.conf files?  
 Although the Jakarta website has some of this, the examples showing 
 the parameters being
 used are pretty sparse.  What does JkMount do?  I can't find this
 documented
 anywhere.

 I assure you, I've spent DAYS on the websites, in the books, and 
 looking for documentation whereever I can find it.

 Thanks,
 Allen

  -Original Message-
  From: footh [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 26, 2004 10:08 PM
  To: Tomcat Users List
  Subject: Re: Apache, Tomcat and mod_jk2 - question about layout
 
 
  Thanks for the tips.  I believe the site will be using
  SSL at some point so that may be a reason to use
  Apache.  But for the time being, I suppose I might as
  well use Tomcat standalone knowing that I can just
  flip a switch (well, a couple switches) to get
  Apache back in there.
 
 
  --- Peter Johnson [EMAIL PROTECTED] wrote:
 
   I am using Apache2, jk2 and Tomcat5 but I do so
   because I want to
   offload the SSL and compression onto a first tier
   leaving the second
   just to generate the content. I also use the first
   tier for uri
   rewriting using mod_rewrite.
  
   If you don't need uri rewriting I would consider
   using Tomcat standalone
   as the performance is likely to be comparable but
   the reduced admin by
   removing Apache and jk would be a big benefit. Why
   have more steps that
   can go wrong? More to debug when it does?
  
   To answer the questions from your first email. The
   images will be being
   returned from Apache, remember that an image is a separate 
   request. I will qualify this by stating that any dynamically
   generated images will
   be returned by Tomcat.
  
   Regarding the directory setup ... it is whatever
   works best for you. I
   personally do the following:
   Apache Content - /sites/static/site name/... Tomcat Content 
   - /sites/webapps/site name/
  
   This means that all of the Tomcat content is outside
   the realm of Apache
   and thus security concerns are reduced.
  
   my 2c,
  
   PJ
  
   footh wrote:
  
   I've read the FAQ on the topic of whether to go
   through Apache or just use Tomcat stand-alone and frankly, it 
   seemed inconclusive.  Then I did a
   search
   and it seemed the general consensus was to use
   Tomcat
   stand-alone for development enviroments and Apache
   for
   production.
   
   Really, that's all I went by.  I figured using
   Apache,
   Tomcat and mod_jk was the more robust solution and better suited 
   for the long haul.  More and more features will likely be added

RE: problems with apache-tomcat connection ...

2004-10-28 Thread Phillip Qin
It took a while to figure out that broken pipe. It's not that fancy. It
usually happens when use visits a page and stop/cancel during page loading.

-Original Message-
From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED] 
Sent: October 28, 2004 9:12 AM
To: [EMAIL PROTECTED]
Subject: problems with apache-tomcat connection ...



Hi everybody, sorry if this is a silly question because I am  not an 
expert, but I was looking for the solution to my problem consulting to 
google and nobody has answered about the following problems with 
apache-tomcat connection:

a) I have Solaris 8, apache 2.0.47, jdk 1.4.2, tomcat 4.1.24 and the 
binary module of mod_jk version 2-2.0.42
b) Seems that the system works ok, however I got the following messages in 
the apache error_log file:

[error] Error ajp_process_callback - write failed
[error] ajp13.service() ajpGetReply recoverable error 3
Error ajp_process_callback - write failed
ajp13.service() ajpGetReply recoverable 
error 3
ajp13.service() Error  forwarding ajp13:localhost:8009 1 0 [error]
mod_jk.handler() Error connecting to tomcat 3 [Thu Oct 28 08:02:26 2004]
[error] mod_jk child init 1 0 [Thu Oct 28 08:02:31 2004] [error] jk2_init()
Can't find child 8163 in 
scoreboard
[Thu Oct 28 08:02:31 2004] [error] mod_jk child init 1 -2

and in the tomcat logs file:

StandardWrapperValve[default]: Servlet.service() for servlet default threw
exception
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
at 
org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:216)
at org.apache.coyote.Response.doWrite(Response.java:524)
at 
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384)
at 
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
at 
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:411)
at 
org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:398)
at 
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:1
10)
at 
org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:19
96)

...

My question is, what is missing in my configuration ?. How these problems 
affect the performance of my system ?.

Thanks a lot,



-- 
Clara Ines Pe¤a de Carrillo
Divisi¢n de Servicios de Informaci¢n
Universidad Industrial de Santander
Bucaramanga, Colombia




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


!DSPAM:4180f0b6312441493824945!


RE: Servlet gateway to legacy cgi application

2004-10-28 Thread Phillip Qin
The only issue I can see that he will have is the path in web.xml with
CGIServlet. I have to move all cgi scripts to a directory under my
${catalina_home}/webapps/${host}

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: October 28, 2004 10:33 AM
To: 'Tomcat Users List'
Subject: RE: Servlet gateway to legacy cgi application


Maybe it's too obvious to say ... but does the cgi servlet (that comes with
Tomcat) fit your needs ?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cgi-howto.html


 -Original Message-
 From: Shawn Church [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 27, 2004 9:58 PM
 To: [EMAIL PROTECTED]
 Subject: Servlet gateway to legacy cgi application
 
 
 I am planning to migrate an old cgi (actually iSeries/AS/400
 Net.DATA) application to Java, but in the meantime I would 
 like to create a servlet-based gateway to the application, so 
 that all requests are filtered through this gateway prior to 
 being forwarded to the cgi application. Likewise, all 
 responses should flow back through the servlet.
 
 I would also like to use Apache as the web server.  I have no
 problem integrating Apache and Tomcat, but I'm not sure of 
 the best method of sitting in front of the cgi app.
 
 I am needing to do this to integrate security with other Java
 apps (running on other servers), and it would be convenient 
 if I could develop a gateway app to filter requests to the 
 cgi application.
 
 I would appreciate some pointers on how to approach this.  I
 would prefer to handle this in my own custom servlet, but if 
 there is something already built into Tomcat I would like to 
 know about it.
 
 Thanks,
 Shawn



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


!DSPAM:4181030a319441307757648!


RE: problems with apache-tomcat connection ...

2004-10-28 Thread Phillip Qin
I can't represent other people. My observation is it has no impact on
performance.

-Original Message-
From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED] 
Sent: October 28, 2004 12:06 PM
To: Phillip Qin
Cc: 'Tomcat Users List'
Subject: RE: problems with apache-tomcat connection ...


On Thu, 28 Oct 2004, Phillip Qin wrote:

Hi Phillip, Thank you for your comment about my doubt, however I want to 
know what the apache errors mean and if those affect the performance of my
system anyway.

Greetings,

Clara Ines Pe¤a de Carrillo
Divisi¢n de Servicios de Informaci¢n
Universidad Industrial de Santander
Bucaramanga, Colombia


 
 It took a while to figure out that broken pipe. It's not that fancy. 
 It usually happens when use visits a page and stop/cancel during page 
 loading.
 
 -Original Message-
 From: Clara Ines Pena de Carrillo [mailto:[EMAIL PROTECTED]
 Sent: October 28, 2004 9:12 AM
 To: [EMAIL PROTECTED]
 Subject: problems with apache-tomcat connection ...
 
 
 
 Hi everybody, sorry if this is a silly question because I am  not an
 expert, but I was looking for the solution to my problem consulting to 
 google and nobody has answered about the following problems with 
 apache-tomcat connection:
 
 a) I have Solaris 8, apache 2.0.47, jdk 1.4.2, tomcat 4.1.24 and the
 binary module of mod_jk version 2-2.0.42
 b) Seems that the system works ok, however I got the following messages in

 the apache error_log file:
 
 [error] Error ajp_process_callback - write failed
 [error] ajp13.service() ajpGetReply recoverable error 3
 Error ajp_process_callback - write failed
 ajp13.service() ajpGetReply recoverable
 error 3
 ajp13.service() Error  forwarding ajp13:localhost:8009 1 0 [error]
 mod_jk.handler() Error connecting to tomcat 3 [Thu Oct 28 08:02:26 2004]
 [error] mod_jk child init 1 0 [Thu Oct 28 08:02:31 2004] [error]
jk2_init()
 Can't find child 8163 in 
 scoreboard
 [Thu Oct 28 08:02:31 2004] [error] mod_jk child init 1 -2
 
 and in the tomcat logs file:
 
 StandardWrapperValve[default]: Servlet.service() for servlet default 
 threw exception
 java.net.SocketException: Broken pipe
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
 at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
 at 
 org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:216)
 at org.apache.coyote.Response.doWrite(Response.java:524)
 at 

org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384)
 at 
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
 at 
 org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:411)
 at 
 org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:398)
 at 

org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:1
 10)
 at 

org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:19
 96)
 
 ...
 
 My question is, what is missing in my configuration ?. How these 
 problems
 affect the performance of my system ?.
 
 Thanks a lot,
 
 
 
 

-- 
Clara Ines Pe¤a de Carrillo
Divisi¢n de Servicios de Informaci¢n
Universidad Industrial de Santander
Bucaramanga, Colombia




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


!DSPAM:418119616796902398182!


RE: Apache, Tomcat and mod_jk2 - question about layout

2004-10-27 Thread Phillip Qin
This is my workers2.properties (not workers.properties). You don't need to
touch jk2.properties or httpd.conf.


# shared memory handling.
[shm]
file=C:\Program Files\Apache Group\Tomcat 4.1\work\jk2.shm
size=1048576

# Defines a load balancer named lb. Use even if you only have one machine.
#[lb:lb]

# example socket channel, explicitly set port and host
[channel.socket:localhost:8009]
#tomcatId=localhost:8009
port=8009
host=127.0.0.1
tomcatId=jvm1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
#group=lb

# uri mapping
#[uri:/examples/*]
#group=lb

[uri:investments.localhost/lciponline/*]
#group=lb

[uri:test.localhost/onlinestore/*]
#group=lb

#[uri:/investments/*]
#group=lb

# ROOT
[uri:investments.localhost/*]

[uri:test.localhost/*]

[uri:investments.localhost/manager/*]
#group=lb

[uri:test.localhost/manager/*]

[uri:investments.localhost/admin/*]

[uri:test.localhost/admin/*]

[status:]
info=Status worker, displays runtime information

[uri:investments.localhost/jkstatus/*]
#worker=status:status
group=status:

[uri:test.localhost/jkstatus/*]
#worker=status:status
group=status:

-Original Message-
From: Allen Williams [mailto:[EMAIL PROTECTED] 
Sent: October 27, 2004 9:03 AM
To: Tomcat Users List
Subject: RE: Apache, Tomcat and mod_jk2 - question about layout


Second request:

Would you post what you did to integrate the two?  I've followed all the
clues on both apache and tomcat websites, which is exactly what it says in
three books I've got, and I still get a File Not Found error from apache
when I go to the dynamic content.

Is there some reference and description of the parameters and values for the
workers.properties, jk2.properties, and httpd.conf files?  Although the
Jakarta website has some of this, the examples showing the parameters being
used are pretty sparse.  What does JkMount do?  I can't find this documented
anywhere.

I assure you, I've spent DAYS on the websites, in the books, and looking for
documentation whereever I can find it.

Thanks,
Allen

 -Original Message-
 From: footh [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 26, 2004 10:08 PM
 To: Tomcat Users List
 Subject: Re: Apache, Tomcat and mod_jk2 - question about layout


 Thanks for the tips.  I believe the site will be using
 SSL at some point so that may be a reason to use
 Apache.  But for the time being, I suppose I might as
 well use Tomcat standalone knowing that I can just
 flip a switch (well, a couple switches) to get
 Apache back in there.


 --- Peter Johnson [EMAIL PROTECTED] wrote:

  I am using Apache2, jk2 and Tomcat5 but I do so
  because I want to
  offload the SSL and compression onto a first tier
  leaving the second
  just to generate the content. I also use the first
  tier for uri
  rewriting using mod_rewrite.
 
  If you don't need uri rewriting I would consider
  using Tomcat standalone
  as the performance is likely to be comparable but
  the reduced admin by
  removing Apache and jk would be a big benefit. Why
  have more steps that
  can go wrong? More to debug when it does?
 
  To answer the questions from your first email. The
  images will be being
  returned from Apache, remember that an image is a
  separate request. I
  will qualify this by stating that any dynamically
  generated images will
  be returned by Tomcat.
 
  Regarding the directory setup ... it is whatever
  works best for you. I
  personally do the following:
  Apache Content - /sites/static/site name/...
  Tomcat Content - /sites/webapps/site name/
 
  This means that all of the Tomcat content is outside
  the realm of Apache
  and thus security concerns are reduced.
 
  my 2c,
 
  PJ
 
  footh wrote:
 
  I've read the FAQ on the topic of whether to go
  through Apache or just use Tomcat stand-alone and
  frankly, it seemed inconclusive.  Then I did a
  search
  and it seemed the general consensus was to use
  Tomcat
  stand-alone for development enviroments and Apache
  for
  production.
  
  Really, that's all I went by.  I figured using
  Apache,
  Tomcat and mod_jk was the more robust solution and
  better suited for the long haul.  More and more
  features will likely be added to this site so I
  need
  to be forward thinking.
  
  --- Parsons Technical Services [EMAIL PROTECTED] 
  wrote:
  
  
  
  Unless you have a reason, why not let Tomcat do it
  all?
  
  Doug
  
  - Original Message -
  From: footh [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 26, 2004 5:13 PM
  Subject: Apache, Tomcat and mod_jk2 - question
  about
  layout
  
  
  
  
  After going through all the documentation, I have
  gotten mod_jk2 to forward jsp requests to Tomcat.
 
  However, I have a question about the layout...
  
  Essentially, my site will be .html pages with
  some
  occasional .jsp pages (it will likely change in
  
  
  the
  
  
  future to all .jsp/servlets, but for now that's
  
  
  the
  
  
  way it is).  Right now, I have the Apache

RE: Interesting discoveries about catalina GUI manager deploy (5. 0.28 and 5.0.29)

2004-10-27 Thread Phillip Qin
System.getProperty?

-Original Message-
From: Igor [mailto:[EMAIL PROTECTED] 
Sent: October 27, 2004 12:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Interesting discoveries about catalina GUI manager deploy
(5.0.28 and 5.0.29)


Hello!

Another question is: how do I get the JNDI enviroment variable value 
from the java program? still using ctx.lookup or other way.

All JNDI references should be lookup using the naming context.  If 
you're using simple Environment variables, you don't need to use JNDI, 
you retrieve them like normal environment entries in any Java program.

Could you please tell me how environment variables can be accessed without
JNDI? Is there corresponding section in documentation?

Thank you,
Igor


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


!DSPAM:417f297c102764124516016!


RE: How to put context.xml into ant war target

2004-10-26 Thread Phillip Qin
zipfileset dir=${basedir}/conf includes=**/context.xml
prefix=META-INF/

${basedir}/conf is where my context.xml is stored.


-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 26, 2004 2:24 PM
To: [EMAIL PROTECTED]
Subject: How to put context.xml into ant war target


I used ant war task to create the deployable war file, I just want to know
how to put the context.xml into the meta-inf directory using war target.
 
Thanks


!DSPAM:417e98dd32511535019051!


RE: Interesting discoveries about catalina GUI manager deploy (5. 0.28 and 5.0.29)

2004-10-26 Thread Phillip Qin
Q1: you have to look into Manager.java deploy method. But if you take a look
at the message on top of manager/html/list page, you will see

OK - Deployed application from context file
file:${catalina_home}/conf/${engine}/${host}/onlinestore.xml

Q2: yes, use JNDI lookup.


-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 26, 2004 3:54 PM
To: [EMAIL PROTECTED]
Subject: Interesting discoveries about catalina GUI manager deploy (5.0.28
and 5.0.29)


Phillip, thanks
the context.xml file works. I finally got the JNDI mail/Session to work.
 
But I found one thing interesting about the GUI manager deploy (upload the
ant generated war file)
 
After I uploaded the war file, I found that this action not only uppacked
war into the myapp directory with the context.xml in mata-inf directory,
ALSO, it generated myapp.xml in
C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
This discovery is inconsistent with the JNDI doc says: either myapp.xml in
C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost 
or in meta-inf/context.xml.
 
Another question is: how do I get the JNDI enviroment variable value from
the java program? still using ctx.lookup or other way.
 
Any idea.
 
Again thanks for the help!!
 
david


!DSPAM:417eab4841116084513682!


RE: Interesting discoveries about catalina GUI manager deploy (5. 0.28 and 5.0.29)

2004-10-26 Thread Phillip Qin
I personally have never tried environment variables. Do what Yoav
recommends. BTW, why do you need to use environemtn variables?



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 26, 2004 3:56 PM
To: Tomcat Users List
Subject: RE: Interesting discoveries about catalina GUI manager deploy
(5.0.28 and 5.0.29)



Hi,

After I uploaded the war file, I found that this action not only 
uppacked war into the myapp directory with the context.xml in mata-inf 
directory, ALSO, it generated myapp.xml in 
C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost

Funny, this is what I said would happen earlier today on this list on
another thread ;)

This discovery is inconsistent with the JNDI doc says: either myapp.xml 
in C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost
or in meta-inf/context.xml.

It's not inconsistent at all.  Your can use either myapp.xml or
META-INF/context.xml to deploy your app.  If you use the latter Tomcat will
create myapp.xml from context.xml.

Another question is: how do I get the JNDI enviroment variable value 
from the java program? still using ctx.lookup or other way.

All JNDI references should be lookup using the naming context.  If you're
using simple Environment variables, you don't need to use JNDI, you retrieve
them like normal environment entries in any Java program.

Yoav



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


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


!DSPAM:417eabe641391746942718!


RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Phillip Qin
What arr your Resource and ResourceParams?

-Original Message-
From: Adrian Harrison [mailto:[EMAIL PROTECTED] 
Sent: October 23, 2004 12:28 PM
To: [EMAIL PROTECTED]
Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?


using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded 
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception -

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.ja
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(PoolableConn
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
etc...

from my web.xml file -

resource-ref
 descriptionOracle Datasource example/description
res-ref-namePRDConnectionPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

from my app xml file -

   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91/value
   /parameter

Worked fine under 8.1i but now I've hit a brick wall with this one - is it
possible to get these to work together?

Probably doing something really stupid, any ideas?

many thanks

harry




!DSPAM:417a864a256491205720536!


RE: modify web deployment descriptor at runtime

2004-10-25 Thread Phillip Qin
Have you tried admin application?

-Original Message-
From: Saravanan Veerappan [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 10:34 AM
To: [EMAIL PROTECTED]
Subject: modify web deployment descriptor at runtime


Is there a way to modify web deployment descriptor (web.xml) at runtime
using MBeans? I would like to add security roles/ constraints at runtime by
providing a admin interface, so admin can add /remove users described in
web.xml. Appreciate your replies.

Thanks

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


!DSPAM:417d1051178491506210100!


RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Phillip Qin
Can you give classes12.jar a try so we can isolate the problem of ojdbc14. I
use the jdbc driver come with oracle 9i release 2. The name is
classes12.zip.



-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 12:39 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Added the factory bit  still not working -

prd.xml now is- 

Context path=/PRD docBase=PRD debug=0 privileged=true

Resource name=PRDConnectionPool auth=Container
type=javax.sql.DataSource/ 
  
ResourceParams name=PRDConnectionPool
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev/value
  /parameter
  parameter
nameusername/name
valueprd_owner/value
  /parameter
  parameter
namepassword/name
valueprd_owner/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams

/Context

 web.xml still contains -

resource-ref
 descriptionOracle Datasource example/description  
res-ref-namePRDConnectionPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a factory ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 12:14 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

This is my app file i.e prd.xml in
c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost

?xml version='1.0' encoding='utf-8'?
Context displayName=Project Report Database docBase=PRD
path=/PRD
privileged=true workDir=work\Catalina\localhost\PRD
  Resource auth=Container name=PRDConnectionPool
type=javax.sql.DataSource/
  ResourceParams name=PRDConnectionPool
parameter
  namemaxWait/name
  value-1/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  nameusername/name
  valueprd_user/value
/parameter
parameter
  namepassword/name
  valueprd_user/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  namemaxIdle/name
  value10/value
/parameter
  /ResourceParams
/Context

My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -

resource-ref
 descriptionOracle Datasource example/description
res-ref-namePRDConnectionPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

Hope this helps?

Thanks

harry





-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: 25 October 2004 15:25
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


What arr your Resource and ResourceParams?

-Original Message-
From: Adrian Harrison [mailto:[EMAIL PROTECTED]
Sent: October 23, 2004 12:28 PM
To: [EMAIL PROTECTED]
Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?


using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded 
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception
-

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at 
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
a
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
a
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
n
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
S
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
v
a:851)
etc...

from my web.xml file -

resource-ref
 descriptionOracle Datasource example/description
res-ref-namePRDConnectionPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth

RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
Resource name=mail/Session auth=Container
  type=javax.mail.Session/
ResourceParams name=mail/Session
  parameter
namemail.smtp.host/name
valuecompany email server/value
  /parameter
/ResourceParams
 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
Session session = (Session) envCtx.lookup(mail/Session);
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from email
mailto:[EMAIL PROTECTED] ));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress(to email
mailto:[EMAIL PROTECTED] );
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject(test mail session from tomcat);
message.setContent(test mail session from tomcat, text/plain);
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)


!DSPAM:417d591a211741752920360!


RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
Assume your Resource is closed by /Resource. Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:

resource-ref
  description
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  /description
  res-ref-name
mail/Session
  /res-ref-name
  res-type
javax.mail.Session
  /res-type
  res-auth
Container
  /res-auth
/resource-ref

Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
Resource name=mail/Session auth=Container
  type=javax.mail.Session/
ResourceParams name=mail/Session
  parameter
namemail.smtp.host/name
valuecompany email server/value
  /parameter
/ResourceParams
 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
Session session = (Session) envCtx.lookup(mail/Session);
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from email
mailto:[EMAIL PROTECTED] ));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress(to email
mailto:[EMAIL PROTECTED] );
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject(test mail session from tomcat);
message.setContent(test mail session from tomcat, text/plain);
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)




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


!DSPAM:417d615f216943647852163!


RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
Add use plain email address, e.g. [EMAIL PROTECTED]



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:34 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


Assume your Resource is closed by /Resource. Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:

resource-ref
  description
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  /description
  res-ref-name
mail/Session
  /res-ref-name
  res-type
javax.mail.Session
  /res-type
  res-auth
Container
  /res-auth
/resource-ref

Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
Resource name=mail/Session auth=Container
  type=javax.mail.Session/
ResourceParams name=mail/Session
  parameter
namemail.smtp.host/name
valuecompany email server/value
  /parameter
/ResourceParams
 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
Session session = (Session) envCtx.lookup(mail/Session);
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from email
mailto:[EMAIL PROTECTED] ));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress(to email
mailto:[EMAIL PROTECTED] );
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject(test mail session from tomcat);
message.setContent(test mail session from tomcat, text/plain);
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)




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





!DSPAM:417d6356217529789243331!


RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
I use 5.0.28 and Tomcat Manager/catalina-ant tasks. The context file is
called context.xml and is lcoated at META-INF in war. When Manager deploys
web app, it

- uploads war to ${catalina_home}/webapps
- expands war to ${catalina_home}/webapps/yourapp
- copies context.xml to ${catalina_home}/${engine}/${host}/yourapp.xml

Use war task should help you properly package your web app for deployment.


-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


 Hi! Phillip,

Thanks for the help.

My questions are:

1. in web.xml

My context definition is: 
servlet-mapping
servlet-nameUpdateItemServlet/servlet-name
url-pattern/servlet/chapter6/url-pattern
/servlet-mapping

It works fine

2. I have a context file called javaxml2.xml, in this file: I defined:

Context path=/servlet/chapter6 docBase=javaxml2 debug=0
 reloadable=true crossContext=false
...
/Context

3. where should this context file reside?
My war file name is javaxml2.war.

4. My practice app probably didn't read this javaxml2 context file!!!
   Because I have a test env variable also didn't get read:

Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valueismtp.irf.com/value
/parameter
  /ResourceParams

 Environment name=david value=10
 type=java.lang.Integer override=false/

5. error message from catalina:

INFO: Jk running ID=0 time=0/31
config=C:\jakarta-tomcat-5.0.29\conf\jk2.proper
ties
Oct 25, 2004 1:57:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5467 ms
javax.naming.NameNotFoundException: Name david is not bound in this Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)

Thanks a million

David

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:36 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?

Add use plain email address, e.g. [EMAIL PROTECTED]



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 4:34 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


Assume your Resource is closed by /Resource. Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:

resource-ref
  description
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  /description
  res-ref-name
mail/Session
  /res-ref-name
  res-type
javax.mail.Session
  /res-type
  res-auth
Container
  /res-auth
/resource-ref

Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
Resource name=mail/Session auth=Container
  type=javax.mail.Session/
ResourceParams name=mail/Session
  parameter
namemail.smtp.host/name
valuecompany email server/value
  /parameter
/ResourceParams
 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
Session session = (Session) envCtx.lookup(mail/Session);
 
Message message = new MimeMessage(session

RE: Webapp don't start after shutdown

2004-10-22 Thread Phillip Qin
Also, have you tried starting it from Manager?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 22, 2004 9:58 AM
To: Tomcat Users List
Subject: RE: Webapp don't start after shutdown



Hi,

Then I run the bin/shutdown.sh script and bin/startup.sh

Are you sure shutdown is completed properly, i.e. the JVM process is gone?

I attempt to access the web-app and only get 404 errors.

Are there any errors or startup?  If so, please post the relevant logs
and/or configuration information.  Is the context information for your
deployed webapp saved correctly?

Yoav



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


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


!DSPAM:4179121095381515284706!


RE: adding HTTP headers for all responses in web application

2004-10-22 Thread Phillip Qin
If your pattern is /*.jsp, then your filter applies to all jsps.

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED] 
Sent: October 22, 2004 1:19 AM
To: Tomcat Users List
Subject: RE: adding HTTP headers for all responses in web application


question: will the filter applied to response for custom error pages defined
in web.xml:
example:
error-page
  exception-typeMyException/exception-type
  location/errorPage.jsp/location
/error-page


--- Shapira, Yoav [EMAIL PROTECTED] wrote:

 
 Hi,
 There are filters that ship with Tomcat's example webapp.  Beside 
 being the best how-to possible, there's actually one that does what 
 you want
 for character encoding, so it's a trivial copy/paste to suit it to
 whatever headers you need.
 
 Yoav Shapira http://www.yoavshapira.com
 
 
 -Original Message-
 From: Steven J.Owens [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 20, 2004 10:10 PM
 To: Tomcat Users List
 Subject: Re: adding HTTP headers for all responses in web
 application
 
 On Wed, Oct 20, 2004 at 11:07:58AM -0400, Ben Souther wrote:
  Search the archives, I believe Tim Funk has actually written and 
  published one  Not sure though.
 
  It's pretty straight-forward.  This is the first filter I
 ever
 coded, it was a snap.  I make no guarantees that the particular 
 headers are exactly what you need (browser caching is annoyingly 
 difficult to disable).
 

-config
 
 -
 filter
 filter-nameNoCacheFilter/filter-name
 filter-classclass.path.to.NoCacheFilter/filter-class
 /filter
 filter-mapping
 filter-nameNoCacheFilter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping

-source
 
 -
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import javax.servlet.ServletException;
 
 public class NoCacheFilter implements Filter {
 
 public void init(FilterConfig config) throws ServletException
 {
 this.filterConfig = config;
 }
 private FilterConfig filterConfig;
 public FilterConfig getFilterConfig() {
 return this.filterConfig;
 }
 public void setFilterConfig (FilterConfig filterConfig) {
 this.filterConfig = filterConfig;
 }
 public void destroy() {
 this.filterConfig = null;
 }
 
 public void doFilter (ServletRequest request,
   ServletResponse response,
   FilterChain chain) {
 try {
 if (response instanceof HttpServletResponse) {
 HttpServletResponse httpresponse = 
 (HttpServletResponse)response ;
 // Set the Cache-Control and Expires header
 httpresponse.setHeader(Cache-Control,
 no-cache) ;
 httpresponse.setHeader(Expires, 0) ;
 }
 chain.doFilter (request, response);
 } catch (IOException e) {
 System.out.println (IOException in NoCacheFilter);
 e.printStackTrace() ;
 } catch (ServletException e) {
 System.out.println (ServletException in
 NoCacheFilter);
 e.printStackTrace() ;
 }
 }
 }

--
 
 --
 Steven J. Owens
 [EMAIL PROTECTED]
 
 I'm going to make broad, sweeping generalizations and strong,  
 declarative statements, because otherwise I'll be here all night
 and
  this document will be four times longer and much less fun to
 read.
  Take it all with a grain of salt. -
 http://darksleep.com/notablog
 
 

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

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




___
Do you Yahoo!?
Declare Yourself - Register online to vote today! http://vote.yahoo.com

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

RE: adding HTTP headers for all responses in web application

2004-10-22 Thread Phillip Qin
Why this url-pattern is always un-nature? I always have difficulties
reading filter section in servlet spec 2.3. Couldn't we simply use /*.jsp in
the next release of servlet, i.e. servlet xp?

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: October 22, 2004 10:32 AM
To: Tomcat Users List
Subject: Re: adding HTTP headers for all responses in web application


Actually the pattern is *.jsp - not /*.jsp

-Tim

Phillip Qin wrote:

 If your pattern is /*.jsp, then your filter applies to all jsps.
 
 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]
 Sent: October 22, 2004 1:19 AM
 To: Tomcat Users List
 Subject: RE: adding HTTP headers for all responses in web application
 
 
 question: will the filter applied to response for custom error pages 
 defined in web.xml:
 example:
 error-page
   exception-typeMyException/exception-type
   location/errorPage.jsp/location
 /error-page
 


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


!DSPAM:417919e7101532314120084!


RE: Threads in application

2004-10-21 Thread Phillip Qin
Were you able to stop thread in the destroy method?



-Original Message-
From: Ren Huva [mailto:[EMAIL PROTECTED] 
Sent: October 21, 2004 10:33 AM
To: [EMAIL PROTECTED]
Subject: Re: Threads in application


I have created class, which is registered in web.xml as listener. This class
implements ServletContextListener and contains two methods, wich writte a
message, when is application started or stopped. But why have registered
thread? Please help me.

Thank,

renhu


= Original message =
Od (From): Tim Funk [EMAIL PROTECTED]
Komu (To): Tomcat Users List [EMAIL PROTECTED] Kopie (Cc): 
Pedmt (Subject): Re: Threads in application
Datum (Date): 21. 10. 2004 16:20
==

 You need to regeister that thread somewhere so it can be stopped on 
 webapp
 shutdown. See ServletContextListener for hooking into webapp startup and 
 shutdown.
 
 -Tim
 
 Ren Huva wrote:
 
  Hi,
  I create a one thread in a application, which runs in Tomcat 
  (application doesn't run as servlet). When I reload application from 
  Tomcat Manager, application is reloaded, but thread isn't destroy and
it's created second thread, third, etc. How have destroy a thread, when is
applicaton reloaded (or stopped) from Tomcat Manager?
   
 
 -
 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]


!DSPAM:4177c8d0272201609119285!


RE: Threads in application

2004-10-21 Thread Phillip Qin
Destroy method should destroy not start your thread.

-Original Message-
From: Ren Huva [mailto:[EMAIL PROTECTED] 
Sent: October 21, 2004 10:48 AM
To: Tomcat Users List
Subject: RE: Threads in application


In a destroy method of classes, where is thread started? This I dont't know.
I try it, but tomorrov.
BTW: My application run in a apache SOAP So I don't restart my
application, but apache SOAP. My application is deployed in SOAP.

renhu

= Original Message =
Od (From): Phillip Qin [EMAIL PROTECTED]
Komu (To): 'Tomcat Users List' [EMAIL PROTECTED] Kopie
(Cc): 
Pedmt (Subject): RE: Threads in application
Datum (Date): 21. 10. 2004 16:38
==

 Were you able to stop thread in the destroy method?
 
 
 
 -Original Message-
 From: Ren Huva [mailto:[EMAIL PROTECTED]
 Sent: October 21, 2004 10:33 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Threads in application
 
 
 I have created class, which is registered in web.xml as listener. This 
 class implements ServletContextListener and contains two methods, wich 
 writte a message, when is application started or stopped. But why have 
 registered thread? Please help me.
 
 Thank,
 
 renhu
 
 
 = Original message =
 Od (From): Tim Funk [EMAIL PROTECTED]
 Komu (To): Tomcat Users List [EMAIL PROTECTED] Kopie 
 (Cc):
 Pedmt (Subject): Re: Threads in application
 Datum (Date): 21. 10. 2004 16:20
 ==
 
  You need to regeister that thread somewhere so it can be stopped 
  on
  webapp
  shutdown. See ServletContextListener for hooking into webapp startup and

  shutdown.
  
  -Tim
  
  Ren Huva wrote:
  
   Hi,
   I create a one thread in a application, which runs in Tomcat
   (application doesn't run as servlet). When I reload application from 
   Tomcat Manager, application is reloaded, but thread isn't destroy and
 it's created second thread, third, etc. How have destroy a thread, 
 when is applicaton reloaded (or stopped) from Tomcat Manager?

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


!DSPAM:4177cc14273021004316658!


RE: Threads in application

2004-10-21 Thread Phillip Qin
Or notify your thread that it should stop and quit.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 21, 2004 12:21 PM
To: 'Tomcat Users List'
Subject: RE: Threads in application


Destroy method should destroy not start your thread.

-Original Message-
From: Ren Huva [mailto:[EMAIL PROTECTED] 
Sent: October 21, 2004 10:48 AM
To: Tomcat Users List
Subject: RE: Threads in application


In a destroy method of classes, where is thread started? This I dont't know.
I try it, but tomorrov.
BTW: My application run in a apache SOAP So I don't restart my
application, but apache SOAP. My application is deployed in SOAP.

renhu

= Original Message =
Od (From): Phillip Qin [EMAIL PROTECTED]
Komu (To): 'Tomcat Users List' [EMAIL PROTECTED] Kopie
(Cc): 
Pedmt (Subject): RE: Threads in application
Datum (Date): 21. 10. 2004 16:38
==

 Were you able to stop thread in the destroy method?
 
 
 
 -Original Message-
 From: Ren Huva [mailto:[EMAIL PROTECTED]
 Sent: October 21, 2004 10:33 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Threads in application
 
 
 I have created class, which is registered in web.xml as listener. This
 class implements ServletContextListener and contains two methods, wich 
 writte a message, when is application started or stopped. But why have 
 registered thread? Please help me.
 
 Thank,
 
 renhu
 
 
 = Original message =
 Od (From): Tim Funk [EMAIL PROTECTED]
 Komu (To): Tomcat Users List [EMAIL PROTECTED] Kopie
 (Cc):
 Pedmt (Subject): Re: Threads in application
 Datum (Date): 21. 10. 2004 16:20
 ==
 
  You need to regeister that thread somewhere so it can be stopped
  on
  webapp
  shutdown. See ServletContextListener for hooking into webapp startup and

  shutdown.
  
  -Tim
  
  Ren Huva wrote:
  
   Hi,
   I create a one thread in a application, which runs in Tomcat 
   (application doesn't run as servlet). When I reload application 
   from Tomcat Manager, application is reloaded, but thread isn't 
   destroy and
 it's created second thread, third, etc. How have destroy a thread,
 when is applicaton reloaded (or stopped) from Tomcat Manager?

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





!DSPAM:4177e1df284941404814189!


RE: filter config cause startup crash on Tomcat 5

2004-10-20 Thread Phillip Qin
Have you changed it to url-pattern/sillyApe/*/url-pattern? BTW, post the
error log.

-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: October 20, 2004 8:17 AM
To: [EMAIL PROTECTED]
Subject: RE: filter config cause startup crash on Tomcat 5


the filter Tomcat no likie :)

not sure what it is, any other suggestions.

From: Phillip Qin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: filter config cause startup crash on Tomcat 5
Date: Tue, 19 Oct 2004 16:48:09 -0400

Try url-pattern /s.../*

-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED]
Sent: October 19, 2004 4:31 PM
To: [EMAIL PROTECTED]
Subject: RE: filter config cause startup crash on Tomcat 5


What order should it come in.
Its near the top of the list.

 From: Phillip Qin [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: RE: filter config cause startup crash on Tomcat 5
 Date: Tue, 19 Oct 2004 16:26:39 -0400
 
 Check the order in web.xml.
 
 
 
 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED]
 Sent: October 19, 2004 4:19 PM
 To: [EMAIL PROTECTED]
 Subject: filter config cause startup crash on Tomcat 5
 
 
 I have created a DetectBrowser servlet to not allow certain browsers 
 into the sillyApe directory/url. I wanted to use it as a filter 
 rather then having to call it in each jsp since people can get to 
 almost every page in the sillyApe directory without going through a 
 single page, just thought it would be easier, as well as other 
 issues.  Anyway I am trying to figure out why I get a SEVERE: Error 
 filterStart from Tomcat when I start it back up.
 
 HELP!!!
 
 filter
 filter-nameDetectBrowser/filter-name
 filter-classcom.dtribe.logic.DetectBrowser/filter-class
 /filter
 filter-mapping
 filter-nameDetectBrowser/filter-name
 url-pattern/sillyApe/url-pattern
 /filter-mapping
 
 
 HELP???
 
 _
 Powerful Parental Controls Let your child discover the best the 
 Internet has
 
 to offer. 
 http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034
 S
 U=htt
 p://hotmail.com/encaHL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN(r) Premium right now and get 
the
 first two months FREE*.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

_
Take advantage of powerful junk e-mail filters built on patented
Microsoft(r)
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034S
U=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
   Start enjoying all the benefits of MSN(r) Premium right now and get the
first two months FREE*.


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




_
Take advantage of powerful junk e-mail filters built on patented
Microsoft(r) 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


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


!DSPAM:4176578399142061846259!


RE: Deployment with tomcat 5

2004-10-20 Thread Phillip Qin
1. build your war file using ant war directive. Below is my build target:

war destfile=${dist}/${war.file}
webxml=${basedir}/etc/web.xml
!-- copy *.jsp to WEB-INF --
fileset dir=${basedir}/web/
!-- copy web.xml, dtds and tlds to WEB-INF/etc --
zipfileset dir=${basedir}/etc
excludes=**/web.xml prefix=WEB-INF/
!-- copy *.class to WEB-INF/classes --
classes dir=${basedir}/classes/
!-- copy 3rd party jars to WEB-INF/lib --
lib dir=${basedir}/lib/
!-- copy *.xml to WEB-INF/conf, excluding
*.properties and context.xml --
zipfileset dir=${basedir}/conf
excludes=**/*.properties **/context.xml prefix=WEB-INF/conf/
!-- copy context.xml to META-INF --
zipfileset dir=${basedir}/conf
includes=**/context.xml prefix=META-INF/
!-- copy *.properties to WEB-INF/classes --
zipfileset dir=${basedir}/conf
includes=**/*.properties prefix=WEB-INF/classes/
!-- copy images to px --
zipfileset dir=${basedir}/px prefix=px/
/war

2. deploy using catalina-ant task

deploy url=http://localhost:8080/manager; username=admin
password=${password} path=/testws war=${war.url} update=true/

War.url is, on windows, file:/h:/eclipse/workspace/testws.war

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: October 19, 2004 5:28 PM
To: Tomcat Users List
Subject: RE: Deployment with tomcat 5


Thanks, I have to following Ant Script and it is
running very well.

project name=tests.webservices default=deploy
basedir=.

property name=tomcat.home
value=D:/apps/dev/apache/jakarta/tomcat/5.0.28 /


!-- Configure the context path for this application
--
property name=path value=/tstws /

!-- Configure properties to access the Manager
application --
property name=url
value=http://localhost:8080/manager; /
property name=username value=admin /
property name=password value=admin /

path id=def.classpath
fileset dir=${tomcat.home}/server/lib
include name=**/*.jar /
/fileset
/path

!-- Configure the custom Ant tasks for the Manager application --
taskdef name=deploy
classname=org.apache.catalina.ant.DeployTask
classpathref=def.classpath /
taskdef name=reload
classname=org.apache.catalina.ant.ReloadTask
classpathref=def.classpath /
taskdef name=undeploy
classname=org.apache.catalina.ant.UndeployTask
classpathref=def.classpath /

!-- Executable Targets --

target name=deploy description=Install web
application
deploy url=${url} username=${username}
password=${password}
config=file:///h:/eclipse/workspace/tests.webservices/META-INF/context.xml
path=/tstws localwar=file:///h:/eclipse/workspace/tests.webservices
/
/target

target name=reload description=Reload web
application
reload url=${url} username=${username}
password=${password} path=${path} /
/target

target name=undeploy description=Remove web
application
undeploy url=${url} username=${username}
password=${password} path=${path} /
/target

/project

 --- Phillip Qin [EMAIL PROTECTED] a écrit
: 
 If you use Tomcat Manager or catalina-ant.jar,
 package context into META-INF
 in the war file.
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: October 19, 2004 3:44 PM
 To: [EMAIL PROTECTED]
 Subject: Deployment with tomcat 5
 
 
 How can I indicate to tomcat 5 for reading my
 context.xml for a host in an outside path of $catalina_home/conf, for
 instance in d:\mytomcat\hosts\webapps?
 
 =
 Patrick GIRY
 e-mail : [EMAIL PROTECTED]
 
 
   
 
   
   
 Vous manquez d'espace pour stocker vos mails ?
 Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
 Créez votre Yahoo! Mail sur
 http://fr.benefits.yahoo.com/
 
 Le nouveau Yahoo! Messenger est arrivé ! Découvrez
 toutes les nouveautés
 pour dialoguer instantanément avec vos amis. A
 télécharger gratuitement sur
 http://fr.messenger.yahoo.com
 

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

=
Patrick GIRY
e-mail : [EMAIL PROTECTED]






Vous manquez d'espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés
pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur
http

RE: adding HTTP headers for all responses in web application

2004-10-20 Thread Phillip Qin
Have you thought of filter?

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED] 
Sent: October 20, 2004 10:40 AM
To: [EMAIL PROTECTED]
Subject: adding HTTP headers for all responses in web application


Hi,
It there any easy way to add few HTTP headers to ALL responses within one
web application? What I'm looking is to prevent caching of error pages. I
thought it will be greate to add those header:

  CacheControl = no-cache
  Pragma, no-cache
  Expires = -1

to all my servlet/JSP responces. But I'd rather do it in one place and not
go through all serlvets/JSPs in .war file.

Thanks,
Mark



___
Do you Yahoo!?
Declare Yourself - Register online to vote today! http://vote.yahoo.com

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


!DSPAM:4176790a113211502619581!


RE: adding HTTP headers for all responses in web application

2004-10-20 Thread Phillip Qin
Both servlet spec 2.3 and book more servlets and javaserver pages are good
references. Or search mail archive. It's easy to implement.

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED] 
Sent: October 20, 2004 10:57 AM
To: 'Tomcat Users List'
Subject: RE: adding HTTP headers for all responses in web application


Sound like a good idea! Can you please point to a good filters-HOWTO?
--- Phillip Qin [EMAIL PROTECTED] wrote:

 Have you thought of filter?
 
 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]
 Sent: October 20, 2004 10:40 AM
 To: [EMAIL PROTECTED]
 Subject: adding HTTP headers for all responses in web application
 
 
 Hi,
 It there any easy way to add few HTTP headers to ALL responses within 
 one web application? What I'm looking is to prevent caching of error
 pages. I
 thought it will be greate to add those header:
 
   CacheControl = no-cache
   Pragma, no-cache
   Expires = -1
 
 to all my servlet/JSP responces. But I'd rather do it in one place and 
 not go through all serlvets/JSPs in .war file.
 
 Thanks,
 Mark
 
 
   
 ___
 Do you Yahoo!?
 Declare Yourself - Register online to vote today! 
 http://vote.yahoo.com
 

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




___
Do you Yahoo!?
Declare Yourself - Register online to vote today! http://vote.yahoo.com

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


!DSPAM:41767cc6114021556718639!


Tomcat Manager Status

2004-10-20 Thread Phillip Qin
Could any insider confirm StatusServlet doesn't render /manager/status page
using xform.xsl? There are xform.xml and status.xsd but I couldn't find any
reference to them in the servlet. It still uses PrintWriter.




Regards,
 
 
PQ
 
Going to war for peace is like having sex for virginity


RE: Tomcat Manager Status

2004-10-20 Thread Phillip Qin
Don't bother. It's in Constants.



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 20, 2004 11:57 AM
To: '[EMAIL PROTECTED]'
Subject: Tomcat Manager Status


Could any insider confirm StatusServlet doesn't render /manager/status page
using xform.xsl? There are xform.xml and status.xsd but I couldn't find any
reference to them in the servlet. It still uses PrintWriter.




Regards,
 
 
PQ
 
Going to war for peace is like having sex for virginity


!DSPAM:41768adc120321096024065!


RE: filter config cause startup crash on Tomcat 5

2004-10-19 Thread Phillip Qin
Check the order in web.xml.



-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: October 19, 2004 4:19 PM
To: [EMAIL PROTECTED]
Subject: filter config cause startup crash on Tomcat 5


I have created a DetectBrowser servlet to not allow certain browsers into 
the sillyApe directory/url.
I wanted to use it as a filter rather then having to call it in each jsp 
since people can get to almost every page in the sillyApe directory without 
going through a single page, just thought it would be easier, as well as 
other issues.  Anyway I am trying to figure out why I get a SEVERE: Error 
filterStart from Tomcat when I start it back up.

HELP!!!

filter
filter-nameDetectBrowser/filter-name
filter-classcom.dtribe.logic.DetectBrowser/filter-class
/filter
filter-mapping
filter-nameDetectBrowser/filter-name
url-pattern/sillyApe/url-pattern
/filter-mapping


HELP???

_
Powerful Parental Controls Let your child discover the best the Internet has

to offer. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


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


!DSPAM:417576cc321718886279614!


RE: Deployment with tomcat 5

2004-10-19 Thread Phillip Qin
If you use Tomcat Manager or catalina-ant.jar, package context into META-INF
in the war file.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: October 19, 2004 3:44 PM
To: [EMAIL PROTECTED]
Subject: Deployment with tomcat 5


How can I indicate to tomcat 5 for reading my
context.xml for a host in an outside path of $catalina_home/conf, for
instance in d:\mytomcat\hosts\webapps?

=
Patrick GIRY
e-mail : [EMAIL PROTECTED]






Vous manquez d'espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés
pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur
http://fr.messenger.yahoo.com

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


!DSPAM:41756e9e316141709397428!


RE: filter config cause startup crash on Tomcat 5

2004-10-19 Thread Phillip Qin
Try url-pattern /s.../*

-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED] 
Sent: October 19, 2004 4:31 PM
To: [EMAIL PROTECTED]
Subject: RE: filter config cause startup crash on Tomcat 5


What order should it come in.
Its near the top of the list.

From: Phillip Qin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: filter config cause startup crash on Tomcat 5
Date: Tue, 19 Oct 2004 16:26:39 -0400

Check the order in web.xml.



-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED]
Sent: October 19, 2004 4:19 PM
To: [EMAIL PROTECTED]
Subject: filter config cause startup crash on Tomcat 5


I have created a DetectBrowser servlet to not allow certain browsers 
into the sillyApe directory/url. I wanted to use it as a filter rather 
then having to call it in each jsp since people can get to almost every 
page in the sillyApe directory without going through a single page, 
just thought it would be easier, as well as other issues.  Anyway I am 
trying to figure out why I get a SEVERE: Error filterStart from Tomcat 
when I start it back up.

HELP!!!

filter
filter-nameDetectBrowser/filter-name
filter-classcom.dtribe.logic.DetectBrowser/filter-class
/filter
filter-mapping
filter-nameDetectBrowser/filter-name
url-pattern/sillyApe/url-pattern
/filter-mapping


HELP???

_
Powerful Parental Controls Let your child discover the best the 
Internet
has

to offer. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034S
U=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
   Start enjoying all the benefits of MSN(r) Premium right now and get the
first two months FREE*.


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




_
Take advantage of powerful junk e-mail filters built on patented
Microsoft(r) 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


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


!DSPAM:4175798a322115253112009!


RE: Tomcat Ant Tasks

2004-10-18 Thread Phillip Qin
This is my ant task

deploy
url=${dev.manager}
username=${username}
password=${password}
path=${context.path}
war=${war.url}
update=true/

No need to define config. On *nix box, war.url is file:/your/path/to/war, on
win32 box, war.url is file:/c:/your/path/to/war.


Context will always be dropped off conf/${engine}/${host} as
${your.context}.xml


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Ant Tasks


I am trying to use Tomcat Ant tasks to deploy my application while testing.
The only part I am having a problem with is trying to deploy the context
config file.  Below is my task

 

target name=deploy-local depends=war

deploy

url=${tomcat.local.url}

username=${username}

password=${password}

path=${path}

update=true 

config=//$(basedir}/resources/anykey.xml

war=//${basedir}/build/${deploy.name}/

/target

 

The war file is deployed just fine, but my config file goes nowhere.  ANT
claims everything was successful.  Does anyone have any ideas about this?

 

Thanks

 

Gregg Bolinger



!DSPAM:4173e0ac132939060421364!


RE: Tomcat Ant Tasks

2004-10-18 Thread Phillip Qin
Pack your context into war, as META-INF/context.xml using ant jar command.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:14 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


Then I am confused.  I have a config that contains my apps context where I
have defined my datasource for JNDI etc.  If I don't define config in the
deploy task, a default context is created, which I don't want.

Also, the war deploys just fine, like I said.  So I don't have a problem
deploying the WAR file.  I am only having a problem getting my custom
context config to get deployed as well.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:08 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

This is my ant task

deploy
url=${dev.manager}
username=${username}
password=${password}
path=${context.path}
war=${war.url}
update=true/

No need to define config. On *nix box, war.url is file:/your/path/to/war, on
win32 box, war.url is file:/c:/your/path/to/war.


Context will always be dropped off conf/${engine}/${host} as
${your.context}.xml


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Ant Tasks


I am trying to use Tomcat Ant tasks to deploy my application while testing.
The only part I am having a problem with is trying to deploy the context
config file.  Below is my task

 

target name=deploy-local depends=war

deploy

url=${tomcat.local.url}

username=${username}

password=${password}

path=${path}

update=true 

config=//$(basedir}/resources/anykey.xml

war=//${basedir}/build/${deploy.name}/

/target

 

The war file is deployed just fine, but my config file goes nowhere.  ANT
claims everything was successful.  Does anyone have any ideas about this?

 

Thanks

 

Gregg Bolinger






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


!DSPAM:4173ebd5138921864919853!


RE: Tomcat Ant Tasks

2004-10-18 Thread Phillip Qin
I think it is part of sub's jar spec.

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:29 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


PERFET!  Thanks.  Now, is that in the docs anywhere?  If it's not, it should
be.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:16 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

Pack your context into war, as META-INF/context.xml using ant jar command.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:14 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


Then I am confused.  I have a config that contains my apps context where I
have defined my datasource for JNDI etc.  If I don't define config in the
deploy task, a default context is created, which I don't want.

Also, the war deploys just fine, like I said.  So I don't have a problem
deploying the WAR file.  I am only having a problem getting my custom
context config to get deployed as well.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:08 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

This is my ant task

deploy
url=${dev.manager}
username=${username}
password=${password}
path=${context.path}
war=${war.url}
update=true/

No need to define config. On *nix box, war.url is file:/your/path/to/war, on
win32 box, war.url is file:/c:/your/path/to/war.


Context will always be dropped off conf/${engine}/${host} as
${your.context}.xml


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Ant Tasks


I am trying to use Tomcat Ant tasks to deploy my application while testing.
The only part I am having a problem with is trying to deploy the context
config file.  Below is my task

 

target name=deploy-local depends=war

deploy

url=${tomcat.local.url}

username=${username}

password=${password}

path=${path}

update=true 

config=//$(basedir}/resources/anykey.xml

war=//${basedir}/build/${deploy.name}/

/target

 

The war file is deployed just fine, but my config file goes nowhere.  ANT
claims everything was successful.  Does anyone have any ideas about this?

 

Thanks

 

Gregg Bolinger






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


!DSPAM:4173ef67139476524431821!


RE: Tomcat Ant Tasks

2004-10-18 Thread Phillip Qin
Or documented in tomcat doc? Sorry, I forgot.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:31 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


I think it is part of sub's jar spec.

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:29 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


PERFET!  Thanks.  Now, is that in the docs anywhere?  If it's not, it should
be.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:16 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

Pack your context into war, as META-INF/context.xml using ant jar command.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:14 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


Then I am confused.  I have a config that contains my apps context where I
have defined my datasource for JNDI etc.  If I don't define config in the
deploy task, a default context is created, which I don't want.

Also, the war deploys just fine, like I said.  So I don't have a problem
deploying the WAR file.  I am only having a problem getting my custom
context config to get deployed as well.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:08 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

This is my ant task

deploy
url=${dev.manager}
username=${username}
password=${password}
path=${context.path}
war=${war.url}
update=true/

No need to define config. On *nix box, war.url is file:/your/path/to/war, on
win32 box, war.url is file:/c:/your/path/to/war.


Context will always be dropped off conf/${engine}/${host} as
${your.context}.xml


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Ant Tasks


I am trying to use Tomcat Ant tasks to deploy my application while testing.
The only part I am having a problem with is trying to deploy the context
config file.  Below is my task

 

target name=deploy-local depends=war

deploy

url=${tomcat.local.url}

username=${username}

password=${password}

path=${path}

update=true 

config=//$(basedir}/resources/anykey.xml

war=//${basedir}/build/${deploy.name}/

/target

 

The war file is deployed just fine, but my config file goes nowhere.  ANT
claims everything was successful.  Does anyone have any ideas about this?

 

Thanks

 

Gregg Bolinger






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





!DSPAM:4173efd1139771216089279!


RE: Tomcat Ant Tasks

2004-10-18 Thread Phillip Qin
Don't know if context.xml page is broken, however, there are 2 attributes
that do not have name (between swallowOutput and useNaming).

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 18, 2004 12:58 PM
To: Tomcat Users List
Subject: RE: Tomcat Ant Tasks



Hi,

Do you have a specific link?  What is our docs?

Yes, I have specific links:
The Context configuration reference:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html.

The Deployment section of the Application Development guide:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/deployment.html

The Tomcat FAQ's Deployment section:
http://jakarta.apache.org/tomcat/faq/deployment.html

And of course numerous mailing list archive references and explanations,
external references obtained via Google, and others.

Our docs are the Tomcat documentation.  Our implies ownership by the
Tomcat team.  As opposed to the many external docs that exist for Tomcat,
some of which also covering this topic.

Yoav



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 11:33 AM
To: Tomcat Users List
Subject: RE: Tomcat Ant Tasks


Hi,
It's not part of the JAR or WAR specs, it's a tomcat-specific feature, 
and it's in our docs.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 12:32 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

Or documented in tomcat doc? Sorry, I forgot.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: October 18, 2004 12:31 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


I think it is part of sub's jar spec.

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
Sent: October 18, 2004 12:29 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


PERFET!  Thanks.  Now, is that in the docs anywhere?  If it's not, it 
should be.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 11:16 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

Pack your context into war, as META-INF/context.xml using ant jar
command.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
Sent: October 18, 2004 12:14 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks


Then I am confused.  I have a config that contains my apps context
where I
have defined my datasource for JNDI etc.  If I don't define config in
the
deploy task, a default context is created, which I don't want.

Also, the war deploys just fine, like I said.  So I don't have a
problem
deploying the WAR file.  I am only having a problem getting my custom 
context config to get deployed as well.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 11:08 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat Ant Tasks

This is my ant task

deploy
  url=${dev.manager}
  username=${username}
  password=${password}
  path=${context.path}
  war=${war.url}
  update=true/

No need to define config. On *nix box, war.url is
file:/your/path/to/war,
on
win32 box, war.url is file:/c:/your/path/to/war.


Context will always be dropped off conf/${engine}/${host} as 
${your.context}.xml


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
Sent: October 18, 2004 11:26 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Ant Tasks


I am trying to use Tomcat Ant tasks to deploy my application while
testing.
The only part I am having a problem with is trying to deploy the
context
config file.  Below is my task



target name=deploy-local depends=war

deploy

url=${tomcat.local.url}

username=${username}

password=${password}

path=${path}

update=true

config=//$(basedir}/resources/anykey.xml

war=//${basedir}/build/${deploy.name}/

/target



The war file is deployed just fine, but my config file goes nowhere.
ANT
claims everything was successful.  Does anyone have any ideas about
this?



Thanks



Gregg Bolinger






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





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









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

RE: Connection Pooling using JNDI DataSource

2004-10-15 Thread Phillip Qin
I guess the issue is with compilation or JNI.

-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED] 
Sent: October 15, 2004 5:13 AM
To: Tomcat Users List
Subject: RE: Connection Pooling using JNDI DataSource


uh ...

it works fine from our side. But as i saw so many posts concerning that
point i was really puzzled it was so simple to set up :-)


-Message d'origine-
De : Steve Kirk [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 13 octobre 2004 16:56
À : 'Tomcat Users List'
Objet : RE: Connection Pooling using JNDI DataSource



As Yoav says, it works, and is very easy to use once you have it configured.

But note that lots of people seem to have trouble getting the config right.
I was one of those.  You have to persevere a bit.  The problem I had was
that there are lots of pages on lots of websites that describe how to do it,
and each page explains one of a number of different approaches (there is
more than one way to do it, besides the one you linked to, but don't worry
about that for now - the approach on that page is fine).  Stick carefully to
the set of instructions in your link, and it should work.

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday 13 October 2004 15:26
 To: Tomcat Users List
 Subject: RE: Connection Pooling using JNDI DataSource
 
 
 
 Hi,
 Yeah, it works.  Note that your choice of words is a bit
 misleading: you
 don't configure anything in web.xml, you only declare a resource
 reference there.  The declaration and configuration of the resource
 itself is all in server.xml.
 
 Yoav Shapira http://www.yoavshapira.com
  
 
 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 13, 2004 10:33 AM
 To: Tomcat Users List
 Subject: Connection Pooling using JNDI DataSource
 
 Hi all,
 
 Could you please confirm me that when using JNDI DataSource described
 there
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasour
 ce-example
 s-
 howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurat
 ions (just
 defining the Datasource in your server.xml file and configuring the 
 resource in web.xml) and adding the code below in every page
 (or better
 in
 a bean) i would get all the DBCP functionalities.
 
 So for instance, each time i'll made a getConnection i will use a 
 connection from the pool and not creating one.
 
 
 Context initContext = new InitialContext();
 Context envContext  = (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle);
 Connection conn = ds.getConnection();
 
 seems to be too simple to work this way, isn't it  :-)
 
 
 Thanks
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential
 business communication, and may contain information that is 
 confidential, proprietary and/or privileged.  This e-mail is 
 intended only for the individual(s) to whom it is addressed, 
 and may not be saved, copied, printed, disclosed or used by 
 anyone else.  If you are not the(an) intended recipient, 
 please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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


!DSPAM:416f927827771507119519!


Tomcat 5.0.28 + Ant deploy/undeploy task

2004-10-15 Thread Phillip Qin
I am testing Tomcat 5.0.28 on Windows 2000 Pro. I use catalina-ant deploy
task to deploy my webapp war. Where did this exception come from? My web
application runs fine.

stdout.log
15-Oct-2004 3:25:48 PM org.apache.catalina.startup.HostConfig deployWARs
WARNING: Exception while expanding web application archive ROOT.war
15-Oct-2004 3:25:49 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:/C:/Program
Files/Apache Software Foundation/Tomcat
5.0/conf/Catalina/investments.localhost/ROOT.xml
15-Oct-2004 3:25:49 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application from URL jar:file:/C:/Program Files/Apache
Software Foundation/Tomcat
5.0/webapps/www.investments.shareowner.com/ROOT.war!/
initializing http://www.investments.shareowner.com...
initialized http://www.investments.shareowner.com
15-Oct-2004 3:26:14 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina\investments.localhost\ROOT.xml
15-Oct-2004 3:26:14 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:7
6)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:488)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:80
0)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1619)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1628)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont
ainerBase.java:1608)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.IllegalStateException: Context path  is already in use
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.
java:896)
... 30 more
15-Oct-2004 3:26:14 PM org.apache.catalina.startup.HostConfig
deployDescriptors
SEVERE: Error deploying configuration descriptor ROOT.xml
java.io.IOException: java.lang.IllegalStateException: Context path  is
already in use
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:494)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:80
0)
at

RE: Tomcat 5.0.28 + Ant deploy/undeploy task

2004-10-15 Thread Phillip Qin
Noop. Before I run deploy task through ant, I checked several directories.

conf/Catalina/investments.localhost: no ROOT.xml
webapps/www.investments.shareowner.com: no ROOT.war nor ROOT/
work/Catalina/www.investments.shareowner.com: no _/

I suspect that Tomcat Manager is deploying the same application twice, one
for context.xml, one for war.

In host, I set autoDeploy, deployXML and unpackWar to true.


Any suggestion?



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 15, 2004 3:49 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.0.28 + Ant deploy/undeploy task



Hi,
Looks like you already have an app deployed at the  context path.

Yoav Shapira http://www.yoavshapira.com
 

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 3:46 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat 5.0.28 + Ant deploy/undeploy task

I am testing Tomcat 5.0.28 on Windows 2000 Pro. I use catalina-ant
deploy
task to deploy my webapp war. Where did this exception come from? My
web
application runs fine.

stdout.log
15-Oct-2004 3:25:48 PM org.apache.catalina.startup.HostConfig
deployWARs
WARNING: Exception while expanding web application archive ROOT.war 
15-Oct-2004 3:25:49 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:/C:/Program 
Files/Apache Software Foundation/Tomcat 
5.0/conf/Catalina/investments.localhost/ROOT.xml
15-Oct-2004 3:25:49 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application from URL jar:file:/C:/Program
Files/Apache
Software Foundation/Tomcat 
5.0/webapps/www.investments.shareowner.com/ROOT.war!/
initializing http://www.investments.shareowner.com...
initialized http://www.investments.shareowner.com
15-Oct-2004 3:26:14 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program 
Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\investments.localhost\ROOT.xml
15-Oct-2004 3:26:14 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception 
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
9
)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
l
.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:
216)
   at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
   at org.apache.commons.digester.Rule.end(Rule.java:276)
   at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
   at 
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.j
ava:
7
6)
   at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Un
know
n
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
spat
c
her.dispatch(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
own
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
   at
org.apache.commons.digester.Digester.parse(Digester.java:1567)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeplo
yer.
j
ava:488)
   at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
   at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.jav
a:48
3
)
   at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
   at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:3
27)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
r
t.java:119)
   at 
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.ja
va:8
0
0)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.pro
cess
C
hildren(ContainerBase.java:1619)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.pro
cess
C
hildren(ContainerBase.java:1628)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run
(Con
t
ainerBase.java:1608)
   at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.IllegalStateException: Context path  is already in
use
   at 
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDepl
oyer
.
java:896)
   ... 30 more
15-Oct-2004 3:26:14

RE: Tomcat 5.0.28 + Ant deploy/undeploy task

2004-10-15 Thread Phillip Qin
You are right. I copied config from my Tomcat 4.1 server.xml. After I
changed autoDeploy to false, my deployment no longer throws exception. One
quick question regarding Tomcat Manager application, I noticed that in
Tomcat 4, war is deployed to work dir while in Tomcat 5 war is in webapps,
are you guys changing the deployment structure?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 15, 2004 4:12 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.0.28 + Ant deploy/undeploy task



Hi,

I suspect that Tomcat Manager is deploying the same application twice,
one
for context.xml, one for war.

In host, I set autoDeploy, deployXML and unpackWar to true.

Any suggestion?

You covered it above.  With autoDeploy and the rest set to true, it'll try
to deploy twice, and that's why you're getting the path already used
error.  Turn off autoDeploy.

Yoav



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


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


!DSPAM:41702f5699081735215778!


RE: mod_jk2 Ready/Recommended For Production?

2004-10-14 Thread Phillip Qin
Dangerous.

You should run tomcat as a non-root user, no login, no shell. The reason
Apache is involved is because we want Apache to serve static pages.

-Original Message-
From: Mike Millson [mailto:[EMAIL PROTECTED] 
Sent: October 14, 2004 9:58 AM
To: Tomcat Users List
Subject: Re: mod_jk2 Ready/Recommended For Production?


On Thu, 2004-10-14 at 05:56, Antony Paul wrote:
 Do you mean Apache dont have any security holes. I dont know about 
 hacking a system. But in terms of security Tomcat is far better than 
 Apache since it dont have any security vulnerabilities.
 

But if you run tomcat standalone, you have to run tomcat as root. Apache
does not run as root, so if you run Apache in front of tomcat, you can avoid
exposing the root account.

Mike


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


!DSPAM:416e85e7242988496385758!


RE: Sun J2SE JVM + tomcat + Debian??

2004-10-14 Thread Phillip Qin
Sorry, but what is jsvc?

-Original Message-
From: Horacio de Oro [mailto:[EMAIL PROTECTED] 
Sent: October 14, 2004 1:47 AM
To: Tomcat Users List
Subject: Re: Sun J2SE JVM + tomcat + Debian??


Hi!

Just to add some info:

I've found some problem with Debian Woody + Sun 1.4.2 JDK... at least 
Tomcat 5 started up from jsvc fail at File.mkdirs (more info on 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg131293.html 
and http://issues.apache.org/bugzilla/show_bug.cgi?id=30177)...

These problems doesn't exist on Debian versions others than Woody (to 
solve that, you should compile jsvc with -lpthread, so, I think it is 
   a Debian Woody libc + Sun JVM only issue)...

Horacio


Jeff Bowden wrote:
 Is anyone using tomcat on debian with a Sun JVM?  We've just
 experimented with running it on bleeding edge Gentoo and Debian boxes as 
 well as a trailing edge Redhat 7.3 box.  Of the three, Debian is the 
 only one where things don't go quite right.  It sort of works but it 
 never spawns any threads and consquently doesn't perform very well on 
 our 4 cpu box.  We've gone over the configurations in these pretty 
 carefully and it doesn't seem to be a config issue.
 
 We've tried all four combinations of j2se 1.4.2, j2se 1.5, tomcat4 and
 tomcat5 always with the same result.  I also tried switching between 
 2.6.7 and 2.6.8 kernel.  I'm guessing it's a library issue, probably 
 libc, but I don't know how to tell.
 
 I realize that this is the tomcat user list and not the Sun 
 Java/Debian
 support list so if you just want to tell me where to go I would be happy 
 with that :-)
 


-- 
El éxito debe medirse, no por la posición
a la que ha llegado una persona, sino por
su esfuerzo por triunfar.

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


!DSPAM:416e12e9194121820423095!


RE: Sun J2SE JVM + tomcat + Debian??

2004-10-14 Thread Phillip Qin
Find out jsvc. It's new, not in 4.1. Why don't you use startup.sh instead?

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 14, 2004 10:16 AM
To: 'Tomcat Users List'
Subject: RE: Sun J2SE JVM + tomcat + Debian??


Sorry, but what is jsvc?

-Original Message-
From: Horacio de Oro [mailto:[EMAIL PROTECTED] 
Sent: October 14, 2004 1:47 AM
To: Tomcat Users List
Subject: Re: Sun J2SE JVM + tomcat + Debian??


Hi!

Just to add some info:

I've found some problem with Debian Woody + Sun 1.4.2 JDK... at least 
Tomcat 5 started up from jsvc fail at File.mkdirs (more info on 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg131293.html 
and http://issues.apache.org/bugzilla/show_bug.cgi?id=30177)...

These problems doesn't exist on Debian versions others than Woody (to 
solve that, you should compile jsvc with -lpthread, so, I think it is 
   a Debian Woody libc + Sun JVM only issue)...

Horacio


Jeff Bowden wrote:
 Is anyone using tomcat on debian with a Sun JVM?  We've just 
 experimented with running it on bleeding edge Gentoo and Debian boxes 
 as well as a trailing edge Redhat 7.3 box.  Of the three, Debian is 
 the only one where things don't go quite right.  It sort of works but 
 it never spawns any threads and consquently doesn't perform very well 
 on our 4 cpu box.  We've gone over the configurations in these pretty 
 carefully and it doesn't seem to be a config issue.
 
 We've tried all four combinations of j2se 1.4.2, j2se 1.5, tomcat4 and 
 tomcat5 always with the same result.  I also tried switching between 
 2.6.7 and 2.6.8 kernel.  I'm guessing it's a library issue, probably 
 libc, but I don't know how to tell.
 
 I realize that this is the tomcat user list and not the Sun
 Java/Debian
 support list so if you just want to tell me where to go I would be happy 
 with that :-)
 


-- 
El éxito debe medirse, no por la posición
a la que ha llegado una persona, sino por
su esfuerzo por triunfar.

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





!DSPAM:416e8abf247361853017648!


RE: Can apache deal with static content in packed application(war ,ear) with jk2 and jboss/tomcat

2004-10-13 Thread Phillip Qin
Sure you can let Apache handle static files. Just setup httpd.conf.

The problem that I have is when I deploy ROOT application in Tomcat, Apache
is useless, any static files, cgi scripts etc. will be handled by Tomcat.

-Original Message-
From: Kurt Zhou [mailto:[EMAIL PROTECTED] 
Sent: October 13, 2004 5:35 AM
To: [EMAIL PROTECTED]
Subject: Can apache deal with static content in packed application(war,ear)
with jk2 and jboss/tomcat


In jboss3.2.1-tomcat4.1.24 , deply a ear package usally cause  war 
was deployed in a temporary  directory,and jsp will be compiled into a
temproray work directory. For this scenario,  can the images or static html
files be dealed with by Apache server?  For a unpacked web application ,we
can mapping the application path to apache path, for examples images path in
web application,and we can config our servlet or jsp file to be dealed with
by tomcat. But for a packed application, is it useful?  How can we do the
mapping for the static content in a packed application? or they are dealed
with by tomcat and return the result to apache, and then apache response  to
the client response?

Thanks


Kurt

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


!DSPAM:416cf6de83376299862908!


RE: DataSourceRealm vs. Administration Tool - A bug?

2004-10-13 Thread Phillip Qin
4.1.x is still a very stable release. I reluctantly upgrade to 5.x until
recently that I am having OutOfMemory issues with Tomcat Manager. I extended
Manager by myself and patch my CGIServlet to handle 302 redirect. It will be
a bug pain for me to upgrade.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: October 13, 2004 10:22 AM
To: Tomcat Users List
Subject: RE: DataSourceRealm vs. Administration Tool - A bug?



Hi,
Thank you for posting your solutions -- hopefully others find it useful.

Surely if this is not fixed in Tocmat 4.1.31 it should be considered as
a
fix necessary for 4.1.32 (when does the 4.1.x line end?).

See, this exactly was why I didn't want a 4.1.31 release.  For the vast
majority of Tomcat developers, the 4.1.x line ended a long time ago. But
recently a couple of committers wanted to do a 4.1.31 maintenance release.
I and others argued against it, but we lost mostly due to a procedural
constraint in how the ASF operates.

So now you have the 4.1.31 release, and the perception that the 4.1 line is
active.  It's not.  Anyone who can should upgrade to 5.0 ASAP.  This has
been the message for a while, and it continues to be the message now.  As
you see, no one else answered this thread except me, and I only answered to
this effect, not helping you with the actual problem (because I don't know
the answer and I don't have time to waste on 4.1, but thankfully you've
solved it yourself by now).

Yoav   



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


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


!DSPAM:416d3a2689573911934!


RE: Locked jar during Ant undeploy on Tomcat 5.5.3

2004-10-13 Thread Phillip Qin
Are you doing undeploy or remove?

-Original Message-
From: Derek Mahar [mailto:[EMAIL PROTECTED] 
Sent: October 13, 2004 3:20 PM
To: [EMAIL PROTECTED]
Subject: Locked jar during Ant undeploy on Tomcat 5.5.3


After executing several Ant undeploys, I've noticed that Tomcat 5.5.3 is
locking jar files in WEB-INF/lib, preventing complete application removal.
Has anyone else encountered this behaviour?

I remember that in very early releases, Tomcat 5.0 exhibited similar
behaviour, but in later releases this behaviour went away.  Has it crept
back into 5.5?

Configuration:

Tomcat 5.5.3
JRE 1.5.0
Windows XP SP2

Derek


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


!DSPAM:416d8250141351446164617!


RE: Sun J2SE JVM + tomcat + Debian??

2004-10-13 Thread Phillip Qin
My config

Dual-cpu
Debian 3.0-woody
Kernel 2.4.x
Sun jdk 1.4.2_05
Tomcat 4.1.30
Apache 2.0.52

Our servers are running pretty well.



-Original Message-
From: Jeff Bowden [mailto:[EMAIL PROTECTED] 
Sent: October 13, 2004 4:34 PM
To: [EMAIL PROTECTED]
Subject: Sun J2SE JVM + tomcat + Debian??


Is anyone using tomcat on debian with a Sun JVM?  We've just 
experimented with running it on bleeding edge Gentoo and Debian boxes as 
well as a trailing edge Redhat 7.3 box.  Of the three, Debian is the 
only one where things don't go quite right.  It sort of works but it 
never spawns any threads and consquently doesn't perform very well on 
our 4 cpu box.  We've gone over the configurations in these pretty 
carefully and it doesn't seem to be a config issue.

We've tried all four combinations of j2se 1.4.2, j2se 1.5, tomcat4 and 
tomcat5 always with the same result.  I also tried switching between 
2.6.7 and 2.6.8 kernel.  I'm guessing it's a library issue, probably 
libc, but I don't know how to tell.

I realize that this is the tomcat user list and not the Sun Java/Debian 
support list so if you just want to tell me where to go I would be happy 
with that :-)


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


!DSPAM:416d912c147098296419491!


<    1   2   3   4   >