You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Tom Myers <to...@dreamscape.com> on 2001/07/19 17:24:36 UTC

classpath jsp?

Given that so many problems are classpath problems
and that the classpath seen by SOAP services is so
often not the classpath that people think they set
up, wouldn't it be a good idea to report the 
classpath, and maybe even other system info, in
some easily-viewed but easily-removable way? Suppose
you just drop a "cp.jsp" into the soap webapp, like so:

><html><head><title>Classpath and so forth</title></head>
><body>
><pre>
><%
>   final java.io.Writer w=out;
>   java.io.OutputStream os=new java.io.OutputStream(){
>      public void write(int b)throws java.io.IOException{w.write(b);}
>   };
>   System.getProperties().store(os,"SysProps");
>%>
></pre>
></body>
></html>

I admit that's clumsy, and also pretty drastic since it reports
absolutely everything...well, it reports the java.ext.dirs but
not the jars within. Perhaps an addition would be warranted, e.g.
>   <%
>   String ed=System.getProperty("java.ext.dirs");
>   java.io.File edDir=new java.io.File(ed);
>   if(!edDir.exists())throw new Exception( "no such directory as "+ed);
>   if(!edDir.isDirectory())throw new Exception( ed + " is not a directory.");
>   String[] LL = edDir.list();
>%>
><b>Extension directory jars; these files are visible to those in classpath,
>but those in classpath may not be visible to them</b><br>
><% for(int i=0;i<LL.length;i++)out.write(LL[i]+";<br>"); %>

Or maybe not, but something. Maybe the "I don't speak GET" message
should be supplemented with just the java.class.path value. 
Some people are getting hurt by the classpath values that they
think they know, that aren't quite so... the SOAP distribution
can't stop that from happening, but could make it less common.
Thoughts?

Tom Myers