Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6
This is the forum to discuss the Wrox book Professional Ajax, 2nd Edition by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780470109496
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2009, 10:25 AM
Registered User
 
Join Date: Mar 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default LiveConnect and Server-Sent DOM with JSP

Dear Sirs,

a question regarding chapter 9 (Comet). All PHP and ASP.NET examples work as expected (with some minor corrections, such as adding blah part for ASP.NET and changing hardcoded url locations), but LiveConnect (one example, two files) and Server-Sent DOM (two examples, four files) don't work for JSP version used on Glassfish and Tomcat (all other JSP examples work just fine). What's more important, both servers encountered serious problems when used, browser window started with Tomcat just disappeared without any warning (so much about Tomcat, I was really disappointed). There is not much about two previously mentioned topics on the net, so I am forced to post a question. It would be great if authors of this book can tell which application server they used when they were testing these examples, or are there some additional settings needed for servers?

RSVP,
Dejan
____________________________
 
Old March 7th, 2009, 05:43 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi Dejan,

Sorry you're having trouble with the JSP examples. The examples were tested using Tomcat with all default settings, though that was almost three years ago now. As I'm sure you know, there's any number of reasons why an example won't work: there may have been changes to the application server, there may have been changes to the browsers, your configuration may be different than the one it was tested on, etc.

If you can explain a little more about how you tried to test out the example and what problems you ran into, we may be able to help get you up and running.

(I'll apologize in advance if I don't reply right away, I'm on vacation for the next three weeks and will have limited access to a computer.)
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old March 7th, 2009, 11:57 PM
Registered User
 
Join Date: Mar 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Nicholas,

I will post all the examples from this book on rapidshare or similar in three to four days, so the others can benefit from this. I think this is the best way to save you from long explanations and to prove that I wasn't lying about the errors in book examples. You'll just have to upload them to server with some minor corrections in urls. If this is acceptable for you, of course.
My complaints regarding errors in book examples doesn't mean the book is not good. Actually, every programming book should follow the concept of your book - real-world patterns with some important notes on tricky things, because this is not philosophy, it's programming. It's just that some examples aren't tested at all, like this lacking closing bracket from the beginning of the book or the one that used "==" for comparing pointers. On the other hand, some examples are partially tested, and some suffer from design problems, like Weather widget, where result is incorrectly styled for non-existing zip code (exception should be thrown in this case).

Looking forward to hearing from you,
Dejan
__________________
 
Old March 8th, 2009, 01:07 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi Dejan,

I don't think that you're lying, I believe that you are having trouble getting the examples working. What you need to be careful with is the way you're phrasing the problem. Saying that the examples "weren't tested at all" is insulting to the authors as well as the editors. I personally went through every example to make sure they worked before the book was published, and our technical editor manually goes through every example to double check our work. There may be typos in the book, which happens in many books during the production process, but this doesn't mean that the examples are invalid.

It sounds like some of your complaints are differences in opinion, such as with the design of the weather widget. I can respect that you would approach the problem in a different way, but that doesn't make the approach taken in the book any less valid. There is no one right way to do things, there are multiple right ways.

I'm glad to help you try to get the examples working, but must ask that you do so in a way that is respectful of our efforts on this book. It sounds like you have enjoyed it overall, for which I'm glad, so let's see if we can get the JSP examples working for you.

(Again, just a reminder that I'll be away for several weeks, so you may have to patient in getting a response.)
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old March 8th, 2009, 02:09 AM
Registered User
 
Join Date: Mar 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Nicholas,

sorry for bothering you again, but I'm just trying to clear this while you're still available. When I said I'm lying I referred to Mr. Minatel's statement that there are not so many errors in examples. And I must say that I meant examples, not the book (I didn't say anything about errors in the book, just about examples), because book is just a support, examples are something that matters, as I said. I wasn't trying to insult you and I said that examples weren't tested, not checked (that's how I understand you went through them). I believe that you checked them, but they couldn't have been tested because some of them won't run at all, you will get blank response or won't get requested data from database (in the case of missing closing bracket). Actually, you won't have PHP code compiled at all in this situation.

Design of Weather widget is not a difference in opinion, it's a design inconsistency, because if you set non-existing zip code you will get blank widget with some non-styled and non-positioned text from weather.com xml file, instead of having styled text with picture representing the error (which will happen only if exception is thrown, and since non-existing zip code is not an exception, you will have previously described situation).

If I didn't respect your efforts, I wouldn't try all the examples (all, not just jsp or php). It was a kind of saying thanks for the book. Especially that there are JSP, PHP and ASP.NET examples.

I will also use this opportunity to ask about job offers on your site. I sent you mail on this from your site, but I didn't get your response.

And just one more thing - you didn't answer if you agree about posting all examples on rapidshare or similar, do I have right to do this and would it be acceptable for you to solve LiveConnect and Server-Sent DOM events problem in that way ? You'll just have to compare directories of those examples with examples from Wrox.

Looking forward to hearing from you,
Dejan
__________________
 
Old March 8th, 2009, 04:40 PM
jminatel's Avatar
Wrox Staff
Points: 17,906, Level: 58
Points: 17,906, Level: 58 Points: 17,906, Level: 58 Points: 17,906, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Couple of things:
1. Please don't post our examples/code etc to Rapidshare or other file sharing services. That's a violation of our copyright. If there are problems with the examples or code, we'll work to correct them and post new versions here on wrox.com so everyone who comes to wrox.com can benefit.

2. As Nicholas has pointed out, no one is accusing you of lying and there can be a lot of reasons why the examples worked 2 years ago and might have problems working in some situations now. Writing code that you're going to deploy on your own server and control is hard enough, writing code that thousands of readers will deploy on their servers with their own configurations, possibily different server versions and patches is really hard.

In any event, if you'll hang with us, post the specific errors or problems the current code causes along with as many details as you can about your configuration we'll continue to try to help as we can.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!
 
Old March 8th, 2009, 08:15 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi Dejan,

This will be my last post before going away for a few weeks. I downloaded the code from wrox.com along with Tomcat 6 on my computer. Here's what I found.

For the LiveConnect example:

1) If Java isn't properly configured to be used by JavaScript on your computer, then you'll get an error when trying to create java.net.URL. You should be able to see this error in Firebug or in the Java console.

2) The LiveConnectExample1.jsp file won't work until you modify it to point to the correct URL for your server. It comes with a default URL that must be modified before it will work correctly.

3) This example won't work in IE or any browser that wasn't installed with Java support (all browsers have this option).

4) You should also verify that the connection JSP is working correctly. Navigate to the file LiveConnectExampleConnection.jsp on your server and verify that it outputs new content every few seconds.

For the Server-Sent DOM events example, it appears that something has changed in the implementation, as this example no longer works for me either. I even tried Opera's own example at http://oxzone.opera.com:8088/ and it won't work. I'm afraid I can't be much help for this one. I can verify that this example worked when the book was released (I had a lot of fun playing with it), but I can't really be sure why it's not working now. It may be worth contacting Opera support about this: http://www.opera.com/support/.

I hope this helps at least with the first example, sorry about the second, that's very disappointing.
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old March 8th, 2009, 10:16 PM
Registered User
 
Join Date: Mar 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Nicholas,

it's 2.20 AM in my country now, and I've just solved both problems. What's more important to me is that I lost another day, which makes a total of three days for these two problems only. There were also other problems that I might mention one day related to source code which is not working (because it is not tested).

All the things you wrote I already know, and I want to remind you that I wrote in my first post of this very thread about changing URLs (part of the sentence "with some minor corrections, such as adding blah part for ASP.NET and changing hardcoded url locations"). I wrote that on March 3rd, 2009 08:25 AM in this thread. Furthermore, I also added in the same thread that all the other examples (including JSP examples) worked as expected, so I must have known all that you wrote in order to make all other examples work.

You can figure out what the problem is with LiveConnect and Server-Sent DOM events if you change contentType (temporarily) for files serving as connections (LiveConnectExampleConnection.jsp, ServerSentDOMEventsConnection.jsp, ServerSentDOMEventsClicks.jsp) to text/html, do the same for PHP or ASP.NET (since those examples work correctly, with some minor change in ASP.NET (stuff:blah should be added)), save their response as "html only" (everything is done in Opera, of course), and compare those files in NOTEPAD, not WORDPAD. After that, you'll know what should be changed in order to make everything work. I will not tell you exactly what to do to correct the examples, because you didn't tell me the truth.

No one tested some of those examples (including LiveConnect and Server-Sent DOM, and there is more), I already tried to explain that in my previous post. There are no mysteries here, nothing has changed in implementation. And I think you should know that I was actually working on low level, system programming, assemblers and compilers. I'm also about to earn my Phd, very soon I hope. Which means that I am competent enough to solve this kind of problems. The problem is that book should serve this purpose together with related source code. There are many people who can read documentation and make their own examples, but this would mean they will unnecessarily lose their time. And that's where books jump in. I start reading book in order to save my time and to learn from someone who already knows that, as fast as possible. That's the purpose of books. Don't be led by the wrong impression that everything is alright if no one is posting about the problems. Maybe they are stupid, lazy or from some country which doesn't have tradition related to technical knowledge. Maybe they are just working very hard, 15 hours a day and more, every day, even weekends, in order to hide how stupid they are. This is happening, all the time. I had a chance to work with this sort of people. Take this wuman guy you answered his questions recently. He is posting question about JavaScript basics on Ajax forum. If he doesn't know that already, what is he doing in the world of Ajax. Also, I am losing my time reading idiotic posts like his. Moderator should have removed all the irrelevant posts. Or like this clown Albert (from this forum), who said that "book doesn't seem to answer his special needs" (yeah, right, of course they are special). Programming is not for everyone, or you will have design problems in release phase. Very familiar situation.

Therefore, I decided to clear this. If you don't tell me who was resposible for the source code I downloaded from wrox site and why this wasn't tested properly, or tested at all, I will write to higher instances of wrox about this. I must know who is responsible for three days of my life (and more than three days).

I also wanted to use this forum for small advertising. If someone of people who read this wants my expertise, and I hope I proved that I have a certain level of it, please leave contact information (skype account or such, elance or similar) in one of my threads (user : miskovic) on this forum. I hope the owners of this forum won't mind about this. After all.

RSVP,
Dejan
___________________

Last edited by miskovic; March 9th, 2009 at 02:30 AM..
 
Old March 10th, 2009, 03:21 PM
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I found this thread while searching for server-sent DOM events. I was going to leave at first, but I decided it was worth it to create an account and reply. miskovic, you are an [edited], and you need a lesson in manners.

First you say you have evidence that you were purposefully being ignored. I doubt you were purposefully ignored, and I doubt your "evidence" means anything. I looked at the threads in this forum. Before wuman's post, which was made on the third of this month, there had not been a question posted since November 2008. Five months is a long time, and I doubt anyone is going to check a low traffic forum very often. Especially if no one is under contractual agreement to do so.

Second, wuman's questions were in regard to examples contained in the book. His question could hardly be labeled as basic. Anonymous functions and some of their usages are advanced techniques. JavaScript is a complex language, and I do not think you are an expert in it. If you are, where is your book? I suggest you cease your criticism of other people's understanding of the JavaScript language until you have authored a published and understandable book on JavaScript.

Third, the author downloaded the provided code examples, installed the appropriate software, configured said software correctly, and tested the examples you have problems with. He told you exactly what you need to do in order to get one of the examples to work, and he goes on to tell you that he can't get the second example, which he knows worked for him three years ago, to work. Instead of saying "thank you for your time", you call him a liar. How disrespectful. Someone took their own time to help you, and you spit in his face when he gives you the answer. [edited].

Lastly, and this is what prompted me to reply, you claim to be an expert in this field and in the process of acquiring a doctorate degree. Yet you could not solve your problems last week, and it took you at least three days to solve it on your own. The problems were simple examples from a programming book. One of the problems, as mentioned in the author's post, merely required a properly configured environment, and your genius failed to even solve that. Then, after calling people liars, stupid, and clowns, you have the gaul to "advertise" your "expertise" and your so-called business. That is just hilarious, and I pity you.

I hope you come to the realization that you are an [edited] and that you do something to change that. If you are not willing to change your [edited], then at least act like you changed. Then you would find that people would be more responsive to you, want to work with you, answer your questions, and provide help which you so obviously need.

Last edited by jminatel; March 10th, 2009 at 03:34 PM.. Reason: abusive language
 
Old March 10th, 2009, 03:36 PM
jminatel's Avatar
Wrox Staff
Points: 17,906, Level: 58
Points: 17,906, Level: 58 Points: 17,906, Level: 58 Points: 17,906, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Throp: While I appreciate your passion in defending the book and the authors and setting the previous poster straight, I have a zero tolderance policy for abusive language and a couple of comments crossed the line so I edited. I hope you'll understand and I do hope to see you back in the forums. Thanks.

At this point, I think it best to close this thread. I think everyone involved should take a deep breath and if there are still substantive technical issues to discuss in a few days or weeks, repost new questions then.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!




Similar Threads
Thread Thread Starter Forum Replies Last Post
jsp with sql server 2005 anandchhetri JSP Basics 0 August 13th, 2008 12:23 PM
SQL SERVER 2005 + JSP sobiaa SQL Server 2005 0 October 11th, 2006 03:29 AM
JSP Server vl4dd82 JSP Basics 1 July 1st, 2005 12:30 AM
How to connect to sql server using jsp method Java Databases 2 March 23rd, 2005 08:44 AM
about JSP and oracle server qiezi Oracle 1 August 19th, 2004 11:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.