Diff for /java/classes/org/w3c/rdf/examples/ARPServlet.java between versions 1.79 and 1.80

version 1.79, 2005/03/10 13:33:46 version 1.80, 2005/12/09 10:49:26
Line 248  public class ARPServlet extends HttpServ Line 248  public class ARPServlet extends HttpServ
     private static final String DEFAULT_FORMAT      = "PNG_EMBED";      private static final String DEFAULT_FORMAT      = "PNG_EMBED";
   
     // Fonts are not currently configurable      // Fonts are not currently configurable
     private static final String DEFAULT_TTF_FONT = "arialuni";   //was 'cyberbit'      private static final String DEFAULT_TTF_FONT = "cyberbit";
     private static final String DEFAULT_FONT = "Courier";   //could changed to 'arialuni' to get coverage for japanese/russian/...      // private static final String DEFAULT_TTF_FONT = "ariel";
       // private static final String DEFAULT_TTF_FONT = "arialuni";
       private static final String DEFAULT_FONT = "Courier";
       // private static final String DEFAULT_FONT = "arialuni';
   
     // Names of the servlet's parameters - for Jigsaw web server      // Names of the servlet's parameters - for Jigsaw web server
     private static final String SERVLET_TMP_DIR    = "SERVLET_TMP_DIR";      private static final String SERVLET_TMP_DIR    = "SERVLET_TMP_DIR";
Line 1229  public class ARPServlet extends HttpServ Line 1232  public class ARPServlet extends HttpServ
     public void doGet (HttpServletRequest req, HttpServletResponse res)      public void doGet (HttpServletRequest req, HttpServletResponse res)
         throws ServletException, IOException           throws ServletException, IOException 
     {      {
         // String encoding = req.getCharacterEncoding();          req.setCharacterEncoding("UTF-8");
         // if (encoding == null) {  
            req.setCharacterEncoding("UTF-8");  
         // }  
         String sRDF = req.getParameter(TEXT);          String sRDF = req.getParameter(TEXT);
         String sURI = req.getParameter(URI);          String sURI = req.getParameter(URI);
   
Line 1240  public class ARPServlet extends HttpServ Line 1240  public class ARPServlet extends HttpServ
         sURI = (sURI == null) ? "" : sURI;          sURI = (sURI == null) ? "" : sURI;
   
         //      try {          //      try {
         //    sRDF = java.net.URLDecoder.decode(sRDF);          //    sRDF = java.net.URLDecoder.decode(sRDF, "UTF-8");
         //    sURI = java.net.URLDecoder.decode(sURI);          //    sURI = java.net.URLDecoder.decode(sURI, "UTF-8");
         //      } catch (Exception e) {          //} catch (Exception e) {
         //    System.err.println("Exception: URLDecoder.decode()");          //    System.err.println("Exception: URLDecoder.decode()");
         //      }          //      }
   
Line 1263  public class ARPServlet extends HttpServ Line 1263  public class ARPServlet extends HttpServ
         // if (encoding == null) {          // if (encoding == null) {
            req.setCharacterEncoding("UTF-8");             req.setCharacterEncoding("UTF-8");
         // }          // }
           req.setCharacterEncoding("UTF-8");
         String sRDF = req.getParameter(TEXT);          String sRDF = req.getParameter(TEXT);
         String sURI = req.getParameter(URI);          String sURI = req.getParameter(URI);
   
Line 1899  public class ARPServlet extends HttpServ Line 1900  public class ARPServlet extends HttpServ
         else           sRDF = "";          else           sRDF = "";
   
         // getting encoding right: bad hack, but it works :-(          // getting encoding right: bad hack, but it works :-(
         //sRDF = new String(sRDF.getBytes("iso-8859-1"), "utf-8");          // sRDF = new String(sRDF.getBytes("iso-8859-1"), "utf-8");
         //sURI = new String(sURI.getBytes("iso-8859-1"), "utf-8");          // sURI = new String(sURI.getBytes("iso-8859-1"), "utf-8");
   
         if ((!parseRDF && sURI.equals("")) || (parseRDF && sRDF.equals(""))) {          if ((!parseRDF && sURI.equals("")) || (parseRDF && sRDF.equals(""))) {
             out.println("<h1>" + (parseRDF ? "RDF" : "URI")              out.println("<h1>" + (parseRDF ? "RDF" : "URI")

Removed from v.1.79  
changed lines
  Added in v.1.80


Webmaster