I migrated my web.xml
to 3.0xsd
and added the following code to set cookies to HttpOnly
<session-config>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
but I get an error while deploying the project in JBoss
Failed to parse XML descriptor "/C:/Amber/My_Server/jboss-as-7.1.1.Final/standalone/deployments/Project_Test.war/WEB-INF/web.xml" at [187,1]
[187,1] refers to the line number in web.xml
where the session-config
part begins.
Is session-config not supported in JBoss 7.1.1
? I got the code I used from a similar question on this site.
I've just deployed a web app with session-config that you provided without any errors. Could you post some more details? When you specify:
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_3_0.xsd"
version="3.0"
in your web.xml and get rid of servlet-api-2.5 from your classpath everything should be fine.
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.