Paul Ryan

Greenhorn
+ Follow
since Oct 31, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Ryan

Raghavan Muthu wrote:

Paul Ryan wrote:Would the Headfirst Servlets book not be a little outdated?



Yes and No.

Yes -- due to the fact, if I am not wrong, HFSJ book is not upto date to cover Java EE 6/7.
No -- because the core concepts behind Servlets and JSP were never changed rather few additions are introduced in the later versions.

So, in my humble opinion it would still be the best bet!



Yeah I agree, decided to purchase the book there as my servlet knowledge is embarrassingly poor.

Thanks for the reply
8 years ago
Sorry about that. Thought I included it. Here it is anyway screen shotted.
8 years ago
Would the Headfirst Servlets book not be a little outdated?
8 years ago
Hey guys,

I am following along with a tutorial on pluralsight on Spring MVC. The tutorial is great but there is one thing now that is kinda bugging me, its not so much a problem but I just find it strange. So basically I am creating a FitnessTracker app (app in the tutorial) and just for testing the application made a HelloWorld servlet.

So there is only one class which is HelloWorld.java


Then there is also a hello.jsp page


So here is the little bug, when I fire up tomcat to test the servlet as he does in the tutorial. he uses the url http://localhost:8080/FitnessTracker/greeting.html and he gets "Hello World" on the screen where as I get a HTTP Status 500 - Servlet.init() for servlet fitTrackerServlet threw exception.

For me to get the HelloWorld screen I leave out the greeting.html which is the url http://localhost:8080/FitnessTracker/ and then I get the correct screen.

So my question is what is causing my url route to be different to his when the code is the exact same?

Thanks in advance.
8 years ago
Hi guys,

For the exam (1Z0-803) are we expected to know these numbering systems (Binary,Hexadecimall) or are we just suppose to know what prefix is used for each? (i.e. 0B or 0b for a binary value)

Thanks
Cool,

Thanks a lot Claude, will definitely use the advice you gave me.

Thanks again
Switched over to eclipse and adding the jar to the build path and problem has been fixed. Thanks for the advice. Just one more question, when you say separate data access logic from GUI frontend do you mean put anything related to the database into a different package?
Yeah you're probably right, a test console application will be easier to establish a connection.
Your best bet is to look at the site, they break down everything if thats what you mean by "schedule"
9 years ago
Hey guys,

Been trying for the last couple of hours trying to connect to mysql database with no luck. I have the port number right but it is still not connecting. Heres the code:


This then brings up a user screen but when I click log in (no matter what I put in the text fields) I get this

ant -f C:\\Users\\Paul17\\Documents\\NetBeansProjects\\LibraryApplicationProject jfxsa-run
init:
Deleting: C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\build\built-jar.properties
Compiling 1 source file to C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\build\classes
compile:
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from C:\Program Files\Java\jdk1.8.0_25\jre\..\lib\ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:deploy> task from C:\Program Files\Java\jdk1.8.0_25\jre\..\lib\ant-javafx.jar
jfx-deployment-script:
jfx-deployment:
jar:
Copying 12 files to C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\dist\run1191448749
jfx-project-run:
Executing C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\dist\run1191448749\LibraryApplicationProject.jar using platform C:\Program Files\Java\jdk1.8.0_25\jre/bin/java
SELECT * FROM student WHERE USERID= '' AND PASSWORD= ''
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3307/student
Deleting directory C:\Users\Paul17\Documents\NetBeansProjects\LibraryApplicationProject\dist\run1191448749
jfxsa-run:
BUILD SUCCESSFUL (total time: 6 seconds)



I have added a screen shot of the mysql databases view in netbeans.

Any help would be greatly appreciated.

Thank you.



Thanks for all your help so far Winston. Would this be a better way of increasing the array size essentially giving the user the power to decide how big the array is :



And for the ordering I have been searching around all morning to see how to completely take out an element but I was giving the impression that you can only delete from an arrayList. How would I go about shifting all the elements. My output so far is this:
Johnny Jones, Paul Ryan, Ryan Paul, Paul Jones, Student 1, Student 2, Student 3, Student 4, Student 5,
Number of students before deleting Paul Ryan 9
Paul Ryan is deleted
Number of students after deleting Paul Ryan 8
Output of array now that Paul Ryan is deleted
Johnny Jones, null, Ryan Paul, Paul Jones, Student 1, Student 2, Student 3, Student 4,


I would really like to get rid of that null value.
9 years ago
Ok so this is how I am using the second array: (edit: Is this the replacing the old array you were referring to Winston?)


So bigStudents is called when students can't hold anymore and this is what i did to ensure bigStudents can never be full


I put students.length+50 just in case multiple students were created at the same time.

Ok so now my question is when I am calling my dropStudent method which is:


I should use students[i].equals(student) and shouldn't use bigStudents here. Is this correct? Please correct me if I am wrong.

Thanks for all the help so far guys.
9 years ago
Sorry I wasn't ignoring I was just trying to get it to work. No it was returning 3 in the test class. I did this to handle the overflow but surely there is a better way



As you can see I now amended the addStudent() method to copy all the values to the bigger array. I used +50 on the bigStudents() array just to be on the safe side.

(note that I set the original arrays size to 2 so that I could test inputting five objects)
9 years ago
Ok so the question states that I should improve it to automatically increase the array size by creating a new larger array and copying into the contents into it. So I did this



But my problem here is how do I implement this and this isn't really automatic but I think this is what the question is suggesting I do.
9 years ago
Yeah I tried this but it gives me an out of bound exception.

9 years ago