as trying to manage Spring with javaRPC I came to a simple workaround:
public String passInteger(int i, HttpServletRequest request) {
try {
ServletContext servletContext = ((HttpServletRequest)request).getSession().getServletContext();
ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
TestService serviceClass = (TestService) context.getBean(”testService”);
System.out.println(”serviceClass: “+serviceClass);
return “got integer parameter: ” + serviceClass.doTest();
} catch (Exception err) {
err.printStackTrace();
}
return “-1″;
}
while testService is a defined Bean in your application-Context.xml
of couse it would be better […]