Forum: JSP 1 Day Ago |
| Replies: 2 Views: 126 > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
It seems that you are using a pre JSTL 2.0 URI; in pre 2.0 JSTL, the set action is configured to not accept run-time expressions... |
Forum: Java 1 Day Ago |
| Replies: 3 Views: 143 > Why use abstract classes at all? Why not just declare a class and
> then make sure you never instantiate any variables of that type?
...because compile time checks are far superior/efficient... |
Forum: Java 3 Days Ago |
| Replies: 2 Views: 171 You can either modify the properties of the command window [cmd] to show more than 500 lines [ALT + SPACE + P -> Screen Buffer Size -> Height] or pipe the output of your java program to some text... |
Forum: DaniWeb Community Feedback 9 Days Ago |
| Replies: 3 Views: 294 Consider the possibility of Adatapost giving the green rep for the following content:
No where does adatapost specify that the solution is a *good solution*. Overzealous, much? :P |
Forum: Java 14 Days Ago |
| Replies: 8 Views: 238 Try using the DocumentBuilderFactory instead of explicitly instantiating the parser.public static void main(String args[]) throws Exception {
DocumentBuilder builder =... |
Forum: Java 17 Days Ago |
| Replies: 2 Views: 251 NumberFormat is an abstract class; use its static factory method to get your choice of number formatter.public class MainTest {
public static void main(String args[]) throws Exception {
... |
Forum: Java 18 Days Ago |
| Replies: 2 Views: 375 The commas and the brackets are a part of the ArrayList class's toString() implementation. If you need your own row representation, either write your own method which does so or better yet, create a... |
Forum: Java 21 Days Ago |
| Replies: 20 Views: 558 Use getValues().nextLine().equals("n") instead. The Scanner name is confusing BTW, just name it scanner instead of getValues which is more appropriate for a method name. |
Forum: Java 21 Days Ago |
| Replies: 20 Views: 558 You are comparing a Scanner object with a String object. |
Forum: JSP 21 Days Ago |
| Replies: 4 Views: 909 This doesn't seem to be a JSTL problem since the class missing belongs to the jsp-api.jar library which is a part of the standard distribution [i.e. part of the specification, placed in Tomcat/lib].... |
Forum: Java 30 Days Ago |
| Replies: 16 Views: 887 What's wrong with the getTime() method of the Date class which returns the number of milliseconds elapsed since January 1970 as long? To get the seconds, just divide by 1000. |
Forum: Java 31 Days Ago |
| Replies: 16 Views: 887 > is it possible to loop through the contents of two arrays to populate a
> third array with the combined content?
In my code I'm using looping through two Lists and populating a third list... |
Forum: Java 31 Days Ago |
| Replies: 16 Views: 887 Sadly, this simple a thing becomes pretty clunky to implement when it comes to Java. A sample implementation might be something like:
class YourClass {
private static final List<String>... |
Forum: Java 32 Days Ago |
| Replies: 16 Views: 887 > Does anybody know how I can append to the array
You can't. The best you can do is perform a copy-on-write if the content to be written is more than the initial capacity with which the array was... |
Forum: Java Oct 21st, 2009 |
| Replies: 6 Views: 361 IMO, though the analysis is correct, the solution provided isn't because an Iterator over a collection of elements of type E isn't the same as an Iterator over a collection of elements of type F... |
Forum: DaniWeb Community Feedback Oct 21st, 2009 |
| Replies: 9 Views: 795 Hmmm...insanely strange. If you are talking about the 'Flag Bad Post' link, see it in the attached screeny. |
Forum: DaniWeb Community Feedback Oct 21st, 2009 |
| Replies: 9 Views: 795 Have you tried clearing your cache? Because I can see the 'Flag Bad post' link... |
Forum: DaniWeb Community Feedback Oct 21st, 2009 |
| Replies: 9 Views: 795 I can see both the links. Try clearing the cache using a force refresh. |
Forum: DaniWeb Community Feedback Oct 11th, 2009 |
| Replies: 5 Views: 773 > Can i remove that duplicated post ??
Just report that post using the "Flag Bad Post" option and it should get appropriately handled. |
Forum: DaniWeb Community Feedback Oct 5th, 2009 |
| Replies: 6 Views: 602 Yes, as long as it's not a space, it would work. For a more standardized naming approach, trying replacing the underscore with a hyphen. |
Forum: Java Oct 5th, 2009 |
| Replies: 4 Views: 3,349 There are many good books, blog posts and articles out there for getting started with JEE; your best bet would be the free JEE 5 tutorial (http://java.sun.com/javaee/5/docs/tutorial/doc/)hosted by... |
Forum: Java Oct 2nd, 2009 |
| Replies: 4 Views: 3,349 > also, would this be something to do with JavaEE instead of JavaSE?
Depends on what you need to learn and where your expertise lies, but yeah, nowadays the core business functionality *is*... |
Forum: Java Sep 24th, 2009 |
| Replies: 2 Views: 400 > But in second, I am getting exception that filenotfound.
Because the file "spring.xml" is not present at the root of the class path; you need to state the hierarchy or the path to your config... |
Forum: JSP Sep 23rd, 2009 |
| Replies: 2 Views: 1,018 "Stops running" is a pretty vague description; have you looked at the server logs? BTW, reading this (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/)article might help... |
Forum: Java Sep 21st, 2009 |
| Replies: 10 Views: 1,114 Your second file is missing the class imports. I don't see the declaration of your `Convert' enum class. Your naming conventions are still off.
These are pretty simple error messages to hunt down... |
Forum: Java Sep 21st, 2009 |
| Replies: 10 Views: 1,114 A few observations:
- Always perform resource cleanup in the `finally' block to be rest assured that the cleanup indeed is performed even if the code ends up throwing an exception.
- The way you... |
Forum: JavaScript / DHTML / AJAX Sep 20th, 2009 |
| Replies: 8 Views: 493 Thinking about it in this way might help your cause:
power(2, 3) =>
- 2 * power(2, 2)
- 2 * (2 * power(2, 1))
- 2 * (2 * (2 * power(2, 0)))
- 2 * (2 * (2 * 1))
- 2 * (2 * 2) |
Forum: Java Sep 20th, 2009 |
| Replies: 10 Views: 1,114 >Thanks a lot guys for the help!
Good luck with the remaining exercises.
> I will flag this as solved when I get my account fixed.
Done and done. :-) |
Forum: Java Sep 20th, 2009 |
| Replies: 10 Views: 1,114 Read the contract of the substring method; substring(4, 6) == 2 characters.
Also get in the habit of using uppercase characters for enums i.e. `BIN' instead of `bin'. |
Forum: Java Sep 14th, 2009 |
| Replies: 4 Views: 483 > How do I do that....I'm very new to Java
Steps:
Declare a TreeSet<String> instance variable for your class
Read the file using Scanner
For each line read, create the PublisherRecord... |
Forum: Java Sep 13th, 2009 |
| Replies: 4 Views: 483 > Using the TreeSet class, how do I accomplish this
It's pretty simple; just keep on reading the lines from the text file and add the last entry i.e. the publisher name to a TreeSet<String>. So... |
Forum: Java Sep 13th, 2009 |
| Replies: 2 Views: 635 > I think I need multiple loops to get rid of the commas, dollar sign, and
> end bracket separately.
Not required IMO; a single application of the replaceAll method of the String class on each... |
Forum: JSP Sep 13th, 2009 |
| Replies: 2 Views: 990 You essentially throw away almost all the records read by reading the database entries in the ResultSet loop by not doing anything. If you want to compare the user entered value with the ones present... |
Forum: Java Aug 8th, 2009 |
| Replies: 5 Views: 357 >The Java platform supports a simple, deterministic scheduling
>algorithm called fixed-priority scheduling
Any official links? AFAIK, the JVM specification makes no such claim and leaves the... |
Forum: Computer Science Aug 1st, 2009 |
| Replies: 9 Views: 1,045 >Would Ruby be a good choice?
Yes, given that it's not just another scripting language but a fun language which *has* an enterprise standing. Ruby seems to be living up to its name of a "fun... |
Forum: Oracle Jul 29th, 2009 |
| Replies: 23 Views: 2,427 >it successfully got compiled but did run and gave the following
>errors!!!!
This is no longer a problem with your classpath setting which you were initially facing. Since it's an IOException,... |
Forum: Oracle Jul 29th, 2009 |
| Replies: 23 Views: 2,427 So, you were expecting a MySQL Driver class in ojdbc14.jar? How about looking for that class in mysql-connector-java.jar file? ;-) |
Forum: Oracle Jul 29th, 2009 |
| Replies: 23 Views: 2,427 >This is getting interesting.
I don't think so. :-)
Post the entire command you are using as it is. |
Forum: Oracle Jul 28th, 2009 |
| Replies: 23 Views: 2,427 C:\Test>java -cp .;ojdbc14.jar OracleConnect |
Forum: Oracle Jul 28th, 2009 |
| Replies: 23 Views: 2,427 >java OracleConnect(name of my file)
Read my previous reply; just typing the class name won't do; you have to set the classpath. |