Jasper reports Server与GWT集成
我已经安装了Jasper Reports Server,我想开发一个GWT应用程序来调用Jasper Server web服务:登录、在服务器中运行报告、列出报告、查看用户。。。。我已经通过Jasper Soft web services guide在java中实现了web服务,例如AuthentitAction:Jasper reports Server与GWT集成,gwt,Gwt,我已经安装了Jasper Reports Server,我想开发一个GWT应用程序来调用Jasper Server web服务:登录、在服务器中运行报告、列出报告、查看用户。。。。我已经通过Jasper Soft web services guide在java中实现了web服务,例如AuthentitAction: public static void connect(String URL,HttpClient httpclient) { serverURL = URL; //r
public static void connect(String URL,HttpClient httpclient)
{
serverURL = URL;
//report path
HttpClient client = httpclient;
// Setting Login URL in a POST method
String loginURL = serverURL+"rest/login";
PostMethod postMethod = new PostMethod(loginURL);
// Set authentication parameters
postMethod.addParameter("j_username", "jasperadmin");
postMethod.addParameter("j_password", "jasperadmin");
int statusCodeL;
try {
statusCodeL=client.executeMethod(postMethod);
if (statusCodeL != HttpStatus.SC_OK) {
System.out.println("Login failed: " + postMethod.getStatusLine());
return;
}
}catch (HttpException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
但是,当使用与HTTPClient不兼容的GWT框架开发时,我无法探索这些web服务,即使使用请求生成器验证失败
我的问题是如何将JASPER REPORTS SERVER集成到GWT应用程序中?我还必须在我的公司实现JASPER Report集成。是的,我也有困难。我们最终只使用生成报告,其余的都是我们自己做的(列出报告、存储生成的报告等等)。可以使用GWT。在HttpServlet中,调用JasperAPI。然后HttpServlet可以将Jasper调用的结果返回给GWT。我发表了一条评论,链接到答案所在的位置。请在此帖子上查看我的答案: