<!-- action热部署 -->
<constant name="struts.devMode" value="true" />
<!-- action注解扫描 -->
<constant name="struts.convention.package.locators" value="action,test"/>
public void getListBase(){
List<LoginUser> u=basicBiz.getObjs("from LoginUser");
System.out.println(u);
}
@Test
public void call(){
String url="http://localhost:8082/yyp/durgTest!";
CallURL.call(url+"getListBase");
public void getListBase(){
List<LoginUser> u=basicBiz.getObjs("from LoginUser");
System.out.println(u);
}
@Test
public void call(){
String url="http://localhost:8082/yyp/durgTest!";
CallURL.call(url+"getListBase");
}
}
package com.test;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
class CallURL {
public static void call(String urlStr) {
try {
URL url = new URL(urlStr);
URLConnection URLconnection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) URLconnection;
int responseCode = httpConnection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
} else {
}
} catch (Exception e) {
e.printStackTrace();
}
}
}