Re: running tomcat under unix

2003-02-25 Thread Michael Hackl
try to use this:
setenv CATALINA_HOME
/home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/

else check your rights

Am Die, 2003-02-25 um 08.31 schrieb Swapneel Dange:
 i am trying to run TOMCAT 4.0 under unix, but i get the following messages 
 when i try to start the TOMCAT :
 
 
 [EMAIL PROTECTED] ./startup.sh
 Using CATALINA_BASE:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_HOME:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_TMPDIR: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/temp
 Using JAVA_HOME:   /local/jdk1.3.1
 touch: creating 
 `/home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/logs/catalina.out':
  
 No such file or directory
 [EMAIL PROTECTED] 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/bin/catalina.sh: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/logs/catalina.out: 
 No such file or directory
 
 yeah its true that there is no file known as 'catalina.out' in my folders 
 and there is no directory such as 'logs' inside the directory 'src'. do i 
 need to create a directory such as 'logs' or somethign like that.
 
 and i have set the following inside .cshrc -
 
 setenv JAVA_HOME /local/jdk1.3.1
 setenv CATALINA_HOME 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 
 i am literally CLUELESS as to whats going on there. do commment !
 
 
 Swapneel Dange
 505-642-4126
 http://www.cs.nmsu.edu/~sdange
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8. 
 http://join.msn.com/?page=features/junkmail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



configuration question

2003-02-25 Thread Balijepalli Sri-WLBS11

I was able to set up Tomcat successfully and created a new directory
under the webapps directory and placed my jsp files in the new directory
but am not able to access these jsp pages. For example, I named the new
directory as scode and tried to access a jsp page called test.jsp as
follows:

http://localhost:8080/scode/test.jsp

I am unable to access my test page under this new directory but am
able to access it when I put it in the examples/jsp directory under
webapps directory.

Am I missing something which is preventing me from accessing the
page from the new directory I created under the webapps directory?

Thanks for your help.


Regards,
Sridhar.


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



how to access the server from another computer

2003-02-25 Thread Sony Ho
Hello,

 As simple as the subject goes,  I've recently installed Tomcat4 on my 
windows2000 professional.   I've able to access the Apache Tomcat Welcome 
page from http://localhost:8081/index.jsp

My question is, how to access that same page from another computer 
connecting to internet??

Best Regards,
Sony
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail

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


Re: how to access the server from another computer

2003-02-25 Thread Peng Tuck Kwok
You need a public ip for that machine you are running tomcat on.
So after you have got the public ip (assuming everything is setup 
properly) the url can be accessed at
	http://[ip that you just got]:8081/index.jsp
You can change the port of tomcat to 80 (assuming nothing else is on 
80)so you can do just this :
	http://[ip ]/index.jsp

Sony Ho wrote:
Hello,

 As simple as the subject goes,  I've recently installed Tomcat4 on my 
windows2000 professional.   I've able to access the Apache Tomcat 
Welcome page from http://localhost:8081/index.jsp

My question is, how to access that same page from another computer 
connecting to internet??

Best Regards,
Sony
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail

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



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


access is denied from 4.1.18-LE-jdk14 on win98se

2003-02-25 Thread Ray Tayek
hi, just tried 4.1.18-LE-jdk14 and tried to startup. he gets as far as 
mumbling JAVA_HOME  ... (correctly), then he says access is denied. logs/ 
is empty.

how do i turn on some verbosity so i can see where he's going south?

thanks

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: access is denied from 4.1.18-LE-jdk14 on win98se

2003-02-25 Thread Peng Tuck Kwok
what is the permission for tomcat in that directory ? I mean is the user 
who is running tomcat allowed to read  n write to the directory ?

do a 'ls -al' and let's have a look at the output.

Ray Tayek wrote:
hi, just tried 4.1.18-LE-jdk14 and tried to startup. he gets as far as 
mumbling JAVA_HOME  ... (correctly), then he says access is denied. 
logs/ is empty.

how do i turn on some verbosity so i can see where he's going south?

thanks

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting 
work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/

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



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


Tomcat 4.1.18 session objects

2003-02-25 Thread R.C.Nougain
Where can I find the changes list from Tomcat 4.0.x to Tomcat 4.1.x. 

Could someone answer 'session' question mentioned below

| I moved my web appl from Tomcat 4.0.4 to Tomcat4.1.18.
| For each user session I store the reference| to the session in a Vector so that I
| can tell what users are logged-in, last-accessed-time etc. It was working fine 
| in Tomcat 4.0.4. But in Tomcat4.1.18 (perhaps due to new specifications) session
| objects are pooled (StandardSessionFactory) and hence the references I
| am storing in the Vector become useless across the jsp page calls. I have a
| thread that uses this Vector to clean up the users that are timedout but since
| the session refs in my Vector are useless I can do nothing. Instead of 
| storing the refs if I store Session IDs then can I get ref to a session from 
| JSP Server so that I can get the attributes I have set in it. Please comment.

--
Thanks 


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



Configuring Tomcat 4.1.18 to handle 401 http errors

2003-02-25 Thread Oliver Schoenwald
 Good morning!

some days ago I already asked a question regarding this context, but I 
had some time to
dive a bit into the Servlet API 2.3 Specification. So far, it seems that 
the specification states
that the container, not the servlet, is the layer attached to the 
client. And the container,
not the servlet, controls, which and how any http errors created by a 
servlet within the container
are handled, mapped and sent back to the client.

Some digging in the catalina source code retrieved that
in HttpResponseBase.java there is a method finishResponse where the 
handling of
every HTTP error = 400 is hard-coded to be transformed into a simple, 
valid html-page with
a plainly written error summary.

However, we need the http error 401 to be send 'as is' to the client. It 
doesn't have to be directly,
but the container should not catch this error and create an html page 
out of it.

Does someone know how I can achieve this? Or has the Servlet API changed 
the communication
protocol so far that this is just no longer possible without violating 
the standard?
In that case, how SHOULD a servlet invalidate the current authentication 
so that the currently
buffered authentication data (buffered by the client/browser) are no 
longer accepted and the browser
is forced to ask the user again for authentication?



Thank you in advance,

Oliver Schönwald



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


crontab problems

2003-02-25 Thread Ayhan Peker
Hi everybody ,
I have a problem..I am trying to write an application , which will run from 
cronatb on linux...
My application runs without a problem when i try it from the command 
line..BUT NOT FROM CRONTAB...
The challenge is: if jvm crashes i want to restart tomcat
my code is :
String[] command ={ /bin/sh, -c, ps -ex | grep Djava.endorsed.dirs};
int processcount=0;
Runtime r = Runtime.getRuntime();
Process p = r.exec(command);
InputStreamReader isr=new InputStreamReader(p.getInputStream());
BufferedReader br=new BufferedReader(isr);
String line=null;
while((line = br.readLine()) != null){
System.out.println(line);
processcount++;
}
if i decide to restart the server
i execute :
String[] command_ ={sh,-c,/root/adminscripts/restart_tomcat};
Process p2 = Runtime.getRuntime().exec(command_);
but the last two lines returns
/
The JAVA_HOME environment variable is not defined
message..
/
my retstart_tomcat scrip is
#!/bin/sh
cd /usr/local/tomcat/bin
./startup.sh
i will really appreciate if somebody helps..
basicly...
-run the crontab every min..
-invoke a java programme..
-programme counts the java-threads..
-decides if tomcat needs restarting..
-restarts tomcat..
my crontab script is:
* * * * * su root  cd /usr/local/tomcat/bin  /usr/local/java/bin/java 
-cp /usr/local/tomcat/bin/ TomcatwatcherThread  
/var/log/tomcat/restart.log 21
please help..
Thanks







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


RE: crontab problems

2003-02-25 Thread Ralph Einfeldt
You have to make shure that your script retstart_tomcat
sets and exports all needed environment variables before 
calling ./startup.sh:

JAVA_HOME=/usr/local/java/jdk1.3.1
CATALINA_HOME=path to tomcat installation
CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
# JAVA_OPTS='-client -v'

export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
./startup.sh

 -Original Message-
 From: Ayhan Peker [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 10:30 AM
 To: [EMAIL PROTECTED]
 Subject: crontab problems
 
 but the last two lines returns
 /
 The JAVA_HOME environment variable is not defined
 message..
 /
 my retstart_tomcat scrip is
 #!/bin/sh
 cd /usr/local/tomcat/bin
 ./startup.sh

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



RE: Connection Pooling

2003-02-25 Thread Malcolm Green
I have DBCP connection pooling working as follows using Tomcat 4.1.12:

Under the Context element for your application (this can either be in the
server.xml file or a separate xml file in the webapps dir)  I have the
following config:

  Resource name=jdbc/ scope=Shareable
type=javax.sql.DataSource/

  ResourceParams name=jdbc/
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter

  parameter
namemaxActive/name
value100/value
/parameter

  parameter
namemaxIdle/name
value3/value
/parameter

  parameter
namemaxWait/name
value100/value
/parameter

  parameter
nameusername/name
valuetheUser/value
/parameter

  parameter
namepassword/name
valuethePassword/value
/parameter
  
 parameter
  namedriverClassName/name

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
 /parameter

parameter
  nameurl/name

valuejdbc:microsoft:sqlserver://hostname:port;databasename=myDB/value
/parameter

parameter
  namevalidationQuery/name
  valueselect getdate()/value
/parameter

  /ResourceParams

This is an MS SQL Server config, but to change the db just make sure that
the requried JDBC jar file is in the common/lib directory and then change
the necessary elements above e.g. driverClassName etc.

In my web.xml for my app I have the following:

  resource-ref
res-ref-namejdbc//res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

To use the pool I have the following code in a servlet:  (I have left out
the try/catch block etc.)

  Context ctx = new InitialContext();
  DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/);
  conn = ds.getConnection();
  

Hope this helps.

Malcolm

-Original Message-
From: Sebastiªo Carlos Santos [mailto:[EMAIL PROTECTED]
Sent: 21 February 2003 00:15
To: [EMAIL PROTECTED]
Subject: Connection Pooling


Somebody has some experience or example in the 
configuration and use of pool of connections with the 
commons-dbcp.  
I am a little lost and I don't know through where to 
begin.  
All information will be well arrival.  
I thank the help in advance

 
__
E-mail Premium BOL
Antivírus, anti-spam e até 100 MB de espaço. Assine já!
http://email.bol.com.br/



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

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



running servlet on Tomcat

2003-02-25 Thread Tan van Nguyen
Hi, I have a problem about running servlet in Tomcat. My system information:
Apache Tomcat v4.1.18
Java 2 SDK 1.3.1_07

The problem is that I can't run my servlet program placed in ROOT/WEB-INF/classes 
directory with the url: http://localhost:8080/servlet/Myprogram 
I have done everything and read a lot of documentation, but still the same error 
appear: The 404 Error:The requested resource (/servlet/Myprogram) is not available.

But when I place my program source and class files in the 
webapps/examples/WEB-INF/classes directory, it ran properly..

It seems like something wrong with the classloader..

I really appriciate your reply!

Thanks in advance!
- Tan Nguyen -


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



Re: configuration question

2003-02-25 Thread Mehdi . Nejad

Add  a context for your new app  in the host ... tag.

ie..

Context path=/mystuff docBase=d:/myjsps debug=0
reloadable=true

/Context

put your jsp's inside d:\myjsps and then run
http://localhost:8080/mystuff/filename.jsp

Mehdi Nejad



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



StandardWrapperValve - Allocate exception

2003-02-25 Thread Günter Kukies
Hello,

the StandardWrapper is throwing an exception after reloading an compiled servlet. My 
IDE is Forte. Tomcat 4.0.3 is running on a linux-box. Forte is running on W2000 and 
the webapp is mounted via samba. JDK is 1.4.1. 
In element Context the attribute reloadable=true.
I have to restart tomcat after every compilation of my servlets. 

Any ideas?

Thanks

Günter

2003-02-25 11:34:05 StandardWrapperValve[myservlet]: Allocate exception for servlet 
myservlet
java.lang.NullPointerException
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:673)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)



Disabling CASE-SENSITIVE

2003-02-25 Thread Alberto A C A S Magalhães
**
Este email assim como os ficheiros que possa ter em anexo são confidenciais
e para uso exclusivo da pessoa ou organização para o qual foi enviado.
Se recebeu este email por engano por favor notifique [EMAIL PROTECTED]

Esta nota confirma que esta mensagem foi verificada pelo MIMEsweeper
não tendo sido encontrados virus.

www.mimesweeper.com
***

Hi,
How can i disabled CASE-SENSITIVE in Linux, with apache and tomcat
installed.
Thanks.


Re: crontab problems

2003-02-25 Thread Hannes Schmidt
Right, you might also just put

JAVA_HOME=...

at the beginning of your crontab.

I assume you have good reasons to use a Java program to watch Tomcat.
Personally, I would have written a shell script. If you really want to use
Java, you might want to use a different, more reliable approach to detect
(un)availability of Tomcat, something like

import java.net.*;
URL url = new URL( http://localhost:8080/examples; );
URLConnection con = url.openConnection();
con.setUseCaches( false );
con.connect();
if( con.getContentLength()  0 ) {
// restart tomcat
}

But I just wrote this out of my head ...

- Original Message -
From: Ralph Einfeldt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:43 AM
Subject: RE: crontab problems


You have to make shure that your script retstart_tomcat
sets and exports all needed environment variables before
calling ./startup.sh:

JAVA_HOME=/usr/local/java/jdk1.3.1
CATALINA_HOME=path to tomcat installation
CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
# JAVA_OPTS='-client -v'

export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
./startup.sh

 -Original Message-
 From: Ayhan Peker [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 10:30 AM
 To: [EMAIL PROTECTED]
 Subject: crontab problems

 but the last two lines returns
 /
 The JAVA_HOME environment variable is not defined
 message..
 /
 my retstart_tomcat scrip is
 #!/bin/sh
 cd /usr/local/tomcat/bin
 ./startup.sh

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



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



[OT] How to quote ? !

2003-02-25 Thread Jens Skripczynski
Hi,

I'm used to a different kind of quoting than i see here quiet often.

If i answer an email i do quote the whole original message with ' ',
delete unrelevant parts, and write my answer _under_ the relevant parts,
i want to put an answer to.

- e.g. --
 some relevant text
my answer
- e.g. --


Here I have often seen:
- e.g. --
my answer
- full quote off previous messages 
the prevoius messagess
- end message  
- e.g. --



This makes it hard to read, because we read from left to right and
from top to bottom.  

So in the second example I have the answer and then try to investigate 
the question from the whole previous messages. Especially having a 3 
line answer and a 50 line full quote. Well for my part, i do not investigate
the question, nor evaluate the answer because it is very time consuming.

Next thing is that the second kind of quoting is not economic regarding the
traffic it causes and the information that a full quote adds to any answer
(since everybody on this list recieves every email, so iff there are questions
concerning an older message, they can look it up).

Maybe some of you could rethink your kind of quoting.

Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Technology is a constand battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots.
-- Slashdot signature


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



properties files

2003-02-25 Thread José Moreira
Hello, im using a propeties file to store and retrieve application settings
(like db conection) using this code :

private Properties properties;

private String status;

private boolean NovoConfig;

/** Creates new ConfigReaderBean */
public ConfigReaderBean() {

Properties properties = new  Properties();

NovoConfig = false;

try {

properties.load(new FileInputStream(config.properties));

} catch (IOException e) {


System.out.println(Erro ao ler config: +e.getMessage());


properties.setProperty(database.url,http://localhost/mysql;);

NovoConfig = true;

}

if (NovoConfig) {

try {

properties.store(new
FileOutputStream(newconfig.properties),null);

System.out.println(Criado: newconfig.properties);

} catch (IOException e) {

System.out.println(Erro ao criar novo config:
+e.getMessage());

}


}

the problem is that it doesnt load the file and saves the
'newconfig.properties' file under the Netbeans IDE dir,

how can i load the file located under my webapp WEB-INF dir ?





---*--
José Moreira

Técnico de Informática | IT Technician

Vila Nova de Gaia, Portugal

E-Mail: [EMAIL PROTECTED]

MSN: [EMAIL PROTECTED]

ICQ: 136936120

IRC: ethernal (irc.ptnet.org)



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



JDBC Realm MS SQL 2000

2003-02-25 Thread Søren Blidorf
Hi.
I am trying to create a realm login.

When I use a mysql, MS Access or Oracle DB it works just fine. But when
I try with MS SQL 2000 server it just does not work.

Can anybody tell me why?

Søren Blidorf

Nolas Consulting
Gustav Wiedsvej 9
DK-2860 Søborg


Telefon: +45 39676513
Direkte:  +45 61676513
Web:  www.nolas.dk




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



PLEASE HELP - Tomcat list - How to unregister

2003-02-25 Thread Manuel Soto
Please,
Does any body know how to unsubscribe from this list

Thanks in advance
MS

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



R: properties files

2003-02-25 Thread Simone Chiaretta
Excuse me for the question
but cannot u store directly the properties (strings, integer and so on) in
the web.xml for the application or the server.xml under Resource

 -
Simone Chiaretta
www.piyosailing.com/S
Any sufficiently advanced technology is indistinguishable from magic

 -Messaggio originale-
 Da: José Moreira [mailto:[EMAIL PROTECTED]
 Inviato: martedì 25 febbraio 2003 13.36
 A: Tomcat Users List
 Oggetto: properties files


 Hello, im using a propeties file to store and retrieve
 application settings
 (like db conection) using this code :

 private Properties properties;

 private String status;

 private boolean NovoConfig;

 /** Creates new ConfigReaderBean */
 public ConfigReaderBean() {

 Properties properties = new  Properties();

 NovoConfig = false;

 try {

 properties.load(new FileInputStream(config.properties));

 } catch (IOException e) {


 System.out.println(Erro ao ler config: +e.getMessage());



 properties.setProperty(database.url,http://localhost/mysql;);

 NovoConfig = true;

 }

 if (NovoConfig) {

 try {

 properties.store(new
 FileOutputStream(newconfig.properties),null);

 System.out.println(Criado: newconfig.properties);

 } catch (IOException e) {

 System.out.println(Erro ao criar novo config:
 +e.getMessage());

 }


 }

 the problem is that it doesnt load the file and saves the
 'newconfig.properties' file under the Netbeans IDE dir,

 how can i load the file located under my webapp WEB-INF dir ?





 ---*--
 José Moreira

 Técnico de Informática | IT Technician

 Vila Nova de Gaia, Portugal

 E-Mail: [EMAIL PROTECTED]

 MSN: [EMAIL PROTECTED]

 ICQ: 136936120

 IRC: ethernal (irc.ptnet.org)



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




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



Re: JDBC Realm MS SQL 2000

2003-02-25 Thread Xavier Prélat
Søren Blidorf wrote:

Hi.
I am trying to create a realm login.
When I use a mysql, MS Access or Oracle DB it works just fine. But when
I try with MS SQL 2000 server it just does not work.
Can anybody tell me why?

Søren Blidorf

Nolas Consulting
Gustav Wiedsvej 9
DK-2860 Søborg
Telefon: +45 39676513
Direkte:  +45 61676513
Web:  www.nolas.dk


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


 

Can you tell us more about  it just does not work...

what is your conf, properties...etc...

Xavier



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


R: PLEASE HELP - Tomcat list - How to unregister

2003-02-25 Thread Simone Chiaretta
quoting from the footer of the mail :-)

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

Simo

 -Messaggio originale-
 Da: Manuel Soto [mailto:[EMAIL PROTECTED]
 Inviato: martedì 25 febbraio 2003 13.46
 A: tomcap-user
 Oggetto: PLEASE HELP - Tomcat list - How to unregister


 Please,
   Does any body know how to unsubscribe from this list

 Thanks in advance
 MS

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




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



RE: properties files

2003-02-25 Thread Arnaud HERITIER
You need to put your property files in WEB-INF/classes or in a jar in
WEB-INF/lib

Then you can use the getResourceAsStream(..) method of the ServletContext of
your webapp :


properties.load(getServletContext().getResourceAsStream(filePath))

Arnaud


 -Message d'origine-
 De : José Moreira [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 25 février 2003 13:36
 À : Tomcat Users List
 Objet : properties files


 Hello, im using a propeties file to store and retrieve
 application settings
 (like db conection) using this code :

 private Properties properties;

 private String status;

 private boolean NovoConfig;

 /** Creates new ConfigReaderBean */
 public ConfigReaderBean() {

 Properties properties = new  Properties();

 NovoConfig = false;

 try {

 properties.load(new FileInputStream(config.properties));

 } catch (IOException e) {


 System.out.println(Erro ao ler config: +e.getMessage());



 properties.setProperty(database.url,http://localhost/mysql;);

 NovoConfig = true;

 }

 if (NovoConfig) {

 try {

 properties.store(new
 FileOutputStream(newconfig.properties),null);

 System.out.println(Criado: newconfig.properties);

 } catch (IOException e) {

 System.out.println(Erro ao criar novo config:
 +e.getMessage());

 }


 }

 the problem is that it doesnt load the file and saves the
 'newconfig.properties' file under the Netbeans IDE dir,

 how can i load the file located under my webapp WEB-INF dir ?





 ---*--
 José Moreira

 Técnico de Informática | IT Technician

 Vila Nova de Gaia, Portugal

 E-Mail: [EMAIL PROTECTED]

 MSN: [EMAIL PROTECTED]

 ICQ: 136936120

 IRC: ethernal (irc.ptnet.org)



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



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



VS: JDBC Realm MS SQL 2000

2003-02-25 Thread Søren Blidorf
This is how I set it up for Access.

When I change the driver settings to Oracle or MySQL it works just fine.

The connection to the SQL server works just fine. It is only the realm
that does not work.

I am not sure what else to send!!!

Context path=/web docBase=c:/projects/web/web 
 debug=0 reloadable=true
  Realm className=org.apache.catalina.realm.JDBCRealm
debug=0 
  connectionName=username connectionPassword=password
driverName=sun.jdbc.odbc.JdbcOdbcDriver 
  connectionURL=jdbc:odbc:web userTable=users 
  userNameCol=username userCredCol=password 
  userRoleTable=user_roles roleNameCol=rolename / 
/Context

-Oprindelig meddelelse-
Fra: Xavier Prélat [mailto:[EMAIL PROTECTED] 
Sendt: 25. februar 2003 13:44
Til: Tomcat Users List
Emne: Re: JDBC Realm  MS SQL 2000

Søren Blidorf wrote:

Hi.
I am trying to create a realm login.

When I use a mysql, MS Access or Oracle DB it works just fine. But when
I try with MS SQL 2000 server it just does not work.

Can anybody tell me why?

Søren Blidorf

Nolas Consulting
Gustav Wiedsvej 9
DK-2860 Søborg


Telefon: +45 39676513
Direkte:  +45 61676513
Web:  www.nolas.dk




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




  

Can you tell us more about  it just does not work...

what is your conf, properties...etc...

Xavier



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



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



Re: running tomcat under unix

2003-02-25 Thread Rasputin
* Swapneel Dange [EMAIL PROTECTED] [0231 07:31]:
 i am trying to run TOMCAT 4.0 under unix, but i get the following messages 
 when i try to start the TOMCAT :

 Using CATALINA_HOME:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_TMPDIR: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/temp

 touch: creating 
 `/home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/logs/catalina.out':
  
 No such file or directory

 yeah its true that there is no file known as 'catalina.out' in my folders 
 and there is no directory such as 'logs' inside the directory 'src'. do i 
 need to create a directory such as 'logs' or somethign like that.

Yes, in a nutshell. No such file od directory is referring to logs/ - you
can't create a file in a directory unless the directory exists.

But those directories *should* exist, so check that CATALINA_HOME points to 
where you installed tomcat.

-- 
The sooner all the animals are dead, the sooner we'll find their money.
-- Ed Bluestone, The National Lampoon
Rasputin :: Jack of All Trades - Master of Nuns

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



how to use /manager app

2003-02-25 Thread Simone Chiaretta
Hello all,
I'd like to know if there is a way to manage multiple hosts with the
/manager webapplication supplied by tomcat.
I mean
I've the /manager app in the main host of the server
I'd like to deply and undeploy apps in the other host defined in server.xml

is there  a way to do it witout adding a Context (that points to the
/manager app) to each host I want to administer?

Thank you
Simone

-
Simone Chiaretta
www.piyosailing.com/S
Any sufficiently advanced technology is indistinguishable from magic


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



RE: [OT] How to quote ? !

2003-02-25 Thread Ralph Einfeldt
As you can see my personal preference is to reply first
then quote the relevant part of the original message.
(I prefer this, as posts in this format enable me
to see if the answer has enough info to care about the
question, in most cases I'm aware of the question anyway
as I follow the list regularly)

As long as the quote is stripped down to the relevant 
part, I can live with both options. (In fact I use your
approach, if there are several remarks or questions
I want to comment on)

What causes most pain to me is something like
quote whole thread with intermixed answers or 
answers below.

 -Original Message-
 From: Jens Skripczynski [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 1:18 PM
 Cc: [EMAIL PROTECTED]
 Subject: [OT] How to quote ? !
 
 I'm used to a different kind of quoting than i see here quiet often.
 
 If i answer an email i do quote the whole original message with ' ',
 delete unrelevant parts, and write my answer _under_ the 
 relevant parts, i want to put an answer to.
 

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



Re: PLEASE HELP - Tomcat list - How to unregister

2003-02-25 Thread Lindomar
: [EMAIL PROTECTED]

- Original Message - 
From: Manuel Soto [EMAIL PROTECTED]
To: tomcap-user [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 09:45
Subject: PLEASE HELP - Tomcat list - How to unregister


 Please,
 Does any body know how to unsubscribe from this list
 
 Thanks in advance
 MS
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: R: PLEASE HELP - Tomcat list - How to unregister

2003-02-25 Thread Manuel Soto
Thanks but, unfortunately it does not work to me. I sent an email at
least each week but my wap mail remain full every day,
---BeginMessage---
quoting from the footer of the mail :-)

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

Simo

 -Messaggio originale-
 Da: Manuel Soto [mailto:[EMAIL PROTECTED]
 Inviato: martedì 25 febbraio 2003 13.46
 A: tomcap-user
 Oggetto: PLEASE HELP - Tomcat list - How to unregister


 Please,
   Does any body know how to unsubscribe from this list

 Thanks in advance
 MS

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




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

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

Taglib: Unable to find setter method for attribute: required

2003-02-25 Thread Thorsten Giesecke
After changing from Tomcat 3.2.3 to Tomcat 4.1.18 the following
exception occurs:

Unable to find setter method for attribute: required

The TLD defines the required attribute as optional,
the setter method (setRequired(String ...)) is available
and with Tomcat 3.2.3 there are no problems.

Are there any changes in the JSP/Taglib definition, which
permits the use of required as an attribute name?

Is it required, that every taglib class has it's own setter
method or can i use an abstract parent class which implements
this setter method once? can this result in problems with
introspection?


thanks for any help
thorsten


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



Re: JDBC Realm MS SQL 2000

2003-02-25 Thread Ian Hunter
What Exception do you get?

- Original Message -
From: Søren Blidorf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 7:51 AM
Subject: VS: JDBC Realm  MS SQL 2000


This is how I set it up for Access.

When I change the driver settings to Oracle or MySQL it works just fine.

The connection to the SQL server works just fine. It is only the realm
that does not work.

I am not sure what else to send!!!

Context path=/web docBase=c:/projects/web/web
 debug=0 reloadable=true
  Realm className=org.apache.catalina.realm.JDBCRealm
debug=0
  connectionName=username connectionPassword=password
driverName=sun.jdbc.odbc.JdbcOdbcDriver
  connectionURL=jdbc:odbc:web userTable=users
  userNameCol=username userCredCol=password
  userRoleTable=user_roles roleNameCol=rolename /
/Context

-Oprindelig meddelelse-
Fra: Xavier Prélat [mailto:[EMAIL PROTECTED]
Sendt: 25. februar 2003 13:44
Til: Tomcat Users List
Emne: Re: JDBC Realm  MS SQL 2000

Søren Blidorf wrote:

Hi.
I am trying to create a realm login.

When I use a mysql, MS Access or Oracle DB it works just fine. But when
I try with MS SQL 2000 server it just does not work.

Can anybody tell me why?

Søren Blidorf

Nolas Consulting
Gustav Wiedsvej 9
DK-2860 Søborg


Telefon: +45 39676513
Direkte:  +45 61676513
Web:  www.nolas.dk




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






Can you tell us more about  it just does not work...

what is your conf, properties...etc...

Xavier



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



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


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



Problem with tomcat and commons-logging.jar

2003-02-25 Thread NJ Rogers
Hi

I have tomcat-4.1.12 installed without apache, use the java j2sdk 
version 1.4.0_02 and have more than one webapp in the same tomcat 
installation.

Two of my webapps run fine, but the third - Axis - (although relatively
happy), causes probs when I try to connect to it from the command 
line client.
I get:
Exception in thread main java.lang.NoClassDefFoundError: 
org.apache.commons.lo
gging.LogFactory
at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:8
4)
etc ..


I have searched various mailing lists  have found others with the same
problem. Although it appears initially to be a basic classpath issue, 
in fact I (as with others) have tried sticking the commons-logging.jar 
in the likely places, to no avail.

I found one poss solution on the lists, but it was a solution via 
the apache workers2.properties file. 

Does anyone know of a solution purely for tomcat?

Many thanks
Nikki

--
NJ Rogers
[EMAIL PROTECTED]
Technical Researcher
(Semantic Web Applications Developer)
ILRT
Institute for Learning and Research Technology 
University of Bristol, 8-10 Berkeley Square,   BRISTOL   
BS8 1HH, UK
Tel:  ++44(0)117 928 7096 (Direct)
Tel:  ++44(0)117 928 7193 (Office)
Fax: ++44(0)117 928 7112
http://www.ilrt.bristol.ac.uk


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



RE: R: PLEASE HELP - Tomcat list - How to unregister

2003-02-25 Thread Eduardo Jaunez S.
Manuel
perhaps, you are sending e-mails from another account (yahoo.com), rather
than from your WAP mail account (the one you want to free).

Atte.
Eduardo.


 -Mensaje original-
 De: Manuel Soto [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 25 de Febrero de 2003 10:21
 Para: Tomcat Users List
 Asunto: Re: R: PLEASE HELP - Tomcat list - How to unregister


 Thanks but, unfortunately it does not work to me. I sent an email at
 least each week but my wap mail remain full every day,



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



RE: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Turner, John

The return from getProtocol() is correct, AFAIK.  I don't believe there is a
HTTPS/1.1 or similar, but I could be wrong.

By check protocol type in the docs (agreed, it is unclear), I believe it
means to do one (or all) of the following:

- check the URL for https
- check the port number for the request
- use HttpServletRequest.isSecure(), though I think that will return false
when you use Tomcat via a connector with ApacheI've never tried it to be
sure.

John

 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 9:26 PM
 To: Tomcat Users List
 Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
 From 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
 pages which absolutely require a secure connection should 
 check the protocol
 type associated with the page request and take the 
 appropriate action of
 https is not specified.
 
 Also, When running Tomcat primarily as a Servlet/JSP container behind
 another web server, such as Apache or Microsoft IIS, it is 
 usually necessary
 to configure the primary web server to handle the SSL connections from
 users. Typically, this server will negotiate all SSL-related 
 functionality,
 then pass on any requests destined for the Tomcat container only after
 decrypting those requests. Likewise, Tomcat will return 
 cleartext responses,
 that will be encrypted before being returned to the user's 
 browser. In this
 environment, Tomcat knows that communications between the 
 primary web server
 and the client are taking place over a secure connection (because your
 application needs to be able to ask about this), but it does 
 not participate
 in the encryption or decryption itself.
 
 However, when I check request.getProtocol() I get 
 HTTP/.1.1 even when
 I'm connecting via SSL (url shows https: and browser shows lock and
 confirms 128 bit SSL) -- what gives?
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



SV: JDBC Realm MS SQL 2000

2003-02-25 Thread Søren Blidorf
None. I am being refered to my loginerror page.

I forgot to write that I am not sure what to write in the Realm. Sorry.

Context path=/web docBase=c:/projects/web/web
 debug=0 reloadable=true
  Realm className=org.apache.catalina.realm.JDBCRealm
debug=0
  connectionName=username connectionPassword=password
driverName=sun.jdbc.odbc.JdbcOdbcDriver
  connectionURL=jdbc:odbc:web userTable=users
  userNameCol=username userCredCol=password
  userRoleTable=user_roles roleNameCol=rolename /
/Context

I normally write db..tablename, so do I write db.users? or just
users

Either way it just returns to my errorpage 

-Oprindelig meddelelse-
Fra: Ian Hunter [mailto:[EMAIL PROTECTED] 
Sendt: 25. februar 2003 14:27
Til: Tomcat Users List
Emne: Re: JDBC Realm  MS SQL 2000

What Exception do you get?

- Original Message -
From: Søren Blidorf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 7:51 AM
Subject: VS: JDBC Realm  MS SQL 2000


This is how I set it up for Access.

When I change the driver settings to Oracle or MySQL it works just fine.

The connection to the SQL server works just fine. It is only the realm
that does not work.

I am not sure what else to send!!!

Context path=/web docBase=c:/projects/web/web
 debug=0 reloadable=true
  Realm className=org.apache.catalina.realm.JDBCRealm
debug=0
  connectionName=username connectionPassword=password
driverName=sun.jdbc.odbc.JdbcOdbcDriver
  connectionURL=jdbc:odbc:web userTable=users
  userNameCol=username userCredCol=password
  userRoleTable=user_roles roleNameCol=rolename /
/Context

-Oprindelig meddelelse-
Fra: Xavier Prélat [mailto:[EMAIL PROTECTED]
Sendt: 25. februar 2003 13:44
Til: Tomcat Users List
Emne: Re: JDBC Realm  MS SQL 2000

Søren Blidorf wrote:

Hi.
I am trying to create a realm login.

When I use a mysql, MS Access or Oracle DB it works just fine. But when
I try with MS SQL 2000 server it just does not work.

Can anybody tell me why?

Søren Blidorf

Nolas Consulting
Gustav Wiedsvej 9
DK-2860 Søborg


Telefon: +45 39676513
Direkte:  +45 61676513
Web:  www.nolas.dk




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






Can you tell us more about  it just does not work...

what is your conf, properties...etc...

Xavier



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



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


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



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



RE: Problem compiling mod_jk2 connector in Solaris 8 Apache 2.0.39

2003-02-25 Thread Turner, John

Yowzer, that was a lot of scrolling.  

I had lots of problems with gcc 3.2 on Solaris 8.  I ended up going back to
2.95.

The library it can't find is the APR library.  On my Solaris 8 development
server:

bash-2.03# find / -name libapr* -print
/usr/local/apache2/lib/libapr-0.so.0.9.2
/usr/local/apache2/lib/libapr-0.so.0
/usr/local/apache2/lib/libapr-0.so
/usr/local/apache2/lib/libapr-0.la
/usr/local/apache2/lib/libapr-0.a
/usr/local/apache2/lib/libaprutil-0.so
/usr/local/apache2/lib/libaprutil-0.so.0.9.2
/usr/local/apache2/lib/libaprutil-0.so.0
/usr/local/apache2/lib/libaprutil-0.la
/usr/local/apache2/lib/libaprutil-0.a
/usr/local/apache2/lib/libapr.so
bash-2.03#

John

 -Original Message-
 From: Julio César Mejia Vergara [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 10:44 PM
 To: [EMAIL PROTECTED]
 Subject: Problem compiling mod_jk2 connector in Solaris 8 
 Apache 2.0.39
 
 
 Hello,
 
 I have a Sun Blade 100 (SPARC) running Solaris 8 with all its bundled 
 patches.
 I'm traing to configure Apache HTTP 2.0.39 with Tomcat 4.1.18, i got 
 Apache and Tomcat working seperatly but i'm traing to make it work 
 together via Coyote mod_jk2, but when i try to compile mod_jk2 
 connectors a get an error.
 Can any one help
 I dont now if i'm missing a package that i need to install or is 
 something else that i'm missing.
 It traid the compiled mod_jk2 thats in 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2
 /release/v2.0.2/bin/solaris8/ 
 but its compiled for Apache HTTPD 2.0.43 and it dosent let apache 
 version of apache start.
 In the Solaris Machine i have installed:
 - Solaris 8 (SPARC)
 - Apache HTTP 2.0.39 (i need to make it work whit this version)
 -  Tomcat 4.1.18
 - Tomcat Connectors 4.1.18
 - GNU gcc 3.2.2
 - GNUmake 3.80
 - Perl 5.8.0
 - Jakarta ant 1.5.1
 - autocong 2.57
 - expect 5.38
 - gd 1.8.3
 - j2sdk 1.4.1
 - libtool 1.4
 - GNU tar 1.13.
 - tcl 8.4.1
 - tk 8.4.1
 - openssl 0.9.6g
 Here is the what i'm doing to compile the connectors and at 
 the end the 
 error message
 
 # pwd
 /opt/jakarta-tomcat-connectors-4.1.18-src/jk/native2
 #*sh ./buildconf.sh*
 libtoolize --force --automake --copy
 aclocal
 automake --copy --add-missing
 configure.in: installing `scripts/build/unix/install-sh'
 configure.in: installing `scripts/build/unix/mkinstalldirs'
 configure.in: installing `scripts/build/unix/missing'
 autoconf
 # cp /usr/j2se/include/solaris/* /usr/java/include/
 # pwd
 /opt/jakarta-tomcat-connectors-4.1.18-src/jk/native2
 #*CPPFLAGS=-DBSD_COMP ./configure 
 --with-apxs2=/usr/local/apache/bin/apxs 
 --with-tomcat41=/opt/jakarta-tomcat-4.1.18 --with-java-home=/usr/j2se 
 --with-java-platform=2 --with-jni*
 checking for a BSD-compatible install... 
 scripts/build/unix/install-sh -c
 checking whether build environment is sane... yes
 checking for gawk... no
 checking for mawk... no
 checking for nawk... nawk
 checking whether make sets $(MAKE)... yes
 checking for gcc... gcc
 checking for C compiler default output... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for style of include used by make... GNU
 checking dependency style of gcc... none
 checking build system type... sparc-sun-solaris2.8
 checking host system type... sparc-sun-solaris2.8
 checking for ld used by GCC... /usr/ccs/bin/ld
 checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
 checking for /usr/ccs/bin/ld option to reload object files... -r
 checking for BSD-compatible nm... /usr/ccs/bin/nm -p
 checking whether ln -s works... yes
 checking how to recognise dependant libraries... pass_all
 checking command to parse /usr/ccs/bin/nm -p output... ok
 checking how to run the C preprocessor... gcc -E
 checking for egrep... Broken Pipe
 egrep
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... no
 checking for unistd.h... yes
 checking dlfcn.h usability... yes
 checking dlfcn.h presence... yes
 checking for dlfcn.h... yes
 checking for ranlib... ranlib
 checking for strip... strip
 checking for objdir... .libs
 checking for gcc option to produce PIC... -fPIC
 checking if gcc PIC flag -fPIC works... yes
 checking if gcc static flag -static works... yes
 checking if gcc supports -c -o file.o... yes
 checking if gcc supports -c -o file.lo...
 checking if gcc supports -fno-rtti -fno-exceptions... yes
 checking whether the linker (/usr/ccs/bin/ld) supports shared 
 libraries... yes
 checking how to hardcode library paths into programs... immediate
 checking whether 

RE: running tomcat under unix

2003-02-25 Thread Turner, John

Your CATALINA_HOME is borked up.  It should point to the parent directory of
Tomcat, not any of the subdirectories.

If you have your server.xml file in /usr/local/tomcat/conf, for example, and
a logs directory at /usr/local/tomcat/logs, then CATALINA_HOME is
/usr/local/tomcat, not any of the directories below it.

John

 -Original Message-
 From: Swapneel Dange [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 2:31 AM
 To: [EMAIL PROTECTED]
 Subject: running tomcat under unix
 
 
 i am trying to run TOMCAT 4.0 under unix, but i get the 
 following messages 
 when i try to start the TOMCAT :
 
 
 [EMAIL PROTECTED] ./startup.sh
 Using CATALINA_BASE:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_HOME:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_TMPDIR: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/temp
 Using JAVA_HOME:   /local/jdk1.3.1
 touch: creating 
 `/home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina
 /src/logs/catalina.out': 
 No such file or directory
 [EMAIL PROTECTED] 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/
 src/bin/catalina.sh: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/
 src/logs/catalina.out: 
 No such file or directory
 
 yeah its true that there is no file known as 'catalina.out' 
 in my folders 
 and there is no directory such as 'logs' inside the directory 
 'src'. do i 
 need to create a directory such as 'logs' or somethign like that.
 
 and i have set the following inside .cshrc -
 
 setenv JAVA_HOME /local/jdk1.3.1
 setenv CATALINA_HOME 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 
 i am literally CLUELESS as to whats going on there. do commment !
 
 
 Swapneel Dange
 505-642-4126
 http://www.cs.nmsu.edu/~sdange
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8. 
 http://join.msn.com/?page=features/junkmail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: Problem with tomcat and commons-logging.jar

2003-02-25 Thread Jacob Kjome
Try this...

set 
CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\endorsed\xercesImpl.jar;%CATALINA_HOME%\common\endorsed\xmlParserAPIs.jar;%CATALINA_HOME%\shared\lib\jaxrpc.jar;%CATALINA_HOME%\shared\lib\saaj.jar;%CATALINA_HOME%\common\lib\log4j-1.2.8.jar;%CATALINA_HOME%\webapps\axis\WEB-INF\lib\axis.jar;%CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-discovery.jar;%CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-logging.jar;%CATALINA_HOME%\webapps\axis\WEB-INF\classes

Install web service:
D:\myclasses\servlets\axis-1_1RC1\samples\stock
java org.apache.axis.client.AdminClient 
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

Run web service:
D:\myclasses\servlets\axis-1_1RC1\build\classes
java samples.stock.GetQuote 
-lhttp://localhost:8080/axis/servlet/AxisServlet -uuser1 -wpass1 XXX

You may have to modify the paths to the jars in the set CLASSPATH, but 
this should make the point of what is required.

Jake

At 01:31 PM 2/25/2003 +, you wrote:
Hi

I have tomcat-4.1.12 installed without apache, use the java j2sdk
version 1.4.0_02 and have more than one webapp in the same tomcat
installation.
Two of my webapps run fine, but the third - Axis - (although relatively
happy), causes probs when I try to connect to it from the command
line client.
I get:
Exception in thread main java.lang.NoClassDefFoundError:
org.apache.commons.lo
gging.LogFactory
at 
org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:8
4)
etc ..


RE: crontab problems

2003-02-25 Thread Turner, John

Agreed...using a Java program to watch Tomcat seems a little circular.
Plus, I don't see any sort of delay or sleep in the poster's JAva
code...it looks like it just keeps hammering at Tomcat, as the cron job is
* * * * *.  Creating all those Runtime objects over and over can't be
helping performance any.

A simple shell script using wget would be fine...sure, you can watch the
output of ps -ef, but that doesn't tell you if Tomcat is accepting
requests or not.  There could be an entry for Tomcat in the process table,
but Tomcat could be refusing requests.

I just write a simple JSP page that outputs the contents of a variable, like
***SUCCESS*** or something like that, then use wget to grab that page
every so often and check for the string in the output...if it's there,
things should be OK (there are no guarantees).  If it's not, you have a
problem.  This way, the JSP page is compiled and cached by Tomcat, it uses
very little memory, and doesn't bog down the server.

There are plenty of other alternatives much more robust than a simple shell
script...you could use Netsaint/Nagios, Big Brother, and a whole bunch of
others.

John

 -Original Message-
 From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:29 AM
 To: Tomcat Users List
 Subject: Re: crontab problems
 
 
 Right, you might also just put
 
 JAVA_HOME=...
 
 at the beginning of your crontab.
 
 I assume you have good reasons to use a Java program to watch Tomcat.
 Personally, I would have written a shell script. If you 
 really want to use
 Java, you might want to use a different, more reliable 
 approach to detect
 (un)availability of Tomcat, something like
 
 import java.net.*;
 URL url = new URL( http://localhost:8080/examples; );
 URLConnection con = url.openConnection();
 con.setUseCaches( false );
 con.connect();
 if( con.getContentLength()  0 ) {
 // restart tomcat
 }
 
 But I just wrote this out of my head ...
 
 - Original Message -
 From: Ralph Einfeldt [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 10:43 AM
 Subject: RE: crontab problems
 
 
 You have to make shure that your script retstart_tomcat
 sets and exports all needed environment variables before
 calling ./startup.sh:
 
 JAVA_HOME=/usr/local/java/jdk1.3.1
 CATALINA_HOME=path to tomcat installation
 CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
 # JAVA_OPTS='-client -v'
 
 export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
 ./startup.sh
 
  -Original Message-
  From: Ayhan Peker [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 10:30 AM
  To: [EMAIL PROTECTED]
  Subject: crontab problems
 
  but the last two lines returns
  /
  The JAVA_HOME environment variable is not defined
  message..
  /
  my retstart_tomcat scrip is
  #!/bin/sh
  cd /usr/local/tomcat/bin
  ./startup.sh
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: [OT] How to quote ? !

2003-02-25 Thread Shapira, Yoav

Howdy,
I prefer the opposite: quote relevant parts first, then reply.
Question, then answer.

As long as the quote is stripped down to the relevant
part, I can live with both options. (In fact I use your
approach, if there are several remarks or questions
I want to comment on)

Ditto.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: running servlet on Tomcat

2003-02-25 Thread Turner, John

This is a FAQ.

By default, the Invoker servlet is disabled for everything but the /examples
webapp for security reasons.  It really shouldn't be enabled for the
/examples webapp, either, but I'm sure that's a low priority for the dev
team.

If you want your servlet to be available, you need to either:

- enable the Invoker servlet (not recommended)

- explicitly map your servlet in web.xml using servlet and servlet-mapping
elements:

servlet
  servlet-nameMyServlet/servlet-name
  servlet-classcom.myApp.MyServlet/servlet-class
/servlet

servlet-mapping
  servlet-nameMyServlet/servlet-name
  url-pattern/MyServlet/url-pattern
/servlet-mapping

Check the docs, check the release notes for more info.

John

 -Original Message-
 From: Tan van Nguyen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 5:05 AM
 To: [EMAIL PROTECTED]
 Subject: running servlet on Tomcat
 
 
 Hi, I have a problem about running servlet in Tomcat. My 
 system information:
 Apache Tomcat v4.1.18
 Java 2 SDK 1.3.1_07
 
 The problem is that I can't run my servlet program placed in 
 ROOT/WEB-INF/classes directory with the url: 
 http://localhost:8080/servlet/Myprogram 
 I have done everything and read a lot of documentation, but 
 still the same error appear: The 404 Error:The requested 
 resource (/servlet/Myprogram) is not available.
 
 But when I place my program source and class files in the 
 webapps/examples/WEB-INF/classes directory, it ran properly..
 
 It seems like something wrong with the classloader..
 
 I really appriciate your reply!
 
 Thanks in advance!
 - Tan Nguyen -
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: Configuring Tomcat 4.1.18 to handle 401 http errors

2003-02-25 Thread Shapira, Yoav

Howdy,
How about adding this to your web.xml:

error-page
  error-code401/error-code
  location/my401ProcessingServlet/location
/error-page

Then do whatever you want in the servlet you map to the /my401ProcessingServlet 
url-pattern.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Oliver Schoenwald [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 4:18 AM
To: Tomcat Users List
Subject: Configuring Tomcat 4.1.18 to handle 401 http errors

  Good morning!

some days ago I already asked a question regarding this context, but I
had some time to
dive a bit into the Servlet API 2.3 Specification. So far, it seems that
the specification states
that the container, not the servlet, is the layer attached to the
client. And the container,
not the servlet, controls, which and how any http errors created by a
servlet within the container
are handled, mapped and sent back to the client.

Some digging in the catalina source code retrieved that
in HttpResponseBase.java there is a method finishResponse where the
handling of
every HTTP error = 400 is hard-coded to be transformed into a simple,
valid html-page with
a plainly written error summary.

However, we need the http error 401 to be send 'as is' to the client. It
doesn't have to be directly,
but the container should not catch this error and create an html page
out of it.

Does someone know how I can achieve this? Or has the Servlet API changed
the communication
protocol so far that this is just no longer possible without violating
the standard?
In that case, how SHOULD a servlet invalidate the current authentication
so that the currently
buffered authentication data (buffered by the client/browser) are no
longer accepted and the browser
is forced to ask the user again for authentication?




Thank you in advance,


Oliver Schönwald



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: how to access the server from another computer

2003-02-25 Thread Turner, John

And if you want to access that URL using a FQDN instead of an IP address,
you'll need to register a domain name and have somebody do DNS for you, or
use one of the dynamic DNS services.

In addition, you will need to modify server.xml to setup the correct virtual
host instead of localhost.

John

 -Original Message-
 From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 4:00 AM
 To: Tomcat Users List
 Subject: Re: how to access the server from another computer
 
 
 You need a public ip for that machine you are running tomcat on.
 So after you have got the public ip (assuming everything is setup 
 properly) the url can be accessed at
   http://[ip that you just got]:8081/index.jsp
 You can change the port of tomcat to 80 (assuming nothing else is on 
 80)so you can do just this :
   http://[ip ]/index.jsp
 
 
 Sony Ho wrote:
  
  Hello,
  
   As simple as the subject goes,  I've recently installed 
 Tomcat4 on my 
  windows2000 professional.   I've able to access the Apache Tomcat 
  Welcome page from http://localhost:8081/index.jsp
  
  My question is, how to access that same page from another computer 
  connecting to internet??
  
  Best Regards,
  Sony
  
  _
  STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
  http://join.msn.com/?page=features/junkmail
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



LDAP Authentication

2003-02-25 Thread Marcelino Cruz
Hello:

Does anyone here has LDAP authentication set up through a JNDIRealm in server.xml and 
could send me a sample server.xml for me to look at?

Thanks!

MC


RE: Tomcat 4.1.18 session objects

2003-02-25 Thread Shapira, Yoav

Howdy,

Where can I find the changes list from Tomcat 4.0.x to Tomcat 4.1.x.

Download any release of tomcat.  Explode the distribution and you'll see a bunch of 
release notes files, one for each labeled release, detailing what's new in that 
release.

| For each user session I store the reference| to the session in a Vector
so that I
| can tell what users are logged-in, last-accessed-time etc. It was working
fine
| in Tomcat 4.0.4. But in Tomcat4.1.18 (perhaps due to new specifications)
session
| objects are pooled (StandardSessionFactory) and hence the references I
| am storing in the Vector become useless across the jsp page calls. I have
a
| thread that uses this Vector to clean up the users that are timedout but
since
| the session refs in my Vector are useless I can do nothing. Instead of
| storing the refs if I store Session IDs then can I get ref to a session
from
| JSP Server so that I can get the attributes I have set in it. Please
comment.

Since you only asked for comments... There is no new specification regarding http 
servlet sessions from tomcat 4.0 to 4.1.  It's still the servlet spec v2.3.

Your design is vulnerable to any changes in the container session façade 
implementation.  Note that the container is not required to provide you with a session 
list per se.

I don't think using sessions to track who's logged in and last-access-time for 
resources is reliable.  But if you want to do it that way, write an 
HttpSessionListener.  It was created for these sort of session tracking things.  Move 
your vector into that listener.  Add a reference each time a session is created, 
remove it when a session is destroyed.  Add whatever other functionality you need to 
the listener.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



CASE SENSITIVE

2003-02-25 Thread Alberto A C A S Magalhães
**
Este email assim como os ficheiros que possa ter em anexo são confidenciais
e para uso exclusivo da pessoa ou organização para o qual foi enviado.
Se recebeu este email por engano por favor notifique [EMAIL PROTECTED]

Esta nota confirma que esta mensagem foi verificada pelo MIMEsweeper
não tendo sido encontrados virus.

www.mimesweeper.com
***

How can i disabled case sensitive in Tomcat or LINUX.
 
Thanks


RE: can servlet interact with html file in someplace other than current servlet context?

2003-02-25 Thread Xiongfei Wang
Thanks for your advice.
one more question is how to interact wiht static html?
i have /var/www/html 
i have /var/www/servlet
/var/www/servlet is current cotext of webapp

I have servlet login, in login.java i have code like
 
  private static final String TARGET_FILE=/var/www/html/index1.html;
  if(  )
 {
  (req.getRequestDispatcher(target)).forward(req,res);
 return;
 }
 
 this code does not work because index1.html is outside /var/www/html

how can i let servlets in /var/www/servlet interact with html files in 
/var/www/html?

Thanks
 

On Tue, 25 Feb 2003 [EMAIL PROTECTED] wrote:

 Morning!
 
 Your code wouldn't work. 
 
 Servlet should before to get context of the another webapp.
 
 .
 ServletContext webapp2context =
 this.getServletContext().getContext(uri_path_to_wevapp2);
 
 webapp2context.getRequestDispather(some_target_in_webapp2).forward(request
 ,response);
 .
 
 Hope it help you.
 
 BeSt ReGaRdS level0 icq#155042687
 -Original Message-
 From: Xiongfei Wang [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 25, 2003 5:46 AM
 To: Tomcat Users List
 Subject: can servlet interact with html file in someplace other than current
 servlet context?
 
 My current servlet context is in
 /home/jp/reg
 I have a login(login.java) servlet in this context
 In login.java i have code like 
 
  private static final String TARGET_FILE=/var/www/index.html;
  if(  )
 {
  (req.getRequestDispatcher(target)).forward(req,res);
 return;
 }
 
 t
 his code does not work because index.html is outside /home/jp/reg
 
 Is there a way i can let login servlet interact with index.html?
 
 Thanks
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: crontab problems

2003-02-25 Thread Hannes Schmidt
Yes, using wget is probably the second best solution. The best one is to
find the reason why Tomcat crashes at all, since it generally is a stable
and reliable product.

Cron doesn't execute more than once a minute (at least mine doesn't) which
still is quite often. 5 or 10 minutes would be ok too. But that's a matter
of taste, really.

- Original Message -
From: Turner, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:00 PM
Subject: RE: crontab problems



 Agreed...using a Java program to watch Tomcat seems a little circular.
 Plus, I don't see any sort of delay or sleep in the poster's JAva
 code...it looks like it just keeps hammering at Tomcat, as the cron job is
 * * * * *.  Creating all those Runtime objects over and over can't be
 helping performance any.

 A simple shell script using wget would be fine...sure, you can watch the
 output of ps -ef, but that doesn't tell you if Tomcat is accepting
 requests or not.  There could be an entry for Tomcat in the process table,
 but Tomcat could be refusing requests.

 I just write a simple JSP page that outputs the contents of a variable,
like
 ***SUCCESS*** or something like that, then use wget to grab that page
 every so often and check for the string in the output...if it's there,
 things should be OK (there are no guarantees).  If it's not, you have a
 problem.  This way, the JSP page is compiled and cached by Tomcat, it uses
 very little memory, and doesn't bog down the server.

 There are plenty of other alternatives much more robust than a simple
shell
 script...you could use Netsaint/Nagios, Big Brother, and a whole bunch of
 others.

 John

  -Original Message-
  From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 6:29 AM
  To: Tomcat Users List
  Subject: Re: crontab problems
 
 
  Right, you might also just put
 
  JAVA_HOME=...
 
  at the beginning of your crontab.
 
  I assume you have good reasons to use a Java program to watch Tomcat.
  Personally, I would have written a shell script. If you
  really want to use
  Java, you might want to use a different, more reliable
  approach to detect
  (un)availability of Tomcat, something like
 
  import java.net.*;
  URL url = new URL( http://localhost:8080/examples; );
  URLConnection con = url.openConnection();
  con.setUseCaches( false );
  con.connect();
  if( con.getContentLength()  0 ) {
  // restart tomcat
  }
 
  But I just wrote this out of my head ...
 
  - Original Message -
  From: Ralph Einfeldt [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 10:43 AM
  Subject: RE: crontab problems
 
 
  You have to make shure that your script retstart_tomcat
  sets and exports all needed environment variables before
  calling ./startup.sh:
 
  JAVA_HOME=/usr/local/java/jdk1.3.1
  CATALINA_HOME=path to tomcat installation
  CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
  # JAVA_OPTS='-client -v'
 
  export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
  ./startup.sh
 
   -Original Message-
   From: Ayhan Peker [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 10:30 AM
   To: [EMAIL PROTECTED]
   Subject: crontab problems
  
   but the last two lines returns
   /
   The JAVA_HOME environment variable is not defined
   message..
   /
   my retstart_tomcat scrip is
   #!/bin/sh
   cd /usr/local/tomcat/bin
   ./startup.sh
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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




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



RE: properties files

2003-02-25 Thread José Moreira
thank you for the attention, im developing a bean to interact with the
properties file.

I believe that  ServletContext is only available to servlets,

but perhaps the filename can be a parameter in the constructor :D

the reason why im using a properties file is to make the configuration
transparent and easy, to my clients...

so i they change the mysql db parameters they can easily edit the properties
file without much knowledge.

also another advantage i saw in that was the ability to load and save
directly to a file.

if there is a better way im all ears :)


-Mensagem original-
De: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
Enviada: terça-feira, 25 de Fevereiro de 2003 12:51
Para: 'Tomcat Users List'
Assunto: RE: properties files


You need to put your property files in WEB-INF/classes or in a jar in
WEB-INF/lib

Then you can use the getResourceAsStream(..) method of the ServletContext of
your webapp :


properties.load(getServletContext().getResourceAsStream(filePath))

Arnaud


 -Message d'origine-
 De : José Moreira [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 25 février 2003 13:36
 À : Tomcat Users List
 Objet : properties files


 Hello, im using a propeties file to store and retrieve
 application settings
 (like db conection) using this code :

 private Properties properties;

 private String status;

 private boolean NovoConfig;

 /** Creates new ConfigReaderBean */
 public ConfigReaderBean() {

 Properties properties = new  Properties();

 NovoConfig = false;

 try {

 properties.load(new FileInputStream(config.properties));

 } catch (IOException e) {


 System.out.println(Erro ao ler config: +e.getMessage());



 properties.setProperty(database.url,http://localhost/mysql;);

 NovoConfig = true;

 }

 if (NovoConfig) {

 try {

 properties.store(new
 FileOutputStream(newconfig.properties),null);

 System.out.println(Criado: newconfig.properties);

 } catch (IOException e) {

 System.out.println(Erro ao criar novo config:
 +e.getMessage());

 }


 }

 the problem is that it doesnt load the file and saves the
 'newconfig.properties' file under the Netbeans IDE dir,

 how can i load the file located under my webapp WEB-INF dir ?





 ---*--
 José Moreira

 Técnico de Informática | IT Technician

 Vila Nova de Gaia, Portugal

 E-Mail: [EMAIL PROTECTED]

 MSN: [EMAIL PROTECTED]

 ICQ: 136936120

 IRC: ethernal (irc.ptnet.org)



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



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




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



Own Login page

2003-02-25 Thread Paul Mahoney
Dear Team

I've been scanning the web, and this mail archive, looking for the
answer to a question many have asked, but to which I not find any clear
answer. Please bare with me...

We are using form based authentication... works fine.

However, on occasion we want to show a login form on a page. The user
puts in their name and password, clicks submit and is taken to some
protected url having been authorised.

The way I see it, we need to set the action of this login form to a
jsp/servlet, of our making, that takes the name and password,
validates and sets up the appropriate authority object and forwards them
to the target page or to an error page. Because we've set up the
authority object for the session/context, the standard form based dialog
does not appear.
(Does this make sense?)

But I can't see how we do what the j_security_check action must do.

Someone must have been there, done that!. Could they enlighten me?
I've waded through enough javadoc now :(

Many thanks

Paul



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



Re: CASE SENSITIVE

2003-02-25 Thread Tim Funk
You can't.

-Tim

Alberto A C A S Magalhães wrote:
How can i disabled case sensitive in Tomcat or LINUX.
 
Thanks



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


RE: crontab problems

2003-02-25 Thread Turner, John

Yes, Tomcat is generally very stable.  But: Trust, but verify. ;)

John

 -Original Message-
 From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:23 AM
 To: Tomcat Users List
 Subject: Re: crontab problems
 
 
 Yes, using wget is probably the second best solution. The 
 best one is to
 find the reason why Tomcat crashes at all, since it generally 
 is a stable
 and reliable product.
 
 Cron doesn't execute more than once a minute (at least mine 
 doesn't) which
 still is quite often. 5 or 10 minutes would be ok too. But 
 that's a matter
 of taste, really.
 
 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 3:00 PM
 Subject: RE: crontab problems
 
 
 
  Agreed...using a Java program to watch Tomcat seems a 
 little circular.
  Plus, I don't see any sort of delay or sleep in the poster's JAva
  code...it looks like it just keeps hammering at Tomcat, as 
 the cron job is
  * * * * *.  Creating all those Runtime objects over and 
 over can't be
  helping performance any.
 
  A simple shell script using wget would be fine...sure, you 
 can watch the
  output of ps -ef, but that doesn't tell you if Tomcat is accepting
  requests or not.  There could be an entry for Tomcat in the 
 process table,
  but Tomcat could be refusing requests.
 
  I just write a simple JSP page that outputs the contents of 
 a variable,
 like
  ***SUCCESS*** or something like that, then use wget to 
 grab that page
  every so often and check for the string in the output...if 
 it's there,
  things should be OK (there are no guarantees).  If it's 
 not, you have a
  problem.  This way, the JSP page is compiled and cached by 
 Tomcat, it uses
  very little memory, and doesn't bog down the server.
 
  There are plenty of other alternatives much more robust 
 than a simple
 shell
  script...you could use Netsaint/Nagios, Big Brother, and a 
 whole bunch of
  others.
 
  John
 
   -Original Message-
   From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 6:29 AM
   To: Tomcat Users List
   Subject: Re: crontab problems
  
  
   Right, you might also just put
  
   JAVA_HOME=...
  
   at the beginning of your crontab.
  
   I assume you have good reasons to use a Java program to 
 watch Tomcat.
   Personally, I would have written a shell script. If you
   really want to use
   Java, you might want to use a different, more reliable
   approach to detect
   (un)availability of Tomcat, something like
  
   import java.net.*;
   URL url = new URL( http://localhost:8080/examples; );
   URLConnection con = url.openConnection();
   con.setUseCaches( false );
   con.connect();
   if( con.getContentLength()  0 ) {
   // restart tomcat
   }
  
   But I just wrote this out of my head ...
  
   - Original Message -
   From: Ralph Einfeldt [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 10:43 AM
   Subject: RE: crontab problems
  
  
   You have to make shure that your script retstart_tomcat
   sets and exports all needed environment variables before
   calling ./startup.sh:
  
   JAVA_HOME=/usr/local/java/jdk1.3.1
   CATALINA_HOME=path to tomcat installation
   CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
   # JAVA_OPTS='-client -v'
  
   export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
   ./startup.sh
  
-Original Message-
From: Ayhan Peker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:30 AM
To: [EMAIL PROTECTED]
Subject: crontab problems
   
but the last two lines returns
/
The JAVA_HOME environment variable is not defined
message..
/
my retstart_tomcat scrip is
#!/bin/sh
cd /usr/local/tomcat/bin
./startup.sh
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Ian Hunter
I've fallen back to seeing if
getRequestURL().toString().startsWith(https) -- that seems pretty kludgy.
Any other ideas?

- Original Message -
From: Turner, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:41 AM
Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13



 The return from getProtocol() is correct, AFAIK.  I don't believe there is
a
 HTTPS/1.1 or similar, but I could be wrong.

 By check protocol type in the docs (agreed, it is unclear), I believe it
 means to do one (or all) of the following:

 - check the URL for https
 - check the port number for the request
 - use HttpServletRequest.isSecure(), though I think that will return
false
 when you use Tomcat via a connector with ApacheI've never tried it to
be
 sure.

 John

  -Original Message-
  From: Ian Hunter [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 24, 2003 9:26 PM
  To: Tomcat Users List
  Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
  From
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
  pages which absolutely require a secure connection should
  check the protocol
  type associated with the page request and take the
  appropriate action of
  https is not specified.
 
  Also, When running Tomcat primarily as a Servlet/JSP container behind
  another web server, such as Apache or Microsoft IIS, it is
  usually necessary
  to configure the primary web server to handle the SSL connections from
  users. Typically, this server will negotiate all SSL-related
  functionality,
  then pass on any requests destined for the Tomcat container only after
  decrypting those requests. Likewise, Tomcat will return
  cleartext responses,
  that will be encrypted before being returned to the user's
  browser. In this
  environment, Tomcat knows that communications between the
  primary web server
  and the client are taking place over a secure connection (because your
  application needs to be able to ask about this), but it does
  not participate
  in the encryption or decryption itself.
 
  However, when I check request.getProtocol() I get
  HTTP/.1.1 even when
  I'm connecting via SSL (url shows https: and browser shows lock and
  confirms 128 bit SSL) -- what gives?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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



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



Tomcat Version

2003-02-25 Thread christian . schuster




Hello,

Can anyone help me how to figure out which tomcat version is installed. I
need to know if it is 4.1.12 or 4.1.18?

Thanks


Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30


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



RE: can servlet interact with html file in someplace other than c urrent servlet context?

2003-02-25 Thread Shapira, Yoav

Howdy,

I have servlet login, in login.java i have code like
 
  private static final String TARGET_FILE=/var/www/html/index1.html;
  if(  )
 {
  (req.getRequestDispatcher(target)).forward(req,res);
 return;
 }
 

As the JavaDoc for RequestDispatcher says, the resource has to be within
the same webapp.  The above is not going to work.

Two options, nice and ugly:

- Nice: copy the files into your own webapp.  Then use RequestDispatcher
or whatever other mechanism you want.  Once it's a resource in your
webapp, your design options grow significantly.

- Ugly: open a URLConnection to the file (index1.html above), get an
input stream, read it, and output to the servlet's output stream.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



R: properties files

2003-02-25 Thread Simone Chiaretta
I store properties in my the app WEB-INF/web.xml

context-param
param-namesmtpServer/param-name
param-valuemy.smtpserver.net/param-value
descriptionSMTP server to be used to send email from forms in the
website/description
/context-param

and I access the value also in JSP pages with

String value =  getServletContext().getInitParameter(smtpServer);

and I assure u that it works even with JSP not only with servlet, but I
never tryed accessing it from inside a bean.

The only problem is that when you change the value you have to reload the
application..

hope that helps
Simo

 -Messaggio originale-
 Da: José Moreira [mailto:[EMAIL PROTECTED]
 Inviato: martedì 25 febbraio 2003 15.25
 A: Tomcat Users List; [EMAIL PROTECTED]
 Oggetto: RE: properties files


   thank you for the attention, im developing a bean to
 interact with the
 properties file.

   I believe that  ServletContext is only available to servlets,

 but perhaps the filename can be a parameter in the constructor :D

   the reason why im using a properties file is to make the
 configuration
 transparent and easy, to my clients...

 so i they change the mysql db parameters they can easily edit the
 properties
 file without much knowledge.

 also another advantage i saw in that was the ability to load and save
 directly to a file.

 if there is a better way im all ears :)


 -Mensagem original-
 De: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
 Enviada: terça-feira, 25 de Fevereiro de 2003 12:51
 Para: 'Tomcat Users List'
 Assunto: RE: properties files


 You need to put your property files in WEB-INF/classes or in a jar in
 WEB-INF/lib

 Then you can use the getResourceAsStream(..) method of the
 ServletContext of
 your webapp :


 properties.load(getServletContext().getResourceAsStream(filePath))

 Arnaud


  -Message d'origine-
  De : José Moreira [mailto:[EMAIL PROTECTED]
  Envoyé : mardi 25 février 2003 13:36
  À : Tomcat Users List
  Objet : properties files
 
 
  Hello, im using a propeties file to store and retrieve
  application settings
  (like db conection) using this code :
 
  private Properties properties;
 
  private String status;
 
  private boolean NovoConfig;
 
  /** Creates new ConfigReaderBean */
  public ConfigReaderBean() {
 
  Properties properties = new  Properties();
 
  NovoConfig = false;
 
  try {
 
  properties.load(new FileInputStream(config.properties));
 
  } catch (IOException e) {
 
 
  System.out.println(Erro ao ler config: +e.getMessage());
 
 
 
  properties.setProperty(database.url,http://localhost/mysql;);
 
  NovoConfig = true;
 
  }
 
  if (NovoConfig) {
 
  try {
 
  properties.store(new
  FileOutputStream(newconfig.properties),null);
 
  System.out.println(Criado: newconfig.properties);
 
  } catch (IOException e) {
 
  System.out.println(Erro ao criar novo config:
  +e.getMessage());
 
  }
 
 
  }
 
  the problem is that it doesnt load the file and saves the
  'newconfig.properties' file under the Netbeans IDE dir,
 
  how can i load the file located under my webapp WEB-INF dir ?
 
 
 
 
 
  ---*--
  José Moreira
 
  Técnico de Informática | IT Technician
 
  Vila Nova de Gaia, Portugal
 
  E-Mail: [EMAIL PROTECTED]
 
  MSN: [EMAIL PROTECTED]
 
  ICQ: 136936120
 
  IRC: ethernal (irc.ptnet.org)
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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




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




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



RE: Tomcat Version

2003-02-25 Thread Shapira, Yoav

Howdy,
grep $CATALINA_HOME/logs/catalina.out for lines starting with Apache
Tomcat.  The full version will be there.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:31 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Version





Hello,

Can anyone help me how to figure out which tomcat version is installed.
I
need to know if it is 4.1.12 or 4.1.18?

Thanks


Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat Version

2003-02-25 Thread Burcu Dalmis
try this:
http://localhost:8080

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 25 Subat 2003 Sali 16:30
Subject: Tomcat Version


 
 
 
 
 Hello,
 
 Can anyone help me how to figure out which tomcat version is installed. I
 need to know if it is 4.1.12 or 4.1.18?
 
 Thanks
 
 
 Christian Schuster
 
 Rudolf Schuster AG
 Postfach 277
 CH - 3000 Bern 11
 
 http://www.rsag.ch
 ++41 31 348 05 30
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Turner, John

Nope.  I think there are some SSL-specific Request variables that are sent
along with a SSL request, you could always Enum through the list and look
for them, but that is just as kludgy.

The problem is that behind a connector like JK or JK2, there is no HTTP, and
there is no HTTPS.  The protocol being used is JK/JK2 (AJP13/14), so the
only resources available to a developer at that point are the things that
get sent along with typical requests.

John


 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:31 AM
 To: Tomcat Users List
 Subject: Re: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
 I've fallen back to seeing if
 getRequestURL().toString().startsWith(https) -- that seems 
 pretty kludgy.
 Any other ideas?
 
 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 8:41 AM
 Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
 
  The return from getProtocol() is correct, AFAIK.  I don't 
 believe there is
 a
  HTTPS/1.1 or similar, but I could be wrong.
 
  By check protocol type in the docs (agreed, it is 
 unclear), I believe it
  means to do one (or all) of the following:
 
  - check the URL for https
  - check the port number for the request
  - use HttpServletRequest.isSecure(), though I think that will return
 false
  when you use Tomcat via a connector with ApacheI've 
 never tried it to
 be
  sure.
 
  John
 
   -Original Message-
   From: Ian Hunter [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 24, 2003 9:26 PM
   To: Tomcat Users List
   Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   From
   
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
  pages which absolutely require a secure connection should
  check the protocol
  type associated with the page request and take the
  appropriate action of
  https is not specified.
 
  Also, When running Tomcat primarily as a Servlet/JSP container behind
  another web server, such as Apache or Microsoft IIS, it is
  usually necessary
  to configure the primary web server to handle the SSL connections from
  users. Typically, this server will negotiate all SSL-related
  functionality,
  then pass on any requests destined for the Tomcat container only after
  decrypting those requests. Likewise, Tomcat will return
  cleartext responses,
  that will be encrypted before being returned to the user's
  browser. In this
  environment, Tomcat knows that communications between the
  primary web server
  and the client are taking place over a secure connection (because your
  application needs to be able to ask about this), but it does
  not participate
  in the encryption or decryption itself.
 
  However, when I check request.getProtocol() I get
  HTTP/.1.1 even when
  I'm connecting via SSL (url shows https: and browser shows lock and
  confirms 128 bit SSL) -- what gives?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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



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

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



Re: can servlet interact with html file in someplace other than current servlet context?

2003-02-25 Thread Hannes Schmidt
1) Your URL's look really strange. It looks as if your whole server
directory is exported visible through your server. I hope you know what you
are doing.

2) getRequestDispatcher(target)) only works within the servlet context (SC).
For resources outside the SC you might want to try
HttpResponse.sendRedirect( url ).

- Original Message -
From: Xiongfei Wang [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:20 PM
Subject: RE: can servlet interact with html file in someplace other than c
urrent servlet context?


 Thanks for your advice.
 one more question is how to interact wiht static html?
 i have /var/www/html
 i have /var/www/servlet
 /var/www/servlet is current cotext of webapp

 I have servlet login, in login.java i have code like
  
   private static final String TARGET_FILE=/var/www/html/index1.html;
   if(  )
  {
   (req.getRequestDispatcher(target)).forward(req,res);
  return;
  }
  
  this code does not work because index1.html is outside /var/www/html

 how can i let servlets in /var/www/servlet interact with html files in
 /var/www/html?

 Thanks


 On Tue, 25 Feb 2003 [EMAIL PROTECTED] wrote:

  Morning!
 
  Your code wouldn't work.
 
  Servlet should before to get context of the another webapp.
 
  .
  ServletContext webapp2context =
  this.getServletContext().getContext(uri_path_to_wevapp2);
 
 
webapp2context.getRequestDispather(some_target_in_webapp2).forward(request
  ,response);
  .
 
  Hope it help you.
  
  BeSt ReGaRdS level0 icq#155042687
  -Original Message-
  From: Xiongfei Wang [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 5:46 AM
  To: Tomcat Users List
  Subject: can servlet interact with html file in someplace other than
current
  servlet context?
 
  My current servlet context is in
  /home/jp/reg
  I have a login(login.java) servlet in this context
  In login.java i have code like
  
   private static final String TARGET_FILE=/var/www/index.html;
   if(  )
  {
   (req.getRequestDispatcher(target)).forward(req,res);
  return;
  }
  
  t
  his code does not work because index.html is outside /home/jp/reg
 
  Is there a way i can let login servlet interact with index.html?
 
  Thanks
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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




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



RE: crontab problems

2003-02-25 Thread Ayhan Peker
I have no problems with tomcat...

But sometimes under heavy load jvm 1.4 crashes...
see the links:
Ok this is the bug:
http://developer.java.sun.com/developer/bugParade/bugs/4779653.html
unfortunately it is closed, affects 1.4.1 and will not apparently be fixed. 
It oiccurs in large apps under load.on Linux and Solaris ( and most likely 
Windows )
It is related to / a copy of the following bug which
http://developer.java.sun.com/developer/bugParade/bugs/4724356.html



what is the best suggestion?

just trying to determine if tomcat is running..
if not i will restart it ..
(jvm just crashed last saturday nightI did not know anything until the 
sunday evening)..

At 09:29 AM 2/25/03 -0500, you wrote:

Yes, Tomcat is generally very stable.  But: Trust, but verify. ;)

John

 -Original Message-
 From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:23 AM
 To: Tomcat Users List
 Subject: Re: crontab problems


 Yes, using wget is probably the second best solution. The
 best one is to
 find the reason why Tomcat crashes at all, since it generally
 is a stable
 and reliable product.

 Cron doesn't execute more than once a minute (at least mine
 doesn't) which
 still is quite often. 5 or 10 minutes would be ok too. But
 that's a matter
 of taste, really.

 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 3:00 PM
 Subject: RE: crontab problems


 
  Agreed...using a Java program to watch Tomcat seems a
 little circular.
  Plus, I don't see any sort of delay or sleep in the poster's JAva
  code...it looks like it just keeps hammering at Tomcat, as
 the cron job is
  * * * * *.  Creating all those Runtime objects over and
 over can't be
  helping performance any.
 
  A simple shell script using wget would be fine...sure, you
 can watch the
  output of ps -ef, but that doesn't tell you if Tomcat is accepting
  requests or not.  There could be an entry for Tomcat in the
 process table,
  but Tomcat could be refusing requests.
 
  I just write a simple JSP page that outputs the contents of
 a variable,
 like
  ***SUCCESS*** or something like that, then use wget to
 grab that page
  every so often and check for the string in the output...if
 it's there,
  things should be OK (there are no guarantees).  If it's
 not, you have a
  problem.  This way, the JSP page is compiled and cached by
 Tomcat, it uses
  very little memory, and doesn't bog down the server.
 
  There are plenty of other alternatives much more robust
 than a simple
 shell
  script...you could use Netsaint/Nagios, Big Brother, and a
 whole bunch of
  others.
 
  John
 
   -Original Message-
   From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 6:29 AM
   To: Tomcat Users List
   Subject: Re: crontab problems
  
  
   Right, you might also just put
  
   JAVA_HOME=...
  
   at the beginning of your crontab.
  
   I assume you have good reasons to use a Java program to
 watch Tomcat.
   Personally, I would have written a shell script. If you
   really want to use
   Java, you might want to use a different, more reliable
   approach to detect
   (un)availability of Tomcat, something like
  
   import java.net.*;
   URL url = new URL( http://localhost:8080/examples; );
   URLConnection con = url.openConnection();
   con.setUseCaches( false );
   con.connect();
   if( con.getContentLength()  0 ) {
   // restart tomcat
   }
  
   But I just wrote this out of my head ...
  
   - Original Message -
   From: Ralph Einfeldt [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 10:43 AM
   Subject: RE: crontab problems
  
  
   You have to make shure that your script retstart_tomcat
   sets and exports all needed environment variables before
   calling ./startup.sh:
  
   JAVA_HOME=/usr/local/java/jdk1.3.1
   CATALINA_HOME=path to tomcat installation
   CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
   # JAVA_OPTS='-client -v'
  
   export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
   ./startup.sh
  
-Original Message-
From: Ayhan Peker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:30 AM
To: [EMAIL PROTECTED]
Subject: crontab problems
   
but the last two lines returns
/
The JAVA_HOME environment variable is not defined
message..
/
my retstart_tomcat scrip is
#!/bin/sh
cd /usr/local/tomcat/bin
./startup.sh
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
 [EMAIL PROTECTED]
  
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
 [EMAIL PROTECTED]
  
 
 
 

problem with POST-data under AJP 1.3

2003-02-25 Thread Juergen Bachler
hi, 

+in my implementation of AJP 1.3 i send an AJPRequest which tomcat seems
to like:

2003-02-25 14:21:15 Ajp13Processor[8009][3] [Ajp13] [RequestHandler]
decodeRequest(): success

+immediatly after i send a packet with 0x1234 and contentlength (no
AJP_FORWARD_REQUEST signal)
+tomcat responds with a packet of type GET Body Chunk (code 6) and
waits for something 

does anybody know for what he might wait?   

juergen

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



About using tomcat4.1

2003-02-25 Thread Michael Tse
Dear Sir,

I got some problem when i using tomcat to run my JSP file.
When i run the file, it shows an error page which place the messages as 
the following:

description The server encountered an internal error () that prevented 
it from fulfilling this request.

exception 

org.apache.jasper.JasperException: No suitable driver
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

javax.servlet.ServletException: No suitable driver
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.Default_jsp._jspService(Default_jsp.java:1460)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 

Re: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Ian Hunter
So if I ditched ajp and went with a ModProxy directive or something, might
that work?  I wouldn't think so, because the protocol in use between Apache
and Tomcat would then be http, not https.  Maybe they ought to fix that page
I quoted originally to give a more realistic understanding of SSL front
ends...

- Original Message -
From: Turner, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:37 AM
Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13



 Nope.  I think there are some SSL-specific Request variables that are sent
 along with a SSL request, you could always Enum through the list and look
 for them, but that is just as kludgy.

 The problem is that behind a connector like JK or JK2, there is no HTTP,
and
 there is no HTTPS.  The protocol being used is JK/JK2 (AJP13/14), so the
 only resources available to a developer at that point are the things that
 get sent along with typical requests.

 John


  -Original Message-
  From: Ian Hunter [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 9:31 AM
  To: Tomcat Users List
  Subject: Re: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
  I've fallen back to seeing if
  getRequestURL().toString().startsWith(https) -- that seems
  pretty kludgy.
  Any other ideas?
 
  - Original Message -
  From: Turner, John [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 8:41 AM
  Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
  
   The return from getProtocol() is correct, AFAIK.  I don't
  believe there is
  a
   HTTPS/1.1 or similar, but I could be wrong.
  
   By check protocol type in the docs (agreed, it is
  unclear), I believe it
   means to do one (or all) of the following:
  
   - check the URL for https
   - check the port number for the request
   - use HttpServletRequest.isSecure(), though I think that will return
  false
   when you use Tomcat via a connector with ApacheI've
  never tried it to
  be
   sure.
  
   John
  
-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 9:26 PM
To: Tomcat Users List
Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
   
   
From
   
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
   pages which absolutely require a secure connection should
   check the protocol
   type associated with the page request and take the
   appropriate action of
   https is not specified.
  
   Also, When running Tomcat primarily as a Servlet/JSP container behind
   another web server, such as Apache or Microsoft IIS, it is
   usually necessary
   to configure the primary web server to handle the SSL connections from
   users. Typically, this server will negotiate all SSL-related
   functionality,
   then pass on any requests destined for the Tomcat container only after
   decrypting those requests. Likewise, Tomcat will return
   cleartext responses,
   that will be encrypted before being returned to the user's
   browser. In this
   environment, Tomcat knows that communications between the
   primary web server
   and the client are taking place over a secure connection (because your
   application needs to be able to ask about this), but it does
   not participate
   in the encryption or decryption itself.
  
   However, when I check request.getProtocol() I get
   HTTP/.1.1 even when
   I'm connecting via SSL (url shows https: and browser shows lock and
   confirms 128 bit SSL) -- what gives?
  


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



Tomcat doesn't throw exception if client application closses thesocket.

2003-02-25 Thread Niketan Mourya
Hi All,
   I am facing a problem because tomcat doesn't throw exception if 
client closes the socket  connection. Do any body have a 
workaround/solution to know about the socket connection status with the 
client application. I am using tomcat alone.

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


IE6 crashes / Netscape works

2003-02-25 Thread christian . schuster




Hello,

I have a web application where I let users log in through an applet. If the
user is verified I call another website from the applet like this

  AppletContext appletContext = getAppletContext();
  appletContext.showDocument(URL,_self);

Now I have a big problem and I am not sure where it actually is.

On my local machine (Win2k prof) all is workrng fine and the new site is
loaded. This works in IE6 and Netscape 7.

But I also have a Win2k server where I also runTomcat. There it just works
with Netscape. If I try to log in in IE, it crashes and is even not
responding anymore. It crashes right after the showDocument call.

I was testing it with Tomcat 4.18 and 4.12. Same effect. I also tried with
ports 8080 or 80 or whatever. Same thing.

Does anyone know where the problem is? Is it IE, Tomcat or Win server?

Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30


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



RE: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Eduardo Jaunez S.
Dear Ian,

I have the same problem, but I'm trying to pass the SSL_* vars generated by
mod_ssl in Apache into the Tomcat side. I think this aproach could resolve
your problem (there are a lot of vars generated only when a SSL session is
open).

Unfortunately I can't do it yet, so the JkEnvVar doesn't work for my tests,
and I don't know what is wrong. I send to you some hints (I receive from
Tomcat Developer's list):

httpd.conf:
...
SSLOptions +StdEnvVars +ExportCertData
...
JkEnvVar SSL_CLIENT_CERT SSL_CLIENT_CERT
...


MyTest.jsp
...
HttpServletRequest req  ; //from the post ...

// Gets the X.509 PEM Certificate
String SSL_Client =  req.getAttribute(SSL_CLIENT_CERT) ;
...


If you are lucky than me, please let me know !!.

Eduardo.


 -Mensaje original-
 De: Ian Hunter [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 25 de Febrero de 2003 11:31
 Para: Tomcat Users List
 Asunto: Re: How to verify SSL/HTTPS behind Tomcat via AJP13


 I've fallen back to seeing if
 getRequestURL().toString().startsWith(https) -- that seems
 pretty kludgy.
 Any other ideas?

 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 8:41 AM
 Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13


 
  The return from getProtocol() is correct, AFAIK.  I don't
 believe there is
 a
  HTTPS/1.1 or similar, but I could be wrong.
 
  By check protocol type in the docs (agreed, it is
 unclear), I believe it
  means to do one (or all) of the following:
 
  - check the URL for https
  - check the port number for the request
  - use HttpServletRequest.isSecure(), though I think that will return
 false
  when you use Tomcat via a connector with ApacheI've
 never tried it to
 be
  sure.
 
  John
 
   -Original Message-
   From: Ian Hunter [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 24, 2003 9:26 PM
   To: Tomcat Users List
   Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   From
  
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
   pages which absolutely require a secure connection should
   check the protocol
   type associated with the page request and take the
   appropriate action of
   https is not specified.
  
   Also, When running Tomcat primarily as a Servlet/JSP
 container behind
   another web server, such as Apache or Microsoft IIS, it is
   usually necessary
   to configure the primary web server to handle the SSL
 connections from
   users. Typically, this server will negotiate all SSL-related
   functionality,
   then pass on any requests destined for the Tomcat
 container only after
   decrypting those requests. Likewise, Tomcat will return
   cleartext responses,
   that will be encrypted before being returned to the user's
   browser. In this
   environment, Tomcat knows that communications between the
   primary web server
   and the client are taking place over a secure connection
 (because your
   application needs to be able to ask about this), but it does
   not participate
   in the encryption or decryption itself.
  
   However, when I check request.getProtocol() I get
   HTTP/.1.1 even when
   I'm connecting via SSL (url shows https: and browser
 shows lock and
   confirms 128 bit SSL) -- what gives?
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
 [EMAIL PROTECTED]
  
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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



Re: Tomcat doesn't throw exception if client application closses the socket.

2003-02-25 Thread Ian Hunter
Hmm.  What are you trying to do where that matters?  Sounds like there might
be a better way...

- Original Message -
From: Niketan Mourya [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:53 AM
Subject: Tomcat doesn't throw exception if client application closses the
socket.


 Hi All,
 I am facing a problem because tomcat doesn't throw exception if
 client closes the socket  connection. Do any body have a
 workaround/solution to know about the socket connection status with the
 client application. I am using tomcat alone.

 Many thanks,
 -Niketan


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



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



RE: running servlet on Tomcat

2003-02-25 Thread Steve Guo

I do not fully understand why they disable the servlet invoker by default. In general, 
Tomcat is used for learning purpose. Having to modify web.xml for each webapp seems a 
lot of work.
You refered to FAQ, but when I tried to get it from the list server, I got,
FAQ - Frequently asked questions of the [EMAIL PROTECTED] 
list. None available.

Where is the FAQ?

Thanks, Steve



 Turner, John [EMAIL PROTECTED] wrote:
This is a FAQ.

By default, the Invoker servlet is disabled for everything but the /examples
webapp for security reasons. It really shouldn't be enabled for the
/examples webapp, either, but I'm sure that's a low priority for the dev
team.

If you want your servlet to be available, you need to either:

- enable the Invoker servlet (not recommended)

- explicitly map your servlet in web.xml using servlet and servlet-mapping
elements:


MyServlet
com.myApp.MyServlet



MyServlet
/MyServlet


Check the docs, check the release notes for more info.

John

 -Original Message-
 From: Tan van Nguyen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 5:05 AM
 To: [EMAIL PROTECTED]
 Subject: running servlet on Tomcat
 
 
 Hi, I have a problem about running servlet in Tomcat. My 
 system information:
 Apache Tomcat v4.1.18
 Java 2 SDK 1.3.1_07
 
 The problem is that I can't run my servlet program placed in 
 ROOT/WEB-INF/classes directory with the url: 
 http://localhost:8080/servlet/Myprogram 
 I have done everything and read a lot of documentation, but 
 still the same error appear: The 404 Error:The requested 
 resource (/servlet/Myprogram) is not available.
 
 But when I place my program source and class files in the 
 webapps/examples/WEB-INF/classes directory, it ran properly..
 
 It seems like something wrong with the classloader..
 
 I really appriciate your reply!
 
 Thanks in advance!
 - Tan Nguyen -
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

RE: LDAP Authentication

2003-02-25 Thread Raible, Matt
Here's what I have in my context to make it work:

Realm className=org.apache.catalina.realm.JNDIRealm debug=99
  connectionName=cn=Manager,dc=raibledesigns,dc=com
  connectionPassword=secret
   connectionURL=ldap://drevil:389;
userPassword=userPassword
 userPattern=uid={0},ou=people,dc=raibledesigns,dc=com
roleBase=ou=groups,dc=raibledesigns,dc=com
roleName=cn
  roleSearch=(uniqueMember={0}) /



 -Original Message-
 From: Marcelino Cruz [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 7:13 AM
 To: 'Tomcat Users List'
 Subject: LDAP Authentication
 
 
 Hello:
 
 Does anyone here has LDAP authentication set up through a JNDIRealm in
 server.xml and could send me a sample server.xml for me to look at?
 
 Thanks!
 
 MC
 


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



RE: About using tomcat4.1

2003-02-25 Thread Shapira, Yoav

Howdy,
Can you share the source code the JSP?  That'll help.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Michael Tse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:40 AM
To: [EMAIL PROTECTED]
Subject: About using tomcat4.1

Dear Sir,

I got some problem when i using tomcat to run my JSP file.
When i run the file, it shows an error page which place the messages as
the following:

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException: No suitable driver
   at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
ava:
248)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
)
   at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
nFilterChain.java:247)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
hain.java:193)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
ava:260)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
ava:191)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24
15)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
0)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:643)
   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
.java:170)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:641)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
2)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:641)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
a:174)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
32)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
ection(Http11Protocol.java:386)
   at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
34)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
va:530)
   at java.lang.Thread.run(Thread.java:536)


root cause

javax.servlet.ServletException: No suitable driver
   at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte
xtIm
pl.java:533)
   at org.apache.jsp.Default_jsp._jspService(Default_jsp.java:1460)
   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
ava:
204)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
)
   at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
nFilterChain.java:247)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
hain.java:193)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
ava:260)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
keNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

Re: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Ian Hunter
Thanks, I'll try to check that out.

Does Apache add those variables to the request header?

- Original Message -
From: Eduardo Jaunez S. [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:53 AM
Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13


 Dear Ian,

 I have the same problem, but I'm trying to pass the SSL_* vars generated
by
 mod_ssl in Apache into the Tomcat side. I think this aproach could resolve
 your problem (there are a lot of vars generated only when a SSL session is
 open).

 Unfortunately I can't do it yet, so the JkEnvVar doesn't work for my
tests,
 and I don't know what is wrong. I send to you some hints (I receive from
 Tomcat Developer's list):

 httpd.conf:
 ...
 SSLOptions +StdEnvVars +ExportCertData
 ...
 JkEnvVar SSL_CLIENT_CERT SSL_CLIENT_CERT
 ...


 MyTest.jsp
 ...
 HttpServletRequest req  ; //from the post ...

 // Gets the X.509 PEM Certificate
 String SSL_Client =  req.getAttribute(SSL_CLIENT_CERT) ;
 ...


 If you are lucky than me, please let me know !!.

 Eduardo.


  -Mensaje original-
  De: Ian Hunter [mailto:[EMAIL PROTECTED]
  Enviado el: Martes, 25 de Febrero de 2003 11:31
  Para: Tomcat Users List
  Asunto: Re: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
  I've fallen back to seeing if
  getRequestURL().toString().startsWith(https) -- that seems
  pretty kludgy.
  Any other ideas?
 
  - Original Message -
  From: Turner, John [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 8:41 AM
  Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
  
   The return from getProtocol() is correct, AFAIK.  I don't
  believe there is
  a
   HTTPS/1.1 or similar, but I could be wrong.
  
   By check protocol type in the docs (agreed, it is
  unclear), I believe it
   means to do one (or all) of the following:
  
   - check the URL for https
   - check the port number for the request
   - use HttpServletRequest.isSecure(), though I think that will return
  false
   when you use Tomcat via a connector with ApacheI've
  never tried it to
  be
   sure.
  
   John
  
-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 9:26 PM
To: Tomcat Users List
Subject: How to verify SSL/HTTPS behind Tomcat via AJP13
   
   
From
   
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
pages which absolutely require a secure connection should
check the protocol
type associated with the page request and take the
appropriate action of
https is not specified.
   
Also, When running Tomcat primarily as a Servlet/JSP
  container behind
another web server, such as Apache or Microsoft IIS, it is
usually necessary
to configure the primary web server to handle the SSL
  connections from
users. Typically, this server will negotiate all SSL-related
functionality,
then pass on any requests destined for the Tomcat
  container only after
decrypting those requests. Likewise, Tomcat will return
cleartext responses,
that will be encrypted before being returned to the user's
browser. In this
environment, Tomcat knows that communications between the
primary web server
and the client are taking place over a secure connection
  (because your
application needs to be able to ask about this), but it does
not participate
in the encryption or decryption itself.
   
However, when I check request.getProtocol() I get
HTTP/.1.1 even when
I'm connecting via SSL (url shows https: and browser
  shows lock and
confirms 128 bit SSL) -- what gives?
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
  [EMAIL PROTECTED]
   
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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



Re: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Kris Schneider
Did you try ServletRequest.isSecure? Another thought is to see how the app
behaves if you declare a security constraint in web.xml:

security-constraint
  web-resource-collection
web-resource-nameEverything/web-resource-name
url-pattern/*/url-pattern
  /web-resource-collection
  user-data-constraint
transport-guaranteeINTEGRAL/transport-guarantee
!-- or CONFIDENTIAL --
  /user-data-constraint
/security-constraint

Which should require that all requests are made via SSL.

Quoting Ian Hunter [EMAIL PROTECTED]:

 So if I ditched ajp and went with a ModProxy directive or something, might
 that work?  I wouldn't think so, because the protocol in use between Apache
 and Tomcat would then be http, not https.  Maybe they ought to fix that
 page
 I quoted originally to give a more realistic understanding of SSL front
 ends...
 
 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:37 AM
 Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
 
 
 
  Nope.  I think there are some SSL-specific Request variables that are
 sent
  along with a SSL request, you could always Enum through the list and look
  for them, but that is just as kludgy.
 
  The problem is that behind a connector like JK or JK2, there is no HTTP,
 and
  there is no HTTPS.  The protocol being used is JK/JK2 (AJP13/14), so the
  only resources available to a developer at that point are the things that
  get sent along with typical requests.
 
  John
 
 
   -Original Message-
   From: Ian Hunter [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 9:31 AM
   To: Tomcat Users List
   Subject: Re: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   I've fallen back to seeing if
   getRequestURL().toString().startsWith(https) -- that seems
   pretty kludgy.
   Any other ideas?
  
   - Original Message -
   From: Turner, John [EMAIL PROTECTED]
   To: 'Tomcat Users List' [EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 8:41 AM
   Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   
The return from getProtocol() is correct, AFAIK.  I don't
   believe there is
   a
HTTPS/1.1 or similar, but I could be wrong.
   
By check protocol type in the docs (agreed, it is
   unclear), I believe it
means to do one (or all) of the following:
   
- check the URL for https
- check the port number for the request
- use HttpServletRequest.isSecure(), though I think that will return
   false
when you use Tomcat via a connector with ApacheI've
   never tried it to
   be
sure.
   
John
   
 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 9:26 PM
 To: Tomcat Users List
 Subject: How to verify SSL/HTTPS behind Tomcat via AJP13


 From

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
pages which absolutely require a secure connection should
check the protocol
type associated with the page request and take the
appropriate action of
https is not specified.
   
Also, When running Tomcat primarily as a Servlet/JSP container
 behind
another web server, such as Apache or Microsoft IIS, it is
usually necessary
to configure the primary web server to handle the SSL connections
 from
users. Typically, this server will negotiate all SSL-related
functionality,
then pass on any requests destined for the Tomcat container only
 after
decrypting those requests. Likewise, Tomcat will return
cleartext responses,
that will be encrypted before being returned to the user's
browser. In this
environment, Tomcat knows that communications between the
primary web server
and the client are taking place over a secure connection (because
 your
application needs to be able to ask about this), but it does
not participate
in the encryption or decryption itself.
   
However, when I check request.getProtocol() I get
HTTP/.1.1 even when
I'm connecting via SSL (url shows https: and browser shows lock and
confirms 128 bit SSL) -- what gives?
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



RE: running servlet on Tomcat

2003-02-25 Thread Shapira, Yoav

Howdy,

I do not fully understand why they disable the servlet invoker by
default.

It's a security matter addressed in various release notes, and in many
questions on this list.  Search the tomcat-user list archives at AIMS:
http://marc.theaimsgroup.com/?w=2


In general, Tomcat is used for learning purpose.

Not true.  Many people use tomcat in production settings of various
types.

Having to modify web.xml
for each webapp seems a lot of work.

It's usually not a lot of work.  How much you put in web.xml depends on
your design.  You can always hard-code things ;)

You refered to FAQ, but when I tried to get it from the list server, I
got,
FAQ - Frequently asked questions of the [EMAIL PROTECTED]
list. None available.

There is no FAQ that the listserv can automatically get you.  Most of
the frequently asked on the list are covered in the HOW-TO pages in the
tomcat documentation part of http://jakarta.apache.org/tomcat.

John said your question IS a faq, i.e. frequently-asked, and he gave you
the answer.  He didn't say your question was IN a faq document.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat doesn't throw exception if client application closses the socket.

2003-02-25 Thread Jim Cobban
- Original Message -
From: Niketan Mourya [EMAIL PROTECTED]
Subject: Tomcat doesn't throw exception if client application closses the
socket.


 Hi All,
 I am facing a problem because tomcat doesn't throw exception if
 client closes the socket  connection. Do any body have a
 workaround/solution to know about the socket connection status with the
 client application. I am using tomcat alone.

If the client closes the socket connection prints to JspWriter throw an
IOException.  Where are you expecting the exception to be thrown?


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



RE: running servlet on Tomcat

2003-02-25 Thread Turner, John

There isn't one, though there are a couple in the works and due soon.

My point was that the topic comes up just about every day.  Even without
searching the list archives, being a member on the list for a day or two and
reading the traffic (always a good thing to do when joining) would see this
topic come up and get answered.

If the Invoker servlet is enabled, you can use a specially-crafted URL to
get the source of JSP pages.  Maybe in some cases this is no big deal, but
in some cases it can be a huge deal, as in a scenario where someone puts
usernames, passwords, and connection URLs into their JSP source.  In
general, any exploit that allows the viewing of source in raw form, whether
or not that source has anything valuable in it, is considered a security
flaw that needs to be fixed.  This is true regardless of the technology
used: ASP, JSP, PHP, Cold Fusion, whatever.

John

 -Original Message-
 From: Steve Guo [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:56 AM
 To: Tomcat Users List
 Subject: RE: running servlet on Tomcat
 
 
 
 I do not fully understand why they disable the servlet 
 invoker by default. In general, Tomcat is used for learning 
 purpose. Having to modify web.xml for each webapp seems a lot of work.
 You refered to FAQ, but when I tried to get it from the list 
 server, I got,
 FAQ - Frequently asked questions of the 
 [EMAIL PROTECTED] 
 list. None available.
 
 Where is the FAQ?
 
 Thanks, Steve
 
 
 
  Turner, John [EMAIL PROTECTED] wrote:
 This is a FAQ.
 
 By default, the Invoker servlet is disabled for everything 
 but the /examples
 webapp for security reasons. It really shouldn't be enabled for the
 /examples webapp, either, but I'm sure that's a low priority 
 for the dev
 team.
 
 If you want your servlet to be available, you need to either:
 
 - enable the Invoker servlet (not recommended)
 
 - explicitly map your servlet in web.xml using servlet and 
 servlet-mapping
 elements:
 
 
 MyServlet
 com.myApp.MyServlet
 
 
 
 MyServlet
 /MyServlet
 
 
 Check the docs, check the release notes for more info.
 
 John
 
  -Original Message-
  From: Tan van Nguyen [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 5:05 AM
  To: [EMAIL PROTECTED]
  Subject: running servlet on Tomcat
  
  
  Hi, I have a problem about running servlet in Tomcat. My 
  system information:
  Apache Tomcat v4.1.18
  Java 2 SDK 1.3.1_07
  
  The problem is that I can't run my servlet program placed in 
  ROOT/WEB-INF/classes directory with the url: 
  http://localhost:8080/servlet/Myprogram 
  I have done everything and read a lot of documentation, but 
  still the same error appear: The 404 Error:The requested 
  resource (/servlet/Myprogram) is not available.
  
  But when I place my program source and class files in the 
  webapps/examples/WEB-INF/classes directory, it ran properly..
  
  It seems like something wrong with the classloader..
  
  I really appriciate your reply!
  
  Thanks in advance!
  - Tan Nguyen -
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, and more
 

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



Re: running servlet on Tomcat

2003-02-25 Thread Tim Funk
I have an unofficial FAQ here:
http://mywebpages.comcast.net/funkman/
and
http://tomcatfaq.sourceforge.net/
I haven't been 'advertising' it much yet since content is still kind of 
lite and organization is not the greatest. Your particular question is 
not there yet - but it is addressed in TOMCAT's readme.

The disabling of /servlet/ by default is due to a security hole.

-Tim

Steve Guo wrote:
I do not fully understand why they disable the servlet invoker by default. In general, Tomcat is used for learning purpose. Having to modify web.xml for each webapp seems a lot of work.
You refered to FAQ, but when I tried to get it from the list server, I got,
FAQ - Frequently asked questions of the [EMAIL PROTECTED] 
list. None available.

Where is the FAQ?

Thanks, Steve

 


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


Applet Cannot Make HTTP POST Request to Tomcat w/IIS Redirector

2003-02-25 Thread Rick Bullotta
Our applets/servlets run perfectly with Tomcat 4.1.18 and Apache 2.0.4X
(using jk as the go-between), but when used with the IIS redirector and
jk, the applets are unable to do any HTTP POST requests.  Applets can,
however, successfully issue GET requests.  There's nothing unusual about
the applet code, a snippet is shown below.  The code blocks on the
oStrm.close() method.  It works perfectly when using the Apache Http
server.  Also provided is the stderr.log output.  The stdout.log output
also contains some dump of what appears to be the HTTP content.
Unfortunately, we do have clients that will need the IIS/Tomcat combo.

This one is causing great hair loss, and any help welcomed. ;

Applet code snippet:

sURL = ...
sPostData = ...

URL url = new URL(sURL);

URLConnection urlconnection = url.openConnection();

urlconnection.setDoInput(true);
urlconnection.setDoOutput(true);
urlconnection.setUseCaches(false);
urlconnection.setRequestProperty(Content-Type,
application/x-www-form-urlencoded);

System.out.println(Getting Output Stream);

DataOutputStream oStrm = new
DataOutputStream(urlconnection.getOutputStream());

System.out.println(Got Output Stream);
oStrm.writeBytes(sPostData);
System.out.println(Wrote Stream);
oStrm.flush();
System.out.println(Flushed Output Stream);
oStrm.close();
System.out.println(Closed Output Stream);

DataInputStream iStrm = new DataInputStream(new
BufferedInputStream(urlconnection.getInputStream(), 8192));

int nSuccessCode = iStrm.readInt();

...
=

stderr.log output:

=
SEVERE: Error decoding request 
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at
org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:526)
at
org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:464)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:625)
at
org.apache.jk.common.JkInputStream.receive(JkInputStream.java:300)
at
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:46
1)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:343)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
590)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:530)
at java.lang.Thread.run(Thread.java:536)
Feb 25, 2003 9:55:27 AM org.apache.jk.common.ChannelSocket
processConnection
WARNING: processCallbacks status 2
=

stdout.log content:

=12 34 01 2a 02 04 00 08 48 54 54 50 2f 31 2e 31  |
.4.*HTTP/1.1
00 00 14 2f 73 65 72 76 6c 65 74 2f 49 6c 6c 75  | .../servlet/Illu
6d 69 6e 61 74 6f 72 00 00 09 31 32 37 2e 30 2e  | minator...127.0.
30 2e 31 00 00 09 31 32 37 2e 30 2e 30 2e 31 00  | 0.1...127.0.0.1.
00 09 6c 6f 63 61 6c 68 6f 73 74 00 00 50 00 00  | ..localhost..P..
08 a0 01 00 34 74 65 78 74 2f 68 74 6d 6c 2c 20  | .?..4text/html, 
69 6d 61 67 65 2f 67 69 66 2c 20 69 6d 61 67 65  | image/gif, image
2f 6a 70 65 67 2c 20 2a 3b 20 71 3d 2e 32 2c 20  | /jpeg, *; q=.2, 
2a 2f 2a 3b 20 71 3d 2e 32 00 a0 04 00 02 65 6e  | */*; q=.2.?...en
00 a0 06 00 0a 4b 65 65 70 2d 41 6c 69 76 65 00  | .?...Keep-Alive.
a0 0b 00 09 6c 6f 63 61 6c 68 6f 73 74 00 a0 0e  | ?...localhost.?.
00 29 4d 6f 7a 69 6c 6c 61 2f 34 2e 30 20 28 63  | .)Mozilla/4.0 (c
6f 6d 70 61 74 69 62 6c 65 3b 20 4d 53 49 45 20  | ompatible; MSIE 
36 2e 30 3b 20 57 69 6e 33 32 29 00 a0 08 00 03  | 6.0; Win32).?...
31 30 32 00 a0 07 00 21 61 70 70 6c 69 63 61 74  | 102.?..!applicat
69 6f 6e 2f 78 2d 77 77 77 2d 66 6f 72 6d 2d 75  | ion/x-www-form-u
72 6c 65 6e 63 6f 64 65 64 00 00 0d 63 61 63 68  | rlencoded...cach
65 2d 63 6f 6e 74 72 6f 6c 00 00 08 6e 6f 2d 63  | e-control...no-c
61 63 68 65 00 03 00 00 00 04 00 00 00 ff| ache.?
=

Rick Bullotta
CTO
Lighthammer Software (http://www.lighthammer.com)




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 9:50 AM
To: [EMAIL PROTECTED]
Subject: IE6 crashes / Netscape works






Hello,

I have a web application where I let users log in through 

RE: crontab problems

2003-02-25 Thread Turner, John

Well, if the JVM is crashed, how can a program or application written in
Java help you manage Tomcat?  That was the point.

John

 -Original Message-
 From: Ayhan Peker [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:43 AM
 To: Tomcat Users List
 Subject: RE: crontab problems
 
 
 I have no problems with tomcat...
 
 But sometimes under heavy load jvm 1.4 crashes...
 see the links:
 
 Ok this is the bug:
 http://developer.java.sun.com/developer/bugParade/bugs/4779653.html
 unfortunately it is closed, affects 1.4.1 and will not 
 apparently be fixed. 
 It oiccurs in large apps under load.on Linux and Solaris ( 
 and most likely 
 Windows )
 It is related to / a copy of the following bug which
 http://developer.java.sun.com/developer/bugParade/bugs/4724356.html
 
 
 
 
 what is the best suggestion?
 
 just trying to determine if tomcat is running..
 if not i will restart it ..
 (jvm just crashed last saturday nightI did not know 
 anything until the 
 sunday evening)..
 
 
 At 09:29 AM 2/25/03 -0500, you wrote:
 
 Yes, Tomcat is generally very stable.  But: Trust, but verify. ;)
 
 John
 
   -Original Message-
   From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 9:23 AM
   To: Tomcat Users List
   Subject: Re: crontab problems
  
  
   Yes, using wget is probably the second best solution. The
   best one is to
   find the reason why Tomcat crashes at all, since it generally
   is a stable
   and reliable product.
  
   Cron doesn't execute more than once a minute (at least mine
   doesn't) which
   still is quite often. 5 or 10 minutes would be ok too. But
   that's a matter
   of taste, really.
  
   - Original Message -
   From: Turner, John [EMAIL PROTECTED]
   To: 'Tomcat Users List' [EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 3:00 PM
   Subject: RE: crontab problems
  
  
   
Agreed...using a Java program to watch Tomcat seems a
   little circular.
Plus, I don't see any sort of delay or sleep in the 
 poster's JAva
code...it looks like it just keeps hammering at Tomcat, as
   the cron job is
* * * * *.  Creating all those Runtime objects over and
   over can't be
helping performance any.
   
A simple shell script using wget would be fine...sure, you
   can watch the
output of ps -ef, but that doesn't tell you if Tomcat 
 is accepting
requests or not.  There could be an entry for Tomcat in the
   process table,
but Tomcat could be refusing requests.
   
I just write a simple JSP page that outputs the contents of
   a variable,
   like
***SUCCESS*** or something like that, then use wget to
   grab that page
every so often and check for the string in the output...if
   it's there,
things should be OK (there are no guarantees).  If it's
   not, you have a
problem.  This way, the JSP page is compiled and cached by
   Tomcat, it uses
very little memory, and doesn't bog down the server.
   
There are plenty of other alternatives much more robust
   than a simple
   shell
script...you could use Netsaint/Nagios, Big Brother, and a
   whole bunch of
others.
   
John
   
 -Original Message-
 From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:29 AM
 To: Tomcat Users List
 Subject: Re: crontab problems


 Right, you might also just put

 JAVA_HOME=...

 at the beginning of your crontab.

 I assume you have good reasons to use a Java program to
   watch Tomcat.
 Personally, I would have written a shell script. If you
 really want to use
 Java, you might want to use a different, more reliable
 approach to detect
 (un)availability of Tomcat, something like

 import java.net.*;
 URL url = new URL( http://localhost:8080/examples; );
 URLConnection con = url.openConnection();
 con.setUseCaches( false );
 con.connect();
 if( con.getContentLength()  0 ) {
 // restart tomcat
 }

 But I just wrote this out of my head ...

 - Original Message -
 From: Ralph Einfeldt [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 10:43 AM
 Subject: RE: crontab problems


 You have to make shure that your script retstart_tomcat
 sets and exports all needed environment variables before
 calling ./startup.sh:

 JAVA_HOME=/usr/local/java/jdk1.3.1
 CATALINA_HOME=path to tomcat installation
 CATALINA_BASE=path to tomcat instance or $CATALINA_HOME
 # JAVA_OPTS='-client -v'

 export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS
 ./startup.sh

  -Original Message-
  From: Ayhan Peker [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 10:30 AM
  To: [EMAIL PROTECTED]
  Subject: crontab problems
 
  but the last two lines returns
  

RE: Applet Cannot Make HTTP POST Request to Tomcat w/IIS Redirector

2003-02-25 Thread Rick Bullotta
As a followup, here is some stuff from the iis_redirect.log file.

=
[Tue Feb 25 10:01:30 2003]  [jk_connect.c (158)]: Into jk_open_socket
[Tue Feb 25 10:01:30 2003]  [jk_connect.c (165)]: jk_open_socket, try to
connect socket = 1084
[Tue Feb 25 10:01:30 2003]  [jk_connect.c (174)]: jk_open_socket, after
connect ret = 0
[Tue Feb 25 10:01:30 2003]  [jk_connect.c (183)]: jk_open_socket, set
TCP_NODELAY to on
[Tue Feb 25 10:01:30 2003]  [jk_connect.c (200)]: jk_open_socket,
return, sd = 1084
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (614)]: In
jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 1084
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (642)]: sending to ajp13
#301
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (884)]: ajp_send_request 2:
request body to send 77 - request body to resend 0
[Tue Feb 25 10:01:30 2003]  [jk_isapi_plugin.c (514)]: Into
jk_ws_service_t::read
[Tue Feb 25 10:01:30 2003]  [jk_isapi_plugin.c (548)]:
jk_ws_service_t::read, ReadClient failed
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (806)]: ERROR: receiving
data from server failed, the client aborted the connection or network
errors.
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (1190)]: sending request to
tomcat failed in send loop. err=2
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (1198)]: Error connecting
to tomcat. Tomcat is probably not started or is listenning on the wrong
port. Failed errno = 22
[Tue Feb 25 10:01:30 2003]  [jk_isapi_plugin.c (998)]: HttpExtensionProc
error, service() failed
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (1388)]: Into
jk_endpoint_t::done, closing connection 0
[Tue Feb 25 10:01:30 2003]  [jk_ajp_common.c (561)]: In
jk_endpoint_t::ajp_close_endpoint
=

Rick Bullotta
CTO
Lighthammer Software (http://www.lighthammer.com)



-Original Message-
From: Rick Bullotta [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 10:12 AM
To: 'Tomcat Users List'
Subject: Applet Cannot Make HTTP POST Request to Tomcat w/IIS Redirector


Our applets/servlets run perfectly with Tomcat 4.1.18 and Apache 2.0.4X
(using jk as the go-between), but when used with the IIS redirector and
jk, the applets are unable to do any HTTP POST requests.  Applets can,
however, successfully issue GET requests.  There's nothing unusual about
the applet code, a snippet is shown below.  The code blocks on the
oStrm.close() method.  It works perfectly when using the Apache Http
server.  Also provided is the stderr.log output.  The stdout.log output
also contains some dump of what appears to be the HTTP content.
Unfortunately, we do have clients that will need the IIS/Tomcat combo.

This one is causing great hair loss, and any help welcomed. ;

Applet code snippet:

sURL = ...
sPostData = ...

URL url = new URL(sURL);

URLConnection urlconnection = url.openConnection();

urlconnection.setDoInput(true);
urlconnection.setDoOutput(true);
urlconnection.setUseCaches(false);
urlconnection.setRequestProperty(Content-Type,
application/x-www-form-urlencoded);

System.out.println(Getting Output Stream);

DataOutputStream oStrm = new
DataOutputStream(urlconnection.getOutputStream());

System.out.println(Got Output Stream);
oStrm.writeBytes(sPostData);
System.out.println(Wrote Stream);
oStrm.flush();
System.out.println(Flushed Output Stream);
oStrm.close();
System.out.println(Closed Output Stream);

DataInputStream iStrm = new DataInputStream(new
BufferedInputStream(urlconnection.getInputStream(), 8192));

int nSuccessCode = iStrm.readInt();

...
=

stderr.log output:

=
SEVERE: Error decoding request 
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at
org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:526)
at
org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:464)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:625)
at
org.apache.jk.common.JkInputStream.receive(JkInputStream.java:300)
at
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:46
1)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:343)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
590)
at

RE: How to verify SSL/HTTPS behind Tomcat via AJP13

2003-02-25 Thread Eduardo Jaunez S.
I don't know,

actually I'm printing:

System.getProperties().propertyNames() // Enumeration
req.getHeaderNames()   // Enumeration
req.getParameterNames()// Enumeration
request.getAttributeNames()// Enumeration

but some of them came empty (not null), and when something is set, isn't
related to SSL. So I guess I forgot to set something.




 -Mensaje original-
 De: Ian Hunter [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 25 de Febrero de 2003 12:02
 Para: Tomcat Users List
 Asunto: Re: How to verify SSL/HTTPS behind Tomcat via AJP13


 Thanks, I'll try to check that out.

 Does Apache add those variables to the request header?

 - Original Message -
 From: Eduardo Jaunez S. [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:53 AM
 Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13


  Dear Ian,
 
  I have the same problem, but I'm trying to pass the SSL_*
 vars generated
 by
  mod_ssl in Apache into the Tomcat side. I think this
 aproach could resolve
  your problem (there are a lot of vars generated only when a
 SSL session is
  open).
 
  Unfortunately I can't do it yet, so the JkEnvVar doesn't work for my
 tests,
  and I don't know what is wrong. I send to you some hints (I
 receive from
  Tomcat Developer's list):
 
  httpd.conf:
  ...
  SSLOptions +StdEnvVars +ExportCertData
  ...
  JkEnvVar SSL_CLIENT_CERT SSL_CLIENT_CERT
  ...
 
 
  MyTest.jsp
  ...
  HttpServletRequest req  ; //from the post ...
 
  // Gets the X.509 PEM Certificate
  String SSL_Client =  req.getAttribute(SSL_CLIENT_CERT) ;
  ...
 
 
  If you are lucky than me, please let me know !!.
 
  Eduardo.
 
 
   -Mensaje original-
   De: Ian Hunter [mailto:[EMAIL PROTECTED]
   Enviado el: Martes, 25 de Febrero de 2003 11:31
   Para: Tomcat Users List
   Asunto: Re: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   I've fallen back to seeing if
   getRequestURL().toString().startsWith(https) -- that seems
   pretty kludgy.
   Any other ideas?
  
   - Original Message -
   From: Turner, John [EMAIL PROTECTED]
   To: 'Tomcat Users List' [EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 8:41 AM
   Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13
  
  
   
The return from getProtocol() is correct, AFAIK.  I don't
   believe there is
   a
HTTPS/1.1 or similar, but I could be wrong.
   
By check protocol type in the docs (agreed, it is
   unclear), I believe it
means to do one (or all) of the following:
   
- check the URL for https
- check the port number for the request
- use HttpServletRequest.isSecure(), though I think
 that will return
   false
when you use Tomcat via a connector with ApacheI've
   never tried it to
   be
sure.
   
John
   
 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 9:26 PM
 To: Tomcat Users List
 Subject: How to verify SSL/HTTPS behind Tomcat via AJP13


 From

  
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any
 pages which absolutely require a secure connection should
 check the protocol
 type associated with the page request and take the
 appropriate action of
 https is not specified.

 Also, When running Tomcat primarily as a Servlet/JSP
   container behind
 another web server, such as Apache or Microsoft IIS, it is
 usually necessary
 to configure the primary web server to handle the SSL
   connections from
 users. Typically, this server will negotiate all SSL-related
 functionality,
 then pass on any requests destined for the Tomcat
   container only after
 decrypting those requests. Likewise, Tomcat will return
 cleartext responses,
 that will be encrypted before being returned to the user's
 browser. In this
 environment, Tomcat knows that communications between the
 primary web server
 and the client are taking place over a secure connection
   (because your
 application needs to be able to ask about this), but it does
 not participate
 in the encryption or decryption itself.

 However, when I check request.getProtocol() I get
 HTTP/.1.1 even when
 I'm connecting via SSL (url shows https: and browser
   shows lock and
 confirms 128 bit SSL) -- what gives?



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

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

RE: running servlet on Tomcat

2003-02-25 Thread Turner, John

More content is coming!! :) :)

John


 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 10:11 AM
 To: Tomcat Users List
 Subject: Re: running servlet on Tomcat
 
 
 I have an unofficial FAQ here:
 http://mywebpages.comcast.net/funkman/
 and
 http://tomcatfaq.sourceforge.net/
 
 I haven't been 'advertising' it much yet since content is 
 still kind of 
 lite and organization is not the greatest. Your particular 
 question is 
 not there yet - but it is addressed in TOMCAT's readme.
 
 The disabling of /servlet/ by default is due to a security hole.
 
 -Tim
 
 Steve Guo wrote:
  I do not fully understand why they disable the servlet 
 invoker by default. In general, Tomcat is used for learning 
 purpose. Having to modify web.xml for each webapp seems a lot of work.
  You refered to FAQ, but when I tried to get it from the 
 list server, I got,
  FAQ - Frequently asked questions of the 
 [EMAIL PROTECTED] 
  list. None available.
  
  Where is the FAQ?
  
  Thanks, Steve
  
  
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: Tomcat doesn't throw exception if client application clossesthe socket.

2003-02-25 Thread Niketan Mourya
I am making a connection to a application( my server running on some 
other machine with limited number of threads). In the absence of 
exception I not able to close the connection to my server application 
(here some other complexity involves). And all the threads of my server 
application exhausted.
The weblogic throws the connection when ever client application closes 
the connection. But it is not happening with tomcat.

- Niketan.

Ian Hunter wrote:

Hmm.  What are you trying to do where that matters?  Sounds like there might
be a better way...
- Original Message -
From: Niketan Mourya [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:53 AM
Subject: Tomcat doesn't throw exception if client application closses the
socket.
 

Hi All,
   I am facing a problem because tomcat doesn't throw exception if
client closes the socket  connection. Do any body have a
workaround/solution to know about the socket connection status with the
client application. I am using tomcat alone.
Many thanks,
-Niketan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



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

--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with [EMAIL PROTECTED] 
http://shopnow.netscape.com/



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


Re: JDBC ORACLE implementation !

2003-02-25 Thread Peter Lin

 
keep in mind it's a matter of scale. If the application will take several years to 
grow beyond the current requirements, then you're fine. If the requirements are going 
to grow rapidly, then you may still want to use Oracle for your mined data.
If you're dealing with only a couple thousand files and the growth rate is managable, 
then file system should last for a while. On the otherhand, if you know within the 
first two years the number of files will double each year, you may want to create an 
abstraction layer for yourself. This way you can store the summaries locally for now. 
then when the dataset size grows past a certain point, you can implement oracle and 
move the storage of the mined data in oracle. That should give you enough flexbility 
to grow without rewriting huge percentage of the app.
 
peter
 
 Swapneel Dange [EMAIL PROTECTED] wrote:yeah i know what ur saying PENG , but i am 
still at a very basic stage in 
the FILESYSTEM implementation , thats why before i move any further, i was 
making sure as to whether considering the ROBUST structure and all that 
stuff into account will it be better if i implement the SQLPLUS or stick to 
the FILESYSTEM!

comments awaited !



Swapneel Dange
505-642-4126
http://www.cs.nmsu.edu/~sdange






-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

please explain errors in catalina.out and mod_kj's log

2003-02-25 Thread Sven Khler
hi,

many people seem to have the follwing lines in their catalina.out:

25.02.2003 16:07:31 org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
25.02.2003 16:07:33 org.apache.jk.common.ChannelSocket processConnection
INFO: connection timeout reached
i now set mod_jk's log-level to error, and now i have those lines in 
mod_jk's log:
  see below

i checked my tomcat-configuration. the timeout is at it's maximum 
(60sec) although i haven't tried using -1 yet.
i wouldn't like a timeout of -1 (hopefully meaning INFINITY) because a 
dead connection would never be detected!

i guess, tomcat is killing the connections (because of timeout) and 
mod_jk has to establish a new connection.

mod_jk doesn't have something like a keep-alive option, so what am i 
supposed to do!?

a snippet from my mod_jk.log:

[Tue Feb 25 16:08:28 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:29 2003]  [jk_ajp_common.c (926)]: Error sending 
request body
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0



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


RE: Connection Pooling

2003-02-25 Thread pqin
This is a Tomcat JNDI implementation. I tried different solutions Tomcat,
Oracle connection caching and commons. Among them, Tomcat's is very simple.
commons-dbcp + pooling require more coding but have more flexibility of
course.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Malcolm Green [mailto:[EMAIL PROTECTED] 
Sent: February 25, 2003 5:36 AM
To: 'Tomcat Users List'
Subject: RE: Connection Pooling

I have DBCP connection pooling working as follows using Tomcat 4.1.12:

Under the Context element for your application (this can either be in the
server.xml file or a separate xml file in the webapps dir)  I have the
following config:

  Resource name=jdbc/ scope=Shareable
type=javax.sql.DataSource/

  ResourceParams name=jdbc/
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter

  parameter
namemaxActive/name
value100/value
/parameter

  parameter
namemaxIdle/name
value3/value
/parameter

  parameter
namemaxWait/name
value100/value
/parameter

  parameter
nameusername/name
valuetheUser/value
/parameter

  parameter
namepassword/name
valuethePassword/value
/parameter
  
 parameter
  namedriverClassName/name

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
 /parameter

parameter
  nameurl/name

valuejdbc:microsoft:sqlserver://hostname:port;databasename=myDB/value
/parameter

parameter
  namevalidationQuery/name
  valueselect getdate()/value
/parameter

  /ResourceParams

This is an MS SQL Server config, but to change the db just make sure that
the requried JDBC jar file is in the common/lib directory and then change
the necessary elements above e.g. driverClassName etc.

In my web.xml for my app I have the following:

  resource-ref
res-ref-namejdbc//res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

To use the pool I have the following code in a servlet:  (I have left out
the try/catch block etc.)

  Context ctx = new InitialContext();
  DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/);
  conn = ds.getConnection();
  

Hope this helps.

Malcolm

-Original Message-
From: Sebastiªo Carlos Santos [mailto:[EMAIL PROTECTED]
Sent: 21 February 2003 00:15
To: [EMAIL PROTECTED]
Subject: Connection Pooling


Somebody has some experience or example in the 
configuration and use of pool of connections with the 
commons-dbcp.  
I am a little lost and I don't know through where to 
begin.  
All information will be well arrival.  
I thank the help in advance

 
__
E-mail Premium BOL
Antivírus, anti-spam e até 100 MB de espaço. Assine já!
http://email.bol.com.br/



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

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


Re: Tomcat doesn't throw exception if client application closses the socket.

2003-02-25 Thread Ian Hunter
The default session timeout is 30 minutes; maybe you'd want to consider
lowering that.

Keep in mind that if a client browser is using HTTP/1.0, there are no open
connections ever; once they hit your site and get a page, the connection is
immediately broken -- that's how http is supposed to work.  Cookies and URL
rewriting are solutions that people came up with to get around this.

- Original Message -
From: Niketan Mourya [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:25 AM
Subject: Re: Tomcat doesn't throw exception if client application closses
the socket.


 I am making a connection to a application( my server running on some
 other machine with limited number of threads). In the absence of
 exception I not able to close the connection to my server application
 (here some other complexity involves). And all the threads of my server
 application exhausted.
 The weblogic throws the connection when ever client application closes
 the connection. But it is not happening with tomcat.

 - Niketan.


 Ian Hunter wrote:

 Hmm.  What are you trying to do where that matters?  Sounds like there
might
 be a better way...
 
 - Original Message -
 From: Niketan Mourya [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 9:53 AM
 Subject: Tomcat doesn't throw exception if client application closses the
 socket.
 
 
 
 
 Hi All,
 I am facing a problem because tomcat doesn't throw exception if
 client closes the socket  connection. Do any body have a
 workaround/solution to know about the socket connection status with the
 client application. I am using tomcat alone.
 
 Many thanks,
 -Niketan
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 Your favorite stores, helpful shopping tools and great gift ideas.
 Experience the convenience of buying online with [EMAIL PROTECTED]
 http://shopnow.netscape.com/



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



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



Re: LDAP Authentication

2003-02-25 Thread Marcelino Cruz
Now that I've set my JNDIRealm, I get this stack trace while starting
Tomcat...

---

Feb 25, 2003 10:13:32 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Feb 25, 2003 10:13:32 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Feb 25, 2003 10:13:34 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Feb 25, 2003 10:13:35 AM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NullPointerException
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:905)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:857)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252
)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
DocumentParser.java:221)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
va:595)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:747)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Catalina.start: java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1240)
Feb 25, 2003 10:13:32 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Feb 25, 2003 10:13:32 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Feb 25, 2003 10:13:34 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Feb 25, 2003 10:13:35 AM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NullPointerException
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:905)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:857)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252
)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
DocumentParser.java:221)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
va:595)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:747)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.j
ava:1477)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)

- Original Message -
From: Raible, Matt [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:57 AM
Subject: RE: LDAP Authentication


 Here's what I have in my context to make it work:

 Realm 

RE: can servlet interact with html file in someplace other than c urrent servlet context?

2003-02-25 Thread TO_Valery

two ways.
the first way in using HttpResponce.sendRedirect(url).

the second one is to move your http page into webapp and use
RequestDispatcher(uri).forward(rq,rs);


BeSt ReGaRdS level0 icq#155042687

-Original Message-
From: Xiongfei Wang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:20 PM
To: Tomcat Users List
Subject: RE: can servlet interact with html file in someplace other than c
urrent servlet context?

Thanks for your advice.
one more question is how to interact wiht static html?
i have /var/www/html 
i have /var/www/servlet
/var/www/servlet is current cotext of webapp

I have servlet login, in login.java i have code like
 
  private static final String TARGET_FILE=/var/www/html/index1.html;
  if(  )
 {
  (req.getRequestDispatcher(target)).forward(req,res);
 return;
 }
 
 this code does not work because index1.html is outside /var/www/html

how can i let servlets in /var/www/servlet interact with html files in 
/var/www/html?

Thanks
 

On Tue, 25 Feb 2003 [EMAIL PROTECTED] wrote:

 Morning!
 
 Your code wouldn't work. 
 
 Servlet should before to get context of the another webapp.
 
 .
 ServletContext webapp2context =
 this.getServletContext().getContext(uri_path_to_wevapp2);
 

webapp2context.getRequestDispather(some_target_in_webapp2).forward(request
 ,response);
 .
 
 Hope it help you.
 
 BeSt ReGaRdS level0 icq#155042687
 -Original Message-
 From: Xiongfei Wang [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 25, 2003 5:46 AM
 To: Tomcat Users List
 Subject: can servlet interact with html file in someplace other than
current
 servlet context?
 
 My current servlet context is in
 /home/jp/reg
 I have a login(login.java) servlet in this context
 In login.java i have code like 
 
  private static final String TARGET_FILE=/var/www/index.html;
  if(  )
 {
  (req.getRequestDispatcher(target)).forward(req,res);
 return;
 }
 
 t
 his code does not work because index.html is outside /home/jp/reg
 
 Is there a way i can let login servlet interact with index.html?
 
 Thanks
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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


RE: please explain errors in catalina.out and mod_kj's log

2003-02-25 Thread pqin
I see similar messages in my Catalina.out. Since my app works just fine, I
simple ignore them. I think it is either apache timeout setup or ssl setup.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Sven Köhler [mailto:[EMAIL PROTECTED] 
Sent: February 25, 2003 10:21 AM
To: [EMAIL PROTECTED]
Subject: please explain errors in catalina.out and mod_kj's log

hi,

many people seem to have the follwing lines in their catalina.out:

25.02.2003 16:07:31 org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
25.02.2003 16:07:33 org.apache.jk.common.ChannelSocket processConnection
INFO: connection timeout reached

i now set mod_jk's log-level to error, and now i have those lines in 
mod_jk's log:
   see below

i checked my tomcat-configuration. the timeout is at it's maximum 
(60sec) although i haven't tried using -1 yet.
i wouldn't like a timeout of -1 (hopefully meaning INFINITY) because a 
dead connection would never be detected!

i guess, tomcat is killing the connections (because of timeout) and 
mod_jk has to establish a new connection.

mod_jk doesn't have something like a keep-alive option, so what am i 
supposed to do!?


a snippet from my mod_jk.log:

[Tue Feb 25 16:08:28 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:29 2003]  [jk_ajp_common.c (926)]: Error sending 
request body
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:30 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (681)]: ERROR: can't 
receive the response message from
tomcat, network problems or tomcat is down.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1050)]: Error reading 
reply from tomcat. Tomcat is dow
n or network problems.
[Tue Feb 25 16:08:31 2003]  [jk_ajp_common.c (1187)]: ERROR: Receiving 
from tomcat failed, recoverab
le operation. err=0



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


RE: JPDA_ADDRESS default in catalina.sh is 8000,but jdbconn in catalina.bat

2003-02-25 Thread Wendy Smoak
catalina.bat defaults to:
  JPDA_TRANSPORT=dt_shmem
  JPDA_ADDRESS=jdbconn

I was not able to get JSwat to attach to Tomcat (4.1.20 on Win2000) using
these settings, mostly because when I try to attach with a transport type of
shared memory, it wants a shared name and I can't figure out what to type
in that box.

catalina.sh defaults to:
  JPDA_TRANSPORT=dt_socket
  JPDA_ADDRESS=8000  
  
These settings worked on Win2000, JSwat connects to localhost at port 8000
and debugging works fine.

Do most people debugging on Windows use the shared memory option?  If I want
to use it, and I start tomcat with 'catalina.bat jpda start', what is the
shared name to connect to?

Thanks,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

-Original Message-
From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 8:03 PM
To: Tomcat Users List
Subject: Re: JPDA_ADDRESS default in catalina.sh is 8000, but
jdbconn in catalina.bat

It depends on which JPDA connection method you use. Under windoses, you 
can use SharedMemoryAttach (transport dt_shmem) or dt_socket (like 
UNIX).. See the JPDA documentation for more info :-)

-- Jeanfrancois

Karr, David wrote:

It seems perfectly reasonable to me to default JPDA_ADDRESS to 8000, as
is set in catalina.sh.  However, I noticed that in catalina.bat, the
default is not 8000, and isn't even a number, being jdbconn, whatever
that means.  What is the reason for that difference?


tcp/ip stack issues

2003-02-25 Thread Shital Joshi

hi there,

we are using tomcat for our application. the application should work on all
the windows platforms. now, if the tcp/ip stack is not initialized on
windows 95 (if network card is not present or if the ithernet connection is
not available)
then tomcat fails to start. any solutions?
your help is highly appreciated.

-shital



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



RE: tcp/ip stack issues

2003-02-25 Thread Rick Bullotta
There is a Microsoft component called the Loopback Adapter, which is
basically a dummy network adapter that will allow you to load the TCP/IP
stack and assign an IP address to it.  Add a new network device and
select the MS Loopback Adapter as the HW...

Rick Bullotta
CTO
Lighthammer Software (http://www.lighthammer.com)




-Original Message-
From: Shital Joshi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 11:10 AM
To: 'Tomcat Users List'
Subject: tcp/ip stack issues



hi there,

we are using tomcat for our application. the application should work on
all the windows platforms. now, if the tcp/ip stack is not initialized
on windows 95 (if network card is not present or if the ithernet
connection is not available) then tomcat fails to start. any solutions?
your help is highly appreciated.

-shital



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



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



Re: tcp/ip stack issues

2003-02-25 Thread Ian Hunter
If you don't have a NIC or an Ethernet connection, what's the point?

In my experience, Win95 will still allow you to connect to 127.0.0.1, but in
Win2K you can't even reach yourself without a network connection.  My
solution was to create an Ethernet loopback plug that I stick in my NIC port
and a short time later I can at least access 127.0.0.1.


- Original Message -
From: Shital Joshi [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 11:10 AM
Subject: tcp/ip stack issues



 hi there,

 we are using tomcat for our application. the application should work on
all
 the windows platforms. now, if the tcp/ip stack is not initialized on
 windows 95 (if network card is not present or if the ithernet connection
is
 not available)
 then tomcat fails to start. any solutions?
 your help is highly appreciated.

 -shital



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



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



RE: tcp/ip stack issues

2003-02-25 Thread pqin
I was scared some one run tomcat on win95 box.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED] 
Sent: February 25, 2003 11:11 AM
To: Tomcat Users List
Subject: Re: tcp/ip stack issues

If you don't have a NIC or an Ethernet connection, what's the point?

In my experience, Win95 will still allow you to connect to 127.0.0.1, but in
Win2K you can't even reach yourself without a network connection.  My
solution was to create an Ethernet loopback plug that I stick in my NIC port
and a short time later I can at least access 127.0.0.1.


- Original Message -
From: Shital Joshi [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 11:10 AM
Subject: tcp/ip stack issues



 hi there,

 we are using tomcat for our application. the application should work on
all
 the windows platforms. now, if the tcp/ip stack is not initialized on
 windows 95 (if network card is not present or if the ithernet connection
is
 not available)
 then tomcat fails to start. any solutions?
 your help is highly appreciated.

 -shital



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



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


RE: tcp/ip stack issues

2003-02-25 Thread Shital Joshi

on windows 2000, windows NT and windows XP tcp/ip stack is always
initialized. so no problems even if the NIC or ethernet is not present. only
windows 95, 98 and ME are giving problems. the application only serves
requests which are coming from local host.

if we dynamically initialize the tcp/ip stack, and if the user wants to
connect to internet using AOL or Netzero etc, will the application still
work and will he be able to connect to net??

thanks for your help.


-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 11:11 AM
To: Tomcat Users List
Subject: Re: tcp/ip stack issues


If you don't have a NIC or an Ethernet connection, what's the point?

In my experience, Win95 will still allow you to connect to 127.0.0.1, but in
Win2K you can't even reach yourself without a network connection.  My
solution was to create an Ethernet loopback plug that I stick in my NIC port
and a short time later I can at least access 127.0.0.1.


- Original Message -
From: Shital Joshi [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 11:10 AM
Subject: tcp/ip stack issues



 hi there,

 we are using tomcat for our application. the application should work on
all
 the windows platforms. now, if the tcp/ip stack is not initialized on
 windows 95 (if network card is not present or if the ithernet connection
is
 not available)
 then tomcat fails to start. any solutions?
 your help is highly appreciated.

 -shital



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



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



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



RE: properties files

2003-02-25 Thread José Moreira
yep, that will work because due to my inexperience im having a lot trouble
working with files ...

ill go try web.xml

-Mensagem original-
De: Simone Chiaretta [mailto:[EMAIL PROTECTED]
Enviada: terça-feira, 25 de Fevereiro de 2003 14:36
Para: Tomcat Users List
Assunto: R: properties files


I store properties in my the app WEB-INF/web.xml

context-param
param-namesmtpServer/param-name
param-valuemy.smtpserver.net/param-value
descriptionSMTP server to be used to send email from forms in the
website/description
/context-param

and I access the value also in JSP pages with

String value =  getServletContext().getInitParameter(smtpServer);

and I assure u that it works even with JSP not only with servlet, but I
never tryed accessing it from inside a bean.

The only problem is that when you change the value you have to reload the
application..

hope that helps
Simo

 -Messaggio originale-
 Da: José Moreira [mailto:[EMAIL PROTECTED]
 Inviato: martedì 25 febbraio 2003 15.25
 A: Tomcat Users List; [EMAIL PROTECTED]
 Oggetto: RE: properties files


   thank you for the attention, im developing a bean to
 interact with the
 properties file.

   I believe that  ServletContext is only available to servlets,

 but perhaps the filename can be a parameter in the constructor :D

   the reason why im using a properties file is to make the
 configuration
 transparent and easy, to my clients...

 so i they change the mysql db parameters they can easily edit the
 properties
 file without much knowledge.

 also another advantage i saw in that was the ability to load and save
 directly to a file.

 if there is a better way im all ears :)


 -Mensagem original-
 De: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
 Enviada: terça-feira, 25 de Fevereiro de 2003 12:51
 Para: 'Tomcat Users List'
 Assunto: RE: properties files


 You need to put your property files in WEB-INF/classes or in a jar in
 WEB-INF/lib

 Then you can use the getResourceAsStream(..) method of the
 ServletContext of
 your webapp :


 properties.load(getServletContext().getResourceAsStream(filePath))

 Arnaud


  -Message d'origine-
  De : José Moreira [mailto:[EMAIL PROTECTED]
  Envoyé : mardi 25 février 2003 13:36
  À : Tomcat Users List
  Objet : properties files
 
 
  Hello, im using a propeties file to store and retrieve
  application settings
  (like db conection) using this code :
 
  private Properties properties;
 
  private String status;
 
  private boolean NovoConfig;
 
  /** Creates new ConfigReaderBean */
  public ConfigReaderBean() {
 
  Properties properties = new  Properties();
 
  NovoConfig = false;
 
  try {
 
  properties.load(new FileInputStream(config.properties));
 
  } catch (IOException e) {
 
 
  System.out.println(Erro ao ler config: +e.getMessage());
 
 
 
  properties.setProperty(database.url,http://localhost/mysql;);
 
  NovoConfig = true;
 
  }
 
  if (NovoConfig) {
 
  try {
 
  properties.store(new
  FileOutputStream(newconfig.properties),null);
 
  System.out.println(Criado: newconfig.properties);
 
  } catch (IOException e) {
 
  System.out.println(Erro ao criar novo config:
  +e.getMessage());
 
  }
 
 
  }
 
  the problem is that it doesnt load the file and saves the
  'newconfig.properties' file under the Netbeans IDE dir,
 
  how can i load the file located under my webapp WEB-INF dir ?
 
 
 
 
 
  ---*--
  José Moreira
 
  Técnico de Informática | IT Technician
 
  Vila Nova de Gaia, Portugal
 
  E-Mail: [EMAIL PROTECTED]
 
  MSN: [EMAIL PROTECTED]
 
  ICQ: 136936120
 
  IRC: ethernal (irc.ptnet.org)
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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




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




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




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



JKStatus

2003-02-25 Thread Garcia Crespo, Jose Manuel
Hi all,

I`m trying to collect stats from mod_jk2, setting the uri status in
workers2.properties i could get the stats at http://localhost/status but
there is no ifmormatiión about MaxTime AvgTime etc Some one knows how
can i get that stats?

thanks in advance,




José Manuel García Crespo
Comunicaciones Sistemas Distribuidos
Tlf: 91 213-49-69 (104969)
[EMAIL PROTECTED]


Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos
EXCLUSIVAMENTE a los destinatarios especificados. La información contenida
puede ser CONFIDENCIAL y/o estar LEGALMENTE PROTEGIDA y no necesariamente
refleja la opinión de ENDESA. Si usted recibe este mensaje por ERROR, por
favor comuníqueselo inmediatamente al remitente y  ELIMÍNELO ya que usted
NO ESTA AUTORIZADO al uso, revelación, distribución, impresión o copia de
toda o alguna parte de la información contenida. Gracias. 

This e-mail message and any attached files are intended SOLELY for the
addressee/s identified herein. It may contain CONFIDENTIAL and/or LEGALLY
PRIVILEGED  information and may not necessarily represent the opinion of
ENDESA. If you receive this message in ERROR, please immediately notify the
sender and DELETE it since you ARE NOT AUTHORIZED  to use, disclose,
distribute, print or copy all or part of the contained information. Thank
you.  

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



Re: JPDA_ADDRESS default in catalina.sh is 8000, but jdbconnin catalina.bat

2003-02-25 Thread Jeanfrancois Arcand
I suspect you need to add something like 
JPDA_Connector=SharedMemoryAttach. I'm using Netbean and that's very 
easy using the current catalina.bat setting. You maybe want to ask the 
question to JSwat peoples since they probably know how to to that on win2k.

-- Jeanfrancois.

Wendy Smoak wrote:

catalina.bat defaults to:
 JPDA_TRANSPORT=dt_shmem
 JPDA_ADDRESS=jdbconn
I was not able to get JSwat to attach to Tomcat (4.1.20 on Win2000) using
these settings, mostly because when I try to attach with a transport type of
shared memory, it wants a shared name and I can't figure out what to type
in that box.
catalina.sh defaults to:
 JPDA_TRANSPORT=dt_socket
 JPDA_ADDRESS=8000  
 
These settings worked on Win2000, JSwat connects to localhost at port 8000
and debugging works fine.

Do most people debugging on Windows use the shared memory option?  If I want
to use it, and I start tomcat with 'catalina.bat jpda start', what is the
shared name to connect to?
Thanks,

 



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


  1   2   3   >