| Author |
javax.servlet.ServletRequest.getRealPath is Deprecated.
|
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
after reading online about the working of Tomcat , i am developing a servlet container for servlet 2.3 specification.
i have created a Request class implementing the javax.servlet.ServletRequest interface. this interface has method public java.lang.String getRealPath(java.lang.String path) which is Deprecated.
when i implements getRealPath(String ) i get warning that : java uses or overrides Deprecated api
what should i do to remove that warning ?
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18370
|
|
|
Read the suggestion from the method Javadoc comments.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Ankit Nagpal
Ranch Hand
Joined: Sep 09, 2008
Posts: 47
|
|
naveen yadav wrote:
after reading online about the working of Tomcat , i am developing a servlet container for servlet 2.3 specification.
i have created a Request class implementing the javax.servlet.ServletRequest interface. this interface has method public java.lang.String getRealPath(java.lang.String path) which is Deprecated.
when i implements getRealPath(String ) i get warning that : java uses or overrides Deprecated api
what should i do to remove that warning ?
use application.getRealPath(String) where application is a reference to Servlet Context and the parameter is the relative path of the file.
|
 |
 |
|
|
subject: javax.servlet.ServletRequest.getRealPath is Deprecated.
|
|
|