Examples of PrimitiveWrapFactory


Examples of org.latte.scripting.PrimitiveWrapFactory

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     
    try {
      Context cx = ContextFactory.getGlobal().enterContext();
      cx.setWrapFactory(new PrimitiveWrapFactory());
   
      Scriptable requestProxy = cx.newObject(parent);
      ScriptableObject.putProperty(requestProxy, "address", request.getRemoteAddr());
      ScriptableObject.putProperty(requestProxy, "remoteaddr", request.getRemoteAddr());
      ScriptableObject.putProperty(requestProxy, "url", request.getServletPath());
View Full Code Here

Examples of org.latte.scripting.PrimitiveWrapFactory

    private ThreadHelper(final Callable fn, final Scriptable scope) {
      super(new Runnable() {
        public void run() {
                    try {
                        Context cx = ContextFactory.getGlobal().enterContext();
      cx.setWrapFactory(new PrimitiveWrapFactory());
                        fn.call(cx, scope, scope, null);
                    } finally {
                        Context.exit();
                    }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.