Menu

Whether there will be a continuation?

sharapov
2007-09-04
2013-03-22
  • sharapov

    sharapov - 2007-09-04

    Last release was almost one year ago.
    The project is simple also it perfectly well.
    Thanks developers for good work.
    It is a pity if developers stop.
    Well to hear from them.
    Whether they plan to move forward?

    P.S. I put an example servlet

    package net.ajaxforms.web;

    import org.xml.sax.SAXException;

    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletOutputStream;
    import javax.xml.transform.TransformerException;
    import java.io.*;
    import java.net.URL;
    import java.net.MalformedURLException;

    import net.ajaxforms.compiler.XDocException;

    /**
    * A.V.Sharapov 02.09.2007
    * Date: 02.09.2007
    * Time: 10:16:05
    * This servlet is released by A.V.Sharapov under the LGPL license.
    * Servlet output compile AjaxForms form and output it's content
    */
    public class FormServlet  extends HttpServlet {

        public String realPath;

        public void init (ServletConfig config) throws ServletException {
            super.init(config);
            realPath = getServletContext().getRealPath("/");
        }

        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException {
            String path;
            String filename;
            String url = null;
            path = request.getContextPath();
            filename = request.getServletPath();
            try {
                url = new URL(request.getRequestURL().toString()).getProtocol()+"://"+
                        new URL(request.getRequestURL().toString()).getHost()+":"+
                        new URL(request.getRequestURL().toString()).getPort();
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
            ServletOutputStream os = null;
            InputStream is;
            try {
                is = new FileInputStream(realPath+filename);
                try {

                    os = response.getOutputStream();
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                net.ajaxforms.compiler.Compiler compiler = new net.ajaxforms.compiler.Compiler();
                compiler.setResourcesdir(url+path+"/resources/");
                //System.out.println(url+path+"/resources/");
                try {
                    compiler.compile(is, os);
                } catch (SAXException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (TransformerException e) {
                    e.printStackTrace();
                } catch (XDocException e) {
                    e.printStackTrace();
                }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

        }
    }

     
    • Alain Couthures

      Alain Couthures - 2008-11-01

      Hello,

      I have spent some days reengineering this project to build a unique XSLT transformation so no Java part is required and all the conversion can be done on client-side or on any server with an XSLT engine.

      You can have a look at XSLTForms project on sourceforge.

      Here is a test page : http://www.agencexml.com/xsltforms/xf.xml

      Alain COUTHURES
      <agenceXML>
      http://www.agencexml.com

       
      • Sharapov

        Sharapov - 2008-11-18

        It is interesting idea. I have looked examples. It looks well.

         

Log in to post a comment.