简体   繁体   中英

Websockets deployment to Weblogic 12.1.3

I am trying to deploy an EAR that uses websockets api into Weblogic. The EAR consists of an exploded web application and several EJB modules. For some reason I cannot connect to the websocket end point and I get a 404 error. I've downloaded an example web application from Java.net with web sockets, replaced their socket endpoint with mine and it works, so I exclude code issues. Is there any difference in structure or deployment of web sockets when it is done using EAR compared to WAR ?
ps: Struts is used as a web framework but should not interfere.

I used the old project using JAVAEE 5.Now using JAVAEE7 .I have the same problem with 404. Finally I solved this by changing web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

to

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
id="WebApp_ID" version="3.1">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM