我使用命令sudo cp /opt/wildfly/bin/init.d/wildfly.conf/etc/default/wildfly来复制和编辑init.d文件.我收到此错误cp:无法统计'/opt/wildfly/bin/init.d/wildfly.conf':没有这样的文件或目录>当我检查我的bin时,我看不到init.d文件.我怎么解决这个问题.
我正在处理一个servlet类,但我收到以下错误.根据我的研究,我发现我需要做一些进口.问题是我无法添加导入.这是我的servlet类.
public class School extends HttpServlet {
public void doGet(HtttpServletRequest request, HttpServletResponse response) throw ServletException, IOException {
String name = request.getParameter('name');
PrintWriter writer = response.getWriter();
writer.ptintln("<html><body>" + new Date() +"<html></html>");
}
}
Run Code Online (Sandbox Code Playgroud) 我已经注意到,每当我想声明一个对象时,在我的程序中,例如list,save,add,remove我每次在每个函数中都写下以下内容.
ajax.open("Get", "./route/action",true);
ajax.send();
Run Code Online (Sandbox Code Playgroud)
我想做这样的事情.
//this.ajax.get('./route/action').update('ajax-content');
./route/action // this is path to my Action class-using servlet
Run Code Online (Sandbox Code Playgroud)
每次我必须打开一个连接时,给我的动作类路径servlet,然后发送.我每次要加载列表,删除或更新时都这样做.
我怎么能写一个我将成为的函数:
this.ajax.get('./route/action');
// 'ajax.content' is the id of the div where I
// want to show the list,where after updating AJAX show the update list to the user.
update('ajax-content');
Run Code Online (Sandbox Code Playgroud)
例如,在添加用户之后,我可以看到添加的用户而无需重新加载整个页面.我正在使用Java EE,Servlet和JavaScript开发maven项目.