juliane gross

Ranch Hand
+ Follow
since May 30, 2002
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by juliane gross

Carol, the ants will be over me shortly. (Grrrr!)
Meanwhile I need to work on a second attempt for Servlets-3a. Funny list you seem to have (or not to have) for updating the assignment log!
19 years ago
In the 2nd example code of BeeServlet we have in method init():


I do not quite understand what the first parameter ("default") is doing exactly.
In the API I read:

actionKey - The text that will be sent in the servlet parameter to kick off this action.



I think that init() starts class Default which then runs it's doAction() method. But what could class Default then do with param "default"?
Or would servletData be able to do something with it? And if yes, what??




Thank you for any enlightening hints!
19 years ago
Thank you! Looking forward to being around here again!
19 years ago
... to Assignment Servlets 3b?
I haven't been around for a while, and now I see that Servlets
Assignments have been changed. I ought to continue with Servlets 4b,
but it probably helps to have done the new Servlets 3b, 4a?
I also would like to try the MVC2 and Ant stuff.
So my question: my I return, restarting from Servlets 3b?

[ August 02, 2005: Message edited by: juliane gross ]
19 years ago
I understand the error message, since the getConnection() method never learns about the existence of table BOOK.
I probably need to adapt the getConnection syntax for multiple table queries, but don't know how.
Thank you for any tips!

Juliane
The error message is:

Hi,
I am using Derby (cloudscape) embedded in a Swing-Application.

My question:
How can I process a query similar to this, where I have references
to 2 tables in the same query:

"SELECT Person.Author, Books.Title, Books.Year
FROM Person, Books
WHERE Person.ID = Books.ID";

It seems like Derby lets me connect to one table only at a time.
I searched the Manual and Reference script thoroughly but in vain.
I know that queries like the one I mentioned above are possible,
because I saw similar examples in the reference book, but they did not
show the according connection code.
I suspect the connection code must be different, but how?

Here is, how I query data from one table only, which works fine:

(My tables are within one Databasesystem (DBSytem.Books, DBSystem.Person etc.)).



Any help is very much appreciated, thank you!

Juliane

[ February 12, 2005: Message edited by: juliane gross ]
[ February 12, 2005: Message edited by: juliane gross ]
Hi David,

the bad news is,that in a Hashtable you can store one value per one key only.
If you for example put in a value under a same key which was already used, that former key-value-pair will be overwritten by the newly made input.

The good news is, that you do store Objects in Hashtables.
So for example, you coud put in this:


If you need to get back your many things, you just call:


(Don't forget, you always have to cast back your objects to their previous shape.)

An other very cool thing with Hashtables (and their related collection classes) is that you can store in them even whole other classes, interfaces etc. This can be very powerful.
19 years ago
Thank you for your suggestions, Joe and Anand.

Meanwhile I found out the cause (I post it for everybody else
encountering a similar feature):

I had set the screen size explicitly (as opposed to using frame.pack())
and also used the method BorderFactory.createEmptyBorder() with
fixed numbers (for distance from top, left, bottom, right) for some
gui elements.

On a screen having height=1024, width=1280 the gui looks fine,
but on a screen having height=768 and width=1024 my buttons got
invisible because of the fixed createEmptyBorder: the
given numbers were too high on a smaller screen.

(By the way: this is how to find out the user's screen size


Using frame.pack() made the buttons visible again, or,
using different numbers for creating empty borders for
different screen sizes.
(How to solve this in a elegant way is a different chapter, though)
19 years ago
My java swing application shows it's Buttons nicely on my Linux System (where I developed it).
Then I transferred the app. via jar-file to Windows98.
There the labels are displayed but not the Buttons.

Any idea what could be the cause?
Thank you!
20 years ago
Hi Edward,

I don't know of a good java open source internet browser to embed,
but if your goal is to open the user's browser, check out
the free Java Utilities classes by Stephen Ostermiller:
here

His Browser class opens a browser from an application on Windows, Unix, or Macintosh.
20 years ago
try this in your manifest file:

Class-Path: jh.jar myhelp.jar

a helpful link ybout manifest files in general could be this:

Sun-Tutorial (about manifest files)

hope that helps
20 years ago
thank you, Stefan.

For anybody else having this problem:
I found the answer in the Java advanced forum

here

it was a problem with the manifest file.
20 years ago
I built an application with embedded Derby (cloudscape) database.
It runs fine as long as I don't try to make a executable JAR file.
Then I get this error message:
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

(The program parts which don't use the database still run fine).
Derby (cloudscape) needs the derby.jar to find its EmbeddedDriver.

How can I tell my jar'ed app where to find the Driver? Do I have to
put derby.jar in a special place in my app's jar file structure?
Or redo my classpath somehow? (But why, if derby.jar is found by
my app in a not-jar'ed way?)

I am very glad about any tips and help,
thank you!
Juliane
20 years ago
Thank you, that helped!
20 years ago