Larry Chung

Ranch Hand
+ Follow
since Feb 02, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Larry Chung

Thank you for the reply Meeta. I had read through that material from Oracle and it is a good resource but somehow I felt like I'm trying to learn a spoken language by reading the dictionary. Also Oracle omitted tutorials on Design Patterns, which is one of my weak areas.
Hi James Peterson. As a holder of an old SCJP certification I wish to upgrade to OCPJP but find that books on OCPJP are as rare as hen's teeth. Before I try out the Exam Simulator, is there anything built into it to help learn and study the upgraded topics. In other words, I don't want to just learn from taking the mock exams. Thank you and welcome to Java Ranch.
Probably what could satisfy Marius is to implement his classes and methods by using Inheritance. He could put all the methods in the Parent class and all his child classes simply call on those methods. Could that be what he was trying to articulate?
7 years ago
Vishal, please show me the output.
8 years ago

Vishal Hegde wrote:When i changed the if loop it worked?? but it makes no sense??




Vishal, of course (U_Name!=Data_Id && Passwd!=Dat_Passwd) will produce "Login Successful" because your ResultSet data very likely has instances when usernames and passwords do not match the entered username and password in the Request. Therefore the boolean logic in the "if" statement will be TRUE. What is the data in your Customer data table? For troubleshooting the problem, I suggest you change the "else" block to:

Then tell us what is your output.
8 years ago

karl czukoski wrote:How would it be done outside the jsp then, in a servlet? can you provide a more detailed explanation? why isn't java code good inside a jsp?



Karl, that is a good question. Java code inside a JSP is not good for several reasons:

1. From a Java developer's perspective, it is very tedious and time consuming to embed Java into HTML. For example, creating a table of database results with a Java-HTML mix as with <td> <%= result.getString("ORD_DATE") %> </td> is a lot of trouble and is a little like hardcoding the data display.
2. From a troubleshooter's perspective, Java code in a JSP can look like a complicated mix of HTML, javascript, CSS and Java. If there is a bug somewhere, it will be difficult to find it among the complex code.
3. From a web page designer who only knows HTML and CSS, the Java looks like some mysterious language. It would be difficult to make display format changes in the future.

Your java in JSP is fine for learning purposes but for easier and advanced development the java in JSP could be replaced with a combination of JavaServer Pages Standard Tag Library (JSTL) tags and JavaBeans.

It is also poor, but all-too-common, practice to use servlets to create data output to the web page. In that case, HTML becomes embedded in Java code, which is difficult to read. By the way, of course you do know that JSPs are automatically converted into servlets by Tomcat and those servlets create the display in the client browser. But you, as the programmer, do not need to bother to see or modify that servlet's Java code. Nevertheless, the principle is the same: Java code to produce output should not be mixed by the programmer with non-Java language such as HTML.
8 years ago
JSP
"All nighters" is one of two all-time delusions of extreme productivity. The other is "multi-tasking". The saving grace is those of us who are self-aware do realize the foul ups we make when we try to do too much all at once. Then there are those team members who are clueless about how their negative work is bogging down everyone else's progress. So, do everyone a big favor and get enough sleep and concentrate on one major task at a time.
8 years ago
Bob,

Thank you for the excellent work in writing a great paper that removes a lot of the tears and fears of OCMJD. It is such a magnum opus that the organization outline you created in your post can also be included in the document itself because it is almost like a book.

In gratitude,
Larry

Won Cho wrote:

One of my favorite instructor told me this phrase.

If your JSP file starts to look like Java, then it should be Servlet.
If your Servlet starts to look like HTML, then it should be JSP.

As 100 others pointed out...accurate response would be to use Servlets to do business logic and use JSP for view. So they really go together like peanut butter and jelly. It's best to use both for what it was intended for... Then again, using Servlet & JSP is 10 years ago... you should consider using MVC frameworks.



That's all a very good rule of thumb to live and program by. However, aren't some if not all MVC frameworks predicated on servlets and JSPs?

Just as an aside, isn't great that we finally can still use 10 year old methodologies if they work well? Other engineering professions have not been repeatedly subjected to "yet another new framework or programming language of the month" as much as software engineering has been. It's said elsewhere in the industry that the only other industry that is more fashion conscience than IT is women's clothes making.

@Glenn Murray
I started working with GWT a few months ago and I have to agree that the question should be "Is JSP still relevant?" I find it hard to imagine how I can create the same Rich Internet Applications (RIA) with JSP as easily as with GWT's much more straight-forward object-oriented Java programming.
8 years ago

thangamani vasanthi wrote:i had completed my scjp exam on 26sap 2010 but til now i did nt receive my certificate what i hav to do?can any one help me



Hi Thangamani Vasanthi,

Congratulations on a significant achievement. I wish you continued success in your career with Java.

I assume you meant that you passed your certification test on 26 September. That has been too long a time to not hear from Oracle. Have you tried contacting them through e-mail suncert_ww@oracle.com?

In another thread Jesper Young had provided a phone listing (phone contacts) that you can try to reach someone at Sun/Oracle to ask about your certificate.

Good luck
$625 per day for just a 4 day course in Spring is more money than most IT workers make in one day! When the price of something mandatory is that high for so little in return then it is a trick to take money from the gullible.
Nice going, Gaz! Congratulations on your high score.

By tomorrow or mid-week you should receive 2 e-mails from Sun. One e-mail will give you your Sun Certification ID and have information on how to register for the Certification Database. If you do not get that e-mail, send a message to suncert_ww@oracle.com to ask about it.

Two to three weeks (or longer if you are not in the U.S.) after you register into the Certificate Database, you will receive in the postal mail a welcome kit containing your SCJP certificate and a small Sun Certified Professional ID card. Your score is not printed on them. If you do not get that package then send a message to suncert_ww@oracle.com to ask about it.
9 years ago

Bipin Jethwani wrote:Thanks Larry, That was really helpful, and got the emails exactly the way you said :-)



I appreciate the feedback Bipin. Congratulations!

9 years ago

Larry Olson wrote: Thanks for the link. Yes, taking the exam again might be the only choice (if you do take it immediately, you would remember the questions and could go through it fast without thinking much - otherwise it could be time consuming).

I managed to score only around 50% (man sitting through the 72 question session is like going through hell - the brain becomes numb after reading the questions that seem to repeat all over again and again . It needs a LOT of concentration and perseverence. Of course the questions are very boring - particularly all the class names and method names that make no sense and all that un-interesting code makes the test that much more difficult. If reading all that un-interesting code and taking the test is so boring - I wonder how boring and un-interesting would it have been for those who framed the questions - kudos to you Devaka on taking such a tough exercise - that needs a lot of determination.

OK, I will stop complaining and get on with more exams I hope the end reward will all be worth it.



I'm sure you figured out by now that you can merely force the ExamLab practice exam to end by clicking the "Next" button 71 times (without answering any of the questions along the way). ExamLab will then definitely report a failed exam but you can then "review" the answers for all 72 questions.

BTW, that's a good observation about a "LOT of concentration and perseverance". After the tough mental training with ExamLab (like I said, it's bootcamp) I was amazed at how the actual SCJP certification exam was easier to sit through than I had expected. The exam room had noises and other distractions for all 3 hours but I didn't need to use the provided noise headphones that the test center provided.
You're right, ExamLab is a great review tool but Devaka had mentioned a "workaround" in another thread about this Problem with ExamLab.

Also, the scores on ExamLab are good predictors of your eventual score in the SCJP exam if you add 25 points to them. So, if you scored a 70 on ExamLab, then there is a good chance you'll score a 90 or 95 on the actual exam. ExamLab is like bootcamp and was just made to be harder than real life.