comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * refresh in jsp - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b4f358300315d217 * Calling Xerces-C from Java - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfcd5377cc5193d7 * Tomcat not starting - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3596c52681c96c06 * RSA and blocks - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/598e1cd1967ba0df * Generating a WSDL from a document-oriented Web Service? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2157bf043d4edc1a * Counting words in an Html Document - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5805c33eeb567770 * Garbage collector quiz - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8540975084df1f47 * emacs Vs Eclipse? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1 * Checksum java - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2 * Put a comma with conditions in XSL - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/883705942bf1c1e7 * J2ME, HttpConnection and Proxy - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2aeb16a7cfaabb05 * How to figure out the number of open files? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cf6f6cbd52a3471a * Keeping session alive using jakarta httpclient - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f3101b0e018afb1 * JSP: error page exception.getMessage returning null for setProperty - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/570e60d4493f982d * Generating graphics on the fly from Oracle data? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d97c6195b23518de * How to make a whitespace in XSL? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cf1e91b8d5326e8a * Tomcat 5.0.28 problem - My servlet doesn't work - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6a15a01d5ebbd61 * Brauche dringend JDK1.1.4 ... - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d6161080ed58911 * Why can't I get Tomcat to hot deploy? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61cdbd0946791b2e * problems converting an object to Integer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29e74be87a8276b * oracle / tomcat performance problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9cb92e205e2568b2 * Frameworks that cover both GUI and DB parts of the application - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/567fd34763274534 ========================================================================== TOPIC: refresh in jsp http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b4f358300315d217 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 8:05 am From: [EMAIL PROTECTED] (Nathan Zumwalt) If a user hits the reload button (even with a POST request), the reqeust will be re-submitted. You can warn users not to push the refresh button. Or, you can redirect to another page, so that even if the user clicks reload button, the request to the original page isn't submitted. //Nathan "Bo Rasmussen" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > I've run into what I guess should be common knowledge. The problem goes like > this > > I have a rather simple web application with some buttons that fires a POST > request when hit. The parameters for the request could e.g. be > "reserve=yes". The problem is that when the user refreshes the page (done > manually) that same request is fired again resulting in another reservation. > The address line in IE says http://mydomain/mypage.jsp but somehow I receive > a POST request http://mydomain/mypage.jsp?reserve=yes. How do I take care > of this situation - or have I misunderstood something. I was told that if I > used POST requests things should work.... > > Regards > Bo Rasmussen ========================================================================== TOPIC: Calling Xerces-C from Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfcd5377cc5193d7 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:51 am From: "Anton Spaans" <aspaans at(noSPAM) smarttime dot(noSPAM) com> "Jon Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is it possible to call a native version of Xerces-C instead of the java > implementation, to make it run quicker. > > Thanks > > Jon > > Hi Jon, it has been a while since i've checked the benchmarks of the various XML parser implementation. But, if i remember correctly, i don't think you will gain much performance if you call Xerces-C instead of Xerces-J from Java (if any at all!). Just use the Xerces-J 2 in your java program. Saves you a lot of headaches. ========================================================================== TOPIC: Tomcat not starting http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3596c52681c96c06 ========================================================================== == 1 of 2 == Date: Tues, Oct 12 2004 8:14 am From: [EMAIL PROTECTED] (Nathan Zumwalt) It looks like Tomcat is looking for some encryption libraries that aren't available. Did you get the "international" version of the JDK? I don't think it includes the Java Cryptography Excetions (JCE)... try installing the JCE: http://java.sun.com/products/jce/ //Nathan "Manish Hatwalne" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I am trying to start Tomcat 4.1 on Windows 2000 for quite some time, but it > fails immediately after startup, and I get this error - > > D:\Tomcat 4.1\bin>startup > Using CATALINA_BASE: D:\Tomcat 4.1 > Using CATALINA_HOME: D:\Tomcat 4.1 > Using CATALINA_TMPDIR: D:\Tomcat 4.1\temp > Using JAVA_HOME: C:\j2sdk1.4.0_01 > Oct 12, 2004 2:34:15 PM org.apache.commons.modeler.Registry loadRegistry > INFO: Loading registry information > Oct 12, 2004 2:34:15 PM org.apache.commons.modeler.Registry getRegistry > INFO: Creating new Registry instance > Oct 12, 2004 2:34:17 PM org.apache.commons.modeler.Registry getServer > INFO: Creating MBeanServer > Oct 12, 2004 2:34:22 PM org.apache.coyote.http11.Http11Protocol init > INFO: Initializing Coyote HTTP/1.1 on port 8080 > Starting service Tomcat-Standalone > Apache Tomcat/4.1.18 > Exception during startup processing > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) > Caused by: java.lang.InternalError: internal error: SHA-1 not available. > at sun.security.provider.SecureRandom.init(SecureRandom.java:86) > at sun.security.provider.SecureRandom.<init>(SecureRandom.java:65) > at java.security.SecureRandom.<init>(SecureRandom.java:131) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces > sorImpl.java: > 39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc > torAccessorIm > pl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:274) > at java.lang.Class.newInstance0(Class.java:296) > at java.lang.Class.newInstance(Class.java:249) > at org.apache.catalina.session.ManagerBase.getRandom(ManagerBase.java:477) > at > org.apache.catalina.session.ManagerBase.generateSessionId(ManagerBase.java:6 > 75) > at > org.apache.catalina.session.StandardManager.start(StandardManager.java:620) > at org.apache.catalina.core.StandardContext.start(StandardContext.java:3570) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) > at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) > at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) > at org.apache.catalina.core.StandardService.start(StandardService.java:497) > at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) > at org.apache.catalina.startup.Catalina.start(Catalina.java:512) > at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) > at org.apache.catalina.startup.Catalina.process(Catalina.java:180) > ... 5 more > D:\Tomcat 4.1\bin> > > How do I fix this? I believe the Java home is correct, however I do have few > more JVMs (1.3 and 1.2) on my machine and I do need them all. What do I do > now???? > > TIA, > - Manish == 2 of 2 == Date: Tues, Oct 12 2004 10:34 am From: "Madhur Ahuja" <[EMAIL PROTECTED]> Manish Hatwalne <[EMAIL PROTECTED]> wrote: > "Sudsy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Manish Hatwalne wrote: >> <snip> >>> Caused by: java.lang.InternalError: internal error: SHA-1 not >>> available. <snip> >> >> There's the nub of the problem. SHA-1 is Secure Hash Algorithm. I >> don't know where in the world you're located but there are still >> some export restrictions on cryptography elements. If you picked up >> the version of the JDK/JRE designed for export then it might not >> include this crpyto algorithm. >> Depending on your situation and JDK/JRE version, you might have to >> download the JCE (Java Cryptography Extension). > > I am located in India and My JDK is j2sdk1.4.0_01 which is rather old. > > Due to bandwidth restrictions, I can't upgrade to JDK 1.4.2 or later > immediately. > From where can I load this JCE and where should I copy it? (is it > JAVA_HOME/jre/lib ?) Hello Manish You can download the newer Tomcat version 5.0.28. This version is working fine with my j2sdk1.4. Moreover, the download is just about 5 mb which is much smaller then jdk. -- Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com] Homepage http://madhur.netfirms.com ========================================================================== TOPIC: RSA and blocks http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/598e1cd1967ba0df ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 8:12 am From: "junkam" <[EMAIL PROTECTED]> Maybe thia article will help. On the last page there is an example of how to handle files. http://aviran.mordos.com/index.php?p=22 ========================================================================== TOPIC: Generating a WSDL from a document-oriented Web Service? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2157bf043d4edc1a ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:30 am From: [EMAIL PROTECTED] (mygoogleac) I need to generate a WSDL from a document-oriented Web Service which is implemented as a servlet. All the examples I seen generate a WSDL from a rpc-oriented Web Service. Can someone tell me how to accomplish this and what tool to use? Thanks, SLS ========================================================================== TOPIC: Counting words in an Html Document http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5805c33eeb567770 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 8:08 am From: [EMAIL PROTECTED] (Nathan Zumwalt) You can use the StringTokenizer class to split Strings into words: http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html The HTML document is more problematic in that you'll have to ignore tags (I'm assuming). I would put the whole thing in the StringTokenizer, and while looping through the tokens, detect tag values. You'll have a lot of if statements. //Nathan [EMAIL PROTECTED] (Francois) wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > I'm looking for a way to count the words in an Html Document or String. > Any idea or experience with this? > > may thx in advance. > rgds, > Francois ========================================================================== TOPIC: Garbage collector quiz http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8540975084df1f47 ========================================================================== == 1 of 2 == Date: Tues, Oct 12 2004 5:20 am From: "Chris Uppal" <[EMAIL PROTECTED]> Razvan wrote: > So, this is the question: can an out of scope > variable count as a VALID reference ? Depends on what you mean. For the JVM, the variable/slot is still valid, the object is still refered to from that stack frame, and it can't be gc-ed. It neither knows nor cares about the Java souce code. OTOH, as far as legal Java is concerned, the variable has gone, it is dead, you cannot use it in any way, and if that variable held the only reference to the object, then you cannot get at the object either. Where it gets interesting is in contexts that bridge both the worlds. E.g. in a Java debugger, what the debugger sees is what the JVM is really doing, but the chances are that it wants to present that to the user as if it were proper Java. So it has a problem, does it "admit" that the slot, and hence the reference, still exists (though no actual variable corresponds to it anymore), or does it "pretend" that the reference has gone away ? Your choice, decide which you'd rather see, and then write your debugger to work that way ;-) -- chris == 2 of 2 == Date: Tues, Oct 12 2004 9:22 am From: [EMAIL PROTECTED] (Doug Pardee) What Joona and Chris said. If I may add to this part: "Chris Uppal" <[EMAIL PROTECTED]> wrote: > The reason for that is quite simple, it's that although Java-the-language > has a concept of local variables with a scope smaller than a whole method, > the language understood by the JVM (i.e. the classfile format) does not > have that concept. In "JVM-speak" (never forget that JVM bytecodes are > a high-level language too -- at least as high-level as Java -- so the > Java "compiler" should really be called a translator) there are no named > local variables, just a fixed size list of "slots" which hold values that > are local to each method invocation. Those slots come into existence when > the method is called, and their contents only become eligible for GC > (typically) when the method returns. > > So the Java compiler (sorry, "translator") has used one of the slots to > hold the values of "tmp", and -- unless it either takes special steps to > null-out that slot before the method returns (which no standard compiler > does AFAIK), or happens to re-use that slot for some other variable -- > then the last value of "tmp" will still be in that slot until the method > returns. Sun calls these "invisible objects" (not the term that I would have chosen). They are discussed at http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#997414 ========================================================================== TOPIC: emacs Vs Eclipse? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1 ========================================================================== == 1 of 2 == Date: Tues, Oct 12 2004 7:27 am From: Phillip Lord <[EMAIL PROTECTED]> >>>>> "Galen" == Galen Boyer <[EMAIL PROTECTED]> writes: Galen> On 11 Oct 2004, [EMAIL PROTECTED] wrote: >> Will, >> >> Your response should have a title "Using Keyboard vs. Mouse". Galen> Well, that really is the crux of the argument for/against Galen> productivity when you are arguing Emacs vs IDEs. Which, btw, Galen> Emacs wins, cause it has both. The mouse driven IDE authors Galen> don't put the keyboard as a priority for being an easy to use Galen> interface, and they should. Actually this is almost certainly a problem with Eclipse. Its certainly a problem with Swing applications. Their Windows Emulation is not perfect, and the keyboard response is a good example of this. If you use windows native applications its not so bad. You generally can navigate entirely using the keys. This is, of course, required by the accessibility legislation. It's hard to use a mouse if you can't see the pointer. Unix interfaces in general are even worse than Java. However, as you can do everything you ever wanted from the command line, its not so much of a problem. Galen> Finding files? Go open a window with some mouse, drill with Galen> the mouse, search with eyes... In Emacs, "C-x d" then use Galen> completion to get their really quickly. The efficiency gains Galen> go on and on. And yes, that really is the argument. This is where Emacs wins heavily. Because the keyboard interface is not seen as a second class citizen there are many packages written specially for it. With finding files ido.el for example, is phenomenally quick, when navigating over deep directory structures (always a problem with Java). It has no impact at all on the mouse driven, or GUI interface of Emacs. Galen> A big shout out to eclipse for ease of use. I've used it a Galen> bit and I find it very easy to use, from the get-go. Emacs, Galen> most definitely, cannot boast that. Eclipse actually seems Galen> quite Emacish in some of its functionality, but I do alot of Galen> database programming as well, so I stay with Emacs. If I was Galen> a java only guy, I'd probably be using Eclipse exclusively, Galen> but then again, I do love just working with Emacs. I'm Galen> constantly tweaking it, seeking perfection in use even after Galen> 5 years of use. Emacs could definitely do with being easier to use. Eclipse does win here, although it insists on trying to import your java into a "project structure". Thanks, I already have one of these! Cheers Phil == 2 of 2 == Date: Tues, Oct 12 2004 6:18 am From: [EMAIL PROTECTED] (Yakov) > > So perhaps you've put your finger on the crux. People who already > KNOW the Java language can find IDEs to be an impediment. Do you really believe that there are people who KNOW Java? The language itself, J2SE, J2EE and all the open source libraries are changing as we speak... Regards, Yakov Fain ========================================================================== TOPIC: Checksum java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:37 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Joona I Palaste coughed up: > Alessio <[EMAIL PROTECTED]> scribbled the following: >> first thing mine is only a pseudoLanguage code for second culo means >> the anatomy part of the body that you have instead of the >> face(ASSHOLE)!!!!! > > Perhaps in Italy insulting people makes them want to help you, but I > think you'll find that here it has the exact opposite effect. =) Just plonk him. And then remember to clean out your killfile every, oh, year or so, whenever you think about it. It gives the offender a chance to grow up in the mean time... -- It'salwaysbeenmygoalinlifetocreateasignaturethatendedwiththeword"blarphoogy". ========================================================================== TOPIC: Put a comma with conditions in XSL http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/883705942bf1c1e7 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:54 am From: "Anton Spaans" <aspaans at(noSPAM) smarttime dot(noSPAM) com> "Matt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to produce item1, item2, item3, etc... in HTML. i.e. it has > commas between the items. > > In XSL, I do the following, but it don't display anything > > <xsl:if test=<xsl:number/> > 1>,</xsl:if> > <xsl:value-of select="item"/> > > any ideas? please advise. thanks!! Above XSL is invalid. It is not even valid XML. So, Matt, get the book 'XSLT 2nd Edition' from Michael Kay (Wrox). You'll learn everything you want to know about XSL that you were (not) afraid to ask. :=) -- Anton. ========================================================================== TOPIC: J2ME, HttpConnection and Proxy http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2aeb16a7cfaabb05 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:25 am From: [EMAIL PROTECTED] (Marko) Yu SONG <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Marko wrote: > > ...I know the code is OK because when I'm using direct connection to the > > Internet, without proxy, J2ME HTTP request works just fine. I can send > > GET and POST requests without any problems. > > > > Error always occurs in: > > s = new DataInputStream(c.openDataInputStream()); > > > > The error description is: > > Exception: java/lang/ClassNotFoundException > > Initializing class: 'com/sun/cldc/io/NetworkConnectionBase' > > Initializing class: 'com/sun/cldc/io/j2me/socket/Protocol' > > Exception: java/lang/ClassNotFoundException > > Exception: java/io/IOException > > Exception: java/io/IOException > > Error: loadText().3 > > java.io.IOException: Error initializing HTTP tunnel connection: > > HTTP/1.0 403 Forbidden > > Server: squid/2.5.STABLE1... > > Before "Error: loadText().3", there have been few lines of errors > already. And you received response from proxy server, which means the > request reached the server. > > > -- > Song > > /* E-mail.c */ > #define User "Yu.Song" > #define At '@' > #define Warwick "warwick.ac.uk" > int main() { > printf("Yu Song's E-mail: %s%c%s", User, At, Warwick); > return 0;} > > Further Info. : http://www.dcs.warwick.ac.uk/~esubbn/ > _______________________________________________________ You are 100% right. Before the main exception (main error) in: s = new DataInputStream(c.openDataInputStream()); I'm getting: Exception: java/lang/ClassNotFoundException Initializing class: 'com/sun/cldc/io/NetworkConnectionBase' Initializing class: 'com/sun/cldc/io/j2me/socket/Protocol' Exception: java/lang/ClassNotFoundException Exception: java/io/IOException Exception: java/io/IOException But I just can't pinpoint where these exceptions take place and what is causing them. In my question here I have posted the entire trace after I invoke my public void loadText(String) function. Any ideas or hunches? Thanks, Marko ========================================================================== TOPIC: How to figure out the number of open files? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cf6f6cbd52a3471a ========================================================================== == 1 of 2 == Date: Tues, Oct 12 2004 7:53 am From: "Zsolt" <[EMAIL PROTECTED]> Hi, how can I figure out the number of open files under jdk-1.4.2? Zsolt == 2 of 2 == Date: Tues, Oct 12 2004 9:14 am From: "andreas kinell" <[EMAIL PROTECTED]> > Hi, > > how can I figure out the number of open files under jdk-1.4.2? > > Zsolt > > open files in the system? opened by the program? i don't really know, but in UNIX for example, every program has its own file descriptor table. i don't think any user program can access those tables from other programs (and therefore, java can't). andreas ========================================================================== TOPIC: Keeping session alive using jakarta httpclient http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f3101b0e018afb1 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 7:13 am From: "John C. Bollinger" <[EMAIL PROTECTED]> Michael Fortin wrote: > I'm using jakarta commons httpclient v3.0 and I'm trying to emulate > what I would do using a browser, like logging on to a web application > and then doing an action which requires me to be logged on. > > HttpMethod method = null; > int returnCode = 0; > String response = null; > method = new GetMethod(".../login?username=mike&password=test"); > returnCode = client.executeMethod(method); > response = getStringFromInputStream(method.getResponseBodyAsStream()); > // the response is the "admin" page, I'm logged on! > > method = new GetMethod(".../action?parameter=value"); > returnCode = client.executeMethod(method); > response = getStringFromInputStream(method.getResponseBodyAsStream()); > // the reponse is the login scren, I'm not authenticated :( > > Can someone give me a hint on how I can acheve that? The web application will use some strategy to associate different requests together into the same session. The most common strategy is to send a cookie in the response that it expects to see in future requests that belong to the same session. Another possibility is that it will expect to see some form of session ID as a query parameter; in this case the parameter would be encoded into the URLs of all the hyperlink targets on each page it delivers. These are not the only possibilities, but chances are excellent that your web application is using one of them. Figure out which one, and comply with it. John Bollinger [EMAIL PROTECTED] ========================================================================== TOPIC: JSP: error page exception.getMessage returning null for setProperty http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/570e60d4493f982d ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 7:34 am From: kaeli <[EMAIL PROTECTED]> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] enlightened us with... > kaeli wrote: > <snip> > > I'm using Netscape Enterprise Server. The exception is NOT supposed to be > > handled by the jasper engine, which is the point. I don't know why it is > > being handled that way. It should not be (or I don't want it to be if for > > some reason this is normal with beans). Something is passing it off and I > > don't know why. > > Just a "shot in the dark" but I note that IllegalArgumentException > extends RuntimeException. It could well be that the container is > handling it differently than a "normal" application exception, i.e. > one which extends Exception. > Of course, without access to the source... No, but good try. I changed it to throw Exception instead, same thing. It seems to be handling exceptions from beans differently when you use setProperty. I changed the code from using <jsp:setProperty name="officeBean" property="*" /> to <% officeBean.setField(request.getParamater("field")) %> I got my error right when I did that. Message: Field must be 10 characters or less. Stack Trace: java.lang.Exception: Field must be 10 characters or less... So I tried changing it to use setProperty with just the one field. I thought maybe it was the asterisk doing funny things. <% String str = request.getParameter("field"); %> <jsp:setProperty name="officeBean" property="field" value="<%=str%>" /> No go. Null message from jasper again. I'm going to Google some more. I wonder if this is a Netscape Enterprise Server issue... I don't recall seeing this problem with Tomcat. -- -- ~kaeli~ The Bermuda Triangle got tired of warm weather. It moved to Finland. Now Santa Claus is missing. http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace ========================================================================== TOPIC: Generating graphics on the fly from Oracle data? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d97c6195b23518de ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:36 am From: [EMAIL PROTECTED] (D. Alvarado) Hello, I am running a WebLogic 5.1 server on Solaris 8. I get all this Oracle data via SELECT statements and I am looking for a way to turn that into graphis that I can display as image files. Anyone know of a good freeware Java utility that could help me do this? THanks in advance, - Dave ========================================================================== TOPIC: How to make a whitespace in XSL? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cf1e91b8d5326e8a ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 6:04 am From: rw <[EMAIL PROTECTED]> For example <xsl:text> </xsl:text> rw ========================================================================== TOPIC: Tomcat 5.0.28 problem - My servlet doesn't work http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6a15a01d5ebbd61 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 9:46 am From: "William Brogden" <[EMAIL PROTECTED]> On Tue, 12 Oct 2004 18:28:30 +0200, Thomas Hoheneder <[EMAIL PROTECTED]> wrote: > Hello, > > I have a problem with getting a Java Servlet work within Tomcat 5.0.28. I > have compiled a class TestingServlet.class with JDK 1.3.1 which is > recommended for use with Tomcat 5.0. Let me tell you, that this is just > my > first servlet at all. For the work I use a book with the title "Java for > the > Web with Servlets, JSP and EJB" from Budi Kurniawan. My TestingServlet's > code is exactly the following, where the compiling went right: > > import javax.servlet.*; > import javax.servlet.http.*; > import java.io.*; > import java.util.*; > > public class TestingServlet extends HttpServlet { > > public void doGet(HttpServletRequest request, > HttpServletResponse response) > throws ServletException, IOException { > > PrintWriter out = response.getWriter(); > out.println("<HTML>"); > out.println("<HEAD>"); > out.println("<TITLE>Servlet Testing</TITLE>"); > out.println("</HEAD>"); > out.println("<BODY>"); > out.println("Welcome to the Servlet Testing Center"); > out.println("</BODY>"); > out.println("</HTML>"); > } > } > > As operating system I use Windows XP SP1 and my JAVA_HOME points to > "C:\jdk131" which I have also configured for Tomcat. Now, the book tells > me > to put the TestingServlet.class file into a sub directory "myApps" of the > webapps directory, which is under my Tomcat installation path. > Furthermore I > have a deployment descriptor named web.xml. So in a whole I have the > following files: > <TOMCAT-HOME>/webapps/myApp/WEB-INF/TestingServlet.java > <TOMCAT-HOME>/webapps/myApp/WEB-INF/web.xml > <TOMCAT-HOME>/webapps/myApp/classes/TestingServlet.class Put all classes used in servlets into packages. Correctly name the package in your web.xml and save the class files accordingly. Old versions of servlet books and examples depended on the "invoker" servlet which let you get away with classes in the default package. BAD IDEA. See this FAQ at JavaRanch http://faq.javaranch.com/view?InvokerServlet > > My deployment descriptor (web.xml) looks like as follows: > > <?xml version="1.0" encoding="ISO-8859-1"?> > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > <servlet> > <servlet-name>Testing</servlet-name> > <servlet-class>TestingServlet</servlet-class> > </servlet> > </web-app> > > Then I start the Tomcat server via the Tomcat monitor. At the URL > http://localhost:8080 I can see a standard starting page of Tomcat. Now > the > book tells me that I can use the following URL to see my TestingServlet's > output: > http://localhost:8080/myApp/servlet/Testing > > But this doesn't work. Instead of seeing the text "Welcome to the Servlet > Testing Center" I get the following error message in the browser window > (I > use IE 6.0): > > > HTTP Status 404 - /myApp/servlet/Testing > ------------------------------------------------------------------------ > type Status report > > message /myApp/servlet/Testing > > description The requested resource (/myApp/servlet/Testing) is not > available. > ---------------------------------------------------------------------------- > Apache Tomcat/5.0.28 ========================================================================== TOPIC: Brauche dringend JDK1.1.4 ... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d6161080ed58911 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 10:34 am From: [EMAIL PROTECTED] (werner55) OK, thank you all for the suggestions, I will keep on running... :-) werner ========================================================================== TOPIC: Why can't I get Tomcat to hot deploy? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61cdbd0946791b2e ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 10:27 am From: [EMAIL PROTECTED] (Ben) "PerfectDayToChaseTornados" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > "Ben" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | So I know Tomcat is able to hot deploy but for some reason can't get > | mine to do it. I've installed several different versions on a few > | different computers and have "autoDeploy=true" in my server.xml file > | and I always have the same problem. What am I missing? (I'm running > | Tomcat on Windows) > | > | Ben > > I think that Tomcat only hot deploys exploded directories, not war files. > You can use the manager app or ant tasks to reload the war file. That's what I'm referring to - exploded directories. It won't hot deploy those. It only hot deploys JSP files for me, not class files. ========================================================================== TOPIC: problems converting an object to Integer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29e74be87a8276b ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 10:26 am From: Bryce <[EMAIL PROTECTED]> On 12 Oct 2004 01:10:36 -0700, [EMAIL PROTECTED] (Alex) wrote: >hello and thanks for your time, i am trying this piece of code and it >doesn't work: > >Integer d1 = (Integer)up1; This only works if up1 is already an Integer, but just needs to be cast. try Integer d1 = Integer.valueOf(d1); although Java 5 has autoboxing, but I haven't had time to look at that yet. >where up1 in an object and i'm trying to create a new Integer named d1 > >the compiler doesn't give me an error, but when i run, in the command >line it gives me: > >Exception in thread "main" java.lang.ClassCastException > >i am 100% that the object up1 contains an integer value. > > >thanks in advance. -- now with more cowbell ========================================================================== TOPIC: oracle / tomcat performance problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9cb92e205e2568b2 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 9:22 am From: [EMAIL PROTECTED] (Mark Durant) Mark Durant <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Sudsy wrote: > > Mark Durant wrote: > > <snip> > > > >> If I run the queries in SQL*Plus with Tomcat still running, I get much > >> better performance than my JSP pages, but it's still fairly slow. If > >> I shut down Tomcat altogether, the queries fly like they're supposed > >> to in SQL*Plus. As an example, a report that's taking five minutes > >> via the JSP pages takes about 10-15 seconds in SQL*Plus with Tomcat > >> running, and one second or less with Tomcat shut down. > > > > <snip> > > > > That would lead me to believe that there's some funny business happening > > "under the covers" with the DataSource used by Tomcat. It might be some- > > thing as simple as the ConnectionPoolDataSource believing that the > > connections are not open and constantly repopulating the pool. This > > would then tax the RDBMS engine, possibly causing the performance impact > > you see when running queries from sqlplus if Tomcat is running. > > I'd start with checking the Tomcat logs for database activity. > > I run 8i with Tomcat on a Linux platform, FWIW. > > > > Thanks, Sudsy! I'll check that out tomorrow, and will report back with > results.... > > Mark Hi folks, It wound up taking longer than I expected to get back to this, and I'm ashamed to report, after spending many hours zeroing in on it, that the problem was entirely programmer error. :) I won't bore with the details, but I'll offer apologies to WinXP SP2, Oracle, Tomcat, and any other party(/ies) I slandered in the process of debugging. Thanks for the suggestions regardless.... Mark ========================================================================== TOPIC: Frameworks that cover both GUI and DB parts of the application http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/567fd34763274534 ========================================================================== == 1 of 1 == Date: Tues, Oct 12 2004 9:55 am From: [EMAIL PROTECTED] (Joshua Levy) I would like to develop, in Java, a pretty basic database application. I already know the objects that the users will want to manipulate and the actions those objects will need to support. I am looking for a Java framework which will do as much of the GUI and databaes work for me as possible. I don't care much about the database side, so it can do ALL of that. I will need to customize the GUI side of things. I've seen lots of frameworks for connecting java classes to databases, but that is only half of what I want. I'm currently researching Naked Objects (www.nakedobjects.com), but am wondering if there are other frameworks that do similar things. Technical stuff: This is a conventional application, not a web thing. I would develop on PCs. The database must be inexpensive and easy for my customers to install. The database schema is pretty simple, but I would like many of the actions to have "wizard like" behavior, so the user would be led through answering questions for data for the action. Thanks in advance. Joshua ======================================================================= 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
