又係由於怕網上個source會唔見左,所以轉貼來自己個blog度
以下轉貼自:http://www.jforum.net/jira/browse/JF-638
「Once JForum has been deployed (succesfully) in Weblogic, from a war (built with the ant task "ant dist"), it doesn't start due a NullPointerException. This occurs with version 2.1.7, but I haven't tested any others.
I have traced this down to the init method in JForumBaseServlet, on the following line (101 in my version):
String appPath = config.getServletContext().getRealPath("");
Under weblogic, the method getRealPath() always returns null when the application is running from a WAR. See:
https://issues.apache.org/struts/browse/WW-186
I offer the following patch. I have tested it with good results in Weblogic 9 and Tomcat 5.5.
Add after the previously quoted line:
if (appPath == null) {
// resources are in a .war and application server returns null for getRealPath()
appPath = config.getServletContext().getResource("/").getPath();
}」
1 則留言:
Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Computador, I hope you enjoy. The address is http://computador-brasil.blogspot.com. A hug.
張貼留言