![]() ![]() 先用 serveletContext.getRealPath得到根路径,tomcat中比如是 As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath() instead. Warning: getRealPath() in has been deprecatedĭeprecated. String filename=request.getRealPath(filename) The default value of this property is false. The value of set in the web app has precedence over the value set at the domain level. Second option is at webapp level by updating weblogic.xml as below: ![]() This should make an entry into domain config.xml as below.Ģ. Click the checkbox of Archived Real Path Enabled. Go to server admin console->Domain-> Web applications. There are two ways we can fix this issue when you still want to deploy as WAR but would like to get over with this issue:ġ. ServletContext.getRealPath() returns null when deployed as WAR but it works ok when deployed as exploded. Another weird behavior from weblogic when webapp is deployed as WAR.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |