Dan Rh Jones

Greenhorn
+ Follow
since Aug 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dan Rh Jones

Afternoon

I have tried to do the new BeeServlet example on
http://www.javaranch.com/drive/servlet/index.jsp#reverse

Everything compiles ok and I have jr.jar in
/usr/local/apache-tomcat-7.0.30/Home/lib folder

I have put the class file in /BeeServlet/WEB-INF/classes/com/javaranch/drive
the jsp is in /BeeServlet

I am getting a 500 error though.

I have googled this and the general consensus is that I am missing a
jar. And that is where I get stuck as I think I have what I need in
the correct place.

Again any pointers are greatly appreciated.

Thanks

Dan

11 years ago
Thanks

I'll give that a bash in a while

Cheers

11 years ago
Hi

I am a bit baffled as to how I should be puting files for the reverse (and onwards) assignment for Servlets 2

This is how I have my folders and file at the moment.


and this in the reverse.html

<form method='post' action='Reverse'>

it ain't working.

So my question is... where should the html sit and what path should I use in the action= bit?

I assume that it makes no difference if I use OSX? a path is a path?

Cheers

Dan
11 years ago
Hi Phil

Just sent a PM to requesting a copy of the instructions you wrote for Tomcat

Many thanks

Dan
11 years ago

K. Tsang wrote:For sorting first names, did you use the Collections.sort(nameList) approach? Without giving the answer, is there another approach to sorting to the first name? If you know the answer to that, your last name sorting will be a cake.

Oh for your question, arrays will just make it more complicated.



Only just had chance to look back at this.

I did use Collections.sort(nameList) and I dont know what other approach there is. Unless you mean implement Comparator, which is what I thought about doing in my OP when I said should I create a Name class.

Any other hints would be greatly appreciated.

11 years ago
Name class scrapped!

I know the split method, but not sure how to use it in this case.

Would have I have to create an array for each name in the text file and then do some magic to compare each array?



The assignment says not to create a second list, so if its not multiple arrays, (which isn't very scalable (should we care about this at the moment?)) then I have no clue how to progress! (again)
11 years ago
I am at a lose as to how to procedd with OOP-3 SortNames.

I am able to sort by first name easily enough but sorting by the surname is proving too much

I thought that perhaps I should implement a new Name object that has first and second names as attributes and then have setters and getters.

then do something with getting all the last names on the Name objects and ordering that

Is this something I should go for? Am i going on the right direction? Is what am I thinking even possible?

I am pretty much stuck at the moment and any advice is greatly appreciated.

11 years ago
(Haven't reproduced all of the code as it is for the Java ranch assignments)



produces the following error:

readFile(java.lang.String) in SortNames cannot be applied to (java.util.List)
for (Object string : readFile(blah))
11 years ago
Hi all

Another question.

I am not sure what to search for about this. My google-fu is not strong.

I want to be able to call one method using another method. However, when I do this (code below) I get a "cannot find symbol" error.

Is what I am trying to do even possible?



Cheers

Dan
11 years ago
Afternoon

I am a little stuck on something.

The code below is from something I am writing for the Java Ranch. OOP-2 NaturalLanguageMultiply

Given a string, I need to be able to check if that string is in my hashmap and if not then throw an exception

This works fine and dandy if I have a string that creates two elements in the array (String number = "two-three";) but if it only has one, (String number = "three";), I get a ArrayIndexOutOfBoundsException



I am stuck! Any pointers on how to do this?

Cheers!
11 years ago
.. To Katrina

Thank you for getting me through assignment 4b. I was tempted to give up many times, but you saw me through it with help and advice and lots and lots of nit picking.

Looking forwards to rest now!

Thanks again

Dan
11 years ago
Alfred on the Mac and Launchy on my work windows machine.

Both pretty awesome
12 years ago
Hi,

I am looking at one of the assigments I have coming up, Grains, and it says I will have to search the Javadoc for the correct class to use.

The link is to Java 7.

So should I be using Java 7 for the Cattle Drive or am I ok with what I have atm?

Or should I just upgrade anyway?
12 years ago
Completed up to 4a Say. 4b in as soon as I can get my head round it and time to do it!
13 years ago
Only just been able to take a look and it was that

Thanks!
13 years ago