Gray, great info! Thanks!
So dadawa can you go ahead and test? If the test is fine, I'll add this to the example (out commented, with a comment) -Matthias On 5/10/06, Gary VanMatre <[EMAIL PROTECTED]> wrote:
I remember seeing this in Weblogic 8.1.4. The getRealPath() returns null. We decided to do something different but I think you might need to add a param to the weblogic deployment descriptor. I pulled this from the weblogic doc: The following parameter is used to affect the behavior of Web applications that are contained in this application. • webapp.getrealpath.accept_context_path —This is a compatibility switch that may be set to true or false. If set to true, the context path of Web applications is allowed in calls to the servlet API getRealPath. Example: <application-param> <param-name>webapp.getrealpath.accept_context_path</param-name> <param-value>true</param-value> </application-param> Gary -------------- Original message -------------- From: "Matthias Wessendorf" <[EMAIL PROTECTED]> > Well, > > the examples still work. That is "only" the SourceCodeServlet that > makes problems, since it calls "getRealPath()". It "only" shows up the > source code of the JSP. You can always look at the JSP pages included > in the WAR file yourself. > > BTW. we're using JIRA ([1]) > > HTH, > Matthias > > [1] http://issues.apache.org/jira/browse/TOMAHAWK > > On 5/9/06, raindrop dadawa wrote: > > 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 BufferedInp utStre am(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 > > > > > > > -- > Matthias Wessendorf > Aechterhoek 18 > 48282 Emsdetten > http://jroller.com/page/mwessendorf > mwessendorf-at-gmail-dot-com
-- Matthias Wessendorf Aechterhoek 18 48282 Emsdetten http://jroller.com/page/mwessendorf mwessendorf-at-gmail-dot-com