RE: Upgrading from jserv to tomcat

2001-06-06 Thread Duck-Jin Chun

Hum... before anyone can help... you need to explain exactly what the
problem is.

I migrated from jserv to tomcat about 9 months ago (the tomcat version
was 3.1 back then).  Most of the trouble I ran into was related to
Tomcat config.  I had a pretty easy time with porting the code.

-Duck



 -Original Message-
 From: Priyanka Gupta [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 4:15 PM
 To: [EMAIL PROTECTED]
 Subject: Upgrading from jserv to tomcat
 
 
 Hello
I'm very new to this field and have got to upgrade an 
 already exsisting 
 system to Tomcat! The person working on the project before me 
 was using 
 Apche JServ which now i have to roll on to Tomcat on an NT 
 workstation!
It would be really nice if someone can help me through coz 
 I'm really 
 stuck up and am unable to find a way out!
Thanks
Priya
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 



RE: resultset Question

2001-05-14 Thread Duck-Jin Chun



Kevin,

There 
are 2 problems with your message. First, this question is extremely off 
topic for this mailing list. Second, you do not say what kind of errors 
and/or results you get by executing your current code. You simply say you 
"can't seem to grab the data". Not very helpful.

But 
since I hate it when people just scream "off topic"... Take a look at the api 
documentation for java.sql.ResultSet.next(). 
The next() method needs to be called 
before you start calling the get*() 
methods.

-Duck

  -Original Message-From: Kevin Fonner 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, May 14, 2001 5:16 
  PMTo: [EMAIL PROTECTED]Subject: resultset 
  Question
  I want to grab just the first record in a Query 
  of my database. I thought that this would be pretty 
  simple???
  Acording to my books they said that after 
  executing...
  resultSet = statement.executeQuery("SELECT * 
  FROM userfolders WHERE username=\'" + userName + "\'");
  That resultset would contain the first 
  record. But I can't seem to grab the data. Below is a sample of my code 
  that I think pertains to my problem. If anybody has any ideas I would 
  appreciate them
  resultSet = statement.executeQuery("SELECT * FROM 
  userfolders WHERE username=\'" + userName + 
  "\'");dFolder = 
  resultSet.getString("folder");dModule = 
  resultSet.getString("dmod");dModulePath = 
  resultSet.getString("dmod_path");
  
  Thanks,
  Kevin


RE: debugging servlets

2001-04-04 Thread Duck-Jin Chun

I also find that defining an evironment var works too.

For windows try: set JAVA_COMPILER=NONE


 -Original Message-
 From: Benot Jacquemont [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 04, 2001 11:42 AM
 To: [EMAIL PROTECTED]
 Subject: RE: debugging servlets
 
 
 You have to use the -Djava.compiler=NONE command line option 
 in your java
 command line in the tomcat.bat/tomcat.sh
 
 Benot
 
  -Message d'origine-
  De : Christoph Kukulies [mailto:[EMAIL PROTECTED]]
  Envoy : mercredi 4 avril 2001 17:38
   : [EMAIL PROTECTED]
  Objet : debugging servlets
 
 
  What was again the magic modification one has to make to
  allow a more descriptive line in backtrace rather than
  '(compiled code)'
  when one gets for example:
 
  java.lang.NullPointerException
  at java.util.Arrays.sort(Compiled Code)
  at Some.doGet(Compiled Code)
  at Some.doPost(Compiled Code)
  at javax.servlet.http.HttpServlet.service(Compiled Code)
  at javax.servlet.http.HttpServlet.service(Compiled Code)
  at
  org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code)
  at org.apac
 
  --
  Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
 



RE: detecting shutdown

2001-03-14 Thread Duck-Jin Chun

Instead of looking for something Tomcat/Serlvet2.2 specific, how about
using Runtime.addShutdownHook(Thread)?

My vm version is 1.2.2 so I have not been able to use this new feature.
I was forced to use the (deprecated) Runtime.runFinalizersOnExit()
method instead.

Let me know if you have any luck with addShutdownHook().

hth,
-Duck

-Original Message-
From: Daniel Lopez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 11:41 AM
To: [EMAIL PROTECTED]
Subject: Re: detecting shutdown


Hi David,

AFAIK there's no such a thing in any servlet container that I've worked
with,
but I might be wrong as my experience with Tomcat is quite limited.
However,
this wouldn't be a logical option as the same that you say about
unloaded!=tomcat stopping can be said of loaded. AFAIK loaded!=Tomcat
just
started but it just means tomcat just loaded the servlet. Thus, if
Tomcat
decides to unload/reload your servlet for any reason and then tomcat is
stopped
you would end up with multiple initialisations and just one
finalisation.
Ummm, I think that with JSDK 2.3 you might try to do what yoy want with
the
class ServletContextListener, which is notified when the context is
initialised
or destroyed. With JSDK 2.2 I'm not sure how could one verify that
everything is
really shutting down before clearing things up. We solved it by using
just ONE
servlet which acts as ServletController and who initialises everything
when
being loaded and cleans everything when unloaded, but I understand this
is not a
general solution.
I'm afraid I can't help you much with JSDK2.2. May be someone out there?
;)
regards,
Dan

David Wall wrote:

 Is there something like the web.xml's "load on startup" that can be
 triggered when the Tomcat has been requested to shutdown?  I'd like to
be
 able to do "global" cleanup in such a situation.

 I know that an unloaded servlet will be called, but it's not true that
being
 unloaded means that Tomcat is stopping.

 Thanks,
 David

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


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

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




RE: More on JServ to Tomcat

2001-02-27 Thread Duck-Jin Chun

Brett,

I recently migrated from JServ to Tomcat as well.  The migration was
smooth, and I'm now working with the latest servlet spec... but I found
JServ to be more stable.

Anyway... to answer your question, try putting the following in your
web.xml file:
servlet
servlet-nameCallClient/servlet-name
 
servlet-classcom.company.clients.commpilot.servlets.CallClient/servle
t-class
/servlet
servlet-mapping
servlet-nameCallClient/servlet-name
url-pattern/CallClient/url-pattern
/servlet-mapping

In general, the "Java Servlet Specification" is a good reference for the
format of the web.xml file.

good luck,
-Duck

-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 9:34 AM
To: [EMAIL PROTECTED]
Subject: More on JServ to Tomcat


In my JServ properties file, there is a section on servlet aliasing,
like
this:

servlet.CallClient.code=com.company.clients.commpilot.servlets.CallClien
t

Does anyone know if this the same as the servlet mapping statement in
the web.xml file?  If not, what would be the equivalent?

-- Brett
 
http://www.chapelperilous.net/~bmccoy/

---
We really don't have any enemies.  It's just that some of our best
friends are trying to kill us.


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

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




RE: my html FORM ACTION= can't find my servlet

2000-12-15 Thread Duck-Jin Chun

I'm not familiar with that book or the examples... but try:
FORM ACTION="/examples/servlet/ThreeParams"

Note the "/" at the begining of the action.  This makes an absolute
reference... otherwise, your reference is relative.

hope it helps,
-Duck

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 15, 2000 5:23 PM
To: tomcat mailing list
Subject: my html FORM ACTION=  can't find my servlet


I am working on the "Three Parameters" servlet in Marty Hall's book
(p.69) and the servlet is working great when I call it from the
"Location" line of the browser such as:

http://localhost:8080/examples/servlet/ThreeParams?param1=bubbaparam2=j
imboparam3=janiesue

But I can't find the secret code to put in the ACTION argument of the
FORM tag.  The book recommends :

FORM ACTION="servlets/coreservlets.ThreeParams" which I tried
unsuccessfully.  (Netscape gives me a variety of "unable to find
directory or file" messages)  Then I removed the package statements and
re-compiled with them in the base directory where I found the working
examples:

C:\\tomcat\webapps\examples\WEB-INF\classes

I've tried all these variations, with forward and back slashes, and
with/without double quote marks and with/without leading slashes:

ThreeParams
servlets/ThreeParams
examples/servlets/ThreeParams


When I used "ThreeParams", Netscape said it couldn't find file or
directory C:\\tomcat\webapps\examples\WEB-INF\classes, which would have
been the correct directory.  I tried "ThreeParams.class" and it produced
the correct line at the location line of the browser, but the output was
garbled, strange characters, etc.

Any suggestions would be appreciated.  Thanks.

Michael Brubaker, Java Developer Wannabe, Orlando, Florida

Win98/Tomcat 3.2.1/JDK1.3/Netscape 4.75