Re: tomcat session problem

2001-10-26 Thread Dmitri Colebatch

On Thu, 25 Oct 2001, Rinku Randhawa wrote:

 Thanks Ralph for the information, my question is when there are 2 sessions
 running on the web in the same PC (by opening 2 browsers) then it doesn't
 track the sessions properly and changes the value of the session when I go
 to different pages even if I limit one session to one browser.

When you say one browser what do you mean?  A session is effectively tied
to a cookie (unless you are using url re-writing, which might make more
sense for what you suggest), and so if you have two IE windows open, its
one session.  However, if you have one IE and one Netscape window open,
its two sessions.

hth
dim





RE: File Download - CSV question ****

2001-10-26 Thread Dmitri Colebatch

On Thu, 25 Oct 2001, Evan Swanson wrote:

 I am using IE5.0 in both situations. The only difference is going from
 TC3.2 on windows to TC4.0 on HP Unix. I would think that the IE would
 be making the decision on how to handle the file by the extension name
 but it is not.

technically speaking it should (and by the sounds of it is) be looking at
the mime type.

 Is MIME type something you can configure on Tomcat? 

I'm not on solid ground here, so I'll let someone else answer it.  I know
that in $TOMCAT_HOME/conf/web.xml and $CATALINA_HOME/conf/web.xml there
are mime-types listed, but I'm not sure if changing them will change the
behaviour (I remember a lot of discussion about this a few months back in
relation to tc3 and my memory is that the conf/web.xml is not read by the
container, but I could be wrong).

So if someone else with firm knowledge could answer that one we'd both
be wiser (o:

cheers
dim


 
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 10:11 PM
 To: Tomcat-User
 Subject: Re: File Download - CSV question 
 
 
 Are you using the same client between the two servers?  IE seems to
 consider itself more important than mimetypes, and if it sees a file
 extension it recognises it treats it as it deems fit, regardless of the
 mimetype.  So one possibility is that you have just installed excel or
 something on the client, and IE is redirecting the download there.
 
 another option is that the mimetype being sent in tomcat 4.0 is different
 to 3.x, but I'm not sure about this, so will let someone else answer this
 option.
 
 if you outline exactly what client/server you were using before, and now,
 it will make the question more specific.  for intsance, tc3.2 on windows
 with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
 client with IE5.0.
 
 cheers
 dim
 
 On Wed, 24 Oct 2001, Evan Swanson wrote:
 
  
  I wrote an application that for Tomcat 3.2 running on window. In the HTML
  the is a reference ( A HREF=/filname.csv ) to the filename. 
  When I run this on windows I get a popup save as selection box. 
  When I run this on Tomcat4.0 on Unix it no longer gives me the selection
 box
  but instead displays the data on the screen.
  
  Is this a difference between TC32 adn TC40 or Unix / Windows.
  Is this configurable.
  
  
  Thanks in advance.
  
  
 




Re: tomcat session problem

2001-10-26 Thread Dmitri Colebatch

On Fri, 26 Oct 2001, Dmitri Colebatch wrote:

 On Thu, 25 Oct 2001, Rinku Randhawa wrote:
 
  Thanks Ralph for the information, my question is when there are 2 sessions
  running on the web in the same PC (by opening 2 browsers) then it doesn't
  track the sessions properly and changes the value of the session when I go
  to different pages even if I limit one session to one browser.
 
 When you say one browser what do you mean?  A session is effectively tied
 to a cookie (unless you are using url re-writing, which might make more
 sense for what you suggest), and so if you have two IE windows open, its
 one session.  However, if you have one IE and one Netscape window open,
 its two sessions.

I take this back... IE it seems doesn't share cookies between multiple
instances if they are opened as a new application - as opposed to
Ctrl-N.  Geoff Howard pointed this out just now... sorry for the
confusion.

cheesr
dim





Re: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Dmitri Colebatch

yep, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html
for details on how to create one.  Depending one what you need to do, it
may be easier to subclass the JDBC realm and override the getStatement
(? I think thats it) methods...

hth
dim

On Tue, 23 Oct 2001, Maneesha Jain wrote:

 Hi,
 
 I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?
 
 Is that possible ?
 
 Can I need to implement the Realm interface and stick that in the
 server.xml file?
 
 Where should I put this class, so the tomcat can resolve it when parsing
 server.xml ?
 
 Is this procedure documented anywhere ?
 
 Regards
 Maneesha
 
 




Re: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Dmitri Colebatch

sorry - I just realised that url doesn't actually contain info on writing
your own.  

hopefully the second part of my email is still useful (o:

cheers
im

On Thu, 25 Oct 2001, Dmitri Colebatch wrote:

 yep, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html
 for details on how to create one.  Depending one what you need to do, it
 may be easier to subclass the JDBC realm and override the getStatement
 (? I think thats it) methods...
 
 hth
 dim
 
 On Tue, 23 Oct 2001, Maneesha Jain wrote:
 
  Hi,
  
  I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?
  
  Is that possible ?
  
  Can I need to implement the Realm interface and stick that in the
  server.xml file?
  
  Where should I put this class, so the tomcat can resolve it when parsing
  server.xml ?
  
  Is this procedure documented anywhere ?
  
  Regards
  Maneesha
  
  
 
 




Re: question

2001-10-25 Thread Dmitri Colebatch

they should go in the WEB-INF/classes, or as a jar in WEB-INF/lib.  You
have got them in the correct directory structure dont you?

hth
dim

On Wed, 24 Oct 2001, Pal, Anshu wrote:

 Hi!
 I recently installed Tomcat ( ver 3.3) . Where should I put the non -servlet
 class files required by the servlets . I tried putting them under
 WEB-INF/classes directory. I get a java.lang.NoClassDefFoundError Exception.
 I tried putting them in the WEB-INF lib directory . doesn't work either.
 
 Any suggestions ?
 TIA
 
 
 Anshu Pal
 
 Proprietary/Confidential Information belonging to CGI may be contained in
 this message. If you are not a recipient indicated or intended in
 this message (or responsible for delivery of this message to such person),
 or you think for any reason that this message may have been
 addressed to you in error, you may not use or copy or deliver this message
 to anyone else. In such case, you should destroy this message
 and kindly notify the sender by reply e-mail.
 
 




Re: File Download - CSV question ****

2001-10-25 Thread Dmitri Colebatch

Are you using the same client between the two servers?  IE seems to
consider itself more important than mimetypes, and if it sees a file
extension it recognises it treats it as it deems fit, regardless of the
mimetype.  So one possibility is that you have just installed excel or
something on the client, and IE is redirecting the download there.

another option is that the mimetype being sent in tomcat 4.0 is different
to 3.x, but I'm not sure about this, so will let someone else answer this
option.

if you outline exactly what client/server you were using before, and now,
it will make the question more specific.  for intsance, tc3.2 on windows
with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
client with IE5.0.

cheers
dim

On Wed, 24 Oct 2001, Evan Swanson wrote:

 
 I wrote an application that for Tomcat 3.2 running on window. In the HTML
 the is a reference ( A HREF=/filname.csv ) to the filename. 
 When I run this on windows I get a popup save as selection box. 
 When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
 but instead displays the data on the screen.
 
 Is this a difference between TC32 adn TC40 or Unix / Windows.
 Is this configurable.
 
 
 Thanks in advance.
 
 




Re: deploying the generated class files instead of jsps

2001-10-24 Thread Dmitri Colebatch

yep - you want to compile your jsps.  have a look at jspc - sorry, not
exactly sure what the best starting point would be.  The jspc.sh script is
probably a good bet, followed by the archives (o:

cheers
dim

On Tue, 23 Oct 2001, Mike Muir wrote:

 
 I was wondering if there is a way to deploy the generated
 class files (in the work directory), rather than the jsps.
 Essentially, I don't wan't it to ever check the jsps (because
 I don't want to distribute them); instead, I want it to
 go directly to the class files in the work directory (or,
 ideally, to a jar/war of those class files).
 
 Thanks.
 
 --
 Mike Muir
 TransactTools, Inc.
 




RE: Urgent : Problems with JDBC Date formats...

2001-10-23 Thread Dmitri Colebatch

In that case perhaps you could try using the SQL TO_DATE function.  I'm
not sure what the proper syntax for this is, but in Oracle you could use
something like:

Select * From table WHERE (dateField = TO_DATE('2001/01/01',
'/mm/dd'))

failing that, see if you can change the default date format in the
database.

hth
dim



On Tue, 23 Oct 2001, Shah, Chintan V (Chintan) wrote:

 Thanks for the guidance, but the problem is...my whole application is
 ready...i'm not using PreparedStatement anywhere... (to be honest, i've
 never used also...). And my SQL Statements are built dynamically in my Java
 Beans depending on the input coming from the users. So, I would prefer a
 solution, which doesn't force me to make drastic changes in my code...
 
 thanks and regards,
 Chintan
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 11:11 AM
 To: '[EMAIL PROTECTED]'
 Subject: Re: Urgent : Problems with JDBC Date formats...
 
 
 I cant guarentee that this will work with Access and SQL server, but the
 proper way to do what you're trying to do is use a PreparedStatement with
 setDate(2, new Date(2001, 1, 1)).  
 
 hth
 dim
 
 On Tue, 23 Oct 2001, Shah, Chintan V (Chintan) wrote:
 
  Hi all,
  
  This is a very off-topic post (as perhaps it has nothing to do with
 tomcat),
  but I hope people would like to guide me on this..
  
  I'm using Tomcat 3.2, Apache 1.3.19, Jdk 1.3, Jdbc-Odbc Driver on Win NT
  4.0.  I want my application to work with both the databases..i.e. with
  Ms-Access 2000 and SQL Server 7.0.
  
  I completed my whole application with Ms-Access, everything working
  fine..then I tried with SQL Server 7.0...by exporting databases from
  Ms-Access to SQL Server. For most of the parts of my code...which is
  interacting with DBs thru JDBC worked fine...except for some syntactical
  changes... but the major problem is with field types of *DATE*.
  In Ms-Access, the field type is Date/Time - short date and in SQL server
  it is smalldatetime.
  
  E.g. SQL Stmt : Select * From table WHERE (dateField = #2001/01/01#)
  gives desired results in MS-Access, but when the DB is SQL Server, it
 gives
  error.
  
  And the same way, SQL Stmt : Select * From table WHERE (dateField =
  '2001/01/01') gives desired results in SQL Server, but when the DB is
  Ms-Access, it gives syntax error, saying that data types mismatch in
  criteria expression.
  
  So, how should I deal with these types of things in my code, to make it
  compatible with Ms-Access and SQL Server as well.
  
  Your guidance will be a great help for me.
  
  thanks and regards, 
  Chintan.
  
 




RE: Urgent : Problems with JDBC Date formats...

2001-10-23 Thread Dmitri Colebatch

On Tue, 23 Oct 2001, Shah, Chintan V (Chintan) wrote:

 ya, I know the Escape sequence...but it doesn't work in case of
 Ms-Accessgives error..
 Malformed GUID. in query expression '(datefield = {d '-mm-dd'})'. Works
 with SQL Server.

I wasn't aware of this, but looks to me to be exactly what you want... I
think the problem you have is the fact that you're trying to use access as
a database... 

 
 So, what to do in that case ??
 
 Moreover, as Dmitri suggested...using TO_DATE function...which doesn't
 work in Ms-Access/SQL Server Query... is it a function of Java ?? If, then
 of which class ?

TO_DATE is an oracle thing I think... but faik it might be part of SQL 

cheers
dim

 
 thanks and regards,
 Chintan
 
 
 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 12:26 PM
 To: [EMAIL PROTECTED]
 Subject: AW: Urgent : Problems with JDBC Date formats...
 
 
 The proper jdbc way to do that, is to use the escape syntax:
 
 for dates:
   where datefield = {d '-mm-dd'} 
 
 for timestamps:
   where datefield = {ts '-mm-dd hh:mm:ss[.f]'} 
 
  -Ursprüngliche Nachricht-
  Von: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 23. Oktober 2001 08:44
  An: Shah, Chintan V (Chintan)
  Cc: [EMAIL PROTECTED]
  Betreff: RE: Urgent : Problems with JDBC Date formats...
 snip/
  Select * From table WHERE (dateField = TO_DATE('2001/01/01',
  '/mm/dd'))
 snip/
 




Re: Java datatypes question: the Set

2001-10-23 Thread Dmitri Colebatch

Have a look at Sun's
Javadoc...  http://java.sun.com/j2se/1.3/docs/api/index.html more
specifically http://java.sun.com/j2se/1.3/docs/api/java/util/HashSet.html

also - this is a very offtopic question.  you might find the java forums
are more helpful place:

http://forum.java.sun.com/

hth
dim

On Tue, 23 Oct 2001, paul wrote:

 Is java.util.HashTable any good
 
 - Original Message - 
 From: Dr. Evil [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, October 20, 2001 4:15 AM
 Subject: Java datatypes question: the Set
 
 
  
  In the particular class that I'm working on, it would be extremely
  handy to have an unordered collection of unique objects (strings)
  which can grow as necessary.  This sounds exactly like the Set class.
  However, Set is an abstract class, so I can't instantiate it.  Are
  there any non-abstract classes that do what Set does?  I have seen
  there is ArrayList, but that allows duplicate values and is ordered.
  There is Vector, which is a lot like ArrayList.  There are the various
  Map classes, but they are associations, which is totally different.
  Any other classes I could be using?
  
  Thanks from a java newbie.
  
 
 




Re: Multiple web.xml files?

2001-10-23 Thread Dmitri Colebatch

On Tue, 23 Oct 2001 [EMAIL PROTECTED] wrote:

 Hi.  Does anyone know if it is possible to have modularized web.xml files for an
 app?  ie tomcat will read all of them and merge them together?  If not, is it
 possible to add servlet mappings dynamically?

afaik Tomcat doesn't support anything like what you're asking for in terms
of web.xml merging.  Re adding mappings dynamically, again, not sure if
its natively supported, but you could write a servlet that matches /* and
have that read and re-read its own config file for dispatching requests.  

cheers
dim




Re: Urgent : Problems with JDBC Date formats...

2001-10-22 Thread Dmitri Colebatch

I cant guarentee that this will work with Access and SQL server, but the
proper way to do what you're trying to do is use a PreparedStatement with
setDate(2, new Date(2001, 1, 1)).  

hth
dim

On Tue, 23 Oct 2001, Shah, Chintan V (Chintan) wrote:

 Hi all,
 
 This is a very off-topic post (as perhaps it has nothing to do with tomcat),
 but I hope people would like to guide me on this..
 
 I'm using Tomcat 3.2, Apache 1.3.19, Jdk 1.3, Jdbc-Odbc Driver on Win NT
 4.0.  I want my application to work with both the databases..i.e. with
 Ms-Access 2000 and SQL Server 7.0.
 
 I completed my whole application with Ms-Access, everything working
 fine..then I tried with SQL Server 7.0...by exporting databases from
 Ms-Access to SQL Server. For most of the parts of my code...which is
 interacting with DBs thru JDBC worked fine...except for some syntactical
 changes... but the major problem is with field types of *DATE*.
 In Ms-Access, the field type is Date/Time - short date and in SQL server
 it is smalldatetime.
 
 E.g. SQL Stmt : Select * From table WHERE (dateField = #2001/01/01#)
 gives desired results in MS-Access, but when the DB is SQL Server, it gives
 error.
 
 And the same way, SQL Stmt : Select * From table WHERE (dateField =
 '2001/01/01') gives desired results in SQL Server, but when the DB is
 Ms-Access, it gives syntax error, saying that data types mismatch in
 criteria expression.
 
 So, how should I deal with these types of things in my code, to make it
 compatible with Ms-Access and SQL Server as well.
 
 Your guidance will be a great help for me.
 
 thanks and regards, 
 Chintan.
 




Re: Root WebApp

2001-10-21 Thread Dmitri Colebatch

open up server.xml and change the docBase of the context with path=

hth
dim

On Sun, 21 Oct 2001, Harden ZHU wrote:

 Hi, How to setup myWebApp as root app? Instead of ROOT.
 
 Thanks
 
 Harden
 
 




Re: servlet in startup

2001-10-21 Thread Dmitri Colebatch

Look at the load on startup flag in web.xml

hth
dim

On Mon, 22 Oct 2001, Jovie Castaneda wrote:

 Hi guys,
 
   Can someone please help me how to make my servlet run when the Tomcat
 starts up. What do I have to do in my codes
 to impelement this or some setup needed for my Tomcat config.?
 Thanks in advance
 
 
 




RE: servlet in startup

2001-10-21 Thread Dmitri Colebatch

On Mon, 22 Oct 2001, Jovie Castaneda wrote:

 Im trying to load this servlet but I think im doing some funny thing here
 I edited the following tags in the web.xml
 servlet-name
Demolog
 /servlet-name
 servlet-class
Demolog
 /servlet-class
 load-on-startup
-2147483646--- i am not sure of this so i retained this value
 /load-on-startup
 ...then I tried to start Tomcat and it says that it cannot load Demolog 
 How do I get around with this?

FIrstly, the load-on-startup is explained in the spec (worth a
read: http://java.sun.com/products/servlet/download.html), but you have
two options.  the simple option is to use an empty 

load-on-startup /

tag, and tomcat will load the server (call its init method) in the startup
procedure, with no guarentee of order.  If you need servlets to be loaded
in a certain order, then you specify the value

load-on-startup1/load-on-startup

in the load on startup tag.  lower values are loaded first.

now if you get the error message, that means something is going wrong in
yourt init method.  use your favourite logging package to find out whats
going on (see http://jakarta.apache.org/log4j if you dont have a favourite
logging package (o:  ).

hth
dim



 Thanks in advance.
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 10:07 AM
 To: [EMAIL PROTECTED]
 Subject: Re: servlet in startup
 
 
 Look at the load on startup flag in web.xml
 
 hth
 dim
 
 On Mon, 22 Oct 2001, Jovie Castaneda wrote:
 
  Hi guys,
  
Can someone please help me how to make my servlet run when the Tomcat
  starts up. What do I have to do in my codes
  to impelement this or some setup needed for my Tomcat config.?
  Thanks in advance
  
  
  
 
 




RE: servlet in startup

2001-10-21 Thread Dmitri Colebatch

On Mon, 22 Oct 2001, Jovie Castaneda wrote:

 Can someone please help me how to make my servlet run when the Tomcat
   starts up. What do I have to do in my codes
   to impelement this or some setup needed for my Tomcat config.?
   Thanks in advance
   
 Hi thanks for the reply but Im really grasping here :(
 I tried to download  tomcat-manual-3.2.3-1.noarch.rpm   
 but I dont know how to open this file so I can read on this..
 thanks for guiding me :)
 

this sort of stuff isn't specific to tomcat, which is why I pointed you at
the spec, rather than the tomcat manual.  however, the tomcat docs should
be included in the tomcat file you downloaded, look in tomcat/docs to see
them.  

as for installing rpms , try

# rpm -ivh tomcat-manual-3.2.3-1.noarch.rpm

as root.  rpms are out of the scope of this list, you'd be better off
finding a linux book for that, but I wouldn't worry about it, you dont
need to - just look in the docs directory of tomcat, and the mailing list
acrhives:

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/

hth
dim





RE: servlet in startup

2001-10-21 Thread Dmitri Colebatch

Put a try/catch around the init method, and print the stack trace.  by the
looks of it I'm guessing your date format is wrong.  btw, if you want the
default date format use DateFormat.getDateInstance() or
DateFormat.getDateTimeInstance() for the locale's normal date and
date/time formats.  THere's a host of other DateFormat.get... methods
which are also worth looking at.

hth
dim

On Mon, 22 Oct 2001, Jovie Castaneda wrote:

 I tried testing my servlet to run when Tomcat starts...and I got this mesg
 from my console
 
 cannot load servlet name: StartMe
 In WebCollect, this day =  296
 In WebCollect, next day = 297
 Starting WebCollect Server...
 cannot load servlet name: StartMe
 cannot load servlet name: StartMe
 
 I just find it strange because it says that it cannot load the StartMe but
 the next line are from the init method of my StartMe Servlet
 
 Does my init method have a prob?
 
 public void init (ServletConfig config) throws ServletException {
 
   System.out.println(Init Called for WebCollect ...);
   java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone(AET));
   java.text.SimpleDateFormat sdf = new
 java.text.SimpleDateFormat(MMMddhhmm);
 
   java.util.Date thisTime = new java.util.Date();
   calendar.setTime(thisTime);
   dayOfYear = calendar.get(Calendar.DAY_OF_YEAR) ;
   dayOfYear += 1 ;
   nextDay = dayOfYear + 1 ;
   System.out.println(In WebCollect, this day =   + dayOfYear );
   System.out.println(In WebCollect, next day =  + nextDay);
   sdf = new java.text.SimpleDateFormat(dd/MM/yy hh:mm:ss a);
   System.out.println(Starting WebCollect Server...);
 }
 
 hoping for your replies...
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: RE: servlet in startup
 
 
 On Mon, 22 Oct 2001, Jovie Castaneda wrote:
 
  Can someone please help me how to make my servlet run when the
 Tomcat
starts up. What do I have to do in my codes
to impelement this or some setup needed for my Tomcat config.?
Thanks in advance
   
  Hi thanks for the reply but Im really grasping here :(
  I tried to download  tomcat-manual-3.2.3-1.noarch.rpm
  but I dont know how to open this file so I can read on this..
  thanks for guiding me :)
 
 
 this sort of stuff isn't specific to tomcat, which is why I pointed you at
 the spec, rather than the tomcat manual.  however, the tomcat docs should
 be included in the tomcat file you downloaded, look in tomcat/docs to see
 them.
 
 as for installing rpms , try
 
 # rpm -ivh tomcat-manual-3.2.3-1.noarch.rpm
 
 as root.  rpms are out of the scope of this list, you'd be better off
 finding a linux book for that, but I wouldn't worry about it, you dont
 need to - just look in the docs directory of tomcat, and the mailing list
 acrhives:
 
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/
 
 hth
 dim
 
 
 




Re: driver configuration with DB2 and tomcat

2001-10-21 Thread Dmitri Colebatch

rename the .zip to .jar - tomcat will only include .jar files afaik

hth
dim

On Sun, 21 Oct 2001, Lawrence Louie wrote:

 Hi,
 
 I am having DB2 for my end, and I have servlet running
 inside tomcat-apache 4.0.  I have gotten DB2 exception
 error about loading the DB2 driver.  I have place the
 db2java.zip in the tomcat-apache/lib directory, and I
 am still having exception problem.
 
 However, if I am just running JDBC application from
 the command prompt, and I can retrieve data from the
 DB2, everything seem to works fine.
 
 Any hint of what I should try?
 
 Thanks!
 
 Lawrence
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 




RE: out.println ?

2001-10-21 Thread Dmitri Colebatch

Have you got it all on one line?  This:

 out.write(this is one line of code,
   and this is another);

wont work, but:

 out.write(this is all on one line);

will.

hth
dim

On Sun, 21 Oct 2001, Miao, Franco CAWS:EX wrote:

 I have cut and paste your code, stiil no luck! thanks.
 
 Franco
 
 
 -Original Message-
 From: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, October 21, 2001 10:01 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: out.println ?
 
 
 check out the number of quotes you are using...and try to do..as i've
 written in my previous mail...
 
 regards,
 Chintan
 
 
 -Original Message-
 From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 10:16 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: out.println ?
 
 
 I got this error now
 
 String not terminated at end of line.
   out.println(You have no account
 
 
 Franco 
 
 
 
 -Original Message-
 From: naveen [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, October 21, 2001 9:39 PM
 To: [EMAIL PROTECTED]
 Subject: Re: out.println ?
 
 
 hi,
 use this!
  out.println(tdA HREF=\http://localhost/adduser.jsp\;You have no
 account
  here, please register one!/A/td);
 
 
 
 - Original Message -
 From: Miao, Franco CAWS:EX [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, October 22, 2001 1:35 PM
 Subject: out.println ?
 
 
  Source code:
 
  --
 --
  ---
  out.println(tdA HREF=http://localhost/adduser.jsp;You have no
 account
 
   here, please register one!/A/td);
 
  
 
  Error code:
 
  --
 --
  --
  Unable to compile class for JSPNote: sun.tools.javac.Main has been
  deprecated.
 
   ')' expected.
  out.println(You have no account
 
 
  
 
  What I missed? Pls advise, thanks!
 
 
  Franco
 
 




Re: Win200 crashing with Tomcat 4

2001-10-20 Thread Dmitri Colebatch

On Fri, 19 Oct 2001, Thomas Diamond wrote:

 then it is entirely possible for bugs in that code to cause coredumps in
 the JVM process -- but an OS that reboots is a faulty OS.  I would start
 with applying all of the recent patches to W2K Pro.
 
 For God's shake the only weird thing I do is parsing an XML and 
 writing or reading from files. No native code,  no database connections.

have you added xerces or any other jars, or are you using the ones that
come with tomcat.  I've found Sun's JDK to crash with certain incorrect
combinations of jar files... not sure exactly which ones, but if I add
xerces, and dont remove the jaxp.jar I think I get problems... 

hth
dim




Re: Conflict between tomcat 3.2 libraries and application libs

2001-10-18 Thread Dmitri Colebatch

Upgrading to tomcat 4 (or maybe 3.3 as well, I'm not sure what it
does with classpath tho) would do the trick, but I'm not sure if that is
an option.  What you are experiencing is a common issue with 3.2, and the
approach you are taking is basically the common fix.

cheers
dim

On Thu, 18 Oct 2001, David Pedrotti wrote:

 I am experiencing conflict with libraries in the tomcat\lib directory
 and the application\WEB-INF\lib directory.
 
 Specifically the web application needs to use a more recent version of
 jaxp.jar than the one deployed with tomcat 3.2 but sees the one in
 tomcat\lib first. Updating the one in tomcat\lib causes problems with
 tomcat (I am looking for a more flexible solution than this!).
 
 Is there a way of configuring tomcat so that the application libraries
 are used first or some other way around the problem?
 
 Does anyone know the solution to this problem.
 
 TIA
 Dave...
 ---
 David Pedrotti   Tel:  (08) 9486 8500
 Beacon TechnologyFax:  (08) 9486 8566
 1 Howard Street  E-mail:   [EMAIL PROTECTED]
 Perth, WA 6000   Web Site: www.beacon.com.au
 
 
 




Re: Getting apache environment variables into Tomcat

2001-10-18 Thread Dmitri Colebatch

oh, sorry... mis-interpreted the question.  Although I'm not lost as to
what you're trying to do... hope you figure it out though (o:

cheers
dim

On Thu, 18 Oct 2001, Nicholas Blachford wrote:

 Dmitri Colebatch wrote:
 
  what's wrong with
  
  request.getServerPort()
  
  from the ServletRequest interface?
 
 
 I know the server port, it's the Client port I want.
 
 
 
 
 --
 
 Nicholas Blachford
 mailto:[EMAIL PROTECTED]
 Ministar nepretpostavljenih okolnosti
 The vast majority of trouble is caused 
 by the verbal minority of people.
 
 
 




RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Dmitri Colebatch

Hi, 

There's a ms driver at

http://www.microsoft.com/sql/downloads/2000/jdbc.asp

the newsgroup microsoft.public.sqlserver.jdbcdriver on
msnews.microsoft.com is a good source of information on this.

cheesr
dim

---

On Thu, 18 Oct 2001, Shah, Chintan V (Chintan) wrote:

 Hi,
 
 Thanks for your reply... then what should i do ? Still my problem is open...
 exactly which driver should I use...and where it is  available...(which
 should be freely available, should allow my code to work with that also
 without changes, and easily implementable...) ...as within  next two days
 I've to launch the application.
 
 I searched for the JDBC drivers on net... I found some of them.. (from
 Merant, iNetSoftwareand some others...) , but they are costly... isn't
 any option available from Sun itself??? 
 
 Within short span..i'm planning to move from MS-Access 2000 to MS-SQL Server
 7.0, so, it should be compatible for both..
 
 urgent help and guidance on this is appreciable
 
 thanks and regards,
 Chintan Shah
 
 
 -Original Message-
 From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 7:53 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error
 
 
 This is a problem in JDBC-ODBC Bridge.., asked and answered so many
 times.., result was..
 
 JDBC-ODBC is not for production !! or any serious use!!!
 
 In either case never a crash in the JVM can be caused by a Java
 program.., it's ever a problem in native parts.., the JDBC-ODBC bridge
 in your case..
 
 Saludos ,
 Ignacio J. Ortega
 
 
  -Mensaje original-
  De: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
  Enviado el: jueves 18 de octubre de 2001 16:15
  Para: '[EMAIL PROTECTED]'
  Asunto: URGENT - Tomcat Crashing Frequently Dr. Watson Error
  Importancia: Alta
  
  
  Hi All,
  
  I'm new to this mailing group. I need some help. 
  
  I'm using Apache 1.3.19 , Tomcat 3.2.1 with Win NT 4.0 
  Service Pack 6,  128
  MB RAM, Pentium II machine.
  My application architecture is Ms-Access - Java Beans - JSP . 
  Many of my JSP
  pages are doing heavy processes like database searching, 
  updating multiple
  database tables, multiple table rows at a time...etc.
  
  My Tomcat crashes very frequently (Dr. Watson Error)...  I tried to
  understand the Dr Watson log file also...And if I am not 
  wrong, I could
  understand that the log file is showing faults in the system 
  functions like,
  MPHeapFree or RtlEnterCriticalSection or something like 
  that.. (If you want
  then i can send you the chunk of that log file also...).
  
  I could identify the sequence of actions also, where the 
  majority times the
  Tomcat crashes... One sequence is ...In IE/NS browser, i log into my
  application, then with Ctrl+N, i open another window and then 
  from both of
  the browser windows, i surf thru different modules and pages, 
  till then it
  works fine...no probs... then, i log out from one of the 
  browser window
  (which obviously logs me out in another browser also...) and 
  close one of
  the window. Then I again log into the application from the 
  open window...and
  go thru different pages and do some heavy database access stuff...like
  searching, updating tables and all... and during this  at 
  some point in
  time...the tomcat crashes...(dr watson error).
  
  Now, as I have gone thru the Archieves of the Tomcat Users mailing
  list...i've frequently seen people saying that JDBC ODBC driver is not
  THREAD SAFE and it should NOT be used for production and Sun is also
  saying that JDBC ODBC driver is just experimental and having 
  some problems
  which they are not going to solve...(sun bug parade...).. and 
  people advice
  to use some other database access drivers.so, can 
  somebody advice me
  that exactly which driver should I use...and where it is 
  available...(which
  should be freely available, should allow my code to work with 
  that also
  without changes, and easily implementable...) ...as within 
  next two days
  I've to launch the application.
  
  eagerly waiting for solutions,
  TIA,
  
  thanks and regards,
  Chintan Shah
  
  
 





Re: Getting apache environment variables into Tomcat

2001-10-17 Thread Dmitri Colebatch

what's wrong with

request.getServerPort()

from the ServletRequest interface?

hth
dim

On Wed, 17 Oct 2001, Han Ming Ong wrote:

 Dear Nicholas,
 
   Did you ever get an answer to this? We would love to hear it please?
 
 Thanks, ohmson
 
  Hi all,
 
  I've set up Tomcat 4.01 and Apache 1.3.19 and I seem to have them 
  working together.
 
 
  Only problem is I need to get the environment variable REMOTE_PORT 
  from Apache.  This appears to be easy in Perl or PHP but trying it in 
  a servlet appears to be another matter.
 
  request.getHeader(REMOTE_PORT); does not work.
 
  I've been digging around trying to find out how to do this but can't 
  find anything (apart from Perl or PHP).
 
  Alternately is there a way to get the remote port directly from Tomcat?
  ... spose I could ask the developers nicely!
 
 
 
  -- 
 
  Nicholas Blachford
  mailto:[EMAIL PROTECTED]
  Ministar nepretpostavljenih okolnosti
  The vast majority of trouble is caused
  by the verbal minority of people.
 
 
 
 
 




RE: How to change session key name

2001-10-17 Thread Dmitri Colebatch

And you could make a web server that handled an HTTP GIVEME command
instead of HTTP GET.., and a client to go with it, but if its not
standard, the you will get locked into that server and client... a much
more extreme example, but the same principle.  

I constantly hear of how hard it is to port from JRun, but I must admit
(naively) not understanding the complexities involved in moving classes.

not trying to be rude, or more accurately, trying not to be rude (o:

cheers
dim

On Wed, 17 Oct 2001, Firestar wrote:

 But JRun does allow me to change it:) I was hoping
 Tomcat 4.0 would be as flexible...
 
 For e.g. another gd thing abt JRun is that it allows
 us to place our servlets and classes anywhere, instead
 of WEB-INF folder. Specification or not, there are
 times where due to certain reasons or legacy issues
 internally, we have to break the 'rule'. And so far we
 still can't move to Tomcat, as much as we would like
 to...:(
 
 Firestar
 
 --- Craig R. McClanahan [EMAIL PROTECTED] wrote:
  
  
  On Thu, 18 Oct 2001, Jovie Castaneda wrote:
  
   Date: Thu, 18 Oct 2001 09:28:46 +1000
   From: Jovie Castaneda [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: RE: How to change session key name
  
   Hi Larry,
  
  Thanks for the reply I really want to make it
  but it seems that I cant
   get
   what's going on here is it beacause im using
  Tomcat 3.1?
  
  
  The use of JSESSIONID for the cookie name is
  required by the servlet
  specification.  Therefore it is not a configurable
  option.
  
  Craig
  
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 




Re: Must servlets be inside WEB-INF/classes pr /lib?

2001-10-05 Thread Dmitri Colebatch

On Fri, 5 Oct 2001, Firestar wrote:

 I'm using TC 4.0, and my servlets (due to some
 constraints) must be placed in a separate folder, e.g.
 E:\myclasses\servlets instead of the recommended
 Servlet Deployment structure, i.e. WEB-INF/classes or
 WEB-INF/lib. 
This is not recommended it is required.  Its laid down by the servlet
specification how a servlet container handles web applications, and what
the structure of a web application should be.

 Is this possible in TC? I know in JRun it is possible
 to do so by specifying the classpath to my servlets in
 the configuration file. 
Anything's possible  the simplest way is to change the catalina.sh to
include your classpath, but this is plain _wrong_, what you would be
better off doing is changing your build/deploy process so that you have a
properly structured webapp.

for more info check out http://java.sun.com/products/servlets

cheers
dim





Re: Must servlets be inside WEB-INF/classes pr /lib?

2001-10-05 Thread Dmitri Colebatch

Hi,

yeah, that doesn't surprise me... the reason that tomcat 4 ignores your
classpath is that it causes all sorts of problems.  seriously, the spec
outlines how things are suppose to happen, and my best advice would be to
put your servlets in web-inf/classes (or lib).  

alternatively, you'd need to have a good explanation from someone who
fully understands the class loading mechanism of catalina... I could take
a few guesses, but wont.  I also think that someone who does fully
understand it will simply repeat the above advice 

so, cd /myservletclasses; jar cf myservlets.jar *

(o:

cheers
dim

On Fri, 5 Oct 2001, Firestar wrote:

 Hi Dmitri, thanks for your quick reply. 
 
 I have tried adding the classpath to my servlets to
 catalina.bat, but it throw a javax.http.servlet class
 not found exception. It will works OK if i do not add
 in the classpath.
 
 Regards,
 Firestar
 
   Is this possible in TC? I know in JRun it is
  possible
   to do so by specifying the classpath to my
  servlets in
   the configuration file. 
  Anything's possible  the simplest way is to
  change the catalina.sh to
  include your classpath, but this is plain _wrong_,
  what you would be
  better off doing is changing your build/deploy
  process so that you have a
  properly structured webapp.
  
  for more info check out
  http://java.sun.com/products/servlets
  
  cheers
  dim
  
  
 
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
 http://geocities.yahoo.com/ps/info1
 




Re: Must servlets be inside WEB-INF/classes pr /lib?

2001-10-05 Thread Dmitri Colebatch

In that case you can use tomcat 3.x, it does allow your servlets to be int
he global classpath, but there are potential hazards involved.  For
instance you wont be able to have them reloaded dynamically.

hth
cheesr
dim

On Fri, 5 Oct 2001, Firestar wrote:

 Hi Dmitri, thanks for yr patience.
 
 I guess we have no choice but to stick with JRun for
 the moment (until we sort out our own classes
 deployment internally), as it allows us the
 'flexibility' to break the rule:) 
 
 Regards,
 Firestar
 
 --- Dmitri Colebatch [EMAIL PROTECTED] wrote:
  Hi,
  
  yeah, that doesn't surprise me... the reason that
  tomcat 4 ignores your
  classpath is that it causes all sorts of problems. 
  seriously, the spec
  outlines how things are suppose to happen, and my
  best advice would be to
  put your servlets in web-inf/classes (or lib).  
  
  alternatively, you'd need to have a good explanation
  from someone who
  fully understands the class loading mechanism of
  catalina... I could take
  a few guesses, but wont.  I also think that someone
  who does fully
  understand it will simply repeat the above
  advice 
  
  so, cd /myservletclasses; jar cf myservlets.jar *
  
  (o:
  
  cheers
  dim
  
  On Fri, 5 Oct 2001, Firestar wrote:
  
   Hi Dmitri, thanks for your quick reply. 
   
   I have tried adding the classpath to my servlets
  to
   catalina.bat, but it throw a javax.http.servlet
  class
   not found exception. It will works OK if i do not
  add
   in the classpath.
   
   Regards,
   Firestar
   
 Is this possible in TC? I know in JRun it is
possible
 to do so by specifying the classpath to my
servlets in
 the configuration file. 
Anything's possible  the simplest way is to
change the catalina.sh to
include your classpath, but this is plain
  _wrong_,
what you would be
better off doing is changing your build/deploy
process so that you have a
properly structured webapp.

for more info check out
http://java.sun.com/products/servlets

cheers
dim


   
   
   __
   Do You Yahoo!?
   NEW from Yahoo! GeoCities - quick and easy web
  site hosting, just $8.95/month.
   http://geocities.yahoo.com/ps/info1
   
  
 
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
 http://geocities.yahoo.com/ps/info1
 




Re: getparameter

2001-10-04 Thread Dmitri Colebatch

how are you calling it?  I literally cut and pasted it into a file
(attached) in and saved it in the examples context of a normal install -
worked fine.

cheers
dim



On Thu, 4 Oct 2001, Michele Cerioni wrote:

 Dmitri Colebatch wrote:
  
  works fine for me on java 1.3 from sun.
  
  On Wed, 3 Oct 2001, Roberto B. wrote:
  
   I use linux (debian), T3.2.3 and jsdk 1.4 ...and your code works!
   Try to upgrade to jsdk 1.4
  
   R.
  
   - Original Message -
   From: Michele Cerioni [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, October 03, 2001 6:38 PM
   Subject: getparameter
  
  
Hi,
I use jakarta-tomcat-3.2.3 and jdk1.3.1_01 apache1.3.19 on Linux 2.2.19.
   
I created a file  prova.jsp
   
html
   head
  title Prova /title
   /head
  body
 %
  out.println(bCiao:  + request.getParameter(user) +
/b);
  out.println(bbrCiao:  + request.getMethod() + /b);
 %
  /body
/html
   
when I call the URL  prova.jsp?user=pippo I get this page:
   
Ciao: null
Ciao: GET
   
if I call prova.jsp using POST method I get the value pippo for the
parameter user.
   
Why GET method dosn't work?
   
Michele
  
  
 
 I tried j2re1.4 but it dosn't work.
 
 Anyone have any ideas as to why this happens?
 
 Michele
 


html
head
   title Prova /title
/head
   body
  %
   out.println(bCiao:  + request.getParameter(user) + /b);
   out.println(bbrCiao:  + request.getMethod() + /b);
  %
   /body
 /html



RE: Forward to different website.

2001-10-04 Thread Dmitri Colebatch

On Fri, 5 Oct 2001, menonv wrote:

 Doesn't the request dispatcher work within the context of the
 application/container? Shouldn't you be using sendRedirect instead?

correct.

 
  -Original Message-
  From:   Bob Byron [SMTP:[EMAIL PROTECTED]]
  Sent:   Friday, October 05, 2001 12:11 AM
  To: [EMAIL PROTECTED]
  Subject:Forward to different website.
  
  I need to forward to a different website entirely from inside my servlet.
  
  I tried using the following code:
  RequestDispatcher rd =
  getServletContext().getRequestDispatcher(//otherwebsite.com/page.html);
  rd.forward(request, response);
  
  But it didn't seem to want to forward anywhere.  I was able to
  successfully
  forward inside my own site though.  But I do need to forward to a
  different
  site.  Is there any way for me to do this?
  
  I am in http://websiteone.com/someservlet; and want to forward back to
  http://anotherwebsite.com/somepage.html;.
  
  Thank You,
  Bob Byron
 
 
 Disclaimer
 
 This communication together with any attachments transmitted with it ('this E-mail') 
is intended only for the use of the addressee and may contain information which is 
privileged and confidential. If the reader of this E-mail is not the intended 
recipient or the employee or agent responsible for delivering it to the intended 
recipient you are notified that any use of this E-mail is prohibited. Addressees 
should check this E-mail for viruses. The Carphone Warehouse Group PLC makes no 
representations as regards the absence of viruses in this E-mail. If you have 
received this E-mail in error please notify our ISe Response Team immediately by 
telephone on + 44 (0)20 8896 5828 or via E-mail at [EMAIL PROTECTED] Please then 
immediately destroy this E-mail and any copies of it.
 
 Please feel free to visit our website: http://www.phonehouse.com
 
 




Re: Forward Request alogn with Parameters

2001-10-04 Thread Dmitri Colebatch

It looks like the request dispatcher isn't being found.  try using
/vieworder.jsp or whatever the location relevant to your base is.

cheers
dim

On Thu, 4 Oct 2001, Brian Richards wrote:

 I get a null pointer exception at dispatcher.forward()  am i doing something
 wrong?
 
 thanks
 
 brian
 
 request.setAttribute(custName,custName);
 request.setAttribute(custStreet,custStreet);
 request.setAttribute(custZip,custZip);
 request.setAttribute(custEmail,custEmail);
 request.setAttribute(custCity,custCity);
 request.setAttribute(custState,custState);
 request.setAttribute(productName,productName);
 RequestDispatcher dispatcher =
 getServletContext().getRequestDispatcher(vieworder.jsp);
 dispatcher.forward(request,response);
 
 
 
 




Re: Initialcontext problem

2001-10-03 Thread Dmitri Colebatch

What environment variables are you setting for JNDI?  Do you have a
jndi.properties file in your classpath?

cheers
dim

On Wed, 3 Oct 2001, asheesh wrote:

 Dear all
 
 i am posting it for 3rd time, let me know if anyone can help me in this.
 
 I am running tomcat3.2.3 on Linux with Borland Application Server. My whole
 code was working fine on NT platform, but when i shifted the thing to Linux,
 at the time of execution of command
 
 Context ctx = new InitialContext();
 The server returns an error License Expired,  and stops,  and there is no
 additional information for this.
 
 What could be the possible cause? I tried to look around this but could not
 find document or help material. Also to point out that I don't have any exp.
 on linux.
 
 If someone is running same setup with any of the EJB Containers pls. do let
 me know if this command works fine or what i am overlooking. It may be some
 OS security constraints which are causing this problem.
 
 thanks in advance!!!
 
 regards
 asheesh
 
 
 
 
 




Re: Initialcontext problem

2001-10-03 Thread Dmitri Colebatch

The construction of an InitialContext will look for system properties:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost

The above values are for use with JBoss, but essentially those properties
should be set for the InitialContext constructor to work.  What I would do
is a System.getProperty() for each of the above property and see what the
values are.  I suspect that the values specify a JNDI implementation that
you might have downloaded on trial, and the trial period has
expired... does that make sense? 

let me know

hth
dim


On Wed, 3 Oct 2001, asheesh wrote:

 Thanks for ur reply, but i am sorry to say that i am not getting to it, as
 far as i know following command does not req. any property file.
 
 Now my problem is as soon as i try to create refrence of Context using
 InitialContext, Tomcat stops with the one line message and there are no
 details in any of the log files too.
 
 Do u have anyother comments or suggestions, or Pls. let me know how to
 proceed. My immediate aim is to execute following line of code on Linux.
 
 Context ctx = new InitialContext();
 then i can initialize my context with HashTable or Some property file.
 
 thanks !!
 
 regards
 asheesh
 
 
 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 03, 2001 4:59 PM
 Subject: Re: Initialcontext problem
 
 
  What environment variables are you setting for JNDI?  Do you have a
  jndi.properties file in your classpath?
 
  cheers
  dim
 
  On Wed, 3 Oct 2001, asheesh wrote:
 
   Dear all
  
   i am posting it for 3rd time, let me know if anyone can help me in this.
  
   I am running tomcat3.2.3 on Linux with Borland Application Server. My
 whole
   code was working fine on NT platform, but when i shifted the thing to
 Linux,
   at the time of execution of command
  
   Context ctx = new InitialContext();
   The server returns an error License Expired,  and stops,  and there is
 no
   additional information for this.
  
   What could be the possible cause? I tried to look around this but could
 not
   find document or help material. Also to point out that I don't have any
 exp.
   on linux.
  
   If someone is running same setup with any of the EJB Containers pls. do
 let
   me know if this command works fine or what i am overlooking. It may be
 some
   OS security constraints which are causing this problem.
  
   thanks in advance!!!
  
   regards
   asheesh
  
  
  
  
  
 
 
 
 




Re: Initialcontext problem

2001-10-03 Thread Dmitri Colebatch

What are the properties you have in the jndi.properties file (previously
in the hashtable)?

cheers
dim

On Wed, 3 Oct 2001, asheesh wrote:

 Dear Dim,
 
 Thanks for ur help, in the meantime i studied the InitialContext Class and
 found that passing null in new InitialContext Means that the ResourceManager
 will look for some property file in Java_home/lib , so i created one
 property file (jndi.properties) there, for the parameters which earlier i
 was trying to do in HashTable only and with all ur advise and directions the
 thing started working.
 
 Still i am facing some problem in looking up beans, i feel they are not
 deployed properly and is a minor issue now, if u still have some suggestions
 u can send me ur thoughts.
 
 -- I am getting NamingException -
 
 best regards
 asheesh
 
 
 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 03, 2001 7:24 PM
 Subject: Re: Initialcontext problem
 
 
  The construction of an InitialContext will look for system properties:
 
  java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
  java.naming.provider.url=localhost
 
  The above values are for use with JBoss, but essentially those properties
  should be set for the InitialContext constructor to work.  What I would do
  is a System.getProperty() for each of the above property and see what the
  values are.  I suspect that the values specify a JNDI implementation that
  you might have downloaded on trial, and the trial period has
  expired... does that make sense?
 
  let me know
 
  hth
  dim
 
 
  On Wed, 3 Oct 2001, asheesh wrote:
 
   Thanks for ur reply, but i am sorry to say that i am not getting to it,
 as
   far as i know following command does not req. any property file.
  
   Now my problem is as soon as i try to create refrence of Context using
   InitialContext, Tomcat stops with the one line message and there are no
   details in any of the log files too.
  
   Do u have anyother comments or suggestions, or Pls. let me know how to
   proceed. My immediate aim is to execute following line of code on Linux.
  
   Context ctx = new InitialContext();
   then i can initialize my context with HashTable or Some property file.
  
   thanks !!
  
   regards
   asheesh
  
  
   - Original Message -
   From: Dmitri Colebatch [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, October 03, 2001 4:59 PM
   Subject: Re: Initialcontext problem
  
  
What environment variables are you setting for JNDI?  Do you have a
jndi.properties file in your classpath?
   
cheers
dim
   
On Wed, 3 Oct 2001, asheesh wrote:
   
 Dear all

 i am posting it for 3rd time, let me know if anyone can help me in
 this.

 I am running tomcat3.2.3 on Linux with Borland Application Server.
 My
   whole
 code was working fine on NT platform, but when i shifted the thing
 to
   Linux,
 at the time of execution of command

 Context ctx = new InitialContext();
 The server returns an error License Expired,  and stops,  and there
 is
   no
 additional information for this.

 What could be the possible cause? I tried to look around this but
 could
   not
 find document or help material. Also to point out that I don't have
 any
   exp.
 on linux.

 If someone is running same setup with any of the EJB Containers pls.
 do
   let
 me know if this command works fine or what i am overlooking. It may
 be
   some
 OS security constraints which are causing this problem.

 thanks in advance!!!

 regards
 asheesh





   
   
  
  
 
 
 
 




Re: Newbie: Tomcat EJBs

2001-10-03 Thread Dmitri Colebatch

From jboss-user there is a slight bug in the 2.4.2 release relating to
JBossMQ on win32, there is a 2.4.3 release to fix this.

On Wed, 3 Oct 2001, Yoav Shapira wrote:

 Hi,
 It's still there.  For the adventurous, try the new JBoss2.4.1-Tomcat4.0
 integrated download:
 http://prdownloads.sourceforge.net/jboss/JBoss-2.4.2_Tomcat-4.0.zip
 
 Otherwise, you can just go to jboss.org and download the latest
 release-quality thing, which is integrated with Tomcat 3.2.3 I believe.
 Good luck ;)
 
 Yoav
 - Original Message -
 From: Shane Geiger [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 03, 2001 3:27 PM
 Subject: RE: Newbie: Tomcat  EJBs
 
 
  A while ago someone sent me a link to a product on sourceforge that was
  apparently a combination JBoss-Tomcat product.
 
 
 
 
 




Re: Performance -- Tomcat Standalone v. Apache/Tomcat

2001-10-02 Thread Dmitri Colebatch

If you are only running servlets and jsp, try tomcat standalone, that is,
without j2ee.  The performance is perfectly adequate IMHO

cheers
dim

On 3 Oct 2001, Andrew Reid wrote:

 On Wed, 2001-10-03 at 11:30, Andrew Reid wrote:
 
  It appears that the main problem is the Tomcat included with J2EE. I was
  wondering if anyone was able to give me an indication of what would
  perform better, as a general rule.
 
 That is, what would be better between Apache/Tomcat and Tomcat stand
 alone.
 
- andrew
 
 




Re: Performance -- Tomcat Standalone v. Apache/Tomcat

2001-10-02 Thread Dmitri Colebatch

I think you'd be well served to viewing a recent post from Craig (o:  

http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg34621.html

cheers
dim


On 3 Oct 2001, Andrew Reid wrote:

 On Wed, 2001-10-03 at 12:15, Dmitri Colebatch wrote:
 
  If you are only running servlets and jsp, try tomcat standalone, that is,
  without j2ee.  The performance is perfectly adequate IMHO
 
 Would you say that Tomcat standalone is generally faster (for servlets
 and JSP) than Apache+Tomcat?
 
- andrew
 
 




Re: java.io.NotSerializable exception when calling EJB from servlet?

2001-09-27 Thread Dmitri Colebatch

The arguments to the remote metho dmust be serializable at runtime.  The
HttpRequest of Catalina's isn't so you wont be able to do that.  What you
want to do is extract the values you need out of the request, and pass
them to the process method so that the process method is pure business
logic and doesn't care where the request comes from 

cheers
dim

On Thu, 27 Sep 2001, Andrew Wright wrote:

 Hi all,
 
 I'm trying to call an EJB method from a servlet. The EJB methods work 
 fine when I use a standalone test app, but die when I make the same 
 calls from a servlet, throwing:
 
 java.io.NotSerializableException: 
 org.apache.catalina.connector.HttpRequestFacade
 stack trace snipped
 
 The servlet can create the EJB instance OK, it's not a lookup problem. 
 The exception is thrown when I call a custom method in the servlet (it 
 doesn't do anything, it's just a test stub). The remote interface method 
 looks like:
 
 public void process(HttpServletRequest reqest, HttpServletResponse 
 response) throws RemoteException, java.io.NotSerializableException;
 
 I'm currently using Tomcat 4 + JBoss 2.4.1 (seperately, not integrated), 
 but had the same problem with Tomcat 3. The only fields in the 
 Registration EJB are Strings - nothing fancy. I've stripped the bean 
 'bare' to try and isolate the problem, without success.
 
 Despite much net searching I haven't seen any reports of similar 
 problems - surely I'm not the only one? I'm running on Mac OS X 10.1 
 (Hotspot Java VM 1.3.1 for those who don't know).
 
 Any suggestions/thoughts gratefully received.
 Regards,
 Andrew Wright
 
 




Re: Cocoon 1 and Tomcat 4 - Cocoon is not a Servlet???

2001-09-26 Thread Dmitri Colebatch

I would think the error would be because you are using a 2.2 servlet in a
2.3 container.  I'm not sure if cocoon have recompiled against the 2.3
api, and I could be wrong here, but that's what it seems to suggest.

cheers
dim


On Wed, 26 Sep 2001, Red wrote:

 Hi there
 I need to run Cocoon 1 and it is working fine with Tomcat 3.2.3. Now I 
 was trying the same installation under Tomcat 4 and got the following 
 errors in the browser:
 
 A Servlet Exception Has Occurred
 
 Exception Report:
 
 javax.servlet.ServletException: Class org.apache.cocoon.Cocoon is not a 
 Servlet
 at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
 at org.apache.catalina.core.StandardWrapper.allocate(Unknown 
 Source)
 at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContextValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContext.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardHostValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardEngineValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at 
 org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown 
 Source)
 at org.apache.catalina.connector.warp.WarpConnection.run(Unknown 
 Source)
 at java.lang.Thread.run(Thread.java:484)
 
 Root Cause:
 
 java.lang.ClassCastException: org.apache.cocoon.Cocoon
 at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
 at org.apache.catalina.core.StandardWrapper.allocate(Unknown 
 Source)
 at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContextValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContext.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardHostValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardEngineValve.invoke(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown 
 Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown 
 Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at 
 org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown 
 Source)
 at org.apache.catalina.connector.warp.WarpConnection.run(Unknown 
 Source)
 at java.lang.Thread.run(Thread.java:484)
 
 The web.xml looks like that:
 
 ?xml version=1.0 encoding=ISO-8859-1?
  
 !--
  This is the web-app configurations that allow Cocoon to work under
  Apache Tomcat. Please, follow the installation section of the
  documentation for more information about installing Cocoon on Tomcat
 --
  
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
 http://java.sun.com/j2ee/dtds/web-app_2.2.dtd;
  
 web-app
  servlet
   servlet-nameCocoon/servlet-name
   servlet-classorg.apache.cocoon.Cocoon/servlet-class
   init-param
param-nameproperties/param-name
param-valueWEB-INF/conf/cocoon.properties/param-value
   /init-param
  /servlet
  
  servlet-mapping
   servlet-nameCocoon/servlet-name
   url-pattern*.xml/url-pattern
  /servlet-mapping
 /web-app
 
 
 What could be wrong? 
 Greets and thank you
 Red 
 
 
 




Re: Cocoon 1 and Tomcat 4 - Cocoon is not a Servlet???

2001-09-26 Thread Dmitri Colebatch

I should say I'm not at all sure... just suggesting... but if a class is
compiled against one binary, and then run against another wont it get some
error along the lines of invalid class - similar to what happens in 3.x
when a servlet is recompiled with a new compiled version of a bean...

does the spec say that a servlet container must support something compiled
against the 2.2 api?  or just that it must support something coded against
2.2 but compiled against 2.3?

be keen to hear if I am completely off the mark here?

On Wed, 26 Sep 2001, simon wrote:

 Should be.  Part of the 2.3 spec is to be completely backwards compatible with 2.2.
 
 Maybe cocoon isn't 2.2 compatible.
 
 - Original Message -
 From: Red [EMAIL PROTECTED]
 To: Dmitri Colebatch [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, September 26, 2001 5:43 PM
 Subject: Re: Cocoon 1 and Tomcat 4 - Cocoon is not a Servlet???
 
 
 Isn't Tomcat 4 backward compatible?
 
  Ursprüngliche Nachricht 
 
 Am 26.09.01, 10:38:56, schrieb Dmitri Colebatch [EMAIL PROTECTED] zum
 Thema Re: Cocoon 1 and Tomcat 4 - Cocoon is not a Servlet??? :
 
 
  I would think the error would be because you are using a 2.2 servlet in a
  2.3 container.  I'm not sure if cocoon have recompiled against the 2.3
  api, and I could be wrong here, but that's what it seems to suggest.
 
  cheers
  dim
 
 
  On Wed, 26 Sep 2001, Red wrote:
 
   Hi there
   I need to run Cocoon 1 and it is working fine with Tomcat 3.2.3. Now I
   was trying the same installation under Tomcat 4 and got the following
   errors in the browser:
  
   A Servlet Exception Has Occurred
  
   Exception Report:
  
   javax.servlet.ServletException: Class org.apache.cocoon.Cocoon is not a
   Servlet
   at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
   at org.apache.catalina.core.StandardWrapper.allocate(Unknown
   Source)
   at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContextValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContext.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardHostValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at
   org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown
   Source)
   at org.apache.catalina.connector.warp.WarpConnection.run(Unknown
   Source)
   at java.lang.Thread.run(Thread.java:484)
  
   Root Cause:
  
   java.lang.ClassCastException: org.apache.cocoon.Cocoon
   at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
   at org.apache.catalina.core.StandardWrapper.allocate(Unknown
   Source)
   at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContextValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContext.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardHostValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown
   Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
   Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown

RE: tomcat is crashing

2001-09-25 Thread Dmitri Colebatch

Is this a vanilla install of tomcat, or have you had it running
before?  What applications do you have deployed in it - do any of them
use their own xml libraries?

cheers
dim

On Tue, 25 Sep 2001, Haresh Gujarathi wrote:

 Just FYI
 When it crashes; I get following dump in the tomcat.log
 
 
 
 SIGSEGV   11*  segmentation violation
 si_signo [11]: SIGSEGV   11*  segmentation violation
 si_errno [0]: Success
 si_code [1]: SEGV_MAPERR [addr: 0x4]
 
   stackpointer=0x448b0b00
 
 Full thread dump Classic VM (1.2.2-RC2-K, green threads):
 SeedGenerator Thread (TID:0x40eceb20, sys_thread_t:0x870c7e8,
 state:CW) prio=1
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at sun.security.provider.SeedGenerator.run(SeedGenerator.java:109)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-33 (TID:0x40eba028, sys_thread_t:0x86a9658, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at org.apache.tomcat.util.ThreadPool$MonitorRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-32 (TID:0x40eb9fd0, sys_thread_t:0x86a80c8, state:CW) prio=5
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java, Compiled Code)
   at java.net.ServerSocket.implAccept(ServerSocket.java, Compiled Code)
   at java.net.ServerSocket.accept(ServerSocket.java, Compiled Code)
   at
 org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java,
 Compiled Code)
   at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
 Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-31 (TID:0x40eb9f00, sys_thread_t:0x86a6b38, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-30 (TID:0x40eb9ea8, sys_thread_t:0x86a55a8, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-29 (TID:0x40eba1a8, sys_thread_t:0x86a4018, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-28 (TID:0x40eba130, sys_thread_t:0x86a2a88, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-27 (TID:0x40eba0d8, sys_thread_t:0x8692560, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-26 (TID:0x40eba070, sys_thread_t:0x8691f88, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-25 (TID:0x40ec1230, sys_thread_t:0x869d2b0, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-24 (TID:0x40ec11d8, sys_thread_t:0x869ccd8, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-23 (TID:0x40ec1180, sys_thread_t:0x86945e8, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java, Compiled Code)
   at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 Thread-22 (TID:0x40ec1438, sys_thread_t:0x868d710, state:CW) prio=5
   at java.lang.Object.wait(Native Method)
   at org.apache.tomcat.util.ThreadPool$MonitorRunnable.run(ThreadPool.java)
   at java.lang.Thread.run(Thread.java, Compiled Code)
 

Re: newbie Servlet

2001-09-25 Thread Dmitri Colebatch

yes you do have to compile your servlets.  jsps are the only thing that
tomcat will compile for you.  

cheers
dim

On Sun, 23 Sep 2001, Isak Rickyanto wrote:

 Sorry it is newbie..
 
 I have myservlet.java
 and i place in
 tomcat/webapps/myapp/web-inf/classes
 and i had modified web.xml in web-inf..
 
 I only want to ask... Is Tomcat not automatically compile it? or I must
 compile the servlet first?
 
 
 




RE: tomcat is crashing

2001-09-25 Thread Dmitri Colebatch

(o:

by 'their own xml libraries' I mean xerces... someone correct me here, but
try putting jaxp.jar back in, and renaming xerces.jar to _xerces.jar

xerces has some of the classes in jaxp.jar but not all (I think), so you
need to have both, but ensure that xerces is loaded first.

I'll say again - I think... this is the conclusion I came to after similar
experience.  btw - have you tried this with IBM's jdk I found that to
survive, but fail with classnotfounds - as it should.

hth
dim

On Wed, 26 Sep 2001, Haresh Gujarathi wrote:

 There are 6/7 servlet applications running on it. Till then everything was
 fine.
 I added new application which uses Xalan, xerces heavily. I replaced the
 jaxp.jar and parser.jar of the tomcat/lib with the xalan.jar and xerces.jar.
 
 What do you mean by 'their own xml libraries' ?
 
 There is small discipency in what I stated in my earlier mail; I stated that
 I am using JVM 1.3.0
 But the thread dump says that it is VM (1.2.2-RC2-K).
 
 And I am actualy using the JVM 1.2.2
 
 -- haresh
 
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 25, 2001 5:17 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: tomcat is crashing
 
 
 Is this a vanilla install of tomcat, or have you had it running
 before?  What applications do you have deployed in it - do any of them
 use their own xml libraries?
 
 cheers
 dim
 
 On Tue, 25 Sep 2001, Haresh Gujarathi wrote:
 
  Just FYI
  When it crashes; I get following dump in the tomcat.log
 
 
 
  SIGSEGV   11*  segmentation violation
  si_signo [11]: SIGSEGV   11*  segmentation violation
  si_errno [0]: Success
  si_code [1]: SEGV_MAPERR [addr: 0x4]
 
  stackpointer=0x448b0b00
 
  Full thread dump Classic VM (1.2.2-RC2-K, green threads):
  SeedGenerator Thread (TID:0x40eceb20, sys_thread_t:0x870c7e8,
  state:CW) prio=1
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at sun.security.provider.SeedGenerator.run(SeedGenerator.java:109)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-33 (TID:0x40eba028, sys_thread_t:0x86a9658, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at org.apache.tomcat.util.ThreadPool$MonitorRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-32 (TID:0x40eb9fd0, sys_thread_t:0x86a80c8, state:CW) prio=5
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java, Compiled Code)
  at java.net.ServerSocket.implAccept(ServerSocket.java, Compiled Code)
  at java.net.ServerSocket.accept(ServerSocket.java, Compiled Code)
  at
 
 org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java,
  Compiled Code)
  at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
  Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-31 (TID:0x40eb9f00, sys_thread_t:0x86a6b38, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-30 (TID:0x40eb9ea8, sys_thread_t:0x86a55a8, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-29 (TID:0x40eba1a8, sys_thread_t:0x86a4018, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-28 (TID:0x40eba130, sys_thread_t:0x86a2a88, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-27 (TID:0x40eba0d8, sys_thread_t:0x8692560, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code)
  Thread-26 (TID:0x40eba070, sys_thread_t:0x8691f88, state:CW) prio=5
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java, Compiled Code)
  at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
  at java.lang.Thread.run(Thread.java, Compiled Code

Re: [JSP] get serial value in PostgreSQL

2001-09-25 Thread Dmitri Colebatch

from the postgres doco:

SELECT last_value FROM seqname

and you shouldn't have to worry about timing... sequence allocations will
be on a per connection basis, so as long as you're not sharing connections
between threads (you're not are you (o:  ..) then you'll be ok.  

it is kinda off topic though - the postgres docs are a good read too (o:

cheers
dim


On Tue, 25 Sep 2001, Micael Padraig Og mac Grene wrote:

 Don't know PostgreSQL, but it must be a call of to get something like
 lastId().  Watch not to leave any space in time between the two, if you
 have an active site, and even if you do not.
 
 
 -Original Message-
 From: Lester June Cabrera [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Tuesday, September 25, 2001 9:47 PM
 Subject: [JSP] get serial value in PostgreSQL
 
 
 
 After adding a record in PostgreSQL with id as serial, how do I get the
 value of id?
 
 
 Thanks,
 Lester
 
 
 
 




RE: tomcat is crashing

2001-09-25 Thread Dmitri Colebatch

I dont know what the cause is, just that I've experienced the same
problem... I'll be interested to hear if my approach fixes your problem
too...

let me know how you go with putting jaxp.jar back and renaming xerces to
_xerces.jar

cheers
dim


On Wed, 26 Sep 2001, Haresh Gujarathi wrote:

 no, I have not tried ibm jvm.
 
 Why do u say and (I feel) that it is some problem with xml libraries?
 
 -- haresh
 
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 26, 2001 10:36 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: tomcat is crashing
 
 
 (o:
 
 by 'their own xml libraries' I mean xerces... someone correct me here, but
 try putting jaxp.jar back in, and renaming xerces.jar to _xerces.jar
 
 xerces has some of the classes in jaxp.jar but not all (I think), so you
 need to have both, but ensure that xerces is loaded first.
 
 I'll say again - I think... this is the conclusion I came to after similar
 experience.  btw - have you tried this with IBM's jdk I found that to
 survive, but fail with classnotfounds - as it should.
 
 hth
 dim
 
 On Wed, 26 Sep 2001, Haresh Gujarathi wrote:
 
  There are 6/7 servlet applications running on it. Till then everything was
  fine.
  I added new application which uses Xalan, xerces heavily. I replaced the
  jaxp.jar and parser.jar of the tomcat/lib with the xalan.jar and
 xerces.jar.
 
  What do you mean by 'their own xml libraries' ?
 
  There is small discipency in what I stated in my earlier mail; I stated
 that
  I am using JVM 1.3.0
  But the thread dump says that it is VM (1.2.2-RC2-K).
 
  And I am actualy using the JVM 1.2.2
 
  -- haresh
 
 
  -Original Message-
  From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 25, 2001 5:17 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: RE: tomcat is crashing
 
 
  Is this a vanilla install of tomcat, or have you had it running
  before?  What applications do you have deployed in it - do any of them
  use their own xml libraries?
 
  cheers
  dim
 
  On Tue, 25 Sep 2001, Haresh Gujarathi wrote:
 
   Just FYI
   When it crashes; I get following dump in the tomcat.log
  
  
  
   SIGSEGV   11*  segmentation violation
   si_signo [11]: SIGSEGV   11*  segmentation violation
   si_errno [0]: Success
   si_code [1]: SEGV_MAPERR [addr: 0x4]
  
 stackpointer=0x448b0b00
  
   Full thread dump Classic VM (1.2.2-RC2-K, green threads):
   SeedGenerator Thread (TID:0x40eceb20, sys_thread_t:0x870c7e8,
   state:CW) prio=1
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java, Compiled Code)
 at sun.security.provider.SeedGenerator.run(SeedGenerator.java:109)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-33 (TID:0x40eba028, sys_thread_t:0x86a9658, state:CW)
 prio=5
 at java.lang.Object.wait(Native Method)
 at
 org.apache.tomcat.util.ThreadPool$MonitorRunnable.run(ThreadPool.java)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-32 (TID:0x40eb9fd0, sys_thread_t:0x86a80c8, state:CW)
 prio=5
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java, Compiled Code)
 at java.net.ServerSocket.implAccept(ServerSocket.java, Compiled Code)
 at java.net.ServerSocket.accept(ServerSocket.java, Compiled Code)
 at
  
 
 org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java,
   Compiled Code)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
   Compiled Code)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-31 (TID:0x40eb9f00, sys_thread_t:0x86a6b38, state:CW)
 prio=5
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java, Compiled Code)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-30 (TID:0x40eb9ea8, sys_thread_t:0x86a55a8, state:CW)
 prio=5
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java, Compiled Code)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-29 (TID:0x40eba1a8, sys_thread_t:0x86a4018, state:CW)
 prio=5
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java, Compiled Code)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
 at java.lang.Thread.run(Thread.java, Compiled Code)
   Thread-28 (TID:0x40eba130, sys_thread_t:0x86a2a88, state:CW)
 prio=5
 at java.lang.Object.wait(Native Method)
 at java.lang.Object.wait(Object.java, Compiled Code)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java

Re: MyClass.getPackage() == null... Why?

2001-09-24 Thread Dmitri Colebatch

Hi,

I'm not sure if this is going to help, but... from the jdk javadoc:

the package of the class, or null if no package information is available
from the archive or codebase.

It doesn't really clarify when no package information would be
available... but in the Package docs:

Package objects contain version information about the implementation and
specification of a Java package. This versioning information is retrieved
and made available by the classloader that loaded the
class(es). Typically, it is stored in the manifest that is distributed
with the classes.

I guess your a jar has no manifest .. so because there's no manifest,
there's no package information.  From what I can see (and I haven't
looked far, so dont rely on this too much) the getPackage doesn't map to a
package as in com.MyClass  belonging to the com package... 

anyway, I hope that helps a little... I think you might be able to find
more in the javadocs, there looks like there's a fair bit around Package
and Class that might be helpful.

otoh someone who has used this functionality might have a better answer
(o:

cheesr
dim

On Mon, 24 Sep 2001, Eung-ju Park wrote:

 Hi.
 
 I have one jars file in /WEB-INF/lib/test.jar
 test.jar contains com.MyClass class.
 
 I try below code in test.jsp.
 
 %page import=com.* %
 ...
 %
 if ( null == MyClass.class.getPackage() ) {
 out.println( NULL );
 } else {
 out.println( MyClass.class.getPackage() );
 }
 
 But classes in /WEB-INF/classes's getPackage() is not null. Why?
 
 I try with resin. resin 2.0.2 occure same problem.
 It's servlet spec?
 
 PS. sorry for ugly English. ;-)
 
 




Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs(Tomcat bug...?)

2001-09-24 Thread Dmitri Colebatch

you need to import java.io.IOException probably in previous versions
of tomcat the generated code imported this method, thus masking the fact
that you didn't import it they now (I guess) dont do this, and so the
compiler is looking for IOException in the package of the code, which is
org.apache.jsp (default jsp package).

in summary  page import=java.io.IOException  shoudl fix it.

cheers
dim

On Mon, 24 Sep 2001, chris brown wrote:

 Hello,
 
 In a JSP page, I have a method a bit like this:
 
 void myMethod(Object someParam, JspWriter out)
 throws IOException
 {
   ...
 }
 
 The use of out is for some quick debugging.  Anyway, this code works fine
 under Tomcat 3.2.3, but porting it over to TC4 final produced the following
 compilation errors :
 
 Class org.apache.jsp.IOException not found in throws
 
 It would seem that although I'm using standard API classes/interfaces
 (JspWriter, IOException), the import statements in the generated .java
 files based on the .jsp files are too vague... java.io.IOException is
 getting mixed up with org.apache.jsp.IOException.
 
 This may be in turn related to some confusion between the public JspWriter
 class and some underlying implementation class with the same unqualified
 name.
 
 As it happens, I don't need to use JspWriter, as it was only for debugging.
 However, this sort of ambiguity could be much more annoying for some other
 applications!
 
 Hope this helps!
 Chris Brown
 
 




Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs(Tomcat bug...?)

2001-09-24 Thread Dmitri Colebatch

On Mon, 24 Sep 2001, chris brown wrote:

 I imported java.io.* ...
did that fix it?

 
 But if I import explicitly java.io.IOException, it might cause unqualified
 references to the Tomcat IOException class to become mixed up too !
I dont think there is a tomcat IOException... the compiler was looking for
that class because it was compiling a servlet that referenced a class
IOException - which wasn't imported

 I agree that it's good practice to import each class individually using
 fully-qualified names.  However (IMHO), the Tomcat development team ought to
 have imported any internal implementation classes  explicitly where there's
 a risk of namespace collision with very common classes.
big diff between jsp and code though... 110% in code you should never
(unless you absolutely have to - org.w3c.dom.Document and
org.jdom.Document a good example where you do have to) have package names
in code, they should always be explicit imports...  IMHO (o:

 It would have been better still if the fully-qualified names class names
 were used directly in the code for Tomcat, with no imports whatsoever --
 because if both the internal Tomcat classes and other classes with the same
 names are ALL imported explicitly, there's still as much potential for
 confusion.
the servlet code generated by jasper only imports the servlet and jsp
packages and the jasper packages perhaps even the jasper packages
shouldn't be imported, but hey...

I assume though that this fixed it?

cheesr
dim

 Using fully-qualified class names everywhere in application code slows down
 development (more typing) and may reduce readability (ok, you know which
 class is which, but lines of code won't fit easily on screen at the same
 time!).
 
 -Chris
 
 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 24, 2001 1:41 PM
 Subject: Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs
 (Tomcat bug...?)
 
 
  you need to import java.io.IOException probably in previous versions
  of tomcat the generated code imported this method, thus masking the fact
  that you didn't import it they now (I guess) dont do this, and so the
  compiler is looking for IOException in the package of the code, which is
  org.apache.jsp (default jsp package).
 
  in summary  page import=java.io.IOException  shoudl fix it.
 
  cheers
  dim
 
  On Mon, 24 Sep 2001, chris brown wrote:
 
   Hello,
  
   In a JSP page, I have a method a bit like this:
  
   void myMethod(Object someParam, JspWriter out)
   throws IOException
   {
 ...
   }
  
   The use of out is for some quick debugging.  Anyway, this code works
 fine
   under Tomcat 3.2.3, but porting it over to TC4 final produced the
 following
   compilation errors :
  
   Class org.apache.jsp.IOException not found in throws
  
   It would seem that although I'm using standard API classes/interfaces
   (JspWriter, IOException), the import statements in the generated
 .java
   files based on the .jsp files are too vague... java.io.IOException
 is
   getting mixed up with org.apache.jsp.IOException.
  
   This may be in turn related to some confusion between the public
 JspWriter
   class and some underlying implementation class with the same unqualified
   name.
  
   As it happens, I don't need to use JspWriter, as it was only for
 debugging.
   However, this sort of ambiguity could be much more annoying for some
 other
   applications!
  
   Hope this helps!
   Chris Brown
  
  
 
 
 




Re: Limit access to manager app?

2001-09-24 Thread Dmitri Colebatch

you really need to stop access before it gets to tomcat... you could put
it inside a virtual host for localhost, but I'm not sure how much that's
going to do unless you actually have tomcat bind to localhost only, or
have different bindings...

cheers
dim

On Mon, 24 Sep 2001, Micael Padraig Og mac Grene wrote:

 Put it inside WEB-INF
 -Original Message-
 From: [EMAIL PROTECTED] [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Monday, September 24, 2001 9:52 PM
 Subject: Limit access to manager app?
 
 
 Is there a way to prevent remote users from accessing the /manager/
 application? I know it's protected with a username/password, but is it
 possible to limit access to that to local access only (from the machine
 where tomcat resides only)? If so, how?
 
 Thank you.
 
 
 
 
 
 ___
 http://inbox.excite.com
 
 
 
 
 




Re: Directories - best practice

2001-09-22 Thread Dmitri Colebatch

I wouldn't rely on tomcat/bin - thats only because the startup script is
there.  If you dont use the standard startup mechanism, say run tomcat
inside another container, then it will be different (most likely).

Class.getResource() might be what you're looking for...

hth
dim

On Sat, 22 Sep 2001, Graham Leggett wrote:

 Hi all,
 
 While configuring a to-be-deployed servlet, I have noticed that the
 programmer has placed absolute pathnames in a number of places within
 the parameters in web.xml, and within the log4j configuration file.
 
 Some experimentation has revealed that the default directory of a given
 servlet is the same directory that tomcat was started from - in my case
 /var/tomcat4/bin.
 
 What is the correct way of defining directories in config files (like
 web.xml), preferably without the need to use absolute paths...?
 
 Regards,
 Graham
 




Re: New To Java - Cant't get Database Insert to work

2001-09-22 Thread Dmitri Colebatch

Hi,

A better way to do this would be to use prepared statements:

PreparedStatement pstmt = con.prepareStatement(
   insert into LINKS (VALUE, NAVIGATION_TEXT) values(?,?));
pstmt.setString(1, url);
pstmt.setString(2, favName);
pstmt.executeUpdate();

I'm not sure what is wrong with your sql... try inserting it manually
using your preferred sql client and see how you go.

cheesr
dim

On Sat, 22 Sep 2001 [EMAIL PROTECTED] wrote:

 Hello All,
 
 I am trying to insert two values into a access database from a
 Servlet. The values are form variables consisting of a URL and a name.
 I'm getting the following error:
 
 SQL Exception Caught: [Microsoft][ODBC Microsoft Access Driver] Syntax
 error in INSERT INTO statement.
 
 If anyone can help with this I appreciate it very much.  I have
 attached the Servlet source code.
 
 Thanks, Brian
 







Re: New To Java - Cant't get Database Insert to work

2001-09-22 Thread Dmitri Colebatch

are you able to try the statement directly... using some equivalent of
sqlplus?

On Sat, 22 Sep 2001 [EMAIL PROTECTED] wrote:

 Hi dim,
 
 Still having no success.  I think it might be that access has a problem with 
 prepared statements.  I'll keep trying to insert successfully and will test 
 it at work with Oracle.  I will let you know what happens.  
 
 Thanks,
 Brian
 




Re: Getting resource in WEB-INF

2001-09-19 Thread Dmitri Colebatch

Put the oracle library in WEB-INF/lib instead of tomcat/lib - I assume
thats where it is?  sounds like a similar thing to the way struts works,
Craig explained it when I asked a few weeks ago - you might find the mail
by seraching for struts and classloader and dim (o:

cheers
dim


On Wed, 19 Sep 2001, Svante Berglund wrote:

 Hi.
 
 I have a problem when using a InitalContextFactory from Oracle in a jsp-page
 on a stand-alone Tomcat. Problem is that the oracle-class tries to get hold
 of a resource as:
 classLoader.getResource(META-INF/application-client.xml), which don?t work
 unless I create a .jar with this specific META-INF and edit the tomcat.bat
 so this .jar is the first one in the classpath. This feels like a dirty
 workaround, is there a better way to solve the problem?
 
 thanks in advance.
 /Svante
 
 




Re: Logout with basic autorization

2001-09-19 Thread Dmitri Colebatch

call session.invalidate() - should do the trick.

cheers
dim

On Wed, 19 Sep 2001, Oleksandr Fedorenko wrote:

 Hi.
 
 How to do really logout using basic authorization ?
 
 I mean to get authorization prompt again by using tomcat engine ? , i.e.
 
 tomcat should care about it . To send smth. in response ?
 If yes, so what to send ?
 
 Thanks.
 
 Alex.
 
 
 
 




Re: Insert special chars in stringbuffer

2001-09-19 Thread Dmitri Colebatch


StringBuffer buf = new StringBuffer();
buf.append('\');

hth,
dim

On Wed, 19 Sep 2001, Magnus Jansson wrote:

 Hi! I have a StringBuffer object and want to append a  character how do I do?
 
 




Re: problem in init parameter .. SAXParseException

2001-09-19 Thread Dmitri Colebatch

try encoding it as CDATA

init-param
  param-nameUrl/param-name
  param-value![CDATA[http://120.20.203.1/q?s=asad=t]]/param-value
/init-param

cheesr
dim

On Wed, 19 Sep 2001, Sibi Joseph wrote:

 Hi all
 
 i have  to set the following in my web.xml for my servlet
 
 init-param
 param-nameUrl/param-name
 param-valuehttp://120.20.203.1/q?s=asad=t/param-value
 
 /init-param
 
 
 when i startup tomcat .. i get the following error
 
 
 ERROR reading D:\Tomcat\jakarta-tomcat-3.2.1\webapps\test\WEB-INF\web.xml
 org.xml.sax.SAXParseException: Next character must be ; terminating
 reference
 to entity d.
 at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
 at com.sun.xml.parser.Parser.fatal(Parser.java:2811)
 at com.sun.xml.parser.Parser.nextChar(Parser.java:2735)
 at
 com.sun.xml.parser.Parser.maybeReferenceInContent(Parser.java:2089)
 at com.sun.xml.parser.Parser.content(Parser.java:1549)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
 at com.sun.xml.parser.Parser.content(Parser.java:1499)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
 at com.sun.xml.parser.Parser.content(Parser.java:1499)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
 at com.sun.xml.parser.Parser.content(Parser.java:1499)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
 at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
 at com.sun.xml.parser.Parser.parse(Parser.java:284)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
 at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
 at
 org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader
 .java:202)
 at
 org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:
 109)
 at
 org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
 :491)
 at
 org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
 at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
 
 
 
 
 any soultion ?
 
 
 thanks in advance
 sibi
 
 




Re: Changing the Servlets Directory

2001-09-19 Thread Dmitri Colebatch

Tomcat is a servlet container - it adheres to the servlet specification
(see http://java.sun.com/products/servlet).  If you also adhere to that
specification, then you will be able to deploy your application across any
number of different products, not just tomcat.

as for jserv... if you want to continue using it, then feel free.  but
afaik there is little or no support for it these days, and you certainly
wont see the functionality expanding like servlets...

cheers
dim

On Thu, 20 Sep 2001, Kenny Ma wrote:

 Tomcat is very difficult for user to change it's defualt setting...
 I want to change the directory of servlet before, but now i already give up.
 
 And I still cant resolve Tomcat cache problem.
 Everytime I edit my servlet, I need to restart tomcat to get the latest 
 result. I already added reloadable = true in server.xml.
 
 I like Jserv more. Why stop develop Jserv ???
 
 
  After I installed Tomcat 3.2.3, my servlet directory is C:\Program
  Files\Apache Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes.
  Now I want to change it to, or add the directory C:\public_html\myServlets.
  
  I've tried and tried and I cannot figure this out.  How is this done?
  
  -Matt
 
 
 
 
 
 /* Kenny Ma
[EMAIL PROTECTED] */
 
 




Re: How to gaurentee order of server classpath

2001-09-17 Thread Dmitri Colebatch

Are you sure you're taking care of all of the classpath references in
tomcat.bat?

An alternative way to do this is to upgrade to 4.0rc2 which doesn't
provide any xml support, freeing the web app developer to use whichever
parser whey want.

hth
dim

On Mon, 17 Sep 2001, Peoter Veliki wrote:

 I need to make sure the xerces.jar is found in the server classpath before
 Tomcat's own xml.jar (jaxp.jar or whatever it is called).  This is the first
 step in getting soap working.  I have followed the instructions and have not
 been able to get it to work.  I have this in my Tomcat.bat file:
 
 
 set CP=%TOMCAT_HOME%\lib\xerces.jar;%CP%
 
 According to the docs, this should cause the server to find the org.w3c.dom
 package in xerces.jar first, but it isn't working.
 
 Is there any alternate way of doing it?
 
 Thanks
 




Re: Problem with Tomcat

2001-09-17 Thread Dmitri Colebatch

You need to have the jdk - not the jre.

btw - someone with access to the site - I'm constantly amazed that this
answer is not in the faq (unless I missed it)... perhaps its somewhere
else, but I would have thought it should be there.

cheesr
dim

On Mon, 17 Sep 2001, Charles Webber wrote:

 I'm running into a strange problem with a new installation of Tomcat.
 I have 3.2.3 installed.  I can use the startup script to start Tomcat and
 everything looks fine until I try to execute a JSP.  When I try the JSP
 examples supplied with Tomcat, I get the following errors - which is a
 partial stack trace.  I have set the CLASSPATH, TOMCAT_HOME and JAVA_HOME
 environment variables, even though the startup script should do that for me.
 What is wrong?
 Thanks
 
 Internal Servlet Error:
 javax.servlet.ServletException: sun/tools/javac/Main
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
 2)
 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
 onnectionHandler.java:213)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at java.lang.Thread.run(Thread.java:484)
 Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main
 at
 org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
 at
 org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
 at
 org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
 rvlet.java:258)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
 va:268)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at org.apache.tomcat.core.ContextManag
 
 




Re: Can I configure Tomcat to accept HTTP requests from remotemachines?

2001-09-13 Thread Dmitri Colebatch

http://localhost:8080 will just be an alias for http://127.0.0.1:8080 - so
doing it on another computer means that you're just trying to request the
computer that you are doing the request on.  Instead - find out what the
ip address is, using ipconfig, or winipcfg (I can never rememeber which is
used where)... and use http://192.168.0.1:8080 - replacing 192.168.0.1
witht he IP address.

hth
dim

On Thu, 13 Sep 2001, Raymond Reid wrote:

 Can I configure Tomcat to accept http requests from remote IP addresses
 without running another web server at the same time? I
 currently have Tomcat 3.2.3 installed on NT 4.0 Service pack 6.  After
 configuring Tomcat, I can enter http://localhost8080
 into the location field in my browser and see the welcome page.  But
 when I try to access the same page from a
 different computer using the IP address of the machine I have Tomcat
 running on, the page won't come up.
 
 Do I need to be running Apache with Tomcat to access pages remotely?  If
 someone could please point me in the right
 direction, I would really appreciate it.
 
 Thanks,
 Ray
 
 




Re: Tomcat 3.3 JBoss mod_jk

2001-09-13 Thread Dmitri Colebatch

The servlet api is defined by sun... see
http://java.sun.com/products/servlet

the tomcat 3.x series are servlet spec 2.2 compliant, tomcat 4.0 is spec
2.3 draft compliant.  

all the rules, not only the api, are outlined by sun... have a look
through that above address and it should answer a heap of your questions.

cheesr
dim

On Tue, 11 Sep 2001, LAU ENG HUAT wrote:

 Hi,
 I'm a newby. I have installed Tomcat 3.3 and  manage to get it working.
 When I read the doc on JBoss integration with Tomcat, it mention about
 the
 1. Servlet Api . Currently I could not find the latest Tomcat 3.3
 servlet api. Can I used the Tomcat servlet 3.2.3. api ?
 2. The example given is using the JServ and mention about using
 wrappers. I'm using mod_jk. Can anybody help me on this ?
 
 Thanks for your help
 
 




Re: System.err.println

2001-09-13 Thread Dmitri Colebatch

On Thu, 13 Sep 2001, Abhijat Thakur wrote:

 I have gone through the archives and have looked at the original responses
 and tried it but my System.err.println does not go to /logs/tomcat.log. I am
 using log4j for logging but at some place have to put System.err.println
 statements which i want should be printed to tomcat logs.

why not use servlet.log() if you want that functionality?  afaik routing
System.err.println is not covered by the spec (but I may be wrong), and so
you will be relying on specific container bahaviour.

alternatively on unix you could just redirect stderr to whichever file you
wanted.

hth,
cheesr
dim


 
 I have made modifications to server.xml and it has
 
 Logger name=tc_log
 verbosityLevel = INFORMATION
  path=logs/tomcat.log
 /
 
 Logger name=servlet_log
 path=logs/servlet.log
 verbosityLevel = DEBUG
 /
 
 Logger name=JASPER_LOG
   path=logs/jasper.log
 verbosityLevel = INFORMATION /
 
 The three are files are made under logs but my System.err.println messages
 dont go there. Please advise.
 
 Thanks a lot.
 
 
 Abhijat Thakur
 
 bDNA Corporation
 
 




Re: System.err.println

2001-09-13 Thread Dmitri Colebatch



alright.  Assuming that Hello is a servlet (extends HttpServlet) then you
dont need the servlet.

eg:

  public void doGet( ... )
  {
log(hello);
...

  }

cheers
dim

On Fri, 14 Sep 2001, Kenny Ma wrote:

 because:
 
 Hello.java:27: cannot resolve symbol
 symbol  : variable servlet
 location: class Hello
 servlet.log(Hello);
 ^
 
 
 
  On Thu, 13 Sep 2001, Abhijat Thakur wrote:
  
   I have gone through the archives and have looked at the original responses
   and tried it but my System.err.println does not go to /logs/tomcat.log. I 
 am
   using log4j for logging but at some place have to put System.err.println
   statements which i want should be printed to tomcat logs.
  
  why not use servlet.log() if you want that functionality?  afaik routing
  System.err.println is not covered by the spec (but I may be wrong), and so
  you will be relying on specific container bahaviour.
  
  alternatively on unix you could just redirect stderr to whichever file you
  wanted.
  
  hth,
  cheesr
  dim
  
   
   I have made modifications to server.xml and it has
   
   Logger name=tc_log
   verbosityLevel = INFORMATION
path=logs/tomcat.log
   /
   
   Logger name=servlet_log
   path=logs/servlet.log
   verbosityLevel = DEBUG
   /
   
   Logger name=JASPER_LOG
 path=logs/jasper.log
   verbosityLevel = INFORMATION /
   
   The three are files are made under logs but my System.err.println messages
   dont go there. Please advise.
   
   Thanks a lot.
   
   
   Abhijat Thakur
   
   bDNA Corporation
   
  
 
 
 
 
 
 /* Kenny Ma
[EMAIL PROTECTED] */
 
 




Re: file download servlet

2001-09-12 Thread Dmitri Colebatch

you could go a step further than that, and remove the query string
altogether, extracting it from the request url.  That way the end user
wouldn't even know it was being served by a servlet (well, the /servlet
might give it away, but you could change that if it mattered)...

cheers
dim

On Thu, 13 Sep 2001, Ketan Patel wrote:

 Hi,
 To download file with the specific file name like song.mp3 as your
 following url 
 http://192.168.1.105/download/servlet/download?filename=song.mp3
 changed it with following url-
 http://192.168.1.105/download/servlet/download/song.mp3?filename=song.mp3
 .
 So while downloading the extrapath song.mp3 will be the filename.
 
 -Ketan
 
 chiuming wrote:
  
  I asked this question before, but I didn't get any
  reply. I post it again in hope someone could give me
  some hint.
  
  I have a file download servlet serves web browsers.
  
  request to file is like this
  http://192.168.1.105/download/servlet/download?filename=song.mp3
  
  The file on the server side is song.mp3.  But the file
  got download to
  browser is the servlet name instead.  :(
  
  I heard i need to use the HTTP header
  res.setHeader(Content-Disposition,attachment;
  filename=\ +
  downloadFile + \;);
  
  Is Content-Disposition a standard header in HTTP spec?
   I heard i should use this whenever I don't want the
  content display on browser (force Save as Dialog box)
  
  Why everytime I download a file from the web server
  like song.mp3.
  there is no such HTTP header from web server? --
  Content-Disposition
  
  I think web server is just like a download servlet. It
  sends raw bytes to web browser. After browser get the
  bytes, It will not konw what name the file should save
  as.  Web server must send some kind of HTTP header to
  tell web browser what file name the file is saved as.
  right?
  
  How exactly is web server instruct web browser to pop
  up Save as Dialog box (on unknown mime type) and save
  the file with name = filename on server?  Does web
  server use any special HTTP Header (like
  Content-Disposition)
  
  thanks.
  
  __
  Do You Yahoo!?
  Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
  http://im.yahoo.com
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 
 




RE: Problem with loading classes dynamically, new objects can't see things in webapp.

2001-09-11 Thread Dmitri Colebatch

On Tue, 11 Sep 2001, Craig R. McClanahan wrote:

 If ProsumerTestTag is being loaded from the class path, it's being loaded
 by the system class loader.
 
 If CustomTag is being loaded from the web app, it is being loaded from the
 webapp class loader.
 
 Classes loaded from the system class loader CANNOT see classes loaded from
 the webapp class loader -- therefore, Tomcat is telling you the truth.
 These restrictions are based on the way class loaders work in Java, so
 there's nothing Tomcat can do about it.
 
 Note that any of the following should work:
 * Put CustomTag and ProsumerTestTag both on the classpath
 * Put CustomTag and ProsumerTestTag both in the webapp
 * Put CustomTag on the classpath and ProsumerTestTag in the webapp
   (webapp class loaders can look up the class loader hierarchy)

ok - this is highlighting my lack of knowledge on classloaders - so
hopefully I can learn something here.  This is the same thing that causes
an issue with struts:

  using struts, and jboss with embedded tomcat.  if the struts.jar is
  in the jboss/lib/ext (command classpath) then it cannot find form or 
  action classes that are in the web application.

I assume this is due to code along the lines of Class.getClassLoader() -
now what I dont understand is why those lines of code are not
Thread.currentThread().getContextClassLoader() .  would that not solve
both of these problems - it seems to be a more embeddable approach,
letting another container (be it jspc, or jboss) control the system.

look forward to hearing thoughts on this.

cheers
dim




RE: Problem with loading classes dynamically, new objects can't see things in webapp.

2001-09-11 Thread Dmitri Colebatch

On Tue, 11 Sep 2001, Craig R. McClanahan wrote:
 Exactly the same issue.  That's why the Struts documentation tells you
 (over and over again :-) to put struts.jar *inside* your web app (in
 /WEB-INF/lib) and nowhere else.

oops (o:  should have read the doco... I skipped straight to the archives
(o:

thanks for your insights.

cheers
dim

 This would solve the problem in a Servlet 2.3 based container, which is
 required to supply the web app class loader when getContextClassLoader()
 is called.  However:
 
 * Support for this was not required in Servlet 2.2, so you cannot
   count on it working.  In fact, it won't work in Tomcat 3.2 unless
   you enable the Jdk12Interceptor described in server.xml.
 
 * getContextClassLoader() is not supported at all on JDK 1.1 systems.
 
  look forward to hearing thoughts on this.
 
  cheers
  dim
 
 
 
 Craig McClanahan
 
 
 




Re: Mapping question

2001-09-08 Thread Dmitri Colebatch

On Sat, 8 Sep 2001, Andrew wrote:

 How I can map /Path/*.ext to servlet?

to one particular servlet?  just use the normal servlet-mapping tag in
web.xml - it allows for wildcards.

hth
dim




Re: Fw: PROPPATCH

2001-09-07 Thread Dmitri Colebatch

I have absolutely no idea about the DAV resource stuff, but I saw the
href, and assume that expects a URI, in which case perhaps you should
prefix the email address with mailto:

cheers
dim

On Fri, 7 Sep 2001, Vijaya Kumar wrote:

 
  Is it possible to change any of one/more properties of the DAV resource say
  add new property like author.
 
  author
  namesomebody/name
  href[EMAIL PROTECTED]/href
  /author
 
  How to overcome this problem. B'cas when I go through the
  redirection draft, when creating new resource I need to change its
  resourcetype property to redirected-ref. Plz advice.
 
  Thanx
  Vijay
 
  Whats the stand of Tomcat 4.0 b7 regarding PROPPATCH header in DAV
Protocol. Does it supports PROPPATCH or not.
  
   No.
  
All other headers except
PROPPATCH is working fine, but later is always responded with HTTP 200
 Ok
status but the operation is not success. Can any one have idea...Plz
 advice.
  
   Ok, I'll have it return something else. 403 or 501.
  
   Remy
  
 
 
 




Re: non tomcat related question: Servlets

2001-09-06 Thread Dmitri Colebatch

sure - send it over, I'll have a little look.

On Thu, 6 Sep 2001, A.L. wrote:

  I have a problem which I have asked in several forums
 and have received no response.  Basically i have some
 code which needs to be debugged, but after spending
 hours and hours I am unable to figure out what is
 causing the problem. If anyone has some time to
 briefly look over my code, I will send a copy.  The
 problem more likely is very simple, but so far for me
 it has been a needle in a haystack.Here is a
 somewhat brief description of my program design along
 with the problem.I have created a calendar servlet
 which includes three other servlets:a browser to
 change monthsa month calendar which allows you to
 select the day of the monthand a day calendar which
 makes a connection to a database and displays the
 events for the day. I have separate servlet which
 allows you to enter events for the time on a specific
 day. My problem is that once I enter some events, the
 day calendar doesn't immediately show the information
 from the database. The day calendar must be refreshed
 a second time.  This doesn't always happen.  I noticed
 that it tends to happen after changing months and and
 changing days, and then entering the information.  In
 other words it work properly most of the time, but
 under certain cicumstances it doesn't work. Obviously
 to understand this problem you would need to see both
 the code and the running application. Any help will be
 greatly appreciated. -Amos  
 
 __
 Do You Yahoo!?
 Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
 http://im.yahoo.com
 




Re: Book

2001-09-05 Thread Dmitri Colebatch

On 4 Sep 2001, Chris Beggy wrote:
 Does the working group have a website?

not sure which project is being referred to, but tomcatbook is at
sourceforge.net/projects/tomcatbook - the book is at a crossroads at the
moment, as very little has been happening, so if anyone has time to write
some words on configuration and common questions, they'd be very welcome!

cheesr
dim




Re: Limits on the size of the web.xml file?

2001-09-05 Thread Dmitri Colebatch

Craig,

I would have thought RTFS would have been more to your liking... given
your regular points to the spec (o:

On Tue, 4 Sep 2001, Craig R. McClanahan wrote:
 
 
 On Tue, 4 Sep 2001, Jim Cheesman wrote:
 
 
  RTFAPI ;)
 
 
 This acronym will *definitely* come in handy!  :-)
 
 Craig
 
 




RE: Tomcat 321 won't parse other than .jsp file

2001-09-03 Thread Dmitri Colebatch

Try adding the following:

servlet
  servlet-namemenuscript/servlet-name
  servlet-classmenu.jsp/servlet-class
/servlet
servlet-mapping
  servlet-namemenuscript/servlet-name
  url-pattern/menu.js/url-pattern
/servlet-mapping

to your server.xml

I think those are the right elements.  failing that there was a similar
post (mapping a jsp to a path) a few weeks ago, have a search for jsp and
servlet-mapping and server.xml in the archives and see if it turns up.

hth
dim


On Mon, 3 Sep 2001, Tarwinder Dhak wrote:

 That would be the simple answer, but I would like to keep the .js extension
 keep to the standard for javascript files.
 There must be a way for tomcat to compile files that don't end in a .jsp
 extension.
 
 Thanks.
 
 Tarwinder Dhak
 
 -Original Message-
 From: Burkard Endres [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 03, 2001 10:55 AM
 To: [EMAIL PROTECTED]
 Subject: AW: Tomcat 321 won't parse other than .jsp files
 
 
 simply rename your .js file to .jsp?
 
 -Ursprüngliche Nachricht-
 Von: Tarwinder Dhak [mailto:[EMAIL PROTECTED]]
 Bereitgestellt: Montag, 3. September 2001 11:33
 Bereitgestellt in: tomcat-user
 Unterhaltung: Tomcat 321 won't parse other than .jsp files
 Betreff: Tomcat 321 won't parse other than .jsp files
 
 
 Hi,
 
 I'm writing a web application that uses some javascript (in an external
 file
 menu.js) that displays some dynamic menus.  Each of these menu options
 then
 goes to a specific URL.
 
 What I want to do is insert some JSP elements into the menu.js file so
 that
 when the client requests the file, all URLs go through the
 request.encodeURL() method to append any session data to the URLs.  The
 problem is that Tomcat only seems to want to compile files with a .jsp
 extension.
 
 I've got Tomcat running through APJ13 with apache (mod_jk.so), and have
 used
 the jkmount directive in the mod_jk config file to forward all *.js
 requests
 to Tomcat, but tomcat won't compile it.  It just sends me the raw text
 instead.
 
 Basically, what I would like to know is how to get tomcat to compile
 files
 that have JSP elements in them, but do not have the .jsp extension.
 
 Thanks in advance for your help.
 
 Regards
 
 Tarwinder Dhak
 [EMAIL PROTECTED]
 
 Transact Group
 Development
 
 Legal Disclaimer: Internet email communications are not secure and
 therefore the NetInvest Group does not accept legal responsibility for
 the contents of this message. Any views or opinions presented are solely
 those of the author and do not necessarily represent those of the
 NetInvest Group unless otherwise specifically stated.
 





Re: How to handle the JNI Exception

2001-09-03 Thread Dmitri Colebatch

ou still need to adhere to the servlet api - that says you can throw
a
ServletException - so you will need to wrap your exception in a servlet
exception, although I have no idea how to that in JNI.

cheers
dim

On Mon, 3 Sep 2001, 
0xLJCCC6BDDCz/0xLJD1D0BEBFD4BAB7FECEF1C6F7D1D0BEBFCAD2z/0xLJC1AACFEBz wrote:

 
 We using JNI in servlet.
 The JNI throws a exception, and the servlet handle the exception.
 But now, when we throws the Exception which define in JDK, all of thing ok.
 When we throws the exception which we define, the tomcat think there is no
 method to handle that exception
 
 etc: MyException extend Exception.
 
 We think there should be some configure is not ok.
 Can any body give us advice about tomcat configuration which related to
 exception handle.
 
 Thanks
 
 
  /*
   *  ÌƽÜ(Jebtang)
   *
   *  ÁªÏëÑо¿Ôº ·þÎñÆ÷Ñо¿ÊÒ
   *  Server System Lab
   *  Legend Corporate Research  Development
   *  Tel 010-8289-4127
   *  Email: [EMAIL PROTECTED]
   */




RE: Having problem with Tomcat 4.0b7 - HTTP Status 503 - Thisapplication is not currently available

2001-09-02 Thread Dmitri Colebatch

Why are you moving servlet.jar - I'm a 3.2 user, but I just tried the tar
of 4.0b7 and it worked fine without moving anything.

hth
dim

On Sun, 2 Sep 2001, Roger Wei wrote:

 Futher more, I also copy the serlet.jar into c:\tomcat4\common\lib , still fail.
 
 I know how to setup Tomcat 3.2.3 and Tomcat 3.3 beta, but I just CAN'T do that
 with Tomcat 4.0 b7
 
 killing me...
 
 
  -Original Message-
  From: Roger Wei [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, September 02, 2001 5:49 PM
  To: [EMAIL PROTECTED]
  Subject: Having problem with Tomcat 4.0b7 - HTTP Status 503 - 
  This application is not currently available
  
  
  Hi everyone:
  
  I go to 
  http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b
  7/ and download
  jakarta-servletapi-4-b7.zip 
  jakarta-tomcat-4.0-b7.zip 
  , upzip them and rename as c:\Tomcat4
  
  Then setup the CATALINA_HOME = c:\Tomcat4 , and move the 
  servlet.jar into $catalina_home/lib
  
  Now I can access http://localhost:8080/index.html without any problem,
  but I can NOT run any JSP or Servlet example. The error message is
   HTTP Status 503 - This application is not currently available 
  
  [ system: ]
  windows2000Pro
  Java 1.4 beta
  Tomcat 4.0 b7
  
  Please tell me what I miss in the setup progress, I've read all 
  the document, but I can't find a
   install.txt , the 
  C:\Tomcat4\webapps\ROOT\docs\appdev\installation.html can't solve 
  my problem.
  
  Thanks in advance.
  
  Regards,
  Roger
  
  




Re: accessing servlets without a port number

2001-08-31 Thread Dmitri Colebatch

Alex,

port 80 is the default port for http, so what you are wanting to do is
have tomcat listen on port 80 instead of 8080.  to do this on a *nix box
you'd need to run tomcat as root (for 3.x anyway - I believe 4.0 has a
wrapper that does this properly), which isn't a good idea.  alternatively,
if you are using apache as well, then you need to configure mod_jk. 

a good place to start is the docs in the distribution - have a look at
mod_jk, or edit server.xml and change 8080 to 80.

cheesr
dim

On Fri, 31 Aug 2001, alex reuter wrote:

 Hello List,
 I'd like to access my servlets without using the port number, and I've seen
 a whole bunch of config files and directives and I was wondering if anyone
 could tell me exactly how its done, or point me to some solid documentation.
 
 Oh, and if the answer to this question is staring me in the face, please
 feel free to ridicule me.
 
 Thanks,
 Alex
 
 




Re: Book

2001-08-31 Thread Dmitri Colebatch

On Fri, 31 Aug 2001, mazzen al-najjar wrote:
 Victor Martinez wrote:
  Does anybody knows a book about Tomcat? I´m looking for one and i haven´t
  seen anything...
 
 an opinion i don't find expressed in the archives, so i'll say it once:
 
 just about every book on jsp or servlets ever published uses tomcat as
 the example engine. they may not have tomcat in the title, but they

there is also the fact that you are not (or shouldn't be) developing
applicaitons for tomcat but rather for a servlet engine that supports
the spec (2.2 or 2.3).  If you do this a) you can follow the rules laid
out in the spec, which has very good coverage imho, and b) swap easily
between servlet containers.

cheesr
dim




Re: Installed Tomcat. Now what?

2001-08-30 Thread Dmitri Colebatch

On Thu, 30 Aug 2001 [EMAIL PROTECTED] wrote:
 Can someone write a step by step guide to writing an app for Tomcat? How
 about a Hello World app? I don't know XML so I can't write build.xml files
 or anything. I'm really stuck.

http://java.sun.com/products/servlet is a good place to
start.  essentially tomcat just plays by those rules, so pretty well most
of the questions you're likely to ask will be answered in there

 Can I just write a JSP file and stick it in /webapps and fetch it? 
yep, although it needs to be part of a web application (keyword)

 servlets and Beans too? What is a servlet context? Is that just the document
 root? If it's just the document root for the app, why the hell make up new
 jargon for it and why not just call it document root of an app? 
(o:  lol... it effectively is the docroot, but you can have more, and it
is certainly more than just the docroot - each web application exists in
its own (servlet) context.  this means that a heap of classloader issues
will be taken care of there.  

 learning all this jargon. You can spend your life getting really good at
 programming or spend your life getting to know all the jargon. It seems
 that's the way.
if there were no jargon, what would consultants do for a living (o:  hehe

 Also, why doesn't this work:
 
 % response.writeln(Hello World); %

response is of type HttpServletResponse, which doesn't have a method
called writeln.  the variable out however is a PrintWriter which does,
so 

% out.writeln(Hello World); %

should work.

hth
dim




Re: Newbie JSP Question:

2001-08-30 Thread Dmitri Colebatch

try request.setAttribute( ... ) in the first jsp and request.getAttribute(
... ) in the second.

hth
dim


On Thu, 30 Aug 2001, Peter L. Markowsky wrote:

 I know this doesn't relate to Tomcat directly, but since Tomcat hosts JSPs
 or at least is able I was wondering if anyone out there knew / could
 recommend how to pass values from one JSP page to another. The problem I'm
 having is that when I try to submit a form and then use
 request.getParameter( parametername ) I keep getting nulls even though I
 specify the parameter name.
   -Thanks for all the Help
   Pete Markowsky
 
 
 




Re: Custom Tag Can't Compile problem.

2001-08-29 Thread Dmitri Colebatch

This is not based on any knowledge of jasper, but do you get the exception
if you declare TagManager in a package?  My guess is that jasper uses the
fully qualified form of the tag name in declaring the tag in the jsp and
the fact that you dont use a package is upsetting it.

having said that - its a guess... 

hth
dim

On Wed, 29 Aug 2001, MindTerm wrote:

 Dear all,
 
   I want to implement custom tag in jsp and I got the
 following error :
  
   Environment:
 --
   OS: Win 2k 
   Tomcat 4.0.7 beta 
   TagManager.class located at
 webapps/myproject/WEB-INF/classes/TagManager.class
   
   web.xml:
 --
taglib
  taglib-uri/MYTAG/taglib-uri 
 
 taglib-location/WEB-INF/mytaglib.tld/taglib-location
 
   /taglib 
 
   mytaglib.tld:
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE taglib
PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag
 Library 1.1//EN 
   
 http://java.sun.com/j2ee/dtds/web-jsptaglib_1_1.dtd;
 
 taglib
   !-- The version number of this tag library --
   tlibversion1.0/tlibversion
 
   !-- The JSP specification version required to
 function --
   jspversion1.1/jspversion
 
   !-- The short name of this tag library --
   shortname/shortname
   
   !-- Public URI that uniquely identifies this
 version of the tag library --
  
 !--urihttp://jakarta.apache.org/taglibs/utilitytags/uri--
 
   !-- General information about this tag library --
   info
 A simple tag library for the examples
   /info
   
   !-- subname --
   tag
 namecode/name
 tagclassTagManager/tagclass
 !-- bodycontent
 JSP (default): the JSP container should evaluate
 any body of the tag, but it can also be empty 
 tagdependent : any body of the tag would be
 handled by the tag itself, but it can also be empty 
 empty: body must be empty 
 --
 bodycontentempty/bodycontent
   /tag  
 /taglib
   
 
 my TagManager.java:
 
 
 import javax.servlet.jsp.*;
 import javax.servlet.jsp.tagext.*;
 
 public class TagManager extends TagSupport
 {
 
   /**
* Constructor
*/
   public TagManager( )
   {
 super();
   }
 
   public int doStartTag() throws JspException
   {
 try
 {
   pageContext.getOut().print(Hello.);
 }
 catch ( Exception ex )
 {
   throw new JspTagException( SimpleTag:  +
 ex.getMessage() );
 }
 return SKIP_BODY;
   }
 
   public int doEndTag()
   {
 return EVAL_PAGE;
   }
 
 }
 
 
 
   Error:
   
   Unable to compile class for JSP An error occurred at
 line: 8 
 in the jsp file: /jsp/project/ACC03.jsp 
 Generated servlet error: 
 
C:\learning\tomcat4\work\localhost\tea\jsp\project\_0002fjsp_0002fproject_0002fACC03_jsp.java:90:
 Class org.apache.jsp.TagManager not found. 
 TagManager _jspx_th_ytag_code_0 = new TagManager(); 
 ^ An error occurred at line: 8 in the jsp file:
 /jsp/project/ACC03.jsp 
 Generated servlet error: 
 
C:\learning\tomcat4\work\localhost\tea\jsp\project\_0002fjsp_0002fproject_0002fACC03_jsp.java:90:
 Class org.apache.jsp.TagManager not found. 
 TagManager _jspx_th_ytag_code_0 = new TagManager(); 
 ^ 2 errors 
 
the example in sun tutorial about cutsomer tag also
 cause same error in my testing environment. 
 
Thank for your help. 
 
 M.T.
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.com/
 




Re: Tomcat, Apache: JSP source code showed instead of generated HTML

2001-08-29 Thread Dmitri Colebatch

Hi,

I remember this - didn't get it working hey?  bugger... ok, two things I
can suggest:

1. crank up the log level in mod_jk.conf to debug, see if it tells you
anything interesting

2. have a look in jasper.log (also crank the log level up - in
server.xml) and see if that contains anything interested... normally when
a jsp is requested you'll be a fair bit of debug as it is compiled.

hth,
cheesr
dim

On 29 Aug 2001, Gero Vermaas wrote:

 Hi all!
 
 I sent mail to this mailing list a while ago stating that I could not
 get apache to work with tomcat... well I tried all kinds of solutions,
 monitored the mailing list and unfortunately I still haven?t been able
 to get it up and running. 
 
 The problem:
 - Requesting a JSP page by doing a request via port 8080 works fine
 - Requesting a JSP page via apache and mod_jk returns the JSP source
 code
 
 Is seems that requests to JSPs are not directed to port 8007 of Tomcat.
 
 I try to give a concise description below, hopefully somebody can tell
 what I?m missing. It must be something simple...
 
 Apache version: 1.3.14
 Tomcat version: 3.2.3
 Mod_jk version:  tomcat-mod-3.2.2-1.i386.rpm
 
 The apache error.log states the following when apache is started:
 [Wed Aug 29 08:59:23 2001] [notice] Apache-AdvancedExtranetServer/1.3.14
 (Linux-M
 andrake/2mdk) mod_ssl/2.7.1 OpenSSL/0.9.5a mod_jk configured -- resuming
 normal o
 perations
 
 As you can see mod_jk is configured and seems to be fine.
 
 I started TomCat before starting apache and this Tomcat reported the
 following:
 
 [root@gerodt gero]# 2001-08-29 09:02:12 - Ctx( /examples ): Set debug to
 1
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /examples )
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /admin )
 Starting tomcat. Check logs/tomcat.log for error messages 
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx(  )
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /test )
 2001-08-29 09:02:12 - Ctx( /examples ): XmlReader - init  /examples
 webapps/examp
 les
 2001-08-29 09:02:12 - Ctx( /examples ): Reading
 /opt/jakarta-tomcat-3.2.3/webapps
 /examples/WEB-INF/web.xml
 2001-08-29 09:02:13 - Ctx( /examples ): Add user tomcat tomcat tomcat
 2001-08-29 09:02:13 - Ctx( /examples ): Add user role1 tomcat role1
 2001-08-29 09:02:13 - Ctx( /examples ): Add user both tomcat
 tomcat,role1
 2001-08-29 09:02:13 - Ctx( /examples ): Loading -2147483646 jsp
 2001-08-29 09:02:13 - PoolTcpConnector: Starting HttpConnectionHandler
 on 8080
 2001-08-29 09:02:13 - PoolTcpConnector: Starting Ajp12ConnectionHandler
 on 8007
 
 Below I?ll include the mod_jk.conf and worker.properties file. I checked
 all paths in these file and they all seem to be correct.
 
 Doing a telnet to port 8007 reports:
 [root@gerodt gero]# telnet localhost 8007
 Trying 127.0.0.1...
 Connected to localhost.localdomain.
 Escape character is ?^]?.
 HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
 java.io.IOException: Stream broken
 at
 
org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHa
 ndler.java:426)
 at
 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12Connect
 ionHandler.java:147)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at java.lang.Thread.run(Thread.java:484)
 
 So Tomcat is accepting requests on this port.
 
 A strange this I discovered is that the /var/log/httpd/mod_jk.log file
 remains empty when I do a:
 /etc/rc.d/rc5.d/S85httpd stop
 followed by a
 /etc/rc.d/rc5.d/S85httpd start
 
 However, when I do a:
 /etc/rc.d/rc5.d/S85httpd restart
 
 The mod_jk.log file contains:
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 

Re: can't start tomcat

2001-08-29 Thread Dmitri Colebatch

If thats you're bashrc I'm assuming you're on linux... but you have a c:/
in the path... or are you running cygwin?  check that $JAVA_HOME/bin/java
works and then retry.

cheesr
dim

On Wed, 29 Aug 2001, Hugo Hendriks wrote:

 The path to java works but when I start the startup script i get the
 message:
 
 using classpath: c:/jakarta/jakarta-tomcat-3.2.3/lib/*
 ./ tomcat.sh c:/usr/java/jdk1.3.1/bin/java: no such file or directory
 
 my .bash_config looks like this:
 PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin:/usr/java/jdk1.3.1/bin
 BASH_ENV=$HOME/.bashrc
 USERNAME=root
 
 JAVA_HOME=c:/usr/java/jdk1.3.1
 TOMCAT_HOME=c:/jakarta/jakarta-tomcat-3.2.3
 CLASSPATH=.
 
 export USERNAME BASH_ENV PATH JAVA_HOME TOMCAT_HOME CLASSPATH
 
 thanx
 
 Hugo
 
 




Re: How, to, install???????

2001-08-29 Thread Dmitri Colebatch

have you set JAVA_HOME to the base directory of your JDK install?  It
sounds like it cant find the java command.

hth
dim

On Wed, 29 Aug 2001, Fareed Raees wrote:

 Respected Sir,
 I have Windows ME operating system.I have got the tomcat ver.3 and ver.4, 
 but i am able to configure the server.Always i get the same message Bad 
 Command Or File Name Sir please help me through configuring the tomcat 
 server. I will be really grateful to you.
 
 Farid Rais.
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 




Re: Tomcat, Apache: JSP source code showed instead of generated HTML

2001-08-29 Thread Dmitri Colebatch

sorry - I'm all out of ideas.  but I didn't see the mod_jk attachment, did
you do a me and not attach it?  (o:

cheesr
dim

On Wed, 29 Aug 2001, Gero Vermaas wrote:

 OK, I cracked up the debug level and now mod_jk.log contains more info 
 (see attacheement). The strange thing I notice is that is seems to try 
 to execute everything twice. Does this ring a bel with anybody?
 
 The jasper.log file does not contain much more info:
 
 2001-08-29 18:29:15 - Parent class loader is: AdaptiveClassLoader(  )
 2001-08-29 18:29:15 - Scratch dir for the JSP engine is: 
 /opt/jakarta-tomcat-3.2.3/work/localhost_8080%2Fexamples
 2001-08-29 18:29:15 - IMPORTANT: Do not modify the generated servlets
 2001-08-29 18:29:15 - Parent class loader is: AdaptiveClassLoader(  )
 2001-08-29 18:29:15 - Parent class loader is: AdaptiveClassLoader(  )
 2001-08-29 18:29:15 - Parent class loader is: AdaptiveClassLoader(  )
 
 
 Any ideas?
 
 Regards,
 
 Gero
 
 Dmitri Colebatch wrote:
  Hi,
  
  I remember this - didn't get it working hey?  bugger... ok, two things I
  can suggest:
  
  1. crank up the log level in mod_jk.conf to debug, see if it tells you
  anything interesting
  
  2. have a look in jasper.log (also crank the log level up - in
  server.xml) and see if that contains anything interested... normally when
  a jsp is requested you'll be a fair bit of debug as it is compiled.
  
  hth,
  cheesr
  dim
  
  On 29 Aug 2001, Gero Vermaas wrote:
  
  
 Hi all!
 
 I sent mail to this mailing list a while ago stating that I could not
 get apache to work with tomcat... well I tried all kinds of solutions,
 monitored the mailing list and unfortunately I still haven?t been able
 to get it up and running. 
 
 The problem:
 - Requesting a JSP page by doing a request via port 8080 works fine
 - Requesting a JSP page via apache and mod_jk returns the JSP source
 code
 
 Is seems that requests to JSPs are not directed to port 8007 of Tomcat.
 
 I try to give a concise description below, hopefully somebody can tell
 what I?m missing. It must be something simple...
 
 Apache version: 1.3.14
 Tomcat version: 3.2.3
 Mod_jk version:  tomcat-mod-3.2.2-1.i386.rpm
 
 The apache error.log states the following when apache is started:
 [Wed Aug 29 08:59:23 2001] [notice] Apache-AdvancedExtranetServer/1.3.14
 (Linux-M
 andrake/2mdk) mod_ssl/2.7.1 OpenSSL/0.9.5a mod_jk configured -- resuming
 normal o
 perations
 
 As you can see mod_jk is configured and seems to be fine.
 
 I started TomCat before starting apache and this Tomcat reported the
 following:
 
 [root@gerodt gero]# 2001-08-29 09:02:12 - Ctx( /examples ): Set debug to
 1
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /examples )
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /admin )
 Starting tomcat. Check logs/tomcat.log for error messages 
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx(  )
 2001-08-29 09:02:12 - ContextManager: Adding context Ctx( /test )
 2001-08-29 09:02:12 - Ctx( /examples ): XmlReader - init  /examples
 webapps/examp
 les
 2001-08-29 09:02:12 - Ctx( /examples ): Reading
 /opt/jakarta-tomcat-3.2.3/webapps
 /examples/WEB-INF/web.xml
 2001-08-29 09:02:13 - Ctx( /examples ): Add user tomcat tomcat tomcat
 2001-08-29 09:02:13 - Ctx( /examples ): Add user role1 tomcat role1
 2001-08-29 09:02:13 - Ctx( /examples ): Add user both tomcat
 tomcat,role1
 2001-08-29 09:02:13 - Ctx( /examples ): Loading -2147483646 jsp
 2001-08-29 09:02:13 - PoolTcpConnector: Starting HttpConnectionHandler
 on 8080
 2001-08-29 09:02:13 - PoolTcpConnector: Starting Ajp12ConnectionHandler
 on 8007
 
 Below I?ll include the mod_jk.conf and worker.properties file. I checked
 all paths in these file and they all seem to be correct.
 
 Doing a telnet to port 8007 reports:
 [root@gerodt gero]# telnet localhost 8007
 Trying 127.0.0.1...
 Connected to localhost.localdomain.
 Escape character is ?^]?.
 HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
 java.io.IOException: Stream broken
 at
 
org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHa
 ndler.java:426)
 at
 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12Connect
 ionHandler.java:147)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at java.lang.Thread.run(Thread.java:484)
 
 So Tomcat is accepting requests on this port.
 
 A strange this I discovered is that the /var/log/httpd/mod_jk.log file
 remains empty when I do a:
 /etc/rc.d/rc5.d/S85httpd stop
 followed by a
 /etc/rc.d/rc5.d/S85httpd start
 
 However, when I do a:
 /etc/rc.d/rc5.d/S85httpd restart
 
 The mod_jk.log file contains:
 [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
 NULL parameter
 [jk_uri_worker_map.c (185)]: In
 jk_uri_worker_map_t::uri_worker_map_free, NULL parameters

Re: Tomcat IIS HowTo update

2001-08-29 Thread Dmitri Colebatch

On Wed, 29 Aug 2001, Gary Allen Vollink wrote:

 Since it's not in the HowTo, I thought I'd forward the following info:
 
 Verified working for Tomcat 3.2.1, IIS 5.0 / Windows 2000 using Java
 (JRE) 1.3.1

are you saying you got JSPs to work with a JRE?  Sure its not the JDK, or
that tools.jar doesn't exist in the classpath somewhere?

cheesr
dim


 
 It may be good to mention that using Java 1.2 and 1.3 requires the
 java.dll entered into the workers.properties file (instead of the
 defaults of javai.dll for Java 1.1 and jvm.dll for Java 2.
 
 Thank you,
 Gary Allen Vollink
 CorVu IT Manager
 
 
 
 




Re: confusion

2001-08-28 Thread Dmitri Colebatch

The work directory is where .jsp files are compiled first to .java then to
.class files.  You shouldn't need to worry about it at all.  If you delete
files in there I think you could have problems while tomcat is running,
but if you stop tomcat you can certainly delete all the files and they
will be regenerated when .jsp files are requested.

hth
dim

On Tue, 28 Aug 2001, [iso-8859-1] vinod tomcat wrote:

 
 
 hi friends,
 
  can anybody help me ..i m in fix ..
 
 
   1. some body said me that containts of work
 directiory in tomcat are generated automatically and
 normal functionaing of a site dosent get affected if
 all class files in work directiory are deleted . is
 this true ??? 
 
  even if i delete all class files in work ,
 application works fine ??  please help me...
 
 
  2. if i make any change to any jsp file , do i need
 to delete the class files of work directiory ???
 somebody said me so ..is this necesssery to make
 changes effect ??
 
 
 
 thanks 
 
 
 Do You Yahoo!?
 Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in/ groups.yahoo.com
 




Re: confusion

2001-08-28 Thread Dmitri Colebatch

ok - hang on a second... no need for the caps... in case you weren't
aware, caps are interpreted as SHOUTING and is considered rude.

On Tue, 28 Aug 2001, [iso-8859-1] vinod tomcat wrote:
 
1.  IF I UPDATE ANY JSP FILE AND UPLOAD , DO I NEED
 TO MAKE ANY CHANGES WITH WORK DIRECT. SOME BODY TOLD
 ME THAT I WILL HAVE TO DELETE THE CONCERNED .CLASS
 FILES ???

no.  Tomcat will detect that the .jsp file is newer than the .java (or
.class - not sure, doesn't matter) file and recompile it.

2. IF I MAKE CHANGES WITH THE ANY CONFIGURATION
 FILE ...DO I NEED TO MAKE ANY CHANGES WITH ANY OTHER
 FILE ... I HAD REPLACED THE SERVER.XML FILE AS IT WAS
 CORRUPTED ..BUT NOW I M GETTING ERROR..

If you change configuration files, you will (afaik) need to restart tomcat
for the changes to take effect.

What is the error you are getting with your server.xml?

cheers
dim

 
 
 
  --- Dmitri Colebatch [EMAIL PROTECTED] wrote: 
 The work directory is where .jsp files are compiled
  first to .java then to
  .class files.  You shouldn't need to worry about it
  at all.  If you delete
  files in there I think you could have problems while
  tomcat is running,
  but if you stop tomcat you can certainly delete all
  the files and they
  will be regenerated when .jsp files are requested.
  
  hth
  dim
  
  On Tue, 28 Aug 2001, [iso-8859-1] vinod tomcat
  wrote:
  
   
   
   hi friends,
   
can anybody help me ..i m in fix ..
   
   
 1. some body said me that containts of work
   directiory in tomcat are generated automatically
  and
   normal functionaing of a site dosent get affected
  if
   all class files in work directiory are deleted .
  is
   this true ??? 
   
even if i delete all class files in work ,
   application works fine ??  please help me...
   
   
2. if i make any change to any jsp file , do i
  need
   to delete the class files of work directiory ???
   somebody said me so ..is this necesssery to make
   changes effect ??
   
   
   
   thanks 
   
  
 
 
   Do You Yahoo!?
   Send a newsletter, share photos  files, conduct
  polls, organize chat events. Visit http://in/
  groups.yahoo.com
   
   
 
 
 Do You Yahoo!?
 Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in/ groups.yahoo.com
 




RE: Can't start tomcat

2001-08-28 Thread Dmitri Colebatch

On Tue, 28 Aug 2001, BENARD Christophe, DDE 34/SG wrote:

 Try this :
 
 cd $TOMCAT_HOME/bin
 chmod 744 startup.sh
 
 and run startup.sh as root.

dont run startup.sh as root unless you absolutely know what you are
doing.  if you're running tomcat in its normal setup you can just run it
as the owner of the tomcat files and directories, and thats what you
should do.

cheesr
dim





 
 HTH
 
 Chris
 
  -Message d'origine-
  De: Hugo Hendriks [mailto:[EMAIL PROTECTED]]
  Date: mardi 28 août 2001 16:25
  À: '[EMAIL PROTECTED]'
  Objet: Can't start tomcat
  
  
  Hi,
  
  I've been trying to install Tomcat 3.2.3 on my redhat7.1 
  machine but i can't
  get it to work. I have installed java1.2.1, but the point 
  where I get stuck
  is where I have to edit my path and set the environment 
  variables. When i
  set the path to the java directory it looks oke, but when i 
  check it again,
  it's back to normal. Also the part about the environment 
  variables is a
  little bit vague. When I try to start the startup.sh I get a 
  permission
  denied. Can somebody give me please a small explanation.
  
  thanks
  
  Hugo
  
 




Re: Yet another newbie question

2001-08-28 Thread Dmitri Colebatch

On Tue, 28 Aug 2001, Mihai Gheorghiu wrote:

 Tomcat generates an error message in the terminal window it was started
 from:
 2001-08-28 12:12:00 - Ctx( /development ): 404 R( /development +
 /javax/swing/JApplet.class + null) null
 What should I do?

firstly, if you want those messages to go into a file instead of the
terminal, look at server.xml for tc_log and follow the comments.

cant you run a 1.2 client?  if you're clients dont have swing you're
probably better off using awt... either that or copy the entire swing
package to /development

hth
cheesr
dim

 Thank you all.
 
 




Re: how????

2001-08-28 Thread Dmitri Colebatch

http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html

the web site is incredibly helpful if you only look (o:


On Tue, 28 Aug 2001, Triveni Gorur wrote:

 Please walk me through: how to install Apache-tomcat?
 




Re: Servlet Exception - Please Help

2001-08-27 Thread Dmitri Colebatch

the key thing is to find the tools.jar file.  that error is typically
caused by trying to run tomcat on the JRE instead of the JDK.  Downlaod
the JDK from sun or ibm and have another go - ensuring that JAVA_HOME is
set to the install dir of the JDK

cheers
dim

On Tue, 28 Aug 2001, Lawrence, Gareth wrote:

 Greetings All,
  
 Please, please, please help me ;)  I've got to show off Servlets/JSP
 tomorrow at a presentation but I can't get tomcat even to boot the
 examples!!! If anyone could help me I would really appreciate it.  Thanks
 Gareth.
  
 I get the error:
 A Servlet Exception Has Occurred
 Exception Report:
 javax.servlet.ServletException: sun/tools/javac/Main
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:461)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:247)
 ... 
 Root Cause:java.lang.NoClassDefFoundError: sun/tools/javac/Main
   at
 org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:271)
 
 Gareth Lawrence 
 Institute of Information Sciences and Technology 
 Phone (350) 7231 
 Website http:\\www-ist.massey.ac.nz 
 MSN Messenger: [EMAIL PROTECTED] 
 




RE: how to make a servlet as the home page

2001-08-26 Thread Dmitri Colebatch

Ok, if you're using apache, then the first thing apache does when it gets
a request for a directory is look for the DirectoryIndex
instruction.  typically this will be set to index.html index.htm index.jsp
etc.  The way this works is that apache will first check index.html, then
index.htm, then index.jsp and serve whichever comes first. 

the second part of the equation is the JkMount directives.  Say you create
a directive 

JkMount /MyHomePageServlet ajp13

then you can set 

DirectoryIndex MyHomePageServlet index.html index.htm index.jsp

and afaik apache should route the request for / to tomcat, and tomcat will
know how to serve /MyHomePageServlet.

just a warning this is all theory, I haven't tested it, but I think the
concepts are right.

hth, cheesr
dim

 
 
 - Original Message -
 From: naveen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, August 26, 2001 9:29 PM
 Subject: how to make a servlet as the home page
 
 
  hi ,
  I am using tomcat and apache, I want to make a servlet as the home page of
  my web site,
  when i access http://www.mysite.com/, a servlet needs to be called and the
  most important thing in this is I need to access HTTP variables like
 Remote
  Host, etc.
  thanks in advance
 
 
 
 




Re: Tomcat 4.0.7b and lib help (FIXED)

2001-08-24 Thread Dmitri Colebatch

This has come up before...  tomcat follows the spec - loading all jars in
WEB-INF/lib... no mention of zips (o:

On Fri, 24 Aug 2001, Shawn Evans wrote:

 I don't know about everyone else, but I got my Oracle classes12.zip in my
 lib and it wouldn't work so after looking at my code, wondering what I
 messed up (4 hours), I decided to change it to *.jar.  OMG it decided to
 work... might want to have TomCat be able to do both zip  jar's in the
 lib
 
 just my 2 cents.
 
 Shawn
 
 - Original Message -
 From: Jonathan Eric Miller [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; Evans, Shawn
 [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 12:52 PM
 Subject: Re: Tomcat 4.0.7b and lib help
 
 
  My guess is that this may be the same problem that I ran into while trying
  to use JDBCRealm. I think you have to put the .jar file in
  TOMCAT_HOME/server/lib instead of TOMCAT_HOME/lib for low-level .jar files
  that get used by Tomcat itself? I'm not an expert, that just seemed to be
  experience that I had.
 
  Jon
 
  - Original Message -
  From: Shawn Evans [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, August 23, 2001 11:45 AM
  Subject: Tomcat 4.0.7b and lib help
 
 
   I have a servlet FBJServlet that uses a DB connection pool, and I have
 the
   JDBC driver for Oracle installed as well in the /lib/classes12.jar... I
  open
   the jar and see OracleDataSource... but I get the error below.
   Root Cause:
   java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
   at
 com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110)
   at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17)
   at
  
 
 com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23
   )
   at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15)
   at javax.servlet.GenericServlet.init(GenericServlet.java:366)
   at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833)
   at
  
 
 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
   at
  
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
   va:214)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   66)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
   va:215)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   66)
   at
  
 
 org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
   46)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   64)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
   at
  
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
   )
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   66)
   at
  
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   64)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
   :163)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
   66)
   at
  
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  
 
 org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
   1000)
   at
  
 
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
   )
   at java.lang.Thread.run(Thread.java:484)
  
  
  
 
 




RE: Any idea?

2001-08-23 Thread Dmitri Colebatch

On Thu, 23 Aug 2001, Filip Hanik wrote:

 THIS IS ILLEGAL, PLEASE REFRAIN FROM MAKING THESE REQUEST ON THIS LIST.

not to mention it has _absoltely nothing_ to do with tomcat (o:

 
 Filip
 
 ~
 Namaste - I bow to the divine in you
 ~
 Filip Hanik
 Software Architect
 [EMAIL PROTECTED]
 www.filip.net 
 
 -Original Message-
 From: root [mailto:root]On Behalf Of Sasha Tartchinski
 Sent: Thursday, August 23, 2001 4:03 PM
 To: [EMAIL PROTECTED]
 Subject: Any idea?
 
 
 
 
 Has anywone know where can i download and burn Microsoft Office XP.
 Thanks.
 
 
 




Re: a simple ( irritating) classpath problem

2001-08-23 Thread Dmitri Colebatch

On Thu, 23 Aug 2001, yilmaz wrote:
 
 D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java
 gs.java:37: 不能??ParameterParser
 坏的?文件:.\ParameterParser.class
 ?文件含有??的?:com.oreilly.servlet.ParameterParser
 ?去掉或确信它出?在正确的classpath的子目?中.
  ParameterParser parser= new ParameterParser(req);
  ^
 1 ???

What are all those weird characters?  Not sure if they are doing anything
weird... other than that - I'm out of ideas

cheers
dim





Re: Imaginative webapp setup. Is this possible to do?

2001-08-22 Thread Dmitri Colebatch

yep - but it'd be something you'd do in one webapp... put some logic in
your servlet (assuming you're using model-2 arch) that looks at the
request, and uses the appropriate jsp... have some protocol like hostname
+ _homepage.jsp... for static html, probably be easier to use apache
virtuals for that...

cheesr
dim

On Wed, 22 Aug 2001, Gabriel J Zimmerman wrote:

 I have a server that has many virtual hosts, say
 http://www.myhost1.com/, http://www.myhost2.com, http://www.myhost3.com
 etc. etc.
 
 Is it possible to create a webapp that is hosted at the / level for each
 of these hosts, where the servlets,tag libraries, and java classes
 located in the WEB-INF section would all be the same but where the docs
 and JSP files would be unique for each host? 
 
 By unique, I mean that each host would have its own html files, JSP
 files, image files etc., which would not be accessable from the other
 hosts.
 
 Thanks,
 
 Gabe Zimmerman
 




Re: multiple context paths pointing to the same doc base?

2001-08-22 Thread Dmitri Colebatch

On Wed, 22 Aug 2001, Vladimir Grishchenko wrote:

 
  One option you have is to put the classes that actually cache things into
  a common directory ($TOMCAT_HOME/lib or $CATALINA_HOME/lib).  Such classes
  are shared across web apps, so this should accomplish your goal of having
  a single cache.  They are loaded from a (common) parent class loader to
  the one for each web app.

Wont this still result in one init() call per servlet per context?  The
only think you'll gain is the use of static variables right?  Obviously
these could be used to achieve the desired outcome, but you wouldn't get
one context with two paths...?

 
 
 I'm not using the latest servlet spec (2.3). Anyway, the simplest solutuion
 will be to put all my classes
 on the system classpath, this should  work. I have no jsp's and don't need
 dynamic class
 reloading in production, so I beleive it's perfectly legal in my case.

you would be well advised to put it in a jar which you then place in
tomcat's lib dir... that way its relatively easy to move your app.

cheers
dim




Re: web.xml problems

2001-08-22 Thread Dmitri Colebatch

Sounds like a case issue... Remember windows is case-preserving but not
case-sensitive... most half decent o/s's (like linux) are both
case-preserving _and_ case sensitive (o:

cheers
dim

On Wed, 22 Aug 2001, Noble Long wrote:

 I am trying to configure a java web server using jakarta-tomcat-3.2.3 on Red
 Hat 6.2. I am recieving a ConfigFileNotFoundException when I try to access
 my page. I have the WEB-INF/web.xml properly configured. I know it's right
 because it works fine from my windows environment. I even tried copying my
 web.xml file to /conf/web.xml to replace the default. Is there any reason
 why Java can't find the System.getProperty(ENVFile) from Tomcat?
 
 Thanks,
 Noble
 
 
 




Re: multiple context paths pointing to the same doc base?

2001-08-22 Thread Dmitri Colebatch

On Wed, 22 Aug 2001, Craig R. McClanahan wrote:
 Since the original objective was to share the cache, it seems to me that
 one versus two contexts is not a big deal, right?

ahhh, sorry - missed the start of the thread... thought it was a more
general one webapp thing...

  you would be well advised to put it in a jar which you then place in
  tomcat's lib dir... that way its relatively easy to move your app.
 
 
 In fact, this is critical to the sharing solution.  Eerything in Tomcat's
 lib directory is shared -- everything in /WEB-INF/classes or /WEB-INF/lib
 is not shared.

My reading of the suggestion was that the classes would reside elsewhere
in the system but be in the startup classpath as startup - this would do
the same thing but be a little more spread out... thats all my point was
there (o:

cheesr
dim




Re: a simple ( irritating) classpath problem

2001-08-22 Thread Dmitri Colebatch

hi,

There are three basic areas that classes can be put in tomcat:

WEB-INF/classes
  - contains all the classes that form the web application
WEB-INF/lib
  - contains jars that the web application uses
TOMCAT_HOME/lib
  - contains jars that are available to _all_ applications using tomcat

 because i put all the package (com.oreilly.servlet.*) in the same directory
 with the servlet (under web-inf/classes/ com/servlet/  directory)

if it is the package com.oreilly.servlet then it should go in
WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
to a jar.

 i tried putting the cos.jar file in the web-inf/lib directory, it didn't
 work

what do you mean it didn't work?  try jar -tf cos.jar to check that the
classes are in the jar.  I assume you are importing the required classes
and that they exist in the jar.

 in put these files directly under the web-inf/classes/   directory , it
 didn't work either

again, should be according to package

 then i added the full path tomcat_home/lib/cos.jar, to the classpath,
 didn't work either.

I'm not sure why that didn't work - although if you put cos.jar in the
classpath it _should_ be available to all web applications.

 well, i gave up, i just wanted to learn the LOGICAL way to set the classpath
 up.

you dont need to set the classpath yourself.  just put your jars in
WEB-INF/lib and your classes in WEB-INF/classes

hth, cheers
dim




  1   2   3   >