[jcifs] Re: Null pointer exception in ServerMessageBlock.java
david at sprowls.org
Thu Jun 22 04:49:25 GMT 2006
I am almost certain URLEncoder will not do what you need. I think I
ran into problems with it a while back and found that it does not
encode everything that you would expect. Get the commons lang
package from jakarta and use the escapeHtml in the StringEscapeUtils
Hope that helps.
On Jun 21, 2006, at 11:08 AM, Jake Goulding wrote:
> From the URL JavaDoc:
>> The |URLEncoder| <http://java.sun.com/j2se/1.5.0/docs/api/java/net/
>> URLEncoder.html> and |URLDecoder| <http://java.sun.com/j2se/1.5.0/
>> docs/api/java/net/URLDecoder.html> classes can also be used, but
>> only for HTML form encoding, which is not the same as the encoding
>> scheme defined in RFC2396.
> So I think that these classes are for something different than the
> encoding needed here... am I wrong?
> Levi Purvis wrote:
>> Or just use java.net.URLEncoder...
>> On 6/21/06, Ronny Schuetz <Usenet.8d3 at gishpuppy.com> wrote:
>>> * Jake Goulding wrote:
>>> > Obviously, this is not right... the question is where does this
>>> need to
>>> > be fixed? Do I need to make sure that the user/domain/password are
>>> > encoded before passing them off to JCIFS? Does JCIFS need to
>>> > support this? Am I not "allowed" to have a hash in my password?
>>> Try to URL-encode the username and password before using them to
>>> the URL. The jakarta commons codec library  offers the required
>>> functionality for example.
>>>  http://jakarta.apache.org/commons/codec/
> Jake Goulding
> Software Engineer
> Vivísimo, Inc.
> "One of the main causes of the fall of the Roman Empire was that,
> lacking zero, they had no way to indicate successful termination
> of their C programs."
More information about the jcifs