request.getRealPath jsp new method

Results 1 to 1 of 1
  1. #1
    Valued Member bhashana is offline
    MemberRank
    Nov 2012 Join Date
    Behind YouLocation
    134Posts

    request.getRealPath jsp new method

    Code:
    		File f = new File(request.getRealPath("addons"));
    		String[] files = f.list();
    		java.util.Arrays.sort(files);
    		if (files.length > 0)
    		{
    			for (int i=0; i<files.length; i++)
    			{
      				f = new File(request.getRealPath("addons") + "/" + files[i]);
      				if (f.isDirectory())
    				{
    					out.println("<tr><td align=\"center\" style=\"border-top: 1px solid #cccccc;\"><a href=\"../../index.jsp?plugin=" + files[i] + "\" target=\"_parent\">" + files[i] + "</a></td></tr>");
         				}
      			}
    		}
    i think lates java version changed some functions
    Code:
    File f = new File(request.getRealPath("addons"));
    this isnt working, anyone can tell me what is the new method. i fixed everything for new version all others working but im stuck with addons. im not too much good at jsp but im very good at php so i will be able to understand easy if you explain me.

    Edit :
    my java version
    javac 1.7.0_79

    Thank you
    RaZoR




Advertisement