Re: Problem with default servlet

2003-03-14 Thread rf

--- Bill Barker [EMAIL PROTECTED] wrote:
 
 rf [EMAIL PROTECTED] wrote in message

news:[EMAIL PROTECTED]
  Hello
  I am using a caching Filter that *conditionally*
 uses
  the default servlet (through RequestDispatcher) to
  serve a page, or generate it again. In the case
 when
  the default servlet is used to serve the page,
 this
  servlet seems to send the headers Last-modified
 and
  ETag, and this seems to have an effect on IE
 which, on
  a shift-refresh, does not seem to request the page
  again at all. (IE, by default, is set to check for
  newer versions of stored pages 'Automatically').
 
  1. Is the IE behaviour due to those two headers?
 Yes. (or, more generally, a browser won't fetch a
 non-updated page that
 includes a Last-Modified header when the page hasn't
 changed).
 
  2. If yes, how can I instruct the default servlet
 not
  send these headers?
 
 You can't.
 
  3. Sending these headers is good, but I thought IE
  would send the request, nevertheless, with the
  If-none-matched and If-Modified-Since. Is this
  something wrong with IE?
 
 IE should send a If-Modified-Since (and get a '304
 Not Modified' response).
 Otherwise, you will have to take it up with Bill
 Gates ;-).

1. Are you sure? This is a critical issue - I am sure
there must have been discussions on this in the past.
This surely must have troubled a lot of people.

2. HttpServlet interface has a getLastModfied method.
 Which is better/recommended:
  A. Use a filter that caches the output and use the
  default servlet to serve that next time
  OR 
  B. Use only a servlet with a getLastModified method
   and put Last-Modified and ETag headers myself.

For A, I have the problem as mentioned earlier (IE not
sending the request at all).
I have not yet tested B, but do all the browsers use
the If-None-Match and If-Modified-Since headers? In
case
the browsers do not send that, tomcat will not use the
getlastModified method of the servlet(or does it?) and
I dont get what I want.

Thanks
~rf


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Re: Problem with default servlet

2003-03-14 Thread rf
Anyone has any further comments on this?


--- rf [EMAIL PROTECTED] wrote:
 
 --- Bill Barker [EMAIL PROTECTED] wrote:
  
  rf [EMAIL PROTECTED] wrote in message
 

news:[EMAIL PROTECTED]
   Hello
   I am using a caching Filter that *conditionally*
  uses
   the default servlet (through RequestDispatcher)
 to
   serve a page, or generate it again. In the case
  when
   the default servlet is used to serve the page,
  this
   servlet seems to send the headers Last-modified
  and
   ETag, and this seems to have an effect on IE
  which, on
   a shift-refresh, does not seem to request the
 page
   again at all. (IE, by default, is set to check
 for
   newer versions of stored pages 'Automatically').
  
   1. Is the IE behaviour due to those two headers?
  Yes. (or, more generally, a browser won't fetch a
  non-updated page that
  includes a Last-Modified header when the page
 hasn't
  changed).
  
   2. If yes, how can I instruct the default
 servlet
  not
   send these headers?
  
  You can't.
  
   3. Sending these headers is good, but I thought
 IE
   would send the request, nevertheless, with the
   If-none-matched and If-Modified-Since. Is this
   something wrong with IE?
  
  IE should send a If-Modified-Since (and get a '304
  Not Modified' response).
  Otherwise, you will have to take it up with Bill
  Gates ;-).
 
 1. Are you sure? This is a critical issue - I am
 sure
 there must have been discussions on this in the
 past.
 This surely must have troubled a lot of people.
 
 2. HttpServlet interface has a getLastModfied
 method.
  Which is better/recommended:
   A. Use a filter that caches the output and use the
   default servlet to serve that next time
   OR 
   B. Use only a servlet with a getLastModified
 method
and put Last-Modified and ETag headers myself.
 
 For A, I have the problem as mentioned earlier (IE
 not
 sending the request at all).
 I have not yet tested B, but do all the browsers use
 the If-None-Match and If-Modified-Since headers? In
 case
 the browsers do not send that, tomcat will not use
 the
 getlastModified method of the servlet(or does it?)
 and
 I dont get what I want.
 
 Thanks
 ~rf
 
 
 __
 Do you Yahoo!?
 Yahoo! Web Hosting - establish your business online
 http://webhosting.yahoo.com
 

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


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Problem with default servlet

2003-03-13 Thread rf
Hello
I am using a caching Filter that *conditionally* uses
the default servlet (through RequestDispatcher) to
serve a page, or generate it again. In the case when
the default servlet is used to serve the page, this
servlet seems to send the headers Last-modified and
ETag, and this seems to have an effect on IE which, on
a shift-refresh, does not seem to request the page
again at all. (IE, by default, is set to check for
newer versions of stored pages 'Automatically').

1. Is the IE behaviour due to those two headers?
2. If yes, how can I instruct the default servlet not
send these headers?
3. Sending these headers is good, but I thought IE
would send the request, nevertheless, with the
If-none-matched and If-Modified-Since. Is this
something wrong with IE?

Thanks
~rf

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



About maxProcessors

2003-03-12 Thread rf

--- Simon Kitching [EMAIL PROTECTED] wrote:
 And setting maxProcessors to 2 means that if *three*
 people hit a url at
 your website concurrently, one will have to wait
 until one of the
 earlier users has finished receiving their page [or
 pages for http/1.1
 persistent connections].
 


I tested this aspect with JMeter. Set maxProcessors to
2 and gave three requests simultaneously. One returned
immediately saying java.io.IOException: Stream
closed
whats the matter?


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Hostname/port from ServletContext

2003-03-05 Thread rf
In my Web app startup contextListener I want to
initialize certain variables using the hostname and
port of the server. I dont see a way to obtain these
two values from ServletContext, can somebody help me?

Thanks
rf

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Hostname/port from ServletContext

2003-03-05 Thread rf

--- Tim Funk [EMAIL PROTECTED] wrote:
 You can't. That is because the context runs in some
 type of service 
 which will present you with the requests. So only at
 request time can 
 you know the hostname and port number of the server.
 

Thanks for the info. I understand - the context is at
a lower layer. Let me explain my problem, may be you
can suggest me a soln.

I have some funcionality available on my server that
is supposed to be used by clients over network(http).
Now to demonstrate this I have some sample clients
within my server, how are these supposed to connect to
the server? I need the hostname  port to construct
the server URL at beginnning of my web application,
and make it available to the sample clients to use.

How is this kind of a problem typically approached?

Thanks
rf

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



RE: Hostname/port from ServletContext

2003-03-05 Thread rf
I have been doing exactly the same. But whenever I run
my server on a different port I have to update the
configuration file. (yeah, the information in the my
case is the local hostname and port). That is why I
wanted to pick these information at application
startup time.

--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Howdy,
 Put the information in a configuration file your
 clients read when they
 start up.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: rf [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:06 PM
 To: Tomcat Users List
 Subject: Re: Hostname/port from ServletContext
 
 
 --- Tim Funk [EMAIL PROTECTED] wrote:
  You can't. That is because the context runs in
 some
  type of service
  which will present you with the requests. So only
 at
  request time can
  you know the hostname and port number of the
 server.
 
 
 Thanks for the info. I understand - the context is
 at
 a lower layer. Let me explain my problem, may be
 you
 can suggest me a soln.
 
 I have some funcionality available on my server
 that
 is supposed to be used by clients over
 network(http).
 Now to demonstrate this I have some sample clients
 within my server, how are these supposed to connect
 to
 the server? I need the hostname  port to construct
 the server URL at beginnning of my web application,
 and make it available to the sample clients to use.
 
 How is this kind of a problem typically approached?
 
 Thanks
 rf
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more
 http://taxes.yahoo.com/
 

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

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


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Apache restart

2003-03-04 Thread rf
...
  I have configured tomcat behind apache web server
  using mod_jk. Why is it that every time I restart
  tomcat I have to restart Apache too?
 
 You shouldn't (I never do :).  AFAIK, every mod_jk
 after 1.0-M2 handles this
 fine.  If you want a real answer, I'd suggest
 offering more info (starting
 with version #s).


Apache Web server - 1.3.22
Tomcat - 4.0.6
mod_jk - mod_jk-1.3-eapi.so

any clues?

Thanks
rf

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Apache restart

2003-03-03 Thread rf
I have configured tomcat behind apache web server
using mod_jk. Why is it that every time I restart
tomcat I have to restart Apache too?

Thanks
rf

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Microsoft JVM

2003-02-21 Thread rf
Has anybody tried to run tomcat using the Microsoft
JVM - jview? If yes, what do you set for JAVA_HOME?


Thank you
~rf

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Microsoft JVM

2003-02-21 Thread rf

--- Bill Barker [EMAIL PROTECTED] wrote:
 From memory, I think that Microsoft's JVM is 1.1.6. 
 This will mean that you
 only have a hope of running Tomcat 3.3.  All other
 Tomcat versions require
 at least 1.2.
 

I quickly verified if jview supports any jdk1.2 api.
The javadoc of java.lang.String.compareTo method says
Since JDK1.2, but it works with jview. I understand
that I verifed JDK API and not really JVM, somebody
else can research better. Anyone?

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



RequestDispatcher and WEB-INF

2003-02-20 Thread rf
I want to give out an exe after an authorization. So I
put the exe in WEB-INF to avoid direct access, and
tried to do:
RequestDispatcher rd =
req.getRequestDispatcher(/WEB-INF/my.exe);
   rd.forward (req, res);

Tomcat 4.0.6 says /WEb-INF/my.exe cannot be found.

I dont know how this is different from what Craig
mentioned at 
http://marc.theaimsgroup.com/?l=tomcat-userm=99790295202902w=2


Thank you
Rf


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




RE: RequestDispatcher and WEB-INF

2003-02-20 Thread rf
It is strange that RequestDispatcher considers only
jsp and html, why not other extns like jpg/gif or why
not just any other resource - is this because of any
security concern?

Also, I have not understood your workaround Mr Edson,
can you please tell me in more detail how to get
around my problem?

Thanks
~rf

--- Edson Alves Pereira
[EMAIL PROTECTED] wrote:
   You need the CGI module to do this, that´s not a
 hard work but only
 with Apache, Tomcat don´t deal with CGI.
 
  --
  De: Erik Price[SMTP:[EMAIL PROTECTED]]
  Responder:  Tomcat Users List
  Enviada:quinta-feira, 20 de fevereiro de 2003
 14:31
  Para:   Tomcat Users List
  Assunto:Re: RequestDispatcher and WEB-INF
  
  I do not think you can forward to a .exe file, not
 sure of what the spec 
  says but the Javadoc says only JSP or HTML files.
  
  This link will probably get broken in your mail
 client, but if you 
  reassemble it you can read the doc:
  
 

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatc
 

her.html#forward(javax.servlet.ServletRequest,%20javax.servlet.ServletResp
  onse)
  
  Erik
  
  
  -Original Message-
  From: rf [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 20, 2003 3:51 AM
  To: [EMAIL PROTECTED]
  Subject: RequestDispatcher and WEB-INF
  
  
  I want to give out an exe after an
 authorization. So I
  put the exe in WEB-INF to avoid direct access,
 and
  tried to do:
RequestDispatcher rd =
  req.getRequestDispatcher(/WEB-INF/my.exe);
 rd.forward (req, res);
  
  Tomcat 4.0.6 says /WEb-INF/my.exe cannot be
 found.
  
  I dont know how this is different from what
 Craig
  mentioned at
 

http://marc.theaimsgroup.com/?l=tomcat-userm=99790295202902w=2
  
  
  Thank you
  Rf
  
  
 
 __
  Do you Yahoo!?
  Yahoo! Tax Center - forms, calculators, tips,
 more
  http://taxes.yahoo.com/
  
 

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

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

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


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




RE: Web-application obfuscation issues

2003-02-18 Thread rf
Thanks to all who replied. I understand your
suggestions. However, I would still like to get a
technical answer to my query. 

rf

--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Howdy,
 In practice, java code obfuscation is hardly ever
 worth the effort.
 Anyone with enough interest will be able to
 decompile your stuff.
 
 If you're concerned about unauthorized access to
 your webapp, invest
 more time in the authorization and authentication
 layers.
 
 If you're concerned about someone stealing the .war
 file itself, invest
 more time in controlling the .war file and ability
 to copy if from its
 repository to the outside.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: rf [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 18, 2003 2:18 AM
 To: [EMAIL PROTECTED]
 Subject: Web-application obfuscation issues
 
 What are the issues in obfuscating the java classes
 of
 my web-application? I should retain the names of
 the
 classes refered in the web.xml, is that all or
 anything else?
 
 thank you
 rf
 
 __
 Do you Yahoo!?
 Yahoo! Shopping - Send Flowers for Valentine's Day
 http://shopping.yahoo.com
 

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

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


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

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




Web-application obfuscation issues

2003-02-17 Thread rf
What are the issues in obfuscating the java classes of
my web-application? I should retain the names of the
classes refered in the web.xml, is that all or
anything else?

thank you
rf

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

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




Re: response.sendRedirect() - is this allowed?

2003-02-06 Thread rf

 // This is common trick I use after a form
 submission to
 // help make navigation easier for the user, and to
 help
 // avoid dual-submission of the same form.
 //

Not clear - how is the second submission avoided?


 if ( POST.equalsIgnoreCase( request.getMethod() )
 )
 {
StringBuffer buf = new StringBuffer();
buf.append( request.getRequestURI() );
buf.append( ? );
buf.append( request.getQueryString() );
response.sendRedirect( buf.toString() );
return;
 }


I have been using this technique for quite some time
but I am not happy as all the POST data appears in the
query string straight away. What is a better way of
passing data(possibly huge) to a redirected url?
RequestDispatcher would do but I dont see the
redirected url at the browser if I use it.

~rf

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

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




Re: tomcat's serlvet container and http

2003-02-04 Thread rf
Hello
No answer to any of the questions below? 
Rf

Subject:  tomcat's serlvet container and http
From: rf rufoo2001 () yahoo ! com
Date: 2003-02-03 1:59:58

Hello
I have some questions related to how tomcat's servlet
container handles some HTTP/1.1 issues. Understanding
these, I think, would be beneficial in improving the
performance of my web-application. Here they go:

1. How can my servlet respond with transfer encoding
as chunked? When is my serlvet's OutputStream
committed? I dont have all my data ready, I want send
it out in chunks - how do I do it?

2. How can I use 100 Continue response header? This
is usually used on slow links, but I want to use it
when my processing is slow. My servlet is doing some
processing and is going to take some more time - how
do I inform this to my client? Can I just set
HttpServletResponse.setStatus (SC_CONTINUE)? (Can this
response be sent more than once?) If this method is
not right for the scenario, what is the recommended
way of informing the client to patiently wait for some
more time?

3. The response in HTTP/1.1 can have footers in
addition to headers, how do I set a footer? I
guess we cannot use HttpServletResponse.setHeader
because the servlet spec says setting a header has no
effect if the response is already committed.

4. Persistant connections - is this configurable in a
tomcat? It might be the case that this is not
something a user should bother about, the servlet
container will take care of it. What does tomcat do?
Whenever needed, I want to recommend my client to use
a persistant connection for following requests. Can I
do it? An IE question: what factors determine that IE
should use a persistant connection?

5. If-modified-since header. There is a
getLastModified method in the servlet interface, this
returns a long(for date). I guess I should implement
this method for tomcat to respect the
if-modified-since header. I recently implemented a
caching filter, which intelligently uses the default
servlet to serve cached static content. But since the
former method is simple and more effective, I would
like to know when IE uses this header. Since this
header is optional, how do I recommend IE to use it?

Thank you,
~rf


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

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




RE: mod_jk

2003-02-03 Thread rf
Hello John
Thanks for your email.
1. What are the advantages of using Apache on top of
Tomcat (with regards to security and otherwise)? If
there is a document already, please point me to that.
2. Where can I know more about the AJP protocol? 

~rf

 --- Turner, John [EMAIL PROTECTED] wrote:  
 In production, you only want the connectors used for
 actual connections to
 be enabled.  If you're leaving port 8080 open,
 there's really no purpose for
 Apache, as one of the primary purposes of using
 Apache on port 80 instead of
 Tomcat is security.  Leaving Tomcat available on
 8080 undermines this goal.
 So, if you are using a connector at all, there's no
 reason to have any port
 open except the connector port.
 
 The protocol used by the JK/JK2 connectors is not
 HTTP.  It is called AJP,
 which, I believe, stands for Apache JServ
 Protocol.  JServ was the
 original Apache + Tomcat connector.
 
 John
 
 -Original Message-
 From: rf [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 2:29 AM
 To: Tomcat Users List
 Subject: Re: mod_jk
 
 
 Thank you Lajos and Oscar.
 Btw, what is the interface Apache uses to
 communicate
 to Tomcat at 8009? I guess it wont be HTTP. For
 security reasons, I assume it would be safer to run
 all tomcat processes on the lo interface. Is this
 correct, and recommended?
 
 ~rf.
 
 
 --- Lajos [EMAIL PROTECTED] wrote:
  Rf -
  
  When you use mod_jk, Apache communicates to Tomcat
  on (default) port
  8009. Port 8080 is for direct HTTP connections to
  Tomcat which, by 
  default is enabled. So, the answer is yes: you can
  expose web 
  applications to Apache via mod_jk, and access them
  on the Apache port, 
  but also access them by point your browser
 directly
  to the Tomcat port.
  
  Regards,
  
  Lajos
  
  
  rf wrote:
   When I use a tomcat-apache connector to redirect
  http
   requests to port 80 to port 8080, can I still
 use
  port
   8080 to connect to tomcat directly bypassing
  apache?
   If yes, how do I not allow this? By running
 tomcat
  on
   lo's 8080? What about on Windows?
   
   Thank you
   Rf
   
  
 __
   Do you Yahoo!?
   Yahoo! Mail Plus - Powerful. Affordable. Sign up
  now.
   http://mailplus.yahoo.com
   
  
 

-
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
   
   
  
  
  --
  
  
  
  Lajos Moczar
 
   Open Source Support, Consulting and Training
 
   Cocoon Developer's Handbook
   
 
 (www.amazon.com/exec/obidos/tg/detail/-/0672322579)
  
  _  _
 / \ /
/___\  /
   / \   /
  
http://www.galatea.com -- powered by AzSSL
  
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 ---
 
 Checked by AVG anti-virus system
 (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release
 Date: 1/27/2003
  
 
 ---
 
 Checked by AVG anti-virus system
 (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release
 Date: 1/27/2003
  
 

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


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

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




tomcat's serlvet container and http

2003-02-02 Thread rf
Hello
I have some questions related to how tomcat's servlet
container handles some HTTP/1.1 issues. Understanding
these, I think, would be beneficial in improving the
performance of my web-application. Here they go:

1. How can my servlet respond with transfer encoding
as chunked? When is my serlvet's OutputStream
committed? I dont have all my data ready, I want send
it out in chunks - how do I do it?

2. How can I use 100 Continue response header? This
is usually used on slow links, but I want to use it
when my processing is slow. My servlet is doing some
processing and is going to take some more time - how
do I inform this to my client? Can I just set
HttpServletResponse.setStatus (SC_CONTINUE)? (Can this
response be sent more than once?) If this method is
not right for the scenario, what is the recommended
way of informing the client to patiently wait for some
more time?

3. The response in HTTP/1.1 can have footers in
addition to headers, how do I set a footer? I
guess we cannot use HttpServletResponse.setHeader
because the servlet spec says setting a header has no
effect if the response is already committed.

4. Persistant connections - is this configurable in a
tomcat? It might be the case that this is not
something a user should bother about, the servlet
container will take care of it. What does tomcat do?
Whenever needed, I want to recommend my client to use
a persistant connection for following requests. Can I
do it? An IE question: what factors determine that IE
should use a persistant connection?

5. If-modified-since header. There is a
getLastModified method in the servlet interface, this
returns a long(for date). I guess I should implement
this method for tomcat to respect the
if-modified-since header. I recently implemented a
caching filter, which intelligently uses the default
servlet to serve cached static content. But since the
former method is simple and more effective, I would
like to know when IE uses this header. Since this
header is optional, how do I recommend IE to use it?

Thank you,
~rf

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

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




RE: mod_jk

2003-02-02 Thread rf
When I use a tomcat-apache connector to redirect http
requests to port 80 to port 8080, can I still use port
8080 to connect to tomcat directly bypassing apache?
If yes, how do I not allow this? By running tomcat on
lo's 8080? What about on Windows?

Thank you
Rf

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

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




Re: mod_jk

2003-02-02 Thread rf
Thank you Lajos and Oscar.
Btw, what is the interface Apache uses to communicate
to Tomcat at 8009? I guess it wont be HTTP. For
security reasons, I assume it would be safer to run
all tomcat processes on the lo interface. Is this
correct, and recommended?

~rf.


--- Lajos [EMAIL PROTECTED] wrote:
 Rf -
 
 When you use mod_jk, Apache communicates to Tomcat
 on (default) port 
 8009. Port 8080 is for direct HTTP connections to
 Tomcat which, by 
 default is enabled. So, the answer is yes: you can
 expose web 
 applications to Apache via mod_jk, and access them
 on the Apache port, 
 but also access them by point your browser directly
 to the Tomcat port.
 
 Regards,
 
 Lajos
 
 
 rf wrote:
  When I use a tomcat-apache connector to redirect
 http
  requests to port 80 to port 8080, can I still use
 port
  8080 to connect to tomcat directly bypassing
 apache?
  If yes, how do I not allow this? By running tomcat
 on
  lo's 8080? What about on Windows?
  
  Thank you
  Rf
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.yahoo.com
  
 

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

  Open Source Support, Consulting and Training

  Cocoon Developer's Handbook
  
 (www.amazon.com/exec/obidos/tg/detail/-/0672322579)
 
 _  _
/ \ /
   /___\  /
  / \   /
 
   http://www.galatea.com -- powered by AzSSL
 
 

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


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

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




Re: Do something after the webapp starts

2003-02-01 Thread rf

--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
  [1] I want to deploy axis services
 programmatically
  after application starts. This is done by an
  AdminClient contacting the server. But the problem
 is
  that the server is not yet up! Where do you think
  should I do this deployment?
 
 
 We had a similar design requirement for the Java Web
 Services Developer
 Pack (http://java.sun.com/webservices/), where we
 needed some webapps to
 be initialized and functioning before requests could
 be processed.  The


Are these initializations not part of the webapp which
gets requests? 


 solution used there was to create two Service
 elements in the server.xml
 file, because Tomcat guarantees that the first
 Service will be
 completely initialized and available before the
 second one is started.
 

Here in my case, everything is in one webapp. Do you
still suggest me to split up things into two webapps
to be put separately in contexts of two Service
elements?

I dont know much about Service - I have look at the
docs briefly.

 You might want to download JWSDP and see how the
 default server.xml file
 there is set up.
 
  thanks.
 
 Craig

Rf


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

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




RE: Do something after the webapp starts

2003-01-31 Thread rf
 Q3. Are the static blocks in the servlet classes
 run
 after ServletContextListener.contextInitialized.
 
 Yes, after. 

 [1] I want to deploy axis services programmatically
 after application starts. This is done by an
 AdminClient contacting the server. But the problem
 is
 that the server is not yet up! Where do you think
 should I do this deployment?
 
 Is your admin client running inside tomcat or
 outside?


It is inside tomcat, in a servlet's static block.
Things were fine until I added a Filter to this
servlet, that made this servlet load at startup time
itself. And this made the admin client block - may be
this is a race condition! Any advice?

Rf


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

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




Filter: Reading the http response content

2003-01-30 Thread rf
In my filter I want to cache the content of
HttpServletResponse so that I can save that in a file
and use a static file's servlet for the next request.
However, I am not able find interface to get the
(html)content from the response object. 

if (up2date) {
  RequestDispatcher rd =
request.getServletDispatcher (static.html);
  rd.forward (request, response);
  }
  else
{
chain.doFilter (request, response);
//***Then save the html response to static html
}


So any clues as to how to obtain the content of
response. The HttpServletResponse has methods to
get/set the HTTP headers and cookies, but does not
have anything for the HTTP's body. It is also not
possible to read from response.getOutputStream. 

What do you guys think?

Thank you
~rf

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

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




RE: Filter: Reading the http response content

2003-01-30 Thread rf
Thanks guys, Google actually gave me the fish itself
:-)
http://forum.java.sun.com/thread.jsp?thread=338226forum=33message=1387958

The whole code is there at the end, and it works!

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

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




Serlvet init-param

2003-01-30 Thread rf
Another question, a basic one:

 servlet
servlet-nameservletone/servlet-name
servlet-classmy.Servlet/servlet-class
init-param
param-namehi/param-name 
param-valuefoo/param-value 
/init-param
/servlet

 servlet
servlet-nameservlettwo/servlet-name
servlet-classmy.Servlet/servlet-class
init-param
param-namehi/param-name 
param-valuebar/param-value 
/init-param
/servlet


I have two servlet-names defined above with the same
Servlet class, the params are different. This setup
actually works with me, but I dont know why it works.

How many instances of my.Servlet are there in this
case? is it two? or only one?

Thank you,
~rf

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

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




Do something after the webapp starts

2003-01-30 Thread rf
I want to do some[1] processing after my web
application finishes starting completely, but before
any servlet requests arrive. Are there any listeners
for this situation?

Q1. Does tomcat serve any requests before
ServletContextListener.contextInitialized finishes
execution?
Q2.Is it correct to say that the application has fully
started at the end of 
ServletContextListener.contextInitialized(ServletContextEvent)
Q3. Are the static blocks in the servlet classes run
after ServletContextListener.contextInitialized.

[1] I want to deploy axis services programmatically
after application starts. This is done by an
AdminClient contacting the server. But the problem is
that the server is not yet up! Where do you think
should I do this deployment?

thanks.


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

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




Re: what is catalina?..

2003-01-30 Thread rf

--- Bill Barker [EMAIL PROTECTED] wrote:
 Catalina is also the name of a small island off the
 coast of southern
 California.  I, personally, have no idea why this
 was chosen as a package
 name (I haven't been hanging out here that long). 
 Especially since the
 principal author doesn't live in So. CA.
 

Any idea why jakarta is chosen for
jakarta.apache.org? whats the relation between jakarta
and apache?

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

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




memory problem

2003-01-16 Thread rf
I get OutofMemory with tomcat 4.0.6 and sun's jdk1.3.
From the archives I found this is due to a bug in the
sun's jdk 1.3 JVM, and people suggest to upgrade to
1.4

Does IBM's jdk1.3 too gives the same problem or is it
only the Sun's?

Thanks,
Rf

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

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




HTTP Help

2003-01-16 Thread rf
I am studying HTTP, and I have a question with this
site
http://www.omeda.com/ziff/ewk/ewk.cgi?t=whbackp=hpnav2

Fill the form here and submit. By using the HTTP
debugger http://reitshamer.com/source/hds.html
I found that IE sends two requests when this form is
submitted. First, without the Submit button
'Continue'. It gets a response, it is not a 302 kind
of response. Then it requests the same URL again, this
time with the Continue button. Whats the matter here -
I am not able to understand. Can somebody tell me?

THANKS
Rf

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

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




datewise catalina.out

2003-01-06 Thread rf
While other log files are on a daily basis,
catalina.out is not. Is there any configuration
option, I use 4.0.6?


Thanks,
rf

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

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




get local port

2002-12-17 Thread rf
InetAddress.getLocalHost().getHostAddress()gives the
hostname, how to get the port number too?
The port is 8080 in case of tomcat, but a different
one with other app servers. What is the way to get
this number at runtime?

Thanks
rf

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

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