@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> helo
<0> anybody who can help me?
<1> sorry we're fresh out of that
<2> eleos/jom read the topic
<3> anyone who knows how to to change the default text encoding for System.out.*?
<4> Thomas007: what problem are you trying to solve, that very specific one aside?
<5> wlfshmn: JSF is actually pretty strong
<3> I have problems with a commaseperated file, it's seperated with "" aka "\xa4", it works on windows, but on linux java sees that char as ""
<3> the other problem is output with System.out.println(), special danish chars are outputtet wrong
<3> linux system encoding according to java is UTF8
<3> windows is Cp1252
<4> Thomas007: what does that file access have to do system.out?
<6> jottinger: Yeah, that was my impression as well.
<3> Clackwell: second problem
<6> jottinger: Still a bit confusing to find a single component library that meets all requirements, but with all the code donations flying around, I suppose that will resolve itself
<3> my thought was that if I could set the java enviroment to Cp1252 both problems would be solved



<5> wlfshmn: indeed, the impl issues are a problem
<4> Thomas007: that's wrong thinking. tell java that your text data is in the encoding of your choice instead. favor local settings over global settings in such cases.
<6> jottinger: I have yet to actually work with the stuff though. I onyl poke at it in home projects, all of which I'm way too lazy to actually finish
<6> jottinger: but atleast I get to play with other stuff than I do at work
<5> I've been toying with it
<5> there are lots of neat things you can do with it once you master the inobvious
<6> I lack experience in webapps as a whole, so virtually all of the applcation stack is unknown to me..
<6> there is lots of fumbeling around before I get things to actually work
<6> I figured I would take a look at the jsf+spring+hibernate thing that seems to be popular, this weekend
<6> atleast hibernate I know the basics of
<3> Clackwell: "tell java that your text data is in the encoding" - makes sense, though input = new BufferedReader( new FileReader(aFile) ); - those cl***es doesn't take a encoding as parameter
<4> Thomas007: have you seen the api doc page for filereader?
<3> nope, link?
<4> omfg lolol!!!oneone
<4> <cough> sorry 'bout that
<4> Thomas007: APIDOCS The API documentation for the Java standard libraries ( download at http://java.sun.com/docs/ ) lists ALL cl***es (see link "All Cl***es") and ALL methods (see link "Index"): http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html
<3> Clackwell, Ah you mean that one, I did read that, but didn't notice the encoding inherited from java.io.reader
<3> I mean java.io.InputStreamReader
<3> there is a getEncoding, but not a setEncoding
<4> have you seen what it says at the top of that page?
<3> Convenience cl*** for reading character files. The constructors of this cl*** ***ume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream.
<3> ****
<3> I mean, there it is
<4> yes :)
<2> I think thats why Clackwell was trying to ram the API docs down your throat
<2> there was a good reason for it
<4> <cough>
<3> doooh
<3> ok, It solved it
<3> input = new BufferedReader( new InputStreamReader( new FileInputStream( aFile), "Cp1252" ) );
<3> how do I set the default output encoding for System.out.println() ?
<4> Thomas007: what for?
<7> hi
<7> u guys experience with jni?
<8> salam
<3> Clackwell: generel output
<4> XiC: what for do you want to use it?
<8> how i can convert double to Int ?
<4> Xgamerz: google
<7> well, i use it to connect to Skype
<4> add "java", i guess.
<4> XiC: ah, i see.
<7> but I have this problem... my native method doens't get called, until the app extis
<7> the lib loading is done, but the method call isn't completed
<7> weird threading issue, probably pthreads
<1> when did skype become opensource?
<4> Thomas007: you can set the streams on the System cl*** (see api docs). no idea if that will do any good. System.out may be one of the few places where using the platform default may make sense perhaps.
<3> looking, but haveng found it yet
<4> setOut(xyz) escaped you?
<1> anyone done Colorado Summit?
<1> i'm being "sent"...just wonder if it's worth getting on a plane for or if i can opt out sick :Z
<3> Clackwell: this works
<3> System.setOut(
<3> new PrintStream(
<3> new BufferedOutputStream(
<3> new FileOutputStream(
<3> java.io.FileDescriptor.out), 128), true, "Cp1252")
<3> );
<4> sure, setting your own streams you can achieve anything you want.
<4> use internet pastebins for pasting more than a few lines.
<3> thanks for the hint, I'm off for the weekeend, have a nice weekend



<4> Thomas007: you are welcome. same to you.
<2> it'll come in useful I'm sure...
<9> wlfshmn: naah, she's my personal secretary :P
<10> hi im using jdbc to connect to sql server 2005: is there a way to generate a prepared statement like this: use [?]
<10> it does not like the ? in brackets
<6> what are the brackets for? PreparedStatement escapes in-paramters automatically, and can also take exception to malformated SQL
<10> the brackets are defined for the use statement .. but perhaps i dont need them as u indicate
<11> can anyone helping in corba
<11> ?
<12> Question: I am making Http Requests using Jakarta HttpClient and usually I can do a byte[] b = getResponseBody() on a GetMethod or a PostMethod but in 1 case the respnseBody is too large and it tells me to use getResponseBody***tream() instead. But when I do this, the InputStream I obtain from this method does not seem to have any data in it whatsoever(i get a -1 from is.read()) How can I get the data from the InputStream responseBody or h
<1> @@
<1> have you tried explicitly calling getResponseBody() as in object.getResponseBody() ?
<1> errr nm that
<12> yeah no, i think what it is is that the page was being redirected(at a rate which i could not notice by the naked eye) and i hadnt thought to check the status(because im a moron) but im getting a 302 or some **** like that
<12> so im p***ing the redirect through to a get statement now and seeing where that gets me
<12> ha, imagine that, it actually worked lol
<1> tadow!
<12> Question: I get this error message when making an HttpClient request to half.ebay.com: WARNING: Cookie rejected: "$Version=0; ebay=%5Ecv%3D15555%5E; $Path=/; $Domain=.ebay.com". Domain attribute ".ebay.com" violates RFC 2109: host minus domain may not contain any dots
<12> Cookie[] inithacookies = cookiespec.match(
<12> "half.ebay.com", 443, "/", false, halfclient.getState().getCookies());
<12> Why is the domain coming out as ".ebay.com"???
<13> that's the domain?
<12> thats the error im getting. its telling me the domain in the cookie is ".ebay.com" but it shouldnt be
<4> icenyne: got the latest and greatest httpclient version?
<12> sure do
<4> a few pointers at google. one mentions a compatibility setting, another where the developer was inclined to just hack httpclient.
<12> so heres whats up at this point: I clear all the cookies out of the HttpClient state and I create a GetMethod for https://account.half.ebay.com/ws/eBayISAPI.dll?MyAccountSaleSummary So technically that HttpClient should be totally empty. But then I use that HttpClient to execute that GetMethod for that URL and thats when I get Trace Statements saying what I posted about about the cookie
<12> Clackwell: can you link me, i didnt see these
<4> icenyne: http://www.google.com/search?hl=en&lr=&q=%22host+minus+domain+may+not+contain+any+dots%22&btnG=Search
<14> interestingly, by the original Netscape cookie spec, ebay is right
<14> you can set cookies for a domain tail (e.g. foo.bar.com can set for bar.com), but any Set-Cookie domain must include at least two dots
<14> so .bar.com is valid under the tail matching rules, by my reading
<12> yeah unfortunately Ive looked at the specs for 2109 and 2965 and they both reject any cookie with a leading '.'
<4> one hiut at google seemed to be a patch removing that code you have run into, replacing it with something that seems in line with Asriel. pretty odd stuff.
<12> So how does one set the CookieSpec to be modeled after the 'original Netscape' structure?
<4> i'd take it up to apache or just hack it, if that makes any sense in the first place.
<12> Clack: please link to that one
<4> icenyne: from the above...
<12> im going through these results and not finding wonderful help
<12> ok ill keep looking
<14> the alternative is to send ebay a message saying they're violating modern cookie specs
<12> hahahahahahaha
<14> not that that fixes your problem :)
<4> if there was "wonderful help" in there i would have pointed that out already. instead i am pointing out pieces i noticed, just like Asriel.
<4> ebay has working code examples to work with, don't they? maybe get an ebay dev account and do as Asriel says, or see how they solve it in java.
<14> I doubt they even deal with it. this looks like a screen scraping attempt
<12> hahahahahahahahahah! youve certainly never worked on developing 3rd party software for ebay!
<12> they must violate every standard there is and any developer tools they have dont work. and forget about documentaion
<12> it is a screen scraping attempt
<4> "Domain attribute ".ebay.com" violates RFC 2109: host minus domain may not contain any dots" either sounds like the author was confused about what $domain should contain (why does he "say host minus domain"?).
<12> but their F'ing backend APIs dont work
<4> icenyne: i doubt that.
<4> it is more likely that you or someone else got things wrong elsewhere.
<4> i take it up to the ebay developers. it might require a commercial developer subscription i guess.
<4> i'd, rather.
<12> eh, at the beginning of the year i discovered that one of their tools did not work at all and this token they sent me to access it was useless
<12> yeah i have all that crap, im telling you, ebays APIs are buggy
<12> REALLY buggy
<4> so nobody else had much use for that tool, it seems.
<12> eh, it seems from my experience its easier to do screen scraping to get what you want out of ebay than to deal with them and their shoddy backends
<4> <shrug> maybe back to the apache route then.
<4> or hacking it yourself.
<14> I can't find any other sites actually using the "domain" portion of the cookie spec in a quick random survey
<14> but as it was/is valid, it would seem like you need to fix whatever library you're using
<12> well let me point this out, the cookies only mess up for ebay, not for amazon, abebooks, or alibris
<12> so everything was working just fine until i got to the ebay portion
<14> that's as may be, it doesn't solve the problem. ebays using an anacronistic form *or* whoever wrote the java library misinterpreted the spec
<14> either way, you ain't gonna get ebay to change their server
<14> so you need to change the library
<12> how can i change the library. its the most recent version of Jakarta
<12> do I need to custom make a new 'old netscape' spec


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

gamioles
#AllNiteCafe
javascript onmouse fire only parent
#php
spamassassin installions
sticky keys xorg gentoo
#chatzone
#java
#linux
radiostorm URAGANU



Home  |  disclaimer  |  contact  |  submit quotes