| Author |
how to get strut applications root directory
|
Swathi Prakash
Ranch Hand
Joined: Jan 18, 2005
Posts: 49
|
|
hai , plz help me . i m new to struts.i want to get my application directory in my action java file. i specified the root in context path. i want to get that one. i used this thing to get the root of my application. getServletContext().getServletConfig().getRealpath(""); i got error.my application directory which i mentioned is c:\project i want to get that root. please help mee........ Swathi
|
 |
Ray Stojonic
Ranch Hand
Joined: Aug 08, 2003
Posts: 326
|
|
|
add a / to the string argument to getRealpath, ie: getRealPath("/")
|
 |
Swathi Prakash
Ranch Hand
Joined: Jan 18, 2005
Posts: 49
|
|
Thank u Ray . i Got the Answer.. Swathi
|
 |
 |
|
|
subject: how to get strut applications root directory
|
|
|