Re: RV: Runtime.exec()

2002-10-23 Thread Nigel . Byrnes

If i understand your mail correctly, you are attempting to call/run an
external program. If so, then you need to get a pointer to the JVMs RunTime
environment and execute your command[s] in a new process. Note that you'll
need to setup the environment of the process. On a win32 platform, you'll
be looking to do something like this:

public void foo (String [] myCmds)
{
  try
  {
  // construct the the list of commands to be run based upon
  // - a set of cmds required to setup the environment of the process
  // - the user cmds in myCmds
String [] cmds = runTheseCmds (myCmds); // see javadoc/google for
more info
Runtime r = Runtime.getRuntime ();
Process p = r.exec (cmds);

  // here you can access stdout/stderr if you like


p.waitFor();
p.destroy();
  }
  catch (...)
  {
// see javadoc for the exceptions you need to catch
  }
}

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922


   
 
  Ricardo Arias
 
  RicardoA@gentracTo:   
[EMAIL PROTECTED] 
  .com.gt cc: 
 
   Subject:  RV: Runtime.exec()
 
  22/10/02 17:43   
 
  Please respond to
 
  Tomcat Users
 
  List
 
   
 
   
 






-Mensaje original-
De: Ignacio J. Ortega [mailto:nacho;siapi.es]
Enviado el: Martes, 22 de Octubre de 2002 11:46 a.m.
Para: 'Ricardo Arias'
Asunto: RE: Runtime.exec()


This is a user question please use [EMAIL PROTECTED] to ask
this..

Saludos,
Ignacio J. Ortega
 -Original Message-
 From: Ricardo Arias [mailto:RicardoA;gentrac.com.gt]
 Sent: Tuesday, October 22, 2002 4:43 PM
 To: [EMAIL PROTECTED]
 Subject: Runtime.exec()


 Hi I read an article from the web site
 http://w6.metronet.com/~wjm/tomcat/2000/Oct/msg00082.html but
 in the URL
 where put the aplication.exe, I tried this
 http://localhost:8080/www/page.jsp?command=cmd.exe but have
 this message
 Error: java.io.IOException: CreateProcess: c:\winnt\cmd.exe error=2
 I hope your answer, Thanks a lot
 Ricardo Arias.



--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org





Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Solved: problem compiling JSPs in the Examples application on 4.1.12LE

2002-10-23 Thread Nigel . Byrnes

All

this strange problem was solved by downloading .zip distributionof 4.1.12LE
which worked out of the box. Previously I was using the 4.1.12LE .exe
timestamped 30/9/2002. A diff of the two installations revealed differences
in the some of the jasper jar files...

Nigel

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922


   
 
  Mark Eggers  
 
  its_toasted@yahoTo:   Tomcat Users List 
[EMAIL PROTECTED] 
  o.com   cc: 
 
   Subject:  Re: Resend: problem compiling 
JSPs in the Examples application on  
  22/10/02 19:114.1.12LE   
 
  Please respond to
 
  Tomcat Users
 
  List
 
   
 
   
 




Just a quick thought:

Check your path separator (ps) definition in
workers.properties.  Make sure it's defined as:

ps=\

Also, you might want to try the examples with

http://localhost:8080/examples/jsp/dates/date.jsp

to see if this gives you the same error.

/mde/

just my two cents . . . .

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org





Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




problem compiling JSPs in the Examples application on 4.1.12LE

2002-10-22 Thread Nigel . Byrnes
hi all

Today I attempted to upgrade from tomcat 4.1.10 to 4.1.12LE which also
involved moving from jdk1.3 to jdk1.4. Before porting across my application
code, I thought I'd give the examples application a whirl, to sanity check
the installation. While the servlets work ok, I have compiling the JSPs
down into servlets. More specifically, jasper barfs with the following
stack trace:


org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
Detected Java version: 1.4 in: c:\usr\local\lib\jdk1.4.1\jre
Detected OS: Windows NT
[javac] jsp\dates\date_jsp.java added as C:
\Apache_Group\Tomcat-4.1.12\work\Standalone\localhost\examples\jsp\dates\date_jsp.class

doesn't exist.
[javac] Compiling 1 source file

 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)

 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)

 at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
 at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)

 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)

 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 [...]

Setting the Jasper logging to default, I have found the following in
$CATALINA_HOME/logs/localhost_log.2002-10-22.txt:

2002-10-22 16:30:03 StandardHost[localhost]: Mapping request URI
'/examples/jsp/dates/date.jsp'
2002-10-22 16:30:03 StandardHost[localhost]:  Mapped to context '/examples'
2002-10-22 16:30:03 JspEngine -- /jsp/dates/date.jsp
2002-10-22 16:30:03  ServletPath: /jsp/dates/date.jsp
2002-10-22 16:30:03 PathInfo: null
2002-10-22 16:30:03 RealPath: c:
\apache_group\tomcat-4.1.12\webapps\examples\jsp\dates\date.jsp
2002-10-22 16:30:03   RequestURI: /examples/jsp/dates/date.jsp
2002-10-22 16:30:03  QueryString: null
2002-10-22 16:30:03   Request Params:
2002-10-22 16:30:05 HostConfig[localhost]: Deploying discovered web
applications
2002-10-22 16:30:06 Error compiling file: C:
\Apache_Group\Tomcat-4.1.12\work\Standalone\localhost\examples\jsp\dates\/date_jsp.java

Detected Java version: 1.4 in: c:\usr\local\lib\jdk1.4.1\jre
Detected OS: Windows NT
[javac] jsp\dates\date_jsp.java added as C:
\Apache_Group\Tomcat-4.1.12\work\Standalone\localhost\examples\jsp\dates\date_jsp.class

doesn't exist.
[javac] Compiling 1 source file

On the line where the error is reported above , the absolute path to the
java code is wrong, i.e. dates\/date_jsp.java should be
dates\date_jsp.java, shouldn't it???

I have been searching the archives all afternoon and am aware of bug 10036
which is to do with the JDK1.4 compiler now rejects import statements that
import from an unnamed namespace. I dont think this is related

As I see it, there must be many people who have got the JSPs in the
Examples application compiling before now, so expect that there is a small
config error somewhere on my part. (See my config details below)

If you can spot the bug, i'll buy you a beer next time you're in London!
TIA

Nigel

i am running the following:
- apache2.0.43
- mod_jk2   2.0.1
- tomcat  4.1.12 LE
- jdk   1.4.1_01


== workers2.properties
[uri:/examples/*]
worker=ajp13:localhost:8009
info=DirectLine context
context=/examples
debug=4

[uri:/examples/servlet/*]
worker=ajp13:localhost:8009
info=Example webapp in the default context.
context=/examples
debug=0

== jk2.properties
# no application-specific stuff

== $CATALINA_HOME/conf/web.xml
no changes from the default install,except changing the logging level


== $CATALINA_HOME/conf/server.xml
no changes from the default install version


== $CATALINA_HOME/webapps/WEB-INF/web.xml
no changes from the default install version


--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922

Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon

That's me signing off

2002-09-19 Thread Nigel . Byrnes

thanks for your help earlier this week guys,

Nigel

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922

Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



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




Re: Macromedia UltraDev doesn't' work with Tomcat4.0.4

2002-09-17 Thread Nigel . Byrnes


if you are looking for extensions to UD, you might want to ask the folks on
the Macromedia newsgroups/mailing lists. They are quite helpful.

Nigel

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922


   
 
  Heligon Sandra   
 
  sandra.heligon@nTo:   
'[EMAIL PROTECTED]' [EMAIL PROTECTED]
  extream.fr  cc: 
 
   Subject:  Macromedia UltraDev doesn't' 
work with Tomcat4.0.4 
  17/09/02 13:48   
 
  Please respond to
 
  Tomcat Users
 
  List
 
   
 
   
 





 I am trying to use Macromedia UltraDev with Tomcat4.0.4, but
only
the server
 model JSP 1.0 is available in the site definition's dialog
box.
 Where can I find an extension in order to work with
Tomcat4.0.4
(JSP1.1) ?

 Thanks a lot in advance

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





Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



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




Re: Java Development Environment for Emacs - anybody tried it ???

2002-09-17 Thread Nigel . Byrnes


Your mail is kinda off-topic for this list.

Nonetheless, I code in emacs with JDE. I do not stretch it to it's limits,
but i think it is fine. It has hooks for your debugger jdb/jpda and etags.
My only gripe is to do with the indentation style forced on the developer.
When I coded C, I used the whitesmith indentation style, e.g.

void foo (String bar)
{
  if (bar != null)
  {
// ...
  }
  else
  {
// ..
  }
}

which i prefer over the JDE/java indentation style

void foo (String bar)
{
  if (bar != null) {
// ...
  }
  else {
  // ...
  }
}


Nigel

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922


   
 
  Mark Hansen
 
  [EMAIL PROTECTED]To:   Tomcat Users List 
[EMAIL PROTECTED]   
  om  cc: 
 
   Subject:  Java Development Environment 
for Emacs - anybody tried it ???  
  17/09/02 16:06   
 
  Please respond to
 
  Tomcat Users
 
  List
 
   
 
   
 




Has anybody worked with this tool for debugging Tomcat applications? -
http://jdee.sunsite.dk/

If so, could you let me know what you think of it.

Thanks,

Mark


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





Direct Line Group Services Limited, registered in England no.3001989, registered 
office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the 
Direct Line group of companies: Direct Line Insurance plc, a member of the General 
Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct 
Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, 
Mortgages, Credit Cards and Savings provided by Direct Line Financial Services 
Limited, registered in England number 2372702, registered office 3 Edridge Road, 
Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



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