0

The application is running on wildfly-10.0.0.Final.

The web.xml is specified as

<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 session-config is:

<session-config>
    <tracking-mode>COOKIE</tracking-mode>
</session-config>

However in the xhtml file the links generated by h:outputLink tags are appended by the jsessionid when I load the first page.

<h:outputLink value="/index">
    <h:outputText value="index"/>
</h:outputLink>

Generated link: http://localhost:8080/index;jsessionid=[...]

The Java EE 7 project is using:

  • primefaces 5.3
  • omnifaces 2.3
  • prettyfaces 2.0.12.Final
  • jsf-api 2.2.6
  • el-impl 2.2
  • jstl 1.2
  • jsp-api 2.1

If I delete the appended jsessionid and load the new page then in the cookie a new jsessionid is generated but when clicking on other links it is preserved and never changes nor it's appended in the URL.

What could cause this behavior and how could I prevent it happening? I'd like to have no jsessionid in the URL thus have only one in the cookie.

bdz
  • 270
  • 2
  • 9
  • 1
    The JAR listing is ambiguous as WildFly 10 as being a full fledged Java EE 7 server **already** ships with JSF, EL, JSTL and JSP out the box, and even with newer versions. This suggests that the listed JSF/EL/JSTL/JSP JARs are actually supplied via webapp and therefore causes version conflicts during runtime. Please remove all of those server-supplied JARs from the webapp (so you have **only** PrimeFaces, OmniFaces and PrettyFaces in webapp) and retry. – BalusC Jun 03 '16 at 12:33
  • That solved it. I specified those dependencies as _provided_ in the pom.xml and the problem disappeared. Thanks for the quick help. – bdz Jun 03 '16 at 12:45
  • When I load the page first time after starting the WildFly server then the jsessionid-s are appended to each h:outputLink. When I reload the page in the browser then jsessionids are gone and they don't come back until I restart the server again. First I thought it's because of the cached version of the pages but if I am using incognito window the behavior is the same so it has nothing to do with local caches. – bdz Jun 13 '16 at 11:40

0 Answers0