Re: Problems with utf-8 encoding - continue

2005-09-19 Thread Christoph Kutzinski

Jilles van Gurp wrote:
Oracle on the other hand 
cannot insert strings larger than 4KB with setString so you need to use 
setCharacterStream.


FYI:

This is "common knowledge" that used to be right, but isn't anymore.
With the Oracle 10g JDBC driver you can set arbitrary length strings 
with setString


http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/clob10g/handlingclobsinoraclejdbc10g.html


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



RE: Problems with utf-8 encoding

2005-09-19 Thread Guy Katz
put an encoding filter in front of your servlet/jsp's that sets a UTF-8 
encoding for incoming requests and outgoing responses. its your safest bet for 
tomcat 4 as far as i remember.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 9:43 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Anto Paul wrote:

>On 9/19/05, Yair Zohar <[EMAIL PROTECTED]> wrote:
>  
>
>>Hello,
>>I'm using Tomcat 4.1.18
>>I'm trying to read hebrew data in utf-8 encoding from the database. As a
>>check I entered a utf-8 encoded 'alef' letter to the database field.
>>(I see it in the database as one letter 'alef'). The jsp page that
>>displays the data, prints two chars instead of one. I checked the values
>>of these chars and
>>they are 215 114, which are the utf-8 combination to create the letter
>>'alef'  (so I was told).
>>
>>jps code:
>>
>><%@ page language="java" contentType="text/html;charset=UTF-8"
>>pageEncoding="UTF-8" info="Tables Handler" import="tablesHandler.*" %>
>>
>>
>>
>>
>><% request.setCharacterEncoding("UTF-8");%>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>Move <% request.setCharacterEncoding("UTF-8");%> to before jsp:useBean tag.
>
>  
>
Thanks for replying,
It didn't fix the problem, I still see the same two chars.
Yair.


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



Re: Problems with utf-8 encoding - continue

2005-09-19 Thread Yair Zohar


Jilles van Gurp wrote:



Why aren't you using setContentType("text/html, "utf-8") on the response?


As I use jsp, I don't know how can I control the response that way.



What content-type is the server actually returning (use the live http 
headers extension for firefox or something similar to find out).


I couldn't find if this extension is installed, or how to install it.
In the page info :

Type: text/html
Encoding: UTF-8

Meta:
Content-Type text/html; charset=UTF-8



What database and jdbc driver are you using? What method are you using 
to store the string in the database?


I use mysql 4.1.14 + connector 3.1.10
the url for the driver is: 
"jdbc:mysql://"+Utils.getServerName()+":3306/"+Utils.getDatabaseName()+"?characterEncoding=UTF-8&characterSetResults=UTF-8"


the tables definitions:
ENGINE=MyISAM DEFAULT CHARSET=utf8



I've had utf-8 trouble with several databases. For example mysql 4.1 + 
the latest jdbc driver + setCharacterStream had some strange effects. 
First of all you need to tell mysql to use utf-8 (it defaults to 
something else) and even if you do that setCharacterStream has some 
issues that go away if you use setString. Oracle on the other hand 
cannot insert strings larger than 4KB with setString so you need to 
use setCharacterStream. Incidently, the mysql driver implementation of 
setCharacterString is implemented using setString!


I use Statement class executeUpdate(String str) method to update and 
executeQuery(String str) to query the database.




Regards,

Jilles

Yair Zohar wrote:



sorry for the double mail,
I forgot to add my server.xml encoding definitions:

  port="8080" URIEncoding="UTF-8" 
useBodyEncodingForURI="true"

  minProcessors="5" maxProcessors="75"
  enableLookups="true" redirectPort="8443"
  acceptCount="100" debug="0" connectionTimeout="2"
  useURIValidationHack="false" 
disableUploadTimeout="true"  />


I tried it with and without the useBodyEncodingForURI="true"directive.
Yair.


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



Body-ContentImplBodyContentImpl uses all memory

2005-09-19 Thread Anders Skar
Hi! 


I'm experiencing a problem with my web application as it seems to run 
out of memory after about a week in production. 

I used JRockIT console to inspect what was using memory, and I found 
that a have quite a few instances of 
"org.apache.jasper.runtime.BodyContentImplBodyContentImpl" that are up 
to 80 MB each! 

Does anyone know why this happens and what to do to fix it ?

Thanks for any help! 

Anders 


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



Re: Problems with utf-8 encoding

2005-09-19 Thread Yair Zohar

Guy Katz wrote:


put an encoding filter in front of your servlet/jsp's that sets a UTF-8 
encoding for incoming requests and outgoing responses. its your safest bet for 
tomcat 4 as far as i remember.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 9:43 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Anto Paul wrote:

 


On 9/19/05, Yair Zohar <[EMAIL PROTECTED]> wrote:


   


Hello,
I'm using Tomcat 4.1.18
I'm trying to read hebrew data in utf-8 encoding from the database. As a
check I entered a utf-8 encoded 'alef' letter to the database field.
(I see it in the database as one letter 'alef'). The jsp page that
displays the data, prints two chars instead of one. I checked the values
of these chars and
they are 215 114, which are the utf-8 combination to create the letter
'alef'  (so I was told).

jps code:

<%@ page language="java" contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8" info="Tables Handler" import="tablesHandler.*" %>




<% request.setCharacterEncoding("UTF-8");%>




  


  

 


Move <% request.setCharacterEncoding("UTF-8");%> to before jsp:useBean tag.



   


Thanks for replying,
It didn't fix the problem, I still see the same two chars.
Yair.


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



 

Guy, can you direct me to practical documentation on implementing such a 
filter ?


RE: Problems with utf-8 encoding

2005-09-19 Thread Guy Katz
google it.
there's a lot.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 11:08 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Guy Katz wrote:

>put an encoding filter in front of your servlet/jsp's that sets a UTF-8 
>encoding for incoming requests and outgoing responses. its your safest bet for 
>tomcat 4 as far as i remember.
>
>-Original Message-
>From: Yair Zohar [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 19, 2005 9:43 AM
>To: Tomcat Users List
>Subject: Re: Problems with utf-8 encoding
>
>
>Anto Paul wrote:
>
>  
>
>>On 9/19/05, Yair Zohar <[EMAIL PROTECTED]> wrote:
>> 
>>
>>
>>
>>>Hello,
>>>I'm using Tomcat 4.1.18
>>>I'm trying to read hebrew data in utf-8 encoding from the database. As a
>>>check I entered a utf-8 encoded 'alef' letter to the database field.
>>>(I see it in the database as one letter 'alef'). The jsp page that
>>>displays the data, prints two chars instead of one. I checked the values
>>>of these chars and
>>>they are 215 114, which are the utf-8 combination to create the letter
>>>'alef'  (so I was told).
>>>
>>>jps code:
>>>
>>><%@ page language="java" contentType="text/html;charset=UTF-8"
>>>pageEncoding="UTF-8" info="Tables Handler" import="tablesHandler.*" %>
>>>
>>>
>>>
>>>
>>><% request.setCharacterEncoding("UTF-8");%>
>>>
>>>
>>>
>>>
>>>   
>>>
>>>
>>>   
>>>
>>>  
>>>
>>Move <% request.setCharacterEncoding("UTF-8");%> to before jsp:useBean tag.
>>
>> 
>>
>>
>>
>Thanks for replying,
>It didn't fix the problem, I still see the same two chars.
>Yair.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>  
>
Guy, can you direct me to practical documentation on implementing such a 
filter ?

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



Jk connector fails to connect... after some time working

2005-09-19 Thread Borja Bravo Alférez


Dear Tomcat list,

	I have a problem with our Tomcat server that is becoming really 
criticall for us. I need some help or at least a clue. There are quite a 
lot of people with a similar problem but I haven't found the solution. 
Let's go to the problem:


	After some time of working fine all the jsp pages served by the 
Tomcat stop to response anything. But Apache pages keep working fine and 
Tomcat alone serves all jsp without no problem at 8080 port. Restarting 
Tomcat solves the problem... for some time.


The logs reflect some problems:

 /etc/httpd/logs/mod_jk.log:

[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to 
tomcat failed in send loop. err=0
[Sun Sep 18 06:00:10 2005]  [jk_connect.c (188)]: jk_open_socket, 
connect() failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (720)]: Error connecting to 
tomcat. Tomcat is probably not started or is listening on the wrong 
host/port (127.0.0.1:8009). Failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1024)]: Error connecting to 
the Tomcat process.
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to 
tomcat failed in send loop. err=1
[Sun Sep 18 06:00:10 2005]  [jk_connect.c (188)]: jk_open_socket, 
connect() failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (720)]: Error connecting to 
tomcat. Tomcat is probably not started or is listening on the wrong 
host/port (127.0.0.1:8009). Failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1024)]: Error connecting to 
the Tomcat process.
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to 
tomcat failed in send loop. err=2
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1477)]: Error connecting to 
tomcat. Tomcat is probably not started or is listening on the wrong port. 
worker=ajp13 failed errno = 111
[Sun Sep 18 06:00:18 2005]  [jk_ajp_common.c (783)]: ERROR: can't receive 
the response message from tomcat, network problems or tomcat is down 
(127.0.0.1:8009), err=-1





	We have an apache 2.50 under Madriva Linux. The connector is 1.2.6 
and Tomcat 4.1


I hope you may know what may be affecting the server.

Thank you in advance.

Borja








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



Re: Jk connector fails to connect... after some time working

2005-09-19 Thread Yassine ELassad
hi,

i think its just apache trying to connect to tomcat using JK while the tomcat 
not confiigured to answer this request ?

since you execute your jsp on (8080)

i hope i understands your matter if not please try to be clearer about it if 
you need help with connnecting apache <-mod_jk->tomcat i can provides you some 
working configs TC5.x

regards
Yassine


 directBOX Reply ---
From: Borja Bravo Alférez ([EMAIL PROTECTED])
To: TomcatUsersList (tomcat-user@jakarta.apache.org)
Date: 19.09.2005 11:26:57


Dear Tomcat list,

I have a problem with our Tomcat server that is becoming really
criticall for us. I need some help or at least a clue. There are quite a
lot of people with a similar problem but I haven't found the solution.
Let's go to the problem:

After some time of working fine all the jsp pages served by the
Tomcat stop to response anything. But Apache pages keep working fine and
Tomcat alone serves all jsp without no problem at 8080 port. Restarting
Tomcat solves the problem... for some time.

The logs reflect some problems:

  /etc/httpd/logs/mod_jk.log:

[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to
tomcat failed in send loop. err=0
[Sun Sep 18 06:00:10 2005]  [jk_connect.c (188)]: jk_open_socket,
connect() failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (720)]: Error connecting to
tomcat. Tomcat is probably not started or is listening on the wrong
host/port (127.0.0.1:8009). Failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1024)]: Error connecting to 
the Tomcat process.
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to
tomcat failed in send loop. err=1
[Sun Sep 18 06:00:10 2005]  [jk_connect.c (188)]: jk_open_socket,
connect() failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (720)]: Error connecting to
tomcat. Tomcat is probably not started or is listening on the wrong
host/port (127.0.0.1:8009). Failed errno = 111
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1024)]: Error connecting to 
the Tomcat process.
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1468)]: sending request to
tomcat failed in send loop. err=2
[Sun Sep 18 06:00:10 2005]  [jk_ajp_common.c (1477)]: Error connecting to 
tomcat. Tomcat is probably not started or is listening on the wrong port. 
worker=ajp13 failed errno = 111
[Sun Sep 18 06:00:18 2005]  [jk_ajp_common.c (783)]: ERROR: can't receive 
the response message from tomcat, network problems or tomcat is down
(127.0.0.1:8009), err=-1




We have an apache 2.50 under Madriva Linux. The connector is 1.2.6
and Tomcat 4.1

I hope you may know what may be affecting the server.

Thank you in advance.

Borja








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


__
Verpassen Sie keine eBay-Auktion und bieten Sie bequem
und schnell über das Telefon mit http://www.telefonbieten.de

Ihre eMails auf dem Handy lesen - ohne Zeitverlust - 24h/Tag
eMail, FAX, SMS, VoiceMail mit http://www.directbox.com



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



Re: Jk connector fails to connect... after some time working

2005-09-19 Thread Borja Bravo Alférez

On Mon, 19 Sep 2005, Yassine ELassad wrote:


hi,

i think its just apache trying to connect to tomcat using JK while the 
tomcat not confiigured to answer this request ?


since you execute your jsp on (8080)

i hope i understands your matter if not please try to be clearer about 
it if you need help with connnecting apache <-mod_jk->tomcat i can 
provides you some working configs TC5.x


regards Yassine




Thank you for your effort. I am sure there can be some configuration 
issues. But I do not understand why it can connect during hours and 
suddenly it can't. ( persistent connections? running out of something? 
Making wild hypothesis is not too hard )


Anyway, Any kind of server.xml examples of connectors will be really 
apreciated although I will prefer a 4.1 configuration.


My jk connector config is:



  


( I am making changes quite often looking a stable configuration )

Regards,

Borja

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



Custom tags and scope

2005-09-19 Thread Trond Hersløv
Hi,
I do not have a lot of experience in programming custom tags.
Now, having programmed a couple of tags, I think it is kind of strage that I 
cannot narrow the scope of variables defined in the taghandler down to the body 
of the custom tag.
It would for me clearly gain the purpose of code usability if so was the case.
I hope I have missed something and that there may is a way to configure the tld 
file so that the scope of variables is restricted to the body. Here is the code 
to clarify what i mean:

TAGHANDLER (shortened for readability):
Public void doTag() extends JpsExtension{
  PageContext pc = (PageContext)getJspContext();
  JspFragment body = getJspBody();
  pc.SetAttribute("testvar", "myvalue");
  body.invoke(null);
}

JSP (shortend for readability):
test
  ${testvar}

  ${testvar}



I do not want to specify or declare the variable first in the jsp.
I also think that using an attribute to hold the name of the variable used is a 
bad idea.
I absolutely want to use EL.

Is there any hope, or do I have to live with it?

Would appreciate any tips and workarounds

Regards Trond


**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**


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



Re: Re: Jk connector fails to connect... after some time working

2005-09-19 Thread Yassine ELassad
here it is my one and  how i configured it on 5.0.28:


what should be done:
--
on your  Webserver (Apache):
there should be some Namensbasd Virtual Host
Websites, which should runs some Java Servlets
Apache have to foreward these request where they belon to (TC)


 Tomcat Configuration:
-
after installing jakarta-tomcat and apache2-jakarta-tomcat-connectors.

you should look for your tomcat_base/conf/server.xml
   ../jk2.properties

i eliminated every thing which is not needed and there is only
the server and the service which are needed to connect to apache

-- start --






















--- end --
jk2.properties:
-
uncoment these 2 lines
-- start --
handler.list=channelSocket,request
channelSocket.port=8009
--- ende --
TC config is now done

configuration of Apache:

I assume you already installed jk on apache and its working

now look for your default  /etc/apache2/workers2.properties:
-- start --
# only at beginnin. In production uncomment it out
[logger.apache2]
level=ERROR
[shm]
file=/var/log/apache2/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:127.0.0.1:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:127.0.0.1:8009]
channel=channel.socket:127.0.0.1:8009
# Uri mapping in the vhost configs
--- ende --
To avoid IPV6 comflict use  127.0.0.1 instead of localhost


now you can start your URI mapping here is an examples which mapse servlet  to 
www.yourhost.foo
-- start --
[uri:www.yourhost.foo/servlet/*]
worker=ajp13:127.0.0.1:8009
--- ende --
now you should bind your workers2.properties to apache
create a small config
 /etc/apache2/conf.d/mod_jk2.conf
 and include it in apache.conf or httpd.conf

-- start --
#
# mod_jk2
#

JkSet config:file /etc/apache2/workers2.properties

--- ende --

ServerAdmin [EMAIL PROTECTED]
ServerName www.yourhost.foo
# needed for named virtual hosts
UseCanonicalName On
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
# but symbolic links and aliases may be used to point to other
# locations.
DocumentRoot /srv/www/htdocs/
# Give all /servlet/* URLs to Tomcat

JkUriSet worker ajp13:127.0.0.1:8009


--- ende --
- start www.yourhost2.foo.conf 
#
# www.knightsoft-net.mt:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

ServerAdmin [EMAIL PROTECTED]
ServerName www.yourhost2.foo
# needed for named virtual hosts
UseCanonicalName On
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
# but symbolic links and aliases may be used to point to other
# locations.
DocumentRoot /srv/www/htdocs/manfred/www.yourhost2.foo/

  Options +FollowSymLinks +Multiviews
  AllowOverride All

# Give all /servlet/* URLs to Tomcat

JkUriSet worker ajp13:127.0.0.1:8009


--- ende --
restart apache and have fun :) i hope this helps if not drop a mail






 directBOX Reply ---
From: Borja Bravo Alférez ([EMAIL PROTECTED])
To: TomcatUsersList (tomcat-user@jakarta.apache.org)
Date: 19.09.2005 12:57:24

On Mon, 19 Sep 2005, Yassine ELassad wrote:

> hi,
>
> i think its just apache trying to connect to tomcat using JK while the
> tomcat not confiigured to answer this request ?
>
> since you execute your jsp on (8080)
>
> i hope i understands your matter if not please try to be clearer about
> it if you need help with connnecting apache <-mod_jk

File Upload problem with cgi perl script

2005-09-19 Thread Ron Cozad
I am only getting the first 3k of an upload file.  If the file is less
than 3k, the multipart boundaries are structured properly, otherwise, I
never get the end of the file or the ending boundary.

 

I did binmode(STDIN); but still not getting the whole file.

 

Running Tomcat 4.1.31 and IE browser 6.x.

 

Appreciate any suggestions or theories as to why I am not getting the
whole file.



AW: JSP 2.1 in Tomcat 6?

2005-09-19 Thread Bernhard Slominski
Hi Ron,

I don't know about the JSP 2.1 Support in Tomcat, but if you want to try it
out just use Glassfish: https://glassfish.dev.java.net/

Cheers 

Bernhard

> -Ursprüngliche Nachricht-
> Von: Ron Kiat [mailto:[EMAIL PROTECTED]
> Gesendet: Sonntag, 18. September 2005 18:16
> An: Tomcat Users List
> Betreff: JSP 2.1 in Tomcat 6?
> 
> 
> I understand that Tomcat 5.5 supports JSP 2.0. I heard that 
> JSP 2.1 has a 
> slightly different syntax for the Expression Language, and 
> Java 5 EE is 
> coming. Will the next build of 5.5 suppport JSP 2.1? Or will 
> there be Tomcat 
> 6?
>  Thanks,
> Ron
> 

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



How to get process URL in different context?

2005-09-19 Thread Kyle

Hi,

I need to get hold of and process an http-encoded URL (effectively an 
operational servlet) within a different context on the same machine and 
read back the response it provides.


e.g.

from the root Context within a doPost, I need to execute 
"/abc/api/action.do?param1=123¶m2=abc" and retrieve a String response


I have tried getServletContext().getContext() to get hold of the other 
context, but that appears to return null. I can only presume this is a 
security constraint setup somewhere. ... Or is there some simple 
programming trick I appear to be missing. Can someone point me in the 
right directon as to what to read to find out how to get tomcat to let 
me do this please?

--

Kind Regards

Kyle


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



Re: Problems with utf-8 encoding

2005-09-19 Thread Yair Zohar

Guy Katz wrote:


google it.
there's a lot.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 11:08 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Guy Katz wrote:

 


put an encoding filter in front of your servlet/jsp's that sets a UTF-8 
encoding for incoming requests and outgoing responses. its your safest bet for 
tomcat 4 as far as i remember.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 9:43 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Anto Paul wrote:



   


On 9/19/05, Yair Zohar <[EMAIL PROTECTED]> wrote:


  

 


Hello,
I'm using Tomcat 4.1.18
I'm trying to read hebrew data in utf-8 encoding from the database. As a
check I entered a utf-8 encoded 'alef' letter to the database field.
(I see it in the database as one letter 'alef'). The jsp page that
displays the data, prints two chars instead of one. I checked the values
of these chars and
they are 215 114, which are the utf-8 combination to create the letter
'alef'  (so I was told).

jps code:

<%@ page language="java" contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8" info="Tables Handler" import="tablesHandler.*" %>




<% request.setCharacterEncoding("UTF-8");%>




 


 



   


Move <% request.setCharacterEncoding("UTF-8");%> to before jsp:useBean tag.



  

 


Thanks for replying,
It didn't fix the problem, I still see the same two chars.
Yair.


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





   

Guy, can you direct me to practical documentation on implementing such a 
filter ?


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



 


Hi again,
I implemented the SetCharacterEncodingFilter from the tomcat 4 examples,
In order to check the control I have on the character encoding of the 
request and

response I changed the doFilter method to be:

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
   throws IOException, ServletException {

   request.setCharacterEncoding("UTF-8");
   System.out.println("Request: "+request.getCharacterEncoding());
  
   response.setContentType("text/html; charset=UTF-8");

   System.out.println("Response: "+response.getCharacterEncoding());
  


   // Pass control on to the next filter
   chain.doFilter(request, response);

   }

request.getCharacterEncoding() returns null. It also returns null if I 
put the request.setCharacterEncoding("UTF-8");

as a remark. (my page contains utf-8 encoding directives).
The response however is set to UTF-8.
Can this explain my problem using UTF-8 encoding ?
Does anybody know how to solve it ?



Using a custom Manager class

2005-09-19 Thread James Shaw
I want to persuade tomcat to use a custom manager.

My $CATALINA_HOME/conf/context.xml looks like this:



WEB-INF/web.xml





I've tried putting the HackyManager in /server/classes but tomcat
still uses StandardManager.  How do I give tomcat the correct
classpath, or which directory should I put the classes in?

Thanks
James Shaw

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



Re: help with embedded tomcat's webapp classloader

2005-09-19 Thread Donald Ball

Donald Ball wrote:

everything works okay but my webapp fails on initialization, with a 
NoClassDefFoundError on net.sf.hibernate.HibernateException. this is 
somewhat surprising given that hibernate.jar lives in the webapp's 
WEB-INF/lib directory. is there some additional configuration i need to 
do on my embedded Context object to force it to act like a normal tomcat 
webapp Context? do i perhaps need to ensure the webapp directory 
structure is in place before constructing my Tomcat instance? (that is 
to say, are the contents of WEB-INF/lib examined when the Context is 
created and/or added to the Host, or when tomcat is started?)


i worked around this issue by simply adding the classpath resources 
under WEB-INF to the classpath of the swt application in which tomcat is 
embedded. not a very elegant solution, but it'll do for the moment. now 
i find that jsp files cannot be compiled because Jasper is unable to 
find a javac compiler; com.sun.tools.javac.Main is not on the classpath.


ought i hunt down tools.jar and add that to my classpath manually as 
well, or can someone point me towards some documentation w.r.t. 
configuring embedded tomcat's webapp classloaders? i'm frankly unable to 
tell if this behavior is expected and i'm supposed to be manually doing 
some extra initialiation work on my Context, or if this is unusual 
behavior and i'm doing something wrong? any suggestions?


- donald

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



Re: Using a custom Manager class

2005-09-19 Thread James Shaw
On 19/09/05, James Shaw <[EMAIL PROTECTED]> wrote:
> I want to persuade tomcat to use a custom manager.
> 
> My $CATALINA_HOME/conf/context.xml looks like this:
> 
> 
> 
> WEB-INF/web.xml
> 
> 
> 
> 
> 
 
Sorry, false alarm.  Just remembered XML is case sensitive ;-)

James Shaw

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



Error Document defined and "Served" but still not visible any idea ??

2005-09-19 Thread Yassine ELassad
hello every one i have a strange issue again with tomcat :)

here is the problem:

i defined an error 404 document unnder the web.xml lie the following :


=
 
index.html
index.htm
index.jsp


   
   500

/srv/www/tomcat/base/errorpages/InternalServerError.html


404
/srv/www/tomcat/base/errorpages/NotFound.html






after calling a non existing document all i have been served is a blank page 
nothing inside not even a html code nothing  i was wondering what could be the 
problem and i have checked my log which show me this :

==
2005-09-19 17:28:37 StandardContext[/Servlets]default: 
DefaultServlet.serveResource:  Serving resource '/' headers and data
2005-09-19 17:28:37 StandardContext[/Servlets]default: 
DefaultServlet.serveResource:  Serving resource 
'/srv/www/tomcat/base/errorpages/NotFound.html' headers and data
==


anyone of you guys have a plan what could be hapening out here ??


thanks for your help

Regards Yassine




__
Verpassen Sie keine eBay-Auktion und bieten Sie bequem
und schnell über das Telefon mit http://www.telefonbieten.de

Ihre eMails auf dem Handy lesen - ohne Zeitverlust - 24h/Tag
eMail, FAX, SMS, VoiceMail mit http://www.directbox.com



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



Asking again: Need multiple virtual directories for isapi_redirector

2005-09-19 Thread David Thielen
Hi;

I want to make sure this is correct:


If you want to run Tomcat against multiple websites, not just the default
website, this is what I have had to do.

This is on Windows 2003/IIS 6.0.

I removed isapi_redirector.dll from the default web site ISAPI Filters and
put it in the parent "Web Sites" ISAPI Filter properties.

I added a jakarta virtual directory for each website (and I have a lot.).

Now it appears to work.

??? - thanks - dave


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



index.jsp and virtual directories

2005-09-19 Thread David Thielen
Hi;

I am running on Windows 2003/IIS 6.0 & tomcat. I have a single IP address
for all of my websites (I have several) and then use the request header to
determine which website to return. IIS does this very nicely.

I want to have index.jsp in each of these websites. How can I set it up so
that when isapi_redirect calls tomcat, it knows which website's index.jsp to
use? The solution JRun uses is it will look in the IIS directory of the
website for the jsp file. But I tried that with tomcat and it didn't work.

Is there a way to do this?

Thanks - dave

Ps - to see what I mean, you can go to:
http://www.windward.net or http://jasmine.windward.net/windward/
http://www.windwardreports.com or
http://jasmine.windward.net/windwardreports/



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



What is correct for workers.properties.minimal

2005-09-19 Thread David Thielen
Hi;

I'm running Tomcat 5.5 on Windows 2003/IIS 6.0 using isapi_redirect

The isapi_redirect.exe installer creates a worker.properties.minimal of:
worker.list=wlb,jkstatus
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w
worker.jkstatus.type=status

While the docs show one of:
worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

First, what use is the load balancing if I have just one server running one
instance of Tomcat? Does it load balance within that one instance?

Second, what is jkstatus for?

Third, I am using the non-lb listing above. And it appears to work fine but
occasionally I am getting the following. What does it mean:
[Sun Sep 18 20:15:30 2005] [error]
HttpExtensionProc::jk_isapi_plugin.c (1029): could not get a worker for name
ajp13

Thanks - dave



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



Re: Re: Jk connector fails to connect... after some time working ( seems solved )

2005-09-19 Thread Borja Bravo Alférez


Hi,

	After changing the timeout to 10 seconds it _seems_ to work. It 
was at cero so it could have run out of connections.


It has been 6 hours of uptime. Much better.

thank you for everything,

Borja






On Mon, 19 Sep 2005, Yassine ELassad wrote:


here it is my one and  how i configured it on 5.0.28:


what should be done:
--
on your  Webserver (Apache):
there should be some Namensbasd Virtual Host
Websites, which should runs some Java Servlets
Apache have to foreward these request where they belon to (TC)


Tomcat Configuration:
-
after installing jakarta-tomcat and apache2-jakarta-tomcat-connectors.

you should look for your tomcat_base/conf/server.xml
  ../jk2.properties

i eliminated every thing which is not needed and there is only
the server and the service which are needed to connect to apache

-- start --

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

--- end --
jk2.properties:
-
uncoment these 2 lines
-- start --
handler.list=channelSocket,request
channelSocket.port=8009
--- ende --
TC config is now done

configuration of Apache:

I assume you already installed jk on apache and its working

now look for your default  /etc/apache2/workers2.properties:
-- start --
# only at beginnin. In production uncomment it out
[logger.apache2]
level=ERROR
[shm]
file=/var/log/apache2/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:127.0.0.1:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:127.0.0.1:8009]
channel=channel.socket:127.0.0.1:8009
# Uri mapping in the vhost configs
--- ende --
To avoid IPV6 comflict use  127.0.0.1 instead of localhost


now you can start your URI mapping here is an examples which mapse servlet  to 
www.yourhost.foo
-- start --
[uri:www.yourhost.foo/servlet/*]
worker=ajp13:127.0.0.1:8009
--- ende --
now you should bind your workers2.properties to apache
create a small config
/etc/apache2/conf.d/mod_jk2.conf
and include it in apache.conf or httpd.conf

-- start --
#
# mod_jk2
#

   JkSet config:file /etc/apache2/workers2.properties

--- ende --

   ServerAdmin [EMAIL PROTECTED]
   ServerName www.yourhost.foo
   # needed for named virtual hosts
   UseCanonicalName On
   # DocumentRoot: The directory out of which you will serve your
   # documents. By default, all requests are taken from this directory,
   # but symbolic links and aliases may be used to point to other
   # locations.
   DocumentRoot /srv/www/htdocs/
   # Give all /servlet/* URLs to Tomcat
   
   JkUriSet worker ajp13:127.0.0.1:8009
   

--- ende --
- start www.yourhost2.foo.conf 
#
# www.knightsoft-net.mt:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

   ServerAdmin [EMAIL PROTECTED]
   ServerName www.yourhost2.foo
   # needed for named virtual hosts
   UseCanonicalName On
   # DocumentRoot: The directory out of which you will serve your
   # documents. By default, all requests are taken from this directory,
   # but symbolic links and aliases may be used to point to other
   # locations.
   DocumentRoot /srv/www/htdocs/manfred/www.yourhost2.foo/
   
 Options +FollowSymLinks +Multiviews
 AllowOverride All
   
   # Give all /servlet/* URLs to Tomcat
   
   JkUriSet worker ajp13:127.0.0.1:8009
   

--- ende --
restart apache and have fun :) i hope this helps if not drop a mail






 directBOX Reply ---
From: Borja Bravo Alférez ([EMAIL PROTECTED])
To: TomcatUsersList (tomcat-user@jakarta.apache.org)
Date: 19.09.2005 12:57:24

On Mon, 19 Sep 2005, Yassine ELassad wrote:


hi,

i think its just apache trying to connect to tomcat using JK

relaying SSL request to a non-SSL server

2005-09-19 Thread Paul Singleton

Our app, sometimes accessed with SSL, returns pages
with references to images from a non-SSL-enabled server.

Our customer complains that this can trigger IE to pop
up a dialog with

 This page contains both secure and nonsecure items.
 Do you want to display the nonsecure items?

and wants us (rather than ther user, or Microsoft :-)
to prevent this from happening.

I am considering making our app accept and relay SSL
requests for images by opening a java.net.URLConnection
to the non-SSL image, getting its content, calling
setContentType(), setContentLength() etc. on the
HttpServletResponse and writing the image data to the
ServletOutputStream.

Is there an easier way?  I cannot SSL-enable the image
server :-(

If I do this, how should I read the binary data from
the InputStream and write it to the ServletOutputStream?

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 16/Sep/2005


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



Not able to access the home page of Apache with mod-ssl

2005-09-19 Thread Rohit Maheshwari
Hi All,
I am setting up Apache 2.0.54 with mod_ssl. I have configured virtual
host as rohit.com.
When I tried to access the home page of Apache with firefox I am able to
retrieve it.
However I am unable to retrieve it on Internet Explorer .
Request I am sending on browser : https://rohit.com/  ( success on
firefox but not on I explorer)
While https://localhost:443/ is working on I Explorer.
Any pointers why it is happening will be highly appreciated .

Thanks and Regards ,
Rohit
BEA Weblogic Support

BEAWorld 2005: coming to a city near you.  Everything you need for SOA and 
enterprise infrastructure success.


Register now at http://www.bea.com/4beaworld


Santa Clara 27-29 Sep| London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 
25-26 Oct| Beijing 7-8 Dec

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



Re: Problems with utf-8 encoding

2005-09-19 Thread Yair Zohar


Yair Zohar wrote:


Guy Katz wrote:


google it.
there's a lot.

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 11:08 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Guy Katz wrote:

 

put an encoding filter in front of your servlet/jsp's that sets a 
UTF-8 encoding for incoming requests and outgoing responses. its 
your safest bet for tomcat 4 as far as i remember.


-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 9:43 AM
To: Tomcat Users List
Subject: Re: Problems with utf-8 encoding


Anto Paul wrote:



  


On 9/19/05, Yair Zohar <[EMAIL PROTECTED]> wrote:


 



Hello,
I'm using Tomcat 4.1.18
I'm trying to read hebrew data in utf-8 encoding from the 
database. As a

check I entered a utf-8 encoded 'alef' letter to the database field.
(I see it in the database as one letter 'alef'). The jsp page that
displays the data, prints two chars instead of one. I checked the 
values

of these chars and
they are 215 114, which are the utf-8 combination to create the 
letter

'alef'  (so I was told).

jps code:

<%@ page language="java" contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8" info="Tables Handler" 
import="tablesHandler.*" %>


class="tablesHandler.TableViewer" />



<% request.setCharacterEncoding("UTF-8");%>




 


 

   
  


Move <% request.setCharacterEncoding("UTF-8");%> to before 
jsp:useBean tag.




 



Thanks for replying,
It didn't fix the problem, I still see the same two chars.
Yair.


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





  


Guy, can you direct me to practical documentation on implementing 
such a filter ?


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



 


Hi again,
I implemented the SetCharacterEncodingFilter from the tomcat 4 examples,
In order to check the control I have on the character encoding of the 
request and

response I changed the doFilter method to be:

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
   throws IOException, ServletException {

   request.setCharacterEncoding("UTF-8");
   System.out.println("Request: "+request.getCharacterEncoding());
 response.setContentType("text/html; charset=UTF-8");
   System.out.println("Response: "+response.getCharacterEncoding());
 
   // Pass control on to the next filter

   chain.doFilter(request, response);

   }

request.getCharacterEncoding() returns null. It also returns null if I 
put the request.setCharacterEncoding("UTF-8");

as a remark. (my page contains utf-8 encoding directives).
The response however is set to UTF-8.
Can this explain my problem using UTF-8 encoding ?
Does anybody know how to solve it ?



The filter does the work, it solved the problem.
Thanks all who helped,
Yair.


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



About environment entries

2005-09-19 Thread luc_boudreau
Question number one :
I've noticed that Tomcat 5.5.X includes environment entries definition 
possibility in the admin webapp. Are those of any use in a Struts framework 
webapp ?

I would like to access their value to configure my webapps built on Struts so I 
could deploy them on various environments without trouble. Is it the right way 
? 



Question number two :
What's the correct and practical way to get the Tomcat path from a webapp ?? 



Luc Boudreau
SID - Université du Québec
[EMAIL PROTECTED]
 

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



Where to place a common jar file?

2005-09-19 Thread David Thielen
Hi;

 

If I have a jar file used by multiple servlets, should I put it in
${catalina}/common/lib or in ${catalina}/webapps/${each_app}/WEB-INF/lib?

 

I ask because I have seen various warnings that most jar files need to be
placed in each webapp and not in common (like struts).

 

??? - thanks - dave



Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread Gregg D Bolinger
I am having to get Tomcat setup with IIS on Windows 2003. I started testing 
on my XP box to make sure I could get things rolling before I started 
screwing with the server. So first I download isapi_redirect.dll from
here.
Next, I followed step by step the instructions located
here
.

I have also changed the paths in my workers.properties file to reflect my 
java and tomcat home locations.

Needless to say, it is not working. I can't get the filter to show a green 
arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. No 
log files are being generated or anything. 

I was wondering if

A. I am following current instructions
B. Do I have the right DLL downloaded
C. What else can I do

Thanks.

Gregg


RE: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread David Thielen
Hello;

I can feel your pain - I just went through this. A couple of things:
1) reboot. It shouldn't be necessary but was in my case.
2) If IIS6, you have to go to the web extensions(?) in IIS and add
isapi_redirect.dll as an allowed extension.

Good luck - dave


-Original Message-
From: Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 2:23 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.9 and IIS 5/6

I am having to get Tomcat setup with IIS on Windows 2003. I started testing 
on my XP box to make sure I could get things rolling before I started 
screwing with the server. So first I download isapi_redirect.dll from
here.
Next, I followed step by step the instructions located
here
.

I have also changed the paths in my workers.properties file to reflect my 
java and tomcat home locations.

Needless to say, it is not working. I can't get the filter to show a green 
arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. No 
log files are being generated or anything. 

I was wondering if

A. I am following current instructions
B. Do I have the right DLL downloaded
C. What else can I do

Thanks.

Gregg


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



Re: Where to place a common jar file?

2005-09-19 Thread David Smith
Shared jars can be placed in common/lib, but keep in mind that all your
webapps will be locked to the same version of the jar.  It's better to
have a copy in the webapp instead where you'll have more version
independence between wepapps.

--David


David Thielen wrote:

>Hi;
>
> 
>
>If I have a jar file used by multiple servlets, should I put it in
>${catalina}/common/lib or in ${catalina}/webapps/${each_app}/WEB-INF/lib?
>
> 
>
>I ask because I have seen various warnings that most jar files need to be
>placed in each webapp and not in common (like struts).
>
> 
>
>??? - thanks - dave
>
>
>  
>


-- 
===
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture & Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939


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



Re: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread Gregg D Bolinger
Ok Dave. I rebooted and the Filter is Green. So that is a start. However, 
the servlets-examples is still not being loaded. Says page cannot be 
displayed. There is nothing in the log file. I made sure, per your 
discovery, that the uriworkermap.properties file is fixed. Any other 
suggestions?

Thanks a bunch.


Gregg

On 9/19/05, David Thielen <[EMAIL PROTECTED]> wrote:
> 
> Hello;
> 
> I can feel your pain - I just went through this. A couple of things:
> 1) reboot. It shouldn't be necessary but was in my case.
> 2) If IIS6, you have to go to the web extensions(?) in IIS and add
> isapi_redirect.dll as an allowed extension.
> 
> Good luck - dave
> 
> 
> -Original Message-
> From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 2:23 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat 5.5.9 and IIS 5/6
> 
> I am having to get Tomcat setup with IIS on Windows 2003. I started 
> testing
> on my XP box to make sure I could get things rolling before I started
> screwing with the server. So first I download isapi_redirect.dll from
> here<
> http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/
> jk-1.2.14/>.
> Next, I followed step by step the instructions located
> here<
> http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/iishowto
> .html>
> .<
> http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/iishowto.ht
> ml>
> 
> I have also changed the paths in my workers.properties file to reflect my
> java and tomcat home locations.
> 
> Needless to say, it is not working. I can't get the filter to show a green
> arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. No
> log files are being generated or anything.
> 
> I was wondering if
> 
> A. I am following current instructions
> B. Do I have the right DLL downloaded
> C. What else can I do
> 
> Thanks.
> 
> Gregg
> 
>


Tomcat Manager

2005-09-19 Thread Trung Nguyen
Hello All, 

I'm trying to setup/configure the tomcat manager, but i got this error below 
when access to http://localhost/manager/html, the login screen popup though...
any ideas?


1995-09-19 17:57:02,878 [TP-Processor24] ERROR 
org.apache.catalina.realm.JAASRealm - Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at javax.security.auth.login.Configuration$3.run(Configuration.java:216)
at java.security.AccessController.doPrivileged(Native Method)
at 
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:210)
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
at javax.security.auth.login.LoginContext.(LoginContext.java:403)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:355)
at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:383)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:95)
... 28 more

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



Re: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread Gregg D Bolinger
Ok, not it is asking for a username and password, so, a step in the right 
directions maybe. :)

Gregg

On 9/19/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote:
> 
> Ok Dave. I rebooted and the Filter is Green. So that is a start. However, 
> the servlets-examples is still not being loaded. Says page cannot be 
> displayed. There is nothing in the log file. I made sure, per your 
> discovery, that the uriworkermap.properties file is fixed. Any other 
> suggestions?
> 
> Thanks a bunch.
> 
> 
> Gregg
> 
> On 9/19/05, David Thielen < [EMAIL PROTECTED]> wrote:
> > 
> > Hello;
> > 
> > I can feel your pain - I just went through this. A couple of things: 
> > 1) reboot. It shouldn't be necessary but was in my case.
> > 2) If IIS6, you have to go to the web extensions(?) in IIS and add
> > isapi_redirect.dll as an allowed extension.
> > 
> > Good luck - dave
> > 
> > 
> > -Original Message- 
> > From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 19, 2005 2:23 PM
> > To: tomcat-user@jakarta.apache.org 
> > Subject: Tomcat 5.5.9 and IIS 5/6
> > 
> > I am having to get Tomcat setup with IIS on Windows 2003. I started 
> > testing
> > on my XP box to make sure I could get things rolling before I started
> > screwing with the server. So first I download isapi_redirect.dll from 
> > here<
> > http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/
> > jk-1.2.14/>.
> > Next, I followed step by step the instructions located 
> > here<
> > http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/iishowto
> > .html>
> > . > ml>
> > 
> > I have also changed the paths in my workers.properties file to reflect 
> > my
> > java and tomcat home locations.
> > 
> > Needless to say, it is not working. I can't get the filter to show a 
> > green 
> > arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. 
> > No
> > log files are being generated or anything.
> > 
> > I was wondering if
> > 
> > A. I am following current instructions
> > B. Do I have the right DLL downloaded 
> > C. What else can I do
> > 
> > Thanks.
> > 
> > Gregg
> > 
> > 
>


RE: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread David Thielen
All I can suggest is make sure the uriworkers. and workers. files are
correct, that the registry is pointing at the ones you think it is pointing
at AND that you have the servlets spelled correctly - - its
servlets-examples, not servlet-examples on my system.

 

Thanks - dave

 

 

  _  

From: Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 2:45 PM
To: David Thielen
Cc: Tomcat Users List
Subject: Re: Tomcat 5.5.9 and IIS 5/6

 

Ok Dave. I rebooted and the Filter is Green.  So that is a start.  However,
the servlets-examples is still not being loaded.  Says page cannot be
displayed.  There is nothing in the log file.  I made sure, per your
discovery, that the uriworkermap.properties file is fixed.  Any other
suggestions?

Thanks a bunch.


Gregg

On 9/19/05, David Thielen < [EMAIL PROTECTED]  >
wrote:

Hello;

I can feel your pain - I just went through this. A couple of things: 
1) reboot. It shouldn't be necessary but was in my case.
2) If IIS6, you have to go to the web extensions(?) in IIS and add
isapi_redirect.dll as an allowed extension.

Good luck - dave


-Original Message- 
From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 2:23 PM
To: tomcat-user@jakarta.apache.org 
Subject: Tomcat 5.5.9 and IIS 5/6

I am having to get Tomcat setup with IIS on Windows 2003. I started testing
on my XP box to make sure I could get things rolling before I started
screwing with the server. So first I download isapi_redirect.dll from 
here.
Next, I followed step by step the instructions located 
here
.<

http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/iishowto.ht
ml>

I have also changed the paths in my workers.properties file to reflect my
java and tomcat home locations.

Needless to say, it is not working. I can't get the filter to show a green 
arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. No
log files are being generated or anything.

I was wondering if

A. I am following current instructions
B. Do I have the right DLL downloaded 
C. What else can I do

Thanks.

Gregg

 



Re: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread Gregg D Bolinger
Ok Dave. Checking..Here is the information I have. Maybe I have a typo and 
can't see it because I have been staring at it too long.

workers.properties.minimal
---
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

uriworkermap.properties

/servlets-examples/*=ajp13w
!/servlets-examples/*.jpeg=ajp13w

registry
-
Value 0
Name: extension_uri
Type: REG_SZ
Data: /jakarta/isapi_redirect.dll

Value 1
Name: log_file
Type: REG_SZ
Data: c:\tomcat\logs\isapi.log

Value 2
Name: log_level
Type: REG_SZ
Data: info

Value 3
Name: worker_file
Type: REG_SZ
Data: c:\tomcat\conf\workers.properties.minimal

Value 4
Name: worker_mount_file
Type: REG_SZ
Data: c:\tomcat\conf\uriworkermap.properties

everything looks good to me, but who knows.

Gregg

On 9/19/05, David Thielen <[EMAIL PROTECTED]> wrote:
> 
>  All I can suggest is make sure the uriworkers… and workers… files are 
> correct, that the registry is pointing at the ones you think it is pointing 
> at AND that you have the servlets spelled correctly - - its 
> servlets-examples, not servlet-examples on my system.
> 
>  Thanks – dave
> 
>--
>  
> *From:* Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
> *Sent:* Monday, September 19, 2005 2:45 PM
> *To:* David Thielen
> *Cc:* Tomcat Users List
> *Subject:* Re: Tomcat 5.5.9 and IIS 5/6
>  
>  Ok Dave. I rebooted and the Filter is Green. So that is a start. However, 
> the servlets-examples is still not being loaded. Says page cannot be 
> displayed. There is nothing in the log file. I made sure, per your 
> discovery, that the uriworkermap.properties file is fixed. Any other 
> suggestions?
> 
> Thanks a bunch.
> 
> 
> Gregg
>  
> On 9/19/05, *David Thielen* < [EMAIL PROTECTED]> wrote:
> 
> Hello;
> 
> I can feel your pain - I just went through this. A couple of things: 
> 1) reboot. It shouldn't be necessary but was in my case.
> 2) If IIS6, you have to go to the web extensions(?) in IIS and add
> isapi_redirect.dll as an allowed extension.
> 
> Good luck - dave
> 
> 
> -Original Message- 
> From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 2:23 PM
> To: tomcat-user@jakarta.apache.org 
> Subject: Tomcat 5.5.9 and IIS 5/6
> 
> I am having to get Tomcat setup with IIS on Windows 2003. I started 
> testing
> on my XP box to make sure I could get things rolling before I started
> screwing with the server. So first I download isapi_redirect.dll from 
> here<
> http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/
> jk-1.2.14/>.
> Next, I followed step by step the instructions located 
> here<
> http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/iishowto
> .html>
> . ml>
> 
> I have also changed the paths in my workers.properties file to reflect my
> java and tomcat home locations.
> 
> Needless to say, it is not working. I can't get the filter to show a green 
> 
> arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. No
> log files are being generated or anything.
> 
> I was wondering if
> 
> A. I am following current instructions
> B. Do I have the right DLL downloaded 
> C. What else can I do
> 
> Thanks.
> 
> Gregg
>  
>


Re: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread Gregg D Bolinger
Ohm another thing...I actually got an error in my tomcat log fle.

HttpExtensionProc::jk_isapi_plugin.c (1029): could not get a worker for name 
ajp13w

Does that help?

gregg

On 9/19/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote:
> 
> Ok Dave. Checking..Here is the information I have. Maybe I have a typo and 
> can't see it because I have been staring at it too long.
> 
> workers.properties.minimal
> ---
> worker.ajp13w.type=ajp13
> worker.ajp13w.host=localhost
> worker.ajp13w.port=8009
> 
> uriworkermap.properties
> 
> /servlets-examples/*=ajp13w
> !/servlets-examples/*.jpeg=ajp13w
> 
> registry
> -
> Value 0
> Name: extension_uri
> Type: REG_SZ
> Data: /jakarta/isapi_redirect.dll
> 
> Value 1
> Name: log_file
> Type: REG_SZ
> Data: c:\tomcat\logs\isapi.log
> 
> Value 2
> Name: log_level
> Type: REG_SZ
> Data: info
> 
> Value 3
> Name: worker_file
> Type: REG_SZ
> Data: c:\tomcat\conf\workers.properties.minimal
> 
> Value 4
> Name: worker_mount_file
> Type: REG_SZ
> Data: c:\tomcat\conf\uriworkermap.properties
> 
> everything looks good to me, but who knows.
> 
> Gregg
> 
> On 9/19/05, David Thielen <[EMAIL PROTECTED]> wrote:
> > 
> >  All I can suggest is make sure the uriworkers… and workers… files are 
> > correct, that the registry is pointing at the ones you think it is pointing 
> > at AND that you have the servlets spelled correctly - - its 
> > servlets-examples, not servlet-examples on my system.
> > 
> >  Thanks – dave
> > 
> >--
> >  
> > *From:* Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
> > *Sent:* Monday, September 19, 2005 2:45 PM
> > *To:* David Thielen
> > *Cc:* Tomcat Users List
> > *Subject:* Re: Tomcat 5.5.9 and IIS 5/6
> >  
> >  Ok Dave. I rebooted and the Filter is Green. So that is a start. 
> > However, the servlets-examples is still not being loaded. Says page cannot 
> > be displayed. There is nothing in the log file. I made sure, per your 
> > discovery, that the uriworkermap.properties file is fixed. Any other 
> > suggestions?
> > 
> > Thanks a bunch.
> > 
> > 
> > Gregg
> >  
> > On 9/19/05, *David Thielen* < [EMAIL PROTECTED]> wrote:
> > 
> > Hello;
> > 
> > I can feel your pain - I just went through this. A couple of things: 
> > 1) reboot. It shouldn't be necessary but was in my case.
> > 2) If IIS6, you have to go to the web extensions(?) in IIS and add
> > isapi_redirect.dll as an allowed extension.
> > 
> > Good luck - dave
> > 
> > 
> > -Original Message- 
> > From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 19, 2005 2:23 PM
> > To: tomcat-user@jakarta.apache.org 
> > Subject: Tomcat 5.5.9 and IIS 5/6
> > 
> > I am having to get Tomcat setup with IIS on Windows 2003. I started 
> > testing
> > on my XP box to make sure I could get things rolling before I started
> > screwing with the server. So first I download isapi_redirect.dll from 
> > here >  
> > 
> > jk-1.2.14/>.
> > Next, I followed step by step the instructions located 
> > here >  
> > 
> > .html>
> > . > ml>
> > 
> > I have also changed the paths in my workers.properties file to reflect 
> > my
> > java and tomcat home locations.
> > 
> > Needless to say, it is not working. I can't get the filter to show a 
> > green 
> > arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. 
> > No
> > log files are being generated or anything.
> > 
> > I was wondering if
> > 
> > A. I am following current instructions
> > B. Do I have the right DLL downloaded 
> > C. What else can I do
> > 
> > Thanks.
> > 
> > Gregg
> >  
> >  
>


new File never found

2005-09-19 Thread Markus Kühn
My problem is that tomcat does not find a new File if a request for the new 
File is made immediately after the File was created. All subsequent request 
will fail, though the File is there (also minutes after [didnt tried 
longer]). But if I wait about 15 seconds after the File was created theres 
no problem at all, means tomcat always finds and delivers it.


So the question is how can I configure tomcat to immediately register that a 
File was added to a webapp?


version: 4.0.6 ( im bound :-( )

Is this version specific?

In the meantime a servlet will do the job.


Thx M 


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



Tomcat Alone or tomcat+IIS/Apache

2005-09-19 Thread Gregg D Bolinger
I am just curious. I know that delivering static content with Apache/IIS is 
preferred. But does that matter if every single request has to go to Tomcat 
because the data is dynamic? Is there some caching that gets involved here? 
What is the benefit of Tomcat + Apache/IIS on major J2EE apps?

Gregg


Re: Where to place a common jar file?

2005-09-19 Thread Mark Eggers
>From the Tomcat documetation:

http://localhost:8080/tomcat-docs/class-loader-howto.html

* For classes and resources specific to a particular 
web application, place unpacked classes and resources 
under /WEB-INF/classes  of your web application 
archive, or place JAR files containing those classes 
and resources under /WEB-INF/lib of your web
application archive.

* For classes and resources that must be shared across

all web applications, place unpacked classes and 
resources under $CATALINA_BASE/shared/classes, or
place 
JAR files containing those classes and resources under

$CATALINA_BASE/shared/lib.

Further on down the page:

Common - This class loader contains additional classes

that are made visible to both Tomcat internal classes 
and to all web applications. Normally, application 
classes should NOT  be placed here.

/mde/

--- David Smith <[EMAIL PROTECTED]> wrote:

> Shared jars can be placed in common/lib, but keep in
> mind that all your
> webapps will be locked to the same version of the
> jar.  It's better to
> have a copy in the webapp instead where you'll have
> more version
> independence between wepapps.
> 
> --David
> 
> 
> David Thielen wrote:
> 
> >Hi;
> >
> > 
> >
> >If I have a jar file used by multiple servlets,
> should I put it in
> >${catalina}/common/lib or in
> ${catalina}/webapps/${each_app}/WEB-INF/lib?




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



jdbc driver

2005-09-19 Thread Kito Holliday
Attempting to use connector-java-3.3.10 with tomcat 4.0 and mysql and
servlets. The Java code:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)lookup("jdbc/TestDB");

throws the exception:
Exception creating DataSource: org.hsql.jdbcDriver

The problem is that my .xml files never mentions the hsql jdbcDriver.
Obviously tomcat is ignoring my 

Specifically, I have a web.xml having:
**

http://java.sun.com/dtd/web-app_2_3.dtd";>

  
  DB Connection
  jdbc/TestDB
  javax.sql.DataSource
  Container
  

***

and a server.xml having

*Sorry for the long server.xml**


 
   
   
   
   
   
 
 
   
   
 
   
   
 
 
 
 
 
   mail.smtp.host
  localhost
   
 
   
   
 
 
   
 
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
 
 
   factory
   com.mysql.jdbc.jdbc2.optional.
  MysqlConnectionPoolDataSource
 
 
   maxActive
   100
 
 
   maxIdle
   30
 
 
   maxWait
   1
 
 
   username
   javauser
 
 
   password
   javadude
 
 
   driverClassName
   com.mysql.jdbc.Driver
 
 
   url
   jdbc:mysql://localhost:3306
  /javatest?autoReconnect=true
 
   
   removeAbandoned
   true
 
 
   removeAbandonedTimeout
   60
 
 
   logAbandoned
   true
 
   
   
 
   
 
 



  
  
  



  
  

-   
  


  
  
  
  

  
mail.smtp.host
localhost
  

  

  
   
 

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



Re: Tomcat Alone or tomcat+IIS/Apache

2005-09-19 Thread halcyon

Well I'm sure you can imagine that if all of your content is dynamic then
layering tomcat behind Apache/IIS will only add latency/resources to your
requests... nothing significant.. but maybe if your serving up a ton of
requests it might be worthwhile to run tomcat standalone.

-David

Quoting Gregg D Bolinger <[EMAIL PROTECTED]>:


I am just curious. I know that delivering static content with Apache/IIS is
preferred. But does that matter if every single request has to go to Tomcat
because the data is dynamic? Is there some caching that gets involved here?
What is the benefit of Tomcat + Apache/IIS on major J2EE apps?

Gregg






This message was sent using IMP, the Internet Messaging Program.


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



RE: Tomcat Alone or tomcat+IIS/Apache

2005-09-19 Thread Caldarale, Charles R
> From: Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
> Subject: Tomcat Alone or tomcat+IIS/Apache
> 
> I know that delivering static content with Apache/IIS is 
> preferred.

Urban myth, based primarily on older Tomcat versions that did not
perform anywhere near as well as the current one.

> But does that matter if every single request has 
> to go to Tomcat because the data is dynamic?

Think about it:  How could adding path length and latency for every
request improve performance?

> What is the benefit of Tomcat + Apache/IIS on major J2EE apps?

Job security perhaps?  Also increased stress levels, if you enjoy that
sort of thing.  Unless there's something specific for httpd or IIS to do
(e.g., poor man's load balancing), simplify your life and leave them
out.

Check out Peter Lin's performance measurements for just static content,
and you may decide you don't need httpd or IIS for that, either.
http://jakarta.apache.org/tomcat/articles/benchmark_summary.pdf

 - Chuck


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

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



Mod_jk setup problems

2005-09-19 Thread Don Boling

Hi,

I am running Tomcat5.5.9 and JDK1.5.0_04 with a Apache 1.3 webserver on 
FreeBSD 5.3.


I can't seem to get anything to successfully pass though the mod_jk 
connector to the webapp.


My mod_jk.conf , workers.properties are as follows.

$ less mod_jk.conf
#
   JkWorkersFile /usr/local/etc/apache/workers.properties
   JkLogFile  /var/log/jk.log
   JkLogLevel debug


   ServerName localhost

   # Sample JkMounts.  Replace these with the paths you would
   # like to mount from your JSP server.
   JkMount /*.jsp worker1
   JkMount /servlet/* worker1
   JkMount /examples/* worker1
   JkMount /docstore worker1
   JkMount /docstore/* worker1

mod_jk.conf (END)

$ less workers.properties
# Setting Tomcat & Java Home
workers.tomcat_home=/usr/local/jakarta-tomcat5.5/
workers.java_home=/usr/local/jdk1.5.0/
ps=/

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300

workers.properties (END)


When I start Tomcat & Apache... is seems to start ok , but I get this 
output in the jk.log file ...


$ less /var/log/jk.log
[Sun Sep 18 21:37:30 2005] [6691:] [error] jk_init::mod_jk.c (2035): 
Initializing shm:/usr/local/logs/jk-runtime-status errno=2
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
uri_worker_map_open::jk_uri_worker_map.c (323): rule map size is 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
build_worker_map::jk_worker.c (236): creating worker worker1
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
wc_create_worker::jk_worker.c (141): about to create instance worker1 of 
ajp13
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
wc_create_worker::jk_worker.c (154): about to validate and init worker1
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
ajp_validate::jk_ajp_common.c (1806): worker worker1 contact is 
'localhost:8009'
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1895): setting socket keepalive to 1
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1934): setting socket timeout to -1
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1938): setting socket buffer size to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1942): setting connection recycle timeout to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1946): setting cache timeout to 600
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1950): setting connect timeout to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1954): setting reply timeout to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1958): setting prepost timeout to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1962): setting recovery opts to 0
[Sun Sep 18 21:37:30 2005] [6691:] [debug] ajp_init::jk_ajp_common.c 
(1966): setting number of retries to 3
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
ajp_create_endpoint_cache::jk_ajp_common.c (1843): setting connection 
cache size to 10
[Sun Sep 18 21:37:30 2005] [6691:] [debug] 
build_worker_map::jk_worker.c (248): removing old worker1 worker
[Sun Sep 18 21:39:14 2005] [7500:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/docstore/' from 0 maps
[Sun Sep 18 22:48:11 2005] [7501:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/' 
from 0 maps
[Sun Sep 18 22:48:11 2005] [7501:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/index.html' from 0 maps
[Sun Sep 18 22:48:11 2005] [7501:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/HEADER.html' from 0 maps
[Sun Sep 18 22:48:11 2005] [7501:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/README.html' from 0 maps
[Sun Sep 18 23:54:42 2005] [7503:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/' 
from 0 maps
[Sun Sep 18 23:54:42 2005] [7503:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/index.html' from 0 maps
[Sun Sep 18 23:54:42 2005] [7503:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/HEADER.html' from 0 maps
[Sun Sep 18 23:54:42 2005] [7503:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/README.html' from 0 maps
[Sun Sep 18 23:55:51 2005] [7507:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/' 
from 0 maps
[Sun Sep 18 23:55:51 2005] [7507:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/index.html' from 0 map

Re: jdbc driver

2005-09-19 Thread andy gordon
is the MySQL Connector Jar file in the $CATALINA_HOME/common/lib  directory?

Kito Holliday <[EMAIL PROTECTED]> wrote:Attempting to use connector-java-3.3.10 
with tomcat 4.0 and mysql and
servlets. The Java code:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)lookup("jdbc/TestDB");

throws the exception:
Exception creating DataSource: org.hsql.jdbcDriver

The problem is that my .xml files never mentions the hsql jdbcDriver.
Obviously tomcat is ignoring my 

Specifically, I have a web.xml having:
**

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd";>


DB Connection
jdbc/TestDB
javax.sql.DataSource
Container


***

and a server.xml having

*Sorry for the long server.xml**



port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443" acceptCount="10"
debug="0" connectionTimeout="6" />

prefix="standaloneEngine_log." suffix=".txt"
timestamp="true"/>


directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" />
directory="logs" prefix="standaloneHost_log." suffix=".txt"
timestamp="true" />

privileged="true">
prefix="standalone_manager_log." suffix=".txt"
timestamp="true" />

reloadable="true" crossContext="true">
prefix="standalone_examples_log." suffix=".txt"
timestamp="true" />
value="15" />

override="false" />
type="javax.mail.Session" />


mail.smtp.host
localhost




crossContext="true">
prefix="standalone_DBTest_log." suffix=".txt"
timestamp="true" />
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver" />



factory
org.apache.commons.dbcp.BasicDataSourceFactory




factory
com.mysql.jdbc.jdbc2.optional.
MysqlConnectionPoolDataSource




maxActive
100




maxIdle
30




maxWait
1




username
javauser




password
javadude




driverClassName
com.mysql.jdbc.Driver




url
jdbc:mysql://localhost:3306
/javatest?autoReconnect=true




removeAbandoned
true




removeAbandonedTimeout
60




logAbandoned
true








prefix="tomcat_apache_service." suffix=".txt"
timestamp="true"/>
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps" acceptCount="10"
debug="0" />
name="Apache" localHost="127.0.0.1" debug="5">
prefix="tomcatapacheEngine." suffix=".txt" timestamp="true"/>

unpackWARs="true">
directory="logs" prefix="tomcatapacheHost_log."
suffix=".txt" timestamp="true" />

reloadable="true" crossContext="true" useNaming="false">
prefix="tomcatapache_DBTest_log." suffix=".txt"
timestamp="true" />
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
username="javauser" password="javadude"
url="jdbc:mysql://localhost:3306
/javatest?autoReconnect=true"
factory="org.apache.commons.dbcp.
BasicDataSourceFactory"
maxActive="100"
maxIdle="30"
validationQuery="SELECT 1"
testOnBorrow="true"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="1"
minEvictableIdletime="6"
maxWait="1"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true" />

- privileged="true">
prefix="apachetomcat_manager_log." suffix=".txt"
timestamp="true" />

reloadable="true" crossContext="true">
prefix="apachetomcat_examples_log." suffix=".txt"
timestamp="true" />
value="15" />

override="false" />
type="javax.mail.Session" />



mail.smtp.host
localhost









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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Mod_jk setup problems

2005-09-19 Thread Mark Eggers
A couple of things here.  I'll try to insert comment
where appropriate.

--- Don Boling <[EMAIL PROTECTED]> wrote:

> I can't seem to get anything to successfully pass
> though the mod_jk connector to the webapp.

What version of mod_jk?
 
> My mod_jk.conf , workers.properties are as follows.
> 
> $ less mod_jk.conf
> #
> JkWorkersFile
> /usr/local/etc/apache/workers.properties
> JkLogFile  /var/log/jk.log
> JkLogLevel debug

Later versions of mod_jk need JkShmFile on UNIX.

> JkMount /*.jsp worker1
> JkMount /servlet/* worker1
> JkMount /examples/* worker1
> JkMount /docstore worker1
> JkMount /docstore/* worker1

My installs of Tomcat on Linux and Windows do not have
an examples web application.  I have /jsp-examples and
a /servlets-examples contexts.  You might try:

JkMount /jsp-examples/*.jsp worker1
JkMount /servlet-examples/servlet/* worker1

I don't know what your other applications are, but
I'll comment on a general setup in a bit.
 
> # Define 1 real worker using ajp13
> worker.list=worker1
> # Set properties for worker1 (ajp13)
> worker.worker1.type=ajp13
> worker.worker1.host=localhost
> worker.worker1.port=8009
> worker.worker1.lbfactor=50
> worker.worker1.cachesize=10
> worker.worker1.cache_timeout=600
> worker.worker1.socket_keepalive=1
> worker.worker1.reclycle_timeout=300

You probably don't need worker.worker1.lbfactor since
you're not using load balancing.  Recycle
(worker.worker1.reclycle_timeout) needs to be spelled
correctly.

[Lots of log stuff deleted]

With the exceptin of docstore, I did not see anything
that matched your JkMount statements.  Since there was
no match, no requests were forwarded.

In general, you will probably not have
$CATALINA_HOME/webapps and Apache's DocumentRoot
ovelapping each other.  Since they don't overlap,
Apache will not know anything about static files
(html, css, etc.) that live in $CATALINA_HOME/webapps.

You can use Directory and Alias directives in Apache
to set up access and map the directory into a URI
space that Apache knows about.

With later versions of mod_jk, you can use JkAutoAlias
to map directories for you.  From the documentation at
http://jakarta.apache.org/tomcat/connectors-doc/config/apache.html

JkAutoAlias /opt/tomcat/webapps

Then you can use JkMount to map certain requests
(*.jsp, /*/servlet/*).

JkMount /jsp-examples/*.jsp worker1

The value of JkAutoAlias appears to be prepended to
the JkMount directive to find the physical location.

I've not used JkAutoAlias, but this appears to be a
nice alternative to Directory and Alias directives in
httpd.conf.

In short:

1. Add JkShmFile to httpd.conf
2. Remove lbfactor from workers.properties
3. Change the spelling of recycle
4. Use JkAutoAlias or Directory / Alias directives to
put the appropriate directories within Apache's
document and URI space.

I hope that gets you up and running.

/mde/



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: Where to place a common jar file?

2005-09-19 Thread David Thielen
Sorry - you're right on the shared vs common. I put the jdbc drivers in
common/lib as I access them via Tomcat's jndi - so Tomcat uses them. Is that
correct for them

Thanks - dave


-Original Message-
From: Mark Eggers [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 4:19 PM
To: Tomcat Users List
Subject: Re: Where to place a common jar file?

>From the Tomcat documetation:

http://localhost:8080/tomcat-docs/class-loader-howto.html

* For classes and resources specific to a particular 
web application, place unpacked classes and resources 
under /WEB-INF/classes  of your web application 
archive, or place JAR files containing those classes 
and resources under /WEB-INF/lib of your web
application archive.

* For classes and resources that must be shared across

all web applications, place unpacked classes and 
resources under $CATALINA_BASE/shared/classes, or
place 
JAR files containing those classes and resources under

$CATALINA_BASE/shared/lib.

Further on down the page:

Common - This class loader contains additional classes

that are made visible to both Tomcat internal classes 
and to all web applications. Normally, application 
classes should NOT  be placed here.

/mde/

--- David Smith <[EMAIL PROTECTED]> wrote:

> Shared jars can be placed in common/lib, but keep in
> mind that all your
> webapps will be locked to the same version of the
> jar.  It's better to
> have a copy in the webapp instead where you'll have
> more version
> independence between wepapps.
> 
> --David
> 
> 
> David Thielen wrote:
> 
> >Hi;
> >
> > 
> >
> >If I have a jar file used by multiple servlets,
> should I put it in
> >${catalina}/common/lib or in
> ${catalina}/webapps/${each_app}/WEB-INF/lib?




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.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: Tomcat 5.5.9 and IIS 5/6

2005-09-19 Thread David Thielen
For worker.properties.minimal you need (you're missing the first line):

worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009


-Original Message-
From: Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 3:20 PM
To: David Thielen
Cc: Tomcat Users List
Subject: Re: Tomcat 5.5.9 and IIS 5/6

Ohm another thing...I actually got an error in my tomcat log fle.

HttpExtensionProc::jk_isapi_plugin.c (1029): could not get a worker for name

ajp13w

Does that help?

gregg

On 9/19/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote:
> 
> Ok Dave. Checking..Here is the information I have. Maybe I have a typo and

> can't see it because I have been staring at it too long.
> 
> workers.properties.minimal
> ---
> worker.ajp13w.type=ajp13
> worker.ajp13w.host=localhost
> worker.ajp13w.port=8009
> 
> uriworkermap.properties
> 
> /servlets-examples/*=ajp13w
> !/servlets-examples/*.jpeg=ajp13w
> 
> registry
> -
> Value 0
> Name: extension_uri
> Type: REG_SZ
> Data: /jakarta/isapi_redirect.dll
> 
> Value 1
> Name: log_file
> Type: REG_SZ
> Data: c:\tomcat\logs\isapi.log
> 
> Value 2
> Name: log_level
> Type: REG_SZ
> Data: info
> 
> Value 3
> Name: worker_file
> Type: REG_SZ
> Data: c:\tomcat\conf\workers.properties.minimal
> 
> Value 4
> Name: worker_mount_file
> Type: REG_SZ
> Data: c:\tomcat\conf\uriworkermap.properties
> 
> everything looks good to me, but who knows.
> 
> Gregg
> 
> On 9/19/05, David Thielen <[EMAIL PROTECTED]> wrote:
> > 
> >  All I can suggest is make sure the uriworkers. and workers. files are 
> > correct, that the registry is pointing at the ones you think it is
pointing 
> > at AND that you have the servlets spelled correctly - - its 
> > servlets-examples, not servlet-examples on my system.
> > 
> >  Thanks - dave
> > 
> >--
> >  
> > *From:* Gregg D Bolinger [mailto:[EMAIL PROTECTED] 
> > *Sent:* Monday, September 19, 2005 2:45 PM
> > *To:* David Thielen
> > *Cc:* Tomcat Users List
> > *Subject:* Re: Tomcat 5.5.9 and IIS 5/6
> >  
> >  Ok Dave. I rebooted and the Filter is Green. So that is a start. 
> > However, the servlets-examples is still not being loaded. Says page
cannot 
> > be displayed. There is nothing in the log file. I made sure, per your 
> > discovery, that the uriworkermap.properties file is fixed. Any other 
> > suggestions?
> > 
> > Thanks a bunch.
> > 
> > 
> > Gregg
> >  
> > On 9/19/05, *David Thielen* < [EMAIL PROTECTED]> wrote:
> > 
> > Hello;
> > 
> > I can feel your pain - I just went through this. A couple of things: 
> > 1) reboot. It shouldn't be necessary but was in my case.
> > 2) If IIS6, you have to go to the web extensions(?) in IIS and add
> > isapi_redirect.dll as an allowed extension.
> > 
> > Good luck - dave
> > 
> > 
> > -Original Message- 
> > From: Gregg D Bolinger [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 19, 2005 2:23 PM
> > To: tomcat-user@jakarta.apache.org 
> > Subject: Tomcat 5.5.9 and IIS 5/6
> > 
> > I am having to get Tomcat setup with IIS on Windows 2003. I started 
> > testing
> > on my XP box to make sure I could get things rolling before I started
> > screwing with the server. So first I download isapi_redirect.dll from 
> >
here > 
> > jk-1.2.14/>.
> > Next, I followed step by step the instructions located 
> >
here > 
> > .html>
> >
. > ml>
> > 
> > I have also changed the paths in my workers.properties file to reflect 
> > my
> > java and tomcat home locations.
> > 
> > Needless to say, it is not working. I can't get the filter to show a 
> > green 
> > arrow in IIS. It still shows that the isapi_redirect.dll is not loaded. 
> > No
> > log files are being generated or anything.
> > 
> > I was wondering if
> > 
> > A. I am following current instructions
> > B. Do I have the right DLL downloaded 
> > C. What else can I do
> > 
> > Thanks.
> > 
> > Gregg
> >  
> >  
>


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



RE: Where to place a common jar file?

2005-09-19 Thread Mark Eggers
I think so.  If you use global naming resources and a
resource link (accessing your jdbc database via jndi),
then you might only need to place the jdbc drivers in
server/lib.

Reading some other online documentation, this appears
to be the preferred method.

/mde/

--- David Thielen <[EMAIL PROTECTED]> wrote:

> Sorry - you're right on the shared vs common. I put
> the jdbc drivers in
> common/lib as I access them via Tomcat's jndi - so
> Tomcat uses them. Is that
> correct for them
> 
> Thanks - dave




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



Cannot forward after response has been committed

2005-09-19 Thread Michael Lai
I have a jsp page that processes a login.  The (simplified) code is 
something like this:


<%@ page language="java"%>
<%
String userid = request.getParameter("userid");
String pw = request.getParameter("pw");

/* code to check user id and password */

if (user not found)
  pageContext.forward("login.jsp");
else
  pageContext.forward("userpage.jsp");
%>

Please note that nowhere in my jsp code do I use the "out" object or 
send some outputs back to the client.  Yet, I am getting this "Cannot 
forward after response has been committed" error.  If I comment out the 
forward statements then the error disappears.  Any help is appreciated.


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



RE: Cannot forward after response has been committed

2005-09-19 Thread Tony
Actually, the line end after the first line is sent back to the client,
with apropriate html headers invented.
<%@ page language="java"%><%// now the line end is in java not in html

Yep, looks ugly.
What is even worse is code that sends a redirect and does NOT do a return.

-Original Message-
From: Michael Lai [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 10:17 PM
To: Tomcat Users List
Subject: Cannot forward after response has been committed


I have a jsp page that processes a login.  The (simplified) code is 
something like this:

<%@ page language="java"%>
<%
String userid = request.getParameter("userid");
String pw = request.getParameter("pw");

/* code to check user id and password */

if (user not found)
   pageContext.forward("login.jsp");
else
   pageContext.forward("userpage.jsp");
%>

Please note that nowhere in my jsp code do I use the "out" object or 
send some outputs back to the client.  Yet, I am getting this "Cannot 
forward after response has been committed" error.  If I comment out the 
forward statements then the error disappears.  Any help is appreciated.

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

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



Resizing JPEG Images

2005-09-19 Thread Justin Jaynes
I am accepting JPEG uploads on a website I developed
in JSP and  Java Beans.  It all runs on Tomcat.

I once knew of a Java Bean that would accept a JPEG
and scale and resize the image and save it.  I need my
web-app to resize the images as it accpets them.

That was years ago.  I can't find it any longer.  Does
anyone know how or where I should start?  If writing
my own bean would be easy using some part of the
Enterprise Java SDK, please point me in the right
direction and I'll do the work.

I am using the lates version of the JDK.

Thanks,

Justin



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



Re: Cannot forward after response has been committed

2005-09-19 Thread Michael Lai

I have an index.jsp page that checks a user's access level:

<%@ page language="java" errorPage="" %>
<%
String userid = (String)session.getAttribute("UserId");

if (userid == null) {
  pageContext.forward("login.jsp");
} else {
  String access = (String)session.getAttribute("Access");

  switch (access.charAt(0)) {
 case 'A':
pageContext.forward("admin/index.jsp");
 case 'R': case 'W':
pageContext.forward("db/index.jsp");
 default:
pageContext.forward("login.jsp");
  }
}
%>

And yet the above page works even with the <%@ page language="java" %> 
line.  I don't understand why the above code works but the doesn't work 
for another page.


What do you propose -- that I remove the <%@ page... %> line?

[EMAIL PROTECTED] wrote:


Actually, the line end after the first line is sent back to the client,
with apropriate html headers invented.
<%@ page language="java"%><%// now the line end is in java not in html

Yep, looks ugly.
What is even worse is code that sends a redirect and does NOT do a return.

-Original Message-
From: Michael Lai [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 10:17 PM
To: Tomcat Users List
Subject: Cannot forward after response has been committed


I have a jsp page that processes a login.  The (simplified) code is 
something like this:


<%@ page language="java"%>
<%
String userid = request.getParameter("userid");
String pw = request.getParameter("pw");

/* code to check user id and password */

if (user not found)
  pageContext.forward("login.jsp");
else
  pageContext.forward("userpage.jsp");
%>

Please note that nowhere in my jsp code do I use the "out" object or 
send some outputs back to the client.  Yet, I am getting this "Cannot 
forward after response has been committed" error.  If I comment out the 
forward statements then the error disappears.  Any help is appreciated.




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



RE: Cannot forward after response has been committed

2005-09-19 Thread Tony
You want the line breaks, either line-feed or carriage-return, line-feed
to occur within the java or jsp code, not within the html code.
Sometimes the html is buffered and ignored when something else puts out
headers or such.

Within HTML, line breaks do not matter much
Before HTML, any line break implies that HTML has started and you can get
default headers without doing anything.
Within JSP or Java, line breaks do not matter much.

Choice of uglies.
<%@ page ...
%><% code here

<%@ page ... %><%
code here

<%@ page %>
---there is here the line break of the above line---
<% at this point the response has been committed by outputting the above
\r\n or whatever


-Original Message-
From: Michael Lai [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 10:34 PM
To: Tomcat Users List
Subject: Re: Cannot forward after response has been committed


I have an index.jsp page that checks a user's access level:

<%@ page language="java" errorPage="" %>   <--there is an html new-line
here!!!
<%
String userid = (String)session.getAttribute("UserId");

if (userid == null) {
   pageContext.forward("login.jsp");
} else {
   String access = (String)session.getAttribute("Access");

   switch (access.charAt(0)) {
  case 'A':
 pageContext.forward("admin/index.jsp");
  case 'R': case 'W':
 pageContext.forward("db/index.jsp");
  default:
 pageContext.forward("login.jsp");
   }
}
%>

And yet the above page works even with the <%@ page language="java" %>
line.  I don't understand why the above code works but the doesn't work
for another page.

What do you propose -- that I remove the <%@ page... %> line?

[EMAIL PROTECTED] wrote:

>Actually, the line end after the first line is sent back to the client,
>with apropriate html headers invented.
><%@ page language="java"%><%// now the line end is in java not in html
>
>Yep, looks ugly.
>What is even worse is code that sends a redirect and does NOT do a return.
>
>-Original Message-
>From: Michael Lai [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 19, 2005 10:17 PM
>To: Tomcat Users List
>Subject: Cannot forward after response has been committed
>
>
>I have a jsp page that processes a login.  The (simplified) code is
>something like this:
>
><%@ page language="java"%>
><%
>String userid = request.getParameter("userid");
>String pw = request.getParameter("pw");
>
>/* code to check user id and password */
>
>if (user not found)
>   pageContext.forward("login.jsp");
>else
>   pageContext.forward("userpage.jsp");
>%>
>
>Please note that nowhere in my jsp code do I use the "out" object or
>send some outputs back to the client.  Yet, I am getting this "Cannot
>forward after response has been committed" error.  If I comment out the
>forward statements then the error disappears.  Any help is appreciated.
>

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


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



Remote Address Valve Lets Everything Through

2005-09-19 Thread Mark Leone
I'm trying to implement a simple remote address valve, but it doesn't 
seem to work. I put the following element inside the Host element in 
%CATALINA_HOME%\conf\server.xml


allow="*xxx**.xxx.xxx.xxx*/> // actual IP address not shown


The only Context elements I have defined are at 
%CATALINA_HOME%\conf\[engine]\[host]\admin.xml and 
%CATALINA_HOME%\conf\[engine]\[host]\manager.xml, and there are no 
valves defined in these. There is only a single Context defined in 
%CATALINA_HOME%\conf\context.xml, and there are no valves in it. There 
are no META-INF folders in any web app, and there are no XML files in 
the appBase folder. There are no defaultCOntext elements defined in 
server.xml. In short, the above valve has to be the only thing defining 
access by IP address for all my web apps.


Yet I can navigate to any web app from IP addresses other than the one 
specified in the valve. The valve has no discernible effect. I also 
tried deny=".*" and again there was no restriction applied.


I should mention that I can't actually test this from outside my network 
at the moment, but I'm trying two things that I believe should cause the 
IP address to fail to match the allow pattern:


1. I navigate to my router's WAN address. Thus I should be hitting 
Tomcat with an IP address that is not localhost and is not the one 
defined in the valve.


2. I navigate to 192.168.1.2 (the internal address of the machine 
running Tomcat) from 192.168.1.4 (the internal address of another 
computer). Both of these computers are behind my NATd firewall, and 
192.168.1.4 is not the address in the allow attribute.


Am I missing something about what address gets presented to Tomcat in 
these scenarios, or am I missing something really basic about how this 
valve is supposed to work?


-Mark


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



Re: Cannot forward after response has been committed

2005-09-19 Thread Michael Lai
I put a 'return' statement after every 'forward' statement in all my jsp 
pages and now it seems to be working.  Thanks for your feedback.


Actually, my linebreak occurs in the <% %> tags.  I think my email 
client might have reformatted my output before sending.


[EMAIL PROTECTED] wrote:


You want the line breaks, either line-feed or carriage-return, line-feed
to occur within the java or jsp code, not within the html code.
Sometimes the html is buffered and ignored when something else puts out
headers or such.

Within HTML, line breaks do not matter much
Before HTML, any line break implies that HTML has started and you can get
default headers without doing anything.
Within JSP or Java, line breaks do not matter much.

Choice of uglies.
<%@ page ...
%><% code here

<%@ page ... %><%
code here

<%@ page %>
---there is here the line break of the above line---
<% at this point the response has been committed by outputting the above
\r\n or whatever



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



Re: Remote Address Valve Lets Everything Through

2005-09-19 Thread Mark Leone
The asterisks in the valve below are an artifact of the way I did my cut 
and paste. The actual valve appears as follows in server.xml


allow="xxx..xxx.xxx.xxx/> // actual IP address not shown


-Mark

Mark Leone wrote:

I'm trying to implement a simple remote address valve, but it doesn't 
seem to work. I put the following element inside the Host element in 
%CATALINA_HOME%\conf\server.xml


allow="*xxx**.xxx.xxx.xxx*/> // actual IP address not shown


The only Context elements I have defined are at 
%CATALINA_HOME%\conf\[engine]\[host]\admin.xml and 
%CATALINA_HOME%\conf\[engine]\[host]\manager.xml, and there are no 
valves defined in these. There is only a single Context defined in 
%CATALINA_HOME%\conf\context.xml, and there are no valves in it. There 
are no META-INF folders in any web app, and there are no XML files in 
the appBase folder. There are no defaultCOntext elements defined in 
server.xml. In short, the above valve has to be the only thing 
defining access by IP address for all my web apps.


Yet I can navigate to any web app from IP addresses other than the one 
specified in the valve. The valve has no discernible effect. I also 
tried deny=".*" and again there was no restriction applied.


I should mention that I can't actually test this from outside my 
network at the moment, but I'm trying two things that I believe should 
cause the IP address to fail to match the allow pattern:


1. I navigate to my router's WAN address. Thus I should be hitting 
Tomcat with an IP address that is not localhost and is not the one 
defined in the valve.


2. I navigate to 192.168.1.2 (the internal address of the machine 
running Tomcat) from 192.168.1.4 (the internal address of another 
computer). Both of these computers are behind my NATd firewall, and 
192.168.1.4 is not the address in the allow attribute.


Am I missing something about what address gets presented to Tomcat in 
these scenarios, or am I missing something really basic about how this 
valve is supposed to work?


-Mark





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



Re: Resizing JPEG Images

2005-09-19 Thread Wendy Smoak

From: "Justin Jaynes" <[EMAIL PROTECTED]>


I am accepting JPEG uploads on a website I developed
in JSP and  Java Beans.  It all runs on Tomcat.

I once knew of a Java Bean that would accept a JPEG
and scale and resize the image and save it.  I need my
web-app to resize the images as it accpets them.


Take a look at Marco Schmidt's site:
http://schmidt.devlib.org/java/save-jpeg-thumbnail.html
http://schmidt.devlib.org/java/save-screenshot.html

--
Wendy Smoak


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



SOAP on TOMCAT 5.0

2005-09-19 Thread niladri.gupta

Hi Guys,



Some help required on using SOAP on Tomcat 5.0.



I need to configure SOAP 2.3.1 with Tomcat 5.0 locally on my machine.



Following are the things I did:

1) Copied the soap.war file under the webapps directory.

2)Set the class paths in my system

3) copied the latest version of activation.jar,mail.jar and
xercesImpl.jar onto the lib directory of tomcat

I am able to get the soap home page: http://localhost:8080/soap

I am also able to Run the admin tool and deploy a sample webservice
using the admin tool.

Also the the webservice is listed as a deployed component.



NOTE: Right now I am running the service and client from same server.
However the problem persisted when I used different servers(Tomcat
again) on different machines as well.



As I see this leads to the creation of DeployedServices.ds xml
descriptor on soap folder in tomcat.



Yet I am not able to deploy the service through command line neither am
I able to run the client program through command line.

Both these actions throw the same error messages:

java.lang.UnsupportedClassVersion error: org/w3c/dom/Node (unsupported
major.minor version 48.0)



As I understand this is because default dom api's in Tomcat are older
versions which support Level 1 parsing.

However all latest apis which might be used by SOAP are Level3 based.

Hence I included the xml-apis.jar and xercesImpl.jar in the
/common/endorsed directory in Tomcat. This is supposed to override the
use of default jars.

Still I am getting the same error.



Is there something else I am missing too. Any sort of help on this
welcome.

Just wanted to give it another shot else I need to reinstall the latest
version on Tomcat that is supposed to be free from this error





Thanks

Niladri







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Multiple SSL certificate on tomcat

2005-09-19 Thread Arvind Saxena
Hi,
I would like to know more about how the multiple
Verisign certificate will work with Tomcat 5.0.25.

I'v taken 2 diffrent Verisign SSL certificate for
tomcat.
Example:

[1] a.mysite.com
[2] b.secondsite.com

After that i'd imported above certificate to keystore.

When I'm calling https://a.mysite.com:8443 or
https://b.secondsite.com:8443 == I'm getting Tomcat
default certificate, which is I'd created as per
SSL-howto docs.

can we host multiple SSL id Like Mircosoft IIS?

regards





__ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 


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



Re: SOAP on TOMCAT 5.0

2005-09-19 Thread Hardik Tank
hi,

u will get "unsupported major.minor version 48.0"
error when ur code has been compiled using higher
version of JDK (may be 1.5) and u r running it using
lower version of JDK/JRE (may be 1.4)

check ur setup and JRE/JDK once again.

rgds,
Hardik Tank


--- [EMAIL PROTECTED] wrote:

> 
> Hi Guys,
> 
> 
> 
> Some help required on using SOAP on Tomcat 5.0.
> 
> 
> 
> I need to configure SOAP 2.3.1 with Tomcat 5.0
> locally on my machine.
> 
> 
> 
> Following are the things I did:
> 
> 1) Copied the soap.war file under the webapps
> directory.
> 
> 2)Set the class paths in my system
> 
> 3) copied the latest version of
> activation.jar,mail.jar and
> xercesImpl.jar onto the lib directory of tomcat
> 
> I am able to get the soap home page:
> http://localhost:8080/soap
> 
> I am also able to Run the admin tool and deploy a
> sample webservice
> using the admin tool.
> 
> Also the the webservice is listed as a deployed
> component.
> 
> 
> 
> NOTE: Right now I am running the service and client
> from same server.
> However the problem persisted when I used different
> servers(Tomcat
> again) on different machines as well.
> 
> 
> 
> As I see this leads to the creation of
> DeployedServices.ds xml
> descriptor on soap folder in tomcat.
> 
> 
> 
> Yet I am not able to deploy the service through
> command line neither am
> I able to run the client program through command
> line.
> 
> Both these actions throw the same error messages:
> 
> java.lang.UnsupportedClassVersion error:
> org/w3c/dom/Node (unsupported
> major.minor version 48.0)
> 
> 
> 
> As I understand this is because default dom api's in
> Tomcat are older
> versions which support Level 1 parsing.
> 
> However all latest apis which might be used by SOAP
> are Level3 based.
> 
> Hence I included the xml-apis.jar and xercesImpl.jar
> in the
> /common/endorsed directory in Tomcat. This is
> supposed to override the
> use of default jars.
> 
> Still I am getting the same error.
> 
> 
> 
> Is there something else I am missing too. Any sort
> of help on this
> welcome.
> 
> Just wanted to give it another shot else I need to
> reinstall the latest
> version on Tomcat that is supposed to be free from
> this error
> 
> 
> 
> 
> 
> Thanks
> 
> Niladri
> 
> 
> 
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message
> and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may
> contain confidential or privileged information. If
> you are not the intended recipient, please notify
> the sender at Wipro or [EMAIL PROTECTED]
> immediately
> and destroy all copies of this message and any
attachments.




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



RE: Remote Address Valve Lets Everything Through

2005-09-19 Thread KEREM ERKAN
Hi Mark,

Is it possible that you may have mistyped allow="xxx.xxx.xxx.xxx" as
allow="xxx.xxx.xxx.xxx  in your configuration? If you did not accidentally
delete the (") from the right hand side of allow when sending to the list,
that may be your problem.

> -Original Message-
> From: Mark Leone [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 20, 2005 6:58 AM
> To: Tomcat Users List
> Subject: Re: Remote Address Valve Lets Everything Through
> 
> The asterisks in the valve below are an artifact of the way I 
> did my cut and paste. The actual valve appears as follows in 
> server.xml
> 
>  allow="xxx..xxx.xxx.xxx/> // actual IP address not shown
> 
> -Mark
>