/*
* JFolder, Copyright 2001-2006 Gary Steinmetz
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jfolder.console.admin;
//base classes
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//project specific classes
//other classes
/*public class AdminPropertiesServlet extends HttpServlet {
public AdminPropertiesServlet() {
}
public void service(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
if (!LoginHelper.isUserLoggedIn(request, response)) {
return;
}
if (request.getParameter("SAVE") != null) {
String propText = request.getParameter("TEXT");
FileWriter fw = new FileWriter("./powerfolder.properties");
fw.write(propText);
fw.flush();
fw.close();
}
PrintWriter pw = response.getWriter();
FileReader fr = new FileReader("./powerfolder.properties");
pw.println("<html>");
pw.println("<head>");
pw.println("<title>PowerFolder System Properties</title>");
pw.println("</head>");
pw.println("<body>");
pw.println("<form name=\"PROPERTIES\" method=\"post\""
+ " action=\"/powerfolder/admin/properties\">");
pw.println("<table width=\"100%\">");
pw.println("<tr>");
pw.println("<td style=\"font-size: 24; font-family: Arial;"
+ " color: #000000;\" width=\"70%\">");
pw.println("PowerFolder System Properties");
pw.println("</td>");
pw.println("<td width=\"30%\">");
pw.println("<input style=\"width: 45%\" type=\"SUBMIT\" name=\"SAVE\""
+ " value=\"Save\"/>");
pw.println("<input style=\"width: 45%\""
+ " onclick=\"document.PROPERTIES.action='/powerfolder/login'\""
+ " type=\"submit\" name=\"CANCEL\" value=\"Cancel\"/>");
pw.println("</td>");
pw.println("</tr>");
pw.println("<tr>");
pw.println("<td colspan=\"2\">");
pw.println("<hr/>");
pw.println("</td>");
pw.println("</tr>");
pw.println("<tr>");
pw.println("<td colspan=\"2\">");
pw.println("<textarea nowrap name=\"TEXT\" nowrap cols=\"100\""
+ " rows=\"25\">");
int nextChar = 0;
while ((nextChar = fr.read()) != -1) {
pw.print(((char)nextChar));
}
pw.println("</textarea>");
pw.println("</td>");
pw.println("</tr>");
pw.println("</table>");
pw.println("</form>");
pw.println("</body>");
pw.println("</html>");
}
}*/
|