Sunday 15 April 2012

java - Push notification on window phone -


I am creating a system of multi-platform push notifications on the mobile operating system. My server has encountered a problem while building on the Windows Phone Platform, written in the JSP servlet. I tried to test on pushing on this operating system with ASP server, they work well. But because my server is JSP, I want to transfer JSP from ASP to stability. I have used the library mpns here to do this. But in the process of running, my server fails, and the message can not be sent to the customer. Can you help me?

When I call it MpnsService service = MPNS.newService (). Build (); , shut down the server and do not run again and the web browser error message HTTP status 500 - Servlet execution has an exception

code server

  public class SendAllMessagesServlet Extended BaseServlet {@Override protected void doPost (HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {string_ur = req.getParameter ("Yuri "); String Title = RIK Jap parameter ("title"); String content = req.getParameter ("content"); String page = req.getParameter ("page"); MpnsService Service = MPNS.newService () .build (); Tile notification tile = MPNS.newNotification (). Tile () .count (1). Title (title) .backbackgroundImage ("http://sample.com/image.png"). Back-tattle (content) .build (); String SubscribersURI = Yuri; Service.push (membership yuri, tile); // Push Notification WP Push = New Push Notification (); //push.PushNotif (title, content, homepage); GetServletContext (). GetRequestDispatcher ("/ home"). Forward (request, resp); Error in web browser  
  HTTP status 500 - Servlet execution threw an exception type Exception Report Message Servlet Execution Throwed an Exception Description The server encountered internal error which caused this request Prevented from completing Exceptions javax.servlet.ServletException: Servlet execution an exception root thrown error java.lang.NoClassDefFound: Organization / Apache / Commons / Logging / LogFactory org.apache.http.impl.client.AbstractHttpClient & Lt; Init & gt; (AbstractHttpClient.java: 187) org.apache.http.impl.client.DefaultHttpClient. & Lt; Init & gt; (Default HTML). .http.HttpServlet.service (HttpServlet.java:647) javax.servlet.http.HttpServlet.service (HttpServlet.java:728) Note The full stack trace of the root cause is available in Apache Tomcat / 7.0.37 logs.    

You must include a commons-login jar in your application. You can find it here

After you download the file, open it and copy the file named Commons-Logging -1.3.3.jar (assuming you have downloaded the previous web page) . / P>

Good luck

No comments:

Post a Comment