I have a ear package with and ejb module and a war module. the ejb module has a rest service ( resteasy , because i deploy on jboss eap 7 ).
The problem is that the rest service and the war application share the same context-root
example:
http://localhost/context-root/index.html
http://localhost/context-root/rest-api/config/1
the problem is that my war app needs login to work, but that doesn't allow me to call the rest API unless i login on the web as a user.
I think the solution its about servlets, but i cannot figure it out how.
this its a extract from my web.xml
<servlet>
<servlet-name>future-web</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>future-web</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
any help will be appreciate.
thanks
UPDATE:
This is what i have:
localhost/context-root/index.html
localhost/context-root/rest-api/config/1
this is what i am looking for:
localhost/context-root/index.html
localhost/rest-api/config/1
localhost
will not work on any of our PCs. – Joe C