如何在 Clojure 中扩展受保护的方法
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import clojure.lang.RT;
import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
public class Clojure4Vaadin extends AbstractApplicationServlet {
@Override
protected Class<? extends Application> getApplicationClass()throws ClassNotFoundException {
return Application.class;
}
.... Some code .....
}
如何在 Clojure 中写这个?
我正在尝试在 clojure 中编写 vaadin srvlet
类:
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import clojure.lang.RT;
import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
public class Clojure4Vaadin extends AbstractApplicationServlet {
@Override
protected Class<? extends Application> getApplicationClass()throws ClassNotFoundException {
return Application.class;
}
.... Some code .....
}
How to write this in Clojure?
I'm trying to write the vaadin srvlet
class in clojure:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找以下内容:
看看 代理文档。
I think what you're looking for is the following:
Have a look at the documentation of proxy.
您上面给出的代码用于通过 vaadin 框架为用 clojure 编写的 Web 应用程序提供服务。
该代码旨在作为 Java Servlet 运行,webapp 逻辑将位于 clojure 代码 (test.tlp) 中,您必须编译 servlet 并将其与 webapp 根目录中的 clojure 脚本一起打包。
问候,
山木
The code you have given above is used to serve a webapp written in clojure via the vaadin framework.
This code is meant to be run as Java Servlet as it is and the webapp logic would be in the clojure code (test.tlp), you would have to compile the servlet and package it with the clojure script in the webapp root directory.
Regards,
Shanmu