Java Reference
In-Depth Information
<td>First Name</td>
<input type="text" jsf:id="firstName"
<td>Last Name</td>
<input type="text" jsf:id="lastName"
<input type="submit" value="Submit"
We based the JavaScript code in this example on the Echo sample application
included with NetBeans and discussed this earlier in this chapter. The first change
we made was to change the value of the wsUri variable to match the URI of our
WebSocket server endpoint. The URI of the WebSocket endpoints we develop
will always consist of the context root of our application followed by the value
of the value attribute of the @ServerEndpoint annotation (in our example,
/defaultdataendpoint ).
The context root of a Java EE application is the part of the URL that we
type right after the port; by default, the context root matches the name of
our WAR file.
For example, our application's URL is http://localhost:8080/
WebSocketJavaEE . Therefore, the context root of our application is
WebSocketJavaEE .
Search WWH ::

Custom Search