Tim Moores wrote:Seeing the full error message and stack trace would help.
Is the missing starting square bracket just a copy/paste mistake?
Dave Tolls wrote:You are already checking for whether the User is logged in, so that covers part 1 (if the User is logged in).
Your NoteDetails should be expecting a parameter (noteId).
So that's part 2. Get that parameter from the request. If it doesn't exist (or is not an int) then redirect to MyNotes.
Part 3 is actually getting the Note that's been requested.
Get part 2 sorted and you can move onto part 3.
Bear Bibeault wrote:OK, I'll copy this to the IDEs forum. Running a web app from an IDE is its own ball of wax.
Bear Bibeault wrote:How are you running the servlets? Through an IDE?
Bear Bibeault wrote:Where are you putting your .class files?
Paul Clapham wrote:
John nava wrote:also , im thinking that the example should go like this
An example: if b = 4/5, then you should calculate f(1/2)+f(1/3)+f(2/3)+f(1/4)+f(2/4)+ f(3/4)+f(1/5)+f(2/5)+ f(3/5)+f(4/5)
Yeah, that's probably a good place to start from. My first try would be to split that into f(1/5)+f(2/5)+ f(3/5)+f(4/5), which are the addends which have d-sub-k = d-sub-b -- and f(1/2)+f(1/3)+f(2/3)+f(1/4)+f(2/4)+ f(3/4), which are the rest. The first part is a different recursive function, and the second is the same as the original summation only with d-sub-b reduced by 1 (the original was 5, but now you've reduced it to 4). I have to say I'm dubious that this process will work correctly though, I have the nagging feeling it's going to miss something. But it's a start anyway.
Paul Clapham wrote:Well, putting aside my griping about the details, what you need to do first is to write that summation in terms of some function of d-sub-b plus the same summation applied to d-sub-b-minus-1. The first part might also be a summation, and the termination condition of the second part happens when d-sub-b is 1.
I just spent a minute trying to do that, and I have to say that it looks a lot more difficult than division (although I haven't tried the functional programming version of division of fractions so I could be wrong). Anyway so far what you have doesn't look helpful to me, but I think that's because you started programming before you knew what your program should be doing. So slow down and figure out what needs to be done first, before you start typing any code.
Paul Clapham wrote:I'm lost too, because I don't understand the instructions. Nothing in the definition of the function says anything about the possible values of n-sub-k. So I don't see why f(1/3) and f(1/4) and f(2/5) and so on aren't part of the sum to be calculated. Perhaps something elsewhere in the book talks about that?