Why request.getRemoteUser() returns NULL ?

2004-08-31 Thread Aris Javier
i found this in jguru...
 
 
 
it stated there that if i do this in server.xml, request.getRemoteUser()
will not equal to NULL.. ?
 
i did, but request.getRemoteUser() returns NULL 
 
please, anybody.. do you know how to get request.getRemoteUser() to
work?
 
i need it badly! please!
 
aris
 
 


Re: Access zu an jdbc Datasource

2004-08-31 Thread Robert Einsle
Hy,
It seems to work, very much Thanks.
Greetings
\Robby
D'Alessandro, Arthur schrieb:
Try a resourcelink in your context for the webapp.
Eg.

path="/yourwebappname" privileged="false" reloadable="true"
swallowOutput="true">
 
type="javax.sql.DataSource"/>
 

-Original Message-
From: Robert Einsle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 9:02 AM
To: Tomcat Users List
Subject: Access zu an jdbc Datasource

Hello List,
I'm trying zu connect to an JDBC Datasource connecting to an Postgres 
Database. But it will not work.

I tryed it link the Documentation, adding the Datasource under 
GlobalNamingResources, and add the another in web.xml.

In ProgrammSource:
--- cut ---
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/postgres");
Connection conn = ds.getConnection();
--- cut ---
The another is link the description in the JDBC Howto.
While ds.getConnection() i recieved an Exception, cannot connect to 
Datasource name ''.

Searchin a little bit, i cannot find the Environment for the 
Postgresdatabasesource.

Does anyone has an Idea / Howto i can lokk about my Problem??
Thanks for Help
\Robby
 


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


Re: [ANN] Apache Jakarta Tomcat 5.5.0 Released

2004-08-31 Thread Nikola Milutinovic
Yoav Shapira wrote:
The Tomcat Team announces the immediate availability of Apache Jakarta Tomcat
5.5.0. 
Is there any story on the version number "hyper-jump-to-warp-speed"? 5.0 
is current, I can see links to 5.1. Why have you jumped to 5.5? Because 
of JDK 1.5?

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


Re: How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread Kimmy Lin
What I really meant was to write a parameter "xmldoc=..."
into the outputstream of the HttpURLConnection like the following to make it
a Post.

OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(params);

Not sure whether there is any limit this way though.

But Request#getInputStream() does provide the request body w/o the header.

kimmy

- Original Message - 
From: "QM" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 6:27 PM
Subject: Re: How do I read only the XML data in doPost(req,res)?


> On Tue, Aug 31, 2004 at 06:15:59PM -0400, Kimmy Lin wrote:
> : http://URL?xmldoc=...
> : request.getParameter("xmldoc");
>
> The OP may run into some limits with that, unless those are very small
> XML docs. =)
>
> Doesn't Request#getInputStream() provide the body? -or does it get the
> whole request, headers and all?
>
> -QM
>
> -- 
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.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]



Re: [ANN] Apache Jakarta Tomcat 5.5.0 Released

2004-08-31 Thread guo yingshou
Great! 

But I cann't build it with the downloaded build.xml on
jdk5 beta2. There are some generics related problems
with dbcp compilation. Use jdk1.4_05 to build is ok
but I have to switch to jdk5 to run it.

We run 4 instances of tomcat-5-24 in a cluster
environment in our production system. We met some
problems and looking forward to a better release. 

Thanks for your hard work!

Yingshou


 --- Yoav Shapira <[EMAIL PROTECTED]> 的正文:
> The Tomcat Team announces the immediate availability
> of Apache Jakarta Tomcat
> 5.5.0. 
> 
> This is the first release of the new Tomcat 5.5
> branch, and as such it is not
> yet stable. We expect significant additional
> changes, including possible
> changes to packaging, dependencies, and Tomcat
> internal APIs, before the first
> 5.5 stable release is made. 
> 
> Please note that we are still in the process of
> updating documentation for this
> branch. Of special note is the JRE 5.0 requirement:
> running with JRE 1.4 is
> also possible, and instructions are provided with
> the distribution. 
> 
> Release notes:
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES
> 
> 
> Please refer to the change log for the list of
> changes:
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html
> 
> 
> Downloads: Binaries:
> http://jakarta.apache.org/site/binindex.cgi Sources:
> http://jakarta.apache.org/site/sourceindex.cgi 
> 
> The Apache Jakarta Tomcat Team 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  

_
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

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



UTF-8 Encoding Issue Since 5.0.27 ( gun in my mouth )

2004-08-31 Thread Rick
Since 5.0.27, pretty much all of my UTF-8 i8 code seems to be messed up. 

The problem seems to have been caused by whatever fix was created for issue
--
ServletResponse.setContentType sets response encoding after getWriter was
called (Bugtraq 5062838) (luehe) 
--

Now it seems almost impossible to properly set the encoding type of some of
my JSPs and all of my Servlets that return UTF-8 XML data.

As an example, my login page allows the user to switch to Japanese text.
Text data is read with a ResourceBundle, which reads from a UTF-8 encoded
.properties file.

If the encoding of the .jsp page itself is in ASCII, then I can't get the
characters to show up at all any more.
I have to save the .jsp page as UTF-8.  
Added "set JAVA_OPTS=-Dfile.encoding=UTF-8" to my catalina.bat file

Then, If I try to set a character set in my page header, it messes up.

This works in some cases...
<%@ page language="java" import="java.util.*" contentType="text/html" %>
response.getCharacterEncoding() = "ISO-8859-1"

The really scary part is that with no meta or charset actually set, that the
browser(IE) correctly changes to UTF-8 and displays the content fine.   But
if I change the actual file encoding of the .jsp page from UTF-8 back to
ASCII. Then IE does not change to UTF-8 and the page is messed up again.
Why does the actual encoding of the .jsp file itself dictate the response
sent to the client?

It appears that the actual encoding of the source file someone how gets past
along and then I'm unable to alter the character encoding, and if I try, it
just causes everything to go to hell.


This use to work before 5.0.27, but now doesn't, even though all data and
pages are encoded in UTF-8.
<%@ page language="java" import="java.util.*" contentType="text/html;
charset=UTF-8" %>
response.getCharacterEncoding() = "UTF-8"


Before 5.0.27, all I had to do to get my output in UTF-8 was ...
 contentType="text/html; charset=UTF-8"

Now I have to mess with the actual .jsp file page encodings and still can't
get most to work properly as well as none of my servlets will return correct
UTF-8 data.  

I have tried setting "pageEncoding" in the page tag as well with no luck.


Thanks for anyone's insight or help on this, its never fun to find out that
something that had been working quite solid , up and blows up for no good
reason.

Current dev machine is on windows xp by the way, vanilla install of Tomcat
5.0.28.
I will be setting this up on a Linux box for more testing shortly.


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



[ANN] Apache Jakarta Tomcat 5.5.0 Released

2004-08-31 Thread Yoav Shapira
The Tomcat Team announces the immediate availability of Apache Jakarta Tomcat
5.5.0. 

This is the first release of the new Tomcat 5.5 branch, and as such it is not
yet stable. We expect significant additional changes, including possible
changes to packaging, dependencies, and Tomcat internal APIs, before the first
5.5 stable release is made. 

Please note that we are still in the process of updating documentation for this
branch. Of special note is the JRE 5.0 requirement: running with JRE 1.4 is
also possible, and instructions are provided with the distribution. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi Sources:
http://jakarta.apache.org/site/sourceindex.cgi 

The Apache Jakarta Tomcat Team 

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



Re: Tomcat Holding Database Open??????

2004-08-31 Thread Joel
On Tue, 31 Aug 2004 09:23:56 -0400
"Michael McQuade" <[EMAIL PROTECTED]> wrote

> Please forgive me,  I dont even understand a lot of these responses,   Im a
> mainframe Cobol coder here,   not a Java person,

Welcome to Tomcat and Java.

> but Im using a Converter
> that converts Cobol to Java

Fun days!

> Anyways,  I am pretty sure it has to be
> Tomcat doing this, 

(or the converter, or some mismatch between the real and expected CoBOL,
Java, and Tomcat environments)

> because my Application ran just fine,   using MySQL,
> and JDBC driver in a Web Server called OmniCron  in CGI format.

OmniHTTPd by Omnicron (www.omnicron.ca)? (I don't know anything about
them, just did a search on Google and they came up.)

So you are running in a MSWindows environment?

> The only thing different now is,  Im trying to run SERVLETS 

There's one difference.

> using
> Apache/Tomcat. 

There's two more differences.

> At the Start of  each Servlet I do  a connect to
> database
> CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan'
> 
> DRIVER 'com.mysql.jdbc.Driver'
> 
> Then do my processing and then do a DISCONNECT ALL..
> 
> It just does not make sense I can connect ONE TIME only when running a
> Servlet and have to back out of app,  STOP,  START,

Do you mean stopping and starting Tomcat here? Or the browswer instance?
Or the database?

> and go back in,   to
> get another one time connection.the 08002, connection name in use,
> to me,   points to Tomcat ..

08002?

> But as I said,  Im just a baby in diapers to this world.. 

Me too.

> I believe its
> something in one of the .xml files,   but I have no idea.
> 
> As for Connection Pooling,is that for a system taking large numbers of
> hits on it? 

Well, that's what the target would be. The idea is to re-use connections
so you don't spend as much time tearing down the Java interpreter and
rebuilding it. CGI will start a new Java process for every connection,
and when the connection is done tear it down.

> Right now, Im just one guy trying to make one connection
> work.

So you might want to check that you haven't enabled pooling accidentally.

> Thank you for being patient.
> 
> Mike
> 
> 
> 
> 
> 
> " <[EMAIL PROTECTED]>
> 
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 31, 2004 8:55 AM
> Subject: Re: Tomcat Holding Database Open??
> 
> 
> > On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
> > : It appears to me, and god knows Im REAL knew to this world,  that Tomcat
> is somehow holding my database open..  not releasing it on
> DISCONNECT.
> > :
> > : DOES anyone have any idea, I have been at this for a week, day and
> night, to no avail..  Im desperate for some sound guidance.
> >
> > A couple of questions:
> > are you explicitly closing those DB connections?
> > are you pooling your connections?
> >
> > -QM
> >
> > -- 
> >
> > software  -- http://www.brandxdev.net
> > tech news -- http://www.RoarNetworX.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]
> 


-- 
Joel <[EMAIL PROTECTED]>


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



Re: website going down

2004-08-31 Thread Michael McQuade
Could the person having problems with Tomcat and MySql contact me at
[EMAIL PROTECTED]  I also am having Tomcat/MySql/JDBC problems,
maybe we can talk some.

Thank You
Mike


- Original Message - 
From: "QM" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 7:47 PM
Subject: Re: website going down


> On Tue, Aug 31, 2004 at 06:12:19PM -0500, Stephen Charles Huey wrote:
> : In other words, as far as I can see, Tomcat must be trying to go to
> : MySQL to pop up that basic authentication box, but the box never pops up
> : because I suppose MySQL is hanging for some reason.  Generally all we
> : have to do is restart Tomcat to get everything back to normal.  My
> : question is, do you know of any reason why MySQL would be doing this?
>
> Timeout problems, perhaps?  Search the archives: this topic comes up
> frequently, especially with MySQL.  There are params you can put in the
> JDBC connection to specify a regular keepalive signal, a DB-level ping
> to be sent from the app.
>
> Barring that, you could write one yourself: mix threads with TimerTask
> and a simple call via your DAOs or whatever.
>
> -QM
>
> -- 
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.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]



Re: Can I start tomcat 5.0.28 as a non root user at Linux?

2004-08-31 Thread Yi Wang
yes you can and you should not start tomcat as root user (for security reason)

On Wed, 1 Sep 2004 07:58:57 +0800, Big Chiz <[EMAIL PROTECTED]> wrote:
> checkout jsvc.tar.gz on the tomcat/bin
> 
> 
> 
> On Tue, 31 Aug 2004 17:28:24 -0500, QM <[EMAIL PROTECTED]> wrote:
> > On Tue, Aug 31, 2004 at 04:35:33PM -0500, Vic wrote:
> > : I do not know if you can, but I can.
> >
> > I can't.
> > -oh wait, hold on...
> > yes, yes I can.  =)
> >
> > To the OP: check the docs, try it out, and steer clear of privileged
> > ports.
> >
> > -QM
> >
> > --
> >
> > software  -- http://www.brandxdev.net
> > tech news -- http://www.RoarNetworX.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]



Re: Can I start tomcat 5.0.28 as a non root user at Linux?

2004-08-31 Thread Big Chiz
checkout jsvc.tar.gz on the tomcat/bin

On Tue, 31 Aug 2004 17:28:24 -0500, QM <[EMAIL PROTECTED]> wrote:
> On Tue, Aug 31, 2004 at 04:35:33PM -0500, Vic wrote:
> : I do not know if you can, but I can.
> 
> I can't.
> -oh wait, hold on...
> yes, yes I can.  =)
> 
> To the OP: check the docs, try it out, and steer clear of privileged
> ports.
> 
> -QM
> 
> --
> 
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.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]



Re: Tomcat 5.0.27 Set Up Problem

2004-08-31 Thread Big Chiz
if ur using winblows, hehehe, checkout the service.bat, the cmd would
be something like service.bat --install tomcat5 or something

On Tue, 31 Aug 2004 22:31:11 +0100, Nelson, Jerry W, Contractor 146CF,
SCB <[EMAIL PROTECTED]> wrote:
> What if you didn't use the installer?  How can it be setup manually?
> 
> //SIGNED//
> 
> Jerry Nelson
> 
> 
> -Original Message-
> From: John Villar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 31, 2004 12:06 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 5.0.27 Set Up Problem
> 
> The tomcat installer does it right away, you just install it and it even
> has enabled the autostart mode
> 
> Nelson, Jerry W, Contractor 146CF, SCB escribió:
> 
> >With your suggestion in item 3, how do you run tomcat as a service?
> >
> >//SIGNED//
> >
> >Jerry Nelson
> >
> >
> >-Original Message-
> >From: John Villar [mailto:[EMAIL PROTECTED]
> >Sent: Monday, August 30, 2004 9:49 AM
> >To: Tomcat Users List
> >Subject: Re: Tomcat 5.0.27 Set Up Problem
> >
> >
> >Probably, your problem isn't tomcat configuration are you sure
> >you're starting it up? (at least, ran the batch file you modified,
> >however, the service approach is much better)
> >Reread my previous email, it seems like you haven't read all the bits i
> >did include lemme include them here, separately
> >
> >1) Your freshly installed tomcat 5.0.27 (Update to 5.0.28) is prepared
> >to function right out-of-the-box
> >2) Why do you want to enable the invoker servlet? tomcat can
> >function properly without it.
> >3) It's much better to run Tomcat as a service on WindowsXP/W2K
> >4) If you haven't a proxy server configured, you don't have to check
> >that box.
> >
> >Caroline Jen escribió:
> >
> >
> >
> >><>But, the Tomcat is not configured properly!! I was
> >>able to start the server. Nonetheless, when I typed
> >>http://localhost:8080 in the Windows XP browser's
> >>address bar, I got "HTTP Status 404"!!!
> >>
> >>
> >
> >
> >
> >
> 
> --
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.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]



Re: website going down

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 06:12:19PM -0500, Stephen Charles Huey wrote:
: In other words, as far as I can see, Tomcat must be trying to go to
: MySQL to pop up that basic authentication box, but the box never pops up
: because I suppose MySQL is hanging for some reason.  Generally all we
: have to do is restart Tomcat to get everything back to normal.  My
: question is, do you know of any reason why MySQL would be doing this?  

Timeout problems, perhaps?  Search the archives: this topic comes up
frequently, especially with MySQL.  There are params you can put in the
JDBC connection to specify a regular keepalive signal, a DB-level ping
to be sent from the app.

Barring that, you could write one yourself: mix threads with TimerTask
and a simple call via your DAOs or whatever.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



website going down

2004-08-31 Thread Stephen Charles Huey
We had a problem where our website would hang because Tomcat couldn't
access the main database over DSN (on another machine), and it was a
problem with our vendor's ODBC driver, so we moved to the Linux version
(which was more stable).  We had created a Watchdog program that would
call a JSP with simple database access, and it would restart Tomcat
whenever the problem occurred (although that sometimes wasn't
sufficient--sometimes we would also have to go in and manually restart
the ODBC driver).  Anyway, our problems have lightened considerably, and
consequently our watchdog program doesn't have to do much, although from
once in a while it does restart Tomcat for us.  

However, we are now seeing a new problem.  The watchdog program will
keep going along as if there's no problem, and yet the website will be
hanging!  Because there was a problem in the early days of development
with using the main database for the basic authentication used to enter
our website, we set up a MySQL database on the same machine as Tomcat
and have it access that small database locally by telling it to use
JDBCRealm in our server.xml file.  The watchdog program doesn't access a
secure JSP, so it doesn't really have to log in.  

In other words, as far as I can see, Tomcat must be trying to go to
MySQL to pop up that basic authentication box, but the box never pops up
because I suppose MySQL is hanging for some reason.  Generally all we
have to do is restart Tomcat to get everything back to normal.  My
question is, do you know of any reason why MySQL would be doing this?  

Thanks,
Stephen

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



Re: How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread John Gentilin
Try this, override service and not doGet / doPost
where the code is
public void service( ServletRequest request, ServletResponse response ) 
throws javax.servlet.ServletException, java.io.IOException
{
 Document doc;
 // Create an InputStream to read in the XML data to be parsed
 ServletInputStream is = request.getInputStream();
 doc = m_DocBuilder.parse(is);
}

Where m_DocBuilder created in init()
   m_DocFactory = DocumentBuilderFactory.newInstance();
   m_DocBuilder = m_DocFactory.newDocumentBuilder();
declared as
 private static DocumentBuilderFactory m_DocFactory = null;
 private static DocumentBuilder m_DocBuilder = null;
HTH
John G
QM wrote:
On Tue, Aug 31, 2004 at 06:15:59PM -0400, Kimmy Lin wrote:
: http://URL?xmldoc=...
: request.getParameter("xmldoc");
The OP may run into some limits with that, unless those are very small
XML docs. =)
Doesn't Request#getInputStream() provide the body? -or does it get the
whole request, headers and all?
-QM
 


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


Re: Can I start tomcat 5.0.28 as a non root user at Linux?

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 04:35:33PM -0500, Vic wrote:
: I do not know if you can, but I can.

I can't.
-oh wait, hold on...
yes, yes I can.  =)

To the OP: check the docs, try it out, and steer clear of privileged
ports.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 06:15:59PM -0400, Kimmy Lin wrote:
: http://URL?xmldoc=...
: request.getParameter("xmldoc");

The OP may run into some limits with that, unless those are very small
XML docs. =)

Doesn't Request#getInputStream() provide the body? -or does it get the
whole request, headers and all?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread Kimmy Lin
Do you have control over how the request is composed?
If so, you can put the XML data in a parameter say "xmldoc"
and the equivalent GET request will look like the following

http://URL?xmldoc=...

("<" and ">" not escaped)

Then in your program do

request.getParameter("xmldoc");

to get the xml data.

kimmy

- Original Message - 
From: "tom ly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 3:16 PM
Subject: How do I read only the XML data in doPost(req,res)?


> I'm receiving a HTTP POST request containg XML data and want to process
the data in the doPost method of my servlet.  When I do
request.getContentLength(), it gives the length of the entire request
including the HTTP header etc, but I only want the XML portion of it.  I
can't find any Java methods which will return only the data part of the
request.  How can I do this?
>
> Thanks,
> Tom
>
>
>
>
> -
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.


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



RE: Reading Servlet OutputStream

2004-08-31 Thread Nitin Mulimani
The issue being how do I write to PipedOutputStream().
These are the lines I'm thinking ..

PipedOutputSteam out = new PipedOutputStream();
out.write(ServletOutputStream.read());

But I do not know a way to read data from an output stream

--- Nitin
-Original Message-
From: Nandish Rudra [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 9:40 AM
To: 'Tomcat Users List'
Subject: RE: Reading Servlet OutputStream

Here is something u guys can do.

PipedOutputStream and PipedInputStream to redirect the output stream and
read the data into a buffer and then do with it what u please.

regards
NR


-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:48 PM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream


I am not using JSP, I am using Tapestry, any other ideas on how to
accomplish this?

James

- Original Message - 
From: "John Villar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 1:31 PM
Subject: Re: Reading Servlet OutputStream


> certainly my error the method is from the JSP API JspContext
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
> I ran into a problem that needed writing a zip file from the JSP page
>
> sorry for that one, however, with that method you could do what you're
> trying
>
> Nitin Mulimani escribió:
>
> >Hi John,
> >
> >I am checking the Servlet2.3 api, and do not find a pushBody() method in
HttpServletResponse.
> >
> >-- Nitin
> >-Original Message-
> >From: John Villar [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 31, 2004 8:32 AM
> >To: Tomcat Users List
> >Subject: Re: Reading Servlet OutputStream
> >
> >Look at the pushBody method of the response class
> >(HttpServletResponse) that's all you need
> >
> >Nitin Mulimani escribió:
> >
> >
> >
> >>This question is is more on the Servlet API.
> >>
> >>
> >>
> >>I want to read the servlet output stream and save in some buffer or
> >>file, and then forward it to the client. I use filters to play with the
> >>Request and Response objects.
> >>
> >>
> >>
> >>These are some of the things I have tried.
> >>
> >>1)   I have a Wrapper which extends HttpServletResponseWrapper
> >>
> >>2)   Constructed a PrintWriter writer = new PrintWriter(new
> >>OutputStreamWriter(origResponse.getOutputStream(), charEnc));
> >>
> >>Reader reader = new StringReader(printWriter.toString());
> >>
> >>   BufferedReader bufferedReader = new BufferedReader(reader);
> >>
> >>   String line;
> >>
> >>   while ((line = bufferedReader.readLine()) != null) {
> >>
> >> System.out.println("line : " + line);
> >>
> >>   }
> >>
> >>3) bufferedReader.close();
> >>
> >>
> >>
> >>Still am not able to read the response. I can write to the response, but
> >>am stuck at reading the response.
> >>
> >>
> >>
> >>Any pointers.
> >>
> >>
> >>
> >>-- Nitin
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
> -- 
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.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]



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



Re: Can I start tomcat 5.0.28 as a non root user at Linux?

2004-08-31 Thread Vic
I do not know if you can, but I can.
.V
Johnny wrote:
 
 

		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

--
Please post on Rich Internet Applications User Interface (RiA/SoA)

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


RE: Tomcat 5.0.27 Set Up Problem

2004-08-31 Thread Nelson, Jerry W, Contractor 146CF, SCB
What if you didn't use the installer?  How can it be setup manually?

//SIGNED//
 
Jerry Nelson


-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:06 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.0.27 Set Up Problem


The tomcat installer does it right away, you just install it and it even 
has enabled the autostart mode

Nelson, Jerry W, Contractor 146CF, SCB escribió:

>With your suggestion in item 3, how do you run tomcat as a service?
>
>//SIGNED//
> 
>Jerry Nelson
>
>
>-Original Message-
>From: John Villar [mailto:[EMAIL PROTECTED]
>Sent: Monday, August 30, 2004 9:49 AM
>To: Tomcat Users List
>Subject: Re: Tomcat 5.0.27 Set Up Problem
>
>
>Probably, your problem isn't tomcat configuration are you sure 
>you're starting it up? (at least, ran the batch file you modified, 
>however, the service approach is much better)
>Reread my previous email, it seems like you haven't read all the bits i 
>did include lemme include them here, separately
>
>1) Your freshly installed tomcat 5.0.27 (Update to 5.0.28) is prepared 
>to function right out-of-the-box
>2) Why do you want to enable the invoker servlet? tomcat can 
>function properly without it.
>3) It's much better to run Tomcat as a service on WindowsXP/W2K
>4) If you haven't a proxy server configured, you don't have to check 
>that box.
>
>Caroline Jen escribió:
>
>  
>
>><>But, the Tomcat is not configured properly!! I was
>>able to start the server. Nonetheless, when I typed
>>http://localhost:8080 in the Windows XP browser's
>>address bar, I got "HTTP Status 404"!!!
>>
>>
>
>
>  
>

-- 
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com



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



Can I start tomcat 5.0.28 as a non root user at Linux?

2004-08-31 Thread Johnny
 
 



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread tom ly
I'm receiving a HTTP POST request containg XML data and want to process the data in 
the doPost method of my servlet.  When I do request.getContentLength(), it gives the 
length of the entire request including the HTTP header etc, but I only want the XML 
portion of it.  I can't find any Java methods which will return only the data part of 
the request.  How can I do this?
 
Thanks,
Tom




-
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

How do I read only the XML data in doPost(req,res)?

2004-08-31 Thread tom ly
I'm receiving a HTTP POST request containg XML data and want to process the data in 
the doPost method of my servlet.  When I do request.getContentLength(), it gives the 
length of the entire request including the HTTP header etc, but I only want the XML 
portion of it.  I can't find any Java methods which will return only the data part of 
the request.  How can I do this?
 
Thanks,
Tom


-
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

Re: Getting 404 error deploying my servlet

2004-08-31 Thread Shaun Campbell

- Original Message - 
From: "Kimmy Lin" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, August 30, 2004 10:13 PM
Subject: Re: Getting 404 error deploying my servlet


> In your web.xml, you might want to try add the following
>
> 
>  ...
>  
>  
>   invoker
>   /servlet/*
>  
> 
>
> This is required after version 4.12 or 13. But this seem to break
> your servlet program again in Tomcat 5. But since you are using
> Tomcat 4, it should work.
>
> Kimmy
>
> - Original Message - 


Kimmy

You were right!!  I don't know where I got that web.xml file from but when I
put those lines into the one out of my war file it worked.

Thanks to those who pointed out about the syntax of the xml file. Iit made
me go back and check and that's when I realised I'd picked up the wrong
web.xml.

Thanks

Shaun



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



RE: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
I don't agree with your assesment.  I would rather do a simple boolean
check before I do something and make a decision based on that and use
exceptions for catastrophic errors.  Just a choice in how to use the tools
available.

-- 
Christopher Cullum
[EMAIL PROTECTED]

Caldarale, Charles R said:
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Subject: RE: How do I get an intermediary proxy from caching?
>>
>> Adding the headers will not be an infrequent situation, most
>> of my site is dynamic so almost all of the site cannot be cached. The
>> adding of these headers will be part of the main path.
>
> You're missing the point.  The infrequent case is that the output is
> already committed, not that you'll be adding headers.  You're including
> an error check in the main path that would be perfectly well handled by
> an exception.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> - 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]



RE: How do I get an intermediary proxy from caching?

2004-08-31 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Subject: RE: How do I get an intermediary proxy from caching?
> 
> Adding the headers will not be an infrequent situation, most 
> of my site is dynamic so almost all of the site cannot be cached.
> The adding of these headers will be part of the main path.

You're missing the point.  The infrequent case is that the output is already 
committed, not that you'll be adding headers.  You're including an error check in the 
main path that would be perfectly well handled by an exception.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers.

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



RE: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Adding the headers will not be an infrequent situation, most of my site is
dynamic so almost all of the site cannot be cached.  The adding of these
headers will be part of the main path.


-- 
Christopher Cullum
[EMAIL PROTECTED]

Caldarale, Charles R said:
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Subject: Re: How do I get an intermediary proxy from caching?
>>
>> To rely on that method, yes a bad design, to check before
>> you change the headers, so you can head off an exception,
>> not a bad design.
>
> However, you're adding code for a hopefully infrequent situation to the
> main path.  If you simply catch the exception, you don't impact the main
> path.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> - 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]



Re: How do I logout application(s) with Single-sign-on?

2004-08-31 Thread Rick Wong
Thanks Keith,
I figured out what I did wrong.  It turns out that my logout servlet was 
running in a separate Web application that is not part of the SSO 
Realm.  Of course, session.invalidate() does nothing to the SSO 
session!  Thanks a lot for your help!

Thanks a lot,
--
Rick
Keith Bottner wrote:
request.getSession().invalidate();
You may also want to invalidate any cookies you have set, but that is
specific to your needs.
Cookie cookies[] = request.getCookies();
Cookie cookie = null;
for (int i = 0; i < cookies.length; i++)
{
   cookie = cookies[i];
   cookie.setMaxAge(0);
   response.addCookie(cookie);
}
Keith
-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 5:14 PM
To: Tomcat Users List
Subject: How do I logout application(s) with Single-sign-on?

Hi,
I am using Tomcat 5.0.  I enabled SSO to several application.  I'd like 
to be about to logout from any application, and force subsequent access 
to any application to logout as well.  How would I do that?

Thanks,
--
Rick
-
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]


RE: How do I get an intermediary proxy from caching?

2004-08-31 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Subject: Re: How do I get an intermediary proxy from caching?
> 
> To rely on that method, yes a bad design, to check before 
> you change the headers, so you can head off an exception, 
> not a bad design.

However, you're adding code for a hopefully infrequent situation to the main path.  If 
you simply catch the exception, you don't impact the main path.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers.

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



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem

-- 
Christopher Cullum
[EMAIL PROTECTED]

Carl Howells said:
> [EMAIL PROTECTED] wrote:
>> Can I ask Tomcat if it has flushed it's output buffer yet?
>>
>
> As part of the servlet spec...
>
> HttpServletResponse has an isCommitted() method.  That will tell you
> whether it's flushed the buffer.
>
> But really, it seems like a bad design to rely on that method.
To rely on that method, yes a bad design, to check before you change the
headers, so you can head off an exception, not a bad design.

>
> - 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]



Re: RE : -- TomCat/Lucene, filesystem

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 09:08:52PM +0200, J.Ph DEGLETAGNE wrote:
: Open and read files...
: Lucene has indexed files under e:\data
: And after a Lucene search (from indexe) Lucene display something like that
: 
: http://merlin:9090/data/text/essai.txt
: With
: Etat HTTP 404 - /data/text/essai.txt
: 
: Webapp Lucene is installed and running from
: D:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\luceneweb

So you're trying to serve files that exist outside of the webapp's
context?

For one, check the archives: this topic comes up frequently.  You'll
have to write some code to do this.

Second, I'm surprised this topic isn't covered in the Lucene docs.  This
isn't to say that I've read those docs, just that it sounds like it
would be a FAQ.

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread Carl Howells
[EMAIL PROTECTED] wrote:
Can I ask Tomcat if it has flushed it's output buffer yet?
As part of the servlet spec...
HttpServletResponse has an isCommitted() method.  That will tell you 
whether it's flushed the buffer.

But really, it seems like a bad design to rely on that method.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Java process growth under Linux...leak?

2004-08-31 Thread Mark Maigatter
> Wade Chandler wrote:
>
>> Mark Maigatter wrote:
>> 
>>> We have a Tomcat 5.0.25 based web site for uploading images and assorted
>>> files and managing them.
>>>  
>>> We have found that the Java process that Tomcat is running under is
>>> gradually growing when repetitively processing files uploaded and 
>>> stripped
>>> out of the form submissions by the Apache FileUpload component.  All 
>>> signs
>>> point to a memory leak?
>>>  
>>> Upon the submission of about 500 files we had a 31MB growth in the 
>>> size of
>>> the java process using "top".   
>>> However, the Sun Java jvmstat shows that the Java heap is staying 
>>> relatively
>>> constant.  The "-gc" numbers fluctuate in a manner that shows reasonable
>>> garbage collection activity and the total used across the s0/s1/eden/old
>>> stay with the range for the initial numbers.
>>>  
>>> My question is what would you recommend to isolate the process growth?
>>>  
>>> Is there a way within Java to see the underlying process growth to help
>>> isolate it in the processing cycle?
>>>  
>>> --mark
>>>
>> 
>> How large were the files you were uploading?  I mean  you just said you 
>> uploaded 500 files.  You should expect to see process memory growth. The 
>> JVM has it's own object heap where it manages it's "internal" memory.  
>> Then there is the process and it's memory which is a C heap.

I took the file itself out of the equation and just reference a path to a
series of files that I have on a locally mounted CDROM.  So the form parsing
that FileUpload is doing is just taking apart the form fields to direct
processing.

>> I see that you uploaded 500 files.  Were these one right after the 
>> other, or were they close to simultaneous?  

These were one after another.  Once on form was processed the next was sent.

>> Also, how are you uploading the files?  

This is via a submission of a form within the Java environment to a URL.

>> Are you using some type of a parser?  Are you using the 
>> commons file upload control?  If the JVM reports good memory collection, 
>> then there is no memory leak in Tomcat.  31MB of growth for a process 
>> uploading 500 files shouldn't be that bad depending on how they were 
>> uploaded and file sizes.

The problem is that keeps growing over time.  On a production server, the
process size hits 1.6GB.  Again, the java heap is smaller in the order of
600MB.

>> 
>> Think about it. If the files were between 100kb and 60kb then you have a 
>> total of 30mb to 50mb of memory just in that data alone not including 
>> your application and other buffers you may or may not be creating while 
>> uploading.
>> 
>> For perforamnce reasons the VM isn't going to suddenly resize the heap 
>> as soon as it frees a group of java objects because as far as it knows 
>> you may come along and upload 50mb worth of data immediately after the 
>> first.  This is a performance thing.  Resizing the heap takes time and 
>> cpu resources and affects performance.  The VM will reuse this memory 
>> over and over again.
>> 
>> I would look at any loops I might have reading from the stream.  Do you 
>> create a bunch of small byte array's while uploading the files?  Maybe 
>> you could increase the buffer size, be sure to null them out after you 
>> perform a read to tell them VM you are done with the variable now (for 
>> when the vm collects), and then see if that affects the memory growth.   
>> This should help speed the file upload a bit and get rid of some buffers 
>> in loops a little quicker if you aren't nulling the array.  If however 
>> you are simultaneously uploading much of this data, then a 31mb spike in 
>> memory usage shouldn't be a suprise no matter what.
>> 
>> Basically you can impose limits on the VM and you can use switches to do 
>> this.  You can also devote more memory to eden or survivor objects so 
>> that the VM can make better use of the most commonly used memory.  You 
>> can find more info on this topic and others at this url:
>> http://java.sun.com/docs/performance/
>> Many docs.  One for you might be:
>> http://java.sun.com/docs/hotspot/VMOptions.html
>> scroll down to the bottom and check out options:
>> -XX:NewRatio
>> -XX:NewSize
>> -XX:SurvivorRatio
>> 
>> Basically the defaults for the -server VM are to allow the best 
>> performance for a multi user multi threaded application such as tomcat. 
>>  So, unless you are running out of memory or you need to cripple the app 
>> servers performance by limiting it's growth because you have a bunch of 
>> other applications running on the same server, then I suggest sticking 
>> with the defaults.
>> 
>>Wade
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
>
> Just noticed you wrote about the upload component.  I haven't looked at 
> that code's parse to see how it is handling reading bytes from the 
> stream, but I'm sure

Re: tag file encoding problem

2004-08-31 Thread V. Karthik Kumar
use: 

response.setCharacterEncoding("Whatever"); <-- internally, this is what
the tags translate to...

Before u carry on with out.print() statements...

And one more thing.. there is an option available to add encoding
messages by default; a filter is available by default

filters.setCharacterEncodingFilter

look in the servlets-examples\WEB-INF\web.xml

:)


On Wed, 2004-09-01 at 00:37, John Villar wrote:
> then you should use the <%@ page %> directive. search the web it 
> has a way to specify encoding
> 
> Sebastian Ryszard Kruk escribiÃ:
> 
> > Dnia 08/30/2004 07:01 PM, UÃÂytkownik John Villar napisaÃÂ:
> >
> >> i don't know much about the ".tag" format however, if it is an 
> >> XML based one, you must define the charset of your xml in the  
> >> tag
> >>
> >> Sebastian Ryszard Kruk escribiÃ:
> >>
> >>> Hi,
> >>>
> >>> I have a strange problem - I use tomcat 5.0.14.
> >>>
> >>> When I try to put some strings with polish letters like "ÅciÄga" in 
> >>> tag file - it results that during the translation to *.java file - 
> >>> this text is being replaced by ÃciÃga - just as it would treat the 
> >>> *.tag file as encoded in Latin1 rather than in UTF-8. Polish letters 
> >>> in *.jsp files are ok, though.
> >>>
> >>> Any ideas ??
> >>>
> >>> Thanks,
> >>>
> >>> skruk
> >>
> >>
> >>
> >>
> >>
> >> 
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > it is not - it is rather a part of JSP page ;-(
> >


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



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Can I ask Tomcat if it has flushed it's output buffer yet?

-- 
Christopher Cullum
[EMAIL PROTECTED]

John Villar said:
> you could also use a filter for your whole app that does that, if you
> want all your app "non-cached", same rules apply
>
> Ronald Klop escribió:
>
>> Yes. To be precise: you have to set the headers before Tomcat flushes
>> its outputbuffer for the first time. To be save, just set headers,
>> than output html.
>>
>> Ronald,
>>
>> On Tue Aug 31 20:10:13 CEST 2004 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Must you do this as one of the first things you do, before you output
>>>  any
>>> html?
>>>
>>> --
>>> Christopher Cullum
>>> [EMAIL PROTECTED]
>>>
>>> John Gentilin said:
>>> >When I am battling against IE caching or proxy caching, I add the
>>> following lines
>>> >to my response header. A bit brute force but it seems to work,
>>> althought
>>> >I think
>>> >it cause some issues when backing up on a form, forcing a reload.
>>> >
>>> >response.setHeader("Cache-Control",
>>> >"no-cache,max-age=0,must-revalidate");
>>> >response.setHeader("Pragma", "no-cache");
>>> >response.setHeader("Expires", "-1d");
>>> >
>>> >[EMAIL PROTECTED] wrote:
>>> >
>>> >>Hello all,
>>> >>I have taken a cursory look at the documentation for tomcat 5.x and
>>> I could not see how to get intermediary proxy's from caching my web
>>>
>>> page.
>>> >>I have the tags:
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>in my head section, but the proxy still caches my page. I read
>>> somewhere to put the cache-control:no-cache in the http header of
>>> the request, but I could not find how to do this in tomcat. Any
>>> help would be appreciated.
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >-
>>>
>>> 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]
>>>
>>
>>
>
> --
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.com




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



RE : -- TomCat/Lucene, filesystem

2004-08-31 Thread J.Ph DEGLETAGNE
QM,

Open and read files...
Lucene has indexed files under e:\data
And after a Lucene search (from indexe) Lucene display something like that

http://merlin:9090/data/text/essai.txt
With
Etat HTTP 404 - /data/text/essai.txt

Webapp Lucene is installed and running from 
D:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\luceneweb

Best regards



Jean-Philippe DEGLETAGNE
Natel:   +33 (0) 6 80 87 89 16
Tél.CH: +41 (0) 22 849 05 91
Tél.FR: +33 (0) 4 78 00 24 33
Mail: [EMAIL PROTECTED] 


COSI-consulting
route de Chêne 5
Case Postale 6298
CH 1211 GENEVE 6
Tél.CH: +41(0)22 849 05 91
Mail: [EMAIL PROTECTED]


Ce message et toutes les pièces jointes (ci-après le "message") sont établis
a l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.
Toute utilisation de ce message non conforme a sa destination, toute
diffusion ou toute publication, totale ou partielle, est interdite,
sauf autorisation expresse.
L'internet ne permettant pas d'assurer l'intégrité de ce message,
COSI-consulting SA (et ses filiales)
décline(nt) toute responsabilité au titre de ce message, dans l'hypothèse ou
il aurait été modifié.


This message and any attachments (the "message") is intended solely for the
addressees and is confidential. 
If you receive this message in error, please delete it and immediately
notify the sender. 
Any use not in accord with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The internet can not guarantee the integr ity of this message,
COSI-consulting SA (and its subsidiaries) 
shall (will) not therefore be liable for the message if modified.





-Message d'origine-
De : QM [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 31 août 2004 19:00
À : Tomcat Users List
Objet : Re: -- TomCat/Lucene, filesystem


On Tue, Aug 31, 2004 at 06:11:53PM +0200, J.Ph DEGLETAGNE wrote:
: How to "customize"  Webapp Lucene to access directory filesystem which are
: outside TomCat ?
: like this :
: D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
: to access
: E:\Data

You'll have to clarify what you mean by "access" -- open a file, write a
file, what?  

Whatever the case, barring any SecurityManager problems or issues with file
ownership/permissions it should be a standard java.io.* issue.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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]



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread John Villar
you could also use a filter for your whole app that does that, if you 
want all your app "non-cached", same rules apply

Ronald Klop escribió:
Yes. To be precise: you have to set the headers before Tomcat flushes 
its outputbuffer for the first time. To be save, just set headers, 
than output html.

Ronald,
On Tue Aug 31 20:10:13 CEST 2004 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
wrote:

Must you do this as one of the first things you do, before you output 
any
html?

--
Christopher Cullum
[EMAIL PROTECTED]
John Gentilin said:
>When I am battling against IE caching or proxy caching, I add the
>following lines
>to my response header. A bit brute force but it seems to work, 
althought
>I think
>it cause some issues when backing up on a form, forcing a reload.
>
>response.setHeader("Cache-Control",
>"no-cache,max-age=0,must-revalidate");
>response.setHeader("Pragma", "no-cache");
>response.setHeader("Expires", "-1d");
>
>[EMAIL PROTECTED] wrote:
>
>>Hello all,
>>I have taken a cursory look at the documentation for tomcat 5.x and I
>>could not see how to get intermediary proxy's from caching my web 
page.
>>I have the tags:
>>
>>
>>
>>
>>in my head section, but the proxy still caches my page. I read
>>somewhere to put the cache-control:no-cache in the http header of the
>>request, but I could not find how to do this in tomcat. Any help would
>>be appreciated.
>>
>>
>>
>
>
>
>- 
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]

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread Ronald Klop
Yes. To be precise: you have to set the headers before Tomcat flushes its outputbuffer 
for the first time. To be save, just set headers, than output html.
Ronald,
On Tue Aug 31 20:10:13 CEST 2004 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
Must you do this as one of the first things you do, before you output any
html?
--
Christopher Cullum
[EMAIL PROTECTED]
John Gentilin said:
>When I am battling against IE caching or proxy caching, I add the
>following lines
>to my response header. A bit brute force but it seems to work, althought
>I think
>it cause some issues when backing up on a form, forcing a reload.
>
>response.setHeader("Cache-Control",
>"no-cache,max-age=0,must-revalidate");
>response.setHeader("Pragma", "no-cache");
>response.setHeader("Expires", "-1d");
>
>[EMAIL PROTECTED] wrote:
>
>>Hello all,
>>I have taken a cursory look at the documentation for tomcat 5.x and I
>>could not see how to get intermediary proxy's from caching my web page.
>>I have the tags:
>>
>>
>>
>>
>>in my head section, but the proxy still caches my page. I read
>>somewhere to put the cache-control:no-cache in the http header of the
>>request, but I could not find how to do this in tomcat. Any help would
>>be appreciated.
>>
>>
>>
>
>
>
>- 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]



Re: tag file encoding problem

2004-08-31 Thread John Villar
then you should use the <%@ page %> directive. search the web it 
has a way to specify encoding

Sebastian Ryszard Kruk escribiÃ:
Dnia 08/30/2004 07:01 PM, UÃÂytkownik John Villar napisaÃÂ:
i don't know much about the ".tag" format however, if it is an 
XML based one, you must define the charset of your xml in the  
tag

Sebastian Ryszard Kruk escribiÃ:
Hi,
I have a strange problem - I use tomcat 5.0.14.
When I try to put some strings with polish letters like "ÅciÄga" in 
tag file - it results that during the translation to *.java file - 
this text is being replaced by ÃciÃga - just as it would treat the 
*.tag file as encoded in Latin1 rather than in UTF-8. Polish letters 
in *.jsp files are ok, though.

Any ideas ??
Thanks,
skruk



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

it is not - it is rather a part of JSP page ;-(
--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Tomcat 5.0.27 Set Up Problem

2004-08-31 Thread John Villar
The tomcat installer does it right away, you just install it and it even 
has enabled the autostart mode

Nelson, Jerry W, Contractor 146CF, SCB escribió:
With your suggestion in item 3, how do you run tomcat as a service?
//SIGNED//
Jerry Nelson
-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED]
Sent: Monday, August 30, 2004 9:49 AM
To: Tomcat Users List
Subject: Re: Tomcat 5.0.27 Set Up Problem
Probably, your problem isn't tomcat configuration are you sure 
you're starting it up? (at least, ran the batch file you modified, 
however, the service approach is much better)
Reread my previous email, it seems like you haven't read all the bits i 
did include lemme include them here, separately

1) Your freshly installed tomcat 5.0.27 (Update to 5.0.28) is prepared 
to function right out-of-the-box
2) Why do you want to enable the invoker servlet? tomcat can 
function properly without it.
3) It's much better to run Tomcat as a service on WindowsXP/W2K
4) If you haven't a proxy server configured, you don't have to check 
that box.

Caroline Jen escribió:
 

<>But, the Tomcat is not configured properly!! I was
able to start the server. Nonetheless, when I typed
http://localhost:8080 in the Windows XP browser's
address bar, I got "HTTP Status 404"!!!
   


 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Hi!

2004-08-31 Thread V. Karthik Kumar
Hi,

I'm reporting this some sort of unusual behavior in the manager...  (WRT
Tomcat 5.0.27) ... 

When a user tries to start a web-app that has been started already, and
then stop it, it becomes unusable again... The current way to solve such
a thing is:

1. Shutdown the server
2. Clean up in the work/Catalina and work/Standalone directories
3. Re-start the server

Regards,
Karthik.



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



Re: Functionality of for Servlets

2004-08-31 Thread Jeanfrancois Arcand

Gunnar Brading wrote:
I have been in need of using the  tag in a Tomcat-only 
environment... Is this possible? Reading the source indicates that it 
wouldn't be possible to get the information about the role the context 
currently is in. Using the requests in-role methods of course tells me 
about
the user, and not the context.

Have I come to the right conclusion?
No ;-)
You can get access to the Subject by doing 
Subject.getSubject(AccessController.getContext())

Reading the specs tells me that the functionality is meant for 
transferring roles to EJB's. Some documentation I found at Sun 
indicates though that even web-applications should be able to use this.
The way SJSAS 8.x is doing that is by using the Subject and then the 
principal(s) associated with the Subject.

-- Jeanfrancois
Anyone got more information about this?
Cheers,
-- gunnar

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


Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread John Gentilin
Not sure if order matters but in my code, I set the headers first then 
process the request.
-JG

[EMAIL PROTECTED] wrote:
Must you do this as one of the first things you do, before you output any
html?
 


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


Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Must you do this as one of the first things you do, before you output any
html?

-- 
Christopher Cullum
[EMAIL PROTECTED]

John Gentilin said:
> When I am battling against IE caching or proxy caching, I add the
> following lines
> to my response header. A bit brute force but it seems to work, althought
>  I think
> it cause some issues when backing up on a form, forcing a reload.
>
> response.setHeader("Cache-Control",
> "no-cache,max-age=0,must-revalidate");
> response.setHeader("Pragma", "no-cache");
> response.setHeader("Expires", "-1d");
>
> [EMAIL PROTECTED] wrote:
>
>>Hello all,
>>I have taken a cursory look at the documentation for tomcat 5.x and I
>> could not see how to get intermediary proxy's from caching my web page.
>>  I have the tags:
>>  
>>  
>>  
>>
>>in my head section, but the proxy still caches my page.  I read
>> somewhere to put the cache-control:no-cache in the http header of the
>> request, but I could not find how to do this in tomcat.  Any help would
>> be appreciated.
>>
>>
>>
>
>
>
> - 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]



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread John Gentilin
When I am battling against IE caching or proxy caching, I add the 
following lines
to my response header. A bit brute force but it seems to work, althought 
I think
it cause some issues when backing up on a form, forcing a reload.

   response.setHeader("Cache-Control", 
"no-cache,max-age=0,must-revalidate");
   response.setHeader("Pragma", "no-cache");
   response.setHeader("Expires", "-1d");

[EMAIL PROTECTED] wrote:
Hello all,
I have taken a cursory look at the documentation for tomcat 5.x and I
could not see how to get intermediary proxy's from caching my web page.  I
have the tags:



in my head section, but the proxy still caches my page.  I read somewhere
to put the cache-control:no-cache in the http header of the request, but I
could not find how to do this in tomcat.  Any help would be appreciated.
 


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


Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Thanks, I will give this a try.

-- 
Christopher Cullum
[EMAIL PROTECTED]

QM said:
> On Tue, Aug 31, 2004 at 10:47:27AM -0700, [EMAIL PROTECTED] wrote:
> : in my head section, but the proxy still caches my page.  I read
> somewhere : to put the cache-control:no-cache in the http header of the
> request, but I : could not find how to do this in tomcat.  Any help
> would be appreciated.
>
> Response.setHeader()
>
> -QM
>
> --
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.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]



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 10:47:27AM -0700, [EMAIL PROTECTED] wrote:
: in my head section, but the proxy still caches my page.  I read somewhere
: to put the cache-control:no-cache in the http header of the request, but I
: could not find how to do this in tomcat.  Any help would be appreciated.

Response.setHeader()

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Help, URI mapping problem with JK2

2004-08-31 Thread John Gentilin
I am running Apache 2.0.50,  mod_Jk2 and Tomcat 4.1.30. 
In my workers2.properties  I have the mapping

[uri:/WebClassifieds/*]
group=lb
where this URL works
http://4wallsinde.rapidxsl.com/WebClassifieds/web/cmd/
and this one too
http://4wallsinde.rapidxsl.com/WebClassifieds/fourwalls/V20/assets/ext/logos/NJlogo.gif
but this one DOES NOT work
http://4wallsinde.rapidxsl.com/WebClassifieds/web/cmd/4walls/Apartment/Search/Listing/Guide/For-/DE/LocationPath/%2FDE%2FNorthern+DE%2FBear/encoding/cyacaakef_enc_GetLocation.xsl
Apache reports a 404 error but nothing else
[31/Aug/2004:10:43:25 -0700] "GET 
/WebClassifieds/web/cmd/4walls/Apartment/Search/Listing/Guide/For-/DE/LocationPath/%2FDE%2FNorthern+DE%2FBear/encoding/cyacaakef_enc_GetLocation.xsl 
HTTP/1.1" 404 442

It almost seems as if mod_jk passed up on the redirect. My problem now 
is that I can't get any debug information to be produced
so I am stuck...

I added this block of  confog to my jk.conf file
JkSet2 logger level debug
JkSet2 logger.file:0 file /usr/local/apache2/logs/jk2.log
JkSet2 logger.file:0 level debug
but all that did was create a log with 3 entries saying that logging was 
enabled and that was that...

Thansk you in advance.
John G

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


How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Hello all,
I have taken a cursory look at the documentation for tomcat 5.x and I
could not see how to get intermediary proxy's from caching my web page.  I
have the tags:




in my head section, but the proxy still caches my page.  I read somewhere
to put the cache-control:no-cache in the http header of the request, but I
could not find how to do this in tomcat.  Any help would be appreciated.

-- 
Christopher Cullum
[EMAIL PROTECTED]





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



Re: tag file encoding problem

2004-08-31 Thread Sebastian Ryszard Kruk
Dnia 08/30/2004 07:01 PM, UÃÂytkownik John Villar napisaÃÂ:
i don't know much about the ".tag" format however, if it is an XML 
based one, you must define the charset of your xml in the  tag

Sebastian Ryszard Kruk escribiÃ:
Hi,
I have a strange problem - I use tomcat 5.0.14.
When I try to put some strings with polish letters like "ÅciÄga" in 
tag file - it results that during the translation to *.java file - 
this text is being replaced by ÃciÃga - just as it would treat the 
*.tag file as encoded in Latin1 rather than in UTF-8. Polish letters 
in *.jsp files are ok, though.

Any ideas ??
Thanks,
skruk



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
it is not - it is rather a part of JSP page ;-(
--
-
--   Sebastian Ryszard Kruk, M.Sc.
--   mailto: [EMAIL PROTECTED]
--   GG: 335067, Jabber: [EMAIL PROTECTED]
-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Java process growth under Linux...leak?

2004-08-31 Thread Nandish Rudra
Hi,

Search for Java HotSpot on Google and look for the following java options
ParallelGC and maxHeapRation. Set the JAVA_OPTS with these and solve the
problems. 

Regards,
NR


-Original Message-
From: Mark Maigatter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:21 PM
To: '[EMAIL PROTECTED]'
Subject: Java process growth under Linux...leak?


We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using "top".  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The "-gc" numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

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



RE: Tomcat 5.0.27 Set Up Problem

2004-08-31 Thread Nelson, Jerry W, Contractor 146CF, SCB
With your suggestion in item 3, how do you run tomcat as a service?

//SIGNED//
 
Jerry Nelson


-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED]
Sent: Monday, August 30, 2004 9:49 AM
To: Tomcat Users List
Subject: Re: Tomcat 5.0.27 Set Up Problem


Probably, your problem isn't tomcat configuration are you sure 
you're starting it up? (at least, ran the batch file you modified, 
however, the service approach is much better)
Reread my previous email, it seems like you haven't read all the bits i 
did include lemme include them here, separately

1) Your freshly installed tomcat 5.0.27 (Update to 5.0.28) is prepared 
to function right out-of-the-box
2) Why do you want to enable the invoker servlet? tomcat can 
function properly without it.
3) It's much better to run Tomcat as a service on WindowsXP/W2K
4) If you haven't a proxy server configured, you don't have to check 
that box.

Caroline Jen escribió:

> <>But, the Tomcat is not configured properly!! I was
> able to start the server. Nonetheless, when I typed
> http://localhost:8080 in the Windows XP browser's
> address bar, I got "HTTP Status 404"!!!


-- 
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com



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



Re: Java process growth under Linux...leak?

2004-08-31 Thread Wade Chandler
Wade Chandler wrote:
Mark Maigatter wrote:
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and 
stripped
out of the form submissions by the Apache FileUpload component.  All 
signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the 
size of
the java process using "top".   
However, the Sun Java jvmstat shows that the Java heap is staying 
relatively
constant.  The "-gc" numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

How large were the files you were uploading?  I mean  you just said you 
uploaded 500 files.  You should expect to see process memory growth. The 
JVM has it's own object heap where it manages it's "internal" memory.  
Then there is the process and it's memory which is a C heap.

I see that you uploaded 500 files.  Were these one right after the 
other, or were they close to simultaneous?  Also, how are you uploading 
the files?  Are you using some type of a parser?  Are you using the 
commons file upload control?  If the JVM reports good memory collection, 
then there is no memory leak in Tomcat.  31MB of growth for a process 
uploading 500 files shouldn't be that bad depending on how they were 
uploaded and file sizes.

Think about it. If the files were between 100kb and 60kb then you have a 
total of 30mb to 50mb of memory just in that data alone not including 
your application and other buffers you may or may not be creating while 
uploading.

For perforamnce reasons the VM isn't going to suddenly resize the heap 
as soon as it frees a group of java objects because as far as it knows 
you may come along and upload 50mb worth of data immediately after the 
first.  This is a performance thing.  Resizing the heap takes time and 
cpu resources and affects performance.  The VM will reuse this memory 
over and over again.

I would look at any loops I might have reading from the stream.  Do you 
create a bunch of small byte array's while uploading the files?  Maybe 
you could increase the buffer size, be sure to null them out after you 
perform a read to tell them VM you are done with the variable now (for 
when the vm collects), and then see if that affects the memory growth.   
This should help speed the file upload a bit and get rid of some buffers 
in loops a little quicker if you aren't nulling the array.  If however 
you are simultaneously uploading much of this data, then a 31mb spike in 
memory usage shouldn't be a suprise no matter what.

Basically you can impose limits on the VM and you can use switches to do 
this.  You can also devote more memory to eden or survivor objects so 
that the VM can make better use of the most commonly used memory.  You 
can find more info on this topic and others at this url:
http://java.sun.com/docs/performance/
Many docs.  One for you might be:
http://java.sun.com/docs/hotspot/VMOptions.html
scroll down to the bottom and check out options:
-XX:NewRatio
-XX:NewSize
-XX:SurvivorRatio

Basically the defaults for the -server VM are to allow the best 
performance for a multi user multi threaded application such as tomcat. 
 So, unless you are running out of memory or you need to cripple the app 
servers performance by limiting it's growth because you have a bunch of 
other applications running on the same server, then I suggest sticking 
with the defaults.

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

Just noticed you wrote about the upload component.  I haven't looked at 
that code's parse to see how it is handling reading bytes from the 
stream, but I'm sure there have been many eyes on it.  I would say this 
is probably just a memory usage over time issue (short period of time). 
 Use those links I gave you and play with the memory switches a bit to 
see if you can get some kind of a situation that works best for you. 
The switches:
-XX:MaxHeapFreeRatio
and
-XX:MinHeapFreeRatio

Can make the vm resize the heap differently, but you will want to be 
careful.  You may make things very slow by messing with the defaults for 
those switches.

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


Re: Java process growth under Linux...leak?

2004-08-31 Thread Wade Chandler
Mark Maigatter wrote:
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using "top".  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The "-gc" numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

How large were the files you were uploading?  I mean  you just said you 
uploaded 500 files.  You should expect to see process memory growth. 
The JVM has it's own object heap where it manages it's "internal" 
memory.  Then there is the process and it's memory which is a C heap.

I see that you uploaded 500 files.  Were these one right after the 
other, or were they close to simultaneous?  Also, how are you uploading 
the files?  Are you using some type of a parser?  Are you using the 
commons file upload control?  If the JVM reports good memory collection, 
then there is no memory leak in Tomcat.  31MB of growth for a process 
uploading 500 files shouldn't be that bad depending on how they were 
uploaded and file sizes.

Think about it. If the files were between 100kb and 60kb then you have a 
total of 30mb to 50mb of memory just in that data alone not including 
your application and other buffers you may or may not be creating while 
uploading.

For perforamnce reasons the VM isn't going to suddenly resize the heap 
as soon as it frees a group of java objects because as far as it knows 
you may come along and upload 50mb worth of data immediately after the 
first.  This is a performance thing.  Resizing the heap takes time and 
cpu resources and affects performance.  The VM will reuse this memory 
over and over again.

I would look at any loops I might have reading from the stream.  Do you 
create a bunch of small byte array's while uploading the files?  Maybe 
you could increase the buffer size, be sure to null them out after you 
perform a read to tell them VM you are done with the variable now (for 
when the vm collects), and then see if that affects the memory growth. 
  This should help speed the file upload a bit and get rid of some 
buffers in loops a little quicker if you aren't nulling the array.  If 
however you are simultaneously uploading much of this data, then a 31mb 
spike in memory usage shouldn't be a suprise no matter what.

Basically you can impose limits on the VM and you can use switches to do 
this.  You can also devote more memory to eden or survivor objects so 
that the VM can make better use of the most commonly used memory.  You 
can find more info on this topic and others at this url:
http://java.sun.com/docs/performance/
Many docs.  One for you might be:
http://java.sun.com/docs/hotspot/VMOptions.html
scroll down to the bottom and check out options:
-XX:NewRatio
-XX:NewSize
-XX:SurvivorRatio

Basically the defaults for the -server VM are to allow the best 
performance for a multi user multi threaded application such as tomcat. 
 So, unless you are running out of memory or you need to cripple the 
app servers performance by limiting it's growth because you have a bunch 
of other applications running on the same server, then I suggest 
sticking with the defaults.

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


Re: -- TomCat/Lucene, filesystem

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 06:11:53PM +0200, J.Ph DEGLETAGNE wrote:
: How to "customize"  Webapp Lucene to access directory filesystem which are
: outside TomCat ?
: like this :
: D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
: to access
: E:\Data

You'll have to clarify what you mean by "access" -- open a file, write a
file, what?  

Whatever the case, barring any SecurityManager problems or issues with
file ownership/permissions it should be a standard java.io.* issue.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: Reading Servlet OutputStream

2004-08-31 Thread Nandish Rudra
Here is something u guys can do.

PipedOutputStream and PipedInputStream to redirect the output stream and
read the data into a buffer and then do with it what u please.

regards
NR


-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:48 PM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream


I am not using JSP, I am using Tapestry, any other ideas on how to
accomplish this?

James

- Original Message - 
From: "John Villar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 1:31 PM
Subject: Re: Reading Servlet OutputStream


> certainly my error the method is from the JSP API JspContext
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
> I ran into a problem that needed writing a zip file from the JSP page
>
> sorry for that one, however, with that method you could do what you're
> trying
>
> Nitin Mulimani escribió:
>
> >Hi John,
> >
> >I am checking the Servlet2.3 api, and do not find a pushBody() method in
HttpServletResponse.
> >
> >-- Nitin
> >-Original Message-
> >From: John Villar [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 31, 2004 8:32 AM
> >To: Tomcat Users List
> >Subject: Re: Reading Servlet OutputStream
> >
> >Look at the pushBody method of the response class
> >(HttpServletResponse) that's all you need
> >
> >Nitin Mulimani escribió:
> >
> >
> >
> >>This question is is more on the Servlet API.
> >>
> >>
> >>
> >>I want to read the servlet output stream and save in some buffer or
> >>file, and then forward it to the client. I use filters to play with the
> >>Request and Response objects.
> >>
> >>
> >>
> >>These are some of the things I have tried.
> >>
> >>1)   I have a Wrapper which extends HttpServletResponseWrapper
> >>
> >>2)   Constructed a PrintWriter writer = new PrintWriter(new
> >>OutputStreamWriter(origResponse.getOutputStream(), charEnc));
> >>
> >>Reader reader = new StringReader(printWriter.toString());
> >>
> >>   BufferedReader bufferedReader = new BufferedReader(reader);
> >>
> >>   String line;
> >>
> >>   while ((line = bufferedReader.readLine()) != null) {
> >>
> >> System.out.println("line : " + line);
> >>
> >>   }
> >>
> >>3) bufferedReader.close();
> >>
> >>
> >>
> >>Still am not able to read the response. I can write to the response, but
> >>am stuck at reading the response.
> >>
> >>
> >>
> >>Any pointers.
> >>
> >>
> >>
> >>-- Nitin
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
> -- 
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.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]



RE: Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

2004-08-31 Thread Emmerich, Martin
On Wed, Aug 25, 2004 at 6:31 PM, QM wrote

> What about renaming the .jar file with the Hibernate mappings .zip?
and
> You may want to hold off, then, till the developer gets back.  

We did both and it worked!

Thanks for the help!

Best regards,
..
Martin Emmerich
Leitung IT

Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München

Fon   +49 (0)89-68961 0 
Fax   +49 (0)89-68961 200
Web   http://www.oew.de/

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



Re: Reading Servlet OutputStream

2004-08-31 Thread James Sherwood
I am not using JSP, I am using Tapestry, any other ideas on how to
accomplish this?

James

- Original Message - 
From: "John Villar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 1:31 PM
Subject: Re: Reading Servlet OutputStream


> certainly my error the method is from the JSP API JspContext
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
> I ran into a problem that needed writing a zip file from the JSP page
>
> sorry for that one, however, with that method you could do what you're
> trying
>
> Nitin Mulimani escribió:
>
> >Hi John,
> >
> >I am checking the Servlet2.3 api, and do not find a pushBody() method in
HttpServletResponse.
> >
> >-- Nitin
> >-Original Message-
> >From: John Villar [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 31, 2004 8:32 AM
> >To: Tomcat Users List
> >Subject: Re: Reading Servlet OutputStream
> >
> >Look at the pushBody method of the response class
> >(HttpServletResponse) that's all you need
> >
> >Nitin Mulimani escribió:
> >
> >
> >
> >>This question is is more on the Servlet API.
> >>
> >>
> >>
> >>I want to read the servlet output stream and save in some buffer or
> >>file, and then forward it to the client. I use filters to play with the
> >>Request and Response objects.
> >>
> >>
> >>
> >>These are some of the things I have tried.
> >>
> >>1)   I have a Wrapper which extends HttpServletResponseWrapper
> >>
> >>2)   Constructed a PrintWriter writer = new PrintWriter(new
> >>OutputStreamWriter(origResponse.getOutputStream(), charEnc));
> >>
> >>Reader reader = new StringReader(printWriter.toString());
> >>
> >>   BufferedReader bufferedReader = new BufferedReader(reader);
> >>
> >>   String line;
> >>
> >>   while ((line = bufferedReader.readLine()) != null) {
> >>
> >> System.out.println("line : " + line);
> >>
> >>   }
> >>
> >>3) bufferedReader.close();
> >>
> >>
> >>
> >>Still am not able to read the response. I can write to the response, but
> >>am stuck at reading the response.
> >>
> >>
> >>
> >>Any pointers.
> >>
> >>
> >>
> >>-- Nitin
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
> -- 
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.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]



Re: Reading Servlet OutputStream

2004-08-31 Thread John Villar
certainly my error the method is from the JSP API JspContext 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
I ran into a problem that needed writing a zip file from the JSP page

sorry for that one, however, with that method you could do what you're 
trying

Nitin Mulimani escribió:
Hi John,
I am checking the Servlet2.3 api, and do not find a pushBody() method in 
HttpServletResponse.
-- Nitin
-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 8:32 AM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream

Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:
 

This question is is more on the Servlet API. 


I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 


These are some of the things I have tried.
1)   I have a Wrapper which extends HttpServletResponseWrapper
2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));
Reader reader = new StringReader(printWriter.toString());
  BufferedReader bufferedReader = new BufferedReader(reader);
  String line;
  while ((line = bufferedReader.readLine()) != null) {
System.out.println("line : " + line);
  }
3) bufferedReader.close();

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 


Any pointers.

-- Nitin

   

 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

RE: Reading Servlet OutputStream

2004-08-31 Thread Nitin Mulimani

Hi John,

I am checking the Servlet2.3 api, and do not find a pushBody() method in 
HttpServletResponse.

-- Nitin
-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 8:32 AM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream

Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:

>This question is is more on the Servlet API. 
>
> 
>
>I want to read the servlet output stream and save in some buffer or
>file, and then forward it to the client. I use filters to play with the
>Request and Response objects. 
>
> 
>
>These are some of the things I have tried.
>
>1)   I have a Wrapper which extends HttpServletResponseWrapper
>
>2)   Constructed a PrintWriter writer = new PrintWriter(new
>OutputStreamWriter(origResponse.getOutputStream(), charEnc));
>
>Reader reader = new StringReader(printWriter.toString());
>
>BufferedReader bufferedReader = new BufferedReader(reader);
>
>String line;
>
>while ((line = bufferedReader.readLine()) != null) {
>
>  System.out.println("line : " + line);
>
>}
>
>3) bufferedReader.close();
>
> 
>
>Still am not able to read the response. I can write to the response, but
>am stuck at reading the response. 
>
> 
>
>Any pointers.
>
> 
>
>-- Nitin
>
>
>  
>

-- 
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com




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



Re: Reading Servlet OutputStream

2004-08-31 Thread James Sherwood
I am in roughly the same boat as you John as I need to manipulate the
response.

I cannot find a pushBody method for HttpServletResponse:(

James

- Original Message - 
From: "John Villar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 12:32 PM
Subject: Re: Reading Servlet OutputStream


> Look at the pushBody method of the response class
> (HttpServletResponse) that's all you need
>
> Nitin Mulimani escribió:
>
> >This question is is more on the Servlet API.
> >
> >
> >
> >I want to read the servlet output stream and save in some buffer or
> >file, and then forward it to the client. I use filters to play with the
> >Request and Response objects.
> >
> >
> >
> >These are some of the things I have tried.
> >
> >1)   I have a Wrapper which extends HttpServletResponseWrapper
> >
> >2)   Constructed a PrintWriter writer = new PrintWriter(new
> >OutputStreamWriter(origResponse.getOutputStream(), charEnc));
> >
> >Reader reader = new StringReader(printWriter.toString());
> >
> >BufferedReader bufferedReader = new BufferedReader(reader);
> >
> >String line;
> >
> >while ((line = bufferedReader.readLine()) != null) {
> >
> >  System.out.println("line : " + line);
> >
> >}
> >
> >3) bufferedReader.close();
> >
> >
> >
> >Still am not able to read the response. I can write to the response, but
> >am stuck at reading the response.
> >
> >
> >
> >Any pointers.
> >
> >
> >
> >-- Nitin
> >
> >
> >
> >
>
> -- 
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.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]



Java process growth under Linux...leak?

2004-08-31 Thread Mark Maigatter
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using "top".  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The "-gc" numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark


-- TomCat/Lucene, filesystem

2004-08-31 Thread J.Ph DEGLETAGNE
Hello Somebody, 
 
..I beg your pardon... 
 
Under Windows XP / TomCat, 
 
How to "customize"  Webapp Lucene to access directory filesystem which are
outside TomCat ?
like this :
D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
to access
E:\Data
 
Thank's a lot
 
JPhD


-- Tomcat, filesystem

2004-08-31 Thread J.Ph DEGLETAGNE
Hello Somebody,
 
Under Windows XP,
 
How to "customize" webapps Tomcat to access directory filesystem which are
outside Tomcat ?
like this :
D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
 
Thank's a lot
 
JPhD


AW: JSP/HTML Encoding

2004-08-31 Thread Ben Bookey
Hi Allistair

+++ Many thanks for your help. +++

I apologise when I ask some stupid questions...
:)

1) I am not exactly sure what the benefit is, of seeing if the client is
posting a utf8 encoded response ? Surely, the server controls anyway what
encoding the html pages are in so if i post with Latin9 then the client can
either read it or not. I guess this filter is useful in the case that the
client browser doesnt support the character encoding (something hopefully
similar) and posts the request in another character-code. The filter can
then be used to see if this is happening or not ?


2) I would assume that Tomcat( being java) would always use either utf8 or
utf16 so making the necessity of setting a jvm tomcat property unnecessary ?



regards
Ben



-Ursprüngliche Nachricht-
Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 31. August 2004 17:32
An: [EMAIL PROTECTED]
Betreff: RE: JSP/HTML Encoding


Hm, tell a lie Ben...I've just checked our startup options and we don't seem
to do that anymore ... however if you were to do it ..
add -Dfile.encoding=utf8

rem Set extra parameters
"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions
"-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endo
rsed.dirs=%CATALINA_HOME%\common\endorsed";-Xrs;-Xms128m;-Xmx384m;-Duser.dir
=%CATALINA_HOME%;-Dfile.encoding=utf8 --StartMode jvm --StopMode jvm

I think you just need to make sure you use utf8 at the UI. Our databases are
all Windows Cp1252 which also include the euro symbol.

I also forgot to mention we put an explicit filter on all inbound requests
that set the inbound encoding to utf-8. Try adding this filter to web.xml


Set Character Encoding

com.qas.newmedia.common.filters.SetCharacterEncodingFilter

encoding
UTF-8



with the code ...

/*
 * $Header:
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/SetCha
racterEncodingFilter.java,v 1.1 2001/07/24 00:26:55 craigmcc Exp $
 * $Revision: 1.1 $
 * $Date: 2001/07/24 00:26:55 $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   "This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *Foundation" must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called "Apache"
 *nor may "Apache" appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * .
 *
 * [Additional notices, if required by prior licensing conditions]
 *
 */


package com.qas.newmedia.common.filters;


import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
impor

RE: JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Chris Ward


Thanks again.

I'm showing my ignorance now but I don't know what a 2.4 XSD
is let alone if I should have one or not!  I did Google it 
but don't have time to reas all that came back!  It's sitting on the
printer now.

I see mention of XMLSchema in there - which is something I'm not
currently making use of in my code.


> 
> If you have a 2.4 XSD in web.xml, the EL is turned on by
> default. Also for jstl 1.1, tlds are already included in the 
> jars, so no need to copy them to your web-inf
> 
> On Tue, 31 Aug 2004 12:56:56 +0100, Chris Ward
> <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > > make sure u modify your web.xml with something like
> > >
> > > http://java.sun.com/xml/ns/j2ee";
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
> > > version="2.4">
> > 

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



SSL Discoveries

2004-08-31 Thread Bill Barrington
  If you are using SSL with Tomcat, you should probably read this. I got no responses 
to my earlier postings, but it's possible this could save you some time in the future. 
Or it could be that my experience is totally unique (but that is hard for me to 
believe).

  I finally got SSL working with Tomcat by blowing away my keystore and starting over 
from scratch. I discovered some things along the way. Tomcat doesn't actually care if 
you have a key with an alias of 'tomcat'. I created a key (the only entry in the 
keystore) with an alias of 'woof' and Tomcat was quite happy with that. The SSL 
connector initialized fine.

  If you enter 'https://localhost:8443' (or whatever your SSL port is) in a browser 
and view the certificate, it will show the certificate with the alias of 'woof'.

  Now add another key with an alias of 'tomcat' and bring up the browser again and 
view the certificate.  It will show the one with the alias of 'tomcat'.

  If you then delete all entries from the keystore and restart Tomcat, it will go into 
an infinite loop trying to initialize the SSL connector.  Now add a key (any key) and 
it will come up, no problem.

  Tomcat appears to only care that you do have a keystore with at least one key in it. 
Doesn't really care what that key is, just a non-empty keystore to make it happy.
  
  I did save all of my existing keys before I blew away my keystore and started over. 
I imported them back into the new keystore and everything was fine. At first I thought 
that maybe a key was corrupted, but that does appear to be the case.

  I'm running Tomcat 5.0.27 & JDK 1.4.2_03.





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



Functionality of for Servlets

2004-08-31 Thread Gunnar Brading
I have been in need of using the  tag in a Tomcat-only 
environment... Is this possible? Reading the source indicates that it 
wouldn't be possible to get the information about the role the context 
currently is in. Using the requests in-role methods of course tells me about
the user, and not the context.

Have I come to the right conclusion?
Reading the specs tells me that the functionality is meant for 
transferring roles to EJB's. Some documentation I found at Sun indicates 
though that even web-applications should be able to use this.

Anyone got more information about this?
Cheers,
-- gunnar
--
Gunnar Brading, Astrogator AB - High Performance Networks & Interactive Media
 Email; [EMAIL PROTECTED]  Address; Rorstrandsgatan 30A, 113 40 STOCKHOLM
   Office: +46 8 5456 0010 Fax: +46 8 5456 0011 Cellular: +46 70 778 2 877
The scientist describes what is; the engineer creates what never was
- Theodore von Karman


smime.p7s
Description: S/MIME Cryptographic Signature


AW: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

Forgot to enableLookups="true" on the Connector.  By default it is set
to false :)
-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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]



Re: Reading Servlet OutputStream

2004-08-31 Thread John Villar
Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:
This question is is more on the Servlet API. 


I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 


These are some of the things I have tried.
1)   I have a Wrapper which extends HttpServletResponseWrapper
2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));
Reader reader = new StringReader(printWriter.toString());
   BufferedReader bufferedReader = new BufferedReader(reader);
   String line;
   while ((line = bufferedReader.readLine()) != null) {
 System.out.println("line : " + line);
   }
3) bufferedReader.close();

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 


Any pointers.

-- Nitin
 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Tomcat Holding Database Open??????

2004-08-31 Thread Parsons Technical Services
Mike,

You may want to post some code and let us take a look. May be the simplest
solution to get you going. There is a chance that you are not closing the
connection properly and it is being held open. There can also be database
issues as well (I think someone mentioned this).

Doug
www.parsonstechnical.com


- Original Message - 
From: "Michael McQuade" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 9:23 AM
Subject: Re: Tomcat Holding Database Open??


> Please forgive me,  I dont even understand a lot of these responses,   Im
a
> mainframe Cobol coder here,   not a Java person,  but Im using a Converter
> that converts Cobol to Java Anyways,  I am pretty sure it has to be
> Tomcat doing this,  because my Application ran just fine,   using MySQL,
> and JDBC driver in a Web Server called OmniCron  in CGI format.
> The only thing different now is,  Im trying to run SERVLETS using
> Apache/Tomcat.  At the Start of  each Servlet I do  a connect to
> database
> CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan'
>
> DRIVER 'com.mysql.jdbc.Driver'
>
> Then do my processing and then do a DISCONNECT ALL..
>
> It just does not make sense I can connect ONE TIME only when running a
> Servlet and have to back out of app,  STOP,  START,  and go back in,   to
> get another one time connection.the 08002, connection name in use,
> to me,   points to Tomcat ..
>
> But as I said,  Im just a baby in diapers to this world..  I believe
its
> something in one of the .xml files,   but I have no idea.
>
> As for Connection Pooling,is that for a system taking large numbers of
> hits on it?  Right now, Im just one guy trying to make one connection
> work.
>
> Thank you for being patient.
>
> Mike
>
>
>
>
>
> " <[EMAIL PROTECTED]>
>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 31, 2004 8:55 AM
> Subject: Re: Tomcat Holding Database Open??
>
>
> > On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
> > : It appears to me, and god knows Im REAL knew to this world,  that
Tomcat
> is somehow holding my database open..  not releasing it on
> DISCONNECT.
> > :
> > : DOES anyone have any idea, I have been at this for a week, day and
> night, to no avail..  Im desperate for some sound guidance.
> >
> > A couple of questions:
> > are you explicitly closing those DB connections?
> > are you pooling your connections?
> >
> > -QM
> >
> > -- 
> >
> > software  -- http://www.brandxdev.net
> > tech news -- http://www.RoarNetworX.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]



AW: JSP/HTML Encoding

2004-08-31 Thread Ben Bookey
Hi Allistair,

Where can I set this JVM property exactly ?
Thanks in advance.
Ben
p.s. I am beginning to think that my problem is associated with working with
HTML framesets(with possible mixtures of html encoding).

-Ursprüngliche Nachricht-
Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 31. August 2004 17:08
An: Tomcat Users List; [EMAIL PROTECTED]
Betreff: RE: JSP/HTML Encoding


make sure also that you set file.encoding=utf8 in tomcat's startup options
so that the jvm also operates in that mode.

ADC

> -Original Message-
> From: Ben Bookey [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 16:00
> To: Tomcat User List
> Subject: JSP/HTML Encoding
>
>
>
>
> Dear List,
>
> I am having unexpected results when setting the encoding of my
> inputForm.jsp, to iso-8859-15 (changing from
> iso-8859-15 to iso-8859-1 will allow me to use the Euro
> symbol and a few
> others). When i give a Euro symbol into a form input control,
> the client
> ends up saving a question-mark instead, which is exactly what
> happens then I
> leave the standard iso-8859-1 encoding(the jsp default). I am
> using Tomcat 5
> and Internet Explorer 6.x which supports charset=iso-8859-15.
>
> Here is my jsp page header attributes.
>
> <%@ page language="java" errorPage="myErrorPage.jsp"
> pageEncoding="iso-8859-15" contentType="text/html;
> charset=iso-8859-15"%>
>
> If by setting the above jsp attributes, do I still need to
> set (inside the
>  tag) like this ?
>
> 
>
> Another factor which might be affecting the encoding of my
> input form, is
> that its a page within a frameset, and it could be that the
> parent frame
> HTML page might be incorrectly pre-determining the encoding
> of the whole
> frameset overriding the child frame settings.
>
>
> kind regards,
> Ben Bookey
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Reading Servlet OutputStream

2004-08-31 Thread Nitin Mulimani
This question is is more on the Servlet API. 

 

I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 

 

These are some of the things I have tried.

1)   I have a Wrapper which extends HttpServletResponseWrapper

2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));

Reader reader = new StringReader(printWriter.toString());

BufferedReader bufferedReader = new BufferedReader(reader);

String line;

while ((line = bufferedReader.readLine()) != null) {

  System.out.println("line : " + line);

}

3) bufferedReader.close();

 

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 

 

Any pointers.

 

-- Nitin



RE: JAVA_OPT with service

2004-08-31 Thread David Morris
Sloan, 

You should find what you need here:

http://jakarta.apache.org/commons/daemon/procrun.html

Look in the registry for the parameter keys:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\\Parameters

JVM Option Number 0 to the first parameter.
JVM Option Number 1 to the second parameter.
JVM Option Count (DWORD) is the number of parameters.

David Morris

-Original Message-
From: Seaman, Sloan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 30, 2004 1:04 PM
To: 'Tomcat Users List'
Subject: JAVA_OPT with service


How do I set the JAVA_OPT when I'm running tomcat 5 as a service?

I need to set: JAVA_OPTS=-Djava.security.auth.login.config=etc

--
Sloan


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



RE: JSP/HTML Encoding

2004-08-31 Thread Allistair Crossley
make sure also that you set file.encoding=utf8 in tomcat's startup options so that the 
jvm also operates in that mode.

ADC

> -Original Message-
> From: Ben Bookey [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 16:00
> To: Tomcat User List
> Subject: JSP/HTML Encoding
> 
> 
> 
> 
> Dear List,
> 
> I am having unexpected results when setting the encoding of my
> inputForm.jsp, to iso-8859-15 (changing from
> iso-8859-15 to iso-8859-1 will allow me to use the Euro 
> symbol and a few
> others). When i give a Euro symbol into a form input control, 
> the client
> ends up saving a question-mark instead, which is exactly what 
> happens then I
> leave the standard iso-8859-1 encoding(the jsp default). I am 
> using Tomcat 5
> and Internet Explorer 6.x which supports charset=iso-8859-15.
> 
> Here is my jsp page header attributes.
> 
> <%@ page language="java" errorPage="myErrorPage.jsp"
> pageEncoding="iso-8859-15" contentType="text/html; 
> charset=iso-8859-15"%>
> 
> If by setting the above jsp attributes, do I still need to 
> set (inside the
>  tag) like this ?
> 
> 
> 
> Another factor which might be affecting the encoding of my 
> input form, is
> that its a page within a frameset, and it could be that the 
> parent frame
> HTML page might be incorrectly pre-determining the encoding 
> of the whole
> frameset overriding the child frame settings.
> 
> 
> kind regards,
> Ben Bookey
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



IllegalStateException from java.nio.charset.CharsetEncoder

2004-08-31 Thread Greg Ward
On one of our servers, we're using Tomcat 4.1.29 under Java 1.4.2_02,
connecting to Apache 2.0.48 with mod_jk 1.2.4, all running on Red Hat
Linux 6.2.  (Wow, what a zoo of version numbers!)

Recently we got a support call because some (all?) HTTP requests were
failing with "Internal Server Error".  The support tech who took the
call noticed this in mod_jk's log file:

[Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1309)]: sending request to tomcat failed 
in send loop. err=2
[Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1318)]: Error connecting to tomcat. 
Tomcat is probably not started or is listening on the wrong port. Failed errno = 104 

(Errno 104, for the curious, is ECONNRESET -- "Connection reset by
peer".)

He tried restarting Tomcat, which sounds like the right thing to me.
That didn't help, so then he tried restarting Apache.  Still nothing, so
he rebooted the server, after which things started working again.
H.

Looking in catalina.out after the reboot, I saw this stack trace:

  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:358)
  at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:414)
  at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)
  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:483)
  at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:253)
  at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:191)
  at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:479)
  at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
  at java.lang.Thread.run(Thread.java:534) 

Of course, catalina.out is clobbered with every Tomcat restart, so
there's no way of knowing if this exception is actually the cause of the
problem, i.e. if it was happening before the first Tomcat restart.
Nevertheless, I poked around a bit and stumbled across these two entries
in Tomcat's bug database:

  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7725
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6519

Both of these have a *nearly* identical stack trace (the connector is
different -- org.apache.catalina.connector.http.HttpProcessor vs
org.apache.ajp.tomcat4.Ajp13Processor in my example) that ends with the
same IllegalStateException.  Both are about 2 years old, around the time
that Tomcat 4.0 and Java 1.4 were in beta.  And it sorta-kinda-vaguely
sounded like the bug(s), whatever they were, have been fixed.

First of all, from those two bug reports, it's not clear if this is a
Tomcat bug or a Java bug.  Second of all, has anyone else seen this on
stable, mature versions of Tomcat 4.0 and Java 1.4 (ie. 4.0.29 and
1.4.2_02)?

Thanks --

Greg

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



RE: JSP/HTML Encoding

2004-08-31 Thread Allistair Crossley
we've got euro working using utf-8 page/char encoding. You can also use Cp1252 on 
Windows.

ADC

> -Original Message-
> From: Ben Bookey [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 16:00
> To: Tomcat User List
> Subject: JSP/HTML Encoding
> 
> 
> 
> 
> Dear List,
> 
> I am having unexpected results when setting the encoding of my
> inputForm.jsp, to iso-8859-15 (changing from
> iso-8859-15 to iso-8859-1 will allow me to use the Euro 
> symbol and a few
> others). When i give a Euro symbol into a form input control, 
> the client
> ends up saving a question-mark instead, which is exactly what 
> happens then I
> leave the standard iso-8859-1 encoding(the jsp default). I am 
> using Tomcat 5
> and Internet Explorer 6.x which supports charset=iso-8859-15.
> 
> Here is my jsp page header attributes.
> 
> <%@ page language="java" errorPage="myErrorPage.jsp"
> pageEncoding="iso-8859-15" contentType="text/html; 
> charset=iso-8859-15"%>
> 
> If by setting the above jsp attributes, do I still need to 
> set (inside the
>  tag) like this ?
> 
> 
> 
> Another factor which might be affecting the encoding of my 
> input form, is
> that its a page within a frameset, and it could be that the 
> parent frame
> HTML page might be incorrectly pre-determining the encoding 
> of the whole
> frameset overriding the child frame settings.
> 
> 
> kind regards,
> Ben Bookey
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: How to view what is sent to the browser

2004-08-31 Thread John Villar
you could also use pageContext.pushBody(new BadWordsFilterWriter())
Shapira, Yoav escribió:
Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you get from the
response, write to a StringWriter, and at the end of your servlet
processing write the contents of this StringWriter both to a log and to
the response's output writer.
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 11:08 AM
To: Tomcat Users List
Subject: How to view what is sent to the browser
I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual
filter)
once I get the response, is there a way to manipulate it before it is
   

sent
 

to the browser?
Thanks,
James

-
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]

 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

JSP/HTML Encoding

2004-08-31 Thread Ben Bookey


Dear List,

I am having unexpected results when setting the encoding of my
inputForm.jsp, to iso-8859-15 (changing from
iso-8859-15 to iso-8859-1 will allow me to use the Euro symbol and a few
others). When i give a Euro symbol into a form input control, the client
ends up saving a question-mark instead, which is exactly what happens then I
leave the standard iso-8859-1 encoding(the jsp default). I am using Tomcat 5
and Internet Explorer 6.x which supports charset=iso-8859-15.

Here is my jsp page header attributes.

<%@ page language="java" errorPage="myErrorPage.jsp"
pageEncoding="iso-8859-15" contentType="text/html; charset=iso-8859-15"%>

If by setting the above jsp attributes, do I still need to set (inside the
 tag) like this ?



Another factor which might be affecting the encoding of my input form, is
that its a page within a frameset, and it could be that the parent frame
HTML page might be incorrectly pre-determining the encoding of the whole
frameset overriding the child frame settings.


kind regards,
Ben Bookey



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



Re: How to view what is sent to the browser

2004-08-31 Thread John Villar
well you could get the request object and search all the parameters 
sent by the client to filter them

James Sherwood escribió:
I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual filter)
once I get the response, is there a way to manipulate it before it is sent
to the browser?
Thanks,
James

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

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

RE: How to view what is sent to the browser

2004-08-31 Thread Shapira, Yoav

Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you get from the
response, write to a StringWriter, and at the end of your servlet
processing write the contents of this StringWriter both to a log and to
the response's output writer.

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: James Sherwood [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 31, 2004 11:08 AM
>To: Tomcat Users List
>Subject: How to view what is sent to the browser
>
>I am looking for a way to view what is being sent to the browser in the
>servlet.
>
>Lets say I want to create a bad word filter(and cannot use an actual
>filter)
>
>once I get the response, is there a way to manipulate it before it is
sent
>to the browser?
>
>Thanks,
>James
>
>
>
>-
>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]



How to view what is sent to the browser

2004-08-31 Thread James Sherwood
I am looking for a way to view what is being sent to the browser in the
servlet.

Lets say I want to create a bad word filter(and cannot use an actual filter)

once I get the response, is there a way to manipulate it before it is sent
to the browser?

Thanks,
James



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



Re: Tomcat 5 & Crystal Reports

2004-08-31 Thread Brent Sims
Use CR version 9+ -- it provides a tag library and supporting files that allow you to 
include your report in a jsp or servlet.  You'll still need an ODBC definition to 
create the report against but this should not be a problem as long as the ODBC def and 
the JNDI resource share the same name.
 
Now, if someone has a fix/answer to the problem I've been banging my head against of 
only being able to run the report once (subsequent attempts cause something along the 
lines of a ZipExtraction exception), I'd certainly appreciate a clue or three
 
Brent Sims
Systems Analyst 2
KC Human Services
-
Road rage, air rage.  Why should I be forced to divide my rage into separate 
categories?  To me, it's just one big, all-round, everyday rage.  I don't have time 
for fine distinctions.  I'm too busy screaming at people.
 - George Carlin

>>> [EMAIL PROTECTED] 8/31/2004 12:02:09 AM >>>


Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want to do is 
reading from a database to a report made with CR using a Tomcat datasource. The 
problem is that CR can't find it (using jndi); i get a message saying that CR is 
unable to find the resource. The datasource is well defined (i think so because a jsp 
can use it correctly).

Does anybody know if is there problem between Tomcat 5 and Crystal Reports? Is there 
any one that have configured it yet?

Thanks in advance, 

Javier Polo.




Re: Tomcat 4.1.29 - Special chars in a file name

2004-08-31 Thread Surendra Kumar
Hi Greg
I tried with test%2B.gif also.  If the file is located in Apache, it
docodes properly.
But if the file is in Tomcat, it throws resource not available
error.

-Surendra

- Original Message -
From: "Greg Ward" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 8:02 PM
Subject: Re: Tomcat 4.1.29 - Special chars in a file name


> On 31 August 2004, Surendra Kumar said:
> > Hi
> >I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have
a file named "test+.gif"
>
> Probably a URL encoding problem -- if a web page includes
>
>   
>
> then the browser will ask for "test .gif", because "test+.gif" is one of
> the ways to encode "test .gif" so it's a legal URL.  (The other is
> "test%20.gif".)
>
> Whatever code is generating
>
>   
>
> is wrong -- it should be
>
>   
>
> which the browser will decode to "test+.gif".
>
> Greg
>
> -
> 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]



RE: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]
If I log onto the server running my tomcat installation and perform an
nslookup on the ip that is sending the request it resolves.  Running
tomcat 5.0.27 as a service.

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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]



Re: Tomcat 4.1.29 - Special chars in a file name

2004-08-31 Thread Greg Ward
On 31 August 2004, Surendra Kumar said:
> Hi
>I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have a file 
> named "test+.gif"

Probably a URL encoding problem -- if a web page includes

  

then the browser will ask for "test .gif", because "test+.gif" is one of
the ways to encode "test .gif" so it's a legal URL.  (The other is
"test%20.gif".)

Whatever code is generating 

  

is wrong -- it should be

  

which the browser will decode to "test+.gif".

Greg

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



Re: Access Log Valve

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
:   I have enabled access logging by uncomment the Access Log Valve in the
: server.xml file.  I have added the resolveHosts attribute and set it to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log file
: I only get an ip address per request.  Any ideas on why I am not able to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

   Hi,
  I have enabled access logging by uncomment the Access Log Valve in the
server.xml file.  I have added the resolveHosts attribute and set it to
true.  I have also changed the pattern attribute to %h so that I can
just get the  Remote host name in the log file.  In the access log file
I only get an ip address per request.  Any ideas on why I am not able to
resolve host names?
Thanks,
Andrew





Re: Tomcat Server Status

2004-08-31 Thread sergio ulloa
On tomcat index.jsp click on status.  To login you must create a user with
"manager" rol. After this is done you will see the status of your server
- Original Message - 
From: "Kashif Siddiqui" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 6:54 AM
Subject: Tomcat Server Status


> Hi all,
>
> I am sucessfully running Tomcat server, now I want to
> know that is there any way to get Tomcat server's
>
> 1. Server's Status
> 2. Start Time
> 3. Server uptime
> 4. Current requests on server
>
> Thanks in advance...
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> -
> 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 4.1.29 - Special chars in a file name

2004-08-31 Thread Surendra Kumar
Hi
   I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have a file named 
"test+.gif"
   When i try to access this gif file, tomcat throws "resource not available message". 
All other gif files in the same
   dir are accessible. Even the directory listing shows the file is available. But 
when i select that file it's failing.
   I have tried encoding the url also, but it not working .

Does any one know how to access this file ?

Thanks
Surendra

Re: Tomcat Admin Tools Page

2004-08-31 Thread sergio ulloa
add these two lines in tomcat-users.xml file
  

  


- Original Message - 
From: "Kashif Siddiqui" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 4:54 AM
Subject: Tomcat Admin Tools Page


> Hi all,
> 
> I have sucessfully installed and running Tomcat
> server, it is working fine. But I want to know a
> thing:
> 
> Here is a Admin page and I want to login to this page,
> plz tell me that what username and password I should
> use to login to this page.
> 
> http://localhost:/admin/login.jsp
> 
> Thanks in advance, for your guidance...
> 
> 
> 
> 
> 
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> 
> -
> 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]



Re: Tomcat Holding Database Open??????

2004-08-31 Thread John Villar

: Please forgive me,  I dont even understand a lot of these responses,   Im a
: mainframe Cobol coder here,   not a Java person,  but Im using a Converter
: that converts Cobol to Java
 

LOL that's the proof that someone still writes on COBOL. 
seriously, using "Converters" or interpreters is a risky business when 
you're trying to implement something so tightly tied to a language like 
JSP or Servlets, factor that magnifies when you're writing mission 
critical apps (as i can guess from you writing on cobol, you're trying 
to develop some financial app). Search Amazon or O'Reilly for java 
books, they have lots and most of them can help you... also, tutorials 
at http://java.sun.com may help you

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

RE: Tomcat Holding Database Open??????

2004-08-31 Thread Chris Ward

Hi Mike,

Some thoughts.  If anyone sees errors please let me know - 
it may save me time in the long run!


> Tomcat doing this,  because my Application ran just fine,   
> using MySQL,
> and JDBC driver in a Web Server called OmniCron  in CGI 

If I recall correctly, the CGI approach throws everything
away after each request.  I moved from Perl CGI to Java 
Servlets a few years back partly to make use of the
load-once-then
-reuse aspect.  I think there was Mod Perl or something 
that sort of did this with Perl.

Any road up, you may find that that is why the CGI version
worked.  Maybe it was freeing/releasing things when the 
CGI script/prog finished each request.  You got a virgin
state every time.

> format. The only thing different now is,  Im trying to 
> run SERVLETS using Apache/Tomcat.  At the Start of  each 
> Servlet I do  a connect to database CONNECT TO 
> 'jdbc:mysql://127.0.0.1:3306/Imagescan'
> 
> DRIVER 'com.mysql.jdbc.Driver'
> 
> Then do my processing and then do a DISCONNECT ALL..


Are you sure the disconnect all is being fired when
you think it is?

Also, is there any chance the the disconnect all is
freeing something you later depend on in subsequent 
requests?  For example, do you have an init() method
in your servlet that (initially) creates/connects,
and the doGet/doPost then uses the connection?

If this is the case, check the disconnect all is not
closing/nullifying the connections since the init()
won't get fired again.  This might explain why the CGI
implementation did make it through.


> It just does not make sense I can connect ONE TIME only when running a
> Servlet and have to back out of app,  STOP,  START,  and go 
> back in,   to
> get another one time connection.the 08002, connection 
> name in use,
> to me,   points to Tomcat ..

> But as I said,  Im just a baby in diapers to this world.. 
>  I believe its
> something in one of the .xml files,   but I have no idea.

I don't know for sure - but it sounds like the sort
of right-of-passage problem most of us have had when
first starting with servlets.

I'd recommend gratuitous use of;

System.err.println( "Now executing {your method name}
");

then stare at the console window for Tomcat to see what's being
executed.  It's always my last port of call for this sort of
thing.

> As for Connection Pooling,is that for a system taking 
> large numbers of
> hits on it?  Right now, Im just one guy trying to make 
> one connection work.

I use connection pooling on my intranet site which has 
low traffic but large/complex applications on the server.

I use it for two reasons;

a) It shifts some of the work to a thirdparty 
   bunch of code that I didn't have to write
b) Saves time on the creation/connection cycle
   for DB-centric applications.

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



Re: Tomcat Installation Script

2004-08-31 Thread Kimmy Lin
Many thanks Yoav!

- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 8:59 AM
Subject: RE: Tomcat Installation Script


>
> Hi,
> Yeah: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-5/tomcat.nsi.
>
> Yoav Shapira
> Millennium Research Informatics
>
>
> >-Original Message-
> >From: Kimmy Lin [mailto:[EMAIL PROTECTED]
> >Sent: Monday, August 30, 2004 5:09 PM
> >To: Tomcat Users List
> >Subject: Tomcat Installation Script
> >
> >Hi,
> >
> >I am trying to put Tomcat as part of my program installation on
> >a Windows system and would like to change the script a little bit.
> >
> >I understand that Apache Tomcat uses NSIS (Nullsoft Scriptable
> >Install System) for their Windows installer. Can anyone tell me
> >whether, where, and how I can get this script?
> >
> >Thanks a lot!
> >
> >Kimmy
> >
> >-
> >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]
>
>


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



Re: Tomcat Holding Database Open??????

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 09:23:56AM -0400, Michael McQuade wrote:
: Please forgive me,  I dont even understand a lot of these responses,   Im a
: mainframe Cobol coder here,   not a Java person,  but Im using a Converter
: that converts Cobol to Java

Code-generation tools come with their own quirks and headaches.

Aside from that, you'd do well to get some serious Java study time or,
barring that, work with an experienced Java architect/developer who can
guide you through a project or two.



-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Problem setting custom Policy object in ServletContextListener

2004-08-31 Thread william
Basically, I am trying to install a custom Policy class on a web app running
within a Tomcat 4.1.27 container.
To do so, I have registered a ServletContextListener in the web.xml and I am
calling Policy.setPolicy(new rbac.MyPolicy()) from within the
contextInitialized method. Later I use the standard JAAS calls to check
permissions.

Everything works well on an XP tomcat installation. However, as soon as I
deploy to Solaris 2.8, strange behavior appears. It seems that the Policy
class is being modified so that the following calls made from a jsp

<% Policy.getPolicy() instanceof rbac.MyPolicy %> <%
Policy.getPolicy().getClass().getName().equals("rbac.MyPolicy") %>

return inconsistent values. The first returns false while the second returns
true!

If I delay the policy installation to a later point in the application
lifecycle (i.e. call setPolicy from within a servlet filter instead of
setting the Policy, the problem disappears. However, I would like to avoid
the extra overhead of filtering each request.

I am not running tomcat with the security manager. 
I would be grateful to anyone offering a remedy or suggestions.

Thanks,
// William.

[EMAIL PROTECTED]
ncubeAIT Development


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



Re: Tomcat Holding Database Open??????

2004-08-31 Thread Michael McQuade
Please forgive me,  I dont even understand a lot of these responses,   Im a
mainframe Cobol coder here,   not a Java person,  but Im using a Converter
that converts Cobol to Java Anyways,  I am pretty sure it has to be
Tomcat doing this,  because my Application ran just fine,   using MySQL,
and JDBC driver in a Web Server called OmniCron  in CGI format.
The only thing different now is,  Im trying to run SERVLETS using
Apache/Tomcat.  At the Start of  each Servlet I do  a connect to
database
CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan'

DRIVER 'com.mysql.jdbc.Driver'

Then do my processing and then do a DISCONNECT ALL..

It just does not make sense I can connect ONE TIME only when running a
Servlet and have to back out of app,  STOP,  START,  and go back in,   to
get another one time connection.the 08002, connection name in use,
to me,   points to Tomcat ..

But as I said,  Im just a baby in diapers to this world..  I believe its
something in one of the .xml files,   but I have no idea.

As for Connection Pooling,is that for a system taking large numbers of
hits on it?  Right now, Im just one guy trying to make one connection
work.

Thank you for being patient.

Mike





" <[EMAIL PROTECTED]>

To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 8:55 AM
Subject: Re: Tomcat Holding Database Open??


> On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
> : It appears to me, and god knows Im REAL knew to this world,  that Tomcat
is somehow holding my database open..  not releasing it on
DISCONNECT.
> :
> : DOES anyone have any idea, I have been at this for a week, day and
night, to no avail..  Im desperate for some sound guidance.
>
> A couple of questions:
> are you explicitly closing those DB connections?
> are you pooling your connections?
>
> -QM
>
> -- 
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.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]



Re: Tomcat Server Status

2004-08-31 Thread Ronald Klop
On Tue Aug 31 13:14:22 CEST 2004 Kashif Siddiqui <[EMAIL PROTECTED]> wrote:
Thank you very much for guidance,
but this page don't show StartTime/UpTime of Tomcat
Server...
http://localhost:/manager/html
Is there any way to get it.

I use a ServletContextListener for this. It has a 'static long startTime = 
System.currentTimeMillis();' or something like that. I can query this from a jsp or 
servlet.
Ronald.



AW: Problem with session counting

2004-08-31 Thread Michael Sudkamp
Before calling session.invalidate() I now interrupt the thread which causes a database 
rollback. Now my JMeter-Tests run fine.

> 
> As for stopping the thread "before invalidating a session," 
> how will you
> control that?  You could perform this action as part of the general
> "logout" page, but what about people who simply let the sessions time
> out?

When the session times out, the DB cleanup is done in a valueUnbound() method of an 
appropriate session object. 

Michael


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



  1   2   >