Question

I want to configure domain name in jboss configuration. Say for example, currently "exampledomain" as domain value in cookies. but i want to like this "www.exampledomain.com" or "someothername.com".

I tried

<SessionCookie secure="true" httpOnly="true" domain ="www.exampledomain.com"/> 

in context.xml.

The context.xml can be found in jboss/server/<myserver>/deploy/jbossweb.sar/context.xml. This also not work.

Please let me know how to configure this domain value in jboss configuration.

JBoss AS version :jboss-5.1.0.GA

Était-ce utile?

La solution

In fact, jboss could not solve your cross-domain requirement. Because the web-browser make the cross-domain problem.

When you first visit "exampledomain", the server will set a "proof(Jsession)" to you. Then when you visited "exampledomain" in second. The web browser will find the proof and send it to the same website.

However when you visit "someothername", your web browser do not think you visiting the same website. so it would not send that "proof" to server. Finally the server could not get the "proof" and get cross-domain data.

If you want solve this, you need to find some other method, like "jsonp". You can search it and find better answers.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top