2,443 Posted Topics
Re: Moving this to the javascript forum. You would have better luck on a firefox forum, maybe. | |
Re: That the value for the bean class "CarBean" is invalid? | |
Re: Tomcat is a web container, somewhat less than a full application server. | |
Re: Only administrators can bind ports smaller than port 1024. | |
Re: Well, if Eclipse "shows that there are errors and warnings" then that class is probably not being compiled and so the project does [i]not[/i] contain an executable main class. Fix the "errors and warnings", [i]first[/i]. | |
Re: A daemon thread is a thread that does not need to be explicitly ended in order to end the program and it gets started like any other thread, by calling start(). See the Java Concurrency tutorials, there is a sticky thread at the beginning of this forum. | |
Re: Well, where is your catch block for this, as any number of exceptions can be thrown by this code, and I have the sneaking suspiscion that you are ignoring them. | |
Re: Of course, that raises the question of why you are using threads. I mean, if all the main program (or the thread that started that other thread) is going to do is wait until the other thread is finished, then the thread is nothing but extra overhead. | |
Re: [url=http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html]A ToolTip?[/url] | |
Re: Your first mistake is making this a scriptlet in a jsp. At the very least use either a Servlet or the sql JSTL tags, better would be to use some application beans. The actual error, however, means that you have an empty field in that row that you are retreiving … | |
Re: loop backwards, currently once you do removeRow(0) the former row 1 becomes row 0, then when you doe removeRow(1) (really row 2 now) the original row 3 becomes row 1, etc, etc. | |
Re: don't use instance variables in your servlets. | |
Re: A long idle time between uses of the statement maybe? If that's case check out the session/connection timeout settings and the like for your db. Otherwise, simply catch the exception, check for this message (or, actually, the error code) and recreate the PreparedStatement. | |
Re: Throw away the scriplet and read the JEE6 tutorials and learn how to do this stuff right. | |
Re: You need to add it to the classpath in the run configurations, or as a library in the project properties. The "build path" is only for compiling, and for that you don't the MySQL driver. | |
Re: By simply catching IOException and using the getMessage method on the exception and the contains method on that String. You can not catch [i]only[/i] that exception, though. If you want to make sure that the rest of the method will still continue if the exception is anything but that, then … | |
Re: Uhm, by defining an "equals(Object o)" method in your own class? | |
Re: I don't see (off hand) your problem, but I do have a suggestion, if you turn your if statement around, then you only have to check one condition each time (rather than two), i.e. [code]if (whatever >= 90) { // A } else if (whatever >= 80) { // B … | |
Re: JSP only has an effect [i]after[/i] the submit, of course. JavaScript is your [i]only[/i] choice. | |
Re: Emp is probably a reserved word. Try surrounding the name in quotes or brackets (since this is an MS produced DB it [i]might[/i] use the Access quoting process, hence the brackets). I.E. [code]"SELECT * FROM \"Emp\"" // or "SELECT * FROM [Emp]"[/code] | |
Re: check the mysql "current working directoy" (although I don't believe it will be there) and try printing the Java program "current working directory" and check there. [code]System.out.println(System.getProperty("user.dir"));[/code] Edit: And I have no idea what this has to do with "making a connection permananet". | |
Re: Because a number, typed directly into the code (i.e a = 15), is an integer. If you want a short, or a byte, or a char you need to cast it. Edit. Also, the "character" for long is L not l. | |
Re: registerDriver is the "old" form. The driver classes are to do that themselves when loaded (the reason for the Class.forName() call). In fact, in Java 6 and later, if the driver implements the Services interface (which it must do to qualify as a valid Java 6 JDBC driver (JDBC version … | |
Re: Then you have [i]not[/i] "included it on your classpath" [i]properly[/i]. [i]How[/i] did you "include it on your classpath" and how, [i]exactly[/i] are you executing this code. | |
Re: If you are working with relatively small amounts of records (in the low thousands in one hit) with a single transaction, use hibernate or some other object representation framework, if you are working in bulk (hundreds of thousands of records or more in one hit), use straight JDBC (or maybe … | |
Re: [QUOTE=jon.kiparsky;1582065]Um, yeah. Brain fail - I was thinking "instance variable" for some reason. Okay, yes, I'm wrong on that one. Thanks.[/QUOTE] It [i]is[/i] still false, however, as it should be "all objects/instances created from the same classloader". Instances created from one classloader [i]will not[/i] have the same reference value as … | |
Re: And the problem would be? BTW, we are [i]not[/i] going to do your (home)work for you. This is your assignment, not ours. We are [i]more[/i] than happy to help [i]you[/i] fix [i]your[/i] problem but we are [i]not[/i] going "to provide the solution ASAP". For that see [url=http://www.rent-a-coder.com/]this[/url]. | |
Re: Are you new to JEE or new to to Java in general. If the first, then, as long as you are capable in core Java the official [url=http://download.oracle.com/javaee/6/tutorial/doc/]JEE6[/url] or [url=http://download.oracle.com/javaee/5/tutorial/doc/]JEE5[/url] or [url=http://download.oracle.com/javaee/1.4/tutorial/doc/]J2EE 1.4[/url] tutorials should be [i]more[/i] than enough to get started. Use the one that is applicable to the … | |
Re: You create three inputs of type submit but with different values, then, in the jsp/servlet that is the target of the action field of the form, you simply look at the value of the submit parameter to decide what to display. | |
Re: Oh man, the deaf leading the blind. I have no idea where this "save it to the bin folder" stuff got started, but here ye, what rubbish. I know, I know, now you're going to come back with, but it works and its better than nothing, so whats wrong with … | |
Re: I'm sorry, but your question is? Is it producing any exceptions? Are there compiler messages? Or is it producing something you didn't expect, in which case, exactly how does the actual result differ from the expected result? And, when you post code, use code tags. | |
Re: Why are only two fields getting inserted into the db? Uhm, bad code? We have no idea what is going wrong as we have no idea what the form (the HTML of the form, not a screenshot) looks like, nor do we know how that is being read and processed … | |
Re: What database are you using? If it is [i]not[/i] Access then use the JDBC Driver meant for that DB, not the JDBC-ODBC bridge, and if you [i]are[/i] using Access, then use a different db. And, if you want to know what the problem is, then don't hide it behind your … | |
Re: Because you cannot call non-static methods from a static context without using an instance of the class containing those methods. i.e. [code]Whatever variable = new Whatever(); variable.someMethod();[/code] | |
Re: cast it (JButton) e.getSource() | |
Re: Edit: Nevermind. I completely misread. Edit Again: Include a read me in your distribution giving instructions to the user in case of problems. I.E. this is a user problem and you should provide [i]support[/i], but don't expect to be able to solve every environment related issue programatically. | |
Re: Google for a third party program for doing this, but it is not recommended. Why take a language meant for creating cross-platform software, and take that exact advantage away by turing the product into a native executable which can then only be run on one platform? | |
Re: HttpURLConnection. Use one to get the listing (you will, of course, also need an HTMLParser for parsing that content), then another connect call with a new URL per file. Google HttpURLConnection and HTMLParser and try a few things out. And, P.S., hopefully the directory is "listable" and the files "retreivable" … | |
Re: Don't do this with a JSP, do [i]not[/i] use scriptlets, at all, in a JSP when it can be avoided, which it almost [i]always[/i] can be, use a Servlet. You can use a JSP to create the form, but the post request should be going to a servlet (the servlet … | |
Re: If you mean whether or not an email [I]address[/I] exists, then send it a mail with a "verification" link inside and wait on the answer. | |
Re: Post the actual stack trace. And I hope the class containing this call does not import a class named "File" (or that its package does not contain a class named "File") that is different from the "File" imported in DirLocator (or from a class named File in its package). | |
Re: No it is not. You should read the mysql user manual (and pay close attention to the part about grants) and give the root login a password (or restrict it to only the unix socket connection), delete the "blank" user account, and create an application user for your application. | |
Re: Because both threads are using the same instance of r1, and so the same "x" variable, but since nothing there is synchronized (except the println which is synched internally) the 22 came out later than you might have expected (and it might not have come out at all since you … | |
Re: [QUOTE=s.w.a] it must be [inlinecode]if (th<T1 && sw1==true)[/inlinecode] [/QUOTE] Actually, it [i]should[/i] be [code]if (th<T1 && sw1)[/code] IMHO I find that "boolean==true" or "boolean==false" completely assinine. Some say it helps "readability". BS, complete BS. If any programmer cannot read "boolean" or "!boolean" there's a problem, and not with the code. … | |
|
The End.