Re: The amazingly slow performance of JSP (profiler results)

2005-05-28 Thread Peng Tuck Kwok
Just to check are your precompiling the jsp page? 

On 5/28/05, Kevin Burton [EMAIL PROTECTED] wrote:
 I've been tuning our application trying to get the maximum performance
 out if the system as possible.
 
 I've been throwing the system at jprofiler and allowing it to tell me
 where to optimized.
 
 In short Tomcat is slower than our DB, filesystem,. network and all
 other systems by about 4x.
 
 I've been able to shave some page load time off by some but not enough.
 
 The problem I'm starting to see is that we just have a large number of
 c:set and c:if constructs (and so forth) within loops.  These loops then
 get executed 5 times and next thing you know it you have 50k taglib calls.
 
 The problem comes when you look at the source:
 
 Let's say you start with:
 
  c:set var=foo value=bar/
 
 This nice little elegant piece of code gets expanded to:
 
private boolean _jspx_meth_c_set_0(PageContext _jspx_page_context)
throws Throwable {
  PageContext pageContext = _jspx_page_context;
  JspWriter out = _jspx_page_context.getOut();
  //  c:set
  org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 =
  (org.apache.taglibs.standard.tag.rt.core.SetTag)
  _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
  _jspx_th_c_set_0.setPageContext(_jspx_page_context);
  _jspx_th_c_set_0.setParent(null);
  _jspx_th_c_set_0.setVar(foo);
  _jspx_th_c_set_0.setValue(new String(bar));
  int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag();
  if (_jspx_th_c_set_0.doEndTag() ==
  javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
  _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0);
  return false;
}
 
 Which explains why JSP alone is so amazingly slow!
 
 
 I did a comparison of the page performance here and it was 15x slower than 
 just using Java.  So the same set operation in Java was 15x faster.
 
 ... so in short ... does anyone have any way to speed this up?
 
 The other thing I noticed is that EL is evaluated at runtime (which has to be 
 parsed) and sometimes uses reflections.  Can anyone shed any more light on 
 this and hopefully provide some performance optimization suggestions?
 
 Kevin
 
 --
 
 
 Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com.
 See irc.freenode.net #rojo if you want to chat.
 
 Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
 
Kevin A. Burton, Location - San Francisco, CA
   AIM/YIM - sfburtonator,  Web - http://peerfear.org/
 GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
 
 
 -
 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 banner

2005-05-16 Thread Peng Tuck Kwok
Don't recall seeing any headers appearing in the pages..which
pages are you refering to ?

On 5/16/05, André Cruz [EMAIL PROTECTED] wrote:
 Hello!
 
 Is there anyway to remove the tomcat banner that appears in the header
 of all pages served by tomcat?
 
 I don't want to disclose that information to my users.
 
 Thanks.
 André Cruz
 
 -
 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: [OT]Internal Netbeans Tomcat server

2004-12-10 Thread Peng Tuck Kwok
It says you have attempted to forward after a response has been commited. 
Can you post some code related to this error ? 

On Thu, 9 Dec 2004 12:15:12 -0700, Chris Cherrett
[EMAIL PROTECTED] wrote:
 java.lang.IllegalStateException: Cannot forward after response has been
 committed
  is the error message in the console. Why do I get this error in the internal
 server and not in the external tomcat server?
 
 
 
 On December 9, 2004 11:57 am, Chris Cherrett wrote:
  I am trying to test my webapp under the tomcat server in netbeans. after
  logging on the the app I am recieving 404 errors. It seems to find the
  uinitial pages but wont redirect to any other pages.
 
  Any help?
 
  -
  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]
 


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



Re: Are all TC-managed DataSources pooled?

2004-11-10 Thread Peng Tuck Kwok
For JDBC if it's not pooled in a container, it would be of little use 
to any application. Specifically the tomcat docs do say that
connection pool is provided right here :
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations

Just set it up according to the docs(with changes for your jdbc
driver) and you're good to go.





On Wed, 10 Nov 2004 23:30:08 -, Steve Kirk
[EMAIL PROTECTED] wrote:
 
 No interest in my original post so I'll rephrase.
 
 Is every container-managed DataSource configured in TC (e.g. via server.xml
 / context.xml) automatically made pooled using commons pooling?  Or can
 ordinary non-pooled connections be created too using this mechanism?
 
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED]
  Sent: Tuesday 09 November 2004 00:45
  To: 'Tomcat Users List'
  Subject: Are all TC-managed DataSources pooled?
 
  The docs under 'JDBC Data Sources' at
  http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources
  -howto.html
  say, The J2EE Platform Specification requires J2EE
  Application Servers to
  make available a DataSource implementation (that is, a
  connection pool for
  JDBC connections).
 
  Now, I'm *not* criticising the docs, I'm seeking
  clarification.  I'm not
  sure whether this is saying that a JDBC DataSource has to be
  pooled?  Or is
  instead saying that J2EE requires pooled JDBC connections, or
  maybe that
  J2EE requires connections via a DataSource?
 
  I didn't think that DataSources had to be pooled, based on
  what is says
  here:
  http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html
 
  This might sound like nit picking, but the answer to this
  will help me help
  someone else on another thread.  Thanks.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: About Japanese Mobile container(AU)

2004-10-14 Thread Peng Tuck Kwok
Quite possibly because you have % % in your audio file. 
I think % % only works in jsp files so your variables never get substituted.
 If you want to do this, get a servlet to generate it instead, see if it works. 



On Thu, 14 Oct 2004 17:02:42 +0800, Maneesh sharma [EMAIL PROTECTED] wrote:
 Hi to all,
 I am developing a mobile app. for AU mobile .
 I am using Tomcat server.In web.xml I set the mime type
 mime-mapping
 extension3g2/extension
 mime-typeaudio/3gpp2/mime-type
 /mime-mapping
 for xxx.3g2 audio files.When I am accessing from real device it is getting error and 
 saying not valid.
 
 I am accessing from a .jsp page below
 
 object data=http:///%=music_file_name% type=audio/3gpp2 
 standby=#12480;#12454;#12531;#12525;#12540;#12489;(%= kbSize%kb)
 param name=size value=%=music_file_size% valuetype=data /
 param name=title value=%=music_name% valuetype=data /
 param name=disposition value=devmpzz valuetype=data /
 param name=checkout value=1 valuetype=data /
 /object
 
 Can anybody suggest me where I am doing a mistake?
 Any help is fine for me.
 Thanks in advance
 
 --
 India.com free e-mail - www.india.com.
 Check out our value-added Premium features, such as an extra 20MB for mail storage, 
 POP3, e-mail forwarding, and ads-free mailboxes!
 
 Powered by Outblaze
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: mod_jk2 Ready/Recommended For Production?

2004-10-12 Thread Peng Tuck Kwok
Do you really need to put apache in front of tomcat ? Standalone
tomcat (since ver 4.x)
has always been pretty good in terms of  performance


On Tue, 12 Oct 2004 22:07:34 -0400, Mike Millson
[EMAIL PROTECTED] wrote:
 The Tomcat FAQ page still says that mod_jk is great and should be used
 for production and mod_jk2 may not be production worthy for everyone.
 
 http://jakarta.apache.org/tomcat/faq/connectors.html#vs
 
 Is this still accurate, or is mod_jk2 now ready/recommended for
 production?
 
 Thank you,
 Mike
 
 -
 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: [OFF TPOIC] System.out.println in JAVAbeans

2004-09-29 Thread Peng Tuck Kwok
Well it should appear on the console, unless you do a redirect (I
think you can do that in windows as well) .


On Wed, 29 Sep 2004 08:00:27 +, Atishay Kumar
[EMAIL PROTECTED] wrote:
 hi,
  If i give System.out.println in JavaBeans it is displayed on the
 command prompt in Windows. How do it see the output of
 System.out.println in linux. Is it stored in some file/log?
 thanks
 --
 :)
 Atishay Kumar
 Btech, SEM VII
 DA-IICT
 Gandhinagar - 382009
 India
 ph: +91 9825383948
 /
  * Learn the rules as you would need them to break them properly *
  /
 
 -
 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: Suggestion: A dedicated TOMCAT forum!

2004-09-20 Thread Peng Tuck Kwok
You mean like the one here : http://nagoya.apache.org/jive/index.jsp ?  
Activity seems low if you ask me. Don't know what the plans are for the forum. 


On Mon, 20 Sep 2004 16:14:23 -0500, QM [EMAIL PROTECTED] wrote:
 On Mon, Sep 20, 2004 at 02:00:37PM -0700, nyhgan wrote:
 : I believe that having an open discussion forum is the first step toward such a 
 goal as it will attract a vast number of new users to the tomcat world.
 
 [EMAIL PROTECTED]
 
 ??
 
 -QM
 
 --
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Tomcat Connection Pool Configuration Problem (Cannot Establish the Connection)

2004-09-14 Thread Peng Tuck Kwok
On Tue, 14 Sep 2004 13:56:48 -0700 (PDT), Caroline Jen
[EMAIL PROTECTED] wrote:

 When I configured the Tomcat 5.0.27, I did put the
 driver and URL in the
 C:\jakarta-tomcat-5.0.27\conf\server.xml file (The

That's great, but did you actually put the driver in a location that
tomcat could find it  ?
Like here: $CATALINA_HOME/common/lib ?  Dump your driver there (make
sure it's a jar file),
restart tomcat. Check out the jdbc datasource howto if you've missed
anything else.

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



Re: Using JDBC Data source from a business class

2004-09-06 Thread Peng Tuck Kwok
On Mon, 6 Sep 2004 09:12:51 +0300, muhammed soyer [EMAIL PROTECTED] wrote:

 My servlets are using the ds without a problem ..But I have some classes which are 
 POJO classes to make my job easier whie accessing the DB ..these classes couldnt 
 use  my JDBC definition ..As I guess its from context problems ..But I couldnt 
 solve the problem 

What's the exact problem? You don't exactly say where your POJO
classes are, so I assume they are in your webapp right, then it should
be ok.


 
 What should I do to use tomcat's ds from a POJO class ?
 
 thnx
 
 -ms


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



Re: Using JDBC Data source from a business class

2004-09-06 Thread Peng Tuck Kwok
Adding to this, you could also supply a context.xml seperately  with
the war file when you deploy the app, this is optional.


On Mon, 6 Sep 2004 06:07:18 -0500, Keith Bottner [EMAIL PROTECTED] wrote:
 The context.xml file is under your WebRoot/META-INF directory. When you
 application is deployed it gets copied to the conf/Catalina/[host name]/
 directory then renamed to be the same as your web application. (Which BTW,
 if it is NOT being copied could also be part of the problem). 5.0.27 has a
 problem on Windows doing the copy so you have to do it manually, I believe
 it has been fixed in 5.0.28.
 
 Keith
 
 
 
 -Original Message-
 From: muhammed soyer [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 06, 2004 5:58 AM
 To: Tomcat Users List
 Subject: Re: Using JDBC Data source from a business class
 
 Hello
 
 Where is this context.xml file .should I create a file in web-inf
 directory named context.xml . I put a ResourceLink line in my webapp.xml
 files which is at jakarta-tomcat-5.0.28/conf/Catalina/localhost
 
 -ms
 - Original Message -
 From: Keith Bottner [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, September 06, 2004 1:48 PM
 Subject: RE: Using JDBC Data source from a business class
 
 I believe you also need an entry in your web.xml file that looks something
 like this (obviously changed for your DB settings).
 
 resource-ref
 descriptionpostgreSQL Datasource/description
 res-ref-namejdbc/postgres/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 
 You also need the ResourceLink entry in your context.xml
 
 ResourceLink name=jdbc/database global=jdbc/postgres
 type=javax.sql.DataSource /
 
 I use JNDI to retrieve the DB connection with
 
 private static final String JNDI_CONTEXT = java:comp/env; private static
 final String DATASOURCE_DB_NAME = jdbc/database;
 
 try
 {
 Context initCtx = new InitialContext();
 Context envCtx = (Context)
 initCtx.lookup(JNDI_CONTEXT);
 datasource = (DataSource)
 envCtx.lookup(DATASOURCE_DB_NAME);
 }
 catch ( NamingException e )
 {
 if ( log.isEnabledFor(Level.ERROR) ) log.error(sm.getString(DAO.creation),
 e); }
 
 Hope that helps.
 
 Keith
 -Original Message-
 From: muhammed soyer [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 06, 2004 5:06 AM
 To: Peng Tuck Kwok; Tomcat Users List
 Subject: Re: Using JDBC Data source from a business class
 
 For my web applications(servlets) I add the following lines  in the
 webapp.xml .For my classes what should I do ..These classes is not directly
 called from the browser .My JSP files use them ..
 
 ResourceLink name=jdbc/gp type=javax.sql.DataSource global=jdbc/gp/
 Resource type=javax.sql.DataSource description=Oracle Datasource
 example auth=Container name=jdbc/gp/
 
 -ms
 - Original Message -
 From: Peng Tuck Kwok [EMAIL PROTECTED]
 To: muhammed soyer [EMAIL PROTECTED]
 Sent: Monday, September 06, 2004 12:11 PM
 Subject: Re: Using JDBC Data source from a business class
 
 You should be able to access the datasource from your classes.  You said
 earlier you had problems doing so, could you describe the problems ?
 
 On Mon, 6 Sep 2004 11:31:04 +0300, muhammed soyer [EMAIL PROTECTED]
 wrote:
  Yes they are in my web-inf/classes directory .I use them to do my db
  jobs ..from jsp pages .. these classes access db .so I want to make
  them use Tomcats conneciton pooling machanism . I can do this from
  servlets ..
 
  -ms
 
  - Original Message -
  From: Peng Tuck Kwok [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Monday, September 06, 2004 10:44 AM
  Subject: Re: Using JDBC Data source from a business class
 
  On Mon, 6 Sep 2004 09:12:51 +0300, muhammed soyer
  [EMAIL PROTECTED]
  wrote:
 
   My servlets are using the ds without a problem ..But I have some
   classes
  which are POJO classes to make my job easier whie accessing the DB
 ..these
  classes couldnt use  my JDBC definition ..As I guess its from context
  problems ..But I couldnt solve the problem
 
  What's the exact problem? You don't exactly say where your POJO
  classes are, so I assume they are in your webapp right, then it should
  be ok.
 
  
   What should I do to use tomcat's ds from a POJO class ?
  
   thnx
  
   -ms
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
   Bu mail GESNET sunucusu tarafindan virus kontrolunden
  gecirilmistir.
 
 
 
  Bu mail GESNET sunucusu tarafindan virus kontrolunden gecirilmistir.
 
 -
 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]
 
  Bu mail GESNET sunucusu tarafindan

Re: Configuring Tomcat 5.0.27 for JNDI (with the McKoi Database)

2004-09-03 Thread Peng Tuck Kwok
Perhaps you could also read this here 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html 

to get more details. 


On Fri, 3 Sep 2004 13:07:59 -0700 (PDT), Caroline Jen
[EMAIL PROTECTED] wrote:
 Thanks for replying.
 
 I am building only one webapp.  What does create a
 proper Context element instead of DefaultContext
 mean?
 
 Thanks
 
 
 --- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 
  Hi,
  You should put DefaultContext inside a Host.  But if
  you only have one
  webapp, create a proper Context element for it
  instead of
  DefaultContext.
 
  The JDBC driver class name is supplied in your
  vendor documentation (in
  this case McKoi).  A common one is
  com.mckoi.JDBCDriver.
 
  The port number is whatever port your database is
  listening on.  Ask
  your DBA if you're not sure.
 
  Yoav Shapira
  Millennium Research Informatics
 
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 03, 2004 3:09 PM
  To: [EMAIL PROTECTED]
  Subject: Configuring Tomcat 5.0.27 for JNDI (with
  the McKoi Database)
  
  I am sort of stuck with configuring the server.xml
  file under the $TOMCAT\conf directory for JNDI.
  
  For the Tomcat 4.x, I put the following block of
  code;
  i.e. DefaultContext right after the ending
  /context element and before the ending /host
  element in the server.xml file.
  
  However, I do not see the context element in the
  Tomcat 5.0.27.  There is the host element,
  though.
  
  [code]
  DefaultContext
 Resource name=jdbc/McKoiDB
  auth=Container
 type=javax.sql.DataSource/
  ResourceParams name=jdbc/McKoiDB
parameter
  namefactory/name
  
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
 parameter
   namedriverClassName/name
   value/value
 /parameter
 parameter
   nameurl/name
  
 
 valuejdbc:mckoi://localhost:/databasename?autoReconnect=true/val
  ue
 /parameter
 parameter
   nameusername/name
   valuejavauser/value
 /parameter
 parameter
   namepassword/name
   valuejavadude/value
 /parameter
 parameter
   namemaxActive/name
   value20/value
 /parameter
 parameter
   namemaxIdle/name
   value30/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
parameter
  
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  
  nameremoveAbandonedTimeout/name
  value60/value
/parameter
parameter
  namelogAbandoned/name
  valuetrue/value
/parameter
  
/ResourceParams
/DefaultContext
  [/code]
  
  1. Where should I put the DefaultContext in the
  server.xml file?
  
  2. What is the value I should give to the
  driverClassName parameter?
  
  3. What is the port number I should give to the url
  parameter?  i.e.
 
 jdbc:mckoi://localhost:/DatabaseName?autoReconnect=true
  
  
  
  ___
  Do you Yahoo!?
  Win 1 of 4,000 free domain names from Yahoo! Enter
  now.
  http://promotions.yahoo.com/goldrush
  
 
 -
  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!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Tomcat deployment issue

2004-08-24 Thread Peng Tuck Kwok
Maybe you want to automate the build process so you don't depend on
your expanded directory to store your data ?
Say in ant just generate the war file along with your data (from your
build directory) then deploy it.Then you never really worry what
tomcat does to your war file or the directory it explodes to.
Simply regenerate the war file along with your data when you make changes, :D 


On Tue, 24 Aug 2004 17:13:05 -0700, David Chang [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm new to tomcat and trying to figure out how to deploy a WAR file without deleting 
 all the contents of the old application.  That is, I want to overwrite the files 
 with my new archive but not delete any other files that were already there.
 
 The reason I want to do this is because my data and program files are all under the 
 same hierarchy.  I want to replace my programs, but not my data.  I tried using a 
 symbolic link for my data directory, but tomcat followed the symbolic link and 
 deleted everything in there when expanding the new WAR file.
 
 Any help would be appreciated.
 
 DC


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



Re: [OT]CVS Tag in source code

2004-08-20 Thread Peng Tuck Kwok
Or $Id$ anywhere in the file (gives a whole bunch of things actually) . 
so on the same line as @version you add that after it. 

On Fri, 20 Aug 2004 08:39:03 -0500, QM [EMAIL PROTECTED] wrote:
 On Fri, Aug 20, 2004 at 12:06:36PM +0530, Antony Paul wrote:
 : How to add @version $Revision: 1.3 $ $Date: 2004/07/23 22:57:35 $ when
 : checking out files from A CVS repository. I am using file based CVS. We use
 : Eclipse to checkout. This is very useful to us because we locally use
 : another versioning system and the main site is using CVS. If this version is
 : included it is easy to identify which version we are using.
 
 Hi,
 
 Did you even check the CVS docs?
 The answer is right in front of you:
 
 $Revision$  =  $Revision: 1.3 $
 
 -QM
 
 --
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Configuring Tomcat 5 to not display null value as word null

2004-08-20 Thread Peng Tuck Kwok
Maybe he could check that in the jsp as well. Then maybe it's a little
simpler to do. say
(roughly) :
.
if (request.getParameter(blah)==null) { 
   print something meaningful instead. 
 

On Fri, 20 Aug 2004 18:15:48 -0700, Justin Ruthenbeck
[EMAIL PROTECTED] wrote:
 
 There is no Tomcat magic configuration parameter to make this
 happen.  Instead, take a look at HttpServletRequestWrapper.  You can
 combine that with a Filter to override the behavior of getParameter() for
 the pages that need it such that it returns  instead of null when no
 such parameter value exists.
 
 If you're unfamiliar with the above concepts, check Google, so see:
 http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p4.html
 
 Good luck,
 justin
 
 At 04:54 PM 8/20/2004, you wrote:
 Hi,
 
 I have the following JSP fragment:
 
 
 case 1 = %=request.getParameter(no_such_thing)%
 case 2 = ${requestScope[no_such_thing]}
 
 
 The output of the page is
 
 ...
 case 1 = null
 case 2 =
 ...
 
 Is there any way that Tomcat can be configured to not display the word
 null if the value is null?  It is easy to replace the above example in
 case 1 by case 2, but in my case it is not easy to make such change to
 my existing code base (which I am migrating from another servlet engine
 that outputs null as ).  I have pages with the input type=text
 elements displaying the string null when there is no default value.
 
 Thanks,
 --
 Rick
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 __
 Justin Ruthenbeck
 Lead Software Engineer, NextEngine Inc.
 justinr - AT - nextengine DOT com
 Confidential. See:
 http://www.nextengine.com/confidentiality.php
 __
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Ingres and JdbcRealm problems

2004-08-17 Thread Peng Tuck Kwok
Looks like something went wrong with the sql statement. Can your jdbc
driver provide more output through some configuration ? Maybe then the
root cause can be seen.

On Tue, 17 Aug 2004 10:00:50 +0100 (BST), Ben Stokes
[EMAIL PROTECTED] wrote:
 Hi,
 
 I'm currently developing a web application on Tomcat 5
 embedded in Netbeans 3.6 and connecting to an Ingres
 2.6 database. I've setup a JdbcRealm in Tomcat to
 authenticate users against the database to allow
 access to the application and, from the outside,
 everything appears to work well with the login process
 working as it should. However, looking at the catalina
 log there are obviously problems occuring that aren't
 showing up on the web pages:-
 
 2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
 performing authentication
 java.sql.SQLException: line 1, The dynamically defined
 statement 'jdbc_stmt_0_0' not found.
  Perhaps a PREPARE or DESCRIBE wasn't successful.
 at
 ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
 at
 ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
 at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
 at
 ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
 at
 org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
 at
 org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
 at
 org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at
 org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
 at java.lang.Thread.run(Thread.java:534)
 
 2004-08-17 08:22:08 JDBCRealm[Catalina]: Username
 tomcat successfully authenticated
 2004-08-17 08:22:08 JDBCRealm[Catalina]: Exception
 performing authentication
 java.sql.SQLException: line 1, The dynamically defined
 statement 'jdbc_stmt_0_0' not found.
  Perhaps a PREPARE or DESCRIBE wasn't successful.
 at
 ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:509)
 at
 ca.edbc.jdbc.JdbcObject.readResults(JdbcObject.java:348)
 at ca.edbc.jdbc.EdbcPrep.execute(EdbcPrep.java:357)
 at
 ca.edbc.jdbc.EdbcPrep.executeQuery(EdbcPrep.java:243)
 at
 org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:449)
 at
 org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
 at
 org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:176)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 

Re: JDBC connectivityfor ORACLE !!!

2003-02-27 Thread Peng Tuck Kwok
Unfortunately Swapneel, I know nuts about oracle :) .I'm more of a SAP 
DB person. Connecting tomcat and oracle using jndi should be ok I guess, 
there is a example in the tomcat docs.


Swapneel Dange wrote:

hi MIKE, PENG , CHONG !!

guys, there seems to be a problem here for me with the database 
implementation. After all the discussion i was all set to implemenent 
the database as a FILESYSTEM only but my BOSS insists that ORACLE 
shoudl be implemented. Can somebody of u enlighten me with the SITES 
and README files about impplementing ORACLE under TOMCAT umbrella and 
what could be the DRIVERS i need to know before i plunge into the deep 
sea of ORACLE implementation. some of the drivers suggested are the 
ones made by DATATAKE, JBOSS (i guess, i may be wrong)or the default 
drivers which come up with the ORACLE.

Comments are really awaited !

Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange




-
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: JNDI DataSource problems..

2003-02-27 Thread Peng Tuck Kwok
It doesn't provide the JNDI resource outside the container as far as I 
can tell.

I don't know enough about JNDI to work this out. I would have thought 
that a resource which is set up by the servlet container ( tomcat ) 
would be available outside the container?



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


Re: Mac os x and class files

2003-02-26 Thread Peng Tuck Kwok
This is a long shot; shouldn't your classes be in a package ?
for examples your import statement :
%@ page import=Plans021103%
try putting it into package like org.mypackage  .

Putting your jars or classes  under /{webapp name}/WEB-INF/lib or 
/{webapp name}/WEB-INF/classes should work .

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


Re: how to access the server from another computer

2003-02-25 Thread Peng Tuck Kwok
You need a public ip for that machine you are running tomcat on.
So after you have got the public ip (assuming everything is setup 
properly) the url can be accessed at
	http://[ip that you just got]:8081/index.jsp
You can change the port of tomcat to 80 (assuming nothing else is on 
80)so you can do just this :
	http://[ip ]/index.jsp

Sony Ho wrote:
Hello,

 As simple as the subject goes,  I've recently installed Tomcat4 on my 
windows2000 professional.   I've able to access the Apache Tomcat 
Welcome page from http://localhost:8081/index.jsp

My question is, how to access that same page from another computer 
connecting to internet??

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

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



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


Re: access is denied from 4.1.18-LE-jdk14 on win98se

2003-02-25 Thread Peng Tuck Kwok
what is the permission for tomcat in that directory ? I mean is the user 
who is running tomcat allowed to read  n write to the directory ?

do a 'ls -al' and let's have a look at the output.

Ray Tayek wrote:
hi, just tried 4.1.18-LE-jdk14 and tried to startup. he gets as far as 
mumbling JAVA_HOME  ... (correctly), then he says access is denied. 
logs/ is empty.

how do i turn on some verbosity so i can see where he's going south?

thanks

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting 
work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/

-
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: Can't run servlet under own project directly

2003-02-25 Thread Peng Tuck Kwok
I think you need to add a context for it first. You can use the admin 
interface to do it or make use of tomcat's autodeploy feature from a 
.war file. You could also manually enter the context on your own in 
server.xml . There are plenty of examples in there.

Cora wrote:
I use tomcat 4.1.8 and create a project\ehrs directory under webapps\.
Save helloworld.html to ..\project\ehrs\, and make the form action url
to ../servlet/ServletHelloWorld,
also put the servlet to ..\project\WEB-INF\classes\ServletHelloWorld.class
Moreover, I also un-remark the following at ..\Program Files\Apache
Group\Tomcat 4.1\conf\web.xml
  !-- The mapping for the invoker servlet --
servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping
But I got the following error message when I run the servlet:


HTTP Status 404 - /project/servlet/ServletHelloWorld
type: Status report
message: /project/servlets/ServletHelloWorld
description: The requested resource (/project/servlet/ServletHelloWorld)
is not available.

What else config I need to modify / add? Anyone can teach me?
Thanks at advance!
Cora
-
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: JNDI Database Connection does not work under XP

2003-02-25 Thread Peng Tuck Kwok
JNDI does work for sapdb, tried it out myself.
Post the relevant bits for server.xml .
chris weber wrote:
Hello,

i try since tree week to run a jndi datasource with tomcat.
But it does not work in any way. Perhaps it is better, to go to .net.
My equipment:
Jkd 1.4.1 and Tomcat4.1.12 and Tomcat4.1.18
I create the jndi in the admin- tool. (The secure way). 
I tried it with sapdb and ms sql server. It does not work as designed,
it is not possible to create the resource instance. 

Has somebody an idea!?!

Regards Chris

26.02.2003 08:44:31 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
26.02.2003 08:44:31 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
26.02.2003 08:44:31 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
26.02.2003 08:44:32 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
GlobalResourcesLifecycleListener: Exception processing Global JNDI
Resources
javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:189)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
01)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:205)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:210)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:176)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:147)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:218
2)
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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18-LE-jdk14
26.02.2003 08:44:37 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
26.02.2003 08:44:37 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
26.02.2003 08:44:37 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/30
config=C:\Java\Tomcat4.1.18\conf\jk2.properties


-
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: Mac os x and class files

2003-02-24 Thread Peng Tuck Kwok
Hi Warren, classes can go into two places in a webapp, let's say I have
a myapp as an example
myapp
  |WEB-INF
   |-classes
   |-lib
You can put all your classes (if they are not in jar in classes, follow
whatever package structure you need) in the classes directory.
also :
you can put all your classes  in the lib directory if they are in a jar
file. Tomcat should be able to find your classes now.

Warrren Burholt wrote:
Hello Tony,

Thank you for your interest in my problem.

Here is what I see when I start Tomcat.

Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.1.18
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.1.18
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.18/temp
Using JAVA_HOME:   /usr
I am under the impression that Tomcat follows a specific hierarchy when  
searching for class files and consequently it is not necessary to set  
the CLASSPATH. However I set it as follows to see if it would help  
Tomcat find my classes. No.

CLASSPATH=/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/529_jsp_021103/ 
WEB-INF/classes:/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/WEB-INF/ 
classes:.

Tomcat does find the java. classes. The following is in my jsp file:

%@ page import=Plans021103%
%@ page import=SidebarTr%
%@ page import=java.util.HashMap %
%@ page import=java.io.* %
%@ page import=java.util.regex.* %
Only Plans021103 and SidebarTr are not found. Here is the beginning of  
the specific errors I see.

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

An error occurred at line: 12 in the jsp file:  
/529_jsp_021103/529Wrapper.jsp

Generated servlet error:
[javac] Compiling 1 source file
/usr/local/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/ 
529_jsp_021103/_529Wrapper_jsp.java:7: '.' expected
import Plans021103; (the caret is under the semi-colon)
 ^
/usr/local/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/ 
529_jsp_021103/_529Wrapper_jsp.java:8: '.' expected
import SidebarTr; (the caret is under the semi-colon)
 ^
/usr/local/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/ 
529_jsp_021103/_529Wrapper_jsp.java:60: cannot resolve symbol
symbol  : class Plans021103
location: class org.apache.jsp._529Wrapper_jsp
Plans021103 plans = new Plans021103(); (the caret is under the 
first  uppercase P)

I trust that there will be something in the above that jumps out at you.

Warren

Hi Warren,

What are values for JAVA_HOME,  CATALINA_HOME, CATALINA_BASE, and 
your  CLASSPATH?

Regards,

Tony

On Saturday, Feb 22, 2003, at 17:40 Europe/Berlin, Warrren Burholt  
wrote:

Here is the version of my  java 1.4.1 DP10.

java -version
java version 1.4.1
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-24)
Java HotSpot(TM) Client VM (build 1.4.1_01-12, mixed mode)
Since Tony states that he is using 1.4.1 and 4.1.18, I installed  
4.1.18. Running Tomcat standalone on 10.2.3 I have the same 
situation  as before. My class files are not being found. I've put 
them  everywhere I could  think to test.

/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/529_jsp_021103/WEB-INF/ 
classes
/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/WEB-INF/classes
/usr/local/jakarta-tomcat-4.1.18/common/classes
/usr/local/jakarta-tomcat-4.1.18/shared/classes
/usr/local/jakarta-tomcat-4.1.18/classes

Any additional suggestions for testing would be greatly appreciated.

Warren

From: Anthony Marlowe [EMAIL PROTECTED]
Date: Sat Feb 22, 2003  6:39:20 AM America/Montreal
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Mac os x and class files
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Hi,

I would like to know your Mac OS X configuration. I have Tomcat  
4.1.18 running standalone and in conjunction with JBoss 3.0.6 with  
Apples 1.4.n DP10 and OS X 10.2.4. With no problem what so ever.
This all works with 1.3.1 also with no problem. In addition I have  
mod_jk2 installed and running Apache 2.0.44 with no problem.

By the way I do not use the light version, I have also replace the  
LE version in JBoss to the full version. For your infor JBoss with  
Jetty works correctly.

Regards,

Tony

On Saturday, Feb 22, 2003, at 04:44 Europe/Berlin, Warrren Burholt  
wrote:

I'm using JDK 1.4.  I'll go back to 1.3 although my 4.0.3 has the  
exact same problem with finding classes whether I'm using 1.3 or  
1.4After I have 1.3 running, if the problem persists in 4.1.18  
(and not the 1.4 version!), at least I will know that the preview  
version is not the cause. And I did mean 4.1.18, although I see I  
have it named in usr/local as jakarta-tomcat-4.1.8-LE-jdk14  I'm  
really glad to hear that Tomcat works great on os x -- actually  
that has been my experience with  jakarta-tomcat-4.0.3 except for  
the class mystery.

Thank you for your help, Jake and Ian.


From: Jake Robb [EMAIL PROTECTED]
Date: Fri Feb 21, 2003  9:17:35 PM America/Montreal
To: Tomcat Users List 

Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue

2003-02-24 Thread Peng Tuck Kwok
Uhm michael, you need to decide where you want to put the jars in the 
first place, if you want the driver available to all webapps then you 
put it there. If you just want it for your webapp then you can put it 
into the lib directory. I'm not sure if it will cause major problems but 
it's best to put it in one place at one time first.
Also please check your spelling for your driver in the jsp code, you may 
have mispelled it and caused it to look for something else.



Michael Ni wrote:
ive copied to my
C:\Tomcat 4.1\webapps\ROOT\WEB-INF\lib
C:\Tomcat 4.1\common\lib
and it still doesn't work.
has anyone actually got their scripts to query from SQL Server 2000 
using the Microsoft SQL Server 2000 JDBC Driver?  seems like sun 
products never work with microsofts

michael ni



From: Galbayar Dorjgotov [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
Date: Tue, 25 Feb 2003 11:15:44 +0800
copy common\lib directory

-Original Message-
From: Michael Ni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:32 AM
To: [EMAIL PROTECTED]
Subject: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
My goal is to use JSP to query from my Microsoft SQL Server 2000.

I have successfully created my environments and installed the drivers for
the Microsoft SQL Server 2000 JDBC.
However when i run my script i get the following error

Driver not found:java.lang.ClassNotFoundException:
com.microsoft.jdbc.sqlserver.SQLServerDrivercom.microsoft.jdbc.sqlserver.SQL 

ServerDriver
exception: java.sql.SQLException: No suitable driverNo suitable driver
you can see for yourself at the following url

http://128.91.107.144:8080/test/home.jsp

I attached my home.jsp page.  Does tomcat need to have the microsoft 
drivers
physically in the folder or subfolders of c:\Tomcat 4.1?  All i did was
create the CLASSPATH which assigned CLASSPATH to the 3 jar driver files.
I've been stuck on this issue for 3 days.  Can anyone help me?





_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus


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


_
MSN 8 helps eliminate e-mail viruses. Get 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: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue

2003-02-24 Thread Peng Tuck Kwok
Ok, good to hear you got it to work but I'm curious, what was exact 
cause of the problem ?

Michael Ni wrote:
Thank you Ian Hunter and the rest of the tomcat crew!!!

Just got it to work!!!  I'm a grateful student from University of 
Pennsylvania trying to make a web application but new to java.  I'm 
spoiled by asp and IIS but I figure its time to move on to more powerful 
software.  Thanks Everyone you guys are awesome.

Mike Ni






From: Ian Hunter [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
Date: Mon, 24 Feb 2003 22:29:35 -0500
One reason to use WEB-INF\lib is if you plan on distributing your app or
deploying it to a different system, it's easier to move \webapps\app\*
than to worry about lots of little jars in common...
- Original Message -
From: Peng Tuck Kwok [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:31 PM
Subject: Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
 Uhm michael, you need to decide where you want to put the jars in the
 first place, if you want the driver available to all webapps then you
 put it there. If you just want it for your webapp then you can put it
 into the lib directory. I'm not sure if it will cause major problems 
but
 it's best to put it in one place at one time first.
 Also please check your spelling for your driver in the jsp code, you 
may
 have mispelled it and caused it to look for something else.




 Michael Ni wrote:
 
  ive copied to my
  C:\Tomcat 4.1\webapps\ROOT\WEB-INF\lib
  C:\Tomcat 4.1\common\lib
  and it still doesn't work.
 
  has anyone actually got their scripts to query from SQL Server 2000
  using the Microsoft SQL Server 2000 JDBC Driver?  seems like sun
  products never work with microsofts
 
  michael ni
 
 
 
  From: Galbayar Dorjgotov [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: RE: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
  Date: Tue, 25 Feb 2003 11:15:44 +0800
 
  copy common\lib directory
 
  -Original Message-
  From: Michael Ni [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 10:32 AM
  To: [EMAIL PROTECTED]
  Subject: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
 
 
  My goal is to use JSP to query from my Microsoft SQL Server 2000.
 
  I have successfully created my environments and installed the 
drivers
for
  the Microsoft SQL Server 2000 JDBC.
 
  However when i run my script i get the following error
 
  Driver not found:java.lang.ClassNotFoundException:
 
com.microsoft.jdbc.sqlserver.SQLServerDrivercom.microsoft.jdbc.sqlserver.SQL 

 
  ServerDriver
  exception: java.sql.SQLException: No suitable driverNo suitable 
driver
 
  you can see for yourself at the following url
 
  http://128.91.107.144:8080/test/home.jsp
 
  I attached my home.jsp page.  Does tomcat need to have the microsoft
  drivers
  physically in the folder or subfolders of c:\Tomcat 4.1?  All i 
did was
  create the CLASSPATH which assigned CLASSPATH to the 3 jar driver
files.
  I've been stuck on this issue for 3 days.  Can anyone help me?
 
 
 
 
 
  _
  MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
  http://join.msn.com/?page=features/virus
 
 
 
  
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  _
  MSN 8 helps eliminate e-mail viruses. Get 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]


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


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

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



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


Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue

2003-02-24 Thread Peng Tuck Kwok
Tomcat ignores the classpath, the only variable you need to setup on 
win2k (at least for me ) was the JAVA_HOME.

Michael Ni wrote:
Exact problem is tomcat can't read from the CLASSPATH and needs the 
actual files inside the web-inf folder.  So basically to get a 
connection you need to
1 install the sdk
2 install tomcat
3 get all the environmental variables correct
4 install the driver
5 (this is my problem) place a copy of the driver inside the web-inf folder

finally you can have your jsp pages find the driver and then query the 
database.

mike
learned a lot in the past few days





From: Peng Tuck Kwok [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
Date: Tue, 25 Feb 2003 11:57:15 +0800
Ok, good to hear you got it to work but I'm curious, what was exact 
cause of the problem ?

Michael Ni wrote:

Thank you Ian Hunter and the rest of the tomcat crew!!!

Just got it to work!!!  I'm a grateful student from University of 
Pennsylvania trying to make a web application but new to java.  I'm 
spoiled by asp and IIS but I figure its time to move on to more 
powerful software.  Thanks Everyone you guys are awesome.

Mike Ni






From: Ian Hunter [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
Date: Mon, 24 Feb 2003 22:29:35 -0500
One reason to use WEB-INF\lib is if you plan on distributing your 
app or
deploying it to a different system, it's easier to move 
\webapps\app\*
than to worry about lots of little jars in common...

- Original Message -
From: Peng Tuck Kwok [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:31 PM
Subject: Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
 Uhm michael, you need to decide where you want to put the jars in the
 first place, if you want the driver available to all webapps then you
 put it there. If you just want it for your webapp then you can put it
 into the lib directory. I'm not sure if it will cause major 
problems but
 it's best to put it in one place at one time first.
 Also please check your spelling for your driver in the jsp code, 
you may
 have mispelled it and caused it to look for something else.




 Michael Ni wrote:
 
  ive copied to my
  C:\Tomcat 4.1\webapps\ROOT\WEB-INF\lib
  C:\Tomcat 4.1\common\lib
  and it still doesn't work.
 
  has anyone actually got their scripts to query from SQL Server 2000
  using the Microsoft SQL Server 2000 JDBC Driver?  seems like sun
  products never work with microsofts
 
  michael ni
 
 
 
  From: Galbayar Dorjgotov [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: RE: Tomcat and Microsoft SQL Server 2000 JDBC Driver 
issue
  Date: Tue, 25 Feb 2003 11:15:44 +0800
 
  copy common\lib directory
 
  -Original Message-
  From: Michael Ni [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 10:32 AM
  To: [EMAIL PROTECTED]
  Subject: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
 
 
  My goal is to use JSP to query from my Microsoft SQL Server 2000.
 
  I have successfully created my environments and installed the 
drivers
for
  the Microsoft SQL Server 2000 JDBC.
 
  However when i run my script i get the following error
 
  Driver not found:java.lang.ClassNotFoundException:
 
com.microsoft.jdbc.sqlserver.SQLServerDrivercom.microsoft.jdbc.sqlserver.SQL 

 
  ServerDriver
  exception: java.sql.SQLException: No suitable driverNo suitable 
driver
 
  you can see for yourself at the following url
 
  http://128.91.107.144:8080/test/home.jsp
 
  I attached my home.jsp page.  Does tomcat need to have the 
microsoft
  drivers
  physically in the folder or subfolders of c:\Tomcat 4.1?  All i 
did was
  create the CLASSPATH which assigned CLASSPATH to the 3 jar driver
files.
  I've been stuck on this issue for 3 days.  Can anyone help me?
 
 
 
 
 
  _
  MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
  http://join.msn.com/?page=features/virus
 
 
 
  
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
[EMAIL PROTECTED]
 
 
 
  _
  MSN 8 helps eliminate e-mail viruses. Get 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: JDBC ORACLE implementation !

2003-02-24 Thread Peng Tuck Kwok
If you have already started on a filesystem and if it does what you want 
it  to do at a reasonable speed then stick with it :) .

Swapneel Dange wrote:
hey CHONG , PENG !

i think i have really given up the idea of putting up ORACKLE for my 
support. after all this discussion, i just think that there i sno urgent 
need for me to take up a HUMONGOUS taks of using ORACLE and i guess i 
will IMPLEMENT the SQLPLUS or the FILESYSTEM as my alternatives to the 
DATABASE application.

but in the end i would really like to know as to between SQLPLUS or 
FILESYSTEM, which will be convinient for me to HANDLE string stripping , 
string comparison and all that stuff ! ( BTW, i have really started 
implementing the FILESYSTEM to a good level )

do commment about this !

Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange







From: Chong Yu Meng [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: JDBC  ORACLE implementation !
Date: Tue, 25 Feb 2003 07:06:31 +0800
I think if you take Oracle installation, configuration and maintenance 
out of the picture, you definitely have a much more workable plan. I 
agree with Peter, in that designing the tables and application logic 
are going to be tough. I once wrote a servlet that processed CDR data 
from a Cisco switch, and I spent a lot of time getting the logic just 
right. If I understand you correctly, Swapneel, you need the database 
for storage only, correct ? Are you planning to use the Oracle text 
indexer, or are you implementing that yourself?

One last thing : JDBC may take you a shorter time to learn than the 2 
weeks I put down in an earlier email. On reflection, that is probably 
padding too much, but I recommend that you do not underestimate the 
time taken to get the JDBC connection going, especially for Oracle. 
I've had problems with 8.1.5 before and had to resort to DataDirect 
drivers. 8.1.7 seems to be ok, though.

Regards,
chong
Peter Lin wrote:

overall, using JDBC with Tomcat is the easy part. Deciding how to 
implement your tables and application logic will be the hard part. If 
your data is not normalized and doesn't need to be, then the first 
thing you should look into is statistical analysis of text. there are 
several well tested algo's for doing this type of processing. 
Unfortunately I don't know the name of the algo's. I worked on 
integrating personalization applications a couple years back relating 
to filtering news.

If your needs aren't too complex, it shouldn't take too long to 
implement some form of statistical analysis. Using file system to 
store the entire text doesn't necessarily mean you can't store the 
text summaries in Oracle. Google for related topics and you should be 
to find some examples. If you're needs are more complex, you'll need 
to look into grammar based parsing, which is a slow process. Most of 
the comparison between grammar based and statistical parsing has 
shown that statistical is more effective. hope that helps.

peter

Swapneel Dange [EMAIL PROTECTED] wrote:hey peter, mike  chong !

so if i stay with a small thing like SQLPLUS, the JDBC connectivity 
wont be a tough thing to do as compared to the ORACLE implementation. 
right ? because in last few days after consulting with some people 
in-house here, i am thinking over the OPTION of SQLPLUS.

do commment on this !

Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange



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


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

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



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


Re: having trouble using tomcat

2003-02-23 Thread Peng Tuck Kwok
Michael, what do you mean by it doesn't look like it works? You get 
errors on the page or just a blank screen, plus what version of tomcat 
are you using ?

Michael Ni wrote:
hi im new to tomcat.  im having trouble using jsp pages to query my 
microsoft sql server 2000.  does anyone know how to do this?  i've 
followed the microsoft instructions but it doens't work still.  i 
created the CLASSPATH environement variables, but my jsp code looks like 
it doens't work

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
%@ page import=java.sql.*, java.util.* errorPage=error.jsp %
html
head
 titleCurrent Election Results:/title
/head
body

h2Here are the latest voting results... /h2

%
   Class.forName(com.microsoft.jdbc.sqlserver.SQLServerDriver);
   Connection con = 
DriverManager.getConnection(jdbc:microsoft:sqlserver://128.91.107.105:1433;User=sa;Password=duder); 

   Statement stmt = con.createStatement();
   String queryStr = SELECT username FROM player;
   ResultSet rs = stmt.executeQuery(queryStr);
%
table border=0 cellspacing=0 cellpadding=2
tr bgcolor=lightgrey
th align=leftCandidate/th
th align=rightTotal Votes/th
/tr
%  while (rs.next()) {
 String firstname = rs.getString(1);
%

tr
td%= firstname % /td
td align=rightdfd/td
/tr
%
   }  // end while()
   // clean up.
   if (rs!=null) rs.close();
   if (stmt!=null) stmt.close();
   if (con!=null) con.close();
%
/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: having trouble using tomcat

2003-02-23 Thread Peng Tuck Kwok
Isn't that exactly the same as before ? ?


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



Re: Tomcat querry

2003-02-18 Thread Peng Tuck Kwok
In the tomcat directory, look for another directory called conf. Edit 
tomcat-users.xml with your fav linux editor and modify the users for 
your purposes.

Jayanshu Gandhi wrote:
Dear Sir,
I have installed tomcat-4.1.18 on red hat linux-8.0
My problem is how to set password and username for
administrator and manager and also for other users and
group. Kindly show me steps.

Thanking you,
Jayanshu Gandhi

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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






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




Re: WAR FILE NOT WORKING

2003-02-18 Thread Peng Tuck Kwok
If you have already defined a context in server.xml before a war file is 
created, then the directory for that context should exist. Otherwise if 
you run tomcat from the command line it will just quit. Try this :
remove the reference to the context called apps from your server.xml and 
remove (or move somewhere else) the apps directory under webapps. Place 
the war file you want in the webapps directory, start (restart if you 
are currently running) tomcat. They war file should deploy itself.

You can test the war file unpacking behaviour  by downloading a few 
examples on your own.


Nandish A wrote:
Hi Jake(Hope i can call you this way), 
		Thanks for your help, but (as usually) things work if extract myself. If i have to extract it myself then the purpose of the war file is not solved(as far as i am concerned). I would like to give the war file to my customer and the configuration of server.xml file, and i except it should extract and work fine. Jake i did not understand what is minus the .war.

Thanks and regards
Nandish

Second, if you configure this in server.xml and then expect a .war of the 
name apps.war to be extracted to a directory of the same name (minus the 
.war), you are mistaken.  You will need to shut down Tomcat and unpack 
this yourself first.  If you didn't configure anything in server.xml, then 
it would be unpacked like you expect.  It is all in Tomcat's 
documentation.  Don't feel alone on this one, though.  A lot of people have 
had this confusion and the behavior is somewhat of a contentious 
issue.  However, now that you know it works this way (whether we like it or 
not), you can work around it.

Jake

At 04:13 PM 2/18/2003 +0530, you wrote:

hi all i am using tomcat 4.1.17 windows 95. i tested my application 
keeping it in a directory apps on desktop and configuring the server.xml 
file. No when i create the war file of the directory
and place it in webapps when i restart my server the apps.war is not 
getting extracted and teh server crashes. i used
Context path=\ docBase=/apps  appBase=webapps debug=0 
reloadable=true crossContext=true privileged=true

any help any idea any opinion would be great
Regards
Nandish
-
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: WAR FILE NOT WORKING

2003-02-18 Thread Peng Tuck Kwok
See replies inline :
Nandish A wrote:

  I think my problem was not clear. I create a war file and 
put it in webapps and also i define a context for the directory which i
except to be created by the tomcat by extracting the war file. I  start
 my tomcat 4.1.12, it craches saying ..\webapps\apps does not exists 
or is not readable.
Yes, you define a context in server xml but did not create the physical 
directory for the context. So tomcat quits before it gets to the 
business of unpacking your wars, so no directory for you. If you didn't 
create a context(and directory in webapps) in the first place I'm 
preeety sure that the war file will be unpacked.


It is possible for you to define your own context outside of server.xml 
as is done with the admin web application. Just put the war file in the 
webapp directory along with its own xml file which defines its context.

I want to know
1) is it possible to put the war file with out extracting it and defining teh context. Use it like http:\\name:8080\apps\Welcome.jsp
2)If 1 cannot be done how do i use war file.(i dont want to extract it myself and define the context myself) i want to put the war file, define context and use it


Yes you can.  Look here 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html

-Original Message-
From:	Peng Tuck Kwok [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 19, 2003 10:05 AM
To:	Tomcat Users List
Subject:	Re: WAR FILE NOT WORKING

If you have already defined a context in server.xml before a war file is 
created, then the directory for that context should exist. Otherwise if 
you run tomcat from the command line it will just quit. Try this :
remove the reference to the context called apps from your server.xml and 
remove (or move somewhere else) the apps directory under webapps. Place 
the war file you want in the webapps directory, start (restart if you 
are currently running) tomcat. They war file should deploy itself.

You can test the war file unpacking behaviour  by downloading a few 
examples on your own.


Nandish A wrote:

Hi Jake(Hope i can call you this way), 
		Thanks for your help, but (as usually) things work if extract myself. If i have to extract it myself then the purpose of the war file is not solved(as far as i am concerned). I would like to give the war file to my customer and the configuration of server.xml file, and i except it should extract and work fine. Jake i did not understand what is minus the .war.

Thanks and regards
Nandish

Second, if you configure this in server.xml and then expect a .war of the 
name apps.war to be extracted to a directory of the same name (minus the 
.war), you are mistaken.  You will need to shut down Tomcat and unpack 
this yourself first.  If you didn't configure anything in server.xml, then 
it would be unpacked like you expect.  It is all in Tomcat's 
documentation.  Don't feel alone on this one, though.  A lot of people have 
had this confusion and the behavior is somewhat of a contentious 
issue.  However, now that you know it works this way (whether we like it or 
not), you can work around it.

Jake

At 04:13 PM 2/18/2003 +0530, you wrote:


hi all i am using tomcat 4.1.17 windows 95. i tested my application 
keeping it in a directory apps on desktop and configuring the server.xml 
file. No when i create the war file of the directory
and place it in webapps when i restart my server the apps.war is not 
getting extracted and teh server crashes. i used
Context path=\ docBase=/apps  appBase=webapps debug=0 
reloadable=true crossContext=true privileged=true

any help any idea any opinion would be great
Regards
Nandish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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





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





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




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




Re: A problem with Tomcat and port 8080

2003-02-17 Thread Peng Tuck Kwok
Something is running on port 8080, it looks like the old tomcat is 
running. You could try and kill all java processes in your machine to be 
sure then start up your new copy.

Michael Harrison wrote:
I'm running (or trying to) Tomcat 4.0.6 on RedHat 8.0 for PC. I installed Tomcat from a binary (ie. I just unpacked it and moved it into /usr/local. I ultimately hope to run it connected to Apache (2.0.44) through an ajp13 connector, but for now I just want the server to run by itself on port 8080.

When I startup Tomcat, it writes an error to logs/catalina.out about a BindException: address already in use:8080. To try to shut off whatever might be listening on 8080, I've made sure to kill the 'java' process for Tomcat and Apache (which starts automatically when rebooting). But I still get the same error.

Another strange thing: despite the BindException, the 'java' process keeps running. Executing shutdown.sh produces the four Using... lines of output and then hangs--I have to use Ctrl-C to get a prompt back, and the 'java' process continues to run.

Also: a bit of history. I had Tomcat working OK on 8080 a few days ago. Then I began working to set up the connector: I complied a mod_jk and set up httpd.conf with the proper directives. Something I did must have offended Tomcat, because it stopped responding on 8080. To get a fresh start, I downloaded a new copy of Tomcat this morning and installed it in a separate directory under /usr/local. It's this new copy that has been returning the BindException.

The sysadmin assures me that port 8080 is not being blocked on the machine, either.

Thanks,

Michael





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




Reading large log files with a servlet.

2003-02-17 Thread Peng Tuck Kwok
I've noticed that app servers like Sun One allows a administrator to 
view the contents of the log file in the administrative interface. Has 
anyone have any experience in doing that with a servlet in tomcat ? 
Could you share you experience please ? Thanks.


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



Re: webpage servlets !

2003-02-17 Thread Peng Tuck Kwok
In line 148 of your source code (I assume you haven't change or added 
anything to servlet) you write :

output.write (frame name=\frame\ 
src=\http://128.123.130.247:8080/webapps/ROOT/dange/frame0.html\;);


Try changing it to :

output.write (frame name=\frame\ 
src=\http://128.123.130.247:8080/dange/frame0.html\;);

As Wendy suggested you might want to look at changing your urls to use 
relative paths.

Swapneel Dange wrote:
Wendy !

i am creating a webpage using the HTML ags inside the servlets, and why 
i am using the .txt file becuase i find its easy to update my webpage 
using the .txt file whenever needed. but if i use straight away the HTML 
tags inside the servlet to access in the BROWSER the relevant webpage 
then everytime to make a small change i will have to change the HTML 
tags inside the servlet. Using a .txt file solves this problem that 
everytime i wont have to tamper my servlet code for any relevant changes 
in the WEBPAGE. i can just make the changes in the .txt and they will be 
reflected in the WEBAPGE.

but the problem i am having now is, i am not able to access the .html or 
the .txt file which is created by the servlet itself. as the servlet is 
not able to locate the file it creates by itself.

Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange









From: Wendy Smoak [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: webpage  servlets !
Date: Mon, 17 Feb 2003 13:05:47 -0700

 i think that the first thing u referred to the fact that i am 
generating a

 .txt and .html file , which eventually gets fed to the browser to 
view the

 webpage i want. Exactly thats what i am  trying to do but i think 
that i
 have somewhere in keeping the proper directory stucture.

Do you mean that inside your Servlet, you're using some sort of Writer 
and
generating text that gets saved to a file?

I can't imagine why you'd want to do this, but if you insist, then try a
relative path using '..' to back up one level and write the file.

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



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


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





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




Re: Urgent. pls help me out

2003-02-17 Thread Peng Tuck Kwok
Tomcat comes with documentation which is relevant to developers about 
deployment . You can look in the directory of tomcat to find it, or just 
 point your browser to http://localhost:8080/tomcat-docs


zafar ahsan wrote:
I have already installed tomcat and its working .
ok now can anyone help me how should i move now, i mean i have written a servlet with jdbc(oracle thin layer) and its compiling without error. Now where should i put it and also whats the best way to organise my application.
pls help me with an example,
where i have to create a directory for my application development and deployment.and whats r the steps that i should follow now.Would be pleased to know all about it if anyone can have little time for me.
thank u.


_
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus

-
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: webpage servlets !

2003-02-16 Thread Peng Tuck Kwok
How are you referring to the link in your html or jsp page?

Swapneel Dange wrote:

hi there !

i am running a servlet, which takes the username and then the password 
and opens another webpage in the browser , my servlet is under the 
webapps/ROOT/WEB-INF/classes but my .txt file for running the webpage 
are not inside the directory known as classes( i am generating a webpage 
by making a .txt file first and then making a .html file out of that)

the .txt and .html files are under webapps/ROOT/dange/ , and whenever i 
try to access the .txt files, i get some error like tha one i am sending 
here.

can anybody help me on this !


java.io.FileNotFoundException: 
C:\tomcat\jakarta-tomcat-3.1.1a\jakarta-tomcat-3.1.1a\webapps\ROOT\dange\frame0.html 
(The system cannot find the path specified)



Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange




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


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





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




Re: webpage servlets !

2003-02-16 Thread Peng Tuck Kwok
I do not see why you cannot access a directory under a legit webapp, 
much less get the text file you put in there.
 Can you please send your servlet code ?

Swapneel Dange wrote:
i am accesing the webpage inside the SERVLET itself. and i am trying to 


access them as normal webpage and normal .txt page, but the .txt page is 
then made into a .html page.

And there is no link as such on nay page for the webpage i am trying to 
access. i am accessing them through the html tags inside the servlet 
itself.


Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange





From: Peng Tuck Kwok [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: webpage  servlets !
Date: Mon, 17 Feb 2003 14:30:07 +0800

How are you referring to the link in your html or jsp page?

Swapneel Dange wrote:


hi there !

i am running a servlet, which takes the username and then the 
password and opens another webpage in the browser , my servlet is 
under the webapps/ROOT/WEB-INF/classes but my .txt file for running 
the webpage are not inside the directory known as classes( i am 
generating a webpage by making a .txt file first and then making a 
.html file out of that)

the .txt and .html files are under webapps/ROOT/dange/ , and whenever 
i try to access the .txt files, i get some error like tha one i am 
sending here.

can anybody help me on this !


java.io.FileNotFoundException: 
C:\tomcat\jakarta-tomcat-3.1.1a\jakarta-tomcat-3.1.1a\webapps\ROOT\dange\frame0.html 
(The system cannot find the path specified)



Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange




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


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





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




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


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





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




Re: Change Password od ADMIN

2003-02-13 Thread Peng Tuck Kwok
You can find the xml file tomcat-users.xml in the conf directory, edit 
the password attribute for the admin user.

Alberto A C A S Magalhães wrote:
Hi, where i can change the password of ADMIN.
Thanks





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




Re: NEW POST: How do I view this jsp???

2003-02-13 Thread Peng Tuck Kwok
I'm also stumped about your problem but it is due to the fact that you 
haven't included it. Post your code and lets see what you are up to.

Steve Burrus wrote:
*hi, I need help/assistance right now with viewing this particular jsp, 
a rather simple one, which displays the current date and time! Now, when 
I go to viewing it, any text which I might have written in it shows up 
OK, but the actual date and time does not. Now, what am i possibly 
lacking in the code anyway? I am really *stumped about this one. I have 
included the program for anyone out there who is still willing to help 
me. *




-
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: index.html and ipaddress ?

2003-02-13 Thread Peng Tuck Kwok
If you are running windows you can use your machine name to access the 
url but I doubt that'll work from outside. As for not using the port 
number 8080, you can configure tomcat to use port 80. Most browsers 
understand that webservers listen at port 80, so if you configure tomcat 
 to listen on port 80 you can access the url without specifying the port.
How to change the port? take a peek in the server.xml file, and look for 
8080, change it to 80.


but all the way do u know how to fix this problem i have - i want to 
replace the IPADDRESS of the machine on which TOMCAT is running with 
some name, lets say 'IAMTOMCAT' and can we get rid of the port number in 
the address for running the TOMCAT, so in the end can the address look 
like this -
http://IAMTOMCAT/index.html
awaitaing reply !




Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange









From: Jake Robb [EMAIL PROTECTED]
Reply-To: Jake Robb [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: index.html and ipaddress ?
Date: Thu, 13 Feb 2003 11:33:04 -0500

And do you want the current contents of the ROOT directory to remain
available?

If there's no reason you can't, then just put your stuff in ROOT.  If 
there
is, but you want to keep the current contents of ROOT, then just redefine
your contexts in server.xml so that / points to swapneel and something 
else
points to ROOT.

- Original Message -
From: Jake Robb [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, February 13, 2003 11:26 AM
Subject: Re: index.html and ipaddress ?


 Is there a reason you can't put your index.html file in the ROOT
directory?

 - Original Message -
 From: Swapneel Dange [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 13, 2003 11:24 AM
 Subject: index.html and ipaddress ?


  hi there !
 
  i am running a TOMCAT successfully, but if i want to see the page 
saying
  index.html , which is not in the 'ROOT' diretory under 'webapps' 
but its
  under another directory named 'swapneel', which is also under 
'webapps'.
 But
  whenever i say http://localhost:8080/index.html then it will 
always show
 the
  default page for the TOMCAT. i want my index.html in 'swapneel' to be
 shown
  on the browser.
 
  the other thing is that i want to replace the IPADDRESS of the 
machine
on
  which TOMCAT is running with some name, lets say 'IAMTOMCAT' and 
can we
 get
  rid of the port number in the address for running the TOMCAT, so 
in the
 end
  can the address look like this -
 
  http://IAMTOMCAT/index.html
 
  What are the files that need to be changed accordingly for this 
thing to
  work ? thanx to all !
 
  Swapneel Dange
  505-642-4126
  http://www.cs.nmsu.edu/~sdange
 
 
  _
  Help STOP SPAM with the new MSN 8 and get 2 months FREE*
  http://join.msn.com/?page=features/junkmail
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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


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





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




Re: Question relating to Apache Tomcat/4.1.18-LE-jdk14

2003-02-10 Thread Peng Tuck Kwok
You can include the necessary libraries in the jsp itself. Use this :
%@ page import=[put library name here] %

kam leung wrote:

Dear Sir/Madam,

I have installed the Apache Tomcat/4.4.18-LE-jdk14 server.  It is having 
error compiling a jsp file that I have got.  The error said cannot 
resolve symble for the Hashtable and Vector that I have used in the jsp 
file.  Following is the software environment that I am working in:

Operating system:  Windows ME
Java:  J2SDK 1.4.0_03

It seems that the auto created servlet resulting from the jsp file did 
not import java.util.*, hence it will be very much appreciated if you 
can let me know how I can fix this situation.

Thank you very much for your help.

Best regards,
K Leung.





_
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: Status 404 - resource not available

2003-02-10 Thread Peng Tuck Kwok
I think the servlet invoker (/servlet/myservlet) is off. Either turn it 
back on or make a servlet mapping on your own. And yes you will need the 
web.xml for the servlet mapping.

Kenny G. Dubuisson, Jr. wrote:
I don't have a web.xml defined.  In my old Tomcat 4.0.5 I didn't need one;
do I need one now?  Thanks,
Kenny

- Original Message -
From: Tim Moore [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 12:37 PM
Subject: RE: Status 404 - resource not available




Check your web.xml. Servlets and serlet mappings must be declared in
web.xml.  Check the servlet spec for details.

--
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863




-Original Message-
From: Kenny G. Dubuisson, Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 1:26 PM
To: Tomcat Users List
Subject: Re: Status 404 - resource not available


Sorry for the re-post but I didn't get any responses and I'm
really stuck on this.  Thanks, Kenny

- Original Message -
From: Kenny G. Dubuisson, Jr. [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 9:29 AM
Subject: Status 404 - resource not available




I just reloaded my development box and I can't get my servlet to be
recognized; I get a Status 404 error - resource not available.  I'm
not


sure


where to start diagnosing the problem.  My context (named kcmria)
works...ie if I put in http://192.168.1.61/kcmria I get the


directory


listing of $CATALINA_HOME/webapps/kcmria which is what I


would expect.
But


I can't get anything in


$CATALINA_HOME/webapps/kcmria/WEB-INF/classes


to


be


recognized.

I tried copying HelloWorldExample over to my servlet directory but
can't


see


it either.  I think it must be something with my context.  Here is
what


I've


defined in server.xml:

Context path=/kcmria docBase=kcmria debug=0


reloadable=true


crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_kcmria_log.
suffix=.txt timestamp=true /
/Context

My mod_jk.conf looks like this:

JkMount /kcmria ajp13
JkMount /kcmria/* ajp13

Any ideas where I should start looking?  Thanks,
Kenny





-


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




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




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





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






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




Re: MY ATTITUDE

2003-02-10 Thread Peng Tuck Kwok
First off, try and split your rant into several lines. I don't have a 
monitor that large to see everything in one line, I doubt everyone does.

Steve Burrus wrote:

I don't really care! I just had to get off of my chest a thing or two, and

 that is that just about all of you people out there in this newsgroup 
seem to have
in for me in a really big way!!
Sorry, wrong place to take things of your chest.  People are just 
annoyed with the way you respond to them, judging from the replies that 
they sent.

You make me feel like I should first drop dead and then possibly--if I could--
drop off of the face of this Earth!! 
Maybe I should consult a psychologist/psychiatrist about this,
Maybe you should. Or just try to clear your mind and solve your tomcat 
related issues one at a time.

but I have felt for a long time in my life that nobody in the whole 
wide world
knows or wants to know that I AM ALIVE AT ALL.


I dare anyone to respond to me 
WITHOUT saying to me the same old things in the way of an admonition 
that I have
certainly heard so much of from so many of u recently. Thank You
I recall from the list that people have replied to you in a polite 
manner so  I don't see the point in you issuing the challenge.








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



Re: exception after several hours idle

2003-02-09 Thread Peng Tuck Kwok
Could you check and see if your database terminates connections after a 
certain amount of inactivity ? If so you can try and increase the 
duration. Might be worth a shot.

Vladimir Kirillov wrote:
Why do you suspect that it is a problem with the database connection?


First there was an exception from JDBC driver that I use. I set conntection
timeout.
But there is a porblem somewhere else.



Can you determine if you are running out of disk space somewhere?  Or
perhaps you are trying to safe a file to a location where you don't have
sufficient permissions to do so.  Or perhaps you are trying to load a file
that does not exist?


If I was trying to load non-existing file, I would get this exception any
time.
It appeares only after several hours of running idle.

Regards,

Vladimir Kirillov




-
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: JNDI jdbc resources

2003-01-27 Thread Peng Tuck Kwok
Hmm, Paul your url(in server.xml) looks a bit weird to me. Sure it is 
correct ?
I have mind written of the form
 parameter
  nameurl/name
  valuejdbc:sapdb://[url or ip]/[db name]/value
  /parameter

instead of valuejdbc:sybase:Tds:PowerBookPaul:11222/multiLeague/value

What's the Tds and don't we need the // before the machine name ?
If you are sure that this is correct then don't worry about what I just 
wrote. Just something you can double check. Also where did you put the 
db driver?

Paul Carpenter wrote:
Hi Peng

For Shawn's benefit - the context you see is in my server.xml (well,  
actually, a separate xml file just like the manager.xml and admin.xml  
in the /webapps directory).

Based on the other posting to the list, I've tried both with the  
web.xml file having nothing for the resource defined, and also as below  
(after the servlet mappings):

resource-ref
  description
Resource reference to a factory for java.sql.Connection
instances that may be used for talking to a particular
database that is configured in the server.xml file.
  /description
  res-ref-name
jdbc/DBmultileague
/res-ref-name
  res-type
javax.sql.DataSource
  /res-type
  res-auth
Container
  /res-auth
/resource-ref



Thanks
Paul

On Monday, January 27, 2003, at 09:21  AM, Peng Tuck Kwok wrote:

Let's have a look at your web.xml as well. Might be helpful.

Paul Carpenter wrote:


Hi All
I've scoured the list and got so close, yet so far from making the  
jdbc  stuff work. With some help from Manav and other postings, this  
is what  i see. can anyone solve the riddle?
Please see the cut'n'pastes below. I draw you attention to the fact   
that the connection looks good right up to the point where it's used  
-  like the DataSource object is good (because ds != null is 
true),  yet  the getConnection method throws the often seen Cannot 
load JDBC  driver  class 'null' error.
I know this is very close...what's missing?
I'm sure my jars are in the right place, as a regular forClass  
approach  in the same webapp works with no problems?
Thanks
Paul
tomcat 4.1.12, Mac OSX 10.2.3
Output from my test servlet:
Simple lookup test :
dbName : org.apache.commons.dbcp.BasicDataSource@25debb
list() on /comp/env Context :
Binding : jdbc: org.apache.naming.NamingContext
listBindings() on /comp/env Context :
Binding : jdbc:   
org.apache.naming.NamingContext:org.apache.naming.NamingContext@41f80c
list() on full Context :
Binding : DBmultileague: org.apache.commons.dbcp.BasicDataSource
listBindings() on full Context today:
Binding : DBmultileague:   
org.apache.commons.dbcp.BasicDataSource:org.apache.commons.dbcp.BasicD 
at aSource@25debb
Connecting1 : Connecting2 : Connecting3 : Query1 :
The relevant servlet code;
try {
out.println(list() on full Context : );
NamingEnumeration enum2 =  ctx.list(java:/comp/env/jdbc/);
while (enum2.hasMoreElements()) {
out.print(Binding : );
out.println(enum2.nextElement().toString());
}
out.println(listBindings() on full Context today: );
enum2 = ctx.listBindings(java:/comp/env/jdbc/);
while (enum2.hasMoreElements()) {
out.print(Binding : );
out.println(enum2.nextElement().toString());
}
} catch (NamingException e) {
out.println(JNDI lookup failed :  + e);
}
try{
Context ctx2 = new InitialContext();
out.print(Connecting1 : );
 Context envCtx2 = (Context)   
ctx2.lookup(java:/comp/env/);
out.print(Connecting2 : );
 DataSource ds = (DataSource)   
envCtx2.lookup(jdbc/DBmultileague);
out.print(Connecting3 : );
  if (ds != null) {
out.print(Query1 : );
Connection conn = ds.getConnection();
out.print(Query2 : );
The context/resource definition:
Context path=/DBmultileague-0.1-dev  
docBase=DBmultileague-0.1-dev  debug=5 reloadable=true   
naming=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_DBmultileague_log. suffix=.txt   
timestamp=true/
   Resource name=jdbc/DBmultileague  
auth=Container  type=javax.sql.DataSource/
ResourceParams name=jdbc/DBmultileague
ParameternamemaxIdle/namevalue3000/value/Parameter
ParameternamemaxActive/namevalue10/value/Parameter
ParameternamemaxWait/namevalue10/value/Parameter
Parameternameusername/namevaluesa/value/Parameter
Parameternamepassword/namevalue/value/Parameter
Parameter
namefactory/name
 
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/Parameter
  Parameter

Re: JNDI jdbc resources

2003-01-26 Thread Peng Tuck Kwok
Let's have a look at your web.xml as well. Might be helpful.

Paul Carpenter wrote:

Hi All

I've scoured the list and got so close, yet so far from making the jdbc  
stuff work. With some help from Manav and other postings, this is what  
i see. can anyone solve the riddle?

Please see the cut'n'pastes below. I draw you attention to the fact  
that the connection looks good right up to the point where it's used -  
like the DataSource object is good (because ds != null is true), yet  
the getConnection method throws the often seen Cannot load JDBC driver  
class 'null' error.

I know this is very close...what's missing?

I'm sure my jars are in the right place, as a regular forClass approach  
in the same webapp works with no problems?


Thanks
Paul

tomcat 4.1.12, Mac OSX 10.2.3

Output from my test servlet:
Simple lookup test :
dbName : org.apache.commons.dbcp.BasicDataSource@25debb
list() on /comp/env Context :
Binding : jdbc: org.apache.naming.NamingContext
listBindings() on /comp/env Context :
Binding : jdbc:  
org.apache.naming.NamingContext:org.apache.naming.NamingContext@41f80c
list() on full Context :
Binding : DBmultileague: org.apache.commons.dbcp.BasicDataSource
listBindings() on full Context today:
Binding : DBmultileague:  
org.apache.commons.dbcp.BasicDataSource:org.apache.commons.dbcp.BasicDat 
aSource@25debb
Connecting1 : Connecting2 : Connecting3 : Query1 :

The relevant servlet code;
try {
out.println(list() on full Context : );
NamingEnumeration enum2 = ctx.list(java:/comp/env/jdbc/);
while (enum2.hasMoreElements()) {
out.print(Binding : );
out.println(enum2.nextElement().toString());
}
out.println(listBindings() on full Context today: );
enum2 = ctx.listBindings(java:/comp/env/jdbc/);
while (enum2.hasMoreElements()) {
out.print(Binding : );
out.println(enum2.nextElement().toString());
}
} catch (NamingException e) {
out.println(JNDI lookup failed :  + e);
}
try{
Context ctx2 = new InitialContext();
out.print(Connecting1 : );
 Context envCtx2 = (Context)  
ctx2.lookup(java:/comp/env/);
out.print(Connecting2 : );
 DataSource ds = (DataSource)  
envCtx2.lookup(jdbc/DBmultileague);
out.print(Connecting3 : );

  if (ds != null) {
out.print(Query1 : );
Connection conn = ds.getConnection();
out.print(Query2 : );

The context/resource definition:
Context path=/DBmultileague-0.1-dev docBase=DBmultileague-0.1-dev  
debug=5 reloadable=true  naming=true crossContext=true
   
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_DBmultileague_log. suffix=.txt  
timestamp=true/
   
Resource name=jdbc/DBmultileague auth=Container  
type=javax.sql.DataSource/

ResourceParams name=jdbc/DBmultileague
ParameternamemaxIdle/namevalue3000/value/Parameter
ParameternamemaxActive/namevalue10/value/Parameter
ParameternamemaxWait/namevalue10/value/Parameter
Parameternameusername/namevaluesa/value/Parameter
Parameternamepassword/namevalue/value/Parameter
Parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/Parameter
  Parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
/Parameter
Parameter
nameurl/name
valuejdbc:sybase:Tds:PowerBookPaul:11222/multiLeague/value
/Parameter
ParameternameinitialPoolSize/namevalue2/value/Parameter
/ResourceParams





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




Re: Connection pooling for MS Sql server

2003-01-26 Thread Peng Tuck Kwok

My problem is i have to specify username and password for MS Sql server.
Password i can specify Here
   parameter
		  namepassword/name
		  value/value
		/parameter

But Where to specify  the user name?

You can specify the username as another parameter.

parameter
nameusername/name
value/value
/parameter



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




Re: Difficulties with Windows 2000 Installation of Tomcat 4.1

2003-01-22 Thread Peng Tuck Kwok
First, the little bit of not being able to stop the server, yeah you can 
stop it, but the tomcate (according to what I read from your email) 
implies that it is running as a service. If you want to stop it you need
to open the win2k service and stop it. Set it to manual so that it 
doesn't run on startup if you need to .

Secondly  the documentation bits: I think the version of tomcat you 
download should contain the correct documentation for that tomcat. If 
you really need to look at the 4.1 docs take a look here:

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

Are the documentations geared towards Unix or linux gurus? Sounds like a 
loaded question to me :), but if you asked me it was ok for me.

About the cgi bit, the reference is here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html , rather 
brief and I haven't tried using it yet.



Finally is it statements like this : $CATALINA_BASE/server/lib/ which 
imply unix or linux like docs :) ? Just substitute $CATALINA_BASE with 
where you installed tomcat. uh, hope this clears things up a bit.



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



Re: Apache Version

2003-01-21 Thread Peng Tuck Kwok
Tammer Salem wrote:

Hi,
Does anyone know what version of Apache Webserver comes with Tomcat 4.1.18?


None. Apache is available as a seperate download.


thanks,
Tammer Salem




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




Re: Connection pooling

2003-01-21 Thread Peng Tuck Kwok
Venkat wrote:

Hi,

How to set up a connection poll and use the connection pool from jsp in
tomcat4.0?

Any url or doc will help's me.


Look up the tomcat docs , go to the section that says jndi datasources. 
There is a copy of the docs that come with each distribution of tomcat. 
That should set you in the right direction.

Thank you

regards
venkat


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






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




Re: Apache Version

2003-01-21 Thread Peng Tuck Kwok
Tammer Salem wrote:

Then Tomcat has it's own web server?
Can anyone point me to any reference documentation that shows how this
works?

Tomcat can serve html pages, if you'd poke around in the ROOT webapp you 
will see plenty of html pages in there. Basically if your webapp needs 
to have html pages you just dump them in the webapp directory. You will 
be able to request the page from the browser.

The document link is here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html

which should also come with your copy of tomcat.





Tammer Salem wrote:


Hi,
Does anyone know what version of Apache Webserver comes with Tomcat


4.1.18?


None. Apache is available as a seperate download.



thanks,
Tammer Salem




--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]


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






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




Re: Apache Tomcat Virtual Host

2003-01-19 Thread Peng Tuck Kwok
Seems like the mime type is not set properly. Check and see if you have 
set it, tomcat should have it set ok, you may need to configure your web 
server to do the same if it hasn't already.

Chris Schild wrote:
Hi all,
I am a newbie to Tomcat.  I'm having a problem with configuring the virtual host with Tomcat.  

The problem is that I cannot get the examples/jsp to work with the virtual host?!?  

A window pops up asking to open or save the source when I try to execute an example.

I'm sure I need to be more specific, I'm not quite sure what to ask at this point.  Do I not have the correct paths configured with Tomcat?

http://localhost/examples/jsp/index.html is functioning correctly.

I have gone thru the archives but nothing seems to be pointing me in the right direction.

Any advice would be much appreciated!



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




Re: Name jdbc:comp is not bound in this context

2003-01-14 Thread Peng Tuck Kwok
Nicole Hibbard wrote:

I resolved my own problem, and should have caught it along time ago.  I
needed to install the standard 4.1.18 to access JNDI resources.  Hope that
this might help someone else in the future.

I'm using 4.1.12 and jndi resources work fine :) .



-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 4:45 PM
To: Tomcat Users List
Subject: RE: Name jdbc:comp is not bound in this context



Is this an issue encountered by users of tomcat 4.1.18.Le?  Should i try
reinstalling and configuring an earlier version?  I've see serveral
discussion regarding this topic and I've tried everything suggested... what
should I do now?

-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:45 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Name jdbc:comp is not bound in this context


Thanks for the reply :).  Unfoutunately I added the useNaming=true and I
still have the same results. I'm really stuck here... do you have any other
suggestions.

-Original Message-
From: Justin L. Spies [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:31 PM
To: 'Tomcat Users List'
Subject: RE: Name jdbc:comp is not bound in this context


Nicole,
Not sure if this was answered, but I'll give it a try.  When I had this
problem, I found that I needed to add useNaming=true to both the Host
... entry and to the Context ... entry.

Sincerely,
Pantek Incorporated
Justin L. Spies

URL: http://www.pantek.com
Ph   440.519.1802
Fax  440.248.5274
Cell 440.336.3317

-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:11 PM
To: [EMAIL PROTECTED]
Subject: Name jdbc:comp is not bound in this context


I've gone through every resource I have in trying to test a connection
to MySql database.

I am using Tomcat 4.1.18-LE and MySql 3.23.53 and java 1.4.1_01.

I set priveleges on MySql, put the mm.sql driver's jar in common/lib. I
set my Classpath Variable

.;C:\ServletDev;C:\jakarta-tomcat-4.1.18-LE-jdk14\common\lib\servlet.jar
;C:\
mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar

I added the following to my server.xml


!--1/07/2002  Nicole Hibbard
The following block of code add the datasource for
connecting
	mysql database using Connector J Driver --

	Context path=/DBTest docBase=DBTest
		debug=5 reloadable=true crossContext=true

	Logger className = org.apache.catalina.logger.FileLogger
		prefix=localhost_DBTest_log. suffix=.txt
		timestamp=true/
	Resource name=jdbc/TestDB
		auth=Container
		type=javax.sql.DataSource/

	ResourceParams name = jdbc/TestDB
		parameter
		  namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
		/parameter

	!--Maximum number of dBconnections in pool.  Make sure you
configure your
	mysqld max_connection large enough to handle all you
connections--

		parameter
		  namemaxActive/name
		  value100/value
		/parameter

		parameter
		  namepassword/name
		  valuejavadude/value
		/parameter

	!-- Class name for JDBC driver --

		parameter
		  namedriverClassName/name
		  valuecom.mysql.jdbc.Driver/value
		/parameter

	!--  The JDBC connection url for connecting to your mysql db
		if the connection closes then auto connect --

		parameter
		  nameurl/name

valuejdbc:mysql://localhost/javatest?user=javauser/value
		/parameter

	/ResourceParams

	/Context

	!--End of code from 1/7/2003 for Nicole Hibbard--

I created a web.xml in DBTest/WEB-INF

?xml version=1.0 encoding=ISO-8859-1?
	!DOCTYPE web-app PUBLIC
	-//Sun Microsystems, Inc.//DTD Web Application 2.3//DN
	http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

	descriptionMySQL Test App /description
	resource-ref
		descriptionDB Connection/description
		res-ref-namejdbc/TestDB/res-ref-name
	res-typejavax.sql.DataSource/res-type
	res-authContainer/res-auth
/resource-ref
/web-app

I have a jsp in web-apps/DBTest

html
  head
titleDB Test/title
  /head
  body

  %
foo.DBTest tst = new foo.DBTest();
tst.init();
  %

  h2Results/h2
Foo %= tst.getFoo() %br/
Bar %= tst.getBar() %


  /body
/html


I have a DBTest.class in Webapps/DBtest/foo

package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

  String foo = Not Connected;
  int bar = -1;

  public void init() {
try{
  Context ctx = new InitialContext();
  if(ctx == null )
  throw new Exception(Boom - No Context);

  DataSource ds =
(DataSource)ctx.lookup(
   java:comp/env/jdbc/TestDB);
  if (ds == null) foo= Datasource is null;

  if (ds != null) {
Connection conn = ds.getConnection();

  if (conn == null) foo=got datasource, no connection;
if(conn != null)  {
foo = Got Connection +conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst =
stmt.executeQuery(
 

Re: Name jdbc:comp is not bound in this context

2003-01-14 Thread Peng Tuck Kwok
I think the LE version just omits the xml parsers and just uses the one 
that the jdk 1.4 has. There is no mention of omitting key features like 
that in the LE versions. Can someone else comment?

Nicole Hibbard wrote:
I was using the LE version and needed to use the standard which supports
JNDI resources.:)

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 4:18 PM
To: Tomcat Users List
Subject: Re: Name jdbc:comp is not bound in this context


Nicole Hibbard wrote:


I resolved my own problem, and should have caught it along time ago.  I
needed to install the standard 4.1.18 to access JNDI resources.  Hope that
this might help someone else in the future.


I'm using 4.1.12 and jndi resources work fine :) .



-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 4:45 PM
To: Tomcat Users List
Subject: RE: Name jdbc:comp is not bound in this context



Is this an issue encountered by users of tomcat 4.1.18.Le?  Should i try
reinstalling and configuring an earlier version?  I've see serveral
discussion regarding this topic and I've tried everything suggested...


what


should I do now?

-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:45 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Name jdbc:comp is not bound in this context


Thanks for the reply :).  Unfoutunately I added the useNaming=true and I
still have the same results. I'm really stuck here... do you have any


other


suggestions.

-Original Message-
From: Justin L. Spies [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:31 PM
To: 'Tomcat Users List'
Subject: RE: Name jdbc:comp is not bound in this context


Nicole,
Not sure if this was answered, but I'll give it a try.  When I had this
problem, I found that I needed to add useNaming=true to both the Host
... entry and to the Context ... entry.

Sincerely,
Pantek Incorporated
Justin L. Spies

URL: http://www.pantek.com
Ph   440.519.1802
Fax  440.248.5274
Cell 440.336.3317

-Original Message-
From: Nicole Hibbard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:11 PM
To: [EMAIL PROTECTED]
Subject: Name jdbc:comp is not bound in this context


I've gone through every resource I have in trying to test a connection
to MySql database.

I am using Tomcat 4.1.18-LE and MySql 3.23.53 and java 1.4.1_01.

I set priveleges on MySql, put the mm.sql driver's jar in common/lib. I
set my Classpath Variable

.;C:\ServletDev;C:\jakarta-tomcat-4.1.18-LE-jdk14\common\lib\servlet.jar
;C:\
mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar

I added the following to my server.xml


!--1/07/2002  Nicole Hibbard
   The following block of code add the datasource for
connecting
	mysql database using Connector J Driver --

	Context path=/DBTest docBase=DBTest
		debug=5 reloadable=true crossContext=true

	Logger className = org.apache.catalina.logger.FileLogger
		prefix=localhost_DBTest_log. suffix=.txt
		timestamp=true/
	Resource name=jdbc/TestDB
		auth=Container
		type=javax.sql.DataSource/

	ResourceParams name = jdbc/TestDB
		parameter
		  namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
		/parameter

	!--Maximum number of dBconnections in pool.  Make sure you
configure your
	mysqld max_connection large enough to handle all you
connections--

		parameter
		  namemaxActive/name
		  value100/value
		/parameter

		parameter
		  namepassword/name
		  valuejavadude/value
		/parameter

	!-- Class name for JDBC driver --

		parameter
		  namedriverClassName/name
		  valuecom.mysql.jdbc.Driver/value
		/parameter

	!--  The JDBC connection url for connecting to your mysql db
		if the connection closes then auto connect --

		parameter
		  nameurl/name

valuejdbc:mysql://localhost/javatest?user=javauser/value
		/parameter

	/ResourceParams

	/Context

	!--End of code from 1/7/2003 for Nicole Hibbard--

I created a web.xml in DBTest/WEB-INF

?xml version=1.0 encoding=ISO-8859-1?
	!DOCTYPE web-app PUBLIC
	-//Sun Microsystems, Inc.//DTD Web Application 2.3//DN
	http://java.sun.com/dtd/web-app_2_3.dtd;
web-app

	descriptionMySQL Test App /description
	resource-ref
		descriptionDB Connection/description
		res-ref-namejdbc/TestDB/res-ref-name
	res-typejavax.sql.DataSource/res-type
	res-authContainer/res-auth
/resource-ref
/web-app

I have a jsp in web-apps/DBTest

html
 head
   titleDB Test/title
 /head
 body

 %
   foo.DBTest tst = new foo.DBTest();
   tst.init();
 %

 h2Results/h2
   Foo %= tst.getFoo() %br/
   Bar %= tst.getBar() %


 /body
/html


I have a DBTest.class in Webapps/DBtest/foo

package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

 String foo = Not Connected;
 int bar = -1;

 public void init() {
   try{
 Context ctx = new InitialContext();
 if(ctx == null )
 throw new Exception(Boom

Jasper error

2003-01-14 Thread Peng Tuck Kwok
Has anyone encountered an error like this?

org.apache.jasper.JasperException: connect: Address is invalid on local 
machine, or port is not valid on remote machine
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

I'm using a jsp page to invoke a class which uses HTTPURL connection. 
The error only occurs intermitently .


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



Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
The name is not defined correctly in that context.
What kind of a resource is it  ?

David Durst wrote:

Does anyone know what this is caused by?
I have admin/larco defined as a resource in server.xml
and I am using the resource under admin.

Why is this causing a problem




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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
The server.xml looks right .
What about the web.xml in your webapp ?
How does it look like ?

David Durst wrote:

The name is not defined correctly in that context.
What kind of a resource is it  ?



   Context path=/admin docBase=sfadmin debug=1
  Resource name=jdbc/larco auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/larco
parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternamedriverClassName/namevalueorg.postgresql.Driver/value/parameter
parameternameurl/namevaluejdbc:postgresql://127.0.0.1:5432/larco/value/parameter
parameternamemaxActive/namevalue60/value/parameter
parameternamemaxIdle/namevalue20/value/parameter
parameternameusername/namevalue*/value/parameter
parameternamepassword/namevalue*/value/parameter
  /ResourceParams
/Context


David Durst wrote:


Does anyone know what this is caused by?
I have admin/larco defined as a resource in server.xml
and I am using the resource under admin.

Why is this causing a problem




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





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






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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
Sure it won't work.
Check out the res-ref-name. Here you claim it is admin/larco , but in 
server.xml you tell tomcat it is jdbc/larco. So if you do a lookup for 
jdbc/larco or admin/larco the name is not bound to the context. 
admin/larco should be jdbc/larco.
Make the changes and see if it works.

David Durst wrote:
The server.xml looks right .
What about the web.xml in your webapp ?
How does it look like ?


The strange thing is, I don't have it defined in the web.xml.

That is because as soon as I do it I got a jdbc connection 'null' can't be
loaded or something like that.

But I had it working w/ out it for the last 3 hours.

Now it won't work.

but here is the web.xml nyways

web-app
!--  resource-ref
descriptionpostgreSQL Datasource example/description
res-ref-nameadmin/larco/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref --
/web-app




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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
Sounds like you don't have the appropiate driver loaded or you have 
incorrectly specified your pgsql driver in server.xml. Double check the 
values. I make that mistake alot.

David Durst wrote:
Sure it won't work.
Check out the res-ref-name. Here you claim it is admin/larco , but in
server.xml you tell tomcat it is jdbc/larco. So if you do a lookup for
jdbc/larco or admin/larco the name is not bound to the context.
admin/larco should be jdbc/larco.
Make the changes and see if it works.


Sorry that is because I had been moving the names back and forth to try to
get them to work.

I just un-commented, changed the name, stopped  started tomcat.

This is what I get now :)
java.sql.SQLException: Cannot load JDBC driver class 'null'



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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
David Durst wrote:

Sounds like you don't have the appropiate driver loaded or you have
incorrectly specified your pgsql driver in server.xml. Double check the
values. I make that mistake alot.



I have gotten that answer like 10 times now :(
I have the correct driver specified :)
I must have because I had this all working up until about 30 minutes ago.

Well 



I have the jar in both common/lib/ and sfadmin/WEB-INF/lib

You should only have it in common/lib, for this purpose.




I am starting to think the whole DBCP thing is very unstable.

It's working for me and quite a few other people who have been using it.
I've used it on postgresql as well. Works like a charm. Currently using 
it on sapdb, about three to four sites. Some other guy I know is using 
oracle.





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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
I've used DBCP on 4.1.12 and 4.0.X

David Durst wrote:

David Durst wrote:


Sounds like you don't have the appropiate driver loaded or you have
incorrectly specified your pgsql driver in server.xml. Double check
the values. I make that mistake alot.



I have gotten that answer like 10 times now :(
I have the correct driver specified :)
I must have because I had this all working up until about 30 minutes
ago.


Well 



I have the jar in both common/lib/ and sfadmin/WEB-INF/lib


You should only have it in common/lib, for this purpose.


I will remove it from sfadmin/WEB-INF/lib
see what I get.

BTW what version of Tomcat are you using???



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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
David Durst wrote:

I've used DBCP on 4.1.12 and 4.0.X



well, its now working.
Strangely enough haveing the driver in WEB-INF/lib causes a problem,
somone should document that on the page (Specifically telling people where to
put the jar)

Strangely enough they did. If you have some time and go through the 
docs(which you should anyway) it is mentioned there.




Thanks for the help



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






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




Re: javax.naming.NameNotFoundException: Name admin is not bound inthis Context

2003-01-13 Thread Peng Tuck Kwok
print out the connection object. See what it says.
For example in this code fragment :

 datafinder = new JNDIFinder(java:comp/env/jdbc/AthenaDB) ;
 ds = datafinder.ReturnDataSource() ;
 if(ds!=null){
 	Connection conn = ds.getConnection() ;
	System.out.println(conn.toString()) ;


Should result in some text with the word DBCP being printed out along 
with a number.

David Durst wrote:
I've used DBCP on 4.1.12 and 4.0.X


BTW how do you verify that the connections are being pooled



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






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




Re: ldap library for tomcat

2003-01-12 Thread Peng Tuck Kwok
Martin Smith wrote:

I don't think he needs an LDAP library: I think he needs to use 
JNDIRealm authentication . Haven't checked lately,
but I have the 
impression that's in the standard Tomcat distribution now.

Yes it is in the standard Tomcat distribution now. I think it has been 
included since version 4 came out. Can't say much about version 3 .




martin


Eriam Schaffter wrote:


Or maybe a free one .. have a look at com.novell.ldap on 
http://www.openldap.org ..

eriam

Rob A. Augustinus a écrit:

import javax.naming.ldap;

-Original Message-
From: Fathi Ben Nasr [mailto:[EMAIL PROTECTED]] Sent: Saturday, 
January 11, 2003 5:40
To: 'Tomcat Users List'
Subject: ldap library for tomcat



Hello,

   Can someone tell me where can I find a free (open source or a like)
ldap.jar for tomcat as I want to set up tomcat to authenticate users
aginst an openldap directory server.

TIA.
Fathi B.N.

(See attached file: smime.p7s)


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

-
Ce courrier a ete considere comme non infecte par les virus connu de 
notre outil de detection. Soyez cependant prudent avec les pieces 
jointes. Merci.

 





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







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





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




Re: Cannot load JDBC driver class 'null'

2003-01-10 Thread Peng Tuck Kwok
I have experience that before, but that was my fault rather than tomcat.
I put the source jar instead of the driver binary. Other than that  DBCP 
worked as described in the tomcat documents. Cannot load JDBC driver 
class null usually means that it couldn't find the jdbc driver that you 
specified in the server.xml .

David Durst wrote:
Has anyone else experienced this
I have read a couple of posts that I found off google,
and basically what they are saying is non of the information in
the server.xml file is being passed to the Datasource or something of
that nature.

The suggested fix was to hardcode everything but that kind of defeats
the purpose.

Does anyone know how to fix this issue w/ out hardcoding??



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






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




Re: Help with Tomcat 4.1 installation please?

2003-01-08 Thread Peng Tuck Kwok
Are you installing tomcat from a exe ?
If so you may have already started tomcat from the service, in this case 
 it is already started, you can test by going to port 8080 on your own 
machine using the web browser.
If you prefer to run from a batch file, either stop the current service 
and disable it from running.

It's also possible you might be running something else on that port.


Mark wrote:
Hi, I am attempting to install and run Tomcat 4.1 on my Windows XP system.  I have followed the instructions as far as:
  1. Downloading and installing J2SDK 1.4.1_01
  2. Setting the CATALINA_HOME variable to c:\Program Files\Apache Group\Tomcat 4.1
  3. Setting the JAVA_HOME variable to c:\j2sdk1.4.1_01
  4. Including %JAVA_HOME%\bin in the PATH variable.
  5. Restarting the computer.

Problem: When I click on the Start Tomcat icon, a window appears, a listing appears briefly in the window and then the window quickly disappears.

At the command prompt, I get the following listing for the startup command and the shutdown commands:

C:\Program Files\Apache Group\Tomcat 4.1\binstartup
Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
Using JAVA_HOME:   c:\j2sdk1.4.1_01

C:\Program Files\Apache Group\Tomcat 4.1\binshutdown
Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
Using JAVA_HOME:   c:\j2sdk1.4.1_01
Catalina.stop: java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
C:\Program Files\Apache Group\Tomcat 4.1\bin

I'm not sure what's really supposed to happen at this point, but something doesn't seem right.  Any help would be greatly appreciated. Thanks in advance.

Mark Steere
[EMAIL PROTECTED]





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




Re: tomcat 4.1.12 just stopped working, help !

2003-01-07 Thread Peng Tuck Kwok
Hmm, it looks like an error in the web.xml of a certain app. Did you by 
any chance change the web.xml of any of your web applications ?

[EMAIL PROTECTED] wrote:
Hi all
Some time during christmas Tomcat 4.1.12 stopped working for me, I don´t know why, thought anyone here might have a clue.
This is what I know:
If I start tomcat with .../bin/startup.sh and then run a portscan I can see:
8009/tcp   openajp13
8080/tcp   openhttp-proxy
So evidently something happens ;)

But if I try to access http://my.ip:8080/index.wml (or just http://my.ip:8080) I don´t get any answer at all, it seems totally dead.

If I then stop Tomcat (.../bin/shutdown.sh) and run a portscan the services on ports 8009 and 8080 are gone.

But if I directly run .../bin/catalina.sh run I get this: (if someone can get any clue from this)

[root@star bin]# ./catalina.sh run
Using CATALINA_BASE:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_HOME:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_TMPDIR: /etc/jakarta-tomcat-4.1.12/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.1
Jan 7, 2003 9:40:58 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Jan 7, 2003 9:40:58 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Jan 7, 2003 9:41:03 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer

Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
Jan 7, 2003 9:47:29 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 114 column 15: The content of element type servlet must match (icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),init-param*,load-on-startup?,run-as?,security-role-ref*).
org.xml.sax.SAXParseException: The content of element type servlet must match (icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),init-param*,load-on-startup?,run-as?,security-role-ref*).
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1953)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
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:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Jan 7, 2003 9:47:29 AM 

Re: SV: tomcat 4.1.12 just stopped working, help !

2003-01-07 Thread Peng Tuck Kwok
If you are sure that is the xml in question, can you forward it to the 
list so we can have a look?

[EMAIL PROTECTED] wrote:
I checked the .../webapps/examples/WEB-INF/web.xml and I checked line 115 as suggested in the log, I found some servlets that I had added and removed these lines just to get Tomcat working again, but it still doesn´t work. So now when I run .../bin/catalina.sh run I get this:

[root@star bin]# ./catalina.sh run
Using CATALINA_BASE:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_HOME:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_TMPDIR: /etc/jakarta-tomcat-4.1.12/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.1
Jan 7, 2003 10:25:49 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Jan 7, 2003 10:25:49 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Jan 7, 2003 10:25:53 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Jan 7, 2003 10:25:58 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
Jan 7, 2003 10:26:29 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Jan 7, 2003 10:26:29 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on tcp port 8009
Jan 7, 2003 10:26:29 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=6/291  config=/etc/jakarta-tomcat-4.1.12/conf/jk2.properties

I still don´t get any answer from port 8080 :((

/Dan


-Ursprungligt meddelande-
Från: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Skickat: den 7 januari 2003 23:42
Till: Tomcat Users List
Ämne: Re: tomcat 4.1.12 just stopped working, help !


As the log suggests, the deployment descriptor of the servlet does not
conform to the DTD :



The content of element type servlet must match


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

Check the web.xml file for the last few servlets you deployed. The
descriptor elements should occur in the same order as mentioned above.

~Manav.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 12:44 AM
Subject: tomcat 4.1.12 just stopped working, help !




Hi all
Some time during christmas Tomcat 4.1.12 stopped working for me, I don´t


know why, thought anyone here might have a clue.


This is what I know:
If I start tomcat with .../bin/startup.sh and then run a portscan I can


see:


8009/tcp   openajp13
8080/tcp   openhttp-proxy
So evidently something happens ;)

But if I try to access http://my.ip:8080/index.wml (or just


http://my.ip:8080) I don´t get any answer at all, it seems totally dead.


If I then stop Tomcat (.../bin/shutdown.sh) and run a portscan the


services on ports 8009 and 8080 are gone.


But if I directly run .../bin/catalina.sh run I get this: (if someone


can get any clue from this)


[root@star bin]# ./catalina.sh run
Using CATALINA_BASE:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_HOME:   /etc/jakarta-tomcat-4.1.12
Using CATALINA_TMPDIR: /etc/jakarta-tomcat-4.1.12/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.1
Jan 7, 2003 9:40:58 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Jan 7, 2003 9:40:58 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Jan 7, 2003 9:41:03 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer

Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
Jan 7, 2003 9:47:29 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 114 column 15: The content of element type


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


org.xml.sax.SAXParseException: The content of element type servlet must


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


   at


org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:232)


   at


org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
3)


   at


org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:36
2)


   at


org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:29
6)


   at


org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:1953)


   at


org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
78)


   at


org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1144)


   at


org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:987)


   at



Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource

2003-01-06 Thread Peng Tuck Kwok
Paul Carpenter wrote:



Now I just checked my machine, and I'm running JDK 1.3.1. However,  
checking the API documents on the Sun site, 1.3.1 has no javax.sql.*  
package implemented - it doesn't appear until JDK 1.4. Which may  
explain the 'null' me thinks?
The javax.sql package is optional for jdk 1.3.1, and remains available 
as a seperate package for users of that jdk. You just download the jar 
file to use it. Tomcat ships with the jar file (at least it did with 4.x 
afaik). The 'null' error you get is actually related to the fact that it 
can't find the driver you specified. Maybe you could double check your 
configuration, jsp  servlet code to see if you mistyped anything ?



I notice that you didn't specify which JDK you were running in your  
build, and none of the threads in the archive seem to stress this. I'm  
quite surprised that the java source compiles in this case, but could  
this be the simple reason? Or is this package hidden in one of the .jar  
file somewhere in common/lib?

Thanks
Paul


On Monday, January 6, 2003, at 08:10  PM, Paul Carpenter wrote:

Hi Dave

This is exactly what I see on my OSX setup -  sorry, I can't help you  
with a fix at present, but please keep me posted of your progress if  
4.1.18 works I may try an install here (currently running 4.1.12, as  
you are, which was the latest build from the MAC website).

FYI I tried the suggestion from Iran Marcius (thread: Still can't get  
JNDI Datasource) which was to and an extra bit to the Context 

i.e. naming=true

But alas, no luck.


Thanks
Paul

On Monday, January 6, 2003, at 01:06  PM, David Hemingway wrote:

There was nothing meaningful in the logs no. Just the stack trace  
leading up
to that exception. I have not tried 4.1.18 yet. I may have to give  
that a
go. Thanks

Dave

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 2:41 PM
Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource




On Mon, 6 Jan 2003, David Hemingway wrote:


Date: Mon, 6 Jan 2003 13:45:08 +1100
From: David Hemingway [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource

Hi,

Sorry if this has been addressed before on this list but I have 
not  seen

it. I have followed the instructions in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource- 
examples-how
to.html.


I can get the setup to work 100% under win32 but using the same  
settings

under linux I get:



java.sql.SQLException: Cannot load JDBC driver class 'null'

I have seen this problem raised in many places but no one has  
seemed to

know the correct answer.





Have you examined the log files (in $CATALINA_HOME/logs) to see if  
there
are any interesting (or at least useful :-) error messages?

Have you tried the most recent production quality release (4.1.18)?   I
know there have been some bugfixes in the included commons-dbcp 
code  that
might make a difference.

Craig


My configuration is as follows:

Linux - Red Hat 7.3
Apache 1.3.27
Tomcat 4.1.12 LE
Oracle 9i
Pool 1.0
DBCP 1.0
Collections 2.0

common/lib/commons-collections.jar
common/lib/commons-dbcp.jar
common/lib/commons-pool.jar
common/lib/classes12.jar (with the javax.sql removed)

server.xml:


Context path=/lawonline docBase=lawonline debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_lawonline_log. suffix=.txt
  timestamp=true/
  Ejb   name=ejb/EmplRecord type=Entity
 home=com.wombat.empl.EmployeeRecordHome
   remote=com.wombat.empl.EmployeeRecord/

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

 ResourceParams name=jdbc/myoracle
   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:@192.168.0.10:1521:lawol/value
   /parameter
   parameter
 nameusername/name
 valuelawonline/value
   /parameter
   parameter
 namepassword/name
 valueLe12No06/value
   /parameter
   parameter
 namemaxActive/name
 value10/value
   /parameter
   parameter
 namemaxIdle/name
 value10/value
   /parameter
   parameter
 namemaxWait/name
 value-1/value
   /parameter
 /ResourceParams

   Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name


value=context.param.value


 override=false/
  Resource name=jdbc/EmployeeAppDb auth=SERVLET
type=javax.sql.DataSource/
  ResourceParams name=jdbc/EmployeeAppDb



Re: changing the jndi datasource example

2003-01-06 Thread Peng Tuck Kwok
Looks like the driver you asked it to load cannot be found. Are you sure 
you have placed the driver(if it is the correct one) in the right place ?

Nick Torenvliet wrote:
Hi, so I managed to get the jndi data example on the tomcat site working
locally.   What I want to do is use the resource inside on my existing
webapp.  So I take the server.xml entry given in the example and I
change the path and docBase to what I want it to be and run the new
webapp with the example code embedded but it doesn't work(I get a JDBC
driver null error), what do I need to do to fix this?  

 

!--JNDI STUFF --
Context path=/TestDB docBase=TestDB
debug=0 reloadable=true crossContext=true
...etc... 



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





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




Re: Server Hangs Up when lookup for jndi name is made. (URGENT)

2002-12-23 Thread Peng Tuck Kwok
Check out the parameter name validationQuery, either remove it or 
provide it a sql select statement. so that it looks like:
parameter
 namevalidationQuery/name
 valueselect * from dummytable/value
/parameter

The table has to be valid and (apparently) cannot return zero rows 
according to the docs.

Try it and see if it works.

Ashruf Hussain wrote:
Hi Tomcat Users,

Given below are server.xml and web.xml entries and code to access dbcp
resource from servlet.
When servlet is looking up for jndi name server hangs up with no response,
with 100% cpu busy signal on win2k box.

With no exception message logged logs files.

I using type 4 jdbc3.0 driver from DataDirect Technologies.

Thanks in advance.
--
DBCP entry in server.xml within the context entry of web appln. :***

Resource name=jdbc/Resourcesdb scope=Shareable
type=javax.sql.DataSource/
  ResourceParams name=jdbc/Resourcesdb
parameter
  namevalidationQuery/name
  value/value
/parameter
parameter
  namemaxWait/name
  value5000/value
/parameter
parameter
  namemaxActive/name
  value4/value
/parameter
parameter
  namepassword/name
  valueresourcesdb/value
/parameter
parameter
  nameurl/name
 
valuejdbc:datadirect:sqlserver://serverName:1433;databaseName=name;User=na
me;Password=name/value
/parameter
parameter
  namedriverClassName/name
  valuecom.ddtek.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameter
  namemaxIdle/name
  value2/value
/parameter
parameter
  nameusername/name
  valueresourcesdb/value
/parameter
  /ResourceParams

Entry for accessing DBCP resource in web.xml:**

resource-ref
 descriptionDatasource example/description
 res-ref-namejdbc/Resourcesdb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

Servlet code:***

			System.out.println(LoginServlet: Getting
InitialContext...);
			InitialContext initCtx = new InitialContext();
			System.out.println(LoginServlet: Got
InitialContext);

			System.out.println(NameInNamespace ==  +
			initCtx.getNameInNamespace());

		DataSource ds =
(DataSource)initCtx.lookup(java:comp/env/jdbc/Resourcesdb);

		if (ds != null)
		{
		conn = ds.getConnection();

		if (conn != null)
		{
			System.out.println(Got Connection == \n +
conn);

			}
			else
			{
System.out.println(Failed to get
connection.);
}
		}
		else
		{
			System.out.println(Failed to get datasource.);
			}

---
Regards, 
Mohammed Ashruf Hussain
Software Engineer.
Virtusa, Corp. (formerly erunway)
Work 040 23414200 ext(303)
www.virtusa.com 



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





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




Re: DataSource error (DBCP)

2002-12-23 Thread Peng Tuck Kwok
Could you post your source code for the java code? Sounds like you are 
missing javax.sql.* , but can't be sure until someone has a look at it.

[EMAIL PROTECTED] wrote:
i've already done that
somehow i compiled :) DBTest.java and where should i place the DBTest.class
file. EVERYWHERE I TRIED :(. anyone can answer ?

regards and thanks
sunil



   
Galbayar  
Dorjgotov   To: Tomcat Users List [EMAIL PROTECTED]  
galbayar@mobi   cc:   
net.mn  Subject: RE: DataSource error (DBCP)  
   
12/23/2002 
01:49 AM   
Please respond 
to Tomcat 
Users List
   
   




copy mysql jdbc driver to tomcat/common/lib directory

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 3:09 AM
To: [EMAIL PROTECTED]
Subject: DataSource error (DBCP)


hi all,

i'm new to tomcat... if my queries are foolish...pl forgive.  :)

my configuration is RH Linux 8/MYSQL 3.../TOMCAT 4.1.8

all the examples provided are working correctly...

i tried JNDI Datasource HOW-TO (more details in the URL)

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how

to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
4
i tried with MYSQL DBCP Example

  1. i've created mysql username,password,database,tables,records
  2. i've changed the server.xml configuration by inserting the codes given
under no.2
  3. i've created a web.xml as in no.3
  4. i've written the same test.jsp and DBTest.java

  and i created a directory DBTest and placed test.jsp and DBTest.java
there and another subdirectory called WEB-INF and placed the web.xml there.
I tried  to compile DBTest.java and ended up an error

  Type 'Datasource' not found in the declaration of table 'ds'

  DataSource ds= 
   ^
1 error
-

please help!

THANKS IN ADVANCE

best regards
sunil



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



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






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





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




Re: DataSource error (DBCP)

2002-12-23 Thread Peng Tuck Kwok
Hmm, does it work yet or are you still experiencing some problems ?

[EMAIL PROTECTED] wrote:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how

i cut and paste the source codes for MYSQL Example...

u r right... first error was javax.sql.* missing... but i included all the
directories in classpath that error cleared..

this is the jsp file... DBTest is the class file.. (that i compiled inside
my oracle directory and moved to Tomcat and tried placing everywhere)
--
html
  head
titleDB Test/title
  /head
  body

  %
foo.DBTest tst = new foo.DBTest();
tst.init();
  %

  h2Results/h2
Foo %= tst.getFoo() %br/
Bar %= tst.getBar() %

  /body
/html
--



   
Peng Tuck Kwok 
pengtuck@makm   To: Tomcat Users List [EMAIL PROTECTED]
al.net  cc:   
 Subject: Re: DataSource error (DBCP)  
12/23/2002 
08:23 AM   
Please respond 
to Tomcat 
Users List
   
   




Could you post your source code for the java code? Sounds like you are
missing javax.sql.* , but can't be sure until someone has a look at it.

[EMAIL PROTECTED] wrote:

i've already done that
somehow i compiled :) DBTest.java and where should i place the


DBTest.class


file. EVERYWHERE I TRIED :(. anyone can answer ?

regards and thanks
sunil








   Galbayar




   Dorjgotov   To: Tomcat Users List


[EMAIL PROTECTED]


   galbayar@mobi   cc:




   net.mn  Subject: RE: DataSource


error (DBCP)



   12/23/2002




   01:49 AM




   Please respond




   to Tomcat




   Users List









copy mysql jdbc driver to tomcat/common/lib directory

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 3:09 AM
To: [EMAIL PROTECTED]
Subject: DataSource error (DBCP)


hi all,

i'm new to tomcat... if my queries are foolish...pl forgive.  :)

my configuration is RH Linux 8/MYSQL 3.../TOMCAT 4.1.8

all the examples provided are working correctly...

i tried JNDI Datasource HOW-TO (more details in the URL)




http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how



to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
4
i tried with MYSQL DBCP Example

 1. i've created mysql username,password,database,tables,records
 2. i've changeXXX

XX


:   
mailto:[EMAIL PROTECTED]


For additional commands, e-mail: 


mailto:[EMAIL PROTECTED]







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






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

Re: Directory for classes

2002-12-22 Thread Peng Tuck Kwok
Classes for your webapps go into the /{webapp directory}/WEB-INF/{lib or 
classes} .

Ryuji Yokoyama wrote:
Hello All!

I just upgraded Tomcat 4.0.6 to 4.1.18, but I can't figure out where I 
should put my class files.  I tried following directories.

$CATALINA_HOME\common\classes
$CATALINA_HOME\webapps
$CATALINA_HOME\webapps\ROOT

However, none of them worked.  In the case of Tomcat 4.0, I can put 
classes in $CATALINA_HOME\classes directory, but  there is not such a 
directory in 4.1.  Could you tell me where I need to put class files?

Thanks in advance.




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





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




Re: How do you get a C:\ prompt in Windows XP?

2002-12-18 Thread Peng Tuck Kwok
This works as well if your home path is C:\
cd %HOMEPATH%

Ronin Quigley wrote:

Thanks for your tips.  When I type C:\  I get the following message 'C:\' is
not recognised as an internal or external command, operable program or batch
file.
Any other suggestions?



Rocket

- Original Message -
From: Turner, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 12:13 AM
Subject: RE: Help needed to run Tomcat 4.1.12




Agreedavoid spaces in pathnames if you can.

As an aside, there is no reason to switch directories to start Tomcat.


You


can do so by typing something like c:\tomcat\bin\startup.bat from any
command prompt in Windows.

John


-Original Message-
From: Paul Yunusov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 7:04 PM
To: Tomcat Users List
Subject: Re: Help needed to run Tomcat 4.1.12

On Wednesday 18 December 2002 06:27 pm, Ronin Quigley wrote:


I am running Windows XP and have done the following:
 a.. Installed Jave SDK and set the path variable to
stemRoot%\System32\Wbem;C:Java\bin; b.. Downloaded release version


4.1.12


of Tomcat
 c.. Set the variable JAVA HOME=C:\JAVA
 d.. Set the variable CATALINA_HOME= C:\TOMCAT\JAKARTA-TOMCAT 4.1.12
 e.. Tested  the above by doing the ECHO test and they were fine.
The command prompt in Windows XP automatically defaults to C:\Documents


and


Settings\Go For It Web Design, how do I get a C:\ prompt? And once I


get


a


C:\ prompt can I start it by the following?

C:\
cd tomcat\jakarta-tomcat 4.1.12\bin
startup.bat

Any help would be much appreciated.

Rocket


To change the working directory to C: type C:\ and press enter in the
command
prompt (if my memory doesn't betray me - my Windows days are long gone).
Your
steps to start tomcat seem be correct but paths and names in the


description


of environment variables are a mess (JAVA_HOME should have  the _,
SystemRoot instead of stemRoot, C: must be followed by a \ in paths,
there is a - instead of a space between jakarta-tomcat and 4.1.12 in
the standard distribution, at least on Linux). I attribute this chaos to
fast
typing but I'd double check if I were you. My Windows experience taught me
to
avoid spaces in paths also.
HTH,
Paul

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002


--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]



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






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




Re: Tomcat setup question.

2002-12-16 Thread Peng Tuck Kwok




So do I need to add an environmental variable to let my compiler find these?
Or do I just need to move the .jar files to the right location? How do I
know which .jar files are the correct ones to use (as I mentioned, there are
a number of them that seem to have what I'm looking for)?


You can do any of the steps you have suggested yourself or you could 
also just tell the compiler where to find your jars. javac -classpath 
would do the trick


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



Re: Tomcat setup question.

2002-12-16 Thread Peng Tuck Kwok
Tomcat comes with servlet.jar, which has all the classes you need. Or 
you can download a copy from Sun Microsystems as well. Just point your 
compiler to the servlet.jar or add it to the classpath.
If you unpack the servlet.jar with winzip you'll see what I mean. Plus I 
think it is javax.servlet, not java.servlet.

Patrick Martz wrote:
Ok this is exactly my problem. These aren't MY jar files. These are jar
files that came with Tomcat. Apparently, the standard J2SDK does NOT come
with the servlet classes that I need to compile java servlets. So therefore,
when I try to import java.servlet.* it fails miserably. Even the classes
that come WITH Tomcat itself (for example, HelloWorldExample in the examples
directory) are not compilable. Therefore, clearly, something needs to be
done so that the java compiler can find these packages. Exactly what that is
I do not know and would be very appreciative if anyone could help! 

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4:41 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.






So do I need to add an environmental variable to let my compiler find


these?


Or do I just need to move the .jar files to the right location? How do I
know which .jar files are the correct ones to use (as I mentioned, there


are


a number of them that seem to have what I'm looking for)?



You can do any of the steps you have suggested yourself or you could 
also just tell the compiler where to find your jars. javac -classpath 
would do the trick


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

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





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




Re: Tomcat setup question.

2002-12-16 Thread Peng Tuck Kwok
Don't panic, just attach a sample servlet that you were trying to 
compile to the list. I'll have a look at it and try to get it to compile 
ok? The javac -classpath should work by the way.

Patrick Martz wrote:
Thank you for the help. However, I tried that...I added the directory where
servlet.jar is located to the classpath. Once I do that, it no longer
recognizes ANY of the other classes in its own directory, and therefore
cannot make any references to them. I am frankly stumpedand I apologize
for my ignorance but this is all very new to me.

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 5:00 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.


Tomcat comes with servlet.jar, which has all the classes you need. Or 
you can download a copy from Sun Microsystems as well. Just point your 
compiler to the servlet.jar or add it to the classpath.
If you unpack the servlet.jar with winzip you'll see what I mean. Plus I 
think it is javax.servlet, not java.servlet.

Patrick Martz wrote:

Ok this is exactly my problem. These aren't MY jar files. These are jar
files that came with Tomcat. Apparently, the standard J2SDK does NOT come
with the servlet classes that I need to compile java servlets. So


therefore,


when I try to import java.servlet.* it fails miserably. Even the classes
that come WITH Tomcat itself (for example, HelloWorldExample in the


examples


directory) are not compilable. Therefore, clearly, something needs to be
done so that the java compiler can find these packages. Exactly what that


is


I do not know and would be very appreciative if anyone could help! 

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4:41 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.







So do I need to add an environmental variable to let my compiler find


these?



Or do I just need to move the .jar files to the right location? How do I
know which .jar files are the correct ones to use (as I mentioned, there


are



a number of them that seem to have what I'm looking for)?



You can do any of the steps you have suggested yourself or you could 
also just tell the compiler where to find your jars. javac -classpath 
would do the trick


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

--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]







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

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






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




Re: Tomcat setup question.

2002-12-16 Thread Peng Tuck Kwok
It's javax.servlet, not java.servlet. So that why there is no such 
package or class to be found. It should compile if you add the 
servlet.jar to the classpath variable or specify the -classpath variable 
to the compiler.

Patrick Martz wrote:
Ok here's the current setup I have:

1) The j2sdk installed in C:\j2sdk
2) The j2ee installed in C:\j2ee (because this supposedly contains what I
need)
3) Tomcat installed in C:\Program Files\Apache Group\Tomcat 4.1
4) The following environmental variables set:
   a) J2EE_HOME = C:\j2ee
   b) JAVA_HOME = C:\j2sdk
   c) Both C:\j2ee\bin and C:\j2sdk\bin added to PATH.
   d) TOMCAT_HOME = C:\Program Files\Apache Group\Tomcat 4.1
   e) There is no CLASSPATH variable set.

I have noted that C:\j2ee\lib\j2ee.jar contains the HttpServlet class as
does C:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar. If I
try to compile, my compiler (from Sun) fails to import java.servlet.* and
java.servlet.http.*. If I try to add the .jar file the classpath, it still
fails to compile. Below is the servlet (it's very simple, I just want to get
this thing working!).


import java.io.*;
import java.util.*;
import java.servlet.*;
import java.servlet.http.*;

public class Test extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException {

res.setContentType(text/html);
PrintWriter out = res.getWriter();

out.println(HTML);
out.println(HEADTITLETest/TITLE/HEAD);
out.println(BODY);

out.println(test);
out.println(/BODY);
out.println(/HTML);
}
}

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 5:10 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.


Don't panic, just attach a sample servlet that you were trying to 
compile to the list. I'll have a look at it and try to get it to compile 
ok? The javac -classpath should work by the way.

Patrick Martz wrote:

Thank you for the help. However, I tried that...I added the directory


where


servlet.jar is located to the classpath. Once I do that, it no longer
recognizes ANY of the other classes in its own directory, and therefore
cannot make any references to them. I am frankly stumpedand I


apologize


for my ignorance but this is all very new to me.

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 5:00 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.


Tomcat comes with servlet.jar, which has all the classes you need. Or 
you can download a copy from Sun Microsystems as well. Just point your 
compiler to the servlet.jar or add it to the classpath.
If you unpack the servlet.jar with winzip you'll see what I mean. Plus I 
think it is javax.servlet, not java.servlet.

Patrick Martz wrote:


Ok this is exactly my problem. These aren't MY jar files. These are jar
files that came with Tomcat. Apparently, the standard J2SDK does NOT come
with the servlet classes that I need to compile java servlets. So


therefore,



when I try to import java.servlet.* it fails miserably. Even the classes
that come WITH Tomcat itself (for example, HelloWorldExample in the


examples



directory) are not compilable. Therefore, clearly, something needs to be
done so that the java compiler can find these packages. Exactly what that


is



I do not know and would be very appreciative if anyone could help! 

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4:41 PM
To: Tomcat Users List
Subject: Re: Tomcat setup question.








So do I need to add an environmental variable to let my compiler find


these?




Or do I just need to move the .jar files to the right location? How do I
know which .jar files are the correct ones to use (as I mentioned, there


are




a number of them that seem to have what I'm looking for)?



You can do any of the steps you have suggested yourself or you could 
also just tell the compiler where to find your jars. javac -classpath 
would do the trick


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

--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]



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

--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]







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

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






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




Re: Connection pooling with sql server

2002-12-15 Thread Peng Tuck Kwok
I've never managed to get tomcat to hang on a mis-configured db-pool, 
just got it to throw exceptions. Post your server.xml and web.xml and 
let the mailling list have a look. Your jsp or servlet if you are using 
any would be helpful.

Ashruf Hussain wrote:
Hi all,

I am new user of tomcat 4.1, using jdbc driver from datadirect to connect to
sqlserver database. 
I am able to get normal individual connections without pooling. 
Now, I want to get connections from connection pool. 
I tried with all my efforts (followed pooling documentation) to get
connection pooling done with sql server, but tomcat hangs up at start up.

Anybody who has done it all, pls help.

Thanks in advance,

Ashruf

---
Regards, 
Mohammed Ashruf Hussain
Software Engineer.
Virtusa, Corp. (formerly erunway)
Work 040 23414200 ext(303)
www.virtusa.com 



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





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




Re: where do i find the jar to be downloaded

2002-12-15 Thread Peng Tuck Kwok
Hmm, the jar files can be found with your copy of tomcat.
Look under $CATALINA_HOME\server\lib or if you have the source
you could build it yourself.

Santosh Kulkarni wrote:

Which jar contains the following packages:
1. org.apache.tomcat.core.* 
2. org.apache.tomcat.util.*
3. org.apache.tomcat.session.*
and from where do i download it ? I searched on the
jakarta's Tomcat page but couldn't find it. I'm using
tomcat 4.0.3.
TIA
Santosh

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

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





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




Re: Tomcat for Enterprise Applications

2002-12-13 Thread Peng Tuck Kwok
Tomcat only does jsp/servlets, so if you are after EJB's then you need 
something like Jboss, which also bundles tomcat for jsp/servlets or 
jetty. Apparently Jboss is pretty good and a lot of people are happy 
with it so you might want to look into it. You need to pay for the docs 
though.

G. Balandres wrote:
Hi all,

i have currently an dicussion going on about creating 
a 3/Multi Tier Enterprise Application which will
have one Webbased Client and one Standalone Client.
The main aim is the Webbased Client.

The problem is there are some workers which want to
use .NET and some who want to use J2EE.
I dont want to start something like a flame war here.
I just want to find out if we could use the Tomcat 
server and/or other Open Source Projects to 
develop our Application because i dont want 
to go the .NET way.
The application would be a middle to big size
CRM system.

So what we will need is an Application Server which
can handle EJB's. Even too it should be scalable in a way
that you can split parts of your application about
several servers which are working together in a network
environment.
As far as i have found out until now Tomcat can't do 
that things. Some people told me that Tomcat only implements
some J2EE standards.
I havent found a site on apache.org (Jakarta Side) that
explains what Tomcat can do and what it cant.
Anybody has one?

Can Tomcat work together with other Applications
that integrate the functions that Tomcat doesnt have
but are needed for J2EE Applications?

So as far as i can see now. Tomcat is good for some 
mainly Webbased applications which are using Servlets 
but i cant see in which productive environments it is
used. Could anybody tell me in what kind of projects 
you did use it?

And now there is another question which doesnt really
belong to this Mailinglist. But if i am here ... =)
So if Tomcat cant be used to create Enterprise Applications
which are mostly using EJB's and should be scalable on the server
side what other ways are there. I've heard about other
Open Source J2EE Application Servers and then there are the 
commercial Servers like Websphere and so on.
I've surley read books about J2EE but none of them didnt 
give much information about the diffrent application servers
for J2EE. So i know some stuff about programming J2EE applications
but not much about how to implement them on the server side.
Any suggestions on that?


Thank you for reading my stuff and if you have any idea about
my questions any answer would be highly appreciated.

Thanks and Greetings,
G. Balandres

--

Even god is a Programmer:
while heartIsBumping()  {
  /* Many
 Cases and If-Else Routines
 which ends with 
 exit		
  */
  	
  doLive()  
}








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





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




Re: Off Topic: SAP DB

2002-12-10 Thread Peng Tuck Kwok
Yes. working fine for me. Works ok with sun app server as well.


Fabio Mengue wrote:

Hello,

Does anyone here has tested or uses SAP DB (www.sapdb.org) ?

I am willing to try it, but the setup is a little complicated.

Thanks,

Fabio.





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




Re: I don´t understand the objective of this open list !

2002-12-09 Thread Peng Tuck Kwok
The documentation sure does need some work in certain areas, but it is 
hardly in the sad state that you claim it is in.





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



Re: I don´t understand the objective of this open list !

2002-12-09 Thread Peng Tuck Kwok

Mike DiChiappari wrote:

The documentation sure does need some work in certain areas, but it is 
hardly in the sad state that you claim it is in.
Ok so I manage to get you to describe some of the problems you are 
having. I consider that an improvement from all the other mails I have 
seen so far :)



Okay, let me give a specific example.  I will describe to you a likely 
standard configuration for a server that would be used in a typical 
commercial setting.  Prove tomcat can handle this.  Prove the 
documentation is available in normal English.  I will also show you 
absolute geek-speak in the documentation.

Typical Server Configuration: tomcat serving pages through apache on 
port 80 for multiple (virtual) web sites on one web server.  How many 
out there have this?  Yes, you can get tomcat up and running on port 
8080 very quickly.  How often do you commerical software developers type 
http://www.company.com:8080/foo.jsp when visiting commercial sites?

Problems with the documentation (using the term liberally in this case):

1) First, no where on Jakarta's main site is it mentioned that some type 
of connector is needed to have tomcat serve page through Apache. I 
believe the connectors go by several names (mod_jk, mod_jk2, mod_webapp, 
and Catalina being some).  None of these are mentioned or are listed 
(there are certainly no links).

I believe you are trying your best to look for information but you have 
been looking in the wrong area. You said you were looking at the 
Jakarta's main website. It's a repository for jakarta projects. mod_jk2 
is under the  tomcat project. You said there are absolutely no links yet 
you list them below ? Huh ?


Now I could go on and on.  But what is the point.  It is just more geek 
speak.  
It is a fairly technical product and some patience is required but that 
is true of most app servers in 'commercial' quality products. Take the 
Sun One App server for instance. The amount of documentation for that is 
mind boggling. I managed to get my app working on it but it was quite 
difficult. I actually found the solution in one of the examples that 
they gave but the volumnious documentation makes it difficult to find 
what you want, although they have done their best to organize it.

And I haven't even gotten to other situations: running multiple 
instance of tomcat, having tomcat run on a different server,
What's so difficult about that? To run mutliple instances just make sure 
the ports are different.

clustering, 
etc...
There's load balancing but to do that you need to use . mod_jk2.



There's no compulsion or requirement for you to use tomcat. I would on
ocassion use Sun One App server as it is actually quite good.
Oh yeah, if memory serves, John Turner has written a document about 
getting Tomcat  apache to work together. If you'd look in the archive 
you might find the link to his page or just ask him .

Why waste my time.  I'll vote with my feet and use something else. 
If developers aren't interested in making their software usable by writing 
clear documentation, I won't use it.

Mike

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





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




Re: Run Tomcat without JDK

2002-12-04 Thread Peng Tuck Kwok
I don't really see how they can raise a issue with this. Even if the use 
some other app server, all of them insist that you install a jdk first 
in order to use it. I can think of Sun One Application Server as a prime 
example of this, although it allows you to pick a existing installation 
of jdk.

Billy Ng wrote:
Hi folks,

We ship J2EE app to Windows box.  Our installer will install the JDK and Tomcat to the box.  However, some customers complained that they did not like to install the JDK.  Is there a way to run the J2EE app on tomcat without the JDK?  Can we maybe just include the JRE or tools.jar in the app instead of installing the entire JDK?

Thanks!

Billy Ng







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




Re: problem with mod_webapp

2002-12-03 Thread Peng Tuck Kwok
Means the entry you added in the web.xml is wrong.
It follows a certain order which is described in the error.

(icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file), 
init-param*,load-on-startup?,run-as?,security-role-ref*).



Leong Hong Wai wrote:
Hi all,

Anyone has any idea about how to configure mod_webapp+apache in OS X  
10.2  ? I've followed the sample given, but I always get the same error  
list below :-

2002-12-03 15:22:01 ContextConfig[/wai] Parse error in application  web.xml
org.xml.sax.SAXParseException: The content of element type servlet is  
incomplete, it must match  
(icon?,servlet-name,display-name?,description?,(serv
let-class|jsp-file),init-param*,load-on-startup?,run-as?,security-role- 
ref*).
at  
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
at  
org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLErr 
or(XMLValidator.java:1851)
at  
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValid 
ator.java:1495)
at  
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc 
h(XMLDocumentScanner.java:1149)
at  
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan 
ner.java:381)
at  
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at  
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:137)
at  
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)
at  
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfi 
g.java:256)
at  
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:824)
at  
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j 
ava:224)
at  
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu 
pport.java:155)
at  
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at  
org.apache.catalina.core.StandardContext.start(StandardContext.java:3371 )
at  
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at  
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at  
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at  
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at  
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at  
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at  org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at  org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at  org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Please help.

Cheers

Wai


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





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




Re: Can't start tomcat

2002-12-03 Thread Peng Tuck Kwok
Can't remmember the exact command but if you do a google search for
Out of environment space should bring a lot of relevant hits. That's 
how I found the solution. Don't forget to restart your machine.

Aleks Kleyn wrote:
I also followed this recommendation because I had similar problem. When I
started startup.bat it responded me
Out of environment space
So this is problem:how I can extend environment space in windows NT?
Aleks Kleyn
http://www.geocities.com/aleks_kleyn
- Original Message -
From: Yandell Cacton [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 5:36 PM
Subject: Re: Can't start tomcat




Hi,

To see the error message, run the startup script using
DOS Window and manually type the startup command,
instead of double clicking the icon.

My guess would be that the problem is that you haven't
setup CATALINA_HOME environment variable.

Cheers,
Yandell.

--- [EMAIL PROTECTED] wrote:  Hello,


I have downloaded tomcat 4.1.12. When I try to
startup the server a DOS Window appears and
disappears immediately and I have no comment about
what's going on.

Can anybody help me?




-


NetCourrier, votre bureau virtuel sur Internet :
Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 ? TTC/min)
Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)


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


http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!

--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]





-
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com

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






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




Re: Retrieving username and password from url??

2002-12-02 Thread Peng Tuck Kwok
You could use a regular expression to get the items you want or Tokenize 
the string until you get what you want.

There are several regular expression packages that you can use, which is 
available under the jakarta project or if you are so inclined you can 
use the one that comes with jdk1.4

Abhishek Srivastava wrote:
Hi,
Is there a way that I can retrieve the username and password from the url
given as below using a servlet.
https://username:password@hostname/servletname/servlet


Regards,
Abhishek








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






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




Datasource and Web.xml

2002-12-02 Thread Peng Tuck Kwok
If a web application uses a jndi datasource, should the web.xml contain 
the definition for the datasource before deployment (that is in the war 
file) or after deployment (that is after the war file has been deployed) 
? This sounds strange as I was having problems with this in tomcat 
4.1.12 , where Tomcat could not start if the there was a resource 
definition in the web.xml. Of course I can't create a resource for the 
context using the admin interface since the context doesn't exist yet.
I've used Sun one server and all seems ok so what is the correct 
sequence for doing things in tomcat?


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



Re: Datasource and Web.xml

2002-12-02 Thread Peng Tuck Kwok
Thanks craig. I'll look up the ResourceLink element.

Craig R. McClanahan wrote:


On Tue, 3 Dec 2002, Peng Tuck Kwok wrote:



Date: Tue, 03 Dec 2002 12:09:42 +0800
From: Peng Tuck Kwok [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Datasource and Web.xml

If a web application uses a jndi datasource, should the web.xml contain
the definition for the datasource before deployment (that is in the war
file) or after deployment (that is after the war file has been deployed)
? This sounds strange as I was having problems with this in tomcat
4.1.12 , where Tomcat could not start if the there was a resource
definition in the web.xml. Of course I can't create a resource for the
context using the admin interface since the context doesn't exist yet.
I've used Sun one server and all seems ok so what is the correct
sequence for doing things in tomcat?




There is not really a pre-deploy versus post-deploy state of the web.xml
file in Tomcat stand-alone.  The net effect of this is that:

* You MUST declare your JNDI resources in the web.xml file before
  you deploy the app (i.e. in the original web.xml file you provide)

* You MUST configure your JNDI resources in either server.xml
  at Tomcat startup time (nested in the Context element) or
  dynamically if you deploy via the manager webapp, in which case
  you must provide a context configuration file that includes the
  resource configurations.

If you're using the admin webapp to create resources, what you're actually
doing is setting up things in the GlobalNamingResources section of
server.xml -- the resources are not actually configured to a particular
webapp until you include a ResourceLink element in the Context element
for that webapp.

For more info about JNDI resources in general:

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

For detailed walkthroughs (using the Java Web Services Developer Pack, but
the instructions for JNDI resources are also generally applicable to
Tomcat 4.1 standalone use), see the webapp related chapters in the Java
Web Services Tutorial:

http://java.sun.com/webservices/docs/1.0/tutorial/index.html

Craig


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






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




Re: tomcat 4.1.12 log of pages hit

2002-12-01 Thread Peng Tuck Kwok
Most log files are in the logs directory, one for each context. I'm not 
sure if it is compulsory to define a logfile for a context, but if you 
don't then that's probably why you don't have a log file.

Hanasaki JiJi wrote:
I dont seem to find the web hit logs?  The ones that can be run through 
webtrends.

Where are they?


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





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




Re: HELP!! Tomcat crashes on me!

2002-12-01 Thread Peng Tuck Kwok
As far as I can tell, the zipped version is identical to the exe distro 
for each identical version, save the fact that the exe lets you start 
tomcat as a service, create shell extensions and create the admin user 
for the tomcat administration.

Jacob's suggestion is useful, try and run the start.bat from a command 
prompt, it's easier to see the errors. The last time I encountered the 
error was when there wasn't enough environment space to keep variables 
in the autoexec.bat

Jacob Kjome wrote:

Steve,

I assume you are just double clicking on one of the Tomcat .bat files to 
run Tomcat.  Instead, open up a command prompt, cd to the directory 
where the .bat files are and type the name of the .bat file you want to 
run.  Now you will see the error output.

Jake

At 11:01 PM 12/1/2002 -0600, you wrote:

Kwok, the so-called crash is like it just flat disappearing on me!!! I
mean, it's like puff, like up in smoke so to speak!! And, in 
response to
a smurray, I already am and have been using the zip file version of 
Tomcat!!
Is there some merit to what I suggested, namely that I delete and then 
turn
around and set all of the environment variables for Tomcat in the System
settings?!


- Original Message -
From: Kwok Peng Tuck [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, December 01, 2002 6:04 PM
Subject: Re: HELP!! Tomcat crashes on me!


 Seems to be ok for me , both zip  exe.
 What's the crash like, I mean what errors were displayed?

 [EMAIL PROTECTED] wrote:

 one thing I have learned about running Tomcat on Windows:
 
 It works great if I just unzip the bin download file and set the
catalina_home
 environment variable manually.
 
 It has problems if I download the installation executable and 
install it
via
 the installer.
 
 just something I have noticed...
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 
 



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



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






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




Re: HELP!! Tomcat crashes on me!

2002-12-01 Thread Peng Tuck Kwok
Try a different JDK ?   Sorry earlier on about asking you to use 
start.bat should have been catalina.bat
I'm using j2sdk1.4.0_02 btw.

Steve R Burrus wrote:
 Bill, I am about to go to bed, but I couldn't help but displaying the screen
dump to u from executing the catalina run command:

 C:\jakarta-tomcat-4.1.12\bincatalina run
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   C:\j2sdk1.4.1_01\
Dec 2, 2002 1:21:41 AM org.apache.commons.modeler.Registry loadRegis
INFO: Loading registry information
Dec 2, 2002 1:21:42 AM org.apache.commons.modeler.Registry getRegist
INFO: Creating new Registry instance
Dec 2, 2002 1:21:43 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Dec 2, 2002 1:21:45 AM org.apache.commons.digester.Digester fatalErr
SEVERE: Parse Fatal Error at line 369 column 14: The element type C
 be terminated by the matching end-tag /Context.
org.xml.sax.SAXParseException: The element type Context must be te
the matching end-tag /Context.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParse
rorHandlerWrapper.java:232)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Err
pper.java:213)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
java:366)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
java:296)
at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLSca
69)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.han
t(XMLDocumentFragmentScannerImpl.java:1133)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
XMLDocumentFragmentScannerImpl.java:987)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fra
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
LDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
a:524)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
a:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:
at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
ava:1169)
at org.apache.commons.digester.Digester.parse(Digester.java:
at org.apache.catalina.startup.Catalina.start(Catalina.java:
at org.apache.catalina.startup.Catalina.execute(Catalina.jav
at org.apache.catalina.startup.Catalina.process(Catalina.jav
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java
Catalina.start: org.xml.sax.SAXParseException: The element type Con
e terminated by the matching end-tag /Context.
org.xml.sax.SAXParseException: The element type Context must be te
the matching end-tag /Context.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
ava:1183)
at org.apache.commons.digester.Digester.parse(Digester.java:
at org.apache.catalina.startup.Catalina.start(Catalina.java:
at org.apache.catalina.startup.Catalina.execute(Catalina.jav
at org.apache.catalina.startup.Catalina.process(Catalina.jav
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java

C:\jakarta-tomcat-4.1.12\bin

I DEFY you to make any kind of rhyme or reason out of this error message! What
does all of this mean? 

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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





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