2014年5月26日星期一

Get the current JSP file path error

a jsp Web project , on the D: \ wwwroot \ app1 \ down the path (app1 is mostly written in PHP with Apache parse jsp subproject app2 is written using Tomcat parsing ) project named app2, the path is D: \ wwwroot \ app1 \ app2. Under the project has a subfolder manage, which has a login.jsp file , ie the actual path of the file is D: \ wwwroot \ app1 \ app2 \ manage \ login.jsp. But I use the path application.getRealPath (request.getRequestURI ()) to obtain a value of D: \ wwwroot \ app1 \ app2 \ manage \ manage \ login.jsp, that is more of a middle manage. Is that why? How to solve it ?
------ Solution ---------------------------------------- ----
to look up application.getRealPath (request.getRequestURI ()) implementation mechanism

没有评论:

发表评论