RE: Manager app in 4.1.27 behaves differently to 4.1.18

2003-11-26 Thread Tom Lyle
Thanks for confirming that. I just tried setting the unpackWARs to false and
now 4.1.27 behaves just like 4.1.18. I did think i was going mad
though..

 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]
 Sent: 25 November 2003 17:59
 To: Tomcat Users List
 Subject: RE: Manager app in 4.1.27 behaves differently to 4.1.18


 I believe the point that Yoav was going to make was that
 Tomcat 4.1.18 doesn't honor the unpackWARs Host setting when
 using the Manager's deploy function.  Thus it always serves
 such a webapp from the WAR, for which the Manager undeploy
 works.  Tomcat 4.1.27 does honor the unpackWARs setting,
 so the same deploy command results in an auto-expanded
 webapp, if unpackWARs=true.

 I believe the Manager undeploy command in both 4.1.18 and 4.1.27
 has trouble removing an auto-expanded WAR.  If you set
 unpackWARs=false in 4.1.27, you would get the same behavior
 with respect to deploying and undeploying that you saw in
 Tomcat 4.1.18.

 Cheers,
 Larry

  -Original Message-
  From: Tom Lyle [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, November 25, 2003 10:18 AM
  To: Tomcat Users List
  Subject: RE: Manager app in 4.1.27 behaves differently to 4.1.18
 
 
  Hi, I've reduced my server.xml down to the bare minumum of
  ROOT, manager 
  admin contexts
 
  I use a copy of the same server.xml in an instance of Tomcat
  4.1.27  Tomcat
  4.1.18 and
  use the org.apache.catalina.ant.DeployTask to deploy my war
  file. In 4.1.18
  it unpacks it into
  \work\localhost\myapp
  in 4.1.27 it unpacks it into \webapps\myapp (it also creates
  an empty myapp
  dir in \work\localhost )
 
  in 4.1.27 the UndeployTask will not work because it can't
  remove the myapp
  dir in the webapp directory.
 
  The server.xml i used in both cases is attached bellow
 
  I'm totally at a loss as to whats going on
 
  Tom
 
  ?xml version='1.0' encoding='utf-8'?
  Server className=org.apache.catalina.core.StandardServer debug=0
  port=8005 shutdown=SHUTDOWN
Listener
  className=org.apache.catalina.mbeans.ServerLifecycleListener
  debug=0/
Listener
  className=org.apache.catalina.mbeans.GlobalResourcesLifecycle
  Listener
  debug=0/
GlobalNamingResources
  Environment name=simpleValue override=true
  type=java.lang.Integer
  value=30/
  Resource auth=Container description=User database that can be
  updated and saved name=UserDatabase scope=Shareable
  type=org.apache.catalina.UserDatabase/
  ResourceParams name=UserDatabase
parameter
  namefactory/name
 
  valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
/parameter
parameter
  namepathname/name
  valueconf/tomcat-users.xml/value
/parameter
  /ResourceParams
/GlobalNamingResources
Service
  className=org.apache.catalina.core.StandardService debug=0
  name=Tomcat-Standalone
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  acceptCount=100 bufferSize=2048 connectionTimeout=2
  debug=9
  disableUploadTimeout=true enableLookups=true maxProcessors=75
  minProcessors=5 port=8080
  protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol
  proxyPort=0 redirectPort=8443 scheme=http secure=false
  tcpNoDelay=true useURIValidationHack=false
Factory
  className=org.apache.catalina.net.DefaultServerSocketFactory/
  /Connector
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  acceptCount=10 bufferSize=2048 connectionTimeout=2 debug=0
  disableUploadTimeout=false enableLookups=true maxProcessors=75
  minProcessors=5 port=8009
  protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
  proxyPort=0 redirectPort=8443 scheme=http secure=false
  tcpNoDelay=true useURIValidationHack=false
Factory
  className=org.apache.catalina.net.DefaultServerSocketFactory/
  /Connector
  Engine
  className=org.apache.catalina.core.StandardEngine debug=0
  defaultHost=localhost
  mapperClass=org.apache.catalina.core.StandardEngineMapper
  name=Standalone
Host className=org.apache.catalina.core.StandardHost
  appBase=webapps autoDeploy=true
  configClass=org.apache.catalina.startup.ContextConfig
  contextClass=org.apache.catalina.core.StandardContext debug=0
  deployXML=true
  errorReportValveClass=org.apache.catalina.valves.ErrorReportValve
  liveDeploy=true
  mapperClass=org.apache.catalina.core.StandardHostMapper
  name=localhost unpackWARs=true
  Context className=org.apache.catalina.core.StandardContext
  cachingAllowed=true
  charsetMapperClass=org.apache.catalina.util.CharsetMapper
  cookies=true
  crossContext=false debug=0 displayName=Tomcat Administration
  Application docBase=../server/webapps/admin
  mapperClass=org.apache.catalina.core.StandardContextMapper
  path=/admin
  privileged=true reloadable=false swallowOutput=false
  useNaming=true
  wrapperClass=org.apache.catalina.core.StandardWrapper
Logger className

Manager app in 4.1.27 behaves differently to 4.1.18

2003-11-25 Thread Tom Lyle
Hi there,

I'm having a slightly annoying problem using the Tomcat Manager application.
I have a webservices web application that i deploy using an Ant script and
the org.apache.catalina.ant.DeployTask  UndeployTask. On Tomcat 4.1.18 this
works fine, I package the application up as a war file and can deploy,
undeploy and redeploy with no problems - the war file gets unpacked into
{CATALINA-HOME}\work\Standalone\localhost\myapp

However, i've upgraded to Tomcat 4.1.27 and now the ant script no longer
works. When I deploy the war file using the manager it unpacks it into
{CATALINA-HOME}\webapps\myapp folder instead. This is irritating because
when I try and redeploy the war file (i.e call undeploy  then deploy in the
ant script) i get the message Cannot remove document base for path /myapp

Why does 4.1.27 unpack its war files into the web app folder unlike 4.1.18?
I've tried replacing the server.xml file with the one from 4.1.18 but it
still does the same thing. Is there a setting that I need to make 4.1.27
behave in the same way as 4.1.18?

Thanks

Tom

Limehouse Court, 3-11 Dod Street
London E14 7EQ   Tel: 020 7537 8515


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



RE: Manager app in 4.1.27 behaves differently to 4.1.18

2003-11-25 Thread Tom Lyle
=.txt timestamp=true
verbosity=1/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=0 resourceName=UserDatabase validate=true/
/Engine
  /Service
/Server

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: 25 November 2003 14:04
 To: Tomcat Users List
 Subject: RE: Manager app in 4.1.27 behaves differently to 4.1.18



 Howdy,
 Is unpackWARs set to true for your Host?

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Tom Lyle [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 25, 2003 7:54 AM
 To: Tomcat Users List
 Subject: Manager app in 4.1.27 behaves differently to 4.1.18
 
 Hi there,
 
 I'm having a slightly annoying problem using the Tomcat Manager
 application.
 I have a webservices web application that i deploy using an Ant script
 and
 the org.apache.catalina.ant.DeployTask  UndeployTask. On Tomcat 4.1.18
 this
 works fine, I package the application up as a war file and can deploy,
 undeploy and redeploy with no problems - the war file gets unpacked
 into
 {CATALINA-HOME}\work\Standalone\localhost\myapp
 
 However, i've upgraded to Tomcat 4.1.27 and now the ant script no
 longer
 works. When I deploy the war file using the manager it unpacks it into
 {CATALINA-HOME}\webapps\myapp folder instead. This is irritating
 because
 when I try and redeploy the war file (i.e call undeploy  then deploy
 in
 the
 ant script) i get the message Cannot remove document base for path
 /myapp
 
 Why does 4.1.27 unpack its war files into the web app folder unlike
 4.1.18?
 I've tried replacing the server.xml file with the one from 4.1.18 but
 it
 still does the same thing. Is there a setting that I need to make
 4.1.27
 behave in the same way as 4.1.18?
 
 Thanks
 
 Tom
 
 Limehouse Court, 3-11 Dod Street
 London E14 7EQ   Tel: 020 7537 8515
 
 
 -
 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]



RE: IIS is not supported in Tomcat 4.1.29.

2003-11-24 Thread Tom Lyle
Jesus, what a way to start a Monday morning. Is there really any point in
shouting at each other like this? If you've still not got Tomcat working
with IIS try this:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html I followed that
and got it all working.

Tomcat isn't as well documented as it might be (for reasons that have
already been stated) but theres really no reason to start having a go at
people.

Peace people,

Tom

 -Original Message-
 From: Roeland Meyer [mailto:[EMAIL PROTECTED]
 Sent: 24 November 2003 09:43
 To: 'Tomcat Users List'
 Subject: RE: IIS is not supported in Tomcat 4.1.29.


 Before I sound too much like byting the hand that feeds, let me thank you
 for the useful information that you have provided.

  From: Christopher Schultz [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 24, 2003 4:26 AM

 and I will make due allowances for the time of your response as well. Late
 nights can make one more than a bit tense.

 You don't pretend to win the coveted Whiner Of The Month award
 with this, I hope. There's a lot of competition, you know.
 
  I think this post gets my vote for this coveted award. Everyone: you
  have only 7 days left to submit your entries!

 For one thing, whether you guys know it or not, Java is competing
 against MS
 .NET. I surfaced specific issues that need to be covered. I have a case
 where the requirements are Win2K and IIS. Neither Linux nor Apache are
 viable options, although I've argued for, at least, Apache. I'm doing good
 to get Tomcat, okay? I don't want to do C# as that doesn't port
 more than 5
 micro-inches from the MS platforms. This sort of stuff makes it
 hard to sell
 Tomcat.

   There are three section to this email;
   'General Complaints', 'IIS HOW-TO', and 'Workers HOW-TO'.
 
  No, you have one section: complaining about everything. I mistakenly
  read the whole post, thinking that there woud, in fact, be an IIS
  HOWTO and Workers HOWTO contained somewhere within. Alas,
  there was not.

 No, I went item-by-item thorugh the dox that were shipped with
 the product.
 Often I was looking at
 http://jakarta.caselle:8080/tomcat-docs/jk2/jk/workershowto.html or
 http://jakarta.caselle:8080/tomcat-docs/jk2/jk/iishowto.html. I was making
 the case that both of those documents need to be either fixed or removed
 from the distribution. In fact, I stated that plainly. You must not have
 read that.

   General complaints: (in no particular order)
 
  I recognize that there are shortcomings in the documentation. You do
  realize that pretty much nobody gets paid to write this
  stuff, right? If
  you have spent a significant amount of time figuring
  something out, why
  not help out with the project and submit either a replacement
  document
  for IIS/Tomcat or a patch to any existing documentation?

 Actually, I would gladly do so. I am considering compiling my notes for
 subbmital after I get this stuff working. I *really* don't want
 to do .NET.

   IIS HOW-TO:
  
   1) Obviously, all references to Workers HOW-TO
   point to a defective document, as shown in the
   section on the workers HOW-TO.
   
[snip]
   
Workers HOW-TO:
   
This was obviously written for Tomcat 3 and never
updated for Tomcat 4.1.29.
 
  Do you mean this HOWTO:
 
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

 Yep and these are the offending lines;

 ---
 workers.properties - A file that describes the host(s) and port(s) used by
 the workers (Tomcat processes). A sample workers.properties can be found
 under the conf directory.
 uriworkermap.properties - A file that maps URL-Path patterns to workers. A
 sample uriworkermap.properties can be found under the conf directory as
 well.
 ---

 Neither workers.properties nor uriworkermap.properties are
 shipped with the
 product, contrary to what is clearly written insaid dox.

  It specifically mentions the changes since Tomcat 3.3 (with
  respect to
  4.x and 5.x). Here's an example:
 
  
  The ajp12  has been deprecated  with Tomcat 3.3.x and you should use
  instead ajp13  which is the only ajp protocol known by Tomcat 4.0.x,
  4.1.x and 5.
 
  Of course Tomcat 3.2.x and 3.3.x also support ajp13 protocol.
  

 If you'd truely read my email then you'd have noticed that I
 never mentioned
 ajp13. I had already read and understood that part. The isue isn't
 documented changes, the issues are changes that aren't
 documented. A slight
 difference.

[I can't figure out workers, and I find the workers HOWTO to be
worthless. By the way, what is a worker?]
 
  I find that this document is very helpful for these types of
  questions:
 
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workers
  howto.html

 Is that anything like
 http://jakarta.caselle:8080/tomcat-docs/jk2/jk/workershowto.html ?
 If so, then go back and re-read my email for a section-by-section list of
 errors.
 BTW, your quoted portion is not anything that I wrote. I just checked.

  It 

RE: Tomcat version

2003-11-18 Thread Tom Lyle
At a guess the excel mime type is not set in Tomcat 4.0.3 conf/web.xml

 -Original Message-
 From: Aggarwal, Gautam (IE03) [mailto:[EMAIL PROTECTED]
 Sent: 18 November 2003 13:36
 To: [EMAIL PROTECTED]
 Subject: Tomcat version


 I have a link on a page in my JSP application that is supposed to open an
 Excel file. The link is a href=taxCalc.xls target=_blankTax
 Calculator/a.

 If the application runs on Tomcat 4.1.24, it works fine. A new browser
 window opens, the excel file gets downloaded and opens up in the browser.
 But, if I run the application on another instance of Tomcat which
 is 4.0.3,
 the excel file does not open, instead it shows a lot of junk characters in
 the browser.

 What could be the reason for this?

 Thanks,
 Gautam

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




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



RE: Tomcat version

2003-11-18 Thread Tom Lyle
Assuming that tomcat 4.0.3 s web.xml layout is the same as as 4.1.24 try
adding
mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping
to conf/web.xml and restart Tomcat

 -Original Message-
 From: Aggarwal, Gautam (IE03) [mailto:[EMAIL PROTECTED]
 Sent: 18 November 2003 13:48
 To: Tomcat Users List
 Subject: RE: Tomcat version


 Please tell me how to set the mime type.

 -Original Message-
 From: Tom Lyle [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 6:56 PM
 To: Tomcat Users List
 Subject: RE: Tomcat version


 At a guess the excel mime type is not set in Tomcat 4.0.3 conf/web.xml

  -Original Message-
  From: Aggarwal, Gautam (IE03) [mailto:[EMAIL PROTECTED]
  Sent: 18 November 2003 13:36
  To: [EMAIL PROTECTED]
  Subject: Tomcat version
 
 
  I have a link on a page in my JSP application that is supposed
 to open an
  Excel file. The link is a href=taxCalc.xls target=_blankTax
  Calculator/a.
 
  If the application runs on Tomcat 4.1.24, it works fine. A new browser
  window opens, the excel file gets downloaded and opens up in
 the browser.
  But, if I run the application on another instance of Tomcat which
  is 4.0.3,
  the excel file does not open, instead it shows a lot of junk
 characters in
  the browser.
 
  What could be the reason for this?
 
  Thanks,
  Gautam
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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




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



RE: Important- Tomcat 4.1.24 with mutiple database

2003-11-17 Thread Tom Lyle
You should have a look at the DAO pattern if you're planning on supporting
multiple databases
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.ht
ml


 -Original Message-
 From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
 Sent: 17 November 2003 09:38
 To: [EMAIL PROTECTED]
 Subject: Important- Tomcat 4.1.24 with mutiple database


 Hi all,
 I am designing a product for my company which will be sold to multiple
 clients. The clients may have any database (MYSQL,MS SQL Server , oracle).
 Can i design in such a way that the product will work on any database?
 I would like to use type4 jdbc driver. Can connection pooling be
 implemented? In case the client wants to change the server from Tomcat to
 JRUN it should be easy to migrate.
 Thanks in Advance
 Bopanna



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




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



RE: Tomcat as a service

2003-11-12 Thread Tom Lyle
Err.. why are you using Tomcat 3.3.1a?

You can install Tomcat 4 as a service by using the version packaged as a
windows installer or you could use the Tomcat service manager which you can
find here:
http://web.bvu.edu/staff/david/index.jsp?subsection=tcservcfgpage=overview


-Original Message-
From: Andrea Stefanini [mailto:[EMAIL PROTECTED]
Sent: 12 November 2003 12:05
To: [EMAIL PROTECTED]
Subject: Tomcat as a service


I tried to start Tomcat3.3.1a as a service on a Windows2000 Professional .
I followed the instructions in the page
'http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html'.
I had no problem until point 3.
Executing the command specified at point 4 (jk_nt_service -S name of
service), I receive the following message:

Asked (and given) winsock 1.1
Starting Jakarta.
Jakarta failed to start.

And in the log files 'jvm.stderr', I find the following message:

java.lang.NoClassDefFoundError: $(wrapper/jvm/options)
Exception in thread main

Can you tell me how to proceed for installing my Tomcat as a service?
Thank you.




Andrea Stefanini

[EMAIL PROTECTED]

Diretto + 39-50-7687.27


Via Di Lupo Parra, 144 - 56023 S. Prospero (PI)
Tel. 050-7687.11 - Fax 050-7687.67
Email: [EMAIL PROTECTED]  -  www.sister.it


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



RE: Tomcat + jk + IIS

2003-11-12 Thread Tom Lyle
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

-Original Message-
From: Marco Shimomoto [mailto:[EMAIL PROTECTED]
Sent: 12 November 2003 15:52
To: Tomcat Users List
Subject: Tomcat + jk + IIS


Hello,

I want to get running a test server with Tomcat (4.x) and IIS on a Windows
2000. I’ve read all JK documentation at Jakarta, tried unsuccessfully to get
them working.
Does anybody know another source of information guide on doing this?

Thanks in advance,
Marco


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



RE: Accessing objects with any servlets, where the object is already pre-created

2003-10-07 Thread Tom Lyle
 In fact, you can have one object in your servletContext which
 holds ALL of your data.

I see how this approach works, but does it have any advantages over using
one object that has static methods to access its data? For example I have a
Config class that has a static initialisation block that reads data in from
a properties file and then exposes the data with static methods, such as
Config.getSomeValue()

This does the job for me and means i can test my code in my IDE without
deploying it to tomcat. Is there a good reason for not doing it this way?
Just my after lunch thoughts.

Tom


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



RE: How to enable MS PowerPoint and MSExcel file viewing when click on it instead of download first?

2003-09-04 Thread Tom Lyle
if you add
mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping
to the web.xml in {tomcathome}/conf

IE will open any xls files served by Tomcat within excel (assuiming that the
client has Excel installed)


 -Original Message-
 From: lucan [mailto:[EMAIL PROTECTED]
 Sent: 04 September 2003 09:48
 To: [EMAIL PROTECTED]
 Subject: How to enable MS PowerPoint and MSExcel file viewing when click
 on it instead of download first?


 Hi,
 I am installing Apache Tomcat and put some presentation
 meterial on it. I come to a problem that if I upload Microsoft
 Power Point and Microsoft Excel's file to the server, I will not
 able to view it by just clicking on it using IE (Internet
 Explorer) unless I download it. Microsoft Word Documents will not
 have this kind of problem.

 Can any one do this before guide me out of this? The solution
 I use now is try to save all Power Point Presentation into web
 format but I have no idea what to do with the Excel file.

 Thank you in advance for all your help :)
 regards,
 lucan



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



File upload Bug?

2003-09-03 Thread Tom Lyle
Hi All,

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

Running on Windows 2000
with sun jdk1.4.1

Tom


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



RE: File upload Bug?

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

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

thanks

Tom

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


 Hi All,

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

 Running on Windows 2000
 with sun jdk1.4.1

 Tom


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




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



RE: File upload Bug?

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

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


 Tom,

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

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

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

 Andy

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



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




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



RE: [ROOKIE] WebApp

2003-08-28 Thread Tom Lyle
classes go in the myapp/WEB-INF/classes folder, but make sure that your
class files are in proper packages i.e
myapp/WEB-INF/classes/mypackage/myClass.class

to use this class in a jsp page you have to add an import statement to the
page like:
%@ page language=java import=mypackage.myClass %

 -Original Message-
 From: Mario Moroni [mailto:[EMAIL PROTECTED]
 Sent: 28 August 2003 11:05
 To: Tomcat Users List
 Subject: [ROOKIE] WebApp


 I've downloaded Tomcat 4.1.27 (Win32)

 in the root webapps I've created some folders:

 myapp
 myapp/WEB-INF
 myapp/WEB-INF/classes

 in myApp I've putted index.jsp. After a restart (necessary?) I can access
 this page correctly.
 I'd like to use myClass.class in index.jsp

 Where I should put this?
 What I have to configure?

 Thanks again

   Mario




 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 Sponsor:
 Scopri i cd di musica rilassante , zen e new age. Li trovi su
www.regali.it
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1496d=28-8

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



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



RE: JK2 Problem

2003-08-28 Thread Tom Lyle
I got a win2k server with iis5 working using this howto:
http://www.reynir.net/tomcat/tomcat_IIS_service_jk2.html

 -Original Message-
 From: Woody, Justin D Mr NMR [mailto:[EMAIL PROTECTED]
 Sent: 27 August 2003 16:30
 To: '[EMAIL PROTECTED]'
 Subject: JK2 Problem


 Hello Everyone,

 I am having a configuration issue/question with the JK2 connector. I am
 running win 2k server w/IIS 5.0. I currently have JK 1 configured to proxy
 requests from IIS to a tomcat instance which is on a different server,
 however I need to upgrade to JK2 because the connector doesn't pass the
 query strings correctly. I have been trying to figure this out
 for a couple
 of weeks but It doesn't look like this is possible using the JK2 connector
 or I'm just not getting it.

 Has anyone done this? Can it be done?

 Thanks in advance,
 Justin



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



RE: question marks appearing after deploy to production server

2003-08-14 Thread Tom Lyle
This could be to do with the character encoding setting in your jdbc driver.
Are you connecting to the same database on your testserver as on your
localmachine? Are you obtaining a Connection object in a different way?

 -Original Message-
 From: Mark Schmeets [mailto:[EMAIL PROTECTED]
 Sent: 13 August 2003 14:40
 To: Tomcat Users List
 Subject: Re: question marks appearing after deploy to production server


 Hans Wichman wrote:

  Hi,
  I have a strange problem, I wrote a servlet that retrieves some data
  from a database, which may contains characters such as ë.
 
  On my local tomcat 4.1.24 testserver the output shows correctly as in
  'aërobe'.
  However if I deploy the application to one of our testservers, the
  result is 'a?robe'.
 
  Does anybody have a clue how this may happen?
 
  regards,
  Hans
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 It is almost certainly a characterset problem. You can specify the
 characterset when you set the content type, and Tomcat will create an
 OutputStreamWriter ( to create the PrintWriter ) with that characterset.
 Or if you are creating the PrintWriter yourself, specify the correct
 encoding.
 Another thing to check is the characterset in your database. You want to
 make sure this matches.

 Hope this helps.
 Mark


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




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



RE: Problem finding class files from Web-inf/classes

2003-07-31 Thread Tom Lyle
Putting the classes in packages will solve the problem, theres no good
reason to use unpackaged classes

 -Original Message-
 From: Stuart MacPherson [mailto:[EMAIL PROTECTED]
 Sent: 31 July 2003 13:00
 To: 'Tomcat Users List'
 Subject: RE: Problem finding class files from Web-inf/classes


 Should be automatic.  Try common/classes

 -Original Message-
 From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
 Sent: 31 July 2003 12:27
 To: [EMAIL PROTECTED]
 Subject: Problem finding class files from Web-inf/classes

 hi all,
 I am using Tomacat4.1.24.
 My application cannot find unpackaged class files placed in application's
 Web-inf/classes directory.
 Should i have to set some classpath explicitly or should it be found by
 default.
 Thanx
 Bopanna.


 Power of Global Information Access...
 .. Browser based RCS products.
 --
 --
 -
  Visit us at http://www.rcssoft.com/ for an online DEMO of all
 our web based
 products.
  User ID and Password will be available on request.

  PAYMAN   - Payroll Management System
  TRAXX- Asset Management and Tracking System
  eSHOP  - Online Information and Ordering System
  SALES STREAM   - Sales Force Automation
  CARE   - Call Management System
  DATA MINER   - Query Builder and Report Generator

  Please write to [EMAIL PROTECTED] or reply to this mail for further
 details.



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



Threading problem in servlets

2003-07-22 Thread Tom Lyle
Hi there,

I'm hoping that someone can help me with a memory/threading problem im
having with Tomcat. I have an application that does a lot of heavy xml
processing and I'm trying to make this work as a web app within Tomcat.
Basically I have a process that does the following:

1. Loads an xml file into the DOM
2. Xpaths to find a list of particular Nodes
3. For each Node run an XSL transform on the document to generate an
individual html page

For example, I have a 3mb xml document that i run through this process which
generates 54 html pages. I've encapsulated this process in a class that
implements the Runnable interface so i can kick the process off in a new
thread (as it can take some time) and when I run the process on my local
machine in Eclipse the memory usage ramps up to around 70mb until it
completes. Now i reckon this is acceptable considering the amount of work
thats going on. The problem comes when i try to invoke my Runnable class
from a servlet. Tomcat goes crazy with the memory usage fluctuating wildly
between 50-450mb and by the time the process has completed (which it does)
my Tomcat.exe is hogging over 400mb of memory and refuses to give it up,
which means i'm left with no alternative but to restart.

My understanding of the servlet lifecycle is that for each requst to a
servlet a new instance of the servlet class is created in its own thread and
that the servlet container my maintain a pool of these threads, reusing them
as requests come in. What i'm not sure about is what happens to any threads
that the servlet may create (as in my case) It would seem that Tomcat is
preventing my xml processing thread from being properly cleaned up.

If any one has any ideas/suggestions i'd be most grateful

Tom


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



RE: Threading problem in servlets

2003-07-22 Thread Tom Lyle
But why is Tomcat taking so much memory? I'm running it as a service on a
windows 2000 box and you can see the memory usage of the Tomcat.exe go up
AND down depending on the number and nature of requests. But my servlet that
spawns another thread sends the memory use through the roof and it never
comes back down.

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: 22 July 2003 11:49
 To: Tomcat Users List
 Subject: Re: Threading problem in servlets


 JVM's take memory from the OS and never release it back to the
 OS. The JVM
 itself may have tons of memory free, but the OS won't know that.

 -Tim

 Tom Lyle wrote:
  Hi there,
 
  I'm hoping that someone can help me with a memory/threading problem im
  having with Tomcat. I have an application that does a lot of heavy xml
  processing and I'm trying to make this work as a web app within Tomcat.
  Basically I have a process that does the following:
 
  1. Loads an xml file into the DOM
  2. Xpaths to find a list of particular Nodes
  3. For each Node run an XSL transform on the document to generate an
  individual html page
 
  For example, I have a 3mb xml document that i run through this
 process which
  generates 54 html pages. I've encapsulated this process in a class that
  implements the Runnable interface so i can kick the process off in a new
  thread (as it can take some time) and when I run the process on my local
  machine in Eclipse the memory usage ramps up to around 70mb until it
  completes. Now i reckon this is acceptable considering the
 amount of work
  thats going on. The problem comes when i try to invoke my Runnable class
  from a servlet. Tomcat goes crazy with the memory usage
 fluctuating wildly
  between 50-450mb and by the time the process has completed
 (which it does)
  my Tomcat.exe is hogging over 400mb of memory and refuses to give it up,
  which means i'm left with no alternative but to restart.
 
  My understanding of the servlet lifecycle is that for each requst to a
  servlet a new instance of the servlet class is created in its
 own thread and
  that the servlet container my maintain a pool of these threads,
 reusing them
  as requests come in. What i'm not sure about is what happens to
 any threads
  that the servlet may create (as in my case) It would seem that Tomcat is
  preventing my xml processing thread from being properly cleaned up.
 
  If any one has any ideas/suggestions i'd be most grateful
 
  Tom



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




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



RE: Is possible to run JAX-RPC under Tomcat?

2003-06-10 Thread Tom Lyle
I'm using Tomcat 4.1.18 to run a JAX-RPC webservice. I started of using the
JWSDP 1.1 from sun but managed to it working with a normal installation of
tomcat. You need to add the following files to common\lib

jaxrpc-api.jar
jaxrpc-ri.jar
saaj-api.jar
saaj-ri.jar

I got these files from the JWSDP from sun

There was one other oddity in this. I had to delete the
commons-logging-api.jar and replace it with commons-logging.jar from the
JWSDP, otherwise i'd get the following exception when the service initalised

Error configuring application listener of class
com.sun.xml.rpc.server.http.JAXRPCContextListener
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3237)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3598)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:555)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:289)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409)
at
com.sun.xml.rpc.server.http.JAXRPCContextListener.clinit(JAXRPCContextList
ener.java:76)
... 22 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:420)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:548)
... 25 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:416)
... 26 more


I don't use the commons logging stuff in my app, I use the JDK1.4 logging
classes instead, so i never got to the bottom of this error, but it seems
that the commons-logging.jar in the JWSDP is an older version so i'm not
sure whats going on here. Perhaps the people who know about commons-logging
might know..

Tom



 -Original Message-
 From: Tim Shaw [mailto:[EMAIL PROTECTED]
 Sent: 10 June 2003 08:42
 To: Tomcat Users List
 Subject: Re: Is possible to run JAX-RPC under Tomcat?


 Take a look at JWSDP 1.1 from Sun - it's a fully configured Web Services
 setup for Tomcat 4.1.2, and it 'works out of the box' (ish :-)

 I note that http://java.sun.com/webservices/ has a 1.2 version, but I
 haven't tried that (yet).

 G'luck

 tim

 Shapira, Yoav wrote:
  Howdy,
  Tomcat is a servlet container.  It doesn't support all the web services
  APIs by itself.  You can download JAX-RPC and a JAX-RPC implementation
  and use them in your tomcat-served webapp by putting the relevant jars
  in the WEB-INF/lib directory of your webapp.
 
  In the future, if JAX-RPC (the API at least) becomes part of the JDK,
  tomcat may provide its own implementation or (more likely) come bundled
  with a JAX-RPC implementation such as the one from Axis.
 
  Yoav 

RE: Off Topic: JSP that reads and creates links to file directory

2003-06-09 Thread Tom Lyle
I'd say that the String path
=../dirList.jsp?path=//\\corportateFileServer\department\team\communication
s\statusreports\monthlyConsolidatedReporttitle=Team+Monthly+Status+Report
isnt a valid file path for

File file =  new File(path)

 -Original Message-
 From: Michele Emmi [mailto:[EMAIL PROTECTED]
 Sent: 09 June 2003 14:18
 To: [EMAIL PROTECTED]
 Subject: Off Topic: JSP that reads and creates links to file directory


 Hi,
 I have created the jsp (below) that reads and creates links to file
 directory(intranet, windows nt os).  It works in ie to the extent that it
 will read the file server directory and create the links, but
 when I follow
 the link I get an error from the browser (ie) saying the page was not
 found...Any help would be greatly appreciated!

 Example of link that calls the jsp:
 a
 href=../dirList.jsp?path=//\\corportateFileServer\department\team
 \communications\status
 reports\monthlyConsolidatedReporttitle=Team+Monthly+Status+Report
 Monthly
 Report/a

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ page import=java.io.* %
 %@ page import=java.net.* %
 %@ page import=javax.servlet.* %
 %@ page import=javax.servlet.ServletException%
 %@ page import=javax.servlet.http.*%
 %@ page import=java.util.* %
 % String path = request.getParameter(path);
   File file = new File( path );
   String title = request.getParameter(title);
 %

 html

   head
   meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1
   link href=/xxx/sitestyle/guidestyle.css type=text/css
 rel=stylesheet
   script type=text/javascript
 src=/xxx/scripts/dateScript.js/script
   title/title
   /head

 body style=margin: -1em; background-image:
 url(/xxx/icons/background.gif);
 background-repeat: repeat-y;
 table width=535 border=0 cellspacing=50 cellpadding=0
 tr
 td valign=top width=62%
 % out.println( div align='center' class='maintitle' + title +
 /div/brFiles Located at:br  + path ); %
 /td
 /tr
 tr
 td

 % if( !file.exists() || !file.canRead()){
   out.println( Can't Read  + file );
   return;
   }
   if( file.isDirectory()) {
   String [] files = file.list();
   for (int i=0; i files.length; i++)
   out.println( a href=\file:+path+files[i]+\ + files[i] +
 /abr);
   }
   else
   try{
   FileReader fr = new FileReader (file);
   BufferedReader in = new BufferedReader( fr );
   String line;
   while ((line = in.readLine()) != null)
   out.println( line );
   }
   catch ( FileNotFoundException e ){
   out.println( File(s) not found );
   }
 %

 /td
 /tr
 /table
 /body

 /html

 _
 MSN 8 with e-mail virus protection service: 2 months FREE*
 http://join.msn.com/?page=features/virus


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




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



RE: CLASSPATH setting in Windows with JDBC from mySQL

2003-06-05 Thread Tom Lyle
If you put the jar file in {tomcat directory}\common\lib it will be
available to all your web apps. Theres no need to play around with your
CLASSPATH variable.

Tom

 -Original Message-
 From: Joe [mailto:[EMAIL PROTECTED]
 Sent: 05 June 2003 08:43
 To: [EMAIL PROTECTED]
 Subject: CLASSPATH setting in Windows with JDBC from mySQL


 Hi all,  does anyone know how I should set the Class Path Variable in
 Windows in order for JSP to search for the library?

 I've already tried the following methods but it cannot find the driver
 when I tried to load an jsp page:

 Method 1
 I've currently install the JDBC driver on my C:\mysql\JDBC\
 And have tried setting my classpath to point to that folder as below

 Set CLASSPATH=C:\mysql\JDBC\;.

 Method 2
 Copied mysql-connector-java-3.0.8-stable-bin.jar to
 C:\j2sdk1.4.1_02\common\lib
 And simply set my classpath=.

 Method 3
 Copied mysql-connector-java-3.0.8-stable-bin.jar to
 C:\j2sdk1.4.1_02\jre\lib
 And again set my classpath=.

 I've also tried setting my classpath to point specifically to the JDBC
 driver but still, the page cannot find the driver.


 The only method that works now is that I've copied
 mysql-connector-java-3.0.8-stable-bin.jar to my
 /webapps/testAPPS/WEB-INF/lib

 Using this method, which means I have a copy of
 mysql-connector-java-3.0.8-stable-bin.jar in every docBase that I have
 which I find is redundant. Is there any working solution that I can
 simply set in using my CLASSPATH? Also, I have no problem setting it in
 CLASSPATH in Linux but I dunno why it doesn't work in Windows. :-( Now
 that is reason why I preferred Linux.

 Regards,
 Joe









 I've tried a lot of combination and have copy
 mysql-connector-java-3.0.8-stable-bin.jar to



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