Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Glassfish secure cookie configuration  RSS feed

 
mike spearson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Glassfish v2.1
Would like to configure secure cookie and have taken instructions from this https://blogs.oracle.com/jluehe/entry/ow_to_configure_the_security and https://docs.oracle.com/cd/E19879-01/820-4337/beash/index.html

When I check with my system, i have four sun-web.xml as shown

./nodeagents/myNodeAgent/ProdInstance1/generated/xml/j2ee-modules/myapp/WEB-INF/sun-web.xml
./nodeagents/myNodeAgent/ProdInstance1/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml
./domains/myAppDomain/generated/xml/j2ee-modules/myapp/WEB-INF/sun-web.xml
./domains/myAppDomain/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml

May I know which sun-web.xml should I modify to include this snippet:


thanks
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You should add that line in your own project's WEB-INF/sun-web.xml

Then redeploy it.

The extracted WAR should be in the "applications" folder so in your case, that's
./nodeagents/myNodeAgent/ProdInstance1/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml
./domains/myAppDomain/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml
 
mike spearson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:Welcome to the Ranch

You should add that line in your own project's WEB-INF/sun-web.xml

Then redeploy it.

The extracted WAR should be in the "applications" folder so in your case, that's
./nodeagents/myNodeAgent/ProdInstance1/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml
./domains/myAppDomain/applications/j2ee-modules/myapp/WEB-INF/sun-web.xml


Hi thanks,

After i tried implementing and deploying, I have this in the response header



I should not get a cookie comment. I should get something like this


It is not working.
Any advice?

thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!