Re: ??? TC 4.0.2 Throws Exceptions ???

2002-03-02 Thread Remy Maucherat

> Hi All,
>
> TC 4.0.2 is throwing an exception on this little
> servlet. Let me emphasize -- *Tomcat* is throwing the
> exception, not the sevlet. I don't believe that TC
> should ever throw an exception, unless there is a bug
> in TC, is that correct?

If you weren't running JDK 1.4, this exception wouldn't happen. So I'm not
convinced yet it's a Tomcat bug. Maybe; maybe not.
FYI, it's already been filed in bugzilla.

> If you run the servlet below you'll see this exception
> thrown by TC:
>
> java.lang.IllegalStateException: Current state =
> FLUSHED, new state = CODING_END
> at
>
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.ja
va:933)
> at
> java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
> at
>
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356)
> at
> sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
> at
> sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
> at
> java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
> at
> java.io.PrintWriter.close(PrintWriter.java:137)
> at
>
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:
482)
> at
>
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBa
se.java:236)
> at
>
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpRespo
nseImpl.java:288)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1039)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
> at java.lang.Thread.run(Thread.java:536)
>
>
> Here's the servlet...if you comment out the close()
> the exception goes away.
>
>
> import java.io.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
>
> public class Tester extends HttpServlet {
>public void doGet(HttpServletRequest req,
> HttpServletResponse res) throws ServletException,
> IOException {
>   res.setContentType("text/plain");
>   PrintWriter out = res.getWriter();
>
>   out.println("Hello #1");
>   out.println("Hello #2");
>   out.println("Hello #3");
>   out.println("Hello #4");
>
>   System.out.println(res.isCommitted());
>   res.sendError(res.SC_REQUEST_ENTITY_TOO_LARGE,
> "sorry dude...");
>   out.close();
>
>} // doGet()
>
> } // Tester
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




??? Where to post TC Bugs ???

2002-03-02 Thread Tony LaPaso

is there a place we should post bugs TC bugs?



__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




??? TC 4.0.2 Throws Exceptions ???

2002-03-02 Thread Tony LaPaso

Hi All,

TC 4.0.2 is throwing an exception on this little
servlet. Let me emphasize -- *Tomcat* is throwing the
exception, not the sevlet. I don't believe that TC
should ever throw an exception, unless there is a bug
in TC, is that correct?

If you run the servlet below you'll see this exception
thrown by TC:

java.lang.IllegalStateException: Current state =
FLUSHED, new state = CODING_END
at
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933)
at
java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
at
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356)
at
sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
at
sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
at
java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
at
java.io.PrintWriter.close(PrintWriter.java:137)
at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:482)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:288)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1039)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)


Here's the servlet...if you comment out the close()
the exception goes away.


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


public class Tester extends HttpServlet {
   public void doGet(HttpServletRequest req,
HttpServletResponse res) throws ServletException,
IOException {
  res.setContentType("text/plain");
  PrintWriter out = res.getWriter();

  out.println("Hello #1");
  out.println("Hello #2");
  out.println("Hello #3");
  out.println("Hello #4");

  System.out.println(res.isCommitted());
  res.sendError(res.SC_REQUEST_ENTITY_TOO_LARGE,
"sorry dude...");
  out.close();

   } // doGet()

} // Tester



__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




TEST -- IGNORE

2002-03-02 Thread Tony LaPaso

Blah Blah


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: URL Problem with blanks in names

2002-03-02 Thread WebMaster

Just use cascading ASCII (blank = 20):
like http://www.testside.de/test%20this%20tile.html

- Original Message -
From: "Zsolt Koppany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 6:22 PM
Subject: URL Problem with blanks in names


> Hi,
>
> how can I create a link ( directory or in the filename?
>
> I mean for example: Open
>
> I tried to create the link using URLEncoder.encode(..) but the created
link
> didn't work either.
>
> Zsolt
>
> --
> Zsolt Koppany
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: SSI in TC3.3?

2002-03-02 Thread rsequeira







"Garrett Smith" <[EMAIL PROTECTED]> on 03/02/2002 03:23:53 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "Tomcat Users List" <[EMAIL PROTECTED]>
cc:

Subject:  SSI in TC3.3?

Does Tomcat 3.3 support server-side includes for static content?
Yes

I know that JSPs support including other JSPs or other static html files,
but I imagine that this is a relatively expensive process, since JSPs are
compiled and executed.
You can have two types of includes in JSP.
1) static includes (using <%@ include file="/filename" %>. In this
the named file is included before the JSP is compiled into a servlet. The
files are combined into a single source and then translated into a servlet.
This happens just once (and ofcourse, again, when the including jsp is
modified). Static includes are faster than dynamic includes. This is bcoz
of preprocessing of the static include during page translation and
compilation to a servlet. Recommended for page headers, footers, etc. which
do not change.
2) dynamic includes (using ). In this the named file is included at every request. ie.
everytime a request is made to the servlet.


Thanks,
Garrett


RS

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Can't deploy my war file

2002-03-02 Thread K Br

I am using TC4.0.2 standalone.

I tried deploying my war file using two methods
described in tomcat 4.0.2 documenttion but was
unsuccessful both ways:

(a) "drop in the war file in %CATALINA_HOME%\webapps
directory and tomcat will automatically deploy it."

   I dropped the war file in the webapps firectory and restarted tomcat. It did not 
unpack the war file or deploy it.

(b) "use manager application"

The URL

  http://localhost/manager/install?path=/Book&war=jar:file:/tc/webapps/Book.war

(where /tc is my %CATALINA_HOME%) causes an internal error:

java.lang.SecurityException: Servlet of class 
org.apache.catalina.servlets.ManagerServlet is privileged and cannot be loaded by this 
web application
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:836)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

Please help.

Kobe



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




SSI in TC3.3?

2002-03-02 Thread Garrett Smith

Does Tomcat 3.3 support server-side includes for static content?

I know that JSPs support including other JSPs or other static html files,
but I imagine that this is a relatively expensive process, since JSPs are
compiled and executed.

Thanks,
Garrett


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Fw: Use manager with different hosts

2002-03-02 Thread Philipp Sumi

Hello

...I recently sent my first post to this mailing list and did wonder why I
didn't get a copy of it... First, I thought that the server probably
recognizes me as the sender and doesn't send me the question I already know,
but I found it a bit strange (also because I'm also on the Velocity list
which doesn't behave so). However, there was also no response to my mail and
so I decided to send it again. If you got it twice, I would be glad if
somebody could tell me (before I start bugging the admin because I think
something's wrong :-)

Thank you

Philipp





> Hello
>
>
> My first post on this list - hello :-)
>
> I can't figure out how I can use the manager app savely with various
virtual
> hosts. Of course, I can set the manager for every host, but then every
user
> would be able to shut down contexts of his own as well as of other hosts,
if
> he knows any (www.myhost.com/manager and www.myenemyshost.com/manager use
> both tomcat-user.xml). A workaround would be to name the path that calls
the
> manager app differently for every host (www.myhost.com/manager234), but I
> guess there must be a (much) better solution
>
> Thanks for your advice
>
> Philipp
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Configuration in a hosted environment

2002-03-02 Thread Garrett Smith

I'm developing an app on my personal host using TC3.3.  Setup and
configuration are relatively easy because I have root access.

Eventually, however, I want to create a WAR file and move the production app
to a hosting service for the usual reason: reliability.

How is configuration typically handled in this circumstance?  I'm assuming I
will only have minimal access to the configuration files, if any access at
all, on a shared server.

For example, I'm using HTTP basic authentication to restrict access to some
administration JSPs and servlets.  This, however, requires apps.xml to point
to myapp-users.xml.  On a shared server I'll want access to myapp-users.xml.
Will I get it?

Are there any other "gotchas" in the transition to a shared host?

Thanks,
Garrett



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: [INIMSS] Problem with IP Alias

2002-03-02 Thread rsequeira


see intermixed




Dino Cherian K <[EMAIL PROTECTED]> on 03/02/2002 04:36:10 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:

Subject:  [INIMSS] Problem with IP Alias

Hi

I am trying to configure a webserver running apache-1.3.19-5,
tomcat-3.2.1-1
and jdk-1.3.1_01-fcs  on  Redhat Linux 7.1 (glibc-2.2.2-10).

The scenario is that the tomcat is configured and running on the default
server perfectly. Recently I tried to add a domain with a seperate IP. I
did
the following things.
 **(1) I added the new IP (NEW_IP) in the network configuration as
IP Alias
of the one and only ethernet card in the server.
 **(2) I added the below lines in the apache's httpd.conf.

   
   ServerName new-domain.com
   ServerAlias www.new-domain.com
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot /usr/www/new-domain
   Options Includes IncludesNOEXEC MultiViews Indexes
FollowSymlinks
SymLinksIfOwnerMatch
   JkMount /servlet/* ajp13
   JkMount /*.jsp ajp13
   
   AllowOverride None
   deny from all
   
   ErrorLog logs/new-domain-error_log
   CustomLog logs/new-domain_log common
   


 **(3) I added the below lines in the tomcat's server.xml.









 **(4) Then I copied a test.jsp and test.class into
/usr/www/new-domain and
/usr/www/new-domain/servlet respectively.

Unpacked classes you wish to be visible to a single webapp are placed under
/WEB-INF/classes folder and packed classes under
/WEB-INF/lib folder.

 **(5) Now I restarted the services - network, httpd and tomcat.

Then I pointed my browser to http://new-domain.com/test.jsp
It worked fine. Then to http://new-domain.com/servlet/test . This didn't
work. I gave the error message
   Not Found (404)
   Original request: /servlet/test
   Not found request: /servlet/test

Do you have a test.class in the /usr/www/new-domain/WEB-INF/classes folder
(assuming that there isn't a package statement in the source code)?

Then by chance I pointed browser to
http://new-domain.com/servlet/oldServlet
and it worked fine. Here the oldServlet was actually one servlet in the
servlet folder of the default server.

What should I do to get my servlets being served from the new-domain's
servlet folder itself.

Please help me ASAP.

Thanks

Dino

RS
_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




learn /guide with mod_webapp best place to look

2002-03-02 Thread kuma

Hi there i have just installed and configured Aapache HTTP Server and 
hooked it up tp Tomcat-4.0.2 Plus Php . Thus where is the best place to 
pick-up mod_webapp as i am aware it it simpliar to webapp in tomcat.

Cheers Chcuk Amadi
Systems Programmer


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: TOMCAT 4.0.2 server crash

2002-03-02 Thread Keith Ng

Ok this is a little off topic but i reli need help on this..

the odbc-jdbc bridge has crashed my tomcat more den 1 time and i need to ask
if anyone here uses any type 3/4 drivers and finds it very stable?(like not
crashing tomcat) and has very good perfromance? And btw... i noe for applets
u definately have to use type 3 drivers, but for web applications(tomcat and
jsp/servlets) which one is recommended ? 3 or 4? Im currently using
ThinAccess 2.3 right now, and its type 3 driver , i used it for applets, but
aint very sure if its good for jsp/servlets connections

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:23 PM
To: Tomcat Users List
Subject: RE: TOMCAT 4.0.2 server crash


Microsoft licensed the Merant msSQL JDBC driver, it´s downloadable for
free from the Microsoft website.

Last time I checked it was quite good.

hope it helps
[EMAIL PROTECTED]


> -Original Message-
> From: Keith Ng [mailto:[EMAIL PROTECTED]]
> Sent: 1. mars 2002 15:12
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Subject: RE: TOMCAT 4.0.2 server crash
>
>
>
> Oooh I didnt noe tat matters. So wat about other drivers?
> which is thread
> safe and which is not?
> I also realise i do have many problems regarding database access.
> Im using MSSQL 2000 btw. whcih driver do u recommend?
>
>
> -Original Message-
> From: Randy Layman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 01, 2002 7:43 PM
> To: 'Tomcat Users List'
> Subject: RE: TOMCAT 4.0.2 server crash
>
>
>
>   Stop using the JDBC-ODBC bridge.  Its not thread safe
> and will crash
> Tomcat (or any other JVM for that matter) that attempts
> concurrent database
> access.
>
>   Randy
>
> > -Original Message-
> > From: Keith Ng [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 01, 2002 4:19 AM
> > To: Tomcat Users List
> > Subject: TOMCAT 4.0.2 server crash
> >
> >
> > Hi
> >
> > I set up my tomcat server from home and then went to school
> > to try access.
> > for a while it was ok, but after repeatly doing many database
> > queries and
> > processing, suddenly i wasnt able to access the server. It
> returned a
> > gateway timeout error. I den went home just now and realise
> > the Tomcat does
> > window is gone. I went to the log and track the following.
> >
> >
> > ACCESS LOG
> > ===
> > 153.20.95.66 - - [01/Mar/2002:13:43:45 8000] "GET
> > /ps/jscripts/validateRegister.js HTTP/1.1" 304 -
> > 153.20.95.66 - - [01/Mar/2002:13:43:46 8000] "GET
> > /ps/jscripts/validateAdvSearch.js HTTP/1.1" 304 -
> > //153.20.95.66 is my school's pc ip. its the last GET request
> > 127.0.0.1 - - [01/Mar/2002:16:11:07 8000] "GET
> > /ps/css/PSCSS.css HTTP/1.1"
> > 304 -
> > ==
> >
> > LOG
> > 2002-03-01 13:42:40 jsp: init
> > 2002-03-01 13:42:40 jsp: init
> > 2002-03-01 13:43:27 jsp: init
> > 2002-03-01 13:43:29 jsp: init
> > 2002-03-01 13:43:45 jsp: init
> >
> > after this supposedly there is no more request from school pc
> > i went home and found tomcat server dos window gone
> >
> > as u can see, there is no clear wat has happened at all. Is
> > there any other
> > logs i have missed regarding the auto shutdown of tomcat? Can
> > anyone tell me
> > wat could have happened to cause tomcat to auto shutdown? Thanks...
> >
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe:

> For additional commands: 
> Troubles with the list: 
>

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: SSL Client authentication with standalone Tomcat

2002-03-02 Thread Brian Palmer

Wolfgang Stein <[EMAIL PROTECTED]> writes:

> As far as i understand the client-auth handshake,
> the server sends a list of trusted CAs to the client.
> 
> This list is take from
> \lib\security\cacerts
> So you have to import your CA-cert into that file,
> instead of your .keystore .
> There is no need to import the client cert into cacerts or keystore.

First, sorry for not responding earlier to this thread. My laptop died
and stopped my forward momentum for a few days.

This solved my problem; I had thought I needed to do something like
that, but hadn't known how, exactly. Thanks a lot!

-- 
Brian Palmer
"Whoever fights monsters should see to it that in the process he does
not become a monster. And when you look long into an abyss, the abyss
also looks into you"  - Nietzsche


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Modify Directory Listing

2002-03-02 Thread Christian Fuchs


There seems to be  no solution, because the tags are hardcoded in the 
DefaultServlet .


Christian Fuchs wrote:

> Hi,
>
> we want to add some meta tags( like noindex nofollow)  in the head 
> section of the directory listing.
> The reason is we want to prevent our search engine from indexing the 
> directory listing itself.
> In apache you can specify a template for this purpose.
> Is there something similar in tomcat???
>
>
> Thanks
> Christian Fuchs
>
>
>
>
>




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




[INIMSS] Problem with IP Alias

2002-03-02 Thread Dino Cherian K

Hi

I am trying to configure a webserver running apache-1.3.19-5, tomcat-3.2.1-1 
and jdk-1.3.1_01-fcs  on  Redhat Linux 7.1 (glibc-2.2.2-10).

The scenario is that the tomcat is configured and running on the default 
server perfectly. Recently I tried to add a domain with a seperate IP. I did 
the following things.
 ** (1) I added the new IP (NEW_IP) in the network configuration as IP Alias 
of the one and only ethernet card in the server.
 ** (2) I added the below lines in the apache's httpd.conf.


ServerName new-domain.com
ServerAlias www.new-domain.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/www/new-domain
Options Includes IncludesNOEXEC MultiViews Indexes FollowSymlinks 
SymLinksIfOwnerMatch
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13

AllowOverride None
deny from all

ErrorLog logs/new-domain-error_log
CustomLog logs/new-domain_log common



 ** (3) I added the below lines in the tomcat's server.xml.









 ** (4) Then I copied a test.jsp and test.class into /usr/www/new-domain and 
/usr/www/new-domain/servlet respectively.

 ** (5) Now I restarted the services - network, httpd and tomcat.

Then I pointed my browser to http://new-domain.com/test.jsp
It worked fine. Then to http://new-domain.com/servlet/test . This didn't 
work. I gave the error message 
Not Found (404)
Original request: /servlet/test
Not found request: /servlet/test

Then by chance I pointed browser to http://new-domain.com/servlet/oldServlet 
and it worked fine. Here the oldServlet was actually one servlet in the 
servlet folder of the default server.

What should I do to get my servlets being served from the new-domain's 
servlet folder itself.

Please help me ASAP.

Thanks

Dino



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: