Jump to content

RikyTres

Members
  • Posts

    6
  • Joined

  • Last visited

About RikyTres

  • Birthday 05/02/1990

Previous Fields

  • Languages
    Italian, English

Profile Information

  • Location
    Italy

RikyTres's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks for the answer, but I tried a lot and I wasn't able to do this, then i change way...Now I use WebSocket and everything works fine!
  2. I'm trying to make a XMLHttpRequest from a JavaScript page to a Java Servlet.I found out lots of problem because it's first time that I do this. The main problem it's that the servlet doesn't work!It give me this error: HTTP Status 500 - Servlet execution threw an exception type: Exception report message: Servlet execution threw an exception description: The server encountered an internal error that prevented it from fulfilling this request. exception: javax.servlet.ServletException: Servlet execution threw an exceptionroot cause java.lang.NoClassDefFoundError: com/google/appengine/api/channel/ChannelServiceFactoryProvaServer.Server.doPost(Server.java:30)javax.servlet.http.HttpServlet.service(HttpServlet.java:647)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)root cause java.lang.ClassNotFoundException: com.google.appengine.api.channel.ChannelServiceFactoryorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)ProvaServer.Server.doPost(Server.java:30)javax.servlet.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 the Apache Tomcat/7.0.33 logs. This is the Java Servlet code: package ProvaServer; import java.lang.Object;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import com.google.appengine.api.channel.*;import com.google.appengine.api.channel.ChannelServiceFactory; @WebServlet(description = "prova", urlPatterns = { "/provaFinale" })public class Server extends HttpServlet { private static final long serialVersionUID = 1L; public Server() { super(); // TODO Auto-generated constructor stub } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String userId = request.getParameter("idUser"); ChannelService channelService = ChannelServiceFactory.getChannelService(); //the problem is here! String token = channelService.createChannel(userId); System.out.println("IdUser:" + userId); System.out.println("Token:" + token); String url="mona.html?user="+userId+"&token="+token; response.sendRedirect(url); } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {}} and this is the web.xml servlet mapping file: <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>Server</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>ServerServlet</servlet-name> <servlet-class>ProvaServer.Server</servlet-class> </servlet> <servlet-mapping> <servlet-name>ServerServlet</servlet-name> <url-pattern>/provaFinale</url-pattern> </servlet-mapping></web-app> The problem come out when servlet try to run this code: ChannelService channelService = ChannelServiceFactory.getChannelService() but i can't understand what is the error.Could someone help me to understand? Thanks for the attention!
  3. I keep trying to understand! I found out some problems with JavaScript syntax.Could someone explain me this code portion? {...var pc1 = new RTCPeerConnection(servers);var pc2 = new RTCPeerConnection(servers);...pc1.createOffer(gotDescription1); //why is gotDescription1 invoked without any parameter?...} function gotDescription1(desc){ pc1.setLocalDescription(desc); trace("Offer from pc1 \n" + desc.sdp); pc2.setRemoteDescription(desc); pc2.createAnswer(gotDescription2);} I don't understand what is the values of "desc" parameter in the gotDescription1(desc){}
  4. Thanks for the quickly answer!I never thought to use a breakpoint... I'm gonna try!
  5. Hi everyone. I need to create a webApp for video call between two computers using a browser without plug-in. I have to use WebRTC to make this. While searching information about this, I found out a lot of exemples and demos, but i don't understand how the connection works.What's kind of parameters I have to pass to RTCPeerConnection() to create a connection between two my computer both in same LAN? Thanks for the help.
  6. Hi everyone! I need help for transforming XML in to XHTML using XSLT. I can do everything i need in XSLT and it works on every Browser except in Google Chrome. I read that this is not a strange thing... Google do this intentionally for keep hight security level... Is this true?Are there something that I can do for resolve this problem?
×
×
  • Create New...