Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何使用切换按钮使用Jersey和JSP调用两个不同的URL_Java_Html_Jsp_Jersey - Fatal编程技术网

Java 如何使用切换按钮使用Jersey和JSP调用两个不同的URL

Java 如何使用切换按钮使用Jersey和JSP调用两个不同的URL,java,html,jsp,jersey,Java,Html,Jsp,Jersey,我有一个jsp web应用程序,它使用Jersey将html按钮与java函数进行通信 当用户按下一个简单的按钮时,如何调用java函数?只需这样做: <form action="generator/doWork" method="GET" target="_blank"> <input type="submit" value="Do Work"> </form> 开关按钮的css: /* The switch - the box around t

我有一个jsp web应用程序,它使用Jersey将html按钮与java函数进行通信

当用户按下一个简单的按钮时,如何调用java函数?只需这样做:

<form action="generator/doWork" method="GET" target="_blank">
     <input type="submit" value="Do Work">
</form>
开关按钮的css:

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 28px;
}

/* Hide default HTML checkbox */
.switch input {display:none;}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #D40066;
}

input:focus + .slider {
  box-shadow: 0 0 1px #D40066;
}

input:checked + .slider:before {
  -webkit-transform: translateX(52px);
  -ms-transform: translateX(52px);
  transform: translateX(52px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 28px;
}

.slider.round:before {
  border-radius: 50%;
}
/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 28px;
}

/* Hide default HTML checkbox */
.switch input {display:none;}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #D40066;
}

input:focus + .slider {
  box-shadow: 0 0 1px #D40066;
}

input:checked + .slider:before {
  -webkit-transform: translateX(52px);
  -ms-transform: translateX(52px);
  transform: translateX(52px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 28px;
}

.slider.round:before {
  border-radius: 50%;
}