• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

request.getRealPath jsp new method

Junior Spellweaver
Joined
Nov 18, 2012
Messages
133
Reaction score
23
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
 
Back
Top