Hi,
I am sorry to report my problem here.

I downloaded Myfaces exsamples from http://www.apache.org/dyn/closer.cgi/myfaces/binaries/myfaces-1.1.1-examples.zip.


And I deployed simple.war and sandbox.war on WebLogic Server 9.x. The samples works quite well. But if I try to access [SOURCE] hyperlink, I always got a 500 error caused by NullPointerException:

Error 500--Internal Server Error java.lang.NullPointerException
 at java.io.FileInputStream.(FileInputStream.java:103)
 at java.io.FileInputStream.(FileInputStream.java:66)
at org.apache.myfaces.util.servlet.SourceCodeServlet.doGetSourceCodeServlet.java:49)


And then I downloaded "org.apache.myfaces.util.servlet.SourceCodeServlet.java" and found this snippet:

String realPath = getServletConfig().getServletContext().getRealPath(webPage);
...
in = new BufferedInputStream(new FileInputStream(realPath));

Well, as to getRealPath(String) method, Servlet Specification V2.4 said at SRV 14.2.8.1:

"This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available
from a .war archive)."

So, my question is how can I get these samples work on WebLogic Server? Sorry again for reporting my problem here bause I cannot find Myfaces product on
bug entering page of Apache bugzilla.

Thanks a lot.

Best Regard.
dadawa

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn

Reply via email to