Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6746267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:18:09+00:00 2026-05-26T12:18:09+00:00

I have a java servlet with the OData4j library and I want to configure

  • 0

I have a java servlet with the OData4j library and I want to configure it so I can make HTTP POST request from a Silverlight application.

My web.xml file looks like this:

<servlet>
  <servlet-name>OData</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
     <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
     <param-value>org.odata4j.producer.resources.ODataResourceConfig</param-value>
    </init-param>
</servlet>
<servlet-mapping>
    <servlet-name>OData</servlet-name>
    <url-pattern>/myService/*</url-pattern>
</servlet-mapping>

I’ve tried adding this to my web.xml file:

<servlet>
  <servlet-name>CrossDomain</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
     <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
     <param-value>org.odata4j.producer.resources.CrossDomainResourceConfig</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>CrossDomain</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

But it doesn’t work. I also tried adding the “crossdomain.xml” and “clientaccesspolicy.xml” files to my resources directory but that also doesn’t work. I still get a SecurityException when sending a HTTP POST request with my Silverlight application.

Any hints would be greatly appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:18:09+00:00Added an answer on May 26, 2026 at 12:18 pm

    Turns out that instantiating CrossDomainResourceConfig does enable the “crossdomain.xml” and “clientaccesspolicy.xml” files. The thing is that they are available at the URL: /myService/crossdomain.xml and /myService/clientaccesspolicy.xml.

    However, the Silverlight runtime looks for those files at the server root (eg: /clientaccesspolicy.xml)

    By adding both of those files manually in the server root, it fixed the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this java servlet that grabs information from a form, I need to
I have web application written in java using Eclipse. It has just one servlet
I have a Java servlet, where I want to use the Jackson JSON parser
I have checked out a java servlet project from subversion that has a strange
I have to pass some strings from a java servlet to a php script.
I'm developing a java servlet web application that manages information from multiple databases (all
I have a Java servlet container using the Spring Framework. Pages are generated from
I have a standard GWT application, and it of course uses a Java servlet
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I have a java servlet that upon a request crunches on data and produces

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.