How to communicate webapp and web service running on tomcat
I hav开发者_StackOverflow中文版e a web application and web service(apache cxf) sharing same database and running on their own servlets.And i have foo class with a field 'startdate' .I am tracing closest start date and schedule quart's simple trigger to start at this date.But data also come from web service and i am cannot trace closest date .I can duplicate logic to web service and trace closest date separately but this lead resource leak .İs there a way inform webapp from web service .
Http-get with parameter to web app.
String queryString = "param1=" +
URLEncoder.encode(param1Value, "UTF-8");
queryString += "¶m2=" +
URLEncoder.encode(param2Value, "UTF-8");
// Make connection
URL url = new URL("http://www.localhost.8080/");
URLConnection urlConnection = url.openConnection();
urlConnection.setDoOutput(true);
精彩评论