Search Results

Search found 2 results on 1 pages for 'zigomir'.

Page 1/1 | 1 

  • Java basic authorization with URLConnection

    - by zigomir
    Hello! I'm opening a connection to WebService with an URLConnection class. I also set request property for basic authorization like this: c.setRequestProperty("Authorization", "Basic " + usernameAndPasswordEncoded); Where c is an object of type URLConnection. So this is client side of WebService call. Now on server side I need to get username from session: User user = (User) request.getSession().getAttribute("user"); But this won't get an username. Also if I look through debug mode, I see an anonymous userName in HttpSession object. What to do to solve this problem, so that username is sent through client to WebService server for authorization? Thanks everyone!

    Read the article

  • JAXB unmarshal exclude specific element

    - by zigomir
    Hi everyone! I know for @XmlTransient annotation, but sometimes I need this element and in other use cases I really have to prevent it from unmarshaling, because it contains base64 text. So I need to exclude it because performance problems. Is there any way to dynamicly exclude one element from unmarshaling with JAXB?

    Read the article

1