RE: Precompiling JSP How To

2004-07-16 Thread Yansheng Lin
You can try to open up all the jsp pages one-by-one.  That way all the pages
get complied:).

Job security.

-Y

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED] 
Sent: July 16, 2004 10:34
To: Tomcat Users List
Subject: RE: Precompiling JSP How To



You can't. You need use Ant to do this.

Ta
Matt

-Original Message-
From: Hofmann, Benjamin [mailto:[EMAIL PROTECTED]
Sent: 16 July 2004 17:30
To: [EMAIL PROTECTED]
Subject: Precompiling JSP How To


How do I set up my Tomcat 5 to precompile all of my JSP files?

 

Thanks,

Ben



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



RE: bean problem

2004-06-22 Thread Yansheng Lin
Hi, 

You can rule out problems in the jsp page since it runs fine under
Tomcat-Standalone.

What connector are you using between Tomcat and Apache? Mod_jk2?

You need a connector to get the dynamic output part.

Hope it helps.

Yan

-Original Message-
From: Casas, Claudia [mailto:[EMAIL PROTECTED] 
Sent: June 22, 2004 14:20
To: Tomcat Users List
Subject: RE: bean problem


Actually, my real problem was that tomcat was running my html and jsp's
and apache only html. Since my jsp's contained some html, I thought they
were working, but the jsp part was not really being processed.

Here is a sample of my jsp code:
%@ page language=java %
%@ page import=java.sql.* %

jsp:useBean id=DB class=tools.DBBean scope=session /

html

headtitleAdministration Section/title/head

body link=#66 vlink=#66 alink=#66 leftmargin=0
topmargin=0

%
DB.connect();
String query = new String (select name, age from persons);
ResultSet rset = DB.executeQ(query);
%

div align=center
 center
table border=0 cellspacing=1 style=border-collapse: collapse
bordercolor=#C0C0C0 width=760 id=AutoNumber1
tr
td width=400 class=titleb Name/b/td
td width=330 class=titlebAge/b/td
td width=30nbsp;/td
 /tr
/table

table width=760 border=1 cellspacing=0 cellpadding=0
style=border-collapse: collapse bordercolor=#C0C0C0
%
while (rset.next()){
String myname=(rset.getString(1));
String age=(rset.getString(2));
%
tr
td width=400%= myname%nbsp;/td
td width=330%= age%nbsp;/td
/tr
%}%
/table
 /center
/div

/body
/html

-Original Message-
From: shiv juluru [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 22, 2004 12:13 AM
To: Tomcat Users List; deepak shripat mane
Subject: Re: bean problem

i am also gr\etting the same problem like u,
using tomcat jsps and htmls are working,but using apache onlu jsps are
working but not htmls.if u find the solution plz send me that solution.
 
thanks in advance,
shiva

deepak shripat mane [EMAIL PROTECTED] wrote:

Hii..

Can u tell me Wat is scope of beans in ur JSP Page. Can u send me ur
source code. If u not specified scope of beans then u have to specify
scope of beans


Deepak


On Mon, 21 Jun 2004 Casas,Claudia wrote :
Hello everyone,
I have managed to install tomcat4.1.30, apache2.0.49 and the jk1.2.5
connector.
I included inside my server.xml file a new context path so that I can
run my jsp application through my user directories.
Here is what I included:
reloadable=true crossContent=true

So now, I am able to run under /home/myuser/wwwdocs/test.jsp as
follows:
http://my.domain.com:8080/myuser/test.jsp or
http://my.domain.com/myuser/test/jsp
The both work ok.

I also have a jsp called list.jsp that uses a bean to connect to an
oracle database. When I run
http://my.domain.com:8080/myuser/admin/list.jsp everything works
perfect
and I get an html table with list of my records from my database. But
if
I run http://my.domain.com/myuser/admin/list.jsp, then the jsp works,
but I do get my html table but I do not get any records back at all.

The bean is inside
/home/myuser/wwwdocs/WEB-INF/classes/tools/dbbean.java, while the
list.jsp is only inside /home/myuser/wwwdocs/admin

 Does anyone know what is going on in here?


Technology does not drive change -- it enables change.  -- 












[input][input][input] 





 [input]   






















Copyright (c) 2004 Rediff.com India Limited. All Rights Reserved.










-
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

-
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: Corrupted UTF-8 JSPs?!

2004-06-10 Thread Yansheng Lin
developed locally, and then deployed remotely

Make sure on the remote system, the Java Runtime Environment supports UTF-8
and is using it as the default encoding(export
JAVA_OPTS=-Dfile.encoding=utf8).  

native2ascii UTF-8 encoded characters may help too.

Yan

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: June 10, 2004 14:00
To: Tomcat Users List
Subject: Corrupted UTF-8 JSPs?!


I'm running into a strange issue.

I have certain JSPs with UTF-8 encoded characters in them (polish 
characters, to be exact). My Ant build.xml precompiles the JSPs using 
Jasper and then packages the application into a WAR for deployment.

When I develop locally with Tomcat 5.0.18, I deploy without packaging 
into a WAR first. However, to deploy remotely, I create a WAR, then 
deploy from that.

Locally, the JSPs appear just as they should. After being packaged into 
a WAR (even if I deploy it locally to the exact same instance of Tomcat 
5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the 
same as it does when I override the page-provided UTF-8 encoding (in the 
browser) and manually set the encoding to ISO-8859-1.

What's going on here?! By the time that the JSPs are added to the WAR, 
they're binary .class files, since they are precompiled! Text encodings 
shouldn't make a bit of difference at that point, should they?!?

The JSPs loaded still tell the browser that the encoding is UTF-8 ... 
and UTF-8 characters in the .properties files (passed through 
native2ascii) are properly displayed.

It seems to me that something very strange is going on ... moreover, 
this is going to really throw a wrench in our project if we can't get to 
the bottom of it!

Respectfully,
Brice Ruth

-
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: Corrupted UTF-8 JSPs?!

2004-06-10 Thread Yansheng Lin
How did you create your war file then?  Through an IDE?

I looked up the man page for 'jar' command.  It's pretty straight-forward.
Are you compressing your class files?  That may modify the content of the
files.

Hope it helps

Yan

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: June 10, 2004 15:20
To: Tomcat Users List
Subject: Re: Corrupted UTF-8 JSPs?!


Thanks, but I believe the problem is in the WAR packaging, somehow ... 
because I develop locally, deploy w/o packaging and it works fine - if I 
package it up again and re-deploy LOCALLY, then I get garbage ...

native2ascii only works for properties files, as far as I've been able 
to determine. UTF-8 encoded JSPs have to have UTF-8 encoded characters, 
not the \u escaped characters that native2ascii creates. We only use 
native2ascii for our properties files

Yansheng Lin wrote:

developed locally, and then deployed remotely

Make sure on the remote system, the Java Runtime Environment supports UTF-8
and is using it as the default encoding(export
JAVA_OPTS=-Dfile.encoding=utf8).  

native2ascii UTF-8 encoded characters may help too.

Yan

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: June 10, 2004 14:00
To: Tomcat Users List
Subject: Corrupted UTF-8 JSPs?!


I'm running into a strange issue.

I have certain JSPs with UTF-8 encoded characters in them (polish 
characters, to be exact). My Ant build.xml precompiles the JSPs using 
Jasper and then packages the application into a WAR for deployment.

When I develop locally with Tomcat 5.0.18, I deploy without packaging 
into a WAR first. However, to deploy remotely, I create a WAR, then 
deploy from that.

Locally, the JSPs appear just as they should. After being packaged into 
a WAR (even if I deploy it locally to the exact same instance of Tomcat 
5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the 
same as it does when I override the page-provided UTF-8 encoding (in the 
browser) and manually set the encoding to ISO-8859-1.

What's going on here?! By the time that the JSPs are added to the WAR, 
they're binary .class files, since they are precompiled! Text encodings 
shouldn't make a bit of difference at that point, should they?!?

The JSPs loaded still tell the browser that the encoding is UTF-8 ... 
and UTF-8 characters in the .properties files (passed through 
native2ascii) are properly displayed.

It seems to me that something very strange is going on ... moreover, 
this is going to really throw a wrench in our project if we can't get to 
the bottom of it!

Respectfully,
Brice Ruth

-
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: A wired problem

2004-06-10 Thread Yansheng Lin
Post the code

-Original Message-
From: Zhang, Hong [mailto:[EMAIL PROTECTED] 
Sent: June 10, 2004 09:39
To: Tomcat Users List
Subject: A wired problem


Hi all,

I have a jsp page which gets form data and does update or insert these
data into database depending on the button type. But the wired thing is
that during run time code was chopped into pieces and each piece was
done twice. Then it looks like the whole jsp page was run twice.

Does anyone have this problem before? What is the cause?

Thanks in advance.

Hong


-
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: Page encodings

2004-06-10 Thread Yansheng Lin
What's your current solution?  Interceptor?

Servlet 2.3(Tomcat 4.0)+ supports filters.  You may want take a look.

There is lots of examples on using an Encoding Filter.

Yan

-Original Message-
From: Marcel Gosselin [mailto:[EMAIL PROTECTED] 
Sent: June 10, 2004 07:31
To: Tomcat Users (E-mail)
Subject: Page encodings


Hi everybody,

I have a few questions regarding character encodings in Tomcat.

Right now we`re using an old Tomcat version (3.2) but we think about
upgrading to a new version if it solves our problem in an easy way.

Is there a way to set Tomcat so that it both
- always sends the HTTP header about page encoding to UTF-8
- sends the page UTF-8 encoded
- gets the right characters when I use request.getParameters() or
request.getParameterValues()

I would like to prevent changing all the JSP pages to add
response.setCharacterEncoding(UTF-8)
and change every HTML form to specify that we expect UTF-8 at the other end.

Thanks a lot

Marcel Gosselin

-
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 change Tomcat's default character encoding?

2004-05-27 Thread Yansheng Lin
From Javadoc for OutputStreamWriter:

An OutputStreamWriter is a bridge from character streams to byte streams:
Characters written to it are encoded into bytes using a specified charset.
The charset that it uses may be specified by name or may be given
explicitly, or the platform's default charset may be accepted.

So the answer is verdor-specific.  Of course, you can tell javac and java
runtime to use the desired encoding, but that's not fool-proof.

To do a conversion from one encoding to another, you can use the new
String(oldBytes, charset) constructor.  You can implement that in your
customized Writer.

Hope it helps:).

-Yan

-Original Message-
From: rlipi [mailto:[EMAIL PROTECTED] 
Sent: May 27, 2004 03:20
To: 'Tomcat Users List'
Subject: RE: Can I change Tomcat's default character encoding?


Thank you for the answer.

I know about this possibility using filters (and I have done something).


But the original question (and my question) is about simpler way: Is it
possible to globally set (somewhere in JVM or Tomcat configuration)
default character encoding for all created Writers?

Lipi


 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 26, 2004 7:45 PM
 To: 'Tomcat Users List'
 Subject: RE: Can I change Tomcat's default character encoding?
 
 Hi, quick response, you can use your own customized
OutputStreamWriter.
 You
 need to extend the abstract class ServletOutputStream.  And you
integrate
 your customized writer with tomcat by implementing a filter.
 
 For more info on how to use filters, you can do a search on google.
 
 This will only work for Tomcat 4 and up, or any other container that
 implement Servlet 2.3 and up.
 
 -Yan
 




-
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 change Tomcat's default character encoding?

2004-05-26 Thread Yansheng Lin
Hi, quick response, you can use your own customized OutputStreamWriter.  You
need to extend the abstract class ServletOutputStream.  And you integrate
your customized writer with tomcat by implementing a filter.  

For more info on how to use filters, you can do a search on google.

This will only work for Tomcat 4 and up, or any other container that
implement Servlet 2.3 and up.

-Yan

-Original Message-
From: rlipi [mailto:[EMAIL PROTECTED] 
Sent: May 26, 2004 00:49
To: 'Tomcat Users List'
Subject: RE: Can I change Tomcat's default character encoding?


 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 25, 2004 11:57 PM
 To: 'Tomcat Users List'
 Subject: RE: Can I change Tomcat's default character encoding?
 
 Also you may have to change
 your
 OS default locale since JVM and Java Runtime uses system default
language
 environment.
 

Is there any way to set default encoding for created writers? For
instance - class OutputStreamWriter has constructors with or without
charset parameter. If no charset is specified, the default one will be
used.
 
And it depends on the system. It makes problems when same (web)
application should run on different platforms (Windows, Linux, etc.). 

I have not system under my control but I have Tomcat web servers under
control. 

So, question is - can I configure JAVA VM (or Tomcat itself) to create
OutputStreamWriter(s) with my default character encoding?

Thank you,
Lipi.



-
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: API for authenticating user

2004-05-25 Thread Yansheng Lin
Hi,

Sorry, I might've misunderstood you.  Are you saying that even after a user
has loged in, they will still be prompted for log in information if they try
to go to another page during the same sessions?   That's weird..., because
if you have your session set up right, tomcat will remember the subsequent
requests from the same user.

Or are you trying to remember the user for the following sessions as well?
That would be platform-dependent since you will have to store user's
information locally on the client side.

Can you clarify your question?

Thanks

Yan

-Original Message-
From: Koji Sekiguchi [mailto:[EMAIL PROTECTED] 
Sent: May 23, 2004 21:14
To: [EMAIL PROTECTED]
Subject: API for authenticating user


Hi,

I'd like to know how to authenticate a new user when
he/she subscribe his/herself so that he/she can
avoid login procedure.

I've successfully set up Form Authentication
and JDBC Realm on Tomcat 5.0.24. But now, new users
must visit login page to authenticate themselves
after subscribing. I'd like to reduce the login step
for subscribers if session continues.

I think I have to use a couple of Tomcat API
and save principal information into the user session, right?

regards,

Koji


-
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 change Tomcat's default character encoding?

2004-05-25 Thread Yansheng Lin
Tomcat uses parameter javaEncoding in $TOMCAT_HOME/conf/web.xml to define
Java file encoding.  The default is utf-8.  You can change it to your
preferred encoding so that the compiled java source from jsp file will use
your encoding.

You may have to define a encoding filter.  Also you may have to change your
OS default locale since JVM and Java Runtime uses system default language
environment.

It all depends on your system.

Hope it helps:).

-Yan

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: May 24, 2004 03:59
To: [EMAIL PROTECTED]
Subject: Can I change Tomcat's default character encoding?


We are having a host of problems with character encoding at the moment.
Somehow between the UI and the Struts Action our euro symbols are being
turned into question marks. I have fiddled with the JVM file.encoding, using
JSP page directives for content type and much else besides. I thought Java
strings were UTF-8 by default.

Anyway, I stripped off the JSP page directive for encoding and it appears
the tomcat default becomes Latin 1 ISO-8859-1. The euro character does not
appear in this charset and I need Cp1252 to be default. 

Can I change Tomcat's default charset?

Thanks ADC


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
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: Problem with error-page

2004-05-20 Thread Yansheng Lin
Class names must be a legal Java identifier, i.e., starts with a letter, $,
or _.

-Yan

-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED] 
Sent: May 20, 2004 12:50
To: 'Tomcat Users List'
Subject: Problem with error-page


 I am trying to configure a custom error page when users try to access an
area of my site that they don't have sufficient rights to access.

The book says this to configure this in web.xml:

error-page
error-code403/error-code
location/error/403.jsp/location
/error-page

This doesn't work for me, but

error-page
error-code403/error-code
location/error/403.html/location
/error-page

Does work.  Is there a problem with using JSP's.


I'm am using JBOSS with Tomcat, but that shouldn't matter.  It's still the
Tomcat engine.  I'm also using Struts.

I'm using Tomcat 4.1.24.

Anybody have troublem with this out there?

Thanks


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


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



RE: Problem with error-page

2004-05-20 Thread Yansheng Lin
Doooh. My quick guess was not right, then:).

Sorry.

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: May 20, 2004 14:48
To: 'Tomcat Users List'
Subject: RE: Problem with error-page


DOH!  prepend is what I meant to say.

 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 3:45 PM
 To: 'Tomcat Users List'
 Subject: RE: Problem with error-page
 
 
 I had never thought of that!  But when I tested it, it seems 
 that JASPER appends a _, and so a JSP  page that starts with 
 a number should still work.
 
 


-
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 use Tomcat 4.1.29 with Apache 1.3.x

2004-05-19 Thread Yansheng Lin
jk2 needs httpd2.  You might want to try mod_webapps connector.  It's very
simple to set up btw.

-Yan

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: May 19, 2004 14:13
To: Tomcat Users List
Subject: Re: Can I use Tomcat 4.1.29 with Apache 1.3.x


: Or do I need to go with an older version of Tomcat?

short answer:

It's possible to use Apache 1.x w/ Tomcat 4.x.


long answer:

Tomcat-Apache interaction is handled by connectors, aka jk and jk2.
These are Apache plugins/DSOs/modules/etc.  Both jk and jk2 can talk to
either of Tomcat 4 or Tomcat 5.

I believe JK2 requires Apache2 but I may be wrong on that, so don't
quote me.

Search the Apache site for details.

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



[OT]Portable Progress Bar

2004-05-14 Thread Yansheng Lin
Hi,

I have to generate a report from a report engine.  I would like to be able
to display a progress bar telling user how much longer it will take to get
the report.  I am developing the report on Windows platform, but the
production server(tomcat4.1.24) will be linux.  The report engine I will be
using this time is Crystal Reports. 

I hope my solution doesn't have to be tied up with one report server.  For
example I will want to do this with a large, complex query in the future.

Any help appreciated!

-Yan


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



RE: [OT]Portable Progress Bar

2004-05-14 Thread Yansheng Lin
Which one is the best though?

Thanks

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: May 14, 2004 09:02
To: Tomcat Users List
Subject: RE: [OT]Portable Progress Bar



Hi,
There have been numerous attempts (and solutions of various kinds) at a
portable progress bar that can be attached to a server-side process and
display updated to the user.  Google shows many options:
http://www.google.com/search?sourceid=navclientq=progress+bar+java+serv
let

Most solutions rely on at least some client-side scripting, e.g.
JavaScript.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 10:56 AM
To: 'Tomcat Users List'
Subject: [OT]Portable Progress Bar

Hi,

I have to generate a report from a report engine.  I would like to be
able
to display a progress bar telling user how much longer it will take to
get
the report.  I am developing the report on Windows platform, but the
production server(tomcat4.1.24) will be linux.  The report engine I
will be
using this time is Crystal Reports.

I hope my solution doesn't have to be tied up with one report server.
For
example I will want to do this with a large, complex query in the
future.

Any help appreciated!

-Yan


-
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: German Umlauts in Tomcat5

2004-05-14 Thread Yansheng Lin
The default uri-encoding is not UTF-8 anymore, so you cannot use GET
unless you explicitly specify the URIEncoding attribute to be UTF-8 in
your connector.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html

-Yan

-Original Message-
From: Christian Traber [mailto:[EMAIL PROTECTED] 
Sent: May 14, 2004 03:54
To: [EMAIL PROTECTED]
Subject: German Umlauts in Tomcat5


Hi,

following example works with tomcat 4.1.30 but makes problems with tomcat
5.0.19 on SuSE9.1:


Client side:

// vir.shortName = Gfüllner
String username = URLEncoder.encode(vir.shortName,UTF-8); 
 // == username = Gf%C3%BCllner

HttpURLConnection huc = (HttpURLConnection) url.openConnection();

huc.setUseCaches (false);
huc.setDefaultUseCaches(false);
huc.setRequestMethod(GET);
huc.setRequestProperty(Content-Type, text/plain;charset=utf-8);
...

Serlet side:

// request.getCharacterEncoding() = utf-8
String username = request.getParameter(username);
// username = GfÃ?llner

same problem with:
String username = new String(username.getBytes(),UTF-8);  
// username = GfÃ?llner


Any Ideas?


Best Regards
Christian


-
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: Manager access problems

2004-05-11 Thread Yansheng Lin
Yeah, that makes sense.  You may want to take a look on how to set up a
virtual host in tomcat, it's part of the server configuration.  Just
remember that your ip-address is the same as a server
name(www.myCompany.com).

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html

Hope this helps:)

-Yan

-Original Message-
From: Greg Adams [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 19:50
To: Tomcat Users List
Subject: RE: Manager access problems


There's multiple connectors configured in tomcat/conf/server.xml. I have
to do JkMount for each webapp I want mapped into Apache in httpd.conf, but
I can still access the regular tomcat page on port 8080, just like when
tomcat is running as a standalone http server. I never shut off the
standalone http server running on port 8080, and I would like to be able
to access the manager application using port 8080 (directly through the
tomcat standalone http server, not using apache and mod_jk, so I don't
have manager and admin JkMounted into apache. Even before I installed and
configured mod_jk, I was running tomcat in standalone mode and I couldn't
access manager from a remote host, but I can access it from the localhost.
I anticipated finding one of those Valve.../Valve entries in
manager.xml that only allows you to access it from certain hosts, but
there was no such entry, so I'm stumped as to why it's possible to access
it using mod_jk, but I get that access denied error when using tomcat's
standalone http server.

Am I making any sense?

Greg


 No, it's not needed.

 Anyways, why do you think you would be able to access the webapp on
 http://IP-ADDRESS:8080/manager/html/?

 8080 is the port tomcat listens to.  It has nothing to do with what you
 define in httpd.conf.

 80 is the port apache listens to.  It talks with tomcat through port 8009
 you defined in workers.properties.

 By default, 80 is the default port that apache uses.

 If virtual host and jk2 are working for you, you should be able to access
 your webapp without defining any port.

 There are a lot of good posts on port 8080 and 80.  You may want to do a
 search on the archieve.

 Cheers:)

 -Yan

 -Original Message-
 From: Greg Adams [mailto:[EMAIL PROTECTED]
 Sent: May 10, 2004 14:49
 To: Tomcat Users List
 Subject: RE: Manager access problems


 yes. Would it be helpful to post the entire httpd.conf? It's pretty
 long...

 Your apache listens on port 80, no?

 -Yan

 -Original Message-
 From: Greg Adams [mailto:[EMAIL PROTECTED]
 Sent: May 10, 2004 10:23
 To: [EMAIL PROTECTED]
 Subject: Manager access problems


 I've installed tomcat 5.0.19 on solaris 2.8. I've also installed
 jk-1.2.5
 to connect tomcat to apache 1.3.27. I'm having no problems with jk, my
 problem is when trying to access the manager application. If I access it
 on the localhost using port 8080, http://localhost:8080/manager/html/, I
 have no problem, but when I try to access it on port 8080 from another
 host, http://IP-ADDRESS:8080/manager/html/, I get a HTTP Status 403 -
 Access to the requested resource has been denied error message. If I
 access it through the jk connector from another host,
 http://IPADDRESS/manager/html/, I get no error message...

 From looking at the FAQ's and the Manager how-to, I've looked at the
 following:

 TOMCAT_ROOT/conf/Catalina/localhost/manager.xml:



 !--

 Context configuration file for the Tomcat Manager Web App

 $Id: manager.xml,v 1.1.1.1 2002/07/18 16:48:14 remm Exp $

 --


 Context path=/manager docBase=../server/webapps/manager
 debug=0 privileged=true

   !-- Link to the user database we will get roles from --
   ResourceLink name=users global=UserDatabase
 type=org.apache.catalina.UserDatabase/

 /Context




 relevant section from httpd.conf



 LoadModule jk_module  libexec/mod_jk.so
 AddModule mod_jk.c
 # Configure mod_jk
 #
 JkWorkersFile conf/workers.properties
 JkLogFile logs/mod_jk.log
 JkLogLevel info

 # Tomcat Virtual Host
 #
 VirtualHost 199.42.192.190:80
   DocumentRoot /usr/local/apache/htdocs
   ServerName yoda.ddm.apm.bpm.eds.com
   JkMount /servlets-examples/* ajp13
   JkMount /manager/* ajp13
 /VirtualHost




 workers.properties



 worker.list= ajp13

 worker.ajp13.host=yoda.ddm.apm.bpm.eds.com
 worker.ajp13.port=8009
 worker.ajp13.type=ajp13




 server.xml - I'm using the default server.xml bundled with tomcat 5.0.19

 Thanks for any ideas...

 Greg

 -
 To unsubscribe, 

RE: Tomcat 4.0.6 and Japanese chars urgent

2004-05-11 Thread Yansheng Lin
Next time please do not put the word urgent in your msg title...

What happens if you add a page directive on top of the jsp page?

%@ page contentType=text/html;charset=UTF-8 pageEncoding=UTF-8%

I am a bit weary of TC4.0's.  But give that a try with Shift-JIS encoding.
And let me know if it works.

-Yan
Sun Certified J2EE Web Component Developer
http://j2e-translate.sourceforge.net (need help)


-Original Message-
From: jyotsna [mailto:[EMAIL PROTECTED] 
Sent: May 11, 2004 06:08
To: [EMAIL PROTECTED]
Subject: Tomcat 4.0.6 and Japanese chars urgent


Hello all

I am facing the following problem with tomcat 4.0.6 when using Japanese
characters :

1. The default encoding of the browser is not being set to the Japanese
charset (shift-jis). I have to change the setting manually to see the chars.

2. My japanese chars though being displayed in the JSP are not the same as
that inseretd in DB.

Can any one please help me .

Best Regds
Jyotsna



-Original Message-
From: jyotsna [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 4:27 PM
To:
tomcat-user-sc.1084271614.dfpfnaekknkbnhfjfcno-jyotsna.bharadwaj=baypack
[EMAIL PROTECTED]
Subject: RE: confirm subscribe to [EMAIL PROTECTED]




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 4:04 PM
To: [EMAIL PROTECTED]
Subject: confirm subscribe to [EMAIL PROTECTED]


Hi! This is the ezmlm program. I'm managing the
[EMAIL PROTECTED] mailing list.

I'm working for my owner, who can be reached
at [EMAIL PROTECTED]

To confirm that you would like

   [EMAIL PROTECTED]

added to the tomcat-user mailing list, please send
an empty reply to this address:


tomcat-user-sc.1084271614.dfpfnaekknkbnhfjfcno-jyotsna.bharadwaj=baypackets.
[EMAIL PROTECTED]

Usually, this happens when you just hit the reply button.
If this does not work, simply copy the address and paste it into
the To: field of a new message.

or click here:

mailto:tomcat-user-sc.1084271614.dfpfnaekknkbnhfjfcno-jyotsna.bharadwaj=bayp
[EMAIL PROTECTED]

This confirmation serves two purposes. First, it verifies that I am able
to get mail through to you. Second, it protects you in case someone
forges a subscription request in your name.

Some mail programs are broken and cannot handle long addresses. If you
cannot reply to this request, instead send a message to
[EMAIL PROTECTED] and put the
entire address listed above into the Subject: line.


--- Administrative commands for the tomcat-user list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:
   [EMAIL PROTECTED]

To remove your address from the list, send a message to:
   [EMAIL PROTECTED]

Send mail to the following for info and FAQ for this list:
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]

Similar addresses exist for the digest list:
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]

To get messages 123 through 145 (a maximum of 100 per request), mail:
   [EMAIL PROTECTED]

To get an index with subject and author for messages 123-456 , mail:
   [EMAIL PROTECTED]

They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send an empty message to:
   [EMAIL PROTECTED]

The messages do not really need to be empty, but I will ignore
their content. Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example [EMAIL PROTECTED], just add a hyphen and your
address (with '=' instead of '@') after the command word:
[EMAIL PROTECTED]

To stop subscription for this address, mail:
[EMAIL PROTECTED]

In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
[EMAIL PROTECTED] Please be patient, my owner is a
lot slower than I am ;-)

--- Enclosed is a copy of the request I received.

Return-Path: [EMAIL PROTECTED]
Received: (qmail 36374 invoked by uid 98); 11 May 2004 10:33:34 -
Received: from [EMAIL PROTECTED] by hermes.apache.org by uid
82 with qmail-scanner-1.20
 (clamuko: 0.70.  Clear:RC:0(203.196.139.114):.
 Processed in 1.058051 secs); 11 May 2004 10:33:34 -
X-Qmail-Scanner-Mail-From: [EMAIL PROTECTED] via
hermes.apache.org
X-Qmail-Scanner: 1.20 (Clear:RC:0(203.196.139.114):. Processed in 1.058051
secs)
Received: from unknown (HELO mailhost.baypackets.com) (203.196.139.114)
  by hermes.apache.org with SMTP; 11 May 2004 10:33:33 -
Received: from jyotsana (jyotsana [192.168.9.156])
by mailhost.baypackets.com (8.9.3+Sun/8.9.3) with SMTP id PAA12318
for [EMAIL PROTECTED]; Tue, 11 May 2004
15:24:36
+0530 (IST)
Reply-To: [EMAIL PROTECTED]
From: jyotsna [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: 

RE: Manager language is wrong

2004-05-11 Thread Yansheng Lin
Hahaha, did you click on the Japanese link by mistake:).

Seriously though, I was working on w2k with Japanese IME installed for a
long time, I know if you set you default locale to Japanese locale, some of
the pages will display things in Japanese.  Maybe that's the case with your
system, that your default locale is Japanese and tomcat uses resource bundle
for Japanese.

-Yan

-Original Message-
From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]

Sent: May 11, 2004 02:04
To: [EMAIL PROTECTED]
Subject: Manager language is wrong


I've just installed Tomcat 5.0.19 on an 'English' Windows 2000 machine with
the Japanese IME also installed.

Tomcat display it index and admin pages in English but when I access the
manager the page is displayed in Japanese. This happens under both IE and
N7.

Can anyone tell me how to 'fix' this so the manager appears in English?

Thanks,

Jc


-
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: Session without Cookies

2004-05-10 Thread Yansheng Lin
This is a FAQ.  Set cookies=false in your context:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

-Yan

-Original Message-
From: Nils [mailto:[EMAIL PROTECTED] 
Sent: May 8, 2004 04:41
To: [EMAIL PROTECTED]
Subject: WG: Session without Cookies


Hello there,

how can I get Tomcat to just use URL-Session Ids and no cookies anymore? Is
there a server-side configuration?

regards,
Nils Köster


-
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: Muiltipul Tomcat 5.19 Servers on the same machine.

2004-05-10 Thread Yansheng Lin
Huh, interesting.  So you want all your three instances of Tomcat running at
the same time on the same box.  I am afraid Tomcat is not built that way.
But not sure it's not doable, just change the port that the 2nd and 3rd
instances listens too, you should be fine.  Not sure what you intend to
achieve here though.

-Yan

-Original Message-
From: Bond [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 11:37
To: [EMAIL PROTECTED]
Subject: Muiltipul Tomcat 5.19 Servers on the same machine.




Hey Everyone,

I want to install 3 instances of Tomcat 5.19 as a
service on one box.  When I do this, I install each
one into it's own unique directory.  However, when I
try to start the service, it seems to not recognize
the 2nd or 3rd install.  I think I need to do some
more configuration here.  Anybody have any ideas on
how to do the above.   

Thanks in advanced.






__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

-
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: Cannot access certian jar files in common/lib

2004-05-10 Thread Yansheng Lin
Are you running tomcat as root?
Is those jar's accessible under the group that Tomcat runs?

Also delete upload.jar, and the /work dir and see if your manager app still
works without the upload.jar.

-Yan


-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED] 
Sent: May 9, 2004 11:47
To: Tomcat Users List
Subject: Cannot access certian jar files in common/lib


TAO Linux (Redhat clone)
Tomcat 5.0.19
JDK 1.4.2

I have a problem that bugging me to death. I have 4 applications that are
loaded along with some static files in ROOT. In each of my applications I
use a globalresource to do database connections. The jar is in common/lib. I
also use iText in several of the apps and the jar for it is also in
common/lib . Now for the weird part. I wanted to use the file upload to push
some files to the server. I looked into the code for the manager to get some
ideas as well as the api. After writing the class I found that the
upload.jar was in server/lib. So I moved it to common/lib and made sure
there were no other copies. Really strange is that the manager app still
works fine but none of my apps can find the classes from the upload
jar.(Yes, many many restarts) For now I have a copy of the jar in the app
and all is working fine but why would my app not be able to find the classes
when the manager app can?

Just another question for the twilight zone.

Doug


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



RE: Manager access problems

2004-05-10 Thread Yansheng Lin
Your apache listens on port 80, no?

-Yan

-Original Message-
From: Greg Adams [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 10:23
To: [EMAIL PROTECTED]
Subject: Manager access problems


I've installed tomcat 5.0.19 on solaris 2.8. I've also installed jk-1.2.5
to connect tomcat to apache 1.3.27. I'm having no problems with jk, my
problem is when trying to access the manager application. If I access it
on the localhost using port 8080, http://localhost:8080/manager/html/, I
have no problem, but when I try to access it on port 8080 from another
host, http://IP-ADDRESS:8080/manager/html/, I get a HTTP Status 403 -
Access to the requested resource has been denied error message. If I
access it through the jk connector from another host,
http://IPADDRESS/manager/html/, I get no error message...

From looking at the FAQ's and the Manager how-to, I've looked at the
following:

TOMCAT_ROOT/conf/Catalina/localhost/manager.xml:

!--

Context configuration file for the Tomcat Manager Web App

$Id: manager.xml,v 1.1.1.1 2002/07/18 16:48:14 remm Exp $

--


Context path=/manager docBase=../server/webapps/manager
debug=0 privileged=true

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context


relevant section from httpd.conf

LoadModule jk_module  libexec/mod_jk.so
AddModule mod_jk.c
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

# Tomcat Virtual Host
#
VirtualHost 199.42.192.190:80
  DocumentRoot /usr/local/apache/htdocs
  ServerName yoda.ddm.apm.bpm.eds.com
  JkMount /servlets-examples/* ajp13
  JkMount /manager/* ajp13
/VirtualHost


workers.properties

worker.list= ajp13

worker.ajp13.host=yoda.ddm.apm.bpm.eds.com
worker.ajp13.port=8009
worker.ajp13.type=ajp13


server.xml - I'm using the default server.xml bundled with tomcat 5.0.19

Thanks for any ideas...

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: Muiltipul Tomcat 5.19 Servers on the same machine.

2004-05-10 Thread Yansheng Lin
That's what I said.  Yoav, you are as sleepy as me after a big lunch, I
guess:).

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 13:54
To: Tomcat Users List
Subject: RE: Muiltipul Tomcat 5.19 Servers on the same machine.



Hi,
What are you guys talking about?  You can run as many instances of
tomcat as you want on the same machine with the same IP address, just
change the port.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 3:39 PM
To: Tomcat Users List
Subject: Re: Muiltipul Tomcat 5.19 Servers on the same machine.

You can create a different ip address for the same machine using
ifconfig. Take a look at the archive, I once send a better explanation
on that... This approach is better than changing ports so you can use
the default ports, just define an ipAdress tag for each different
isntance.


Yansheng Lin wrote:
 Huh, interesting.  So you want all your three instances of Tomcat
running
at
 the same time on the same box.  I am afraid Tomcat is not built that
way.
 But not sure it's not doable, just change the port that the 2nd and
3rd
 instances listens too, you should be fine.  Not sure what you intend
to
 achieve here though.

 -Yan

 -Original Message-
 From: Bond [mailto:[EMAIL PROTECTED]
 Sent: May 10, 2004 11:37
 To: [EMAIL PROTECTED]
 Subject: Muiltipul Tomcat 5.19 Servers on the same machine.




 Hey Everyone,

 I want to install 3 instances of Tomcat 5.19 as a
 service on one box.  When I do this, I install each
 one into it's own unique directory.  However, when I
 try to start the service, it seems to not recognize
 the 2nd or 3rd install.  I think I need to do some
 more configuration here.  Anybody have any ideas on
 how to do the above.

 Thanks in advanced.






 __
 Do you Yahoo!?
 Win a $20,000 Career Makeover at Yahoo! HotJobs
 http://hotjobs.sweepstakes.yahoo.com/careermakeover

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




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

-
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: Muiltipul Tomcat 5.19 Servers on the same machine.

2004-05-10 Thread Yansheng Lin
I think the OP is trying to simulate distributed servers on the same
machine scheme.  

I am guessing again because that's something I wanted to do as well:).
Would be nice for people with limited means, or too lazy to set up the
infrastructure himself and thinking he might be able to get around with some
cheap hack to the Tomcat internal.

-Yan

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 14:27
To: Tomcat Users List
Subject: RE: Muiltipul Tomcat 5.19 Servers on the same machine.



Hi,

That's what I said.  Yoav, you are as sleepy as me after a big lunch, I
guess:).

Not sleepy at all ;)  Working on many things at once.  My comments were
directed more at Senor Cargnin's post, as well as the I am afraid
tomcat is not built that way line in yours.

Yoav


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: May 10, 2004 13:54
To: Tomcat Users List
Subject: RE: Muiltipul Tomcat 5.19 Servers on the same machine.



Hi,
What are you guys talking about?  You can run as many instances of
tomcat as you want on the same machine with the same IP address, just
change the port.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 3:39 PM
To: Tomcat Users List
Subject: Re: Muiltipul Tomcat 5.19 Servers on the same machine.

You can create a different ip address for the same machine using
ifconfig. Take a look at the archive, I once send a better explanation
on that... This approach is better than changing ports so you can use
the default ports, just define an ipAdress tag for each different
isntance.


Yansheng Lin wrote:
 Huh, interesting.  So you want all your three instances of Tomcat
running
at
 the same time on the same box.  I am afraid Tomcat is not built that
way.
 But not sure it's not doable, just change the port that the 2nd and
3rd
 instances listens too, you should be fine.  Not sure what you intend
to
 achieve here though.

 -Yan

 -Original Message-
 From: Bond [mailto:[EMAIL PROTECTED]
 Sent: May 10, 2004 11:37
 To: [EMAIL PROTECTED]
 Subject: Muiltipul Tomcat 5.19 Servers on the same machine.




 Hey Everyone,

 I want to install 3 instances of Tomcat 5.19 as a
 service on one box.  When I do this, I install each
 one into it's own unique directory.  However, when I
 try to start the service, it seems to not recognize
 the 2nd or 3rd install.  I think I need to do some
 more configuration here.  Anybody have any ideas on
 how to do the above.

 Thanks in advanced.






 __
 Do you Yahoo!?
 Win a $20,000 Career Makeover at Yahoo! HotJobs
 http://hotjobs.sweepstakes.yahoo.com/careermakeover


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




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

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




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: Manager access problems

2004-05-10 Thread Yansheng Lin
No, it's not needed. 

Anyways, why do you think you would be able to access the webapp on 
http://IP-ADDRESS:8080/manager/html/?

8080 is the port tomcat listens to.  It has nothing to do with what you
define in httpd.conf.

80 is the port apache listens to.  It talks with tomcat through port 8009
you defined in workers.properties.

By default, 80 is the default port that apache uses.  

If virtual host and jk2 are working for you, you should be able to access
your webapp without defining any port.

There are a lot of good posts on port 8080 and 80.  You may want to do a
search on the archieve.

Cheers:)

-Yan

-Original Message-
From: Greg Adams [mailto:[EMAIL PROTECTED] 
Sent: May 10, 2004 14:49
To: Tomcat Users List
Subject: RE: Manager access problems


yes. Would it be helpful to post the entire httpd.conf? It's pretty long...

 Your apache listens on port 80, no?

 -Yan

 -Original Message-
 From: Greg Adams [mailto:[EMAIL PROTECTED]
 Sent: May 10, 2004 10:23
 To: [EMAIL PROTECTED]
 Subject: Manager access problems


 I've installed tomcat 5.0.19 on solaris 2.8. I've also installed jk-1.2.5
 to connect tomcat to apache 1.3.27. I'm having no problems with jk, my
 problem is when trying to access the manager application. If I access it
 on the localhost using port 8080, http://localhost:8080/manager/html/, I
 have no problem, but when I try to access it on port 8080 from another
 host, http://IP-ADDRESS:8080/manager/html/, I get a HTTP Status 403 -
 Access to the requested resource has been denied error message. If I
 access it through the jk connector from another host,
 http://IPADDRESS/manager/html/, I get no error message...

 From looking at the FAQ's and the Manager how-to, I've looked at the
 following:

 TOMCAT_ROOT/conf/Catalina/localhost/manager.xml:


 !--

 Context configuration file for the Tomcat Manager Web App

 $Id: manager.xml,v 1.1.1.1 2002/07/18 16:48:14 remm Exp $

 --


 Context path=/manager docBase=../server/webapps/manager
 debug=0 privileged=true

   !-- Link to the user database we will get roles from --
   ResourceLink name=users global=UserDatabase
 type=org.apache.catalina.UserDatabase/

 /Context



 relevant section from httpd.conf


 LoadModule jk_module  libexec/mod_jk.so
 AddModule mod_jk.c
 # Configure mod_jk
 #
 JkWorkersFile conf/workers.properties
 JkLogFile logs/mod_jk.log
 JkLogLevel info

 # Tomcat Virtual Host
 #
 VirtualHost 199.42.192.190:80
   DocumentRoot /usr/local/apache/htdocs
   ServerName yoda.ddm.apm.bpm.eds.com
   JkMount /servlets-examples/* ajp13
   JkMount /manager/* ajp13
 /VirtualHost



 workers.properties


 worker.list= ajp13

 worker.ajp13.host=yoda.ddm.apm.bpm.eds.com
 worker.ajp13.port=8009
 worker.ajp13.type=ajp13



 server.xml - I'm using the default server.xml bundled with tomcat 5.0.19

 Thanks for any ideas...

 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]




-
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: Encoding problems hwen using tomcat through mod_jk

2004-05-07 Thread Yansheng Lin
No, not add. Change the default one. 

-Yan

-Original Message-
From: Diego Algorta Casamayou [mailto:[EMAIL PROTECTED] 
Sent: May 6, 2004 16:32
To: Tomcat Users List
Subject: Re: Encoding problems hwen using tomcat through mod_jk


Yansheng Lin escribió:

In your apache conf file, you may want to specify the default encoding to
be
utf-8 instead of iso-8859-1.  There may be other ways.
  

Thank you, but it didn't work. Same result.
Tried with:
AddDefaultCharset on
and
AddDefaultCharset utf-8
and
AddDefaultCharset iso8859-1

(yes, I've restarted apache)

Diego.


-
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: Strange error

2004-05-07 Thread Yansheng Lin
What event listeners?

-Original Message-
From: Nathan Maves [mailto:[EMAIL PROTECTED] 
Sent: May 5, 2004 08:15
To: Tomcat Users List
Subject: Re: Strange error


The object is a custom object.  The only difference I can find is that  
this object has some event listeners attached to it.  It is an  
implementation of a Tree object.  The only java objects that it uses  
are Map, TreeMap and few other util classes.

Nathan

On May 5, 2004, at 7:18 AM, QM wrote:

 On Tue, May 04, 2004 at 02:30:16PM -0600, Nathan Maves wrote:
 : What could cause this error in Tomcat 5.0.19.
 :
 : 2004-05-04 14:21:02 StandardContext[/manager]HTMLManager:
 : ManagerServlet.reload[/ReportViewer]
 : java.lang.ThreadDeath
 : at
 :  
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade 
 r
 : .java:1270)
 : [snip]
 : It happens when I place an object in the session and then click  
 reload
 : from the webapp manager.


 Any object, or a particular object?
 (especially a custom object)

 Does said object do anything with threads, such as calling ::stop()?

 -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 servlet generate a Web page first, then continue to run ?

2004-05-06 Thread Yansheng Lin
How about using Thread:).  If you are keen, you can create a thread manager
and explode your code to 10 times of its original complexity, which makes
the maintainence a nightmare.  And then you will thank me for such a
wonderful experience.

Life is beautiful sometimes:).

-Yan Lin
Sun Certified J2EE Web Component Developer
http://j2e-translate.sourceforge.net (need help)

-Original Message-
From: Tom K [mailto:[EMAIL PROTECTED] 
Sent: May 5, 2004 08:24
To: 'Tomcat Users List'
Subject: RE: Can servlet generate a Web page first, then continue to run ?


Stan,

I have done something similar in a servlet by reposting to the
same servlet. The way I did this is by out-putting a hidden value in the
submission, then using a getParameter to retrieve this value on the next
submit. The first page was the user submitting some data, which when
submitted brought up a proof-read-page. If everything was OK they would
hit the submit button again (so the same page was actually generated
twice. The servlet would know to go to the correct processing part of
the servlet because of the hidden parameter would direct it to that part
of the servlet that did the processing.
For example, I hid a value called action with a value of
step2. In my servlet I had code that... if(action.equals(step2)){
..do something ...}+
So how might this apply to your problem? I'm not sure :-( but it
might spark an idea.

Tom Kochanowicz




-Original Message-
From: lixiaoquan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 05, 2004 5:02 AM
To: [EMAIL PROTECTED]
Subject: Can servlet generate a Web page first, then continue to run ?

hi,

I want to show a page immediately after the visiters' Form Submitting
,then do some logical processing at backgroud(this will assume a long
time, so it may bother the visitor).  I surpose to do these in one
servlet.

How can I do this?

Thanks
 
stan

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


-
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: Encoding problems hwen using tomcat through mod_jk

2004-05-06 Thread Yansheng Lin
In your apache conf file, you may want to specify the default encoding to be
utf-8 instead of iso-8859-1.  There may be other ways.

-Yan


-Original Message-
From: Diego Algorta Casamayou [mailto:[EMAIL PROTECTED] 
Sent: May 5, 2004 09:54
To: Tomcat Users List
Subject: Encoding problems hwen using tomcat through mod_jk


Hi there.

SuSE 8.2 default packages: (Apache 1.3.27, Tomcat 4.1.18, mod_jk 1.2.2-dev)
Java: Sun 1.4.2_03

I've searched the archives and didn't find an answer so I'm sending my 
problem to the list.

In my development environment I use Tomcat directly through the 8080 
port and special characters like áéíóúñ show ok on the resulting pages 
generated from the servlets.

But in the production server we're using apache httpd as a front-end and 
mod_jk as a connector to tomcat using port 8009.

The problem is that in this environment the special characters are 
replaced whith a ? (question sign).

¿Any guide on how to resolve this?

Thank you in advance.
Diego


-
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: error sset

2004-05-06 Thread Yansheng Lin
500!

King of errors.  You may want to fix that before you roll out your app.

-Yan

-Original Message-
From: agarlita,dan [mailto:[EMAIL PROTECTED] 
Sent: May 4, 2004 18:28
To: Tomcat Users List
Subject: error sset


hello,

I have some questions about error customisation.
I want to change the look of 500 Error. (that is
org.apache.jasper.JasperException)
so, I want to redirect all strings to the new page.

so, for example the 404 error is simple becouse we know that is Page Not
Found
but, the 500 Error can report errors like According to the TLD or the tag
file, attribute operation is mandatory for tag sql
how can I send that string (exception string) in the new page?

Thanks,
r_a_v_e_n
 


-
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: Form method always a get.

2004-05-06 Thread Yansheng Lin
Hi, 

As per previous post, use a submit button.  You are using links, that's why
your servlet thinks it's a GET.  Is button out of question for you?  

-Yan

-Original Message-
From: Adam Gruszynski [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 05, 2004 1:13 PM
To: Tomcat Users List
Subject: RE: Form method always a get.

Did that already with the same result.  I do use netbeans... I don't know if
that makes a difference.

A.

--- Budi Kurniawan [EMAIL PROTECTED] wrote:
 Try adding a Submit button to click to submit. If the method is post 
 by submitting this way then there's something wrong with your 
 JavaScript.
 Good luck.
 budi
 Author of How Tomcat Works
 
 -Original Message-
 From: Adam Gruszynski [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 05, 2004 1:03 PM
 To: Tomcat Users List
 Subject: RE: Form method always a get.
 
 Thanks for answering.  The following is what I'm trying to
 execute:
 
 body
 link rel=stylesheet href=include/styles.css
 type=text/css
 
 script language=JavaScript
 function preSubmit(thePage) {
   document.welcomeform.actionelement.value=thePage;
   document.welcomeform.submit();
 }
 /script
 script language=JavaScript
 function newStudy(theURL) {
  

window.open(theURL,'Docs','scrollbars=yes,resizable=yes,width=830,height=780
 ');
 }
 /script
 form method=POST name=welcomeform action=/tsr  input  
 type=hidden
 name=actionelement value=/ input type=hidden
 name=currpage
 value=empty/ table border=0 cellpadding=0 cellspacing=0 
 width=100%
   tr 
 tdimg src=images/tsr_logo.gif width=170 height=61/td
 td align=left class=font18bTITLE/font/td
   /tr
   tr 
 td colspan=2 background=images/gradient.gifimg
 src=images/gradient.gif width=100% height=4/td
   /tr
   tr 
 td valign=top colspan=2
   table align=center cellpadding=0
 cellspacing=0
 border=0
 trtdbr/td
 /tr
   /table
 /td
   /tr
 /table
 table
   trtd class=font16b align=center
 colspan=2Welcome to TITLE application site./td/tr
   trtdbr/td/tr
   tr
 td class=element
   a

href=javascript:newStudy('/tsr?actionelement=new')Submit
 a new study./a
 /td
 td class=elementPresents the form to submit a NEW study./td
   /tr
   trtd colspan=2br/td/tr
   tr
 td class=element colspan=2The following applications require 
 you to login: /td
   /tr
   trtd colspan=2br/td/tr
   tr
 td class=elementa
 href=javascript:preSubmit('summary')Edit an existing study./a
 /td
 td class=elementEnter the TSR management application./td
   /tr
 /form
 /body
 
 Any sugestions welcome.
 
 A.
 
 
 --- Budi Kurniawan [EMAIL PROTECTED] wrote:
  You're probably missing the closing quote after the
 method name:
  
  form method=post 
  
  Rgds,
  Budi
  Author of How Tomcat Works 
  
  -Original Message-
  From: Adam Gruszynski [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, May 05, 2004 12:52 PM
  To: Tomcat Users List
  Subject: Form method always a get.
  
  I hope this is just a simple lack of understanding but
 when I submit a
  html form using any tomcat version greater than 406,
 the servlet
  always recieves it as a get.  Even when explicitly
 setting the form
  method as a POST.  Am I making some sort of oversight
 or coding error?
  
  Thank you,
  
  Adam
  
  
  
  
  __
  Do you Yahoo!?
  Win a $20,000 Career Makeover at Yahoo! HotJobs 
  http://hotjobs.sweepstakes.yahoo.com/careermakeover
  
 

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

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 
   
   
 __
 Do you Yahoo!?
 Win a $20,000 Career Makeover at Yahoo! HotJobs 
 http://hotjobs.sweepstakes.yahoo.com/careermakeover
 

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

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





__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

-
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 

RE: Form method always a get.

2004-05-06 Thread Yansheng Lin
Yeah, but he is putting that as href in a link.  If it's in a onclick
event, I would let it pass:).  Ask the OP to see if he fixed it.

Cheers

-Yan

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Sent: May 6, 2004 10:10
To: Tomcat Users List
Subject: RE: Form method always a get.



???

He says that the error was the same when using submit buttons
and you say he should use it.

AFAIK your explanation is wrong.
If you submit a form with javascript (even if triggered by a link)
it uses (should use ?) the method type that is given in the form.

 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 06, 2004 5:52 PM
 To: 'Tomcat Users List'
 Subject: RE: Form method always a get.
 
 As per previous post, use a submit button.  You are using 
 links, that's why
 your servlet thinks it's a GET.  Is button out of question 
 for you?  
 
 -Original Message-
 From: Adam Gruszynski [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 05, 2004 1:13 PM
 To: Tomcat Users List
 Subject: RE: Form method always a get.
 
 Did that already with the same result.  I do use netbeans... 
 I don't know if
 that makes a difference.
 

-
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: What to look for when reciving 'Cannot forward after response has been committed'

2004-05-03 Thread Yansheng Lin
More specific, please:).  Normally you put a break point somewhere and trace
it to the line that throws exception, if you have the source code for
tomcat, you can step into that line.

-Yan

-Original Message-
From: Lars Ohlén [mailto:[EMAIL PROTECTED] 
Sent: May 2, 2004 10:35
To: Tomcat Users List
Subject: Tomcat 5: What to look for when reciving 'Cannot forward after
response has been committed'




Hi,
While converting from an older Tomcat version I run into the
IllegalStateException that says
Cannot forward after response has been committed

I dont think that I have duplicate forwards so there must be something else
to look for
(My guess is PrintWriter outputs, response.addCookie). 

Exception is throws from a servlet.


/Lars





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



RE: SESSION PROBLEM in UNIX

2004-04-23 Thread Yansheng Lin
Hi

Good.  You are making progress on this one:).  You mentioned that
sessionDestroyed() was never called, eh.  Well, that means at that point
that particular session is still in the pool, i.e., it hasn't been
invalidated yet.  

I would like to know how you configured your session time-out.  i.e., how
long is the interval and how many places. 

Second if you don't think this is too hard to do, try to expunge the session
before the second interval(you should see your SOP from your
sessionDestroyed()), but still let the second request come through.  Maybe
you will get a different error message.

-Yan

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: April 23, 2004 04:49
To: Tomcat Users List
Subject: RE: SESSION PROBLEM in UNIX


HI ,

Any suggestions on the problem reported below .I  would like to add
another point that this works perfectly in Linux .
I have tomcat4 running in linux and the session does not become null .As
I mentioned before in Windows it works fine ...any specific settings
that I need to check ?Only in HP Unix I get this
problem of the session variable becoming null.

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 21, 2004 12:23 PM
To: Tomcat Users List
Subject: RE: SESSION PROBLEM in UNIX


Hi,

Thank you for your inputs.

I couldn't implement HttpSessionListener on tomcat3.2,hence I tried with
HttpSessionBindingListener before. 
where I added an a listener object to the session and so that when
session becomes invalid then the unbound method will get called .

Now as suggested I moved my application to tomcat4.1.29 and tested the
same ,by implementing HttpSessionListener and also 
Enabled the request dumper in the server.xml.

I still get the same problem i.e. after a few refresh null pointer
exception is thrown when session is accessed.
sessionCreated(HttpSessionEvent se) is called  and I get the SOP when I
load application in Browser ,but after the error occurs the
sessionDestroyed(HttpSessionEvent se) is not called ( confirmed it as
SOP was not displayed on the console)

Also I see no difference in the dump by the request dumper for the
refresh period when the problem occurred and the previous interval .

Message in the  log file 

2004-04-21 12:02:19 ApplicationDispatcher[/MCOne] Servlet.service() for
servlet jsp threw exception org.apache.jasper.JasperException


Part of the  request response dump:
As I see it the session ID is the same and maintained .
So I am unable to find out if its my application or the  session
management that is causing the problem.

As shown above problem occurs at 12:02:19
Find below dump of 12:02:19 and previous interval 12:02:09 when the
screen display is good 


2004-04-21 12:02:08 RequestDumperValve[Standalone]: REQUEST URI
=/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08
RequestDumperValve[Standalone]: authType=null 2004-04-21 12:02:08
RequestDumperValve[Standalone]: characterEncoding=null 2004-04-21
12:02:08 RequestDumperValve[Standalone]: contentLength=116 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
contentType=application/x-www-form-urlencoded
2004-04-21 12:02:08 RequestDumperValve[Standalone]:contextPath=
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */* 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
header=referer=http://10.3.106.177:8080/MCOne/BP/BPRealtimeServlet
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept-language=en-us 2004-04-21 12:02:08
RequestDumperValve[Standalone]:
header=content-type=application/x-www-form-urlencoded
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept-encoding=gzip, deflate 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=user-agent=Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0) 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=host=10.3.106.177:8080 2004-04-21
12:02:08 RequestDumperValve[Standalone]: header=content-length=116
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=connection=Keep-Alive 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=cache-control=no-cache 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
header=cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2
2004-04-21 12:02:08 RequestDumperValve[Standalone]: locale=en_US
2004-04-21 12:02:08 RequestDumperValve[Standalone]: method=POST
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
parameter=hiddenUrlInitialize= 2004-04-21 12:02:08
RequestDumperValve[Standalone]: parameter=interval=null, check_interval
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
parameter=hiddenInterval=10 2004-04-21 12:02:08
RequestDumperValve[Standalone]: parameter=hiddenRealtimeMain=Summary
2004-04-21 

RE: SESSION PROBLEM in UNIX

2004-04-23 Thread Yansheng Lin
Forgot to include the line:

request.getSession.invalidate(); 

should be sufficient, I hope.

-Yan

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: April 23, 2004 10:08
To: 'Tomcat Users List'
Subject: RE: SESSION PROBLEM in UNIX


Hi

Good.  You are making progress on this one:).  You mentioned that
sessionDestroyed() was never called, eh.  Well, that means at that point
that particular session is still in the pool, i.e., it hasn't been
invalidated yet.  

I would like to know how you configured your session time-out.  i.e., how
long is the interval and how many places. 

Second if you don't think this is too hard to do, try to expunge the session
before the second interval(you should see your SOP from your
sessionDestroyed()), but still let the second request come through.  Maybe
you will get a different error message.

-Yan

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: April 23, 2004 04:49
To: Tomcat Users List
Subject: RE: SESSION PROBLEM in UNIX


HI ,

Any suggestions on the problem reported below .I  would like to add
another point that this works perfectly in Linux .
I have tomcat4 running in linux and the session does not become null .As
I mentioned before in Windows it works fine ...any specific settings
that I need to check ?Only in HP Unix I get this
problem of the session variable becoming null.

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 21, 2004 12:23 PM
To: Tomcat Users List
Subject: RE: SESSION PROBLEM in UNIX


Hi,

Thank you for your inputs.

I couldn't implement HttpSessionListener on tomcat3.2,hence I tried with
HttpSessionBindingListener before. 
where I added an a listener object to the session and so that when
session becomes invalid then the unbound method will get called .

Now as suggested I moved my application to tomcat4.1.29 and tested the
same ,by implementing HttpSessionListener and also 
Enabled the request dumper in the server.xml.

I still get the same problem i.e. after a few refresh null pointer
exception is thrown when session is accessed.
sessionCreated(HttpSessionEvent se) is called  and I get the SOP when I
load application in Browser ,but after the error occurs the
sessionDestroyed(HttpSessionEvent se) is not called ( confirmed it as
SOP was not displayed on the console)

Also I see no difference in the dump by the request dumper for the
refresh period when the problem occurred and the previous interval .

Message in the  log file 

2004-04-21 12:02:19 ApplicationDispatcher[/MCOne] Servlet.service() for
servlet jsp threw exception org.apache.jasper.JasperException


Part of the  request response dump:
As I see it the session ID is the same and maintained .
So I am unable to find out if its my application or the  session
management that is causing the problem.

As shown above problem occurs at 12:02:19
Find below dump of 12:02:19 and previous interval 12:02:09 when the
screen display is good 


2004-04-21 12:02:08 RequestDumperValve[Standalone]: REQUEST URI
=/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08
RequestDumperValve[Standalone]: authType=null 2004-04-21 12:02:08
RequestDumperValve[Standalone]: characterEncoding=null 2004-04-21
12:02:08 RequestDumperValve[Standalone]: contentLength=116 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
contentType=application/x-www-form-urlencoded
2004-04-21 12:02:08 RequestDumperValve[Standalone]:contextPath=
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */* 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
header=referer=http://10.3.106.177:8080/MCOne/BP/BPRealtimeServlet
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept-language=en-us 2004-04-21 12:02:08
RequestDumperValve[Standalone]:
header=content-type=application/x-www-form-urlencoded
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=accept-encoding=gzip, deflate 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=user-agent=Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0) 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=host=10.3.106.177:8080 2004-04-21
12:02:08 RequestDumperValve[Standalone]: header=content-length=116
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
header=connection=Keep-Alive 2004-04-21 12:02:08
RequestDumperValve[Standalone]: header=cache-control=no-cache 2004-04-21
12:02:08 RequestDumperValve[Standalone]:
header=cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2
2004-04-21 12:02:08 RequestDumperValve[Standalone]: locale=en_US
2004-04-21 12:02:08 RequestDumperValve[Standalone]: method=POST
2004-04-21 12:02:08 RequestDumperValve[Standalone]:
parameter=hiddenUrlInitialize= 2004-04-21

RE: Getting a request in a non English character

2004-04-20 Thread Yansheng Lin
Hi,

I don't have that book, so I am not sure if there is a new version.  But I
think you can try one of the constructors in the String class.

String value = req.getParameter(param);
String valueInUnicode = new String(value.getBytes(Cp1255), UTF8);

-Yan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: April 20, 2004 05:10
To: [EMAIL PROTECTED]
Subject: Getting a request in a non English character 


Hi,
In an attempt to solve a problem of getting a request in a non English
character, and to convert it to Unicode,
I use a similar code , (BTW , taken from O'Reilly's Java Servlet
programing First edition)


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

public class MyServlet extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
try {
//set encoding of request and responce
req.setCharacterEncoding(Cp1255); //for hebrew windows 
res.setCharacterEncoding(Cp1255);
res.setContentType(Text/html; Cp1255);
String value = req.getParameter(param);

// Now convert it from an array of bytes to an array of characters.
// Here we bother to read only the first line.
BufferedReader reader = new BufferedReader(
new InputStreamReader(new StringBufferInputStream(value), Cp1255));
String valueInUnicode = reader.readLine();
}catch (Exception e) {
e.printStackTrace();
}
}
}


this works fine , the only problem is that StringBufferInputStream is
deprecated .
is there any other alternative for that ?
Thanks in advance 
Yair 
 
 
Yair Fine
Golden-Channels
03 9272791
052 921250
 


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



RE: Getting a request in a non English character

2004-04-20 Thread Yansheng Lin
No, nothing to do Tomcat. But I know Cp1255 is not part of the standard
charsets supported by Java platform, so you may out of luck here.

Btw, jdk1.4 recommends StringReader over the deprecated
StringBufferInputStream class.

- 
java.io
Class StringBufferInputStream

Deprecated. This class does not properly convert characters into bytes. As
of JDK 1.1, the preferred way to create a stream from a string is via the
StringReader class.
-

-Yan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: April 20, 2004 10:46
To: [EMAIL PROTECTED]
Subject: RE: Getting a request in a non English character 


Thanks, 
But I tried and it doesn't work 
Is it because it is in the GET request and not in POST 
Maybe Tomcat don't know how to deal with Charset Cp1255 requests?


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 5:17 PM
To: 'Tomcat Users List'
Subject: RE: Getting a request in a non English character 


Hi,

I don't have that book, so I am not sure if there is a new version.  But I
think you can try one of the constructors in the String class.

String value = req.getParameter(param);
String valueInUnicode = new String(value.getBytes(Cp1255), UTF8);

-Yan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: April 20, 2004 05:10
To: [EMAIL PROTECTED]
Subject: Getting a request in a non English character 


Hi,
In an attempt to solve a problem of getting a request in a non English
character, and to convert it to Unicode, I use a similar code , (BTW , taken
from O'Reilly's Java Servlet programing First edition)


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

public class MyServlet extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException { try { //set encoding of request and responce
req.setCharacterEncoding(Cp1255); //for hebrew windows 
res.setCharacterEncoding(Cp1255);
res.setContentType(Text/html; Cp1255);
String value = req.getParameter(param);

// Now convert it from an array of bytes to an array of characters. // Here
we bother to read only the first line. BufferedReader reader = new
BufferedReader( new InputStreamReader(new StringBufferInputStream(value),
Cp1255)); String valueInUnicode = reader.readLine(); }catch (Exception e)
{ e.printStackTrace(); } } }


this works fine , the only problem is that StringBufferInputStream is
deprecated . is there any other alternative for that ? Thanks in advance 
Yair 
 
 
Yair Fine
Golden-Channels
03 9272791
052 921250
 


-
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: Handling SOAP faults

2004-04-19 Thread Yansheng Lin
I started looking at SOAP a few months ago, that's why I said it.  Anyways,
what gets put in sendError(code, msg) should be available in your _custom_
error handler by calling req.getAttribute(javax.servlet.error.message). 

-Yan

-Original Message-
From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
Sent: April 16, 2004 18:38
To: Tomcat Users List
Subject: RE: Handling SOAP faults


Thanks for the interest and reply Yan, but you make assumptions 
that are incorrect:

 Ok, I think what happened here is: the response message is *overwritten*
 since you already defined a custom error-page in your deployment
descriptor.

No, the response message is sent back as the error response 
message, _not_ as the errorStream.  I checked this (as this being 
the simplest approach) _before_ implementing the custom error-
page in the deployment descriptor.

Putting an error message into the sendError(error-code, message) 
call does not return an errorStream.  What gets returned in the 
errorStream in that case is the default html error page.

I'm still looking for a way to write to the errorStream directly.

Bill

 PS. SOAP is a really good idea.   
I'm not sure why you say this, but ok.  SOAP has been a reality in 
the world I work in for a couple of years now, but it's only recently 
that people have actually started generating and expecting 
SOAPfaults.

 
 -Original Message-
 From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
 Sent: April 16, 2004 11:59
 To: Tomcat Users List
 Subject: RE: Handling SOAP faults
 
 
 What the SOAP spec says is that a SOAPfault XML document 
 needs to be returned in the errorStream and a response code of 
 500 returned.
 
 Sending a response 500 is easy, including a response message is 
 also easy.  But, what is included in the response message is not 
 written to the errorStream.  Tomcat seems to write whatever is 
 generated by the error-page directive in the deployment descriptor 
 to the error-stream, so I have currently solved the problem by 
 passing the SOAPfault document through the session variable to 
 the designated jsp listed in the error-page directive.
 
 It just seems that this is a hackery way to do it, and my servlet 
 should be able to write directly to the errorStream of the response, I 
 just can't see how.
 
 Any assistance is appreciated.
 
 Thanks,
 
 Bill
 
 
 Send reply to:  Tomcat Users List [EMAIL PROTECTED]
 From:   Yansheng Lin [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject:RE: Handling SOAP faults
 Date sent:  Fri, 16 Apr 2004 11:21:06 -0600
 
  How about setting the fault on the response?  With 500 as status.  Or is
  that what you asked for?
  
  -Yan
  
  -Original Message-
  From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
  Sent: April 15, 2004 19:04
  To: Tomcat Users List
  Subject: Handling SOAP faults
  
  
  Hello,
  
  I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
  a SOAP fault document with a response code of 500.  The only 
  way I've found to do this seems a bit of a hack, and I was 
  wondering if there was a better way.
  
  Currently I'm passing the SOAP fault document in the session 
  variable which gets picked up by the error-page handler (a jsp) 
  when I issue the sendError(500).  This results in the SOAPfault 
  message appearing in the error-stream on the client as it should, it 
  just seems as though I ought to be able to write to the error-stream 
  directly, but I can't find how  in the doc, or googling.
  
  Can anyone assist?
  
  Thanks,
  
  Bill
  
  
  -
  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]
 



-
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: Help with handling exceptions

2004-04-19 Thread Yansheng Lin
Hi,

First of all, you only defined a custom error page for one type of
exception, i.e., ServletException.  So if you only want to display the
exception message, you would want to wrap whatever the exception was in a
ServletException and rethrow it.  

Secondly, by calling c:catch ..., you basically told the JSP engine that
there is an exception/error on the page, forwarding to another page at this
point will give you an IllegalStateException. 

You might want to take a look at the following two directives:
%@ page errorPage=exception.jsp %
%@ page isErrorPage=true %

Cheers:)

-Yan

-Original Message-
From: Frank Burns [mailto:[EMAIL PROTECTED] 
Sent: April 19, 2004 07:08
To: Tomcat Users List
Subject: Help with handling exceptions


Hi,

Please help.

What I would like to do is redirect, or forward, to another page when an
exception occurs in certain JSP pages.

I call some JSPs that utilize beans (via JSTL) that have getter methods
which perform database access. These getter methods can generate exceptions.
When they do, the JSP simply incorporates some text, indicating the
exception, into the rest of the JSP's template text.

I have included error-page elements in the web.xml file, like this:

 error-page
  exception-typejavax.servlet.ServletException/exception-type
  location/common/exception.jsp/location
 /error-page

And other less general exception types. But these are all just ignored. Why?

I've also tried other methods, using JSTL. For example, I catch the
exception, using c:catch ...,and try to forward using jsp:forward 
But I get the following response incorprated into the original called JSP:

[Exception in:../foo.jsp] Cannot forward after response has been
committed

Also, when I catch the exception and try to redirect using c:redirect ...
I get the original called JSP with nothing incorprated into it.

I deduce form this, that the problem is that some of the JSP page's content
has already been committed, and so the forward or redirect is prohibited. Is
this correct?

SO MY QUESTION IS: How can I achieve my objective of displaying an error
page when an exception occurs?

Thanks,

Frank.


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



Best way to handle JNDI exceptions

2004-04-19 Thread Yansheng Lin
Hi,

I got this question while thinking whether to implement Business Delegate
for a small web application.  If I implemented a small Delegate, then I
would be able to catch ?all? the service failure inside of the Delegate.
But I got a feeling it may be an overkill since the application is pretty
straight forward.

So in Tomcat world, where would be the best place to handle a service
allocation failure?  Declaratively or programmatically?

Thanks in advance!

-Yan


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



RE: RequestDispatcher and pageEncoding question...

2004-04-16 Thread Yansheng Lin
Hi, 

You are confused with request and response.  The request is shared by the
forwarding jsp and the forwarded jsp, not the response(well kind of, but not
until it's being generated).  You will have to explicitly set the response
contentType to utf-8 in the forwarded page.  

-Yan


-Original Message-
From: Timothy Stone [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 14:45
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: RequestDispatcher and pageEncoding question...


Timothy Stone wrote:

 Timothy Stone wrote:
 
 List,

 A servlet I am debugging and trying to understand sets the response's 
 contentType as follows:

 response.setContentType( text/html;charset=UTF-8 );

 Shortly following the following forward is done:

 request.getRequestDispatcher( jspPage ).forward( request, response );
 response.getWriter().flush();

 The JSP forwarded gets the response with the contentType set, but 
 commiting the response seems to reset the contentType to 
 text/html;charset=ISO-8859-1, the default.

 The JSP in the forward does not set a pageEncoding attribute in the 
 page directive, so I'm pointing the finger there at the moment. Can 
 someone outline what is going on behind the scenes of the 
 requestDispatcher call that would be reseting the response's contentType?
 
 
  From the documentation:
 
 ...Uncommitted output in the response buffer is automatically cleared 
 before the forward.
 
 So, is the call to response.setContentType() being reset on the 
 forward()? Can anyone elaborate?

I see that nearly exactly what I'm experiencing was discussed last year 
regarding the behavior as seen through Struts. No resolution given.

http://marc.theaimsgroup.com/?l=tomcat-userm=106323343414285w=2

I'll continue to watch this new thread for suggestions.

Again, with many thanks,
Tim

-
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: Incomplete HTML

2004-04-16 Thread Yansheng Lin
Hi,
Normally that's an indication of a programming error.  There is no file size
limit in java, so I don't think Tomcat would impose a limit all by itself.

-Yan

-Original Message-
From: Leonardo Ribas [mailto:[EMAIL PROTECTED] 
Sent: April 16, 2004 08:34
To: [EMAIL PROTECTED]
Subject: Incomplete HTML


My tomcat is returning incomplete html pages when the html to be returned is
too big.
For example, when i want to create a combo box with all cities from my
country, tomcat return a incomplete html like this:
...
select
optioncity 1/option
optioncity 2/option
optioncity 3/option
...
optioncity 300/option
optioncity 301/option
HERE TOMCAT ENDS THE HTML FOR EXAMPLE.

Any idea about whats happening??

Thanks



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


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



RE: Handling SOAP faults

2004-04-16 Thread Yansheng Lin
How about setting the fault on the response?  With 500 as status.  Or is
that what you asked for?

-Yan

-Original Message-
From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 19:04
To: Tomcat Users List
Subject: Handling SOAP faults


Hello,

I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
a SOAP fault document with a response code of 500.  The only 
way I've found to do this seems a bit of a hack, and I was 
wondering if there was a better way.

Currently I'm passing the SOAP fault document in the session 
variable which gets picked up by the error-page handler (a jsp) 
when I issue the sendError(500).  This results in the SOAPfault 
message appearing in the error-stream on the client as it should, it 
just seems as though I ought to be able to write to the error-stream 
directly, but I can't find how  in the doc, or googling.

Can anyone assist?

Thanks,

Bill


-
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: Handling SOAP faults

2004-04-16 Thread Yansheng Lin
Hi, 
Ok, I think what happened here is: the response message is *overwritten*
since you already defined a custom error-page in your deployment descriptor.
You can do a few simple tests to find out whether this is true:
1) by taking out the error-page and see what's on the default 500
page
2) get the message from the response using scriptlet, I got a
feeling that there may be error-tags in jsp, but I cannot be sure without
checking with the manual.

-Yan

PS. SOAP is a really good idea. 

-Original Message-
From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
Sent: April 16, 2004 11:59
To: Tomcat Users List
Subject: RE: Handling SOAP faults


What the SOAP spec says is that a SOAPfault XML document 
needs to be returned in the errorStream and a response code of 
500 returned.

Sending a response 500 is easy, including a response message is 
also easy.  But, what is included in the response message is not 
written to the errorStream.  Tomcat seems to write whatever is 
generated by the error-page directive in the deployment descriptor 
to the error-stream, so I have currently solved the problem by 
passing the SOAPfault document through the session variable to 
the designated jsp listed in the error-page directive.

It just seems that this is a hackery way to do it, and my servlet 
should be able to write directly to the errorStream of the response, I 
just can't see how.

Any assistance is appreciated.

Thanks,

Bill


Send reply to:  Tomcat Users List [EMAIL PROTECTED]
From:   Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject:RE: Handling SOAP faults
Date sent:  Fri, 16 Apr 2004 11:21:06 -0600

 How about setting the fault on the response?  With 500 as status.  Or is
 that what you asked for?
 
 -Yan
 
 -Original Message-
 From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
 Sent: April 15, 2004 19:04
 To: Tomcat Users List
 Subject: Handling SOAP faults
 
 
 Hello,
 
 I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
 a SOAP fault document with a response code of 500.  The only 
 way I've found to do this seems a bit of a hack, and I was 
 wondering if there was a better way.
 
 Currently I'm passing the SOAP fault document in the session 
 variable which gets picked up by the error-page handler (a jsp) 
 when I issue the sendError(500).  This results in the SOAPfault 
 message appearing in the error-stream on the client as it should, it 
 just seems as though I ought to be able to write to the error-stream 
 directly, but I can't find how  in the doc, or googling.
 
 Can anyone assist?
 
 Thanks,
 
 Bill
 
 
 -
 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: IOException: Stream closed error when using custom tags

2004-04-16 Thread Yansheng Lin
Can you do a trace to see where it fails when you use jsp:include?  Is it
in doAfterBody() or doStartTag()?
Actually I don't quite understand your problem. You said it works fine when
you try to display it, but doesn't work when you set it as an attribute of
jsp:include.  Is that right?  If that's the case, normally what I would do
is break things up to two steps.  First get the url string, then set it in
the attribute.

-Yan

-Original Message-
From: shanmugampl [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 22:30
To: [EMAIL PROTECTED]
Subject: IOException: Stream closed error when using custom tags


Hi All,

I have a custom tag, which iterates through a data and provides a 
url to be included during every iteration. When i display the url as  a 
string, everything works fine. But when i try to include it through the 
jsp:include tag i am getting the following error.

java.io.IOException: Stream closed

org.apache.jasper.runtime.BodyContentImpl.ensureOpen(BodyContentImpl.java:62
4)

Once i get this error, reverting back to the old case(displaying the url as
a string) also throws the same error.
I cannot figure out the problem.

Also i have disabled tagpooling. Can anyone help me out on this.

Thanks
Shanmugam PL




-
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: Container calling destroy() method

2004-04-15 Thread Yansheng Lin
Um, how about approaching this indirectly.  For example by keeping a session
alive for this servlet.  Oh even uglier, send a request to the servlet every
10 minutes.  This will not guarantee that the servlet will always be
available, i.e.,loaded, and ready for use all the time, but it will prevent
the destroy() method being called on the servlet.

-Yan

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 06:37
To: Tomcat Users List
Subject: Re: Container calling destroy() method


On Wed, Apr 14, 2004 at 11:16:09AM +0530, [EMAIL PROTECTED] wrote:
: How do I control the webcontainer from calling the destroy() method of the
: servlets or JSP? Where do I make the appropriate settings?

Quoting the Servlet Spec v2.3, p 26:

- - - 8 - - - - - - - - - - - - -
SRV.2.3.4 End of Service

The servlet container is not required to keep a servlet loaded for any
particular period of time. A servlet instance may be kept active in a
servlet container for a period of milliseconds, for the lifetime of the
servlet container (which could be a number of days, months, or years),
or any amount of time in between.

When the servlet container determines that a servlet should be removed
from service, it calls the destroy method of the Servlet interface to
allow the servlet to release any resources it is using and save any
persistent state. For example, the container may do this when it wants
to conserve memory resources, or when it itself is being shut down.
- - - 8 - - - - - - - - - - - - -

Short version: not possible.

-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: Container calling destroy() method

2004-04-15 Thread Yansheng Lin
My mistakes:).  Unloading a servlet is gc.  A bit different from sleep in
threads.

How about this approach?  Override the destroy() method in custom servlet so
that it doesn't notify the container that the servlet has been marked
destroyed.  I got a bad feeling about this one though:).

-Yan

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 14:01
To: Tomcat Users List
Subject: RE: Container calling destroy() method



Hi,

Oh even uglier, send a request to the servlet
every
10 minutes.  This will not guarantee that the servlet will always be
available, i.e.,loaded, and ready for use all the time, but it will
prevent
the destroy() method being called on the servlet.

No it won't, unless the servlet always takes 10 minutes to serve a
request.

Yoav Shapira



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: struts validator

2004-04-14 Thread Yansheng Lin
I am not exactly sure why you mean by case-insensitive.  But if you use
[a-zA-Z] in your mask regexp, then the validator knows you want to accept
all the letters.  Is that what you asked?

-Yan

-Original Message-
From: mike jackson [mailto:[EMAIL PROTECTED] 
Sent: April 13, 2004 16:25
To: 'Tomcat Users List'
Subject: RE: struts validator


Yes there is, it works quite nicely I don't really want to re-write it.  I
just want to know if there's a property I can set on the mask or something
to be case insensitive.

--mikej
-=--
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: electroteque [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 13, 2004 2:22 PM
 To: Tomcat Users List
 Subject: RE: struts validator
 
 Is there a form validator in struts, is it customizable ? If so maybe
 extend
 the class ?
 
  -Original Message-
  From: mike jackson [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 14, 2004 8:17 AM
  To: 'Tomcat Users List'
  Subject: struts validator
 
 
  I'm using masks to validate some fields using the validator in
  struts.  But
  my masks are getting extremely complex trying to deal with both lower
 case
  and upper case possibilities.  Is there a way to specify that the mask
  should be evaluated as case insensitive?
 
  --mikej
  -=--
  mike jackson
  [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]


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



RE: Tomcat Service Crashing at Windows Shutdown

2004-04-14 Thread Yansheng Lin
Do you get any error log in catalina.out?  Or any Windows error?  You said
you see this everytime when you shut down your computer, maybe you installed
Tomcat under admin and use it as regular user...

-Yan

-Original Message-
From: Sean Rohead [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 10:13
To: [EMAIL PROTECTED]
Subject: Tomcat Service Crashing at Windows Shutdown


I am running the latest version of Tomcat (5.0.19) and have it installed
as a service on Windows XP.  I am running JDK 1.4.2_03.  Every time I
shut down my computer, I get a crash in tomcat.exe.  I have uninstalled
and reinstalled several times.  It also crashes if I stop the service
using the service manager.  Is anyone else seeing this?  Is there a fix?

Thanks,

Sean

-
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: No Java compiler was found error from time to time

2004-04-14 Thread Yansheng Lin
Hi, 
We had a problem with Tomcat failing after 4 hours or so a long, long time
ago.  And the other way to solve that problem was start tomcat on a separate
console and leave the console alone.  Something to do with the process being
killed by the OS.  Could that be happening here to your server, somehow the
javac or tomcat process gets into a state that could not be brought back
again?

-Yan

-Original Message-
From: Fedor Smirnoff [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 12:36
To: 'Tomcat Users List'
Subject: No Java compiler was found error from time to time


Hello, this is weird, I have about 50 identical applications running on
Tomcat5 under different application names. Everything works fine for about 6
hours, than all of a sudden I start getting
---
No Java compiler was found to compile the generated source for the JSP. 
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from
the JDK 
to the common/lib directory of the Tomcat server, followed by a Tomcat
restart. 
If using an alternate Java compiler, please check its installation and
access path.
---

It would be easy to track if it was happenning all the time, however even
just restarting Tomcat takes care of the problem. I do have JAVA_HOME and
CATALINA_HOME defined and again, same application will run just fine for a
while until giving this error, whch is fixed by restarting Tomcat. Any
ideas? Maybe it has something to do with me moving everything out of
WEB-INF/lib from each individual application to Tomcat5\common\lib, all
the applications are identical though and use same .jar files. But if that
would be the problem why it doesnt error all the time? Really need your help
on this one, thanks.

Fedor



-
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: SESSION PROBLEM in UNIX

2004-04-14 Thread Yansheng Lin

Hi, How about implementing HttpSessionListener so that you know when your
session is getting created and destroyed?  Also do you have multiple users
running the same jsp?  If you do, you may want to synchronize that block of
code.

Hope this helps:).

-Yan

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 07:41
To: Tomcat Users List
Subject: SESSION PROBLEM in UNIX


Hi,

I have a jsp page which is refreshed atuomatically every 10 seconds.I
get and put values in the session by using the implicit session variable
. Everything works fine for say 2-3 mins after that the implicit session
becomes null and throws a null pointer exception. 

I get a null pointer exception and session is printed as null but even
the if block (session == null) is not executed .

I printed the value of request.getSession(false);.This gives me session
object ,where as the implicit session does not have this after many
refresh interval  

During the first few refreshes both have the same value. 

Also note that this runs fine in Windows ,I get this problem only in
UNIX . I use tomcat 3.2 in unix and view using IE in windows 

I tried in tomcat 4 also I still get the same exception 

FIND below the code in JSP 
try{
  if (session == null){
  System.out.println(session is null:::);
  }
 System.out.println(session3:::+session.toString());
  if (session.isNew()) {
  System.out.println(HI);
 
session.setAttribute(BPRealtimeConstants.C_JPM_SESSION_FAIL_ID,failed)
;
   response.setHeader(Refresh,1; URL=/MCOne/BP/index.html);
   return;
  }
} catch (Exception e) {
   System.out.println(I am in exception );
   System.out.println(I am after hello
+request.getSession(false));
   e.printStackTrace();
}   
 
I am unble to find any resource on the net which might help me identify
the problem ,I am posting this for the second time .
Can there be any difference in session handling when tomcat is run in
unix and Windows.
Any inputs will really help me solve this production problem
 
 
Thanks and Regards
Mukund
 
 


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



RE: Newbie problem with JSP contexts virtual hosts

2004-04-14 Thread Yansheng Lin
Hi, that looks ok to me.  You can specify as many servlets as you want to
map/handle various type of patterns.  But I don't quite understand what you
mean by having a new instance of JspServlet with each host is a overhead.
Because that's probably something you want anyways.  

-Yan

-Original Message-
From: James Bucanek [mailto:[EMAIL PROTECTED] 
Sent: April 13, 2004 00:07
To: Tomcat Users List
Subject: Re: Newbie problem with JSP contexts  virtual hosts


While I didn't get any suggestions or feedback on my original question, I
believe I've found a solution.  Now I just need to run it by the group to
see if it's Kosher.

James Bucanek wrote on Sunday, April 11, 2004:
  !-- Virtual host: www.hotelmidnight.net --
  !-- (jlb 11-April-2004) Added virtual host --
  Host name=www.hotelmidnight.net debug=0
appBase=/Users/darkthirty/Sites
unpackWARs=false autoDeploy=true

!-- Context for the top-level web application --
Context path= docBase=. debug=99 reloadable=true/

  /Host

clip

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters for this web application --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param
/web-app

The basic problem with this arrangement is that my JSP pages ran in the
context of the 'jsp' servlet that's defined in
${CATALINA_HOME}/conf/web.xml for the default Host, not the Context that I
defined in my web-app that I want to run in my virtual Host.

So, it occurred to me that I could create may own instance of the JSP engine
as my Servlet.  Now that I have a Servlet to reference, I can then map
all of the *.jsp files in my virtual host to that:

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters available to all web applications --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param

servlet
servlet-namejsp2/servlet-name
 
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueINFORMATION/param-value
/init-param
/servlet

!-- The mapping for the JSP servlet --
servlet-mapping
servlet-namejsp2/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

/web-app

This seems to work just great.  The Manager sees my application (by name),
and all of the context parameters appear in my JSP pages.

As far as I can tell, there doesn't seem to be anything really bad about
this solution.  Except that I end up with a new instance of the JspServlet
for each virtual host, which is probably a tolerable amount of overhead.

My question is this: Is this the right way to accomplish this?

__
James Bucanek   mailto:[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: No Java compiler was found error from time to time

2004-04-14 Thread Yansheng Lin
Memory Leak?
http://marc.theaimsgroup.com/?t=10796383224r=1w=2

One thing you can try, and it depends on your applications, is to bring down
the not-so-important ones and see how much things improve.  Divide and
conquer:).

-yan

-Original Message-
From: Fedor Smirnoff [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 15:08
To: 'Tomcat Users List'
Subject: RE: No Java compiler was found error from time to time


Actually I think its something else, I completely missed it. With that many
applications under Tomcat, it runs out of memory and than reports this
error. Weird thing is that I added JAVA-OPTS variable with -Xmx1028m
-Xms512m but it still runs out, any ideas?

Thanks,
Fedor

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 14, 2004 12:28 PM
To: 'Tomcat Users List'
Subject: RE: No Java compiler was found error from time to time

Hi, 
We had a problem with Tomcat failing after 4 hours or so a long, long time
ago.  And the other way to solve that problem was start tomcat on a separate
console and leave the console alone.  Something to do with the process being
killed by the OS.  Could that be happening here to your server, somehow the
javac or tomcat process gets into a state that could not be brought back
again?

-Yan

-Original Message-
From: Fedor Smirnoff [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 12:36
To: 'Tomcat Users List'
Subject: No Java compiler was found error from time to time


Hello, this is weird, I have about 50 identical applications running on
Tomcat5 under different application names. Everything works fine for about 6
hours, than all of a sudden I start getting
---
No Java compiler was found to compile the generated source for the JSP. 
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from
the JDK 
to the common/lib directory of the Tomcat server, followed by a Tomcat
restart. 
If using an alternate Java compiler, please check its installation and
access path.
---

It would be easy to track if it was happenning all the time, however even
just restarting Tomcat takes care of the problem. I do have JAVA_HOME and
CATALINA_HOME defined and again, same application will run just fine for a
while until giving this error, whch is fixed by restarting Tomcat. Any
ideas? Maybe it has something to do with me moving everything out of
WEB-INF/lib from each individual application to Tomcat5\common\lib, all
the applications are identical though and use same .jar files. But if that
would be the problem why it doesnt error all the time? Really need your help
on this one, thanks.

Fedor



-
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: DefaultServlet character encoding

2004-04-13 Thread Yansheng Lin
three up, three down, bottom of ninth

You can use a filter, see j2ee design pattern catalog for more details, and add
to your deployment descriptor this:

  filter
filter-nameEncodingFilter/filter-name
filter-classorg.myproject.EncodingFilter/filter-class
init-param
param-nametargetEncoding/param-name
param-valueutf-8/param-value
/init-param
  /filter

btw, are you interested in joining an open-source project that's japanese
related?  I need help:).  see http://j2e-translate.sourceforge.net

-Yan


-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 10:41 AM
To: Tomcat Users List
Subject: Re: DefaultServlet character encoding


Mark Thomas wrote:

  Tomcat ignores META tags (for good reasons I won't go in to). Use %@ page
  pagEncoding=... %.

...which doesn't work for static HTML pages, where I'm having the
problem...

Allistair Crossley wrote:
 or specify -Dfile.encoding=UTF or whatever in your tomcat startup

..which I have, and which has made no difference, as I stated in
the original mail...

Matt Woodings wrote:
  if your tomcat is a NT Service, this needs to go in the registry

..which, as the *first line* of the original post says, it's not
(RedHat != NT)...


Three up, three down -- anyone else care to try next inning? C'mon,
swing for the fence... :-)


-Original Message-
Subject: DefaultServlet character encoding

Config: Tomcat 4.1.29 -- Sun Java 1.4.2_01-b06 -- RedHat ES

Problem: static HTML pages meta-tagged to use Shift_JIS are sent as
ISO-8859-1.

All the googling I've done turns up the suggestion to start Tomcat
with -Dfile.encoding=UTF-8 in either JAVA_OPTS or CATALINA_OPTS to
make UTF-8 the default. I've tried both, neither made a difference.

To baffle me more, my two (unfortunately) divergent dev environments
  Tomcat 4.1.27 -- Sun Java 1.4.2_01-b06  -- W2k
  Tomcat 5.0.19 -- Sun Java 1.4.1_01-69.1 -- OSX.2.8
serve a sample Shift_JIS page just fine out of the box...

-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



-
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, Tiles and encoding

2004-04-13 Thread Yansheng Lin
Hi, did you get this one figured out yet?  

If it's on a form, you might want to try method=posted and
enctype=multipart/form-data.

-Yan 


-Original Message-
From: Paulo Alvim [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 12, 2004 9:11 AM
To: [EMAIL PROTECTED]
Subject: tomcat 5, Tiles and encoding


Hi!

I've just moved my Struts+Tiles application from TC4 to TC5 and I'm now
having encoding problems when trying to post data...(portuguese special
characters aren't being recognized).

I've read topics about Tomcat 5+encoding issues related to included JSPs
(ex: http://forum.java.sun.com/thread.jsp?forum=45thread=495792) and since
I use Tiles and Tiles uses RequestDispatcher.include calls to include
markup jsp components in layouts, I'm trying this way...but the labels in my
page are ok - just my posted data have the problem.

Is there anyone with the same issue?

Thanks in advance!

Paulo Alvim





-
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: question about jsp:element and jsp:attribute

2004-04-08 Thread Yansheng Lin
Hi, I don't think the code makes sense.  It is assumed that a jsp action tag
starts with a opening tag and ends it somewhere in a logical manner, i.e.,
during the translation, the jsp engine has to figure out where the start and end
are. Since the if statement will not be evaluated until runtime, there is no way
to know for sure if the end tag is going to be valid one or the other.

That's my interpretation though.

-Yan

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Suen
Sent: Tuesday, April 06, 2004 2:18 AM
To: [EMAIL PROTECTED]
Subject: question about jsp:element and jsp:attribute


Hi

Is the following code correct?

jsp:element name=fo:table-column
  jsp:attribute name=column-width
jsp:expressionwidths[i]/jsp:expression
  /jsp:attribute
  jsp:scriptlet
if (bgColors[i] != null) {
  /jsp:scriptlet
  jsp:attribute name=background-color
jsp:expressionbgColors[i]/jsp:expression
  /jsp:attribute
  jsp:scriptlet
}
  /jsp:scriptlet
/jsp:element

tomcat can run, but the generated java code is not correct:
  out = _jspx_page_context.pushBody();
  out.print(widths[i]);
  String _jspx_temp0 = ((javax.servlet.jsp.tagext.BodyContent)out).getString();
  out = _jspx_page_context.popBody();
  out.write( + fo:table-column +  column-width=\ + _jspx_temp0 + \ +
);

   if (bgColors[i] != null) {


   }

  out.write(/ + fo:table-column + );

the second jsp:attribute/ between jsp:scriptlet/ was lost.
can I dynamically generate attribute? and in JSP 5.14, jsp:element
only accept jsp:attribute  jsp:body as child element.

I use tomcat 5.0.19

Regards




-
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: request.getUserPrincipal();

2004-04-08 Thread Yansheng Lin
Yes, you are looking at the right place.  Each request carries those information
from the client to the server.  But those information has to be stored in a
session that's asociated with the client somehow once they log in, otherwise how
would you know which client it is for a particular request.  

-Yan

-Original Message-
From: Winter, G (Graeme) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 1:03 AM
To: 'Tomcat Users List'
Subject: RE: request.getUserPrincipal();


Hi,

I should probably clarify this. I have hacked the Tomcat 5
RequestHeaderExample servlet so that it prints out these values:

request.getAuthType();
request.getRemoteUser();
request.getUserPrincipal();

*but* they all print NULL. Even on the first call - no sessions involved
(at least, I didn't *think* there re any sessions involved!) I have
definately logged in, because Mozilla asked me if I would accept the
server's certificate, and also asked me for the password to my private
certificate store, and I set clientAuth=true - so should be OK all round.

Am I looking in the wrong place? I'm looking at the request object for info
here...

(probability  0.9 this is the case)

Cheers,

Graeme

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: 07 April 2004 21:26
To: 'Tomcat Users List'
Subject: RE: request.getUserPrincipal();


Hi, how often do you invalidate your sessions?  It's hard to imagine your
application would expire a user's session right after he logs in.  But take
a
look at the request header to see if the subsequent session ids are the same
as
the first one.  Other than that, without more specific info on how you
implemented the authentication, it's hard to figure out what's going on:).

-Yan


-Original Message-
From: Winter, G (Graeme) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 7:46 AM
To: 'Tomcat Users List'
Subject: request.getUserPrincipal();


Hi All,

I am trying to perform client authentication using certificates, and I have
made some progress - the certificates are now accepted as OK, which is nice.
Obviously I am using https too...

However, the sting is that the methods

request.getAuthType();
request.getRemoteUser();
request.getUserPrincipal();

All return NULL, which is contrary to the documentation, since I know the
user (i.e. me) has authenticated. clientAuth=true in server.xml.

Anyone else out there had this problem, and more to the point found a
solution?

Cheers,

Graeme

-
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: Tomcat returning absolute http:// URL behind SSL Proxy instead of keeping https://

2004-04-08 Thread Yansheng Lin
hi, for tomcat to accept https protocal, you need to define a SSL connector.
take a look in your server.xml to see if the SSL connector was commented out.
and the scheme attribute defaults to https.  

Hope this helps:).

-Yan

-Original Message-
From: Fletcher Cocquyt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 7:51 PM
To: [EMAIL PROTECTED]
Subject: Tomcat returning absolute http:// URL behind SSL Proxy instead of
keeping https://


Hi,
We have the classic 3 tiered webapp architecture with BigIP
loadbalancers acting as SSL Proxies - such that requests for the webapp:
 
https://server/jkmount/
 
1)   Come into the BigIP - the BigIP Proxies the HTTPS and sends the
same request to the Apache servers on port 80
2)   Apache sees the URI with a matching jkmount and sends the
request to the Tomcat worker
3)   PROBLEM: tomcat constructs the absolute URL to return based on
the assumption its port 80 and returns the insecure
http://server/jkmount/index.jsp
 
Found some relevant docs here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/proxy-howto.html
 
But its unclear how to get tomcat to keep the https:// instead of
returning the absolute http:// 
 
Apache 2.0.48
Tomcat 4.1.30
 
Thanks for any tips!
 
Fletcher Cocquyt
Senior Systems Administrator
[EMAIL PROTECTED]
 


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



RE: Wrapping Requests and jsp:include

2004-04-07 Thread Yansheng Lin
Hey, you may want to try the question on the dev list.  But IMHO if tomcat does
not follow the spec, then it would be a bug.  um, can you think of any other
ways of retrieving the image without using a wrapper?  if you are simply viewing
the image, there may be a easier way. But I am not sure what you are doing
exactly

-Yan

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 8:19 AM
To: 'Tomcat Users List'
Subject: RE: Wrapping Requests and jsp:include


I know that works. My main concern was does tomcat internally construct
a new request. Because then I wouldn't be getting my wrapped request in
the included page.  But it appears to pass along the original request
object (whatever it is).

 -Original Message-
 From: Yan Lin [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 12:10 AM
 To: Tomcat Users List
 Subject: Re: Wrapping Requests and jsp:include
 
 
 Hi, I think that's the correct behaviour for
 jsp:include action. The request is shared among all
 the included pages.  If you are still in doubt, you
 can do a simple test by setting a param in your
 request for you main jsp file, then try to retrieve it
 in your included jsp file.  
 
 Hope this helps:).
 
 -Yan
 
 --- Mike Curwen [EMAIL PROTECTED] wrote:
  Hello,
  
  I'm just wanting to check if something is
  consistent with Spec.  I've
  tested code that performs the following, in tomcat
  4.1.29, and it 'works
  as expected'. So I'm curious if this is a
  'guaranteed' behaviour across
  all containers, or if this is one of those fuzzy
  areas, and it just
  happily works in Tomcat.
   
  I am using com.oreilly.servlet to upload files and
  I'm using them
  through a file upload filter and
  MultipartRequestWrapper class
  (borrowing heavily from those available in cos).
   
  in process.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  jsp:include page=someOtherJsp.jsp /
  --
  
  in someOtherJsp.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  
  In my log4j logs:
  DEBUG com.gbim.web.FileUploadFilter - [wrapping
  request]
  DEBUG booster/process.jsp - [filename:
  separator.gif]
  DEBUG booster/someOtherJsp.jsp - [filename:
  separator.gif] 
  
  
  So: I can access the request again, in the included
  file, as a
  MultiPartRequestWrapper.  So when Tomcat, the
  container, makes its
  internal jsp:include request, it passes along the
  *existing* request,
  wrapped and everything, as is. I seemed to recall
  some conversation
  about facades getting in the way, but this has been
  taken care of since
  ? Or was I dreaming? I've googled for this (probably
  imagined)
  conversation, and can't find it.
  
  
  ---
  mike curwen
  intermediate programmer
  globally boundless
  
  204 885-7733  ext 229
  www.globallyboundless.com
  
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 
 -
 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: hostage to this list

2004-04-07 Thread Yansheng Lin
Hi, This happened to me once when I changed my email address.  But it's wierd
that you didn't get a reply... Maybe tomcat mail server demon doesn't want to
let you go:).

Oh, the address you use to unsubscribe from the list has to be the same as the
one you used to subscribe.

-Yan

-Original Message-
From: Tracy Bost [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 8:16 PM
To: Tomcat Users List
Subject: hostage to this list


I really enjoy this list, but have been trying to unsubscribe several
times today and never receive  a reply back when sending to
[EMAIL PROTECTED] 
  What's the deal here ? Is there no way out ?


-
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: request.getUserPrincipal();

2004-04-07 Thread Yansheng Lin
Hi, how often do you invalidate your sessions?  It's hard to imagine your
application would expire a user's session right after he logs in.  But take a
look at the request header to see if the subsequent session ids are the same as
the first one.  Other than that, without more specific info on how you
implemented the authentication, it's hard to figure out what's going on:).

-Yan


-Original Message-
From: Winter, G (Graeme) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 7:46 AM
To: 'Tomcat Users List'
Subject: request.getUserPrincipal();


Hi All,

I am trying to perform client authentication using certificates, and I have
made some progress - the certificates are now accepted as OK, which is nice.
Obviously I am using https too...

However, the sting is that the methods

request.getAuthType();
request.getRemoteUser();
request.getUserPrincipal();

All return NULL, which is contrary to the documentation, since I know the
user (i.e. me) has authenticated. clientAuth=true in server.xml.

Anyone else out there had this problem, and more to the point found a
solution?

Cheers,

Graeme

-
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: UTF-8 encoding

2004-04-05 Thread Yansheng Lin
Hi, you can specify the utf-8 encoding with a filter.  All you need to do is
implement a EncodingFilter class, and then in your deployment descriptor add the
filter element as 
follows:

  filter
filter-nameEncodingFilter/filter-name
display-nameEncodingFilter/display-name
descriptionUTF-8 encoding/description
filter-classorg.mysite.EncodingFilter/filter-class
init-param
param-nametargetEncoding/param-name
param-valueutf-8/param-value
/init-param
  /filter

Hope this helps:)

-Yan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 6:49 AM
To: Tomcat Users List
Subject: UTF-8 encoding


Hi!

I have a web-application which on the serverside needs UTF-8 encoding. I 
tried to install and run apache/tomcat on a Windows-XP environment, and 
the server says, the encoding is not UTF-8. same applicationwith the same 
apache/tomcat version runs correctly on a windows 2000 environment. Is 
this a XP specific problem and is there any possibility to force tomcat to 
send data in UTF-8 encoding.



Best regards
 bab








 


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



RE: JSP include directive and UTF-8 files in Tomcat 5

2004-04-05 Thread Yansheng Lin

And, of
course, there can be only one %@ page directive, at
the root JSP page.

um, might not understand you correctly.  you can have as many as you want
actually.
i.e., %@ page pageEncoding=utf-8 %
%@ page contentType=text/html;charset=utf-8 %
%@ page import=myOwnClass %
...

Hope this helps:).

-Yan

-Original Message-
From: Ivan Montoro [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 11:33 AM
To: Tomcat Users List
Subject: RE: JSP include directive and UTF-8 files in Tomcat 5


The fact is that all JSP pages are created in the
work/ directory in UTF-8, at least with Tomcat 5.0.19
(javaEncoding is UTF-8 by default). pageEncoding
controls the way Tomcat reads the source file, but
it's useless with the [EMAIL PROTECTED] directive. And, of
course, there can be only one %@ page directive, at
the root JSP page.

By the way, I cannot find the Class who controls this
tag at cvs.apache.org (this is a gigantic project!),
any clues?

 --- Mike Curwen [EMAIL PROTECTED] wrote:  So:
  %@ page pageEncoding=utf-8 %
  
 would be the correct way to handle the case of
 including files with
 utf-8 characters, except Tomcat ignores
 pageEncoding? (for all files?
 for non-JSP files?)
  
 
 
  -Original Message-
  From: Ivan Montoro
 [mailto:[EMAIL PROTECTED] 
  Sent: Monday, April 05, 2004 12:07 PM
  To: Tomcat Users List
  Subject: RE: JSP include directive and UTF-8 files
 in Tomcat 5
  
  
  Hi Mike,
  
  Nope, pageEncoding does not work either. JSP
 syntax
  1.2
 

(http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.htm
  l#1001361)
  stands that this is the page source character
  encoding, and javaEncoding at web.xml controls
 the
  encoding for resulting .java files at work/
 directory.
  I'm afraid this is a bug in the [EMAIL PROTECTED] JSP
  implementation, opening all files in ISO-8859-1.
  
 
 

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

___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

-
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: FW: jsp:include tag does not preserve encoding of the text

2004-04-05 Thread Yansheng Lin
Agreed!  
Hey, one way I can think of to solve your problem is to use a jsp file instead of html 
page.  That way you can set the pageEncoding to be utf-8.  That should take care of 
it.  Also I read it somewhere that it's always better to use jsp pages, not sure why 
though.  Something to do with how the container handles different types.

-Yan

-Original Message-
From: Hiroshi Iwatani [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 03, 2004 3:40 AM
To: Tomcat Users List
Subject: Re: FW: jsp:include tag does not preserve encoding of the text


In your deployment, html is handled by Apache and not processed by JSP/Servlet
engine. Included JSP inherit main-page setting. If you run Tomcat stand-alone
without other HTTP server, you will find its html handling characteristics.
I don't expect much from Tomcat, though ;-)

eMantra Information wrote:
 
 hi
 
 I am using Apache web server and Tomcat 4.1.
 
 I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html 
 file. This html file contains UTF-8 encoded text. When this JSP is executed, the 
 UTF-8 text is displayed as garbage characters.
 
 
 I have included following in the JSP
 %@ page contentType=text/html; charset=UTF-8 % 
 
 
 I have included following in the info.html
 meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8
 
 However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets 
 displayed correctly.
 
 I suppose, the JSP engine does not interprete the content of the html file correctly 
 according to its encoding.
 Where as if it is a .jsp, then it is int erpreting it appropriately?
 
 Can anybody throw some lite on this?
 
 
 regards
 haresh
 
 sample files...
 
 
 test1.jsp..
 %@ page contentType=text/html; charset=UTF-8 % 
 
 % 
 
 response.setContentType(text/html; charset=UTF-8);
 
 %
 
 
 
 HTML
 
 HEAD
 
 meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8
 
 /HEAD
 
 BODY
 
 jsp:include page=data1.html flush=true/
 
 /BODY
 
 /HTML
 
 
 data1.html.
 
 meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8
 br
 .
 br
 
 

-- 
Hiroshi Iwatani

*stop cruelty* Annual number of institutionally euthanized cats and dogs 
including kittens and puppies: US 5 million, JP 500 thousand. How about your 
country? *for our better karma*
-

-
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: Servlet Context Listener problem - Solved

2004-04-05 Thread Yansheng Lin
hehe, that kind of thing happens(speaking from experience)
Glad you found the problem.  At first glance, I thought you found a bug in
tomcat 5:).

-Original Message-
From: Jason Bucholtz [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 2:57 PM
To: Tomcat Users List
Subject: RE: Servlet Context Listener problem - Solved


Yoav,

Thanks for the quick response-  Found my error, and embarrassingly it was
a
simple logic problem.  My logger was only being initialized if it had not
been previously initialized by the JVM.  As such, within that logic block
the log messages were only being output the very first time the app
started
in a tomcat session.   So, it appeared that the  listener wasn't being
called, but in actuality it was doing exactly as it should.

Jason


Jason A. Bucholtz
[EMAIL PROTECTED]

SCS Computer Center
152 Noyes Lab
4-0560

On Mon, 5 Apr 2004, Shapira, Yoav wrote:


 Hi,
 A couple of quick notes as I have to run to a meeting:
 - I think your understanding of the spec is correct
 - What happens if you reload the app (not undeploy and redeploy, but
 reload) via the manager webapp?
 - Are you sure the undeploy is COMPLETELY done cleanly, and no threads
 from your own webapp are left behind?  For example, do you have to
 shutdown your log manager?

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Jason Bucholtz [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 05, 2004 3:04 PM
 To: Tomcat Users List
 Subject: Servlet Context Listener problem
 
 I am using tomcat 5.0.19 and am experiencing different behavior from a
 servlet context listener than what is outlined in the servlet spec.
 My
 expectation is that the listener methods  contextInitialized()  and
 contextDestroyed() should be called respectively each time the
 application
 is undeployed and redeployed.
 
 However, in practice it appears the methods are only called once per
 tomcat session.  I have  a class that implements Servlet context
 listener
 and the methods contextInitialized() and  contextDestroyed()  are only
 called once and not on subsequent undeploys and redeploys.  However,
 restarting tomcat causes the methods to be called again, but only for a
 single deployment of the application.  Those methods are not called
 again
 unless tomcat is restarted (I have also tried the reload task, start
 and
 stop all with no success).
 
 That is, if the application is deployed and tomcat is restarted, the
 method contextInitialized() is called, and if the app is undelpoyed the
 method contextDestroyed() is also correctly called.  On any subsequent
 deployments or undeployments the servlet context listener methods are
 not
 called.  Restarting  tomcat always results in the methods being called
 again on the first deployment or undeployment after the restart.
 
 First, is the witnessed behavior the way context listeners are supposed
 behave?  If not, do you have any suggestions on where I might look to
 correct the problem.
 
 
 For completeness, I am including my listener tag from web.xml file and
 the
 source of the class that implements ServletContextListener.
 
 
 In my web.xml file I have registered the listener as follows:
 
 listener
  listener class
 scs.reaction.common.init.ReactionInitialization
 /listener-class
 /listener
 
 
 
 And here is my implementation:
 
 
 package scs.reaction.common.init;
 import java.io.IOException;
 import java.util.logging.*;
 
 import javax.servlet.*;
 
 public class ReactionInitialization implements ServletContextListener {
 
  Logger logger = null;
 
  public ReactionInitialization(){}
 
  public void contextInitialized(ServletContextEvent arg0){
 
  // Check to see if the root log manager for this
 application exists if
  // not initialize it and set its default atributes
 
 if(LogManager.getLogManager().getLogger(scs.reaction)==
 null)
  {
 
  //Call the supers initialization first
  // we will name all loggers after thier fully
 qaulified class name
 
  logger = Logger.getLogger(scs.reaction);
 
  FileHandler fileHandler = null;
 
 
  //creare our own file handler
  // the file handler will cycle through 2 files
  // files are limited in size to 100KB and
 sessions
 are appended
 
  try {
  fileHandler = new
 FileHandler(System.getProperty(catalina.home)+ /logs/ +
 scs.reaction.log,100,2,true);
  } catch (SecurityException e) {
  e.printStackTrace();
  } catch (IOException e) {
  e.printStackTrace();
  }
 
 
  // use a standard text formatter for the file
 output
  fileHandler.setFormatter(new SimpleFormatter());
  //attach the handler

RE: problem in jsp:useBean

2004-04-05 Thread Yansheng Lin
Hey I am not exactly sure what happens here, I don't use jsp tags often
nowadays.  But I will take a stab.  Because you specify the scope of the
JavaBean to be session scope, the JSP engine will skip the body of jsp:useBean
tag if the bean object is already in the session. You said the subsequent
request to the page results no error, maybe by that time the cached session(from
previous deployment) was invalidated finally.  I wonder if things would be
different when you use a different scope.

no? anyone?

-Yan


-Original Message-
From: Anu Mathew [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 1:42 AM
To: [EMAIL PROTECTED]
Subject: problem in jsp:useBean



Hi,

I'm getting an error 

java.lang.NoClassDefFoundError:
net/advinfo/pcs/pcscontroller/pspsetup/standards/LanguageObjectTypeAndChklstCatB
ean
 at
org.apache.jsp.PSPStandards.Ed_002dPSPStandards_jsp._jspService(Ed_002dPSPStanda
rds_jsp.java:143)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:284)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:204)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:742)
 at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
her.java:506)
 at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:443)
 at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:359)
 at net.advinfo.pcs.pcsdispatcher.Dispatcher.service(Dispatcher.java:103)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:284)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:204)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
57)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.ja
va:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValv
e.java:245)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
99)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.ja
va:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.ja
va:151)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.ja
va:149)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156
)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.ja
va:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:700)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:68
3)
 at java.lang.Thread.run(Thread.java:534)

for the folowing line in a jsp
jsp:useBean id=objLangObjChkBean
class=net.advinfo.pcs.pcscontroller.pspsetup.standards.LanguageObjectTypeAndChk
lstCatBean scope=session /

net.advinfo.pcs.pcscontroller.pspsetup.standards.LanguageObjectTypeAndChklstCatB
ean is in WEB-INF\classes\net\advinfo\pcs\pcscontroller\pspsetup\standards\

Here is my server info

  Server Information 
  Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture 
  Apache Tomcat/5.0.18 1.4.2_03-b02 Sun Microsystems Inc. Windows XP 5.1 x86



The intersting thing is when I access the same JSP again I'm not getting this
error. This error happens randomly when the page is accessed for the first time
after the application is deployed. The same page works fine in tomcat 4.x.

Please let me know the solution if any.
Thanks,
Anu Mathew



[OT] The Way Java Handles Date

2004-04-02 Thread Yansheng Lin

Hi, Just wondering if anyone found this aspect of Java annoying.  I know this is
usually a faq, and a lot of people have put a lot of efforts making it better.
But I just find that the learning curve is a bit too steep for new comers.  And
it hasn't been improve in j2sdk-1.5 either, at least from the interface point of
view.  For example, a developer still has to go through the whole Calendar and
DateFormat process to get a Date from a String 

I feel like complaining today:). 

-yan


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



RE: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
it's hard to say what's causing the problem exactly without knowing your context
and your action-mappings.  maybe in your action mapping, you have one extra / in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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



RE: [OT] The Way Java Handles Date

2004-04-02 Thread Yansheng Lin
As I said, this is a faq.  There is already tutorials on Sun's Website.  But the
way it works now is kind of counter-intuitive.  That's the problem to new user.
Wouldn't it be nicer if Sun came up with an Wrapper interface that allows the
user create a Date object with different arguments?   


import java.util.Date;
import java.text.ParseException;

public class MyClass {
  private final static DateFormat fmt = new SimpleDateFormat(dd/MM/);

  public Date convert(String str) {
try {
  Date date = fmt.parse(str);
  return date;
}
catch (ParseException pe) {
  System.out.println(The string does not contain a date in the expected
format);
  return null;
}
  }
}


-yan

-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 11:26 AM
To: Tomcat Users List
Subject: Re: [OT] The Way Java Handles Date


I agree. I found date manipulation a real pain when I first started using
them.

On the other hand, I know how to work with them now and I'm not prepared to
write anything better than the existing Java date/calendar classes so I can
live with it now.

I think a short tutorial is probably the best answer for explaining this to
people who are new to date manipulation in Java but I'm too busy with other
things to write one myself, at least for the next few weeks.

Maybe you could write a tutorial as you learn what you need to know?

Rhino

- Original Message - 
From: Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:47 AM
Subject: [OT] The Way Java Handles Date



Hi, Just wondering if anyone found this aspect of Java annoying.  I know
this is
usually a faq, and a lot of people have put a lot of efforts making it
better.
But I just find that the learning curve is a bit too steep for new comers.
And
it hasn't been improve in j2sdk-1.5 either, at least from the interface
point of
view.  For example, a developer still has to go through the whole Calendar
and
DateFormat process to get a Date from a String

I feel like complaining today:).

-yan


-
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: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
I am not sure about Context path=/ docBase=myApp/.

I think if you try Context path=/myApp docBase=myApp/, the container will
append a / to the path, i.e., /myApp/***.do.  But if you use Context path=
docBase=myApp/, then that's the default webapp path, which is not something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



-
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: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
ok, whatever you specify in your path is the context path.  if you don't want to
have the context been part of your request URL(i.e., www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the path=.
But if your server is serving more that one webapps, the implication of this is
that all other requests that are not assigned to other contexts will be
processed using this default context.  

So if you only run one web application, there is nothing to worry about.  If you
are running multiple web applications, then this is a good place to catch those
unassigned requests.  

Hope this helps:).

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying Context path= docBase=myApp/

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about Context path=/ docBase=myApp/.

I think if you try Context path=/myApp docBase=myApp/, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use Context
path=
docBase=myApp/, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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


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



RE: [OT] The Way Java Handles Date

2004-04-02 Thread Yansheng Lin
Thanks Yoav, always helpful, eh:)

But I am with Rhino on using non-standard packages, by no means undermining
the usefulness of the two classes in commons-lang.  Just for someone who is
learning this from the scratch, there could be a better interface.  But they
try, I guess:).  Here's a few tutorials on the sun:

http://java.sun.com/docs/books/tutorial/i18n/format/dateintro.html
http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html

-yan

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 1:21 PM
To: Tomcat Users List
Subject: RE: [OT] The Way Java Handles Date



Hi,
See commons-lang's DateUtils and DateFormatUtils
(http://jakarta.apache.org/commons/lang/apidocs/index.html).
Enhancements to these classes should be suggested on the commons-dev
mailing list.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 3:16 PM
To: Tomcat Users List
Subject: Re: [OT] The Way Java Handles Date

Good point! Instead of complaining about it, the best way is to come up
with
a better way ourselves. Unless of course we can persuade Sun to do it
for
us
;-)

Mind you, Roedy Green already has a BigDate package (if I remember the
name
correctly) and I was starting to think about using it before I finally
figured out the date stuff that I needed to know. Maybe that would meet
your
needs. Personally, I've resisted going that way because I didn't want
to
use
something non-standard if at all possible. But that's just me.

As for the tutorial you saw on dates, I'd be curious to know where it
is. I
don't remember seeing much of anything about dates in the Java Tutorial
but
maybe you mean some other tutorial. I figured out most of what I've
learned
about dates from Google posts where people were discussing problems and
that
was not the nicest way to do it.

Rhino

- Original Message -
From: Denis Haskin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 3:00 PM
Subject: Re: [OT] The Way Java Handles Date


 Why does Sun need to do it?  Anyone could do it.  Seems like it could
be
 a candidate for Jakarta Commons... or is it too trivial?

 http://jakarta.apache.org/commons/

 dwh


 Yansheng Lin wrote:

 As I said, this is a faq.  There is already tutorials on Sun's
Website.
But the
 way it works now is kind of counter-intuitive.  That's the problem
to
new
user.
 Wouldn't it be nicer if Sun came up with an Wrapper interface that
allows
the
 user create a Date object with different arguments?
 
 



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




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: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
Hi,

If the DNS is configured for that host, then yeah, you can use it instead of the
localhost.  But then you have to change all your host to use the same
hostname. 

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 1:34 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


It does.  Thanks Yan!

What should I specify as my defaultHost in the Engine element?  And the name
in the Host element?

Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

should I make defaultHost and name the actual url of the application?  ie
www.myApp.com?

Engine name=Catalina defaultHost=www.myApp.com debug=0

  Host name=www.myApp.com debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

What exactly happens when you do this?  Does tomcat look in your hosts file
to see where the domain name is mapped?   The documentation is a little bit
unclear for me.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 1:22 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

ok, whatever you specify in your path is the context path.  if you don't
want to
have the context been part of your request URL(i.e.,
www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the
path=.
But if your server is serving more that one webapps, the implication of this
is
that all other requests that are not assigned to other contexts will be
processed using this default context.  

So if you only run one web application, there is nothing to worry about.  If
you
are running multiple web applications, then this is a good place to catch
those
unassigned requests.  

Hope this helps:).

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying Context path= docBase=myApp/

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about Context path=/ docBase=myApp/.

I think if you try Context path=/myApp docBase=myApp/, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use Context
path=
docBase=myApp/, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah

RE: JSP preloading taking a lot of time

2004-03-30 Thread Yansheng Lin
Hey, did you compile those JSP pages first?  If you didn't, it would take a long
time for javac to compile those JSP pages, which is expected.  Tomcat is not to
blame here:).  Well, it's slower in 3.3 for sure, but that's minor bottleneck in
this case.

-Yan

-Original Message-
From: Abhinandan Karmakar [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 29, 2004 4:38 AM
To: 'Tomcat Users List'
Subject: RE: JSP preloading taking a lot of time



No. The stuff is running inside one of our released products. Upgrading
tomcat is not possible.

Abhinandan.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 29, 2004 4:01 PM
To: Tomcat Users List
Subject: Re: JSP preloading taking a lot of time


Tomcat 3.3? Are you not able to upgrade?

On 03/29/2004 01:10 PM Abhinandan Karmakar wrote:
 Hi,
 
 My web site has a lot of JSP pages ~60. Some JSPs are big ~400 lines.
I
 have given load-on-startup for all my JSP pages.
 
 I notice that tomcat takes up about 200 secs to preload all my JSPs
and
 during the entire startup time the CPU util does not go above 5-10%.
Can
 anyone throw some light on this ?
 
 Abhinandan.
 
 Tomcat 3.3 on linux.
 
 PS: My JSPs contain a lot of custom tags.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


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

2004-03-30 Thread Yansheng Lin
Hahaha.  relatively:).  But it's got some truth into it, I guess:).

Sorry, couldn't help it.  Just thought it's funny.  No harm intended.


-Original Message-
From: Williams, Daniel S [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 9:26 AM
To: Tomcat Users List
Subject: RE: 


And so it was, my web.xml was named web.XML. I feel relatively silly

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2004 16:09
To: Tomcat Users List
Subject: RE: 


Hi,

I have noticed that on starting up tomcat, the application is loading
o.k, but then the script reads: info: missing application web.xml,
using
defaults only

Then the application is not loading OK.  Tomcat can't find your web.xml
for some reason, and your servlet definitions won't be loaded.  Only
static content and JSPs will work (because those are handled by the
servlets in $CATALINA_HOME/conf/web.xml).

Any suggestions to where I might be going wrong would be most
appreciated.

Your web.xml itself looks fine.  Make sure the permissions on the
directory are OK.  Have you changed anything else in server.xml.?

Also please use a subject in your mailing list posts.  I didn't add one
now because I wanted to keep this as a thread.

Yoav Shapira



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]


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



[OT] is Host part of Requestion URL?

2004-03-30 Thread Yansheng Lin

Hey, I am a bit confused with the terminology used in the servlet spec.  Isn't a
request URL consists: host + [webapp +] servlet path + filename?  But in the
spec, host is not part of the request URL.  Why?  

Thanks!

-Yan


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



RE: [OT] is Host part of Request URL?

2004-03-30 Thread Yansheng Lin
Oh my, so many typo/mistakes in my original post, sorry.

Here is what it says in SRV 4.4 (the request section): 

It is important to note that, except for URL encoding differences between the
request URI and the path parts, the following equation is always true:
requestURI = contextPath + servletPath + pathInfo

Obviously host is not part of the contextPath

Thanks!

-Yan 


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 3:08 PM
To: Tomcat Users List
Subject: RE: [OT] is Host part of Requestion URL?



Hi,
Usually when we refer to a request URL, we use the definition in
HttpServletRequest#getRequestURL, which includes the host/server.

Where in the spec are you looking and what's the exact definition?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 4:55 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: [OT] is Host part of Requestion URL?


Hey, I am a bit confused with the terminology used in the servlet spec.
Isn't a
request URL consists: host + [webapp +] servlet path + filename?  But
in
the
spec, host is not part of the request URL.  Why?

Thanks!

-Yan


-
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: Error Tomcat

2004-03-23 Thread Yansheng Lin
sounds to me like a path problem.  why would you want to use two JDK's on one
machine?

-Original Message-
From: Aquison - A. Angeloni  Cia Ltda. [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 10:03 AM
To: [EMAIL PROTECTED]
Subject: Error Tomcat


Hi all

I have a Sun Box with Solaris 8, Progress 91D08, Tomcat 4.1 and a Java
aplication.
I'm try using Tomcat with Java instaled from progress, but de Tomcat not
running with is java instalation.
Using the Java Instalation 1.4.2 (Sun), Tomcat running perfectly.

# Environment Variables

CLASSPATH=/u/wsrt91d/java/jdbc.jar
DLC=/u/wsrt91d  # Progress HOME
JAVA_HOME=/u/wsrt91d/jdk
JDKHOME=/u/wsrt91d/jdk
JRECP=/u/wsrt91d/jre/lib/rt.jar
JREHOME=/u/wsrt91d/jre
LD_LIBRARY_PATH=/u/wsrt91d/lib


# Error :
[ERROR] Digester - -Begin event threw
exceptionjava.util.MissingResourceException: Can't find bundle for base name
org.apache.coyote.tomcat4.LocalStrings, locale
enjava.util.MissingResourceException: Can't find bundle for base name
org.apache.coyote.tomcat4.LocalStrings, locale en

Does anybody have suggestions for me?

Thanks.

Aquison R. Machado
[EMAIL PROTECTED]
Brasil


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



RE: JK2 Connections from Apache2 URL Rewriting

2004-03-23 Thread Yansheng Lin
Hey, Tomcat does support alias! take a look at the Host element:).
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html

Can you use apache mod_alias directive instead of the mod_proxy directive? 

-Yan

-Original Message-
From: Peter Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 2:41 PM
To: [EMAIL PROTECTED]
Subject: JK2 Connections from Apache2 URL Rewriting



I have been reading through
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
via google trying to work out the best way of mapping live URLs to
specific webapps. e.g.

Map www.mydomain.com/myshortcut - www.domain.com/mywebapp/subpath/url

My environment is Apache2 mod_jk2 and Tomcat 5.

So far I have implemented it using mod_proxy in apache as
RewriteRule ^/myshortcut(.*)
http://www.domain.com/mywebapp/subpath/url$1 [P]

However I don't feel that this a clean solution. Does Tomcat5 or JK2
support some form of URI mapping / aliasing? e.g. Resin has an alias
directive.

Thanks in advance,
Peter


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



What's the status with the LE branch?

2004-03-17 Thread Yansheng Lin
Can we still use it?  Well, it's running fun on one of the machines here right
now.  

Thanks!


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



RE: i18n problems

2004-03-11 Thread Yansheng Lin
Hi middleman:), can you ask your friend to do one thing first(I would do this
myself, but I am having trouble with my oracle jdbc driver:(. 

That is, native2ascii a test strings and insert it to the database.  I bet
that's why he is seeing the ???'s instead of the text. 

-yan

-Original Message-
From: Yiannis Mavroukakis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 2:45 AM
To: 'Tomcat Users List'
Subject: i18n problems


I'm acting as a middleman delivering this email for a friend who has trouble
contacting the list ;)



I am using TC 5.0.16.

 I once had problems when reading intl. form data and passing them thru
servlets to a database. That was solved by just using

 request.setCharacterEncoding(iso-8859-7);

Now the problem is opposite. I read strings from a database and as soon as
they become http data, their encoding is lost, resulting in ???'s instead of
text. Servlets do contain

res.setContentType(text/html; charset=iso-8859-7);
req.setCharacterEncoding(iso-8859-7);

and I have tried with UTF-8 as well, with same results. There is nothing
wrong with the database and the strings, as other applications work fine. To
make sure that I get correct strings from the db, I also print them to a
JTextArea (as soon as they are retrieved) and they have no problem.

So it's not a database, font, browser problem. Encoding is lost somewhere
inside TC and I don't know what to do... Any ideas welcome.

TIA


==


Kostas Harvatis
-
National Center for Social Research - Directorate of Research Support
www.ekke.gr


Note:__
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.


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



RE: international filenames inaccessible

2004-03-11 Thread Yansheng Lin
Works for me too now.  Thanks for the pointer.  Man, think all the time I
wasted:).  

um, But I think you are going to have a hard time to convince the Tomcat
Developers to defaulting the attribute URIEncoding to UTF-8.  Simply because
UTF-8 is not catching up as fast.  One less direct approach would be asking them
to set the default for useBodyEncodingForURI to true instead of false.  

This is good to know.

-Yan

-Original Message-
From: Edward Toro [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 10:58 AM
To: Tomcat Users List
Subject: RE: international filenames inaccessible


Wow, that worked!

The problem may actually be in Java rather than Tomcat.  I set the DEBUG value
to 1001 on a 5 server and a 4.1.18 server to check the request info.  The call
to getServletPath() returns a different value between 4.1.18 and the latest
releases.  I suppose previously Java did the decoding, but now the servlet is
responsible for the decoding?  Or maybe the newer servers specify ISO-8859-1
instead of letting Java do the work?

It's really annoying that this value overrides the use of the file.encoding
System property.  A previous solution mentioned using that, but I couldn't get
it to work.

IMO, the server should be able to serve files with international file names
without any extra configuration, especially since it used to do it before.
UTF-8 is becoming the standard for international character transmission over the
net, if it's not the standard already.  And UTF-8 looks exactly like ASCII for
all the values in the ASCII range.  Is this something worth bringing up in the
Tomcat-Dev group?

-ET

-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 12:36 PM
To: Tomcat Users List
Subject: RE: international filenames inaccessible


See the uriEncoding attribute described at:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html

The same attribute applies to Tomcat 4.1.30 as well.

I'm not aware of any specs that guarantee behavior when using
non-ASCII characters in the URL in this fashion, but it might
work.

Cheers,
Larry

 -Original Message-
 From: Edward Toro [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 11, 2004 11:10 AM
 To: Tomcat Users List
 Subject: international filenames inaccessible
 
 
 Does anyone know if Tomcat 5 is supposed to serve files with 
 international characters in their filenames?  It used to work 
 in Tomcat 4.1.24, but stopped working in 4.1.30 and doesn't 
 work in 5.0.19.
 
 In all the versions of Tomcat I've seen, the international 
 characters are converted using URLEncoder(filename, UTF-8) 
 as per the standard at 
 http://www.w3.org/International/O-URL- code.html.  But the 
 broken servers return 404 when you try 
 to access international filenames like that.
 
 The code to interpret the encoding is provided on that w3.org 
 page.  Why isn't it part of the server anymore?
 
 -Ed
 
 
 -
 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: Log4j initialisation problem.

2004-03-10 Thread Yansheng Lin
Sounds to me like a path problem.  you moved the context two levels down when
you upgraded from 4 to 5. no?

-Original Message-
From: Michael Forster [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 12:18 PM
To: Tomcat-User
Subject: Log4j initialisation problem.


I recently had to upgrade from 4.1 to 5
The new server is running and I have extracted the context out of the
server.xml and into the Catalina/localhost/file.xml

but I am getting the following problem

INFO: Processing Context configuration file URL
file:C:\dev\tomcat\conf\Catalina\localhost\mysite.xml
log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

What am I missing? I cannot find any info on the web that describes this
problem
the logging.conf is in the right place why is it not using it (or if it is
what has changed from 4.1 to 5

Mike.

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCM d- s:+ a C UL P+ L+++ E--- W+++ N+++ o+ K w
O-- M- V- PS+ PE+ Y+ PGP t+++ 5+++ X- R+++ tv++ h++ DI D++
G e+ h++ r+++ y+++
--END GEEK CODE BLOCK--
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.615 / Virus Database: 394 - Release Date: 08/03/2004


-
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: Log4j initialisation problem.

2004-03-10 Thread Yansheng Lin
Hi, the Logger component you are looking at has nothing to do with log4j.  Also
you are using a relative path for the prefix.  Try to use
${TOMCAT_HOME}/logs/mysite_tomcat_log. or simply the absolute path. 

For log4j, I think the following instruction will get you going on your
log4j:WARN problem.  

To have Tomcat use log4j universally, place both log4j.jar and the Jakarta
commons-logging.jar into the $TOMCAT_HOME/common/lib directory. Create your
log4j properties file as $TOMCAT_HOME/common/classes/log4j.properties and
configure the root logger. Here is the basic log4j.properties I used for this
myself:

log4j.rootLogger=info, R
log4j.appender.R=org.apache.log4j.ConsoleAppender
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-5p %-30.30c{1} %x - %m%n

If you only need to use log4j in your own web app, just include log4j (and any
log4j properties file) in your WAR.
-



-Original Message-
From: Michael Forster [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Log4j initialisation problem.


the files and entries are as follows - the error on writing the .xml file
(causing a reload) was also as follows

log4j:WARN No appenders could be found for logger
(org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.

In the mysite.xml file
Logger className=org.apache.catalina.logger.FileLogger
prefix=/dev/tomcat/logs/mysite_tomcat_log. suffix=.txt
timestamp=true/


Mike.
 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED]
 Sent: 10 March 2004 19:39
 To: 'Tomcat Users List'
 Subject: RE: Log4j initialisation problem.


 Sounds to me like a path problem.  you moved the context two
 levels down when
 you upgraded from 4 to 5. no?

 -Original Message-
 From: Michael Forster [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 10, 2004 12:18 PM
 To: Tomcat-User
 Subject: Log4j initialisation problem.


 I recently had to upgrade from 4.1 to 5
 The new server is running and I have extracted the context out of the
 server.xml and into the Catalina/localhost/file.xml

 but I am getting the following problem

 INFO: Processing Context configuration file URL
 file:C:\dev\tomcat\conf\Catalina\localhost\mysite.xml
 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.startup.TldConfig).
 log4j:WARN Please initialize the log4j system properly.

 What am I missing? I cannot find any info on the web that describes this
 problem
 the logging.conf is in the right place why is it not using it (or if it is
 what has changed from 4.1 to 5

 Mike.

 -BEGIN GEEK CODE BLOCK-
 Version: 3.12
 GCM d- s:+ a C UL P+ L+++ E--- W+++ N+++ o+ K w
 O-- M- V- PS+ PE+ Y+ PGP t+++ 5+++ X- R+++ tv++ h++ DI D++
 G e+ h++ r+++ y+++
 --END GEEK CODE BLOCK--
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.615 / Virus Database: 394 - Release Date: 08/03/2004


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

 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.615 / Virus Database: 394 - Release Date: 08/03/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.615 / Virus Database: 394 - Release Date: 08/03/2004


-
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: Please Comment: plan for co-ordinating sessions across mutliple contexts [follow-up: success]

2004-03-10 Thread Yansheng Lin
Hi, That's very good. But just one question, what if a user wants to have
different settings for different webapps.  For example, maybe he/she wants to
view the Japanese version for the local department while keeping the setting for
Far West. How do you account for that?  

Thanks!

-Yan

-Original Message-
From: Justin Johnson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 1:05 PM
To: 'Tomcat Users List'
Subject: RE: Please Comment: plan for co-ordinating sessions across mutliple
contexts [follow-up: success]


I implemented UserDataBeanEvent system I mentioned below, and it appears to
be working:  A change in the state of a bean in one session is immediately
updated in the state of the same bean in a different session for the same
user.

I created a UserDataBeanEvent object with properties for the property that
was changed, the new value, and the user.  The UserDataBean signals a
singleton, a UserDataBeanEventDispatcher, with the event; the dispatcher
then forwards the event to all UserDataBeans for the same user (all
UserDataBeans register as listeners with the dispatcher on attaching to a
session, and keep a reference to it).  The dispatcher is necessary to avoid
coupling UserDataBeans directly to each other, with all the discovery
problems that would entail.

I'll have to do a little more testing to make sure it functioning as I
expect, but using the language change link changes the preference for
language across all contexts immediately.

Yoav mentioned using the SingleSignOn valve, but I require NTLM
authentication that's being provided through jCIFS, and I couldn't find any
guidance on using that as a realm, which is required for the valve.

Anyway, this is one way to unify the user's experience across multiple
contexts, and if I'm not mistaken, it's fairly lightweight.

Justin

-Original Message-
From: Justin Johnson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 9:58 AM
To: 'Tomcat Users List'
Subject: Please Comment: plan for co-ordinating sessions across mutliple c
ontexts


I have an internal website with several web applications, and thus several
contexts.  The user's identity is automatically provided via jCIFs (NTLM
authentication).  At the start of a session, a UserDataBean is created that
loads user preferences from a database, including the language preference
for the user (the site is English/Japanese bilingual).

I've implemented a site-wide filter that checks for changes to preferences
sent as a querystring by clicking a link (e.g., clicking on the 'nihon-go'
link in the main menu sends the URL [current path]?Language=JA).  The filter
catches the change, calls the change method in the session's UserDataBean,
which changes the preference and updates the database.

The experienced among you have already spotted the problem: with multiple
contexts there are multiple sessions for the user, and multiple
UserDataBeans; changing a preference in one bean doesn't change the
preference in another bean, which has already populated its fields from the
database.  Switch to Japanese in one context, and the change isn't reflected
in another.

What I think will work is the create a UserDataBeanEvent that is broadcast
on changing a preference; all the other beans listen for that event, and on
receiving one, check if that event was sent by a bean for the same user as
the receiving UserDataBean; if it was, it can update its own fields to the
same value (without bothering to update the database since the broadcasting
bean did so), and so all the UserDataBeans are co-ordinated across multiple
contexts.

Does this seem workable?  Am I forgetting something, or am I missing
something about performance?  Is there a lighter-weight way to accomplish
the same thing?

Thanks,
Justin

-
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: Tomcat 5.0.19 international filenames inaccessible

2004-03-10 Thread Yansheng Lin
Hi, I got the same error when I tried to view
http://localhost:8080/j2e/jsp/%E5%AE%9B%E5%90%8D.jsp;.  And I've been
researching on this for a few days now whenever I got some free time.  But the
only way that seemed have worked for others has been adding/setting the 
D:\java\bin\java.exe -Dfile.encoding==UTF-8 ... 
in your catalina config file.  But I don't like the solution myself:_(.  Not
entirely sure why either:).

Let us know if you get it working somehow through any other way. 

Thanks!

-Yan

-Original Message-
From: Edward Toro [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 1:38 PM
To: Tomcat Users List
Subject: Tomcat 5.0.19 international filenames inaccessible


Short version:

Does Tomcat 5 no longer serve files with international characters in their
filenames?


Long version:

Environment:  Tomcat 5.1.19 on WinXP Pro

I have a file located in: tomcat-home/webapps/MyWebApp/.  The filename
contains international characters:  0x305f 0x3079 0x304f (a.k.a E3-81-9F
E3-81-B9 E3-81-8F in UTF-8)).

When I navigate to the directory via http://server:8080/webappname/ I get a
directory listing of the files in that directory.  I can access every file on
that list except those that contain international characters.

When I click on a filename that contains international characters, I'm sent to
http://server:8080/webappname%E3%81%9F%E3%81%B9%E3%81%8F.xml.  This is the
correct result of putting the filename through a URLEncoder with the UTF-8
character set, which is what I assume is being done behind by the scene by the
server.  Except the file doesn't appear.  I get a 404 error.

So I made some Java testing code:

try {
URL url = new URL(http://server:8080/webapp/%E3%81%9F%E3%81%B9%E=
3%81%8F.xml);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();

// checking the headers
String header;
String key;
int i = 0;
while ((header = conn.getHeaderField(i)) != null) {
key = conn.getHeaderFieldKey(i);
System.out.println(key +  =  + header);
i++;
}

// checking the content
InputStream is = url.openConnection().getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int chr;
while ((chr = isr.read()) != -1) {
System.out.print((char)chr);
}
System.out.println(success);
} catch (Throwable t) { t.printStackTrace(); }

The headers I get back are:
HTTP/1.1 404 /webapp/%E3%81%9F%E3%81%B9%E3%81%8F.scene.xml
Content-Type = text/html;charset=ISO-8859-1
Content-Language = en-US
Content-Length = 1091
Date = Wed, 10 Mar 2004 18:02:01 GMT
Server = Apache-Coyote/1.1

No help there because I get those same headers when I try to access a file that
doesn't exist at all:

HTTP/1.1 404 /webapp/inexistent.xml
Content-Type = text/html;charset=3DISO-8859-1
Content-Language = en-US
Content-Length = 1040
Date = Wed, 10 Mar 2004 18:03:22 GMT
Server = Apache-Coyote/1.1

When I try to access the input stream to read for content, I get a
FileNotFoundException.

I'm pretty confident that this problem does not exist in Tomcat 4.

I'm also pretty confident that this problem is not related to the characters
being 3-byte UTF-8.  I've tested using 2-byte UTF-8 (D0-9F, D1-80) and the
result is the same.

Is this a bug?

-Ed Toro


-
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: Arabic encoding problem

2004-03-08 Thread Yansheng Lin
Hi, It's likely that request.getCharacterEncoding() is not null at that
point(most likely iso-8859-1). A better conditional statement: 
if (request.getCharacterEncoding()==null) || !
request.getCharacterEncoding().equals(windows-1256)) {}

Cheers:).

-Yan 

-Original Message-
From: vijaya prasad pala [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 07, 2004 2:36 AM
To: [EMAIL PROTECTED]
Subject: Arabic encoding problem


Hi

i am reading arabic text from oracle database.
if i am displaying that text in that page it ok.
if i am passing the same arabic string to another page
then in that page it is displaying in ?. 
i tried like this

 if(request.getCharacterEncoding()==null)
request.setCharacterEncoding(windows-1256);
  
  linkString = request.getParameter(linkLine);
  userString = request.getParameter(userLine);

Here my problem is passing string from one page to
another page... 

Thanks in Advance
vijay


__
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster
http://search.yahoo.com

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


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



RE: using a local dtd for web.xml's ?

2004-03-05 Thread Yansheng Lin
I noticed that too. Sun's Web Site is really slow these few days. Any news on
being hacked?  And how it happened?

Tomcat will automatically look for a cached copy of your dtd's on your local
machine if it cannot find one online.  That's why it's slower.  One way to solve
this is use a local copy all the time . There were a few discussion on this
before. 

Cheers:).
-Yan

-Original Message-
From: Dirk Winter [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 05, 2004 2:38 AM
To: Tomcat Users List
Subject: using a local dtd for web.xml's ?


Hi,

we use Tomcat 5.0.16  under linux and all of our web.xml's are starting 
with a
standard public dtd tag, i.e.

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

or

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

Everything worked fine until duesday: java.sun.com was unreachable and the
server startup time was dramatically increased.

We know that a local copy of the dtd schema is included in the 
servlet-api.jar,
but how can we force tomcat reading the local copy of the dtd without 
changing
our web.xml's ?

Best regards,

Dirk Winter

-
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: Internationalization problem

2004-03-04 Thread Yansheng Lin
native2ascii your properties file.  works for me:).

-Original Message-
From: Keith Hyland [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 10:03 AM
To: Tomcat Users List
Subject: RE: Internationalization problem


Hi,

I'm testing some japanese characters in my app and I'm getting some 
strange behaviour.

japanese characters that are in the jsp page get displayed correctly.

However characters that get displayed through the fmt:message tag get 
corrupted.

I have set the -Dfileencoding=UTF-8 in my catalina.bat 
(CATALINA_OPTS), and set the

head
meta http-equiv=Content-Type content=text/html; charset=utf-8
/head

at the op of my jsp page.

Is there something I have to do to my resource properties file?

Any help appreciated.

Cheers,
Keith

Is there something el

Ralph Einfeldt wrote on 02/03/2004, 14:06:

  %@ page contentType=text/html;charset=UTF-8
pageEncoding=UTF-8  %


-
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: FAIL - Application at context path /[context] could not be started ???

2004-03-03 Thread Yansheng Lin
What's the console output?  how far did you get before you encounter that
specific error?  Sounds to me like a mis-configuration of the context path
problem.  You sure you have the right deploy descriptor in your war file?


-Original Message-
From: Timothy Stone [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 2:11 PM
To: Tomcat Users List
Subject: Re: FAIL - Application at context path /[context] could not be started
???


Timothy Stone wrote:

 List,
 
 I did an archive search. Nothing meaningful returned, so I'm posting 
 what must be a regular question.
 
 I can get a development tree to install via the Manager interface, but I 
 can't get it started. This seems to be a UNIX problem at the moment.
 
 For example on Windoze:
 
 Install directory or WAR file located on server
 Context Path (optional):  /foobar
 XML Configuration file URL:
 WAR or Directory URL: file:c:/path/to/foobar/dev
 
 will load and start.
 
 The very same application on Linux/Mac OS X:
 
 Install directory or WAR file located on server
 Context Path (optional): /foobar
 XML Configuration file URL:
 WAR or Directory URL: file:/home/user/path/to/foobar/dev
 
 will load, but consistently fails to start.
 
 The error, not explained in the Manager documentation anywhere BTW :
 
 FAIL - Application at context path /foobar could not be started
 
 What I can't figure out is this very application will work with the 
 catalina.ant tasks! Windoze or Unix. So the problem seems to be with the 
 HTML interface.
 
 So, what's the trick? Anyone? Oh, I did 777 the dev tree. Didn't help. :(
 
 Many thanks,
 Tim

No one can field this? Maybe I'm too close. Nothing is working now. Not 
the ant task not the manager interface. Nothing.

The answer is not obvious to me. Nothing seems to be logging anywhere 
for me to debug it.

Many thanks again,
Tim



-
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: Internationalization problem

2004-03-02 Thread Yansheng Lin
Hi, take a look at this thread.  
http://www.mail-archive.com/[EMAIL PROTECTED]/msg91815.html
Like Ralph Einfeldt said, you need to encode the JSP files, the request and the
response.  You've done the JSP part, now you want to define a filter for the
other two.  Btw, ISO-8859-1(Latin 1) covers most Western European Languages, it
should be able to handle the French characters.  

-Yan

-Original Message-
From: Evgeny Gesin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 02, 2004 7:33 AM
To: Tomcat Users List
Subject: RE: Internationalization problem


I see, so this
 JAVA_OPTS=-Dfile.encoding=UTF8
is important to generate correct chars from hardcoded
strings if written directly in java files.
Thanks

Evgeny Gesin
Javadesk


--- Ralph Einfeldt [EMAIL PROTECTED]
wrote:
 
 You have to consider 3 different topics:
 - encoding of generated java files
   This is defined by the file.encoding option of the
 jvm.
 
 - encoding of the response
   This is defined by the encoding tag of the jsp or
 by 
   explicitly setting the encoding in the response
 
 - encoding of the request
   This is defined by explicitly setting the encoding
 
   for the request.
 
  -Original Message-
  From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 02, 2004 2:27 PM
  To: Tomcat Users List
  Subject: RE: Internationalization problem
  
  
  Some sources say to set in catalina.sh
   JAVA_OPTS=-Dfile.encoding=UTF8
  
  What is relation of that parameter and
 Web/JSP/i18n ?
  
  Evgeny Gesin
  Javadesk
  
  --- STOCKHOLM, Raymond [EMAIL PROTECTED]
 wrote:
   é is é in UTF-8.
   It means that your browser is returning UTF-8,
 and
   your servlet/JSP
   is expecting ISO-8859-1.
   Check how your JSP is configured to handle the
   character set.
   To use UTF-8 in your JSP :
   %@ page contentType=text/html;charset=UTF-8
   pageEncoding=UTF-8  %
   and make sure that the charset in your JSP/HTML
 is
   defined as UTF-8 : 
   meta http-equiv=Content-Type
 content=text/html;
   charset=UTF-8
   
   
   -Message d'origine-
   De : Jonathan Abramsohn
 [mailto:[EMAIL PROTECTED]
   Envoyé : mardi 2 mars 2004 11:48
   À : Tomcat Users List
   Objet : Internationalization problem
   
   
   
   I have problem with French special characters,
 like
   e with accent (é),
   When I get this character from user input,
 tomcat
   gets it as: é.
   Although I didn't check this in other languages
 I
   presume the same problems should also occur in
   German and Spanish and probably other languages.
   I'm working with tomcat 4.0.1 on Linux RH 9.0
   Anyone knows how to solve this?
   
   
   
  
 

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

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   
  
  
  __
  Do you Yahoo!?
  Yahoo! Search - Find what you're looking for
 faster
  http://search.yahoo.com
  
 

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

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


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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


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



RE: application unavailable

2004-03-01 Thread Yansheng Lin
wow coool! If I make a mistake, I can get the whole class off.  hehe:).

-Original Message-
From: Jason Keltz [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 01, 2004 1:51 PM
To: [EMAIL PROTECTED]
Subject: RE: application unavailable


On Mon, 1 Mar 2004, Shapira, Yoav wrote:
 
  Don't be so sure ;)  You can use the manager webapp (either graphically
  or via ant), you can write some custom JMX code in another webapps, or
  you can restart the server, but there are no other options.

... the problem is that I'm trying to run one tomcat server for a large
group of students.  I can handle the deploy/undeploy part, but if a
student makes an error in their web.xml file, which is bound to happen, I
don't want to have to restart the server.  I'll need to look at a way to
wrap the reload via the manager application from ant. *sigh*

Jason.

-
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 and commons logging

2004-02-27 Thread Yansheng Lin
Normally this can be solved by add log4j.jar to your classpath.  

Are you sure it's an exception, not a warning?

-Original Message-
From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 5:52 AM
To: [EMAIL PROTECTED]
Subject: Tomcat and commons logging


Can someone just PLEASE post a simple straight forward
example of how to configure a Tomcat system (4.1.x)
for once and for all without getting that damn No
logger for class xxx exception. *sigh*

I want no loggers defined for 3rd party packages (eg
the host of jars required for struts 1.1). Well,
default loggers that maybe just do nothing would be
fine.

Where how do I set this?


__
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

-
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: Good practice for classloaders

2004-02-27 Thread Yansheng Lin
What's Utils and classpath?  Can't you just call super.findClass(className)?
Just a guess:).

-Original Message-
From: SH Solutions [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 2:16 AM
To: [EMAIL PROTECTED]
Subject: Good practice for classloaders


Hi

I am writing an application in which I use classloaders to load different
groups of plugins.
Basically what I am doing is:

  protected Class findClass( String className )
throws ClassNotFoundException
  {
if ( className.startsWith( com.companyname. ) )
  return getClass().getClassLoader().loadClass( className );
byte classData[] = getTypeFromBasePath( className );
if ( classData == null )
  throw new ClassNotFoundException();
return defineClass( className, classData, 0, classData.length );
  }

  private byte[] getTypeFromBasePath( String typeName )
  {
return Utils.readFile( classPath + typeName.replace( '.',
File.separatorChar ) + .class );
  }


Now, I have problems an obvious problem with jar-files. [I have already
posted this before.]
[Actually I do not understand this problem, since it worked well with
tomcat4.0.6, but thats another problem. Still any hints are wellcome...]

What I would like to do is get rid of the getTypeFromBasePath-method. I
would prefer to let the parent classloader do this part and only do the
defineClass myself.

What I am doing right now seems to be bad practice event to me. But what
would be good practice?
The once thing I want to archive is that I want to load these classes with
different classloaders to be able to reload them during the lifetime of my
application.

Can anyone give me any hint?

Thanks,
  Steffen


-
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: Problems using Servlet with 4.1.29, Apache 2.0.40 and https

2004-02-27 Thread Yansheng Lin
http and https use different port. Most likely your Apache only listens to the
http port. 
hope this helps:)

-Yan

-Original Message-
From: Lutz Maibach [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 1:15 AM
To: Tomcat Users List
Subject: Problems using Servlet with 4.1.29, Apache 2.0.40 and https


Hello,

I'm trying to get a servlet called rreport running with the Software
shown above. Everything is working well as long as I use the
http-address (everything is redirect via apache) to call rreport. I can
also run the tomcat-examples via https so I think that redirecting via
Apache isn't the problem. I presume that the object not found-message
I get calling rreport via https results from a missing entry in the
tomcat-configs but I don't know where to start searching for it.

Help would be appreciated :-)

Greetings

Lutz Maibach


-
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: JSP forwarding outside of Context

2004-02-27 Thread Yansheng Lin
Will JNDI help you in any way?  

I don't have a solution for ya:), but thought this would be a very good
counter-arguement against the idea that .war is the best deployment practise in
Tomcat.

-Yan


-Original Message-
From: Johansen, Roar [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 6:06 AM
To: Tomcat Users List
Subject: JSP forwarding outside of Context


I supervise development of a web-app, currently deployed on Jrun, but I
also want to deploy it on other appservers, among those tomcat.

I want to distribute the app as a .war file (which we do), but with JSPs
outside the .war file. This because we want to be able to do fixes, and
not least to add JSPs (according to that being made possible by the
servlet we direct all requsts to, but that's a long story), without
having to redeploy the entire .war file.

Thing is, since we reside on the context root /, anything below the
context root is in the .war file.

JRun4 supports the concept of virtual mapping, by which means
resources within the context may be mapped to a different physical
location, e.g.

  virtual-mapping
resource-path/pages/resource-path
system-path/wherever/on/the/harddisk/pages/system-path
  /virtual-mapping
 
This maps the context relative path of /pages to the physical location
in system-path. This allows for relocation of resources to outside
of a .war file distribution. 

If I have managed to make myself clear here, is there any way I could do
something similar in tomcat?

TIA,
Roar

-
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 and SSL: problem with expiration of VeriSign Global Server ID Intermediate Root

2004-02-27 Thread Yansheng Lin
Oh I see.  You got a new one from them, installed for apache OK, but having
trouble install it on Tomcat-StandAlone.  Well, since you paid for it, you might
as well ask them to see if they can give you any support:).  Oh, I did a man
keytool, it seems that you can import a certificate.  What happens if you do
that?

-Yan

-Original Message-
From: Jörn Böckenkamp [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 5:41 AM
To: Tomcat Users List
Subject: Re: Tomcat and SSL: problem with expiration of VeriSign Global Server
ID Intermediate Root


Hi Yan,

  Now that the VeriSign Global Server ID Intermediate Root cert
  has expired I have to replace the Intermediate Root cert on the
  server. There is an example on how to replace the cert on an apache
  server on their website (and that works fine), but no instructions
  how to replace it on an standalone tomcat server.

 Hi, what i did for my local machine(TOMCAT-STANDALONE) was 
 regenerate the certificate with a new date and everything
 worked fine.  it's supposed to be easy.  

It IS easy when you're using a self-signed cert, but I have to
use one from VeriSign and I don't think that I can regenerate the
VeriSign cert with a new date :-)

JB

-
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: Internationalization Help

2004-02-26 Thread Yansheng Lin
i18n is not specific to tomcat.  and i am sure you can find some useful links on
google.

I found this particular tutorial very useful:
http://java.sun.com/docs/books/tutorial/i18n/

If you have any specific problem, for example, Apache serves up different
encodings correctly, while Tomcat has trouble with the same files, then post
your message here to see if anyone can help.

-Yan

-Original Message-
From: Santosh Joshi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 6:25 AM
To: Tomcat Users List
Subject: Internationalization Help


All,

I am sure Tomcat can be internationalized to accept internationalized
character encoding, but the trouble is I do not know HOW?

Could someone point me to a quick HOW-TO guide?

BTW I am planning to use 4.1.30 (or later version) for this purpose. 

Any help very much appreciated.

Regards,

Santosh

-
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: Silent (and I mean SILENT) install

2004-02-26 Thread Yansheng Lin
On what platform are you getting this?  which version of tomcat?  I think that
if you set up your JAVA_HOME correctly on your path, this shouldn't be
happening. The best place would be catalina config file.

-Yan

-Original Message-
From: Cocalea, Eugen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 6:49 AM
To: '[EMAIL PROTECTED]'
Subject: Silent (and I mean SILENT) install


Hi,
 
I suppose it's a F.A.Q., but how can I disable the little annoying window
that wants me to aknowledge that Tomcat will use the JDK I know it will use?
I've searched the internet, found no answer. Is it any?
 
Thanks
 
EC


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



  1   2   >