Re: Using servlet and mysql

2007-05-29 Thread Foo Shyn

Hi,

Is your login name and password correct? It shows 'root' and the 
password is 'root' in the code you posted there.


- I put the database name, teh in directory catalina_home\webapps\ROOT\
hmm i can't really get what you meant here.

Thanx.
FooShyn

Teh Noranis Mohd Aris wrote:

Dear All,
   
  I already put mysql database driver (jar file) in directory catalina_home\common\lib and changed 8080 to 3306 but I got the error "java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect". What should be the matter? I put the database name, teh in directory catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put the database name? Please help. I'm running out of time! Thank you so much.
   
  Yours Sincerely,

  TEH

Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

You'll need to get the MySQL database driver and put them in the 
{catalina_home}\common\lib folder. The driver can be easily obtained 
through MySQL site.
BTW, as far as i know, the default port for MySQL database is 3306, so 
you might wanna change that. 8080 is for Tomcat, not the database.


Seems like not many new users of connection pooling went through 
Apache's documents. Please don't waste their effort, take a look at it 
before you start to attempt anything.


HTH,
FooShyn

Teh Noranis Mohd Aris wrote:
  

Thank you so much for the reply. I've put "jdbc:mysql://localhost:8080/teh but 
I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very 
new to using mysql database and servlet. Can you please explain to me how to create 
the database name and its fields? Should I install any driver? How can it be done? 
Please help. Thank you.

Yours Sincerely,
TEH 


Foo Shyn wrote:
Hi,

 would be ur database port, xxx will be ur database name

HTH
FooShyn

Teh Noranis Mohd Aris wrote:



Hi,

I would like to access mysql database from a servlet but I'm not sure what to initialize for the String 
connectionURL marked as "jdbc:mysql://localhost:/xxx" in the program below. I got this program 
from the internet which I would like to run in my computer. Can anyone please explain to me what the 
parameters "" and "xxx" should be?

Yours Sincerely,
TEH

Following is part of the program:
...
public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException{

response.setContentType("text/html");
PrintWriter pw = response.getWriter();
String connectionURL = "jdbc:mysql://localhost:/xxx";
Connection connection=null;
try{
String username = request.getParameter("username");
String password = request.getParameter("password");
pw.println(username);
pw.println(password);
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "root");
PreparedStatement pst = connection.prepareStatement
("insert into login_table values(?,?)");
...


-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. 




No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Shape Yahoo! in your own image. Join our Network Research Panel today!



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using servlet and mysql

2007-05-29 Thread Teh Noranis Mohd Aris
Yes, the login name and password are correct. I created the database name, teh, 
with field username and password, using Microsoft Works Database and saved it 
in directory catalina_home\webapps\ROOT\. I'm not sure whether it is the 
correct directory to put the database. However, in the program there was a 
statement .(insert into login_table values(?,?)"); I do not understand the 
usage of login_table. Does it mean that I should create login_table in database 
teh? Really need to get this working today. Please help. Thank you.
   
  TEH
 

Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

Is your login name and password correct? It shows 'root' and the 
password is 'root' in the code you posted there.

- I put the database name, teh in directory catalina_home\webapps\ROOT\
hmm i can't really get what you meant here.

Thanx.
FooShyn

Teh Noranis Mohd Aris wrote:
> Dear All,
> 
> I already put mysql database driver (jar file) in directory 
> catalina_home\common\lib and changed 8080 to 3306 but I got the error 
> "java.sql.SQLException: Unable to connect to any hosts due to exception: 
> java.net.ConnectException: Connection refused: connect". What should be the 
> matter? I put the database name, teh in directory 
> catalina_home\webapps\ROOT\. Is this correct? In which directory should I 
> actually put the database name? Please help. I'm running out of time! Thank 
> you so much.
> 
> Yours Sincerely,
> TEH
>
> Foo Shyn wrote:
> Hi,
>
> You'll need to get the MySQL database driver and put them in the 
> {catalina_home}\common\lib folder. The driver can be easily obtained 
> through MySQL site.
> BTW, as far as i know, the default port for MySQL database is 3306, so 
> you might wanna change that. 8080 is for Tomcat, not the database.
>
> Seems like not many new users of connection pooling went through 
> Apache's documents. Please don't waste their effort, take a look at it 
> before you start to attempt anything.
>
> HTH,
> FooShyn
>
> Teh Noranis Mohd Aris wrote:
> 
>> Thank you so much for the reply. I've put "jdbc:mysql://localhost:8080/teh 
>> but I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. 
>> I'm very new to using mysql database and servlet. Can you please explain to 
>> me how to create the database name and its fields? Should I install any 
>> driver? How can it be done? Please help. Thank you.
>>
>> Yours Sincerely,
>> TEH 
>>
>> Foo Shyn wrote:
>> Hi,
>>
>>  would be ur database port, xxx will be ur database name
>>
>> HTH
>> FooShyn
>>
>> Teh Noranis Mohd Aris wrote:
>>
>> 
>>> Hi,
>>>
>>> I would like to access mysql database from a servlet but I'm not sure what 
>>> to initialize for the String connectionURL marked as 
>>> "jdbc:mysql://localhost:/xxx" in the program below. I got this program 
>>> from the internet which I would like to run in my computer. Can anyone 
>>> please explain to me what the parameters "" and "xxx" should be?
>>>
>>> Yours Sincerely,
>>> TEH
>>>
>>> Following is part of the program:
>>> ...
>>> public void doPost(HttpServletRequest request, HttpServletResponse 
>>> response) throws ServletException, IOException{
>>> response.setContentType("text/html");
>>> PrintWriter pw = response.getWriter();
>>> String connectionURL = "jdbc:mysql://localhost:/xxx";
>>> Connection connection=null;
>>> try{
>>> String username = request.getParameter("username");
>>> String password = request.getParameter("password");
>>> pw.println(username);
>>> pw.println(password);
>>> Class.forName("com.mysql.jdbc.Driver").newInstance();
>>> connection = DriverManager.getConnection(connectionURL, "root", "root");
>>> PreparedStatement pst = connection.prepareStatement
>>> ("insert into login_table values(?,?)");
>>> ...
>>>
>>>
>>> -
>>> Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's 
>>> on, when. 
>>>
>>> 
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition. 
>>> Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 
>>> 3:05 PM
>>>
>>>
>>> 
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>> -
>> Shape Yahoo! in your own image. Join our Network Research Panel today!
>>
>> 
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition. 
>> Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 
>> 3:05 PM
>>
>> 
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Re: Using servlet and mysql

2007-05-29 Thread Foo Shyn

Hi,

This is getting more confusing, you mentioned earlier that you're using 
MySQL but now it is a Microsoft Works Database. Hmmm perhaps i'm missing 
something?


Anyway, if the database you're using is something like an Access 
database, you'll just need to use the correct driver and point the URL 
to your database file. Can't help you here coz i never tried that before 
(Access is like from another world to me). Perhaps you should try other 
mailing list, and not Tomcat's.


HTH
FooShyn

Teh Noranis Mohd Aris wrote:

Yes, the login name and password are correct. I created the database name, teh, with 
field username and password, using Microsoft Works Database and saved it in 
directory catalina_home\webapps\ROOT\. I'm not sure whether it is the correct 
directory to put the database. However, in the program there was a statement 
.(insert into login_table values(?,?)"); I do not understand the usage of 
login_table. Does it mean that I should create login_table in database teh? Really 
need to get this working today. Please help. Thank you.
   
  TEH
 


Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

Is your login name and password correct? It shows 'root' and the 
password is 'root' in the code you posted there.


- I put the database name, teh in directory catalina_home\webapps\ROOT\
hmm i can't really get what you meant here.

Thanx.
FooShyn

Teh Noranis Mohd Aris wrote:
  

Dear All,

I already put mysql database driver (jar file) in directory catalina_home\common\lib and 
changed 8080 to 3306 but I got the error "java.sql.SQLException: Unable to connect 
to any hosts due to exception: java.net.ConnectException: Connection refused: 
connect". What should be the matter? I put the database name, teh in directory 
catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put 
the database name? Please help. I'm running out of time! Thank you so much.

Yours Sincerely,
TEH

Foo Shyn wrote:
Hi,

You'll need to get the MySQL database driver and put them in the 
{catalina_home}\common\lib folder. The driver can be easily obtained 
through MySQL site.
BTW, as far as i know, the default port for MySQL database is 3306, so 
you might wanna change that. 8080 is for Tomcat, not the database.


Seems like not many new users of connection pooling went through 
Apache's documents. Please don't waste their effort, take a look at it 
before you start to attempt anything.


HTH,
FooShyn

Teh Noranis Mohd Aris wrote:



Thank you so much for the reply. I've put "jdbc:mysql://localhost:8080/teh but 
I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very 
new to using mysql database and servlet. Can you please explain to me how to create 
the database name and its fields? Should I install any driver? How can it be done? 
Please help. Thank you.

Yours Sincerely,
TEH 


Foo Shyn wrote:
Hi,

 would be ur database port, xxx will be ur database name

HTH
FooShyn

Teh Noranis Mohd Aris wrote:


  

Hi,

I would like to access mysql database from a servlet but I'm not sure what to initialize for the String 
connectionURL marked as "jdbc:mysql://localhost:/xxx" in the program below. I got this program 
from the internet which I would like to run in my computer. Can anyone please explain to me what the 
parameters "" and "xxx" should be?

Yours Sincerely,
TEH

Following is part of the program:
...
public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException{

response.setContentType("text/html");
PrintWriter pw = response.getWriter();
String connectionURL = "jdbc:mysql://localhost:/xxx";
Connection connection=null;
try{
String username = request.getParameter("username");
String password = request.getParameter("password");
pw.println(username);
pw.println(password);
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "root");
PreparedStatement pst = connection.prepareStatement
("insert into login_table values(?,?)");
...


-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. 




No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Shape Yahoo! in your own image. Join our Network Research Panel today!



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM




Re: Using servlet and mysql

2007-05-29 Thread Teh Noranis Mohd Aris
I'm very new to this. This is the first time I'm using mysql and servlet. I 
might be doing a lot of mistakes. I realized that I should not use Microsoft 
Works Database. How can I actually create the database name, table and its 
field using mysql? In which directory should I put the database? Please 
explain. Hoping for a reply. I really hope this simple program can run today. 
Thank you.
   
  TEH

Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

This is getting more confusing, you mentioned earlier that you're using 
MySQL but now it is a Microsoft Works Database. Hmmm perhaps i'm missing 
something?

Anyway, if the database you're using is something like an Access 
database, you'll just need to use the correct driver and point the URL 
to your database file. Can't help you here coz i never tried that before 
(Access is like from another world to me). Perhaps you should try other 
mailing list, and not Tomcat's.

HTH
FooShyn

Teh Noranis Mohd Aris wrote:
> Yes, the login name and password are correct. I created the database name, 
> teh, with field username and password, using Microsoft Works Database and 
> saved it in directory catalina_home\webapps\ROOT\. I'm not sure whether it is 
> the correct directory to put the database. However, in the program there was 
> a statement .(insert into login_table values(?,?)"); I do not understand 
> the usage of login_table. Does it mean that I should create login_table in 
> database teh? Really need to get this working today. Please help. Thank you.
> 
> TEH
> 
>
> Foo Shyn wrote:
> Hi,
>
> Is your login name and password correct? It shows 'root' and the 
> password is 'root' in the code you posted there.
>
> - I put the database name, teh in directory catalina_home\webapps\ROOT\
> hmm i can't really get what you meant here.
>
> Thanx.
> FooShyn
>
> Teh Noranis Mohd Aris wrote:
> 
>> Dear All,
>>
>> I already put mysql database driver (jar file) in directory 
>> catalina_home\common\lib and changed 8080 to 3306 but I got the error 
>> "java.sql.SQLException: Unable to connect to any hosts due to exception: 
>> java.net.ConnectException: Connection refused: connect". What should be the 
>> matter? I put the database name, teh in directory 
>> catalina_home\webapps\ROOT\. Is this correct? In which directory should I 
>> actually put the database name? Please help. I'm running out of time! Thank 
>> you so much.
>>
>> Yours Sincerely,
>> TEH
>>
>> Foo Shyn wrote:
>> Hi,
>>
>> You'll need to get the MySQL database driver and put them in the 
>> {catalina_home}\common\lib folder. The driver can be easily obtained 
>> through MySQL site.
>> BTW, as far as i know, the default port for MySQL database is 3306, so 
>> you might wanna change that. 8080 is for Tomcat, not the database.
>>
>> Seems like not many new users of connection pooling went through 
>> Apache's documents. Please don't waste their effort, take a look at it 
>> before you start to attempt anything.
>>
>> HTH,
>> FooShyn
>>
>> Teh Noranis Mohd Aris wrote:
>>
>> 
>>> Thank you so much for the reply. I've put "jdbc:mysql://localhost:8080/teh 
>>> but I got the error java.lang.ClassNotFoundException: 
>>> com.mysql.jdbc.Driver. I'm very new to using mysql database and servlet. 
>>> Can you please explain to me how to create the database name and its 
>>> fields? Should I install any driver? How can it be done? Please help. Thank 
>>> you.
>>>
>>> Yours Sincerely,
>>> TEH 
>>>
>>> Foo Shyn wrote:
>>> Hi,
>>>
>>>  would be ur database port, xxx will be ur database name
>>>
>>> HTH
>>> FooShyn
>>>
>>> Teh Noranis Mohd Aris wrote:
>>>
>>>
>>> 
 Hi,

 I would like to access mysql database from a servlet but I'm not sure what 
 to initialize for the String connectionURL marked as 
 "jdbc:mysql://localhost:/xxx" in the program below. I got this program 
 from the internet which I would like to run in my computer. Can anyone 
 please explain to me what the parameters "" and "xxx" should be?

 Yours Sincerely,
 TEH

 Following is part of the program:
 ...
 public void doPost(HttpServletRequest request, HttpServletResponse 
 response) throws ServletException, IOException{
 response.setContentType("text/html");
 PrintWriter pw = response.getWriter();
 String connectionURL = "jdbc:mysql://localhost:/xxx";
 Connection connection=null;
 try{
 String username = request.getParameter("username");
 String password = request.getParameter("password");
 pw.println(username);
 pw.println(password);
 Class.forName("com.mysql.jdbc.Driver").newInstance();
 connection = DriverManager.getConnection(connectionURL, "root", "root");
 PreparedStatement pst = connection.prepareStatement
 ("insert into login_table values(?,?)");
 ...


 -
 Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's 
 on, when. 

 ---

Re: Using servlet and mysql

2007-05-29 Thread Foo Shyn

Hi,

In short, to get a MySQL server up, try the following:
1) Install an instance of MySQL
2) Install the client software (you can get them from the MySQL web site 
too, like MySQL Administrator etc or you can try the MySQL Front for 
older version of MySQL)

3) Create a database using the client software.
4) Put the MySQL drivers in the common\lib folder(if you want it to be 
global) or in your WEB-INF\lib folder (if you want it to be local)

5) Run the Tomcat, try your code

Not sure whether this is good enough, perhaps someone with better 
explanation skill can explain it better than me.

Remember google is always your best friend. :)

HTH,
FooShyn

Teh Noranis Mohd Aris wrote:

I'm very new to this. This is the first time I'm using mysql and servlet. I 
might be doing a lot of mistakes. I realized that I should not use Microsoft 
Works Database. How can I actually create the database name, table and its 
field using mysql? In which directory should I put the database? Please 
explain. Hoping for a reply. I really hope this simple program can run today. 
Thank you.
   
  TEH


Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

This is getting more confusing, you mentioned earlier that you're using 
MySQL but now it is a Microsoft Works Database. Hmmm perhaps i'm missing 
something?


Anyway, if the database you're using is something like an Access 
database, you'll just need to use the correct driver and point the URL 
to your database file. Can't help you here coz i never tried that before 
(Access is like from another world to me). Perhaps you should try other 
mailing list, and not Tomcat's.


HTH
FooShyn

Teh Noranis Mohd Aris wrote:
  

Yes, the login name and password are correct. I created the database name, teh, with 
field username and password, using Microsoft Works Database and saved it in 
directory catalina_home\webapps\ROOT\. I'm not sure whether it is the correct 
directory to put the database. However, in the program there was a statement 
.(insert into login_table values(?,?)"); I do not understand the usage of 
login_table. Does it mean that I should create login_table in database teh? Really 
need to get this working today. Please help. Thank you.

TEH


Foo Shyn wrote:
Hi,

Is your login name and password correct? It shows 'root' and the 
password is 'root' in the code you posted there.


- I put the database name, teh in directory catalina_home\webapps\ROOT\
hmm i can't really get what you meant here.

Thanx.
FooShyn

Teh Noranis Mohd Aris wrote:



Dear All,

I already put mysql database driver (jar file) in directory catalina_home\common\lib and 
changed 8080 to 3306 but I got the error "java.sql.SQLException: Unable to connect 
to any hosts due to exception: java.net.ConnectException: Connection refused: 
connect". What should be the matter? I put the database name, teh in directory 
catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put 
the database name? Please help. I'm running out of time! Thank you so much.

Yours Sincerely,
TEH

Foo Shyn wrote:
Hi,

You'll need to get the MySQL database driver and put them in the 
{catalina_home}\common\lib folder. The driver can be easily obtained 
through MySQL site.
BTW, as far as i know, the default port for MySQL database is 3306, so 
you might wanna change that. 8080 is for Tomcat, not the database.


Seems like not many new users of connection pooling went through 
Apache's documents. Please don't waste their effort, take a look at it 
before you start to attempt anything.


HTH,
FooShyn

Teh Noranis Mohd Aris wrote:


  

Thank you so much for the reply. I've put "jdbc:mysql://localhost:8080/teh but 
I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very 
new to using mysql database and servlet. Can you please explain to me how to create 
the database name and its fields? Should I install any driver? How can it be done? 
Please help. Thank you.

Yours Sincerely,
TEH 


Foo Shyn wrote:
Hi,

 would be ur database port, xxx will be ur database name

HTH
FooShyn

Teh Noranis Mohd Aris wrote:





Hi,

I would like to access mysql database from a servlet but I'm not sure what to initialize for the String 
connectionURL marked as "jdbc:mysql://localhost:/xxx" in the program below. I got this program 
from the internet which I would like to run in my computer. Can anyone please explain to me what the 
parameters "" and "xxx" should be?

Yours Sincerely,
TEH

Following is part of the program:
...
public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException{

response.setContentType("text/html");
PrintWriter pw = response.getWriter();
String connectionURL = "jdbc:mysql://localhost:/xxx";
Connection connection=null;
try{
String username = request.getParameter("username");
String password = request.getParameter("password");
pw.println(username);
pw.println(password);
Class.forName("com.mysql.jdbc.D

Re: Using servlet and mysql

2007-05-29 Thread De Haan Software Engineering


Access databases can only be accessed by ODBC (default present at 
2000 / XP). MySQL has nothing to do with it.


1)  First create your Access database (.mdb, I don't know what a 
Works database is?). It may be placed anywhere on your Tomcat Server.


2) Then configure it for usage by ODBC. Click Start -> Run: 
%SystemRoot%\system32\odbcad32.exe
In the tab System-DSN make a new entry (I hope I translate well from 
Dutch here).

2a)  Give the entry a free-choosable unique name, for instance 'MyDatabase'
2b) Specify the path to the database you created in step 1)

3) Attach to the driver using:
// Load the driver, at some Virtual Machines
// newInstance() appears to be necessary
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();

4) Connect to the database using:
Connection newConnection = DriverManager.getConnection( 
"jdbc:odbc:MyDatabase" );


Note: Microsoft - as usual - implemented some differences in SQL-syntax!

Sije de Haan,
Netherlands

At 09:59 29-5-2007, you wrote:

Hi,

This is getting more confusing, you mentioned earlier that you're 
using MySQL but now it is a Microsoft Works Database. Hmmm perhaps 
i'm missing something?


Anyway, if the database you're using is something like an Access 
database, you'll just need to use the correct driver and point the 
URL to your database file. Can't help you here coz i never tried 
that before (Access is like from another world to me). Perhaps you 
should try other mailing list, and not Tomcat's.


HTH
FooShyn

Teh Noranis Mohd Aris wrote:
Yes, the login name and password are correct. I created the 
database name, teh, with field username and password, using 
Microsoft Works Database and saved it in directory 
catalina_home\webapps\ROOT\. I'm not sure whether it is the correct 
directory to
put the database. However, in the program there was a statement 
.(insert into login_table values(?,?)"); I do not understand the 
usage of login_table. Does it mean that I should create login_table 
in database teh? Really need to get this working to

day. Please help. Thank you.


  TEH


Foo Shyn <[EMAIL PROTECTED]> wrote:
  Hi,

Is your login name and password correct? It shows 'root' and the 
password is 'root' in the code you posted there.


- I put the database name, teh in directory catalina_home\webapps\ROOT\
hmm i can't really get what you meant here.

Thanx.
FooShyn

Teh Noranis Mohd Aris wrote:


Dear All,

I already put mysql database driver (jar file) in directory 
catalina_home\common\lib and changed 8080 to 3306 but I got the 
error "java.sql.SQLException: Unable to connect to any hosts due 
to exception: java.net.ConnectException: Connection refused:
connect". What should be the matter? I put the database name, teh in 
directory catalina_home\webapps\ROOT\. Is this correct? In which 
directory should I actually put the database name? Please help. I'm 
running out of time! Thank you so much.


Yours Sincerely,
TEH

Foo Shyn wrote:
Hi,

You'll need to get the MySQL database driver and put them in the 
{catalina_home}\common\lib folder. The driver can be easily 
obtained through MySQL site.
BTW, as far as i know, the default port for MySQL database is 
3306, so you might wanna change that. 8080 is for Tomcat, not the database.


Seems like not many new users of connection pooling went through 
Apache's documents. Please don't waste their effort, take a look 
at it before you start to attempt anything.


HTH,
FooShyn

Teh Noranis Mohd Aris wrote:


Thank you so much for the reply. I've put 
"jdbc:mysql://localhost:8080/teh but I got the error 
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very 
new to using mysql database and servlet. Can you please explain 
to me how to create the
database name and its fields? Should I install any driver? How can 
it be done? Please help. Thank you.


Yours Sincerely,
TEH
Foo Shyn wrote:
Hi,

 would be ur database port, xxx will be ur database name

HTH
FooShyn

Teh Noranis Mohd Aris wrote:




Hi,

I would like to access mysql database from a servlet but I'm not 
sure what to initialize for the String connectionURL marked as 
"jdbc:mysql://localhost:/xxx" in the program below. I got 
this program from the internet which I would like to run i
n my computer. Can anyone please explain to me what the parameters 
"" and "xxx" should be?


Yours Sincerely,
TEH

Following is part of the program:
...
public void doPost(HttpServletRequest request, 
HttpServletResponse response) throws ServletException, IOException{

response.setContentType("text/html");
PrintWriter pw = response.getWriter();
String connectionURL = "jdbc:mysql://localhost:/xxx";
Connection connection=null;
try{
String username = request.getParameter("username");
String password = request.getParameter("password");
pw.println(username);
pw.println(password);
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "root");
PreparedStatement pst = connect

RE: Web application receives request parameters sent to another application on Tomcat 6

2007-05-29 Thread Reich, Matthias
Hi,

I am experiencing a behavior that may be related to the mentioned
problem.

My Servlet uses the Comet interfaces of Tomcat 6.
For debugging purposes, when my Servlet receives a BEGIN event, it
stores a request counter in an atttribute of the HttpServletRequest
object.
(This is done to see in the logs to which request a subsequent READ, END
or ERROR event is related.)

Before setting the attribute, the servlet checks whether the attribute
is already set:

if (event.getEventType() == CometEvent.EventType.BEGIN)
{
 HttpServletRequest request = event.getHttpServletRequest( );
 Long index = (Long) request.getAttribute(INDEX_ATTRIBUTE);
 if (index == null)
 {
 index = nextRequestIndex(); 
 request.setAttribute(INDEX_ATTRIBUTE, index);
 requestCount++;
 }
 else
 {
 myLogger.warn("Found old request attribute ("
 + index + ") in BEGIN event!");
 }
 ...

When running tests where several requests are processed at the same
time, I occasionally see the log message appear.

It looks as if sometimes recycling of a request object is not yet
completed when the object is already reused for a new request.
I cannot tell if a similar behavior occurs in my tests also for request
parameters because my tests don't pay much attention on the parameters.

The 'old attributes' problem occurs as well with the APR connector as
with the NIO connector, and I guess that also the 'wrong request
parameters' problem only occurs with these two connectors, as they are
prepared to handle Comet requests and therefore have a modified request
processing (compared to the Http11Processor) also for 'regular' servlet
requests.

What connector are you using with Tomcat 6?

If it is the APR connector (i.e. if you have the tcnative-1 library in
your library path), you could try if the problem disappears when you
switch to the Http11Protocol.


Matthias


> -Original Message-
> From: Dejan Krsmanovic [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 29, 2007 8:13 AM
> To: Tomcat Users List
> Subject: Re: Web application receives request parameters sent 
> to another application on Tomcat 6
> 
> I am aware of that. We are printing request parameters inside 
> Servlet's
> doPost method.
> 
> Dejan
> 
> Len Popp wrote:
> > It is possible that Tomcat resuses request objects. I'm not sure it
> > does, but it might. For that reason, you're only allowed to use the
> > request object in your servlet's doGet or doPost method, you can't
> > stash it somewhere (e.g. in the HttpSession) and access it later.
> > (This is mentioned in the servlet spec.) Of course I don't know if
> > that's your problem, it's just something that came to mind.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing ISAPI redirect for IIS

2007-05-29 Thread Peter Crowther
> From: Al Sparks [mailto:[EMAIL PROTECTED] 
> Is there an even better way of doing this?

jk2's been unsupported for a couple of years; jk is probably a safer
bet.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Comet example

2007-05-29 Thread Bernd Winterstein

Hi,
I'm trying to set up a prototype for a web page which asynchronous
notification via comet. The szenario is to show some information upon an
incoming phone call.

My idea is that the telecom server will send an event via webservice to the
webapp, which then notifies the browser.

Is there an example or howto somewhere which i can use. Maybe someone here
has done this before. It's terribly difficult to find some helpful
information on the topic.


Regards,
Bernd


Re: Unconnected sockets not implemented

2007-05-29 Thread Nencho Lupanov

hi Mark,

i was having problems on configuring ssl on the client.It is ok now.Thanks.
Nencho


2007/5/29, Mark Thomas <[EMAIL PROTECTED]>:


Nencho Lupanov wrote:
> any idea?
OS?
Tomcat version?
Steps you followed to configure SSL?
Full stack trace?

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Admin config

2007-05-29 Thread Albert Shih
 Le 28/05/2007 à 17:12:29+0200, Mikolaj Rydzewski a écrit
>  Albert Shih wrote:
> > I've install from ports (FreeBSD) the tomcat 5.5 (need by my 
> > web-applications).
> >   
Thanks for you answer.

>  Forget this one. The best and easiest way is:

Best maybe (if you say that I can trust you), but easiest I don't agree.
The ports system on FreeBSD is fantastic thing to install any soft.

But I can try the «standard» install.

>1. install java ;-)

Done.

>2. create account dedicated for tomcat

Done.

>3. download tar.gz from tomcat website, unpack, configure according
>   to guide on web site

On the webpage the're other packages :

# apache-tomcat-[version]-compat.zip or .tar.gz: required in addition to
# the base distro for using tomcat with a Java 1.4 environment.

I think I don't need this because I run jdk 1.5 but what is : 

# apache-tomcat-[version]-deployer.zip or .tar.gz: the standalone Tomcat
# Web Application Deployer.

and :

# apache-tomcat-[version]-embed.zip or .tar.gz: for using Tomcat only as an
# embedded servlet container.

(Remenber : I'm really newbie...sorry if that question is stupid, in fact
it's not the question but me...)

>4. deploy webapps
>5. either you're done or setup apache 2.2 server and setup mod_proxy_ajp

What's the advantage to install a apache ? 

Regards.


--
Albert SHIH
Observatoire de Paris Meudon
SIO batiment 15
Heure local/Local time:
Mar 29 mai 2007 11:52:58 CEST

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat comet, not working...

2007-05-29 Thread Márton Szabolcs


Hi!

Ive been trying to use tomcat comet for about a week, but i have no success.

I have tomcat 6.0.13, with windows xp. I install the tomcat, change the 
server.xml connector tag to NIO connector type. Test the chat example, and 
another example (push a date to the client every x sec.) 

But its seems that comet is not working.
If i implement the servlet service method, it is runned. And its run like a 
normal servlet (I implement the CometProcessor, and i have the event method!!)
If i no implement the service method, my browser says "this url.. cannot 
acces... GET methdod) or something like this. 
So it is never get processed like a comet request.

What else do i need?
what is wrong? 

i tryed without js client. When i call servlet, it will not close the 
connection, just keep. so its should work. 

I search google all around the world, nothing found, not even a working example.

Please help me...

thanks 
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez kapja a 
maga könyvét.
http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm


Re: tomcat comet, not working...

2007-05-29 Thread Filip Hanik - Dev Lists
if your service method is invoked means you are not running the correct 
connector.


You must run the NIO or the APR connector.
take a look at the "protocol" attribute in
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

Filip

Márton Szabolcs wrote:


Hi!

Ive been trying to use tomcat comet for about a week, but i have no 
success.


I have tomcat 6.0.13, with windows xp. I install the tomcat, change 
the server.xml connector tag to NIO connector type. Test the chat 
example, and another example (push a date to the client every x sec.)


But its seems that comet is not working.
If i implement the servlet service method, it is runned. And its run 
like a normal servlet (I implement the CometProcessor, and i have the 
event method!!)
If i no implement the service method, my browser says "this url.. 
cannot acces... GET methdod) or something like this.

So it is never get processed like a comet request.

What else do i need?
what is wrong?

i tryed without js client. When i call servlet, it will not close the 
connection, just keep. so its should work.


I search google all around the world, nothing found, not even a 
working example.


Please help me...

thanks
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez 
kapja a maga könyvét.

http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 
5/27/2007 3:05 PM



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Bernd Winterstein

Can you send me your examples?

Bernd


2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:


if your service method is invoked means you are not running the correct
connector.

You must run the NIO or the APR connector.
take a look at the "protocol" attribute in
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

Filip

Márton Szabolcs wrote:
>
> Hi!
>
> Ive been trying to use tomcat comet for about a week, but i have no
> success.
>
> I have tomcat 6.0.13, with windows xp. I install the tomcat, change
> the server.xml connector tag to NIO connector type. Test the chat
> example, and another example (push a date to the client every x sec.)
>
> But its seems that comet is not working.
> If i implement the servlet service method, it is runned. And its run
> like a normal servlet (I implement the CometProcessor, and i have the
> event method!!)
> If i no implement the service method, my browser says "this url..
> cannot acces... GET methdod) or something like this.
> So it is never get processed like a comet request.
>
> What else do i need?
> what is wrong?
>
> i tryed without js client. When i call servlet, it will not close the
> connection, just keep. so its should work.
>
> I search google all around the world, nothing found, not even a
> working example.
>
> Please help me...
>
> thanks
> Szabi
>
> 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez
> kapja a maga könyvét.
> http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm
>
>
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date:
> 5/27/2007 3:05 PM


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




SSO session replication within TC 5.5.23 cluster

2007-05-29 Thread ROOKIE
Hi,

I have created a simple TCP cluster of 2 TC 5.5.23 servers and added a Apache 
2.2 (mod_proxy) load balancer in front. Our tomcat has SSO valve enabled.

I wanted to know if TC 5.5.23 supports SSO session replication ? 

Googling tells me that a patch was submitted for this, 
http://fabien.carrion.free.fr/TomcatCluster.html and even the 
catalina-cluster.jar has the ClusterSingleSignOn valve. But TC mailing lists 
suggest that the support is still not complete.

In any case I have not been able to get it working. 

Whenever I use the SSO cookie for authentication I get 401 from all the other 
cluster members (except the one who generated the SSO session id). 

The requested resource is protected and the UserPrincipal found in the 
HttpRequest by the other cluster members is null. I use a customized NTLM 
authenticator which expects a non-null UserPrincipal in the HttpRequest if user 
is already authenticated.

Following is my cluster node in server.xml (embedded in Host node) :












  


   



Any ideas why SSO session replication is not working, is it a configuration 
error or does TC 5.5.23 not support this.



TIA,

Vinod









   
Yahoo!
 oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Márton Szabolcs

Hi! 

i set my connector like this.
it should be correct, isnt it? 




CometSampleServlet
sample.CometSampleServlet


CometSampleServlet
/CometSampleServlet


public class CometSampleServlet 
extends HttpServlet  implements CometProcessor {

protected ArrayList connections = 
new ArrayList();
protected MessageSender sender = null;
 
/**
 */
public void event(CometEvent event) throws IOException, ServletException {
HttpServletRequest request = event.getHttpServletRequest();


   
but my service method still invoked 
is any settings should take?


this example from: 
http://journal.mycom.co.jp/special/2007/tomcat6/014.html
(its japanese, but you could see in the black text areas)

regards,
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez kapja a 
maga könyvét.
http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm


Tomcat Connection pool

2007-05-29 Thread Ligade, Shailesh (Contr) (Mission Systems)
 
Greetings,

I am running Tomcat 5.x, and I have many webapps deployed and working
under tomcat. I want my connection pool to be used from any application.
When I modify server.xml in conf directory to add my connection, listed
below:











   factory

org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName

oracle.jdbc.driver.OracleDriver


   url

jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB


   username
   ROAM_USER


   password
   ngit1234

.



  



  
  


  

  
  

  



And I get following error:


javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown
Source)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
java.lang.reflect.Method.invoke(Method.java:585)

Any idea, what I am doing wrong?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HttpSessionBindingListener not working

2007-05-29 Thread Gregor Schneider

Hi guys,

I'm having a problem getting my HttpSessionBindingListener to work.

The listener gets initialized (System.out in the constructor of the
listener), however, neither valueBound nor valueUnbound gets called.

In my application, the code where I'm storing an attribute to the
session is this:

   hreq.getSession().setAttribute("user", aUserName);
   hreq.getSession().getServletContext().log("user " +
aUserName + " bound to session");

In my log-file is clearly stated that the user got bound to the session:

INFO TP-Processor3
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SingleSignOnCLUE]
- user genre bound to session

This is the code of the listener:

package com.cr.web.sso;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;

public class AuthenticationListener implements HttpSessionBindingListener {

public AuthenticationListener() {
super();
System.out.println("Listener initiaized");
}

public void valueBound(HttpSessionBindingEvent anEvent) {
HttpSession session = anEvent.getSession();
String user = (String) session.getAttribute("user");
session.getServletContext().log("User added: " + user);
System.out.println("User added: " + user);
}

public void valueUnbound(HttpSessionBindingEvent anEvent) {
HttpSession session = anEvent.getSession();
String user = (String) session.getAttribute("user");
session.getServletContext().log("User removed: " + user);
System.out.println("User removed: " + user);
}
}


And this is my deployment-descriptor:


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>


com.cr.web.sso.AuthenticationListener



SingleSignOn
com.cr.web.sso.SingleSignOn

count_popups
3


popup_0
/BMIWizardCLUE


popup_1
/RRWizardCLUE


popup_2
/HyperlipCLUE


clueuser

clueuser
  


SingleSignOn
/SingleSignOn

   
   403
   /errorPages/403_CLUE.html

   
   404
   /errorPages/404_CLUE.html

   
   408
   /errorPages/408_CLUE.html

   
java.lang.Throwable
/errorPages/generalError_CLUE.html



Protected Area
/*



clueuser

   
   
   FORM
   Clue4Bereich
   

/login_clue/loginForm.html
   /login_clue/error.html
   
   

CLUE-Users
clueuser



I'm realling losing the rest of my hair with this, therefore: Please
hurry with any suggestions b4 I'm getting bald ;)

TIA

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using servlet and mysql

2007-05-29 Thread David Smith
I would actually recommend steering clear of the jdbc-odbc bridge
driver.  It's not stable enough for production use on any level.

Get MySQL (it's free), install it, configure it according to the docs
and setup your db there.  Docs are plentiful on the mysql website.  You
will be much happier with the end result.

--David


De Haan Software Engineering wrote:
>
> Access databases can only be accessed by ODBC (default present at 2000
> / XP). MySQL has nothing to do with it.
>
> 1)  First create your Access database (.mdb, I don't know what a Works
> database is?). It may be placed anywhere on your Tomcat Server.
>
> 2) Then configure it for usage by ODBC. Click Start -> Run:
> %SystemRoot%\system32\odbcad32.exe
> In the tab System-DSN make a new entry (I hope I translate well from
> Dutch here).
> 2a)  Give the entry a free-choosable unique name, for instance
> 'MyDatabase'
> 2b) Specify the path to the database you created in step 1)
>
> 3) Attach to the driver using:
> // Load the driver, at some Virtual Machines
> // newInstance() appears to be necessary
> Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();
>
> 4) Connect to the database using:
> Connection newConnection = DriverManager.getConnection(
> "jdbc:odbc:MyDatabase" );
>
> Note: Microsoft - as usual - implemented some differences in SQL-syntax!
>
> Sije de Haan,
> Netherlands
>
> At 09:59 29-5-2007, you wrote:
>> Hi,
>>
>> This is getting more confusing, you mentioned earlier that you're
>> using MySQL but now it is a Microsoft Works Database. Hmmm perhaps
>> i'm missing something?
>>
>> Anyway, if the database you're using is something like an Access
>> database, you'll just need to use the correct driver and point the
>> URL to your database file. Can't help you here coz i never tried that
>> before (Access is like from another world to me). Perhaps you should
>> try other mailing list, and not Tomcat's.
>>
>> HTH
>> FooShyn
>>
>> Teh Noranis Mohd Aris wrote:
>>> Yes, the login name and password are correct. I created the database
>>> name, teh, with field username and password, using Microsoft Works
>>> Database and saved it in directory catalina_home\webapps\ROOT\. I'm
>>> not sure whether it is the correct directory to
>> put the database. However, in the program there was a statement
>> .(insert into login_table values(?,?)"); I do not understand the
>> usage of login_table. Does it mean that I should create login_table
>> in database teh? Really need to get this working to
>> day. Please help. Thank you.
>>>
>>>  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Bernd Winterstein

This is the example from the tomcat user guide. I have the same problem
getting it to work.

2007/5/29, Márton Szabolcs <[EMAIL PROTECTED]>:



Hi!

i set my connector like this.
it should be correct, isnt it?




   CometSampleServlet
   sample.CometSampleServlet


   CometSampleServlet
   /CometSampleServlet


public class CometSampleServlet
   extends HttpServlet  implements CometProcessor {

   protected ArrayList connections =
   new ArrayList();
   protected MessageSender sender = null;

   /**
*/
   public void event(CometEvent event) throws IOException,
ServletException {
   HttpServletRequest request = event.getHttpServletRequest();



but my service method still invoked
is any settings should take?


this example from:
http://journal.mycom.co.jp/special/2007/tomcat6/014.html
(its japanese, but you could see in the black text areas)

regards,
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez
kapja a maga könyvét.
http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm



Re: Using servlet and mysql

2007-05-29 Thread De Haan Software Engineering


I agree completely. For testing purposes or migration it works. We 
are switching to MySQL asap, but dozens of customers are still using it...


Sije

At 14:38 29-5-2007, you wrote:

I would actually recommend steering clear of the jdbc-odbc bridge
driver.  It's not stable enough for production use on any level.

Get MySQL (it's free), install it, configure it according to the docs
and setup your db there.  Docs are plentiful on the mysql website.  You
will be much happier with the end result.

--David


De Haan Software Engineering wrote:
>
> Access databases can only be accessed by ODBC (default present at 2000
> / XP). MySQL has nothing to do with it.
>
> 1)  First create your Access database (.mdb, I don't know what a Works
> database is?). It may be placed anywhere on your Tomcat Server.
>
> 2) Then configure it for usage by ODBC. Click Start -> Run:
> %SystemRoot%\system32\odbcad32.exe
> In the tab System-DSN make a new entry (I hope I translate well from
> Dutch here).
> 2a)  Give the entry a free-choosable unique name, for instance
> 'MyDatabase'
> 2b) Specify the path to the database you created in step 1)
>
> 3) Attach to the driver using:
> // Load the driver, at some Virtual Machines
> // newInstance() appears to be necessary
> Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();
>
> 4) Connect to the database using:
> Connection newConnection = DriverManager.getConnection(
> "jdbc:odbc:MyDatabase" );
>
> Note: Microsoft - as usual - implemented some differences in SQL-syntax!
>
> Sije de Haan,
> Netherlands
>
> At 09:59 29-5-2007, you wrote:
>> Hi,
>>
>> This is getting more confusing, you mentioned earlier that you're
>> using MySQL but now it is a Microsoft Works Database. Hmmm perhaps
>> i'm missing something?
>>
>> Anyway, if the database you're using is something like an Access
>> database, you'll just need to use the correct driver and point the
>> URL to your database file. Can't help you here coz i never tried that
>> before (Access is like from another world to me). Perhaps you should
>> try other mailing list, and not Tomcat's.
>>
>> HTH
>> FooShyn
>>
>> Teh Noranis Mohd Aris wrote:
>>> Yes, the login name and password are correct. I created the database
>>> name, teh, with field username and password, using Microsoft Works
>>> Database and saved it in directory catalina_home\webapps\ROOT\. I'm
>>> not sure whether it is the correct directory to
>> put the database. However, in the program there was a statement
>> .(insert into login_table values(?,?)"); I do not understand the
>> usage of login_table. Does it mean that I should create login_table
>> in database teh? Really need to get this working to
>> day. Please help. Thank you.
>>>
>>>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ NOD32 2295 (20070529) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl




Re: Admin config

2007-05-29 Thread Albert Shih
 Le 28/05/2007 à 17:04:12+0200, Albert Shih a écrit
> Hi all
> 
> I've a very very newbie on tomcat (first day I try to configure tomcat)...
> 
> I've install from ports (FreeBSD) the tomcat 5.5 (need by my 
> web-applications).
> 
> The applications I need to run is configured by admin tomcat. Well for this
> I've install admin module and it seem everything working (I can acces the
> admin page etc.)
> 
> My problem is I can go the context of my application through the admin
> module, but when I make any changes in the config of my webapps, this changes 
> are loose
> after reboot of the tomcat server. 
> 
> I've change the owner of
> 
>   TOMCAT_HOME/conf
> 
> to the uid run tomcat, but nothing work. 
> 
> Any help ?
> 
Well...I've just try to do not use the FreeBSD ports and make a manual
install of Tomcat 5.5. 

Nothing change. The're exact same problem

What's I don't understand is where Tomcat suppose to save the change I made
with de admin-web-apps for my webapps.

Regards.

--
Albert SHIH
Observatoire de Paris Meudon
SIO batiment 15
Heure local/Local time:
Mar 29 mai 2007 14:58:11 CEST

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



content-type without charset

2007-05-29 Thread Richard Kaye

Hi

I have been tearing my hair out recently with an annoying
problem.  I want to serve XHTML+MathML documents from
a servlet.  The problem is that it seems that these can 
only be viewed with IE and the plugin (MathPlayer) if
the server sends 
  Content-Type: application/xhtml+xml
in the HTTP header without specifying a charset.  Every 
possible charset screws things up because of - I 
presume - the mime type recogniser built in to IE is 
not triggering the MathPlayer filter correctly when a 
charset is present in the Content-Type header.

Unfortunately I have not found a way to stop Tomcat
in adding some unwanted default charset (I am using 
Tomcat 5.5), and unless Microsoft decide to make 
IE open source in the very near future this seems to 
be my only chance of a workaround.  

Please could someone help me by posting a Hello-world 
servlet that serves a document with this Content-Type 
header?  I have tried all the obvious things with no 
success...

Thanks

Richard




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Connection pool

2007-05-29 Thread Szabolcs Márton

maybe you need some settings at the web.xml as weel?
(just guess)

regards,
Szabi

2007/5/29, Ligade, Shailesh (Contr) (Mission Systems) <[EMAIL PROTECTED]>:


Greetings,

I am running Tomcat 5.x, and I have many webapps deployed and working
under tomcat. I want my connection pool to be used from any application.
When I modify server.xml in conf directory to add my connection, listed
below:











   factory

org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName

oracle.jdbc.driver.OracleDriver


   url

jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB


   username
   ROAM_USER


   password
   ngit1234

.



  



  
  


 


  

  



And I get following error:


javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown
Source)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
java.lang.reflect.Method.invoke(Method.java:585)

Any idea, what I am doing wrong?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



I want to Redirect to a different app

2007-05-29 Thread Roger Parkinson
I have an app running in Tomcat and it works fine. Let's say it is 
called Demo.
I want to leave that instance of the app running just as it is. But I 
want to be able to do this:


http://www.mydomain.com/Testapp

Testapp does not exist. I want these requests to invoke Demo, not a 
second instance of Demo called Testapp, but actually Demo itself.
I've looked around for a way to do this but I'm starting to think it 
cannot be done so time to ask.


Configuration is IIS talking to Tomcat 5.5
Thanks
Roger
--
/Roger Parkinson
Mob +64 21 508 792
/


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Connection pool

2007-05-29 Thread Daniel Stephens

Yes post your web.xml where with your  tags. Looks like a typo
in there.

On 5/29/07, Ligade, Shailesh (Contr) (Mission Systems) <
[EMAIL PROTECTED]> wrote:



Greetings,

I am running Tomcat 5.x, and I have many webapps deployed and working
under tomcat. I want my connection pool to be used from any application.
When I modify server.xml in conf directory to add my connection, listed
below:











   factory

org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName

oracle.jdbc.driver.OracleDriver


   url

jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB


   username
   ROAM_USER


   password
   ngit1234

.



  



  
  


 


  

  



And I get following error:


javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown
Source)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
java.lang.reflect.Method.invoke(Method.java:585)

Any idea, what I am doing wrong?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Configuring Tomcat 5.5 and IIS 6

2007-05-29 Thread Rainer Jung

It looks like you want to change the URL during forwarding.

Have a look at

http://tomcat.apache.org/connectors-doc/reference/iis.html

and search for the word "rewrite".

Regards,

Rainer

rcgeorge23 wrote:

Hi Chuck,

Thanks for that. I've now downloaded and attempted to set up the jk
connector - I think I've got a little further but I'm still not seeing the
page that should be served up by Tomcat.

I've set up a simple set of config files (essentially just grabbing them
from the jakarta how-to and changing the paths), and have attempted to visit
www.mydomain.com/main.jsp however I'm still getting a 404.

I'm trying to map mydomain.com/ to the tomcat context 'ols-web' but this is
the bit that doesn't seem to be working. The isapi_redirect.log indicates
that that requests are being forwarded to tomcat, I think:

=
[Mon May 28 17:08:16 2007] [3972:2044] [debug] jk_uri_worker_map.c (601):
Attempting to map context URI '/*=worker1' source 'uriworkermap'
[Mon May 28 17:08:16 2007] [3972:2044] [debug] jk_uri_worker_map.c (616):
Found a wildchar match '/*=worker1'
[Mon May 28 17:08:16 2007] [3972:2044] [debug] jk_isapi_plugin.c (1270):
check if [/main.jsp] is points to the web-inf directory
[Mon May 28 17:08:16 2007] [3972:2044] [debug] jk_isapi_plugin.c (1287):
[/main.jsp] is a servlet url - should redirect to worker1
=

...but possibly not to the right context. Any ideas? My config files are
shown below...

Cheers,
Richard

workers.properties:
==
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=XXX.XXX.220.132
worker.worker1.port=8009
worker.worker1.mount=/ols-web /ols-web/*
==

uriworkermap.properties:
==
/*=worker1
==

isapi_redirect.properties:
==
# Configuration file for the Jakarta ISAPI Redirector

# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=d:\tomcat 5.5\logs\isapi_redirect.log

# Log level (debug, info, warn, error or trace)
log_level=debug

# Full path to the workers.properties file
worker_file=d:\tomcat 5.5\conf\workers.properties

# Full path to the uriworkermap.properties file
worker_mount_file=d:\tomcat 5.5\conf\uriworkermap.properties
==


Caldarale, Charles R wrote:
From: rcgeorge23 [mailto:[EMAIL PROTECTED] 
Subject: Configuring Tomcat 5.5 and IIS 6


I downloaded jakarta-tomcat-connectors-jk2.0.4-win32-IIS.zip, 

Oops.  The mod_jk2 package has been deprecated for over two years; you
should be using mod_jk.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat stopped logging

2007-05-29 Thread Daniel Stephens

apologize for coming in late if this was resolved... Are you saying Tomcat
just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:


Hello,

I have a strange situation.

Tomcat has stopped logging today on my prod. server. Not sure why. All of
the app seems to be working just fine, but the key log file stopped
generating new info.

I have a scheduled task stop and restart Tomcat every morning around 6am,
so as to dump bad threads if there are any.

Usually it resumes just fine.

Any idea as to why this would occur?

Thanks!




RE: Tomcat Connection pool

2007-05-29 Thread Ligade, Shailesh (Contr) (Mission Systems)
Thanks Daniel, I got to work by removing things from web.xml.

Removing DefaultCOntext from server.xml.

Adding a context.xml with 




  

And placing this context.xml in conf directory (where server.xml is)
resolved my problems :-)

thanks

Shailesh 

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 10:00 AM
To: Tomcat Users List
Subject: Re: Tomcat Connection pool

Yes post your web.xml where with your  tags. Looks like a
typo in there.

On 5/29/07, Ligade, Shailesh (Contr) (Mission Systems) <
[EMAIL PROTECTED]> wrote:
>
>
> Greetings,
>
> I am running Tomcat 5.x, and I have many webapps deployed and working 
> under tomcat. I want my connection pool to be used from any
application.
> When I modify server.xml in conf directory to add my connection, 
> listed
> below:
>
> 
>
>  debug="0"/>
> 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> debug="0"/>
>
> 
>  auth="Container" type="javax.sql.DataSource" description="Employees 
> Database for HR Applications"/>
>
> 
> 
>factory
>
> org.apache.commons.dbcp.BasicDataSourceFactory
> 
> 
>driverClassName
>
> oracle.jdbc.driver.OracleDriver
> 
> 
>url
>
> jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB
> 
> 
>username
>ROAM_USER
> 
> 
>password
>ngit1234
> 
> .
> 
> 
>
>   
>  redirectPort="8443"
>  acceptCount="100" connectionTimeout="2"
> disableUploadTimeout="true" URIEncoding="UTF-8"/>
>   minProcessors="50" maxProcessors="150"
>  enableLookups="true" redirectPort="8443"
>  acceptCount="130" URIEncoding="UTF-8"/>
> 
>   
>autoDeploy="true">
>   directory="log"  prefix="localhost_access_log."
> suffix=".txt"
>  pattern="common" resolveHosts="false"/>
>  override="true"
>  debug="5" reloadable="true">
>   auth="Container" type="javax.sql.DataSource"/>
> 
>
>   
> 
>   
> 
>
>
> And I get following error:
>
>
> javax.naming.NameNotFoundException: Name jdbc is not bound in this 
> Context
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> org.apache.naming.NamingContext.lookup(NamingContext.java:769)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown
> Source)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
> [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
> java.lang.reflect.Method.invoke(Method.java:585)
>
> Any idea, what I am doing wrong?
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jasper compiler crashes

2007-05-29 Thread Filip Hanik - Dev Lists
What I like to do is to compile my JSPs just like Tomcat would do it 
runtime, so that I can keep the ability to recompile my JSP files.


http://people.apache.org/~fhanik/precompile.html
http://people.apache.org/~fhanik/tomcat-6-precompile.xml

I just whipped up the v6 script, but I believe it to work properly.

Filip

Berglas, Anthony wrote:

When I try to precompile I get a null pointer exception deep in
.servlet.JasperLoader.loadClass.  Happens for almost all of my .jsps.
They work fine with incremental compile.  

They do use tags defined with JSTL .tag files.  Tags call tags.  


tomcat-6.0.10-src

If anyone knows of decent docs on precompiling Jasper please let me
know.  (I know about jasper-howto.html).

(And there is an underlying problem that Jasper is *extremely* slow to
compile.  I can compile and build all of Tomcat itself from source in
less time than it takes to compile one medium sized JSP (about 30
seconds).  It is difficult to imagine how even the sloppiest code could
run that slowly.  Something is wrong.  100% CPU.)

Ant:-


  

  


  

  



   





Stack trace:-


May 29, 2007 4:20:38 PM org.apache.jasper.JspC processFile
SEVERE: ERROR-the file '\token\autocrudtokentest.jsp' generated the
following general exception:
java.lang.NullPointerException
at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
at sun.misc.URLClassPath.getResource(URLClassPath.java:160)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:
598)
at
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
r.java:221)
at
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor
.java:576)
at
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.
java:50)
at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
agFileProcessor.java:627)
at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
at
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcesso
r.java:645)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:566)
at
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
r.java:212)
at
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor
.java:576)
at
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.
java:50)
at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
agFileProcessor.java:627)
at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
agFileProcessor.java:631)
at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
at
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcesso
r.java:645)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
at org.apache.jasper.JspC.processFile(JspC.java:994)
at org.apache.j

Re: tomcat comet, not working...

2007-05-29 Thread Filip Hanik - Dev Lists
send us a link to your test WAR file, and I can give it a shot, looks 
good to me.


Filip

Márton Szabolcs wrote:
Hi! 


i set my connector like this.
it should be correct, isnt it? 





CometSampleServlet
sample.CometSampleServlet


CometSampleServlet
/CometSampleServlet


public class CometSampleServlet 
extends HttpServlet  implements CometProcessor {

protected ArrayList connections = 
new ArrayList();

protected MessageSender sender = null;
 
/**

 */
public void event(CometEvent event) throws IOException, ServletException {
HttpServletRequest request = event.getHttpServletRequest();


   
but my service method still invoked 
is any settings should take?



this example from: 
http://journal.mycom.co.jp/special/2007/tomcat6/014.html

(its japanese, but you could see in the black text areas)

regards,
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez kapja a 
maga könyvét.
http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm

  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat stopped logging

2007-05-29 Thread Filip Hanik - Dev Lists

ran out of disk space or the file is too large

Filip

Propes, Barry L wrote:

Hello,
 
I have a strange situation.
 
Tomcat has stopped logging today on my prod. server. Not sure why. All of the app seems to be working just fine, but the key log file stopped generating new info.
 
I have a scheduled task stop and restart Tomcat every morning around 6am, so as to dump bad threads if there are any.
 
Usually it resumes just fine.
 
Any idea as to why this would occur?
 
Thanks!
 

  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 2:23 PM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SOLVED, WAS: HttpSessionBindingListener not working

2007-05-29 Thread Gregor Schneider

Sorry,

I misunderstood the concept of s HttpSessionBindingListener completely I guess.

The object which is bound / unbound to the HttpSession has to
implement the listener...

Sometimes reading really helps ;)

Cheers

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: I want to Redirect to a different app

2007-05-29 Thread Caldarale, Charles R
> From: Roger Parkinson [mailto:[EMAIL PROTECTED] 
> Subject: I want to Redirect to a different app
> 
> I want these requests to invoke Demo, not a second instance 
> of Demo called Testapp, but actually Demo itself.

Deploy a simple Testapp webapp that does nothing but forward requests to
Demo.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JMX TimerMBean & Tomcat

2007-05-29 Thread Jaco Gillman
To Whom It May Concern:

 

I am currently having some issues with implementing a TimerMBean for
scheduling on a Tomcat instance. Basically I want to be able to have a
properties file of configurations for a scheduler that cleans up a
cached folder in our application and I was investigating the possibility
of using the TimerMBean for this. I have by now used Google to search on
this topic and I am fairly confident in saying that not a lot of people
have used MBeans (and more specific TimerMBeans) in a Tomcat instance.
Or is there another (beter) solution for getting what I have described? 

 

Is there any possibility that you can help me?

 
Any help would be much appreciated.

 

 

Kind Regards

 

Jaco Gillman

 

T-Systems South Africa (Pty)Ltd

Java Developer

Address:   Sanlam Head Office, Strand Road, Bellville, 7530

Postal Address:   P.O. Box 1, Sanlamhof, 7532

+27 21 947 3452 (phone)

+27 21 947 2791 (fax RSA)

+27 83 596 2375 (mobile)

 

email: [EMAIL PROTECTED]
 

Internet: http://www.t-systems.co.za  

 


This message and/or attachment(s) may contain privileged or confidential
 
information. If you are not the intended recipient you may not disclose or  
  
distribute any of the information contained within this message. In such
case you must destroy this message and inform the sender of the error.
T-Systems does not accept liability for any errors, omissions, information
and viruses contained in the transmission of this message. Any opinions, 
conclusions and other information contained within this message not related 
to T-Systems' official business is deemed to be that of the individual only 
and is not endorsed by T-Systems.

  
T-Systems - Business Flexibility


RE: JMX TimerMBean & Tomcat

2007-05-29 Thread Pitre, Russell
Have you taken a look at Quartz?

  
http://www.opensymphony.com/quartz/

Quartz is a full-featured, open source job scheduling system that can be
integrated with, or used along side virtually any J2EE or J2SE
application - from the smallest stand-alone application to the largest
e-commerce system. Quartz can be used to create simple or complex
schedules for executing tens, hundreds, or even tens-of-thousands of
jobs; jobs whose tasks are defined as standard Java components or EJBs.
The Quartz Scheduler includes many enterprise-class features, such as
JTA transactions and clustering.

Quartz is freely usable, licensed under the Apache 2.0 license.




Russ

-Original Message-
From: Jaco Gillman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 11:10 AM
To: users@tomcat.apache.org
Subject: JMX TimerMBean & Tomcat

To Whom It May Concern:

 

I am currently having some issues with implementing a TimerMBean for
scheduling on a Tomcat instance. Basically I want to be able to have a
properties file of configurations for a scheduler that cleans up a
cached folder in our application and I was investigating the possibility
of using the TimerMBean for this. I have by now used Google to search on
this topic and I am fairly confident in saying that not a lot of people
have used MBeans (and more specific TimerMBeans) in a Tomcat instance.
Or is there another (beter) solution for getting what I have described? 

 

Is there any possibility that you can help me?

 
Any help would be much appreciated.

 

 

Kind Regards

 

Jaco Gillman

 

T-Systems South Africa (Pty)Ltd

Java Developer

Address:   Sanlam Head Office, Strand Road, Bellville, 7530

Postal Address:   P.O. Box 1, Sanlamhof, 7532

+27 21 947 3452 (phone)

+27 21 947 2791 (fax RSA)

+27 83 596 2375 (mobile)

 

email: [EMAIL PROTECTED]
 

Internet: http://www.t-systems.co.za  

 


This message and/or attachment(s) may contain privileged or confidential

information. If you are not the intended recipient you may not disclose
or
distribute any of the information contained within this message. In such
case you must destroy this message and inform the sender of the error.
T-Systems does not accept liability for any errors, omissions,
information
and viruses contained in the transmission of this message. Any opinions,

conclusions and other information contained within this message not
related 
to T-Systems' official business is deemed to be that of the individual
only 
and is not endorsed by T-Systems.
 

T-Systems - Business Flexibility

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat stopped logging

2007-05-29 Thread Propes, Barry L
pretty sure it did not run out of disk space. In fact, I'd zipped a bunch of 
logs a week or so earlier to free up space, not that I needed to, but I still 
had tons of space on the server.

Was the heap size not set high enough maybe?

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:26 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


ran out of disk space or the file is too large

Filip

Propes, Barry L wrote:
> Hello,
>  
> I have a strange situation.
>  
> Tomcat has stopped logging today on my prod. server. Not sure why. All of the 
> app seems to be working just fine, but the key log file stopped generating 
> new info.
>  
> I have a scheduled task stop and restart Tomcat every morning around 6am, so 
> as to dump bad threads if there are any.
>  
> Usually it resumes just fine.
>  
> Any idea as to why this would occur?
>  
> Thanks!
>  
>
>   
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 2:23 
> PM
>   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Anybody using GNU Java

2007-05-29 Thread Omar Eljumaily
in a production Tomcat environment?  I tried this once before a few 
years ago, and ran into some nasty bugs.  Sun's Java, for me, is getting 
a bit weird, especially on Linux.  I never quite know which version to 
download, each one having at least two or three different numbers 
associated with it.  "That's Java Super Enterprise 6, with SDK version 
5, etc"


The latest problem I'm running into is that I'm trying to update to 
Fedora 6 which uses libstdc++.so.6, and Sun's java insists on version 
5.  I suppose I could install 5, but I feel that creepy dependency hell 
feeling coming on when I think about it.


So anyway, is anybody successfully using GNU Java?  If not, does anybody 
have any tips for installing the proper version of Sun's Java on FC6?


Thanks





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat stopped logging

2007-05-29 Thread Propes, Barry L
yeah, it did one day. It had logged up until about 11:45am one day, and then 
inexplicably stopped.
 Not sure why, because more errors did occur.

I had a few logs, with one being catalina_log (prefix), the other being 
localhost_admin_log, another being localhost_DBTest_log, which catches most of 
my errors and then localhost_log.
All of course stapled with a datestamp. 

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:02 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


apologize for coming in late if this was resolved... Are you saying Tomcat
just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a strange situation.
>
> Tomcat has stopped logging today on my prod. server. Not sure why. All of
> the app seems to be working just fine, but the key log file stopped
> generating new info.
>
> I have a scheduled task stop and restart Tomcat every morning around 6am,
> so as to dump bad threads if there are any.
>
> Usually it resumes just fine.
>
> Any idea as to why this would occur?
>
> Thanks!
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Connection pool

2007-05-29 Thread David Short
In your code where you reference the JNDI name "jdbc", reference "jdbc/orcl"
instead.

-Original Message-
From: Ligade, Shailesh (Contr) (Mission Systems)
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 5:16 AM
To: Tomcat Users List
Subject: Tomcat Connection pool

 
Greetings,

I am running Tomcat 5.x, and I have many webapps deployed and working under
tomcat. I want my connection pool to be used from any application.
When I modify server.xml in conf directory to add my connection, listed
below:











   factory

org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName

oracle.jdbc.driver.OracleDriver


   url

jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB


   username
   ROAM_USER


   password
   ngit1234

.



  



  
  


  

  
  

  



And I get following error:


javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown
Source)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at
java.lang.reflect.Method.invoke(Method.java:585)

Any idea, what I am doing wrong?

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring a DataSourceRealm

2007-05-29 Thread Paulo Vivacqua

Hello chris,

Thanks again for the help.I will try to be more clear so that maybe
you could help figure out what I am doing wrong.

Like I said before I am trying to setup a DataSourceRealm to
authenticate users by pull out the user information from a MySQL
database.

1- I already created the tables and columns in my database that
conforms to the requirements.

2 - I also configured a JNDI named jdbc/oaso on TomCat Server
Administration. I tested this connection through a DBCP and it´s
working fine.

3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso
between the  tags

4-  I configured the  on the web.xml

When I run the project I get the following error:

29/05/2007 12:23:55 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
   at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
   at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
   at 
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
   at 
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:282)
   at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
   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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:619)




The server.xml



   
   
   
   
   
   

   

   

   

   
   
   
   
   
   
   
   
   

   

   
   
   
   










On 5/24/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paulo,

Paulo Vivacqua wrote:
> I copied the Mysql Driver's jar into $CATALINA_HOME/common/lib.

Ok.

> I already created the database with the required tables user,
> user-roles and roles.

Ok.

> I configured JNDI DataSource in Tomcat by adding a declaration for my
> resource named jdbc/oaso into a Context path to
> $CATALINA_HOME/conf/server.xml.

So you have a JNDI data source configured in server.xml? Does it need to
be global? If not, put it into your webapp in META-INF/context.xml

> I configured the  on the web.xml

Ok.

> I added the  to the jdbc/oaso into the web.xml

Good. If you configure your DataSource in context.xml, you don't need
this step, though I don't think it hurts.

So... how doesn't it work?

Do you get an exception? If so, give us the stack trace.

Do you get a log message? If so, give us the message.

You still haven't described what is wrong. For all I can tell, it's
working. 

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVeve9CaO5/Lv0PARArGuAJ90ugIycb6XnBc1UFDjDoaLs+WWygCfXRuW
qidBk4elye0qqFm4W4eDurw=
=7mX9
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Paulo Vivacqua
[EMAIL PROTECTED]
msn: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configuring a DataSourceRealm

2007-05-29 Thread David Short
In your code where you reference JNDI "jdbc", reference "jdbc/oaso" instead.


-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 8:37 AM
To: Tomcat Users List
Subject: Re: Configuring a DataSourceRealm

Hello chris,

Thanks again for the help.I will try to be more clear so that maybe you
could help figure out what I am doing wrong.

Like I said before I am trying to setup a DataSourceRealm to authenticate
users by pull out the user information from a MySQL database.

1- I already created the tables and columns in my database that conforms to
the requirements.

2 - I also configured a JNDI named jdbc/oaso on TomCat Server
Administration. I tested this connection through a DBCP and it´s working
fine.

3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso
between the  tags

4-  I configured the  on the web.xml

When I run the project I get the following error:

29/05/2007 12:23:55 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
282)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:180)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:490)
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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Thread.java:619)

>
The server.xml


































>>





On 5/24/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Paulo,
>
> Paulo Vivacqua wrote:
> > I copied the Mysql Driver's jar into $CATALINA_HOME/common/lib.
>
> Ok.
>
> > I already created the database with the required tables user, 
> > user-roles and roles.
>
> Ok.
>
> > I configured JNDI DataSource in Tomcat by adding a declaration for 
> > my resource named jdbc/oaso into a Context path to 
> > $CATALINA_HOME/conf/server.xml.
>
> So you have a JNDI data source configured in server.xml? Does it need 
> to be global? If not, put it into your webapp in META-INF/context.xml
>
> > I configured the  on the web.xml
>
> Ok.
>
> > I added the  to the jdbc/oaso into the web.xml
>
> Good. If you configure your DataSource in context.xml, you don't need 
> this step, though I don't think it hurts.
>
> So... how doesn't it work?
>
> Do you get an exception? If so, give us the stack trace.
>
> Do you get a log message? If so, give us the message.
>
> You still haven't described what is wrong. For all I can tell, it's 
> working. 
>
> - -chris
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGVeve9CaO5/Lv0PARArGuAJ90ugIycb6XnBc1UFDjDoaLs+WWygCfXRuW
> qidBk4elye0qqFm4W4eDurw=
> =7mX9
> -END PGP SIGNATURE-
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Paulo Vivacqua
[EMAIL PROTECTED]
msn: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman

Re: Anybody using GNU Java

2007-05-29 Thread David Tonhofer

Omar Eljumaily wrote:
in a production Tomcat environment?  I tried this once before a few 
years ago, and ran into some nasty bugs.  Sun's Java, for me, is 
getting a bit weird, especially on Linux.  I never quite know which 
version to download, each one having at least two or three different 
numbers associated with it.  "That's Java Super Enterprise 6, with SDK 
version 5, etc"


The latest problem I'm running into is that I'm trying to update to 
Fedora 6 which uses libstdc++.so.6, and Sun's java insists on version 
5.  I suppose I could install 5, but I feel that creepy dependency 
hell feeling coming on when I think about it.


So anyway, is anybody successfully using GNU Java?  If not, does 
anybody have any tips for installing the proper version of Sun's Java 
on FC6?


Thanks



Personally, I haven't had time to look into this in detail but 
apparently "JPackage" is the way to go if you want to master the 
dependencies.
It's basically a set or RPMs that installs links to executables and 
jars/so.libs in the expected (Linux) places, it's not more difficult 
than that.
The nice thing is that you get RPMs for various Java packages, so 
dependency problems are solved.


If I remember well, the Sun JDK is not well-behaved i.r.t. placing files 
in a "Linux Standard Way", as opposed to the IBM JDK for

example. Still, there is a "JPackage" package to solve even that.

Check it out: http://www.jpackage.org/

Best,

-- David







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Szabolcs Márton

i will send later, i cant ftp from here.
any other ideas?

i would like if somebody, who made this cometprocessor worked describe
the things what have to do. I already done what is in tomcat docs
(advanced NIO)

regards,
Saby

2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:

send us a link to your test WAR file, and I can give it a shot, looks
good to me.

Filip

Márton Szabolcs wrote:
> Hi!
>
> i set my connector like this.
> it should be correct, isnt it?
>
>  maxThreads="150" connectionTimeout="2"
> redirectPort="8443" />
>
> 
> CometSampleServlet
> sample.CometSampleServlet
> 
> 
> CometSampleServlet
> /CometSampleServlet
> 
>
> public class CometSampleServlet
> extends HttpServlet  implements CometProcessor {
>
> protected ArrayList connections =
> new ArrayList();
> protected MessageSender sender = null;
>
> /**
>  */
> public void event(CometEvent event) throws IOException, ServletException {
> HttpServletRequest request = event.getHttpServletRequest();
>
> 
>
> but my service method still invoked
> is any settings should take?
>
>
> this example from:
> http://journal.mycom.co.jp/special/2007/tomcat6/014.html
> (its japanese, but you could see in the black text areas)
>
> regards,
> Szabi
>
> 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez kapja 
a maga könyvét.
> http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm
>
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 
PM
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Jessica Johnson

Hi all,

I finally got a mostly working install of Apache 2.2.4, Tomcat 5.5.23,
and the mod_jk 1.2.22.  In the general case it works fine, but for
pages that take a long time to load, I get the first part of the html,
and then Apache spits out "OK The server is temporarily unable to
service your request due to maintenance downtime or capacity problems.
Please try again later."  It's a reporting system that needs to do
some intensive DB queries and calculations before rendering.

Is there some way I can increase the time Apache waits before giving
the 503 error? Or better yet, what are some strategies for optimizing
my configuration?  I'm a newbie with this type of setup, so I may be
missing something entirely obvious.

There was nothing strange in any of the logs, except this snip from
access.log showing the 503:
196.40.54.218 - - [29/May/2007:10:30:04 -0500] "GET
/reporting/data_reports.jsf?reportStyle=3 HTTP/1.1" 200 90024
196.40.54.218 - - [29/May/2007:10:31:17 -0500] "GET
/reporting/data_reports.jsf?reportStyle=4 HTTP/1.1" 503 90289

Here is my workers.properties file.

[logger]
level=DEBUG
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.log
[config]
file=C:/Program Files/Apache Software
Foundation/Apache2.2/conf/workers2.properties
debug=0
debugEnv=0


[shm]
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.shm
size=1048576

# socket channel
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# worker for the connector
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[status:status]

[uri:/status/*]
worker=status:status

[uri:/jsp-examples/*.jsp]
worker=ajp13:localhost:8009

[uri:/reporting/*.jsp]
worker=ajp13:localhost:8009

[uri:/*.jsp]
worker=ajp13:localhost:8009

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 404 message when trying to test a servlet

2007-05-29 Thread Dean
Thanks for the info.  However, I am new to tomcat and servlets and as such
am still somewhat unclear as to the resolution to this problem.  Can you
clarify.  What exactly is servlet - mapping?

Thanks,

D

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Saturday, May 26, 2007 8:06 PM
To: users@tomcat.apache.org
Subject: Re: 404 message when trying to test a servlet


"Dean" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Greetings,
>
>
>
> I suspect the class file may be in the wrong directory.  I get the message
> /basic-servlet/servlet/CurrencyConverter  , which is confusing in that the
> class file is in the following directory C:\Program Files\Apache Software
> Foundation\Tomcat 4.1\webapps\basic-servlet\WEB-INF\classes.  The html 
> page
> is being found ok but when I do a submit and it tries to bring up the
> servlet I get the above.
>

The invoker servlet has been disabled in the default config for ages 
(because it is evil :).  You can enable it at your own risk in conf/web.xml,

but that isn't recommended.  Use an explicit servlet-mapping instead.

Having classes in the default package will prevent you from upgrading later 
on.  You really should put your class in a package.

>
>
> I really appreciate any help you can give.
>
>
>
> P.s. when I start tomcat I only get the following messages
>
> Starting service Tomcat-Standalone
>
> Apache Tomcat/4.1.36-LE-jdk14
>
>
>
> I am able to access http://localhost:8080/index.jsp
>
>
>
> Sincerely,
>
>
>
> D
>
>
>
> 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Filip Hanik - Dev Lists

you don't really have to do that much, here is mine

package org.hanik.comet.test;


import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.apache.catalina.CometEvent;
import org.apache.catalina.CometProcessor;



public class TestCometServlet extends HttpServlet implements 
CometProcessor {
  
   public void event(CometEvent event)

   throws IOException, ServletException {
   System.out.println("Received an event:"+event);
   event.setTimeout(5000);
   if (event.getEventType() == CometEvent.EventType.END ||
   event.getEventType() == CometEvent.EventType.ERROR ) {
   event.close();
   } else if (event.getEventType() == CometEvent.EventType.READ) {
   InputStream is = event.getHttpServletRequest().getInputStream();
   byte[] buf = new byte[512];
   do {
   int n = is.read(buf); //can throw an IOException
   if (n > 0) {
   System.out.println("Read " + n + " bytes: " + new 
String(buf, 0, n) + " for session: " + 
event.getHttpServletRequest().getSession(true).getId());

   } else if (n < 0) {
   event.close();
   return;
   }
   } while (is.available() > 0);

   }
   }
  
}




Szabolcs Márton wrote:

i will send later, i cant ftp from here.
any other ideas?

i would like if somebody, who made this cometprocessor worked describe
the things what have to do. I already done what is in tomcat docs
(advanced NIO)

regards,
Saby

2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:

send us a link to your test WAR file, and I can give it a shot, looks
good to me.

Filip

Márton Szabolcs wrote:
> Hi!
>
> i set my connector like this.
> it should be correct, isnt it?
>
> protocol="org.apache.coyote.http11.Http11NioProtocol"

> maxThreads="150" connectionTimeout="2"
> redirectPort="8443" />
>
> 
> CometSampleServlet
> sample.CometSampleServlet
> 
> 
> CometSampleServlet
> /CometSampleServlet
> 
>
> public class CometSampleServlet
> extends HttpServlet  implements CometProcessor {
>
> protected ArrayList connections =
> new ArrayList();
> protected MessageSender sender = null;
>
> /**
>  */
> public void event(CometEvent event) throws IOException, 
ServletException {

> HttpServletRequest request = event.getHttpServletRequest();
>
> 
>
> but my service method still invoked
> is any settings should take?
>
>
> this example from:
> http://journal.mycom.co.jp/special/2007/tomcat6/014.html
> (its japanese, but you could see in the black text areas)
>
> regards,
> Szabi
>
> 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó 
kézhez kapja a maga könyvét.

> http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm
>
>
> 


>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 
5/27/2007 3:05 PM

>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Mladen Turk

Jessica Johnson wrote:

Hi all,

I finally got a mostly working install of Apache 2.2.4, Tomcat 5.5.23,
and the mod_jk 1.2.22.



That's hard to believe, because (see below)


Here is my workers.properties file.

[logger]
level=DEBUG
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.log
[config]
file=C:/Program Files/Apache Software
Foundation/Apache2.2/conf/workers2.properties
debug=0
debugEnv=0


[shm]
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.shm
size=1048576




You are using JK2 config with mod_jk.

The workers.properties for mod_jk should look
like this:
http://tomcat.apache.org/connectors-doc/generic_howto/workers.html


Regards,
Mladen.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Anybody using GNU Java

2007-05-29 Thread Leon Rosenberg

On 5/29/07, Omar Eljumaily <[EMAIL PROTECTED]> wrote:


So anyway, is anybody successfully using GNU Java?


I dont think its possible. It simply doesnt work.

If not, does anybody

have any tips for installing the proper version of Sun's Java on FC6?



Yes.
Goto
http://java.sun.com/javase/downloads/index.jsp

Select
JDK 6u1

Select your OS version.

Download the binary, run it in a folder of your choice.

set JAVA_HOME.

ready.
Leon

P.S. I usually link /usr/local/java to the download location i.e.
/opt/java/jdk.1.6.0
and set the JAVA_HOME to /usr/local/java, and add $JAVA_HOME/bin/ to $PATH.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 404 message when trying to test a servlet

2007-05-29 Thread Propes, Barry L
servlet mapping entails which directory you would like your classes to be or to 
be named, and where the actual servlet will be.
Also, will it be mapped to a different name? That's typically a good idea, from 
what I've read.

i..e here's a blurb from the web.xml file what servlet mapping would look like.


chngctrl.ChangeControlUserAcctServletSPCall
 /chngctrl/ChangeControlUsersSP.jsp
  

that JSP you see is a "fake jsp" the file doesn't exist but that's where the 
action file from the form points. It actually calls the servlet instead, under 
the hood.

But further up the page, you have to declare the servlet name, i.e.

 
   
chngctrl.ChangeControlUserAcctServletSPCall
   
chngctrl.ChangeControlUserAcctServletSPCall
   

you could make a different name for your class from your servlet if you wanted, 
but I think most people don't...probably too confusing in the long run.

-Original Message-
From: Dean [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 11:23 AM
To: 'Tomcat Users List'
Subject: RE: 404 message when trying to test a servlet


Thanks for the info.  However, I am new to tomcat and servlets and as such
am still somewhat unclear as to the resolution to this problem.  Can you
clarify.  What exactly is servlet - mapping?

Thanks,

D

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Saturday, May 26, 2007 8:06 PM
To: users@tomcat.apache.org
Subject: Re: 404 message when trying to test a servlet


"Dean" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Greetings,
>
>
>
> I suspect the class file may be in the wrong directory.  I get the message
> /basic-servlet/servlet/CurrencyConverter  , which is confusing in that the
> class file is in the following directory C:\Program Files\Apache Software
> Foundation\Tomcat 4.1\webapps\basic-servlet\WEB-INF\classes.  The html 
> page
> is being found ok but when I do a submit and it tries to bring up the
> servlet I get the above.
>

The invoker servlet has been disabled in the default config for ages 
(because it is evil :).  You can enable it at your own risk in conf/web.xml,

but that isn't recommended.  Use an explicit servlet-mapping instead.

Having classes in the default package will prevent you from upgrading later 
on.  You really should put your class in a package.

>
>
> I really appreciate any help you can give.
>
>
>
> P.s. when I start tomcat I only get the following messages
>
> Starting service Tomcat-Standalone
>
> Apache Tomcat/4.1.36-LE-jdk14
>
>
>
> I am able to access http://localhost:8080/index.jsp
>
>
>
> Sincerely,
>
>
>
> D
>
>
>
> 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Peter Warren
Filip, could you post some client code that sends two separate messages
to the server on the same output stream and generates both a begin event
and then a subsequent read event.

Thanks,
Peter
(I'm the guy who started the "comet read event" thread.  I never heard
back after you asked me which connector I was using, and I'm still
struggling with it.)

Filip Hanik - Dev Lists wrote:
> you don't really have to do that much, here is mine
>
> package org.hanik.comet.test;
>
>
> import java.io.IOException;
> import java.io.InputStream;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
>
> import org.apache.catalina.CometEvent;
> import org.apache.catalina.CometProcessor;
>
>
>
> public class TestCometServlet extends HttpServlet implements
> CometProcessor {
>  public void event(CometEvent event)
>throws IOException, ServletException {
>System.out.println("Received an event:"+event);
>event.setTimeout(5000);
>if (event.getEventType() == CometEvent.EventType.END ||
>event.getEventType() == CometEvent.EventType.ERROR ) {
>event.close();
>} else if (event.getEventType() == CometEvent.EventType.READ) {
>InputStream is =
> event.getHttpServletRequest().getInputStream();
>byte[] buf = new byte[512];
>do {
>int n = is.read(buf); //can throw an IOException
>if (n > 0) {
>System.out.println("Read " + n + " bytes: " + new
> String(buf, 0, n) + " for session: " +
> event.getHttpServletRequest().getSession(true).getId());
>} else if (n < 0) {
>event.close();
>return;
>}
>} while (is.available() > 0);
>
>}
>}
>   }
>
>
>
> Szabolcs Márton wrote:
>> i will send later, i cant ftp from here.
>> any other ideas?
>>
>> i would like if somebody, who made this cometprocessor worked describe
>> the things what have to do. I already done what is in tomcat docs
>> (advanced NIO)
>>
>> regards,
>> Saby
>>
>> 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:
>>> send us a link to your test WAR file, and I can give it a shot, looks
>>> good to me.
>>>
>>> Filip
>>>
>>> Márton Szabolcs wrote:
>>> > Hi!
>>> >
>>> > i set my connector like this.
>>> > it should be correct, isnt it?
>>> >
>>> > >> protocol="org.apache.coyote.http11.Http11NioProtocol"
>>> > maxThreads="150" connectionTimeout="2"
>>> > redirectPort="8443" />
>>> >
>>> > 
>>> > CometSampleServlet
>>> > sample.CometSampleServlet
>>> > 
>>> > 
>>> > CometSampleServlet
>>> > /CometSampleServlet
>>> > 
>>> >
>>> > public class CometSampleServlet
>>> > extends HttpServlet  implements CometProcessor {
>>> >
>>> > protected ArrayList connections =
>>> > new ArrayList();
>>> > protected MessageSender sender = null;
>>> >
>>> > /**
>>> >  */
>>> > public void event(CometEvent event) throws IOException,
>>> ServletException {
>>> > HttpServletRequest request = event.getHttpServletRequest();
>>> >
>>> > 
>>> >
>>> > but my service method still invoked
>>> > is any settings should take?
>>> >
>>> >
>>> > this example from:
>>> > http://journal.mycom.co.jp/special/2007/tomcat6/014.html
>>> > (its japanese, but you could see in the black text areas)
>>> >
>>> > regards,
>>> > Szabi
>>> >
>>> > 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó
>>> kézhez kapja a maga könyvét.
>>> > http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm
>>> >
>>> >
>>> >
>>> 
>>>
>>> >
>>> > No virus found in this incoming message.
>>> > Checked by AVG Free Edition.
>>> > Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date:
>>> 5/27/2007 3:05 PM
>>> >
>>>
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Szabolcs Márton

Filip,

i tryed and i got the same again: "The specified HTTP method is not
allowed for the requested resource (HTTP method GET is not supported
by this URL)."

I could access this servlet in a normal way, like explorer and
http://localhost:8080/cometd/cometddd

or i could accept only something like dojo.io ?
(i suppose maybe i have to access a different way, but its make no
sense. The dojo, or ajax, makes the same request as the browser
made...)


what is your tomcat settings?
do you make anything change, or just installed and no modifications made?

is any extra lib necessary for the webapp ?

i feel like this as one little settings somewhere missing. Its drive
me crazy... :(

if i specify an ftp server access for you, could you upload your
tomcat, and your web app source if it isn't protected, (n)either you
dont mind? I compare with mine.



thanks,
Szabi


2007/5/29, Peter Warren <[EMAIL PROTECTED]>:

Filip, could you post some client code that sends two separate messages
to the server on the same output stream and generates both a begin event
and then a subsequent read event.

Thanks,
Peter
(I'm the guy who started the "comet read event" thread.  I never heard
back after you asked me which connector I was using, and I'm still
struggling with it.)

Filip Hanik - Dev Lists wrote:
> you don't really have to do that much, here is mine
>
> package org.hanik.comet.test;
>
>
> import java.io.IOException;
> import java.io.InputStream;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
>
> import org.apache.catalina.CometEvent;
> import org.apache.catalina.CometProcessor;
>
>
>
> public class TestCometServlet extends HttpServlet implements
> CometProcessor {
>  public void event(CometEvent event)
>throws IOException, ServletException {
>System.out.println("Received an event:"+event);
>event.setTimeout(5000);
>if (event.getEventType() == CometEvent.EventType.END ||
>event.getEventType() == CometEvent.EventType.ERROR ) {
>event.close();
>} else if (event.getEventType() == CometEvent.EventType.READ) {
>InputStream is =
> event.getHttpServletRequest().getInputStream();
>byte[] buf = new byte[512];
>do {
>int n = is.read(buf); //can throw an IOException
>if (n > 0) {
>System.out.println("Read " + n + " bytes: " + new
> String(buf, 0, n) + " for session: " +
> event.getHttpServletRequest().getSession(true).getId());
>} else if (n < 0) {
>event.close();
>return;
>}
>} while (is.available() > 0);
>
>}
>}
>   }
>
>
>
> Szabolcs Márton wrote:
>> i will send later, i cant ftp from here.
>> any other ideas?
>>
>> i would like if somebody, who made this cometprocessor worked describe
>> the things what have to do. I already done what is in tomcat docs
>> (advanced NIO)
>>
>> regards,
>> Saby
>>
>> 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:
>>> send us a link to your test WAR file, and I can give it a shot, looks
>>> good to me.
>>>
>>> Filip
>>>
>>> Márton Szabolcs wrote:
>>> > Hi!
>>> >
>>> > i set my connector like this.
>>> > it should be correct, isnt it?
>>> >
>>> > >> protocol="org.apache.coyote.http11.Http11NioProtocol"
>>> > maxThreads="150" connectionTimeout="2"
>>> > redirectPort="8443" />
>>> >
>>> > 
>>> > CometSampleServlet
>>> > sample.CometSampleServlet
>>> > 
>>> > 
>>> > CometSampleServlet
>>> > /CometSampleServlet
>>> > 
>>> >
>>> > public class CometSampleServlet
>>> > extends HttpServlet  implements CometProcessor {
>>> >
>>> > protected ArrayList connections =
>>> > new ArrayList();
>>> > protected MessageSender sender = null;
>>> >
>>> > /**
>>> >  */
>>> > public void event(CometEvent event) throws IOException,
>>> ServletException {
>>> > HttpServletRequest request = event.getHttpServletRequest();
>>> >
>>> > 
>>> >
>>> > but my service method still invoked
>>> > is any settings should take?
>>> >
>>> >
>>> > this example from:
>>> > http://journal.mycom.co.jp/special/2007/tomcat6/014.html
>>> > (its japanese, but you could see in the black text areas)
>>> >
>>> > regards,
>>> > Szabi
>>> >
>>> > 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó
>>> kézhez kapja a maga könyvét.
>>> > http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm
>>> >
>>> >
>>> >
>>> 
>>>
>>> >
>>> > No virus found in this incoming message.
>>> > Checked by AVG Free Edition.
>>> > Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date:
>>> 5/27/2007 3:05 PM
>>> >
>>>
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additio

RE: Configuring Tomcat 5.5 and IIS 6

2007-05-29 Thread Propes, Barry L
that would mean Tomcat's running at port 8080, not 80.

Something in the connector didn't work, assuming you're trying to make a 
connector run TC on port 80 instead of 8080.

-Original Message-
From: rcgeorge23 [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 27, 2007 7:34 AM
To: users@tomcat.apache.org
Subject: Configuring Tomcat 5.5 and IIS 6



Hi All,

I'm having trouble getting Tomcat to serve pages through IIS. I have tried
to follow several step-by-step guides online but haven't really had much
luck! I've searched through this forum but again, I haven't been able to
find anything that's fixed my problem.

I downloaded jakarta-tomcat-connectors-jk2.0.4-win32-IIS.zip, and followed
the setup instructions on the jakarta site. I made a slight modification to
the setup script (so that it created the jakarta virtual folder in
mydomain.com rather than IIS's "Default Website"), but other than that I
believe I've done precisely as instructed!

Tomcat is running on port 8080 and when I hit
http://www.mydomain.com:8080/context/main.jsp, Tomcat faithfully serves up
the page. However when I attempt to hit http://www.mydomain.com/main.jsp,
IIS serves up a 404.

If I look in the IIS log, I can see that IIS is attempting to push the
request towards the isapi_redirector dll:

#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port
cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) sc-status
sc-win32-status sc-bytes cs-bytes time-taken 
2007-05-27 11:48:19 W3SVC10769 XXX.XXX.220.132 GET
/jakarta/isapi_redirector2.dll - 80 - XXX.XXX.56.247 HTTP/1.1
Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-GB;+rv:1.8.1.3)+Gecko/20070309+Firefox/2.0.0.3
s_pers=%20s_vsn_paypalglobal%3D4757241787590%7C1473537542953%3B - 404 1260
1814 525 31

...so I'm guessing it's a problem with the way the dll has been configured.

Here is my workers2.properties:

==
[shm]
info=Scoreboard. Requried for reconfiguration and status with multiprocess
servers.
file=D:\Tomcat 5.5\work\jk2.shm

# Example socket channel, override port and host.
[channel.socket:XXX.XXX.220.132:8009]
info=Ajp13 port forwarding over socket
tomcatId=XXX.XXX.220.132:8009

[logger]
level=DEBUG

[logger.file:0]
level=DEBUG
file=D:\Tomcat 5.5\logs\jk2.log

[workerEnv:]
info=Global server options
timing=1
debug=0
logger=logger.file:0 

# define the worker
[ajp13:XXX.XXX.220.132:8009]
channel=channel.socket:XXX.XXX.220.132:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:88.208.220.132/*]
context=/ols-web
worker=ajp13:XXX.XXX.220.132:8009
=

I attempted to enable logging to see whether this would give me any clues,
but the file I specified (D:\Tomcat 5.5\logs\jk2.log) doesn't get created.

Here's Tomcat's context.xml

==



==

...and here's the bit in server.xml where the AJP connector port is
configured:

==

==

If anyone can offer any advice, I'd be really grateful.

Cheers,
Richard.
-- 
View this message in context: 
http://www.nabble.com/Configuring-Tomcat-5.5-and-IIS-6-tf3823529.html#a10824449
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Administration web tool

2007-05-29 Thread Virgilio
Hi, my name is Virgilio.

I have already installed administration web tool with Tomcat 5.9 and all run
alright.

I am trying to install administration web tool with Tomcat 6.0.13.

When trying to access to http://localhost:8080/admin I get blank page.

I am using j2sdk 1.5

 

Is it possible using administration web tool with Tomcat 6?

How do I install it?

 

Thank you.

 

 



Re: Tomcat stopped logging

2007-05-29 Thread Daniel Stephens

I can't remember off the top of my head but I think there is a 2GB limit(OS
Level). but I'd have to try and find that, to be totally sure.

On 5/29/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:


yeah, it did one day. It had logged up until about 11:45am one day, and
then inexplicably stopped.
Not sure why, because more errors did occur.

I had a few logs, with one being catalina_log (prefix), the other being
localhost_admin_log, another being localhost_DBTest_log, which catches most
of my errors and then localhost_log.
All of course stapled with a datestamp.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:02 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


apologize for coming in late if this was resolved... Are you saying Tomcat
just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a strange situation.
>
> Tomcat has stopped logging today on my prod. server. Not sure why. All
of
> the app seems to be working just fine, but the key log file stopped
> generating new info.
>
> I have a scheduled task stop and restart Tomcat every morning around
6am,
> so as to dump bad threads if there are any.
>
> Usually it resumes just fine.
>
> Any idea as to why this would occur?
>
> Thanks!
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tomcat stopped logging

2007-05-29 Thread Propes, Barry L
I'm not even close to that!
I'm at about 4.7 MB! For the logs anyway...isn't that the directory to which 
you're referring?

But one thing I do wonder about...seems as if someone had told me one time 
there was a finite amount of folders or items that could be in a Windows 
directory, like 256 for example. I currently have 253, but I haven't 
encountered this problem since a few weeks back. 
I did go ahead and zip up a bunch of old log files, but I don't think it was 
too big of an issue at the time.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 12:17 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


I can't remember off the top of my head but I think there is a 2GB limit(OS
Level). but I'd have to try and find that, to be totally sure.

On 5/29/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
>
> yeah, it did one day. It had logged up until about 11:45am one day, and
> then inexplicably stopped.
> Not sure why, because more errors did occur.
>
> I had a few logs, with one being catalina_log (prefix), the other being
> localhost_admin_log, another being localhost_DBTest_log, which catches most
> of my errors and then localhost_log.
> All of course stapled with a datestamp.
>
> -Original Message-
> From: Daniel Stephens [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 9:02 AM
> To: Tomcat Users List
> Subject: Re: Tomcat stopped logging
>
>
> apologize for coming in late if this was resolved... Are you saying Tomcat
> just stop's logging to the catalina.out?
>
> On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >
> > I have a strange situation.
> >
> > Tomcat has stopped logging today on my prod. server. Not sure why. All
> of
> > the app seems to be working just fine, but the key log file stopped
> > generating new info.
> >
> > I have a scheduled task stop and restart Tomcat every morning around
> 6am,
> > so as to dump bad threads if there are any.
> >
> > Usually it resumes just fine.
> >
> > Any idea as to why this would occur?
> >
> > Thanks!
> >
> >
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring a DataSourceRealm

2007-05-29 Thread Paulo Vivacqua

Hi David, Thanks for the help.

I don´t have a reference to JNDI jdbc on my code. What I have is a
login page with a form that´s sent to tomcat for authentication.


   
   
   
   

I restarted tomcat and what  I am getting a login window for TomCat
Manager Application. I tried using the a user and a password
configured on tomcat-users but none of them work.

the application error:



do-dist:
dist:
F:\Paulo\ICESP\6sem\java\projetos\RealmJdbcTeste\nbproject\build-impl.xml:452:
Deployment error:
Access to Tomcat server has not been authorized. Set the correct
username and password with the "manager" role in the Tomcat customizer
in the Server Manager.
See the server log for details.
BUILD FAILED (total time: 57 seconds)




the tomcat error



29/05/2007 14:39:23 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
   at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
   at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
   at 
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
   at 
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:282)
   at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
   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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:619)







On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:

In your code where you reference JNDI "jdbc", reference "jdbc/oaso" instead.


-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 8:37 AM
To: Tomcat Users List
Subject: Re: Configuring a DataSourceRealm

Hello chris,

Thanks again for the help.I will try to be more clear so that maybe you
could help figure out what I am doing wrong.

Like I said before I am trying to setup a DataSourceRealm to authenticate
users by pull out the user information from a MySQL database.

1- I already created the tables and columns in my database that conforms to
the requirements.

2 - I also configured a JNDI named jdbc/oaso on TomCat Server
Administration. I tested this connection through a DBCP and it´s working
fine.

3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso
between the  tags

4-  I configured the  on the web.xml

When I run the project I get the following error:

29/05/2007 12:23:55 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
282)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:180)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:490)
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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang

RE: Configuring a DataSourceRealm

2007-05-29 Thread David Short
Somewhere in your code, probably in j_security_check, there is a reference
to a datasource, which will reference the JNDI value.  You need to change
that reference from jdbc to jdbc/oaso.

-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 10:46 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Configuring a DataSourceRealm

Hi David, Thanks for the help.

I don´t have a reference to JNDI jdbc on my code. What I have is a login
page with a form that´s sent to tomcat for authentication.







I restarted tomcat and what  I am getting a login window for TomCat Manager
Application. I tried using the a user and a password configured on
tomcat-users but none of them work.

the application error:

do-dist:
dist:
F:\Paulo\ICESP\6sem\java\projetos\RealmJdbcTeste\nbproject\build-impl.xml:45
2:
Deployment error:
Access to Tomcat server has not been authorized. Set the correct username
and password with the "manager" role in the Tomcat customizer in the Server
Manager.
See the server log for details.
BUILD FAILED (total time: 57 seconds)


the tomcat error

29/05/2007 14:39:23 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
282)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:180)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:490)
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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Thread.java:619)





On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> In your code where you reference JNDI "jdbc", reference "jdbc/oaso"
instead.
>
>
> -Original Message-
> From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 8:37 AM
> To: Tomcat Users List
> Subject: Re: Configuring a DataSourceRealm
>
> Hello chris,
>
> Thanks again for the help.I will try to be more clear so that maybe 
> you could help figure out what I am doing wrong.
>
> Like I said before I am trying to setup a DataSourceRealm to 
> authenticate users by pull out the user information from a MySQL database.
>
> 1- I already created the tables and columns in my database that 
> conforms to the requirements.
>
> 2 - I also configured a JNDI named jdbc/oaso on TomCat Server 
> Administration. I tested this connection through a DBCP and it´s 
> working fine.
>
> 3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso 
> between the  tags
>
> 4-  I configured the  on the web.xml
>
> When I run the project I get the following error:
>
> 29/05/2007 12:23:55 org.apache.catalina.realm.DataSourceRealm open
> SEVERE: Exception performing authentication
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
> at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
> at
>
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
> 282)
> at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basi
> cAuthe
> nticator.java:180)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat
> orBase
> .java:490)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
> va:126
> )
> at
> org.apache.catalina.valves.ErrorR

Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Rainer Jung

Hi Jessica,

your information looks strange. You are talking about mod_jk 1.2.22, but 
you present a configuration for mod_jk2, which is deprecated. mod_jk 
will not work with this configuration, because mod_jk uses a very 
different config syntax.


Although I don't know your actual configs, I assume your problem happens 
when requests take longer than 300 seconds, which is the default request 
timeout with Apache. You can increase this with Apache Timeout 
directive. You can measure response times by adding "%D" to your 
LogFormat (microseconds response time).


Regards,

Rainer

Jessica Johnson wrote:

Hi all,

I finally got a mostly working install of Apache 2.2.4, Tomcat 5.5.23,
and the mod_jk 1.2.22.  In the general case it works fine, but for
pages that take a long time to load, I get the first part of the html,
and then Apache spits out "OK The server is temporarily unable to
service your request due to maintenance downtime or capacity problems.
Please try again later."  It's a reporting system that needs to do
some intensive DB queries and calculations before rendering.

Is there some way I can increase the time Apache waits before giving
the 503 error? Or better yet, what are some strategies for optimizing
my configuration?  I'm a newbie with this type of setup, so I may be
missing something entirely obvious.

There was nothing strange in any of the logs, except this snip from
access.log showing the 503:
196.40.54.218 - - [29/May/2007:10:30:04 -0500] "GET
/reporting/data_reports.jsf?reportStyle=3 HTTP/1.1" 200 90024
196.40.54.218 - - [29/May/2007:10:31:17 -0500] "GET
/reporting/data_reports.jsf?reportStyle=4 HTTP/1.1" 503 90289

Here is my workers.properties file.

[logger]
level=DEBUG
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.log
[config]
file=C:/Program Files/Apache Software
Foundation/Apache2.2/conf/workers2.properties
debug=0
debugEnv=0


[shm]
file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.shm
size=1048576

# socket channel
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# worker for the connector
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[status:status]

[uri:/status/*]
worker=status:status

[uri:/jsp-examples/*.jsp]
worker=ajp13:localhost:8009

[uri:/reporting/*.jsp]
worker=ajp13:localhost:8009

[uri:/*.jsp]
worker=ajp13:localhost:8009


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat stopped logging

2007-05-29 Thread David kerber

Propes, Barry L wrote:

I'm not even close to that!
I'm at about 4.7 MB! For the logs anyway...isn't that the directory to which 
you're referring?

But one thing I do wonder about...seems as if someone had told me one time there was a finite amount of folders or items that could be in a Windows directory, like 256 for example. I currently have 253, but I haven't encountered this problem since a few weeks back. 
  
If there is a limit (and I don't think there is except for the root 
directory), it's huge; I have several NTFS directories with tens of 
thousands of files in them.


d


I did go ahead and zip up a bunch of old log files, but I don't think it was 
too big of an issue at the time.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 12:17 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


I can't remember off the top of my head but I think there is a 2GB limit(OS
Level). but I'd have to try and find that, to be totally sure.

On 5/29/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
  

yeah, it did one day. It had logged up until about 11:45am one day, and
then inexplicably stopped.
Not sure why, because more errors did occur.

I had a few logs, with one being catalina_log (prefix), the other being
localhost_admin_log, another being localhost_DBTest_log, which catches most
of my errors and then localhost_log.
All of course stapled with a datestamp.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:02 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


apologize for coming in late if this was resolved... Are you saying Tomcat
just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:


Hello,

I have a strange situation.

Tomcat has stopped logging today on my prod. server. Not sure why. All
  

of


the app seems to be working just fine, but the key log file stopped
generating new info.

I have a scheduled task stop and restart Tomcat every morning around
  

6am,


so as to dump bad threads if there are any.

Usually it resumes just fine.

Any idea as to why this would occur?

Thanks!
  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring a DataSourceRealm

2007-05-29 Thread Paulo Vivacqua

Hi David,

The "j_security_check is not a real page it´s a key for communicating
with tomcat. I lookup all my code and there is no reference to JNDI
jdbc.

If I comment my Realm declaration on server.xml i get to the login
page without any problem, and the authentication works, but the user
info is retrieved from the  tomcat-users file not from the database.

I have my realm declaration placed right below the  on my
server.xml.  Is it in the right place? can I have both?

thanks again



On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:

Somewhere in your code, probably in j_security_check, there is a reference
to a datasource, which will reference the JNDI value.  You need to change
that reference from jdbc to jdbc/oaso.

-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 10:46 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Configuring a DataSourceRealm

Hi David, Thanks for the help.

I don´t have a reference to JNDI jdbc on my code. What I have is a login
page with a form that´s sent to tomcat for authentication.







I restarted tomcat and what  I am getting a login window for TomCat Manager
Application. I tried using the a user and a password configured on
tomcat-users but none of them work.

the application error:

do-dist:
dist:
F:\Paulo\ICESP\6sem\java\projetos\RealmJdbcTeste\nbproject\build-impl.xml:45
2:
Deployment error:
Access to Tomcat server has not been authorized. Set the correct username
and password with the "manager" role in the Tomcat customizer in the Server
Manager.
See the server log for details.
BUILD FAILED (total time: 57 seconds)


the tomcat error

29/05/2007 14:39:23 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
282)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:180)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:490)
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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Thread.java:619)





On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> In your code where you reference JNDI "jdbc", reference "jdbc/oaso"
instead.
>
>
> -Original Message-
> From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 8:37 AM
> To: Tomcat Users List
> Subject: Re: Configuring a DataSourceRealm
>
> Hello chris,
>
> Thanks again for the help.I will try to be more clear so that maybe
> you could help figure out what I am doing wrong.
>
> Like I said before I am trying to setup a DataSourceRealm to
> authenticate users by pull out the user information from a MySQL database.
>
> 1- I already created the tables and columns in my database that
> conforms to the requirements.
>
> 2 - I also configured a JNDI named jdbc/oaso on TomCat Server
> Administration. I tested this connection through a DBCP and it´s
> working fine.
>
> 3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso
> between the  tags
>
> 4-  I configured the  on the web.xml
>
> When I run the project I get the following error:
>
> 29/05/2007 12:23:55 org.apache.catalina.realm.DataSourceRealm open
> SEVERE: Exception performing authentication
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
> at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.

Re: Anybody using GNU Java

2007-05-29 Thread Martin Dubuc

I would not recommend using GNU java with Tomcat.

I remember I struggled with installation of JDK 6 on FC5 or FC6 when
it was first released. I figured eventually that there were some
directories that were supposed to be installed by the jpackage-utils
RPM that JDK was looking for that were not on the system. The
directories in question are /usr/lib/java-1.6.0 and
/usr/share/java-1.6.0. I don't remember the exact details, but I think
that the script that runs javac is trying to access library classes in
these directories, but failing to find the directories, it aborts and
returns some crypting error message. Once I manually fixed my build
server, simply adding the missing directories, things started to work.
The version of the jpackage-utils RPM that was installed on my server
when I noticed the problem was jpackage-utils-1.6.6-1jpp_2rh, but
there are no issues with the version that is currently installed on my
system (jpackage-utils-1.7.3-1jpp.2.fc6).

I also spent some time to find a way to cleanly install Sun's JDK on
Fedora Core system using the alternatives procedure. Here is a script
that can be used to force the system to default to Sun's JDK instead
of GNU java:

#!/bin/sh

JAVA_HOME=/usr/java/jdk1.6.0

alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac
1440 --slave /usr/bin/jar jar ${JAVA_HOME}/bin/jar --slave
/usr/bin/jarsigner jarsigner ${JAVA_HOME}/bin/jarsigner --slave
/usr/bin/javadoc javadoc ${JAVA_HOME}/bin/javadoc --slave
/usr/bin/javah javah ${JAVA_HOME}/bin/javah --slave /usr/bin/rmic rmic
${JAVA_HOME}/bin/rmic --slave /usr/lib/jvm-exports/java
java_sdk_exports ${JAVA_HOME} --slave /usr/lib/jvm/java java_sdk
${JAVA_HOME}

alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 1440
--slave /usr/bin/keytool keytool ${JAVA_HOME}/bin/keytool --slave
/usr/bin/rmiregistry rmiregistry ${JAVA_HOME}/bin/rmiregistry --slave
/usr/lib/jvm-exports/jre jre_exports ${JAVA_HOME}/jre --slave
/usr/lib/jvm/jre jre ${JAVA_HOME}/jre

Martin

On 5/29/07, Leon Rosenberg <[EMAIL PROTECTED]> wrote:

On 5/29/07, Omar Eljumaily <[EMAIL PROTECTED]> wrote:
>
> So anyway, is anybody successfully using GNU Java?

I dont think its possible. It simply doesnt work.

If not, does anybody
> have any tips for installing the proper version of Sun's Java on FC6?


Yes.
Goto
http://java.sun.com/javase/downloads/index.jsp

Select
JDK 6u1

Select your OS version.

Download the binary, run it in a folder of your choice.

set JAVA_HOME.

ready.
Leon

P.S. I usually link /usr/local/java to the download location i.e.
/opt/java/jdk.1.6.0
and set the JAVA_HOME to /usr/local/java, and add $JAVA_HOME/bin/ to $PATH.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Anybody using GNU Java

2007-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Omar,

Omar Eljumaily wrote:
> in a production Tomcat environment?  I tried this once before a few
> years ago, and ran into some nasty bugs.  Sun's Java, for me, is getting
> a bit weird, especially on Linux.  I never quite know which version to
> download, each one having at least two or three different numbers
> associated with it.  "That's Java Super Enterprise 6, with SDK version
> 5, etc"

It shouldn't be that complicated. The Enterprise Edition contains all
the junk you need for stuff like EJB, etc. If you just need servlets,
then stick with the J2SE ("Standard Edition"). JDK includes compiler and
code samples (as well as the runtime), while the JRE is just the runtime.

You should pick a version (1.4, 1.5, 1.6) and then stick with the latest
release available for that version (say, 1.5.0_11-b03 is what I have for
the 1.5 JDK).

> The latest problem I'm running into is that I'm trying to update to
> Fedora 6 which uses libstdc++.so.6, and Sun's java insists on version
> 5.

Wow! And here I am stuck on libstdc++ 2.7, 2.8, and 2.9.

You should be able to install more than one version of that library
side-by-side... (and I question those version numbers...)

> I suppose I could install 5, but I feel that creepy dependency hell
> feeling coming on when I think about it.

Did you try downloading directly from Sun's site? Or, is this a package
that comes from Red Hat (or, worse, a 3rd-party)?

Are you sure that is a Java dependency? It is more likely to be the
package maintainer's dependency rather than Java's. You should contact
the package maintainer to determine why your Java package requires that
version of libstdc++.

> So anyway, is anybody successfully using GNU Java?  If not, does anybody
> have any tips for installing the proper version of Sun's Java on FC6?

Sadly, everything I've ever read on this and other lists about the GNU
version of Java is that it causes more problems than it's worth. I'm
also sad to say that when asking questions on this particular list about
running Tomcat on GNU java, the only response you are likely to get is
"switch to Sun's JDK and save yourself the trouble".

Good luck,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXHg59CaO5/Lv0PARAiE4AJsH57MLY6/VGEqXKpPgjdse6NjUBACfaPvK
dA+2tBSel9GTBchOMJcmbIY=
=DCL2
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring a DataSourceRealm

2007-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paulo,

Paulo Vivacqua wrote:
> Like I said before I am trying to setup a DataSourceRealm to
> authenticate users by pull out the user information from a MySQL
> database.

You should remove the MemoryRealm from your configuration if you are
going to use a DataSourceRealm.

> 2 - I also configured a JNDI named jdbc/oaso on TomCat Server
> Administration. I tested this connection through a DBCP and it´s
> working fine.
> 
> 3- I created a Realm inside the  server.xml to use the JNDI jdbc/oaso
> between the  tags

You have created a server-level data source. You need to remove
localDataSource="true" from your  configuration. That setting
means "this is a data source defined in this "... and you
haven't done that.

Finally, you should throw /all/ that configuration out of server.xml and
instead use /META-INF/context.xml just like all the Tomcat 5.x
docs say.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXHnS9CaO5/Lv0PARAv1SAKCScnUeBKkSvMF+UB2o331M24L0kwCgrDgj
Oq1bc8SMdIaBxQe/NVVhJcA=
=I9T3
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat comet, not working...

2007-05-29 Thread Filip Hanik - Dev Lists

as a client I use

http://people.apache.org/~fhanik/cometgui.jar

The client automatically translates \n into CRLF for the HTTP protocol

To do what you need to do, do this
0. java -jar cometgui.jar
1. Click "Connect"
2. Click "Submit"
3. Erase the headers, make sure the next text looks like this:


10
test data test 1


omit the XML tags of course,
then click "Submit" again.

The source code for the app is inside, it is very basic,
Filip

Peter Warren wrote:

Filip, could you post some client code that sends two separate messages
to the server on the same output stream and generates both a begin event
and then a subsequent read event.

Thanks,
Peter
(I'm the guy who started the "comet read event" thread.  I never heard
back after you asked me which connector I was using, and I'm still
struggling with it.)

Filip Hanik - Dev Lists wrote:
  

you don't really have to do that much, here is mine

package org.hanik.comet.test;


import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.apache.catalina.CometEvent;
import org.apache.catalina.CometProcessor;



public class TestCometServlet extends HttpServlet implements
CometProcessor {
 public void event(CometEvent event)
   throws IOException, ServletException {
   System.out.println("Received an event:"+event);
   event.setTimeout(5000);
   if (event.getEventType() == CometEvent.EventType.END ||
   event.getEventType() == CometEvent.EventType.ERROR ) {
   event.close();
   } else if (event.getEventType() == CometEvent.EventType.READ) {
   InputStream is =
event.getHttpServletRequest().getInputStream();
   byte[] buf = new byte[512];
   do {
   int n = is.read(buf); //can throw an IOException
   if (n > 0) {
   System.out.println("Read " + n + " bytes: " + new
String(buf, 0, n) + " for session: " +
event.getHttpServletRequest().getSession(true).getId());
   } else if (n < 0) {
   event.close();
   return;
   }
   } while (is.available() > 0);

   }
   }
  }



Szabolcs Márton wrote:


i will send later, i cant ftp from here.
any other ideas?

i would like if somebody, who made this cometprocessor worked describe
the things what have to do. I already done what is in tomcat docs
(advanced NIO)

regards,
Saby

2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>:
  

send us a link to your test WAR file, and I can give it a shot, looks
good to me.

Filip

Márton Szabolcs wrote:


Hi!

i set my connector like this.
it should be correct, isnt it?

  

protocol="org.apache.coyote.http11.Http11NioProtocol"


maxThreads="150" connectionTimeout="2"
redirectPort="8443" />


CometSampleServlet
sample.CometSampleServlet


CometSampleServlet
/CometSampleServlet


public class CometSampleServlet
extends HttpServlet  implements CometProcessor {

protected ArrayList connections =
new ArrayList();
protected MessageSender sender = null;

/**
 */
public void event(CometEvent event) throws IOException,
  

ServletException {


HttpServletRequest request = event.getHttpServletRequest();



but my service method still invoked
is any settings should take?


this example from:
http://journal.mycom.co.jp/special/2007/tomcat6/014.html
(its japanese, but you could see in the black text areas)

regards,
Szabi

35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó
  

kézhez kapja a maga könyvét.


http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm



  





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date:
  

5/27/2007 3:05 PM

-

To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
T

RE: Tomcat stopped logging

2007-05-29 Thread Propes, Barry L
yeah, I didn't think there was, or that I'd had trouble with the number of 
files in the directory before. Would seem absurd.
Might be on a different OS that Windows is picky that way.

-Original Message-
From: David kerber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:00 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


Propes, Barry L wrote:
> I'm not even close to that!
> I'm at about 4.7 MB! For the logs anyway...isn't that the directory to which 
> you're referring?
>
> But one thing I do wonder about...seems as if someone had told me one time 
> there was a finite amount of folders or items that could be in a Windows 
> directory, like 256 for example. I currently have 253, but I haven't 
> encountered this problem since a few weeks back. 
>   
If there is a limit (and I don't think there is except for the root 
directory), it's huge; I have several NTFS directories with tens of 
thousands of files in them.

d

> I did go ahead and zip up a bunch of old log files, but I don't think it was 
> too big of an issue at the time.
>
> -Original Message-
> From: Daniel Stephens [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 12:17 PM
> To: Tomcat Users List
> Subject: Re: Tomcat stopped logging
>
>
> I can't remember off the top of my head but I think there is a 2GB limit(OS
> Level). but I'd have to try and find that, to be totally sure.
>
> On 5/29/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
>   
>> yeah, it did one day. It had logged up until about 11:45am one day, and
>> then inexplicably stopped.
>> Not sure why, because more errors did occur.
>>
>> I had a few logs, with one being catalina_log (prefix), the other being
>> localhost_admin_log, another being localhost_DBTest_log, which catches most
>> of my errors and then localhost_log.
>> All of course stapled with a datestamp.
>>
>> -Original Message-
>> From: Daniel Stephens [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, May 29, 2007 9:02 AM
>> To: Tomcat Users List
>> Subject: Re: Tomcat stopped logging
>>
>>
>> apologize for coming in late if this was resolved... Are you saying Tomcat
>> just stop's logging to the catalina.out?
>>
>> On 5/9/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:
>> 
>>> Hello,
>>>
>>> I have a strange situation.
>>>
>>> Tomcat has stopped logging today on my prod. server. Not sure why. All
>>>   
>> of
>> 
>>> the app seems to be working just fine, but the key log file stopped
>>> generating new info.
>>>
>>> I have a scheduled task stop and restart Tomcat every morning around
>>>   
>> 6am,
>> 
>>> so as to dump bad threads if there are any.
>>>
>>> Usually it resumes just fine.
>>>
>>> Any idea as to why this would occur?
>>>
>>> Thanks!
>>>   



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configuring a DataSourceRealm

2007-05-29 Thread Propes, Barry L
I don't believe you can have both, Paulo...i believe it's one realm or the 
other if I'm not mistaken.

-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:07 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Configuring a DataSourceRealm


Hi David,

The "j_security_check is not a real page it´s a key for communicating
with tomcat. I lookup all my code and there is no reference to JNDI
jdbc.

If I comment my Realm declaration on server.xml i get to the login
page without any problem, and the authentication works, but the user
info is retrieved from the  tomcat-users file not from the database.

I have my realm declaration placed right below the  on my
server.xml.  Is it in the right place? can I have both?

thanks again



On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> Somewhere in your code, probably in j_security_check, there is a reference
> to a datasource, which will reference the JNDI value.  You need to change
> that reference from jdbc to jdbc/oaso.
>
> -Original Message-
> From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 10:46 AM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Re: Configuring a DataSourceRealm
>
> Hi David, Thanks for the help.
>
> I don´t have a reference to JNDI jdbc on my code. What I have is a login
> page with a form that´s sent to tomcat for authentication.
>
> 
> 
> 
> 
> 
>
> I restarted tomcat and what  I am getting a login window for TomCat Manager
> Application. I tried using the a user and a password configured on
> tomcat-users but none of them work.
>
> the application error:
> 
> do-dist:
> dist:
> F:\Paulo\ICESP\6sem\java\projetos\RealmJdbcTeste\nbproject\build-impl.xml:45
> 2:
> Deployment error:
> Access to Tomcat server has not been authorized. Set the correct username
> and password with the "manager" role in the Tomcat customizer in the Server
> Manager.
> See the server log for details.
> BUILD FAILED (total time: 57 seconds)
> 
>
> the tomcat error
> 
> 29/05/2007 14:39:23 org.apache.catalina.realm.DataSourceRealm open
> SEVERE: Exception performing authentication
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
> at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
> at
> org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
> 282)
> at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
> nticator.java:180)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:490)
> 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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
> onnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
> rkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> at java.lang.Thread.run(Thread.java:619)
> 
>
>
>
>
> On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> > In your code where you reference JNDI "jdbc", reference "jdbc/oaso"
> instead.
> >
> >
> > -Original Message-
> > From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 29, 2007 8:37 AM
> > To: Tomcat Users List
> > Subject: Re: Configuring a DataSourceRealm
> >
> > Hello chris,
> >
> > Thanks again for the help.I will try to be more clear so that maybe
> > you could help figure out what I am doing wrong.
> >
> > Like I said before I am trying to setup a DataSourceRealm to
> > authenticate users by pull out the user information from a MySQL database.
> >
> > 1- I already created the tables and columns in my database that
> > conforms to the requirements.
> >
> > 2 - I also configured a JNDI named jdbc/oaso on TomCat Server
> > Administration. I tested this connection through a DBCP and it´s
> > working fine.
> >
> > 3- I created a Realm inside the  

Where to find session cookies

2007-05-29 Thread lightbulb432

When testing my application that uses sessions, I don't seem to see a cookie
with domain localhost in my browser's cookies folder. Does Tomcat use some
internal folder to put its cookies, or am I just doing something else wrong?

I do have cookies enabled, so it's not writing the session id to the URL,
either.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Where-to-find-session-cookies-tf3835973.html#a10860700
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where to find session cookies

2007-05-29 Thread Caldarale, Charles R
> From: lightbulb432 [mailto:[EMAIL PROTECTED] 
> Subject: Where to find session cookies
> 
> When testing my application that uses sessions, I don't seem 
> to see a cookie with domain localhost in my browser's cookies
> folder. Does Tomcat use some internal folder to put its cookies,

Think about what you're asking:  how can a server influence where a
browser running on some arbitrary platform keeps track of cookies using
HTTP protocol?  That's entirely up to the whims of the browser.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Web application receives request parameters sent to another application on Tomcat 6

2007-05-29 Thread Filip Hanik - Dev Lists
What connector are you using? ie, how does the  element look 
in server.xml?


Filip

Dejan Krsmanovic wrote:

We have two applications running on the same Tomcat instance. These two
applications are used by completely different people and one of them has
much higher traffic than another one.
Recently we have upgraded to Tomcat 6.10 and start experiencing strange
behavior. After a lot of debugging, we have noticed that the first
application sometimes receives request parameters sent to second
application. Parameters are mixed-up, that is, request.getParameterMap()
returns parameters from both applications. This is not happening all the
time (probably because one of these applications is used rarely), but we
had this situation several times a day.
After some time we have decided to return back to Tomcat 5.5.x and the
problems stopped.

What can be reason for such problems? Is it possible that Tomcat re-uses
some objects internally without clearing them up?

Regards,
Dejan




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Jessica Johnson

On 5/29/07, Rainer Jung <[EMAIL PROTECTED]> wrote:


Hi Jessica,

your information looks strange. You are talking about mod_jk 1.2.22, but
you present a configuration for mod_jk2, which is deprecated. mod_jk
will not work with this configuration, because mod_jk uses a very
different config syntax.



Strangely enough it did work - I don't know how.  But I changed configs to
the below in case that was part of the problem.  Everything is still working
the same as far as I can tell.

I don't know if I need the load balancer since I only have one other
worker.  Will the load balancer affect performance?

workers.properties
# Define some properties
workers.apache_log="C:\Program Files\Apache Software
Foundation\Apache2.2\logs"
workers.tomcat_home="C:\Program Files\Apache Software Foundation\Tomcat 5.5"
workers.java_home="C:\Program Files\Java\jrockit-R27.2.0-jre1.5.0_10"
ps=\
# Define 2 workers, 1 real workers using ajp13, the last one being a
loadbalancing worker
worker.list=worker2, worker4

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=127.0.0.1
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.connection_pool_timeout=600
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=60

# Set properties for worker4 (lb) which use worker2
worker.worker4.balance_workers=worker2




httpd.conf exerpt:

# Config for mod_jk

 LoadModule jk_module "C:/Program Files/Apache Software
Foundation/Apache2.2/modules/mod_jk.so"


JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat 5.5
/conf/jk/workers.properties"
JkLogFile "C:/Program Files/Apache Software Foundation/Tomcat 5.5
/logs/mod_jk.log"
JkLogLevelinfo

JkMount /*.jsp worker2
JkMount /*/servlet/ worker2
JkMount /jsp-examples/* worker2
JkMount /reporting/* worker2



Although I don't know your actual configs, I assume your problem happens

when requests take longer than 300 seconds, which is the default request
timeout with Apache. You can increase this with Apache Timeout
directive. You can measure response times by adding "%D" to your
LogFormat (microseconds response time).



I added
TimeOut 1200
KeepAliveTimeout 30

To the end of httpd.conf which didn't fix the original 503 problem.  I also
noticed that sometimes I don't get the error at all, but the html response
is incomplete.  I will experiment some with %D and see if I can learn more
about the problem.  In the meantime, I would appreciate any ideas you all
might have.

Thanks,

jessica

Regards,


Rainer

Jessica Johnson wrote:
> Hi all,
>
> I finally got a mostly working install of Apache 2.2.4, Tomcat 5.5.23,
> and the mod_jk 1.2.22.  In the general case it works fine, but for
> pages that take a long time to load, I get the first part of the html,
> and then Apache spits out "OK The server is temporarily unable to
> service your request due to maintenance downtime or capacity problems.
> Please try again later."  It's a reporting system that needs to do
> some intensive DB queries and calculations before rendering.
>
> Is there some way I can increase the time Apache waits before giving
> the 503 error? Or better yet, what are some strategies for optimizing
> my configuration?  I'm a newbie with this type of setup, so I may be
> missing something entirely obvious.
>
> There was nothing strange in any of the logs, except this snip from
> access.log showing the 503:
> 196.40.54.218 - - [29/May/2007:10:30:04 -0500] "GET
> /reporting/data_reports.jsf?reportStyle=3 HTTP/1.1" 200 90024
> 196.40.54.218 - - [29/May/2007:10:31:17 -0500] "GET
> /reporting/data_reports.jsf?reportStyle=4 HTTP/1.1" 503 90289
>
> Here is my workers.properties file.
>
> [logger]
> level=DEBUG
> file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.log
> [config]
> file=C:/Program Files/Apache Software
> Foundation/Apache2.2/conf/workers2.properties
> debug=0
> debugEnv=0
>
>
> [shm]
> file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.shm
> size=1048576
>
> # socket channel
> [channel.socket:localhost:8009]
> port=8009
> host=127.0.0.1
>
> # worker for the connector
> [ajp13:localhost:8009]
> channel=channel.socket:localhost:8009
>
> [status:status]
>
> [uri:/status/*]
> worker=status:status
>
> [uri:/jsp-examples/*.jsp]
> worker=ajp13:localhost:8009
>
> [uri:/reporting/*.jsp]
> worker=ajp13:localhost:8009
>
> [uri:/*.jsp]
> worker=ajp13:localhost:8009

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Where to find session cookies

2007-05-29 Thread ROOKIE

If u are referring to session cookies (jsessionid and jsessionidsso) then the 
http servlet request contains a method called getCookies() where u can find the 
cookies and use them for further use by storing them im memory, once the 
response is received by browser it is upto it where and how it stores it.

Vinod

- Original Message 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Wednesday, May 30, 2007 1:02:06 AM
Subject: RE: Where to find session cookies

> From: lightbulb432 [mailto:[EMAIL PROTECTED] 
> Subject: Where to find session cookies
> 
> When testing my application that uses sessions, I don't seem 
> to see a cookie with domain localhost in my browser's cookies
> folder. Does Tomcat use some internal folder to put its cookies,

Think about what you're asking:  how can a server influence where a
browser running on some arbitrary platform keeps track of cookies using
HTTP protocol?  That's entirely up to the whims of the browser.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






   
Get
 the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring a DataSourceRealm

2007-05-29 Thread Paulo Vivacqua

Hello Christopher,

It worked. Thanks very much for the tips.

have a nice day
Paulo Vivacqua


On 5/29/07, Propes, Barry L <[EMAIL PROTECTED]> wrote:

I don't believe you can have both, Paulo...i believe it's one realm or the 
other if I'm not mistaken.

-Original Message-
From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:07 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Configuring a DataSourceRealm


Hi David,

The "j_security_check is not a real page it´s a key for communicating
with tomcat. I lookup all my code and there is no reference to JNDI
jdbc.

If I comment my Realm declaration on server.xml i get to the login
page without any problem, and the authentication works, but the user
info is retrieved from the  tomcat-users file not from the database.

I have my realm declaration placed right below the  on my
server.xml.  Is it in the right place? can I have both?

thanks again



On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> Somewhere in your code, probably in j_security_check, there is a reference
> to a datasource, which will reference the JNDI value.  You need to change
> that reference from jdbc to jdbc/oaso.
>
> -Original Message-
> From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 10:46 AM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Re: Configuring a DataSourceRealm
>
> Hi David, Thanks for the help.
>
> I don´t have a reference to JNDI jdbc on my code. What I have is a login
> page with a form that´s sent to tomcat for authentication.
>
> 
> 
> 
> 
> 
>
> I restarted tomcat and what  I am getting a login window for TomCat Manager
> Application. I tried using the a user and a password configured on
> tomcat-users but none of them work.
>
> the application error:
> 
> do-dist:
> dist:
> F:\Paulo\ICESP\6sem\java\projetos\RealmJdbcTeste\nbproject\build-impl.xml:45
> 2:
> Deployment error:
> Access to Tomcat server has not been authorized. Set the correct username
> and password with the "manager" role in the Tomcat customizer in the Server
> Manager.
> See the server log for details.
> BUILD FAILED (total time: 57 seconds)
> 
>
> the tomcat error
> 
> 29/05/2007 14:39:23 org.apache.catalina.realm.DataSourceRealm open
> SEVERE: Exception performing authentication
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
> at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
> at
> org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
> 282)
> at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
> nticator.java:180)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:490)
> 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.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
> onnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
> rkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> at java.lang.Thread.run(Thread.java:619)
> 
>
>
>
>
> On 5/29/07, David Short <[EMAIL PROTECTED]> wrote:
> > In your code where you reference JNDI "jdbc", reference "jdbc/oaso"
> instead.
> >
> >
> > -Original Message-
> > From: Paulo Vivacqua [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 29, 2007 8:37 AM
> > To: Tomcat Users List
> > Subject: Re: Configuring a DataSourceRealm
> >
> > Hello chris,
> >
> > Thanks again for the help.I will try to be more clear so that maybe
> > you could help figure out what I am doing wrong.
> >
> > Like I said before I am trying to setup a DataSourceRealm to
> > authenticate users by pull out the user information from a MySQL database.
> >
> > 1- I already created the tables and columns in my database that
> > conforms to the requirements.
> >
> > 2 - I also configured a JNDI named jd

Re: Where to find session cookies

2007-05-29 Thread Pid

lightbulb432 wrote:

When testing my application that uses sessions, I don't seem to see a cookie
with domain localhost in my browser's cookies folder. Does Tomcat use some
internal folder to put its cookies, or am I just doing something else wrong?


Where your browser stores it's cookies is none of Tomcat's business, nor 
is it something Tomcat can dictate.  Why not clear your cookies and test 
again but only visit the test server - it should be pretty clear to see 
if Tomcat is writing a cookie.


You can also use Firebug in Firefox to actually see the 'Set-Cookie: 
JSESSIONID=466B27CDDCC1; Path=/' header being set by 
the JSP/Servlet etc.


p


I do have cookies enabled, so it's not writing the session id to the URL,
either.

Thanks.




smime.p7s
Description: S/MIME Cryptographic Signature


RE: Where to find session cookies

2007-05-29 Thread Fargusson.Alan
Session cookies are not stored on disk.  This is why they are more secure then 
cookies (non-session).  Since they only exist in RAM (ok, maybe in swap files) 
nobody else using that machine can find them, and they go away when the browser 
ends.

-Original Message-
From: lightbulb432 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 12:15 PM
To: users@tomcat.apache.org
Subject: Where to find session cookies



When testing my application that uses sessions, I don't seem to see a cookie
with domain localhost in my browser's cookies folder. Does Tomcat use some
internal folder to put its cookies, or am I just doing something else wrong?

I do have cookies enabled, so it's not writing the session id to the URL,
either.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Where-to-find-session-cookies-tf3835973.html#a10860700
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Rainer Jung

Jessica Johnson wrote:

On 5/29/07, Rainer Jung <[EMAIL PROTECTED]> wrote:


Hi Jessica,

your information looks strange. You are talking about mod_jk 1.2.22, but
you present a configuration for mod_jk2, which is deprecated. mod_jk
will not work with this configuration, because mod_jk uses a very
different config syntax.



Strangely enough it did work - I don't know how.  But I changed configs to
the below in case that was part of the problem.  Everything is still 
working

the same as far as I can tell.

I don't know if I need the load balancer since I only have one other
worker.  Will the load balancer affect performance?

workers.properties
# Define some properties
workers.apache_log="C:\Program Files\Apache Software
Foundation\Apache2.2\logs"


That doesn't exist and will be ignored.

workers.tomcat_home="C:\Program Files\Apache Software Foundation\Tomcat 
5.5"

workers.java_home="C:\Program Files\Java\jrockit-R27.2.0-jre1.5.0_10"
ps=\


Those three are generally not needed and will be ignored


# Define 2 workers, 1 real workers using ajp13, the last one being a
loadbalancing worker
worker.list=worker2, worker4

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=127.0.0.1
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.connection_pool_timeout=600
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=60


Don't use a socket_timeout if you expect long waiting intervals, at 
least not on your first try.



# Set properties for worker4 (lb) which use worker2
worker.worker4.balance_workers=worker2



This will be ignored unless you add worker.worker4.type=lb


httpd.conf exerpt:

# Config for mod_jk

 LoadModule jk_module "C:/Program Files/Apache Software
Foundation/Apache2.2/modules/mod_jk.so"


JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat 5.5
/conf/jk/workers.properties"
JkLogFile "C:/Program Files/Apache Software Foundation/Tomcat 5.5
/logs/mod_jk.log"
JkLogLevelinfo


You can try JkLogLevel debug or even trace, once you can reproduce your 
problem with low load.



JkMount /*.jsp worker2
JkMount /*/servlet/ worker2
JkMount /jsp-examples/* worker2
JkMount /reporting/* worker2

Although I don't know your actual configs, I assume your problem happens

when requests take longer than 300 seconds, which is the default request
timeout with Apache. You can increase this with Apache Timeout
directive. You can measure response times by adding "%D" to your
LogFormat (microseconds response time).



I added
TimeOut 1200
KeepAliveTimeout 30

To the end of httpd.conf which didn't fix the original 503 problem.  I also
noticed that sometimes I don't get the error at all, but the html response
is incomplete.  I will experiment some with %D and see if I can learn more
about the problem.  In the meantime, I would appreciate any ideas you all
might have.


Good luck. BTW: usually there already is a Timeout directive in 
httpd.conf, so you might have now two ones with inconsistent values ...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Jessica Johnson

I just noticed something strange.  It isn't exactly that the HTML is
cut off.  All of the parts match the output on my dev server.  But it
looks like the HTML has been chunked up and mixed up, for lack of a
better way to describe it.  For example one of the pages has two head
tags, but is missing some of the other chunks.

Here's an example line from the dev server:

Snapnames
2231.79%450.00%2$1.00$2.00$4.002

And here is the same line from production server:

Snapnames
2231.79%450.00%2$1.00$2.00$4.002

That is the first place where the html deviates.  After that follows
another chunk of html that should appear further down the page.  I'm
baffled.  Anyone know what could be causing it?

The problem seems to appear only on longer pages.  I haven't gotten
the 503 error lately, the TimeOut and KeepAliveTimeout directives
might have fixed it.

jessica

On 5/29/07, Jessica Johnson <[EMAIL PROTECTED]> wrote:




On 5/29/07, Rainer Jung <[EMAIL PROTECTED]> wrote:




> Although I don't know your actual configs, I assume your problem happens
> when requests take longer than 300 seconds, which is the default request
> timeout with Apache. You can increase this with Apache Timeout
> directive. You can measure response times by adding "%D" to your
>  LogFormat (microseconds response time).


I added
TimeOut 1200
KeepAliveTimeout 30

To the end of httpd.conf which didn't fix the original 503 problem.  I also 
noticed that sometimes I don't get the error at all, but the html response is 
incomplete.  I will experiment some with %D and see if I can learn more about 
the problem.  In the meantime, I would appreciate any ideas you all might have.

Thanks,

jessica



> Regards,
>
> Rainer
>
> Jessica Johnson wrote:
> > Hi all,
> >
> > I finally got a mostly working install of Apache 2.2.4, Tomcat 5.5.23,
> > and the mod_jk 1.2.22.  In the general case it works fine, but for
> > pages that take a long time to load, I get the first part of the html,
> > and then Apache spits out "OK The server is temporarily unable to
> > service your request due to maintenance downtime or capacity problems.
> > Please try again later."  It's a reporting system that needs to do
> > some intensive DB queries and calculations before rendering.
> >
> > Is there some way I can increase the time Apache waits before giving
> > the 503 error? Or better yet, what are some strategies for optimizing
> > my configuration?  I'm a newbie with this type of setup, so I may be
> > missing something entirely obvious.
> >
> > There was nothing strange in any of the logs, except this snip from
> > access.log  showing the 503:
> > 196.40.54.218 - - [29/May/2007:10:30:04 -0500] "GET
> > /reporting/data_reports.jsf?reportStyle=3 HTTP/1.1" 200 90024
> >  196.40.54.218 - - [29/May/2007:10:31:17 -0500] "GET
> > /reporting/data_reports.jsf?reportStyle=4 HTTP/1.1" 503 90289
> >
> > Here is my workers.properties file.
> >
> > [logger]
> > level=DEBUG
> > file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.log
> > [config]
> > file=C:/Program Files/Apache Software
> > Foundation/Apache2.2/conf/workers2.properties
> > debug=0
> > debugEnv=0
> >
> >
> > [shm]
> > file=C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk2.shm
> > size=1048576
> >
> > # socket channel
> > [channel.socket:localhost:8009]
> > port=8009
> > host=127.0.0.1
> >
> > # worker for the connector
> > [ajp13:localhost:8009]
> > channel=channel.socket:localhost:8009
> >
> > [status:status]
> >
> > [uri:/status/*]
> > worker=status:status
> >
> > [uri:/jsp-examples/*.jsp]
> > worker=ajp13:localhost:8009
> >
> > [uri:/reporting/*.jsp]
> > worker=ajp13:localhost:8009
> >
> > [uri:/*.jsp]
> > worker=ajp13:localhost:8009
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail:  [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Questions about Contexts

2007-05-29 Thread lightbulb432

How are extremely large web applications divided up into contexts (as I’d
imagine these applications don’t reside within just a single WAR)? Let’s say
you have different functional areas, like user registration, search, file
management, etc, could each of those be divided up into its own context, or
is that too fine-grained?

Do any of you manage applications that, while logically being "one"
application, are actually deployed to multiple contexts? If so, could you
share some of your experiences in doing this – the benefits and limitations:
not only with single sign-on (which Tomcat makes easy), but things like
session management, concurrency to the data layer, and things that I can’t
even think of…

Or is dividing up one WAR into multiple WARs or the other way around as
simple as cutting and pasting the appropriate JSPs/Servlets/JavaBeans and
tweaking the web.xml files accordingly? I’d imagine there’s much else that
needs to be watched out for.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Questions-about-Contexts-tf3836951.html#a10863826
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error 503 in middle of page with tomcat and jk connector

2007-05-29 Thread Jessica Johnson

Thanks Rainer,

I updated the workers.properties with your suggestions, and verified
that there is only one timeout directive in httpd.conf.  Afterwards, I
found some interesting things poking through the logs.

mod_jk.log

[Tue May 29 17:44:55 2007] [1060:1860] [debug] mod_jk.c (452): written
8184 out of 8184
[Tue May 29 17:44:55 2007] [1060:1860] [info]  jk_ajp_common.c (945):
(worker2) Tomcat has forced a connection close for socket 2432
[Tue May 29 17:44:55 2007] [1060:1860] [error] jk_ajp_common.c (1618):
(worker2) Tomcat is down or network problems. Part of the response has
already been sent to the client
[Tue May 29 17:44:55 2007] [1060:1860] [info]  jk_ajp_common.c (1902):
(worker2) receiving from tomcat failed, recoverable operation
attempt=1
[Tue May 29 17:44:55 2007] [1060:1860] [info]  jk_ajp_common.c (1941):
(worker2) sending request to tomcat failed,  recoverable operation
attempt=2
[Tue May 29 17:44:55 2007] [1060:1860] [error] jk_ajp_common.c (1953):
(worker2) Connecting to tomcat failed. Tomcat is probably not started
or is listening on the wrong port
[Tue May 29 17:44:55 2007] [1060:1860] [debug] jk_ajp_common.c (2286):
recycling connection pool slot=0 for worker worker2
[Tue May 29 17:44:55 2007] [1060:1860] [info]  mod_jk.c (2254):
Service error=0 for worker=worker2
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_uri_worker_map.c
(589): Attempting to map URI '/reporting/data_reports.jsf' from 4 maps
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_uri_worker_map.c
(601): Attempting to map context URI '/*/servlet/=worker2' source
'JkMount'
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_uri_worker_map.c
(601): Attempting to map context URI '/jsp-examples/*=worker2' source
'JkMount'
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_uri_worker_map.c
(601): Attempting to map context URI '/reporting/*=worker2' source
'JkMount'
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_uri_worker_map.c
(616): Found a wildchar match '/reporting/*=worker2'
[Tue May 29 17:45:36 2007] [1060:1860] [debug] mod_jk.c (2111): Into
handler jakarta-servlet worker=worker2 r->proxyreq=0
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_worker.c (114):
found a worker worker2
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_worker.c (321):
Maintaining worker worker2
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (2416):
reached pool min size 125 from 250 cache slots
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (2424):
recycled 0 sockets in 0 seconds from 250 pool slots
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_worker.c (321):
Maintaining worker worker4
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (2416):
reached pool min size 125 from 250 cache slots
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (2424):
recycled 0 sockets in 0 seconds from 250 pool slots
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_lb_worker.c (543):
decay with 2^1
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_worker.c (290):
Found worker type 'ajp13'
[Tue May 29 17:45:36 2007] [1060:1860] [debug] mod_jk.c (607): Service
protocol=HTTP/1.1 method=GET host=(null) addr=196.40.33.120
name=semoptimizer.com port=80 auth=(null) user=(null)
laddr=72.3.224.97 raddr=196.40.33.120
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (2343):
acquired connection pool slot=0
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (548):
ajp marshaling done
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (1796):
processing worker2 with 2 retries
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_connect.c (335):
socket TCP_NODELAY set to On
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_connect.c (348):
socket SO_KEEPALIVE set to On
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_connect.c (433):
trying to connect socket 2432 to 127.0.0.1:8009
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_connect.c (459):
socket 2432 connected to 127.0.0.1:8009
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (850):
Connected socket 2432 to (127.0.0.1:8009)
[Tue May 29 17:45:36 2007] [1060:1860] [debug] jk_ajp_common.c (896):
sending to ajp13 pos=4 len=536 max=8192


So maybe Tomcat is down...but why is it going down? I didn't see
anything in the Tomcat logs to indicate that it was going down.

And why "reached pool min size 125 from 250 cache slots?" I'm the only
one going to the pages.  I would think it would take more than just
one browser to use up 125 cache slots.

I have so far only been able to reproduce this problem on my
workstation, which has an internet connection from the stone age
(128Kb).  A friend was able to see the pages fine, and remoting in to
the server and accessing the pages from there works (using both the
domain name and localhost.)

Here's my new workers.properties:

# Define some properties
workers.apache_log="C:\Program Files\Apache Software
Foundation\Apache2.2\logs\error.log"
workers.tomcat_home="C:\Program 

war file name

2007-05-29 Thread Tomcat

Hello

there is a directive in server.xml or context file, which force  us having
war file name be the same as context file or the same as name of 
directory which

war file unpacked, would you please let me know which directive it is.

Thanks
Adam


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Jasper compiler crashes

2007-05-29 Thread Berglas, Anthony
Thanks for that, but I don't see how it will help.   If you look below
it is the jasper2 that is causing me grief, which is essentially the
same as yours.

How long does it take to precompile the JSPs.  Is it several JSPs per
second or several seconds per JSP?  My JSPs take over 20 seconds to
compile interactively, which would make precompiling all of them
infeasible except for a nightly build.
 
I'm surprised that your script needs those package rename hacks.  Feels
like precompiling into Tomcat's work area should be built in,
bin/precompileJsps.bat|.sh.

Thanks,

Anthony

> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 30, 2007 12:20 AM
> To: Tomcat Users List
> Subject: Re: Jasper compiler crashes
> 
> What I like to do is to compile my JSPs just like Tomcat would do it
> runtime, so that I can keep the ability to recompile my JSP files.
> 
> http://people.apache.org/~fhanik/precompile.html
> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
> 
> I just whipped up the v6 script, but I believe it to work properly.
> 
> Filip
> 
> Berglas, Anthony wrote:
> > When I try to precompile I get a null pointer exception deep in
> > .servlet.JasperLoader.loadClass.  Happens for almost all of my
.jsps.
> > They work fine with incremental compile.
> >
> > They do use tags defined with JSTL .tag files.  Tags call tags.
> >
> > tomcat-6.0.10-src
> >
> > If anyone knows of decent docs on precompiling Jasper please let me
> > know.  (I know about jasper-howto.html).
> >
> > (And there is an underlying problem that Jasper is *extremely* slow
to
> > compile.  I can compile and build all of Tomcat itself from source
in
> > less time than it takes to compile one medium sized JSP (about 30
> > seconds).  It is difficult to imagine how even the sloppiest code
could
> > run that slowly.  Something is wrong.  100% CPU.)
> >
> > Ant:-
> >
> > 
> >   
> > 
> >   
> > 
> > 
> >   
> > 
> >   
> > 
> > 
> >
> >
> > 
> > 
> >  >  validateXml="false"
> >  uriroot="${tomcat}/webapps/plain_eg"
> >  webXmlFragment="WEB-INF/generated_web.xml"
> >  outputDir="${tomcat}/webapps/plain_eg/WEB-INF/src"
> >  failOnError="false"
> > />
> > 
> >
> > Stack trace:-
> >
> >
> > May 29, 2007 4:20:38 PM org.apache.jasper.JspC processFile
> > SEVERE: ERROR-the file '\token\autocrudtokentest.jsp' generated the
> > following general exception:
> > java.lang.NullPointerException
> > at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
> > at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
> > at sun.misc.URLClassPath.getResource(URLClassPath.java:160)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > at
> >
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
> > at
> >
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
> > at
> >
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:
> > 598)
> > at
> >
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
> > r.java:221)
> > at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor
> > .java:576)
> > at
> >
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.
> > java:50)
> > at
> >
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
> > agFileProcessor.java:627)
> > at
> > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> > at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> > at
> > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> > at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
> > at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
> > at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> > at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcesso
> > r.java:645)
> > at
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
> > at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> > at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> > at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
> > at
> >
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
> > va:566)
> > at
> >
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
> > r.java:212)
> > at
> >
org.apache.jasper.compiler.TagFileProces

Re: Jasper compiler crashes

2007-05-29 Thread Rashmi Rubdi

On 5/29/07, Berglas, Anthony <[EMAIL PROTECTED]> wrote:

Thanks for that, but I don't see how it will help.   If you look below
it is the jasper2 that is causing me grief, which is essentially the
same as yours.

How long does it take to precompile the JSPs.  Is it several JSPs per
second or several seconds per JSP?  My JSPs take over 20 seconds to
compile interactively, which would make precompiling all of them
infeasible except for a nightly build.


Pre-compiling JSPs does take a while because, first JSPs are converted
to .java files , then the .java files are compiled to .class files,
and then the web.xml is modified.

Most people reserve pre-compiling JSPs to just before the app is ready
for deployment into production environment. Pre-compiling for
development, staging and other environments would take too much time
and effort unnecessarily.


I'm surprised that your script needs those package rename hacks.  Feels
like precompiling into Tomcat's work area should be built in,
bin/precompileJsps.bat|.sh.

Thanks,

Anthony



Regards
Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Administration web tool

2007-05-29 Thread Mark Thomas
Virgilio wrote:
> Is it possible using administration web tool with Tomcat 6?
No.

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: war file name

2007-05-29 Thread Mark Thomas
Tomcat wrote:
> there is a directive in server.xml or context file, which force  us having
> war file name be the same as context file or the same as name of
> directory which
> war file unpacked, would you please let me know which directive it is.

There is no such directive.

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Netbeans Project... WildCat

2007-05-29 Thread Len Popp

On 5/29/07, Mark Thomas <[EMAIL PROTECTED]> wrote:

Johnny Kewl wrote:
> I havent had a chance to test it yet, but where I'm trying to get to is the 
ability to debug from servlet straight  into Tomcat source.
This should be standard out of the box functionality. You shouldn't
need any extras to get this working. You don't with Eclipse as your
dev environment and I see no reason for Netbeans to be any different.


It's not quite out-of-the-box IME, but quite easy to debug into Tomcat
code using Eclipse + Web Standard Tools. You have to point Eclipse at
the source code whenever prompted (just browse to
apache-tomcat-?.?.?-src.zip). Also, you may find that Eclipse doesn't
know about all the Tomcat JARs that you run into. I created a library
for these JARs in my Eclipse project, and add them as required.

Note that I'm not talking about compiling Tomcat from source, just
debugging my own apps with an existing Tomcat release. And
understanding what's going on once you're inside Tomcat is something
else entirely. :-)
--
Len

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Making a directory visible to tomcat

2007-05-29 Thread Peter Dawn

guys,

i am using tomcat 5.0. now i have created a file on my server at
C:\data\packet.xml. when somebody accesses my web app remotely, i want
the user to type in http://ipaddress:8080/packet.xml to be able to
access this file.

can somebody please tell me how i can make a directory outside the
installation folder visible to tomcat.

thanks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet and Random Access File

2007-05-29 Thread Teh Noranis Mohd Aris
Hello All,
   
  Does anyone have an example of a servlet program that uses random access file 
or any useful links? I tried searching yahoo and google but could not find one 
that really suits my needs. Thank you.
   
  Yours Sincerely,
  TEH 

 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.

Re: content-type without charset

2007-05-29 Thread Mark Thomas
Richard Kaye wrote:
> Please could someone help me by posting a Hello-world 
> servlet that serves a document with this Content-Type 
> header?  I have tried all the obvious things with no 
> success...

Are you using a writer? If so, try using the stream instead.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]