Re: !!!HELP!!! how to execute an external .exe-file (+Parameters) that creates data-files I want to use later in my servlet

2003-01-21 Thread ningr
<%
try {
Process process = Runtime.getRuntime().exec( "cmd /C more.com c:\\file_id.diz" 
);
DataInputStream in = new DataInputStream( 
new BufferedInputStream( process.getInputStream() ) );

String s;
while ( null != ( s = in.readLine() ) ) {
out.println( s + "" );
}

} catch ( IOException x ) {
 
 out.println( x );
 return ;
}
%>
The above code is ok under windows 2000, more.com is in winnt/system32, it will print 
the content the file c:\file_id.diz, you can put data.exe in system path,
I hope the code is useful to you.


- Original Message - 
From: "Patrick Kosiol" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 10:16 PM
Subject: Re: !!!HELP!!! how to execute an external .exe-file (+Parameters) that 
creates data-files I want to use later in my servlet


> Hi,
> 
> that might be a problem because my data.exe needs access to some 
> data-files placed in a special relative path from its. And this programm 
> also creates other files (they were also placed relative to its 
> position) and I must also be able to access these files through out the 
> Tomcat
> 
> 
> Patrick
> 
> ningr wrote:
> 
> >I met the same problems under linux, maybe you should put the data.exe in the 
>directory $CATALINA_HOME/bin, and
> >Process p = Runtime.getRuntime().exec( "./data.exe" );
> >you can try it.
> >
> >- Original Message - 
> >From: "Patrick Kosiol" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Sent: Tuesday, January 21, 2003 10:01 PM
> >Subject: !!!HELP!!! how to execute an external .exe-file (+Parameters) that creates 
>data-files I want to use later in my servlet
> >
> >
> >  
> >
> >>Hi,
> >>
> >>I'm runnung TomCat 4.0.4 and I want to start an external .exe-File.
> >>My Code:
> >>
> >>  String[] runString = {relativeDataPath + "data.exe",
> >>parameter0, parameter1, parameter2, parameter3};
> >>  Process p = Runtime.getRuntime().exec(runString);
> >>  System.out.println(runString);
> >>  if(p.waitFor() == 0){
> >>
> >>
> >>The 'data.exe'-File is placed in 
> >>$CATALINA_HOME/webapps/ROOT/relativeDataPath so it should be no problem 
> >>to access this File. The Number of  Parameters etc. is OK.
> >>But I get the following Error-Message:
> >>
> >>java.io.IOException: CreateProcess: 'relativeDataPath'/bfpldata.exe 
> >>parameter0 parameter1 parameter2 parameter3 error=2
> >>
> >>error=2 means imho that the File is not found. How can I execute my file 
> >>to do that, what I want. Is it possible that the process can create 
> >>files in the Tomcat folders?
> >>
> >>
> >>Thx
> >>Patrick
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >>
> >>
> >>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


Re: !!!HELP!!! how to execute an external .exe-file (+Parameters) that creates data-files I want to use later in my servlet

2003-01-21 Thread ningr
I met the same problems under linux, maybe you should put the data.exe in the 
directory $CATALINA_HOME/bin, and
Process p = Runtime.getRuntime().exec( "./data.exe" );
you can try it.

- Original Message - 
From: "Patrick Kosiol" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 10:01 PM
Subject: !!!HELP!!! how to execute an external .exe-file (+Parameters) that creates 
data-files I want to use later in my servlet


> Hi,
> 
> I'm runnung TomCat 4.0.4 and I want to start an external .exe-File.
> My Code:
> 
>   String[] runString = {relativeDataPath + "data.exe",
> parameter0, parameter1, parameter2, parameter3};
>   Process p = Runtime.getRuntime().exec(runString);
>   System.out.println(runString);
>   if(p.waitFor() == 0){
> 
> 
> The 'data.exe'-File is placed in 
> $CATALINA_HOME/webapps/ROOT/relativeDataPath so it should be no problem 
> to access this File. The Number of  Parameters etc. is OK.
> But I get the following Error-Message:
> 
> java.io.IOException: CreateProcess: 'relativeDataPath'/bfpldata.exe 
> parameter0 parameter1 parameter2 parameter3 error=2
> 
> error=2 means imho that the File is not found. How can I execute my file 
> to do that, what I want. Is it possible that the process can create 
> files in the Tomcat folders?
> 
> 
> Thx
> Patrick
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


Re: Tomcat-SSL: "no cipher suites in common" Exception

2003-01-05 Thread ningr
Dor Perl wrote:


Hi All, 

Our site is running on Tomcat 3.3/Windows2k stand alone and we want to create a secured page on the Tomcat server (can be a different machine). 
We bought an SSL certificate from "Comodo" (after sending them our CSR that was created using keytool) afterwards we imported the received certificate to the keystore. 
The server starts ok, but when a web browser access it on the SSL port, we get the following exception: 
%% Created: [Session-1, SSL_NULL_WITH_NULL_NULL]
Thread-56, SEND SSL v3.0 ALERT: fatal, description = handshake_failure
Thread-56, WRITE: SSL v3.0 Alert, length = 2
PoolTcpEndpoint: Handshake failed
javax.net.ssl.SSLException: no cipher suites in common
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(DashoA62
75)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
PoolTcpEndpoint: Handshake failed
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:61)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275) 
at org.apache.tomcat.util.net.JSSESocketFactory.handshake(JSSESocketFact
ory.java:270)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:479)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:484)
ThreadPool: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThrea
d@19e15c, terminating thread
javax.net.ssl.SSLException: Unsupported SSL v2.0 ClientHello
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:61)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275) 
at org.apache.tomcat.util.net.JSSESocketFactory.handshake(JSSESocketFact
ory.java:270)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:479)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:484)
java.lang.NullPointerException
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:498)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:484)
ThreadPool: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThrea
d@19e15c, terminating thread
java.lang.NullPointerException
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:498)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:484) 

I also did the following: 
* added "javax.net.debug=all" to the System properties to see the Debug information. 
* generated my own certificate using keytool (and it works ok. But the certificate is, of course, invalid) 
* Tried to access the server with different SSL protocols. 
* Searched every possible thing in the net ;-( 
I dedicated alot of time for this thing but no good. I would be grateful if somenoe could help us. Is it possible that the problem is in the certificate we got from the SSL provider? 

Thanks in advance for your help,

Dor Perl




-
With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs

When you use keytool to generate the keys and CSR, you should use the 
algoritm RSA  ,   not the default DSA. and then the exception will dispear.
keytool .. -keyalg RSA




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



tomcat ssl problems( no cihpher suites in common)

2002-12-24 Thread ningr
Hello all,
I use jakarta-tomcat-4.0.6, jdk 1.4.0 on windows xp home edition,
I want to use the tomcat with ssl,
I modified the server.xml according to the how-to on the jakarta site,
I start the tomcat and get no error, but when I use IE to connect the
https://localhost:8443/,
There are exception
fatal: Handshake failed
javax.net.ssl.SSLHandshakeException: no cipher suites in common
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.a(DashoA6275)
at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(DashoA62
75)
at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:58)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)

at
org.apache.tomcat.util.net.JSSESocketFactory.handshake(JSSESocketFact
ory.java:290)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:493)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)
2002/12/25 11:48:08 org.apache.tomcat.util.log.CommonLogHandler log
fatal: Caught exception executing
org.apache.tomcat.util.net.TcpWorkerThread@ce
bc9f, terminating thread
java.lang.NullPointerException
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:512)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)
2002/12/25 11:48:08 org.apache.tomcat.util.log.CommonLogHandler log
fatal: Handshake failed
javax.net.ssl.SSLException: Unsupported SSL v2.0 ClientHello
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:58)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)

at
org.apache.tomcat.util.net.JSSESocketFactory.handshake(JSSESocketFact
ory.java:290)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:493)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)
2002/12/25 11:48:08 org.apache.tomcat.util.log.CommonLogHandler log
fatal: Caught exception executing
org.apache.tomcat.util.net.TcpWorkerThread@ce
bc9f, terminating thread
java.lang.NullPointerException
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:512)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)


Please help me check this problem, thanks in advance.

ning


--
To unsubscribe, e-mail:   
For additional commands, e-mail: