/impl/conf/directories/utilsIntranet.xml |
---|
7,7 → 7,7 |
<leaf absolute="false" label="Legislação" layout="true" proxy="estgp" id="legislacao" url="/intranet/escola/secretaria/legislacao.html"/> |
<leaf label="Folhas de Presenças" id="Folhas.Presencas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Folhas.Presencas"/> |
<leaf label="Projectos-AA,CA,GE,MKT" id="Projectos.Finais" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Projectos.Finais"/> |
<leaf label="Actas" id="Actas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Actas/Arquivo"/> |
<leaf label="Actas" id="Actas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Actas"/> |
</leaf> |
<leaf absolute="false" label="Horários" layout="true" proxy="estgp" id="horarios" url="/intranet/escola/horarios.html"> |
<leaf absolute="false" label="Horários de CET" layout="true" proxy="estgp" id="horariosCet" url="/intranet/escola/horarios_cets.html"/> |
/impl/src/java/pt/estgp/estgweb/web/DirWebProxy.java |
---|
271,7 → 271,10 |
pathFragments = pathAux.split("/"); |
client.changeWorkingDirectory(startPath); |
if(!client.changeWorkingDirectory(startPath)) |
{ |
throw new NotAuthorizedException(); |
} |
FTPFile[] files = client.listFiles(); |
List<IFile> iFiles = FtpFile.init(files, server, path); |
Element goDeepElement = null; |
315,7 → 318,11 |
Element nextGoDeepElement = null; |
String d = pathFragments[i]; |
startPathAux = startPathAux + "/" + d; |
client.changeWorkingDirectory(startPathAux); |
if(!client.changeWorkingDirectory(startPathAux)) |
{ |
throw new NotAuthorizedException(); |
} |
files = client.listFiles(); |
iFiles = FtpFile.init(files, server, path); |
/impl/src/java/pt/estgp/estgweb/web/FTPProxy.java |
---|
1,31 → 1,26 |
package pt.estgp.estgweb.web; |
import org.apache.log4j.Logger; |
import jomm.web.ftp.IFile; |
import jomm.web.ftp.impl.FtpFile; |
import jomm.web.utils.NavPlace; |
import org.apache.commons.httpclient.util.URIUtil; |
import org.apache.commons.net.ftp.FTPClient; |
import org.apache.commons.net.ftp.FTPFile; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.web.exceptions.NotAuthorizedException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServlet; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import javax.servlet.ServletException; |
import java.io.IOException; |
import java.io.InputStream; |
import java.io.OutputStream; |
import java.io.FileNotFoundException; |
import java.net.URL; |
import java.net.URLConnection; |
import java.io.IOException; |
import java.net.MalformedURLException; |
import java.net.SocketException; |
import java.net.URL; |
import java.util.ArrayList; |
import java.util.HashMap; |
import java.util.List; |
import java.util.ArrayList; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import jomm.web.ftp.IFile; |
import jomm.web.ftp.impl.FtpFile; |
import jomm.web.utils.NavPlace; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
95,7 → 90,10 |
{ |
FtpServer ftpServer = getServer(server,user,pass); |
FTPClient client = ftpServer.getClient(); |
client.changeWorkingDirectory(URIUtil.encodePath(path,"ISO-8859-1")); |
if(!client.changeWorkingDirectory(URIUtil.encodePath(path,"ISO-8859-1"))) |
{ |
throw new NotAuthorizedException(); |
} |
FTPFile[] files = client.listFiles(); |
List<IFile> iFiles = new ArrayList<IFile>(); |
for(FTPFile ftpFile : files) |
105,7 → 103,7 |
iFile = new FtpFile(ftpFile,server + path + ftpFile.getName(),path); |
else |
iFile = new FtpFile(ftpFile,server + path + "/" + ftpFile.getName(),path); |
iFiles.add(iFile); |
} |
List<NavPlace> navPlaces = FtpFile.getNavPlaces(path,""); |