Chunked data transfer

2003-11-06 Thread Me
Hello people,

I have a question concerning chunked data transfer.

Tomcat doesn't seem to be posting the size of the chunk and an extra CR/LF's?

The user in this message :
http://mikal.org/interests/java/tomcat/archive/view?mesg=54749

Seems to have it but I don't seem to be able to receive them.
As you can see in my example output am I setting the headers as required 
(response.setHeader( Transfer-Encoding, chunked);)

Example output :

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=C07F14B096FFF0F437E5D27EEC264371; Path=/test
Transfer-Encoding: chunked
Content-Type: text/html;charset=ISO-8859-1
Date: Thu, 06 Nov 2003 13:05:32 GMT
Server: Apache Coyote/1.0
Connection: close

test

Pin : 109brChipknip : 49brLogrecords fetched : 2672br
brProcessing time : 27019 milliseconds.


Thanks for any help!

Ikke

Re: Best Tomcat Book, Recommendations???

2003-07-30 Thread Me
Well, everyone else is right. assuming that you have some experience with
http servers in general, you dont need a big fat manual for tomcat. but in
case, you are new to web techs altogether, probably Oreilly Tomcat will give
you a helping hand
good luck

- Original Message - 
From: John Turner [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 5:24 AM
Subject: Re: Best Tomcat Book, Recommendations???



 As a Wrox author, I have to tell you that your overall impression is
 incorrect.  Books are like anything else: sometimes you think they're
 great, sometimes you think they're not.

 To make a sweeping generalization is, in my mind, illogical.

 John

 Tony LaPaso wrote:

  Hi all,
 
  Can some of you recommend a good Tomcat book? In the archives I've read
that
  the Wrox book, Professional Apache Tomcat, is pretty good but my
overall
  impression of Wrox books is that they're generally not worth the paper
  they're printed on.
 
  I know O'Reilly has a relatively new TC book that looks pretty good. I
was
  also hoping to find something that covered TC 5, although this is a
nice to
  have.
 
  Any suggestions?
 
  Thanks.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 



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




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



Tomcat as Windows service on Windows XP

2003-07-25 Thread Me myself
How can i use tomcat as a windows service on XP ?

I cant find any documentation about this in the tomcat documentation.

Thanx.

_
Hotmail snakker ditt språk! 
http://www.hotmail.msn.com/cgi-bin/sbox?rru=dasp/lang.asp - Få Hotmail på 
norsk i dag

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


how 2 start tomcat from ms-dos command prompt without creating a new window ?

2003-07-24 Thread Me myself
i have an question about how to start the tomcat servlet container as
an windows-process from the ms-dos command prompt without getting a new
cmd-window.
Its that when i start my java server with STARTUP it makes a new
command window and starts the new process in this
new window.
i know what in unix one can write nohup before calling the startscript
too not to kill the process if u close ur telnet window,
there has to be a way 2 do this, i hope u understand my question,
thanx
_
MSN Messenger http://www.msn.no/messenger - Den korteste veien mellom deg og 
dine venner

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


Re: how 2 start tomcat from ms-dos command prompt without creating a new window?

2003-07-24 Thread Me myself
Yes, but, would tomcat then start with the windows startup ?

and every time i take down the server for a new deployment, would i then 
need to restart windows all over again for tomcat to start ? That ain't a 
very good solution, is there not any other way i can do this ?

Thanx for ur response.



From: John Turner [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: how 2 start tomcat from ms-dos command prompt without creating 
a new window ?
Date: Thu, 24 Jul 2003 15:26:42 -0400

Install Tomcat as a service.

John

Me myself wrote:

i have an question about how to start the tomcat servlet container as
an windows-process from the ms-dos command prompt without getting a new
cmd-window.
Its that when i start my java server with STARTUP it makes a new
command window and starts the new process in this
new window.
i know what in unix one can write nohup before calling the startscript
too not to kill the process if u close ur telnet window,
there has to be a way 2 do this, i hope u understand my question,
thanx
_
MSN Messenger http://www.msn.no/messenger - Den korteste veien mellom deg 
og dine venner

-
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]
_
Hotmail snakker ditt språk! 
http://www.hotmail.msn.com/cgi-bin/sbox?rru=dasp/lang.asp - Få Hotmail på 
norsk i dag

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


Custom Homepage

2003-07-21 Thread Me
I installed tomcat yesterday and i am totally confused about its config
files. i am trying to change the default homepage so that tomcat calls a
servlet in the preconfigured servet directory instead of the index.jsp page.
Is it possible
   Thanks in advance
   A tomcat newbie


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



Re: Connection Pooling?

2002-07-04 Thread Me

Hey!

You could try to use this connection pool. I've used it and its a decent
good working pool.

www.javaexchange.com/api/com/javaexchange/dbConnectionBroker/
DbConnectionBroker.html

But the site seems to be down at the moment.

Elm


 Hi,
 I want to implement my application with Connection Pooling.

 Tomcat offers supports of a connection pool for JDBC connection, but there
 should be a prerequisite--JDBC driver should provide pooled datasource
 implementation. Is this right?

 The JDBC driver for MySQL database I am using is org.gjt.mm.mysql. The
 driver has the class MysqlDataSource that is a JNDI DataSource for
 Mysql JDBC connection-- only the basic
 implementation of javax.sql.Datasource but not connection pool
 implementation.

 Is this means that I can't  use connection pool with this JDBC driver in
 tomcat?

 Thanks!

 Meichun


 --
 Meichun Li
 Ibiblio.org
 919-962-5646


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




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




Re: documentation location

2002-04-22 Thread Me

Google is your friend!

http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/mail/package-summary.h
tml


EG

- Original Message -
From: Øyvind Vestavik [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 1:36 PM
Subject: documentation location



Where can i find javadoc for this package??
package javax.mail.*

Øyvind

Øyvind Vestavik
Øvre Møllenberggt 44b
7014 Trondheim
[EMAIL PROTECTED]
41422911




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




How to get userRole from Tomcat 3.2.3?

2001-08-13 Thread me

Hi,

I am using JDBCRealm and need a convenient way to get the userRoles of the
user. GetRemoteUser is not the right way. In the source code of JDBCRealm I
found a getuserRoles method - how can I use it in my own servlets? Calling
jedbcRealm = new JDBCRealm() and then jdbcRealm.getuserRoles do not work,
of course...

Best thanks in advance

Thomas W. Richter




tomcat 3.2.2 session already invalidated-serious problem

2001-06-26 Thread Its Me.. Karthik

Hi,
im usuing tomcat 3.2.1..when i invalidate my session im getting error..
this is my piece of code
if(monitor.containsKey(uname)){
HttpSession oldSession = (HttpSession)monitor.get(uname);
oldSession.invalidate();
}
the error is

Internal Servlet Error:javax.servlet.ServletException: setAttribute: Session already invalidated
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
	at karthik._0002fkarthik_0002fpage_00031_0002ejsppage1_jsp_2._jspService(_0002fkarthik_0002fpage_00031_0002ejsppage1_jsp_2.java:129)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
	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.ContextManager.internalService(ContextManager.java:797)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.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.IllegalStateException: setAttribute: Session already invalidated
	at org.apache.tomcat.session.StandardSession.setAttribute(StandardSession.java:721)
	at karthik._0002fkarthik_0002fpage_00031_0002ejsppage1_jsp_2._jspService(_0002fkarthik_0002fpage_00031_0002ejsppage1_jsp_2.java:111)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
	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.ContextManager.internalService(ContextManager.java:797)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.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)
please help me..very urgentkarthikGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


TWIMC: username and password in session and jdbc Realm

2001-05-31 Thread me

Finally it was easy:

JDBCRealm stores the j_username and j_password as session variable and yout
can get it via session.getAttribute either as JSP scriplet or as servlet.
Just store it or get it through the first page after login. Sometimes it is
worth studying the source code.. (here Securitytools.java). I do not know
wether to store it as session variable is a slight security hole..maybe,
but in Intranet environment the benefits of knowing the username and
password - esp. for DB connections which are synchronized with the database
access userids - is beyond security wholes.

Regards
  Thomas




Problem sun.misc solved - but why is authorization=null???? Please help (urgent!)

2001-05-30 Thread me

Hello,

I solved the problem with sun.misc (was an error in directive). But now I
had a strange error. When performing form login via JDBC  and trying to
read out AUTHORIZATION Header the string is NULL. Why? Does form login not
write Authorization in HTTP Header?
I do the following:
%
String aut = request.getHeader(Authorization);
BASE64Decoder decoder = new BASE64Decoder();
if (aut == null) {
  out.println(NOTHING INSIDE);
} else {
  String userInfo = aut.substring(6).trim();
}
%
Can anyone help please??

Thomas





authorization=null?? I use JDBC Realm?

2001-05-30 Thread me

Hi Jan,

does it really work?? I am using Apache 1.3, Tomcat 3.2.2, Win NT 4.0 SP6,
JDBC Realm, the page is under security-constraint in a frame (the first
subpage) and request.getRemoteUser() and request.getAuthType() are working,
giving me FORM and USER. But request.getHeader always returns null. I am
speechless ...

Any further suggestions, please?

Thanks
Thomas




RE: JavaBeans

2001-05-29 Thread me

Hi Kavi,

JavaBeans must be placed in the Web-Inf/classes directory of your webapp as
long as they don't belong to a package and you don't set a classpath. Else
you must create a directory structure similar to your package name, i.e.
package: yourpack.com -- web-inf/classes/com/yourpak.

Hope this helps
   Thomas




How to get Role and Password from JDBC Realm

2001-05-28 Thread me

Hello,

I want to use the provided user_pass and user_role in the
JDBCRealm-Database given in server.xml. What is the most elegant way to do
this? Of cource I would be able to get it via request.getRemoteUser() and
then make a select to the hardcoded database name with provided auth user
and pass like it is given in server.xml. But there must be a better way
since database name, username and driver url is already included in the
Realm section? How to use it? I read the JDBCRealm code but I did not find
out where it gets the connectionUrl a.s.o.

Best Regards
   Thomas




RE:RE: How to get Role and Password from JDBC Realme -using 3.2.2

2001-05-28 Thread me

Thanks Jan,

I have to apologize not to have explained the intended usage:
I need username, userpassword and userrole since I will use it for
DB-Authorization (GRANT to group, and user to tables and so on, connecting
DB with username,userpass). I intend to synchronize username, password and
role with the authDB of the specific Datebase (Interbase and isc4.gdb). Is
there a methode like org.apache.catalina.realm.GenericPrincipal principal
= request.getUserPrincipal() for Tomcat 3.2.2 and is there an elegant
method for attaching password, too?

Thank you for help
   Thomas

Pernica, Jan wrote:
It depends what do you want:
to get user login = request.getRemoteUser()
to whether he/she have a role you can use
request.isUserInRole(myrole)

 Even you are able to get the list of roles
 org.apache.catalina.realm.GenericPrincipal principal =
 request.getUserPrincipal();
 principal.getRoles()

Regards

 Jan

On Monday, May 28, 2001 4:22 PM, [EMAIL PROTECTED]
 [SMTP:[EMAIL PROTECTED]]
 wrote:
  Hello,
 
  I want to use the provided user_pass and user_role in the
  JDBCRealm-Database given in server.xml. What is the most
 elegant way to do
  this? Of cource I would be able to get it via
 request.getRemoteUser() and
  then make a select to the hardcoded database name with provided
 auth user
  and pass like it is given in server.xml. But there must be a
 better way
  since database name, username and driver url is already
 included in the
  Realm section? How to use it? I read the JDBCRealm code but I
 did not find
  out where it gets the connectionUrl a.s.o.
 
  Best Regards
 Thomas