comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * XML Document. Node vs Elements, and more - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8ef591e010529d7b * Java based remote desktop Control - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/593ccec5742f23c8 * If you wanna be my lover... - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b0f39eca4dd2fc5 * Slightly OT.. Range finding software - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/182d2fdc59a14d95 * Volunteers for GPL project - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb816d4b77a38358 * flush attribute in JSP - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c3cec6d3c4756ac * JSP Struts <logic:equal> tag questions - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/135efce4ed8c9cd * vector bench mark? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6a2a58a82fad791d * multiple forms and one servlet - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4dacdcfce2b3903e * Setting up a filter based on server name - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/801866155eeb6057 * why dont I get exception here(servlets) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ced949238f6fcd9 * applet's call comportement - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc1d4563dc67060c * Deploying MIDlet via cable? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/939c5a9412e6b4a8 * Stupid null pointer exception - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aeeebd0bb6f11be3 * table sorting in jsp - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d4e4f8fea34f2e05 * How to know if a CD is inserted in the cdrom drive from java ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5d0b1b8567b852 * Possible HttpURLConnection.setFollowRedirects bug?I - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f66b5ed7610a9b5 * ../ in jar - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/11f6e5a8b5aa4402 * XHTML WYSIWYG editor, open-source Javabean? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e2ec3f2035987b9f * Alternative to change log4j logging level at runtime? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9bb8d27d79dac47f * help with internationalization/localization - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b2947dc6ffc5f377 ========================================================================== TOPIC: XML Document. Node vs Elements, and more http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8ef591e010529d7b ========================================================================== == 1 of 3 == Date: Sat, Oct 30 2004 4:21 pm From: Sudsy <[EMAIL PROTECTED]> Jbjones wrote: > I am parsing a document, so am using nodelist to get the children of > the root, and using logic to parse the Nodes depending on which one it > is. however, I need more power than "Node" can give me. So can I > somehow convert a Node to an Element (I basically need the ability to > read the attributes of an item as well as just get the value). > However, they don't have an ID that i could accurately read to use the > getElementByID() tag. So how can i convert a node to an element? Or > is there a better way for me to go about this instead of root -> > Nodelist ?? <snip> You know that Element is a subinterface of the Node interface, right? And you know that you can invoke Node#getNodeType(). And you can see from the javadocs that you can compare the result of the invocation to Node.ELEMENT_NODE, eh? Put it all together and it should become obvious as to how you can then cast a Node of the appropriate type to an Element. Then do with it what you will... -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. == 2 of 3 == Date: Sat, Oct 30 2004 5:30 pm From: "Jbjones" <[EMAIL PROTECTED]> <quote>You know that Element is a subinterface of the Node interface, right?</quote> Yes I do. <quote>And you know that you can invoke Node#getNodeType() </quote> Yes, I realized I could call that but did not know it could be usefull. <quote>And you can see from the javadocs that you can compare the result of the invocation to Node.ELEMENT_NODE, eh? </quote> No, I did not see this or know about it. All I have been reviewing is the javadoc class interfaces and papers. I did originally try to typecast, my original code looked like : <code> Element El = (Element) (NodeListObj.item(i)) </code> , but the execution barfed on it, so figured I they were not compatible. I am relatively new to java (have always been a C language guy), so have picked up a thing or two, but am no where an expert on the language, so what javadocs should I be looking for? I have basically always just viewed what I think of as the class interface. Thanks for the help! == 3 of 3 == Date: Sat, Oct 30 2004 7:54 pm From: Sudsy <[EMAIL PROTECTED]> Jbjones wrote: <snip> > I am relatively new to java (have always been a C language guy), so > have picked up a thing or two, but am no where an expert on the > language, so what javadocs should I be looking for? I have basically > always just viewed what I think of as the class interface. Thanks for > the help! Since you were so frank, permit me to share. Best place to start is here: <http://java.sun.com/j2se/1.4.2/docs/guide/plugin/dom/index.html> Of course this assumes that you've already consumed and understood the docs here: <http://www.w3.org/DOM> (Note the change from w3c.org to w3.org) A quick check of my personal codebase finds constructs like the following: NodeList nodeList = null; Node node = null; Element elem = null; ... nodeList = <rootelement>.getNodesByTagName( "someName" ); ... for( int i = 0; i < nodeList.getLength(); i++ ) { node = nodeList.item( i ); if( node.getNodeType() != Node.ELEMENT_NODE ) throw( new IllegalArgumentException( ... ) ); elem = (Element) node; } IOW, not much different from other common Java code. You just use the node type to determine whether the subsequent cast will be acceptable. If this still seems too "fuzzy" then feel free to drop me a line off-ng and I can probably "scare" up (forgive the All Hallow's Eve reference) some code for you. -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ========================================================================== TOPIC: Java based remote desktop Control http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/593ccec5742f23c8 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 5:34 pm From: "Ike" <[EMAIL PROTECTED]> Have a look at VNC (virtual network computing") -Ike ========================================================================== TOPIC: If you wanna be my lover... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b0f39eca4dd2fc5 ========================================================================== == 1 of 2 == Date: Sat, Oct 30 2004 6:09 pm From: Hamilcar Barca <[EMAIL PROTECTED]> In article <[EMAIL PROTECTED]> (Sat, 30 Oct 2004 22:06:33 +0000), Erissa wrote: > General interests include church vandalism, I think Flatfish might be interested. Do you swim? == 2 of 2 == Date: Sat, Oct 30 2004 6:21 pm From: Sun <[EMAIL PROTECTED]> In article <[EMAIL PROTECTED]> John Doe <[EMAIL PROTECTED]> wrote: > > Cross posted off-topic troll gibberish. > From: John Doe <[EMAIL PROTECTED]> Date: Sun, 31 Oct 2004 00:34:53 GMT Message-ID: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Lines: 125 NNTP-Posting-Host: 69.153.50.97 Organization: sometimes Path: example.com!news.newsreader.com!newsh.newsreader.com!feed5.newsreader.com!newsreader.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!67420556!not-for-mail Newsgroups: alt.test X-Trace: newssvr30.news.prodigy.com 1099182893 ST000 69.153.50.97 (Sat, 30 Oct 2004 20:34:53 EDT) User-Agent: Xnews/06.08.25 X-Complaints-To: [EMAIL PROTECTED] NNTP-Posting-Date: Sat, 30 Oct 2004 20:34:53 EDT X-UserInfo1: [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@_ACSARASDEFLBJ]S\GFNTUAVBL ========================================================================== TOPIC: Slightly OT.. Range finding software http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/182d2fdc59a14d95 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 6:58 pm From: [EMAIL PROTECTED] (GF) Hello Everyone, Sorry this isn't exactly java but I was thinking about writing this piece of software and I didn't know if there is allready one out there. I want to write a program that compares two live images (from webcam's perhaps) of the same object, but at slightly different angles and have the software estimate the distance the object is from the cameras. Does anyone know of software allready out there that does this? Thanks ========================================================================== TOPIC: Volunteers for GPL project http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb816d4b77a38358 ========================================================================== == 1 of 2 == Date: Sat, Oct 30 2004 7:50 pm From: Thor Harald Johansen <[EMAIL PROTECTED]> I have a SourceForge project named 'sketcher'. I've got a working (but unstable) client/server system with a few thousand lines of code, and I'm looking for volunteers. Any tips regarding this? A Google search ('open source volunteers') turned up little. Announcing for volunteers at the recruitment section at SF produced little response. Help? == 2 of 2 == Date: Sat, Oct 30 2004 9:58 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Sun, 31 Oct 2004 03:50:17 +0100, Thor Harald Johansen wrote: > I'm looking for volunteers. Any tips regarding this? Not multi-posting*, which would tend to piss-off potential contributors. <http://www.physci.org/codes/javafaq.jsp#xpost> * I notice you actually used different words in the c.l.j.help post, in this case it maight have beenm better to use the same words and cross-post to a small number of groups. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ========================================================================== TOPIC: flush attribute in JSP http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c3cec6d3c4756ac ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 7:59 pm From: [EMAIL PROTECTED] (Matt) I want to know what is the usage of flush attribute? For example, whats the differences in the following? <jsp:include page="header.jsp" flush="true"/> <jsp:include page="header.jsp"/> please help. thanks!! ========================================================================== TOPIC: JSP Struts <logic:equal> tag questions http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/135efce4ed8c9cd ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 8:28 pm From: [EMAIL PROTECTED] (Raymond Lee) I want to know if I use <logic:equal> tag, I need to take care all different cases. Looks like there are no else tag in Struts. For example, in JSP scriplets without Struts, I may do this: <% if (returnValue.equals("0") { ... } else //means returnValue="1" { ... } %> But in Struts, I need to do this: <logic:equal name= "returnValue " value= "0 " > ... </logic:equal > <logic:equal name= "returnValue " value= "1 " > ... </logic:equal > //etc... In this case, that is fine. But if there are so many different cases, it is tedious to specify all possiblitites in order to use <logic:equal> tag. Please discuss and advise. Thanks!! ========================================================================== TOPIC: vector bench mark? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6a2a58a82fad791d ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 8:43 pm From: [EMAIL PROTECTED] (Peter) Michael Borgwardt <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Peter wrote: > > > HI > > Does anybody know where i can find a benmark list of vector, > > collection, hashmap, hashtable? > > I just need to know their insertion time and retrieve time. > > That would be trivial to do yourself. However, the note that: > > - Collection is an interface, not a class > - Vector and the Hash* classes have completely different purposes > - The performance of HashMap and HashTable depends very much on the > kind of object you actually put into them Thanks for your reply Generally, i will put string into them. I believe hash table have better retrievement performance, because it uses key to retrieve the value. But i don't know how good is it, so if sun provide me some official doc, i will very happy. thanks from Peter ([EMAIL PROTECTED]) ========================================================================== TOPIC: multiple forms and one servlet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4dacdcfce2b3903e ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 8:54 pm From: marcus <[EMAIL PROTECTED]> you can give different values to your sumbit button, or use hidden variables in your form, which is what I do. Not a java question Madhur Ahuja wrote: > Yasaswi Pulavarti <[EMAIL PROTECTED]> wrote: > >>I have one servlet which has multiple forms. The action element of the >>forms is pointing on one servlet. I want to process the different form >>requests as different reponses in the same servlet. How can I do that >>based on the form "Name" attribute. >>Thanks, >>Yasaswi > > > You can do a post request and append a variable like this: > <form method = post action = /servlet/process?pc1> > <form method = post action = /servlet/process?pc2> > > Then, you write the code like this > > if(request.getQueryString.equals("pc1") > { > > file://code for first form > } > else if (request.getQueryString.equals("pc2") > { > file://code for second form > } > else > { > // > > } > > > -- > Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com] > > Homepage > http://madhur.netfirms.com > > > > > > ========================================================================== TOPIC: Setting up a filter based on server name http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/801866155eeb6057 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 8:56 pm From: marcus <[EMAIL PROTECTED]> Yeah I knew that (posting as freddiemac), but I was hoping he would give some clarity to his thoughts. Also, I was wondering if he knew enough about his server setup to know if URL rewriting was appropriate here. I have very successfully appended info to urls routed internally, which his servlet could pick up. Sudsy wrote: > freddiemac wrote: > >> What do you mean servers "tied to" an application? >> HTTPServletRequest.getRequestURL() should give you what you need. >> >> MarkN wrote: >> >>> My situation is unique I guess. There are several virtual hosts tied >>> to the same J2EE application (ColdFusionMX running on top of JRun4). >> > > I know what OP means: rather than creating a separate code base for > each virtual host, they share a common one. A potentially disastrous > approach, IMHO. > ========================================================================== TOPIC: why dont I get exception here(servlets) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ced949238f6fcd9 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 9:02 pm From: marcus <[EMAIL PROTECTED]> Madhur -- I don't recognize the syntax -- is this a JSP page or something? I only use servlets directly handling service requests, so my answer may not apply. I always get an exception using sendRedirect() if I have executed the statement response.setContentType("text/html"); but not without. servlet contain 2.3 I think. I thought it was funny, too. Madhur Ahuja wrote: > According to javadocs in HttpServletReponse: > > sendRedirect > If the response has already been committed, > > this method throws an IllegalStateException. > > After using this method, the response should be considered > > to be committed and should not be written to. > > I want to know, how can I commit the reponse. I tried > flushing the buffer, but still I didnt get IllegalStateException. > > Running Tomcat 4. > > Here is the code: > > <html> > <head> > <title>servlet</title> > </head> > > <body> > <% > > if (request.getParameter("name")==null) > { > out.println("<h1>hello world</h1>"); > > out.flush(); > > response.setHeader("madhur","ahuja"); > response.flushBuffer(); > > response.sendRedirect("/login.jsp"); > > } > else > {%> > <h1>hello <%=request.getParameter("name") %> </h1> > <% > } > %> > > > </body> > </html> > > > -- > Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com] > > Homepage > http://madhur.netfirms.com > > > > > > ========================================================================== TOPIC: applet's call comportement http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc1d4563dc67060c ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 9:10 pm From: marcus <[EMAIL PROTECTED]> So you will have three people browing your web page and you want to see what they are looking at? You will have to develop your own communication language and send info back and forth like a hidden instant messaging service. Your client visits your page and loads the applet, which in turn says to the server "Hey buddy I've got a live one. Pop up in front of that bozo's solitaire game and annoy the hell out of him." why? Emmanuel Freund wrote: > Hi, I'm currently developping a web browser in java and I'd like to have the > windows openned by some applets to be displayed in my own workspace and not > the OS's one. If anybody have an idea, some clue, whatever, it would be of > great help. > ========================================================================== TOPIC: Deploying MIDlet via cable? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/939c5a9412e6b4a8 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 9:27 pm From: "Rhino" <[EMAIL PROTECTED]> "Darryl L. Pierce" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Rhino wrote: > > >> The MIDlet suite is the JAR file. It's referred to as a suite since it > >> can contain more than a single MIDlet. > >> > > I'm glad I asked! From the context in the FAQ, I got the impression that > > it was *at least* the JAR *and* the JAD and possibly other things too. So > > am I right in understanding that ONLY the JAR has to be deployed and that > > the JAD doesn't get deployed? If so, why create the JAD in the first > > place? > > No, that's incorrect. The JAD file is used by the Application Management > System. It lets the AMS determine if the MIDlet suite already exists on the > device and, if so, if you're attempting to download a newer version of the > suite. It lets the handset determine a lot of information about the MIDlet > suite without having to actually download it (which can be costly); since > the JAD is usually only a few hundred bytes, it's faster and cheaper to > download that than to download the JAR itself, which can be up to 64k and > even larger. > > The JAD file is not *required* by the specification, but most handsets won't > accept a JAR, but instead they require the JAD and install what's specified > in the MIDlet-Jar-URL field. > Okay, thanks for the clarification about JAD files. By the way, I have an answer on how to install my MIDlets on Palm PDAs like my Tungsten E. I joined a Palm developer's group and asked there how to install MIDlets with only a HotSync cable and found that it is not very hard; you have to convert your JAD and JAR file combination into a PRC with a tool that is free from Palm. This URL <http://pluggedin.palmone.com/regac/pluggedin/auth/Java.jsp> contains a download link to the WebSphere Micro Environment Toolkit. When unzipped, the toolkit's main tool is jartoprc.exe and jartoprc_w.exe, the command line and GUI versions respectively of the tool that converts a MIDlet into a PRC file that can be sent to a Palm PDA via a standard HotSync. The whole process is documented in a PDF called UserGuide-PalmOS5.pdf, found within the toolkit. I have followed the instructions and successfully installed a HelloWorld MIDlet on my Palm; it works fine. Thanks for your help in getting me this far!! Rhino ========================================================================== TOPIC: Stupid null pointer exception http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aeeebd0bb6f11be3 ========================================================================== == 1 of 3 == Date: Sat, Oct 30 2004 10:06 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Sat, 30 Oct 2004 23:30:06 GMT, Ann wrote: > Maybe you'll have another year to work on it. ;-) During that year, might you search for your ... <http://www.physci.org/kbd.jsp?key=del> ..key Ann? It seems pretty wasteful to post 167 lines of former conversation to add 1 single line. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 2 of 3 == Date: Sun, Oct 31 2004 12:21 am From: "Ann" <[EMAIL PROTECTED]> "Andrew Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 30 Oct 2004 23:30:06 GMT, Ann wrote: > > > Maybe you'll have another year to work on it. ;-) > > During that year, might you search for your ... > <http://www.physci.org/kbd.jsp?key=del> > ..key Ann? It seems pretty wasteful to post 167 lines > of former conversation to add 1 single line. as if you care > -- > Andrew Thompson > http://www.PhySci.org/codes/ Web & IT Help > http://www.PhySci.org/ Open-source software suite > http://www.1point1C.org/ Science & Technology > http://www.LensEscapes.com/ Images that escape the mundane == 3 of 3 == Date: Sun, Oct 31 2004 12:41 am From: Andrew Thompson <[EMAIL PROTECTED]> On Sun, 31 Oct 2004 07:21:27 GMT, Ann wrote: (A.T.) >> During that year, might you search for your ... >> <http://www.physci.org/kbd.jsp?key=del> >> ..key Ann? It seems pretty wasteful to post 167 lines >> of former conversation to add 1 single line. > > as if you care as if you had a clue If I did not care (more about the people with slow connections) I probably would not have added this to my Java FAQ. "To qoute 140 lines of earlier messages in order to add 'I agree' at the very bottom is a waste of the bandwidth of every member of the group, as well as an added burden on the servers that host newsgroups, and the traffic between them. " Andrew Thompson, from.. <http://www.physci.org/codes/javafaq.jsp#netiquette> Nore replicated this document.. <http://www.physci.org/rfc/rfc1855.jsp> ..which mentions this.. <http://www.physci.org/rfc/rfc1855.jsp#3_1_3> Note particularly point 2 "..Content of a follow-up post should exceed quoted content." For your (hopeful) future cluefulness. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ========================================================================== TOPIC: table sorting in jsp http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d4e4f8fea34f2e05 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 10:10 pm From: [EMAIL PROTECTED] (Matt) If i have a table in jsp, and the user can sort by different columns. Should I code in Java, or let JavaScript to do that? No matter which way, I still need to code, there are no API to do the sorting. Is that true? please advise. thanks!! ========================================================================== TOPIC: How to know if a CD is inserted in the cdrom drive from java ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5d0b1b8567b852 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 10:17 pm From: Andrew Thompson <[EMAIL PROTECTED]> On 30 Oct 2004 14:45:36 -0700, Toni wrote: > Thank you Andrew for your help, You're welcome. Could I get you to post your replies below, and trim, as I do? > ..I will give this another try. > And tony, you are a really funny guy, I bet that you could make a > living from telling such funny jokes. I considered supplying the answer Tony gave - 'ask the user' (and, FWIW, I express it much as he did). Too often devlopers forget the simple and obvious soulutions. I think you should stop seeing it as a 'funny' answer and give it serious consideration. It is porobably more robust than the solution I was looking at. Don't forget that in this situation, the user is actively and knowledgeably (in the sense it is not a random pop-up or spyware) using your software. It seems entirely reasonable that your program will, once*, ask the user where their CD drive is. Once told, your program can write it to 'user.home' and use that information subsequently. In the event the CD drive identified in your file in user.home disappears, ask the user again. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ========================================================================== TOPIC: Possible HttpURLConnection.setFollowRedirects bug?I http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f66b5ed7610a9b5 ========================================================================== == 1 of 1 == Date: Sat, Oct 30 2004 10:25 pm From: [EMAIL PROTECTED] (Wil Hadden) "Brusque" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > "Wil Hadden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I have discovered a slightly obscure scenario that may cause a bug in > > HttpURLConnection and I was wondering if anyone could confirm it. > > > > With automatic redirection turned on, if I do a HTTP GET request, with > > various cookies set and I recieve a 302 redirect, HttpURLConnection > > will do the redirection but will not send on the cookies at the same > > time. > > > > I have confirmed that all browsers will send on the cookies. The net > > result is that the server will usually process the redirect > > differently due to the lack of cookies being sent to the new page. > > > > I am using the lastest 1.4 JRE. > > > > I may not be able to reply to this until Monday. > > > > Wil > > HttpURLConnection doesn't do automatic cookie handling. It's only a very > basic HTTP Client. > > Try using Commons HttpClient http://jakarta.apache.org/commons/httpclient/ Ah, that explains that. I'd seen that client before, thanks for the post. Wil ========================================================================== TOPIC: ../ in jar http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/11f6e5a8b5aa4402 ========================================================================== == 1 of 2 == Date: Sat, Oct 30 2004 11:04 pm From: [EMAIL PROTECTED] (Peter) Hi saveImageIcon = new ImageIcon(JFileViewer.class.getResource("../image/general/save.png")); Has no problem, But i package everything into a jar. It get a null pointer exception. How to get arround it? thanks from Peter ([EMAIL PROTECTED]) == 2 of 2 == Date: Sat, Oct 30 2004 11:17 pm From: Andrew Thompson <[EMAIL PROTECTED]> On 30 Oct 2004 23:04:36 -0700, Peter wrote: > ..But i package everything into a jar. It get a null > pointer exception. How to get arround it? You might start by consulting an FAQ. <http://www.physci.org/codes/javafaq.jsp#path> -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ========================================================================== TOPIC: XHTML WYSIWYG editor, open-source Javabean? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e2ec3f2035987b9f ========================================================================== == 1 of 2 == Date: Sat, Oct 30 2004 11:20 pm From: "Steven J. Sobol" <[EMAIL PROTECTED]> Does such a beast exist? -- JustThe.net Internet & New Media Services, http://JustThe.net/ Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED] PGP Key available from your friendly local key server (0xE3AE35ED) Apple Valley, California Nothing scares me anymore. I have three kids. == 2 of 2 == Date: Sat, Oct 30 2004 11:30 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Sun, 31 Oct 2004 06:20:40 +0000 (UTC), Steven J. Sobol wrote: > Sub: XHTML WYSIWYG editor, open-source Javabean? .. > Does such a beast exist? It always pays to repeat the subject in the body as a lot of people ignore the subject. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ========================================================================== TOPIC: Alternative to change log4j logging level at runtime? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9bb8d27d79dac47f ========================================================================== == 1 of 1 == Date: Sun, Oct 31 2004 1:49 am From: [EMAIL PROTECTED] (Eclifeww) Hi all, I am invesitaging the way to change the log4j logging level at runtime, and you comments are highly appreciated. I have tried to use the logger.setLevel api which works fine in a toy program. The toy program opens a server socket and once it receives the client input thro' socket, it changes the logging level. However, I am not sure whether it will has problem in multi-thread environment. The api call in Log4j of the setLevel is simple as follows. public void setLevel(Level level) { this.level = level; } Will it be problem?, if two thread access the level instance variable in log4j. One reading it and one updating it? Moreover, is there any build-in mechanism in Log4j to reload the log4j.properties at regular interval? Thus, the logging level is reloaded accordingly. Please englighten me. Thanks in advance for your ideas and inputs. Earth ========================================================================== TOPIC: help with internationalization/localization http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b2947dc6ffc5f377 ========================================================================== == 1 of 1 == Date: Sun, Oct 31 2004 1:59 am From: Tor Iver Wilhelmsen <[EMAIL PROTECTED]> Praveen <[EMAIL PROTECTED]> writes: > How do I escape the characters? Can you please give me an example. You use \uxxxx where the xxxx is the hex value of the Unicode characters. ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com
