Jeremy Medford

Ranch Hand
+ Follow
since Jan 16, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jeremy Medford

Back in the saddle!
Just submitted JDBC-2b, 4th attempt!

Jeremy
13 years ago
Ha! That was the trick.
I could have sworn I had done that before and it didn't work.
Well either way, I understand now and am getting the desired results.

Cheers!

Jeremy
13 years ago
Hi Ya'll,

I have a fairly simple question that may be a little difficult to explain. But I'll give it a try.

When specifying properties for Jenny (The JDBC Facade library), you must specify a Destination and a Package. The descriptions for each are as follows:

Destination:
# Base directory where the generated files will be put.
#
# Everything in this directory will be deleted when Jenny starts. Then the generated facade class and all the
# generated table classes will be created here, in a subdirectory appropriate to the package.
#
# Make sure you include the trailing slash.
#
# This property is required.

Package:
# The package name to use at the top of all the generated files.
#
# This property is required.

When I compile using the following properties I get a strange directory structure:

Destination=src/java/com/javaranch/drive/db/
Package=com.javaranch.drive.db

Resulting directory path:

src\java\com\javaranch\drive\db\com\javaranch\drive\db

Resulting Package description at the top of generated Jenny source files:

package com.javaranch.drive.db;

It appears to be taking the Package and adding that on to the Destination. But the comments state that the Package property is only for the bit of text at the top of the generated files. And of course when I try to compile my java code, I get errors saying 'cannot find symbol' for the classes in that package.

Is there a bug in the Jenny code?

- Jeremy

13 years ago
Sounds like a great opportunity!
I'm interested as well.

Best,
Jeremy
13 years ago
Try this:
C:\Users\name\Documents\My JAVA SE\java MyFirstApp
14 years ago
I believe one of the primary reasons for the Wrapper classes is the case when you need to treat a primitive like an object. Prior to Java 5.0 you had to manually put a wrapper around a primitive you wanted to store in collections like ArrayList. They only store objects and prior to 5.0, this wrapping was not done automatically ("autoboxing").

Like the previous post, primitives don't require you to instantiate an object.

Hope that helps.

14 years ago
Hi,

I'm not an expert in Anrdroid, but I had a couple of thoughts on this.
Why do the Timers need to be separaate Activities? I believe that when you go to a new Activity, the onStop() method is called which essentially halts whatever is happening in that Activity.

What about trying separate Views where each new timer is inside a custom view? Perhaps even part of a List?

Just some ideas.

Regards,
Jeremy
14 years ago
Hi All,

I'm getting back into the saddle here after a few months out to pasture and had a couple questions regarding Servlets 4b.
It mentions the method to retrieve values from a Cookie. But, the instructions do not mention what we should do with this value.

Are we supposed to compare the value of the cookie to some expected value? In this case it is a password. But the only way to do that is to store the password as a string when it is entered. I thought it was not a good idea to store passwords in this way.

Am I missing something or did you have something different in mind?
14 years ago
Thank you Paul for getting back to me!
14 years ago
Paul is my nitpicker.
I resubmitted twice.
14 years ago
Howdy!
Not to be annoying or pushy, but I was just wondering if anyone was home at the ranch?
It's been over two weeks since I submitted my latest attempt at Servlets 4a.
I have almost forgotten what I was doing.

I am so close to getting another moosehead!!

Thanks for all the nitpicking!
14 years ago
Thank you for that. Sorry I wasn't specific, but you were right.
I'm just getting started with JSP and Servlets.
Funny thing is after I read your response, I saw what should have been completely obvious in my Servlet code...I now ensure that the attribute is never null.
14 years ago
JSP
Hi,

I've recently been told that the following is something to be avoided.

The trouble is, it is possible to arrive at this JSP and have myAttr be null.
Should I look at making myAttr not null?
But what if I don't want to display the contents of myAttr unless it is valid?

Thanks in advance.
14 years ago
JSP
Carol,

Yes! After I matched the 'name' of my submit button to the appropriate addActionHandler, I started seeing the Video added to the list! And, my initial link to the list from index.html does not display any empty Video table rows! It's a thing of beauty.

I appreciate the gentle nudges. Now I can move on.

Jeremy
14 years ago
Thanks for your help!

They seem correct.

From index.html:

From addvideo.jsp:

From listvideo.jsp. This one behaves correctly every time:

And, once again my init():


Could there be some stale files hanging around in the deployment location?


14 years ago