jwenting 1,905 duckman Team Colleague

1) define table structure
2) learn about jdbc
3) create a decent architecture for your persistence layer
4) decouple the persistence code out of your existing application
5) replace the calls to the decoupled persistence code with calls to the new persistence layer

jwenting 1,905 duckman Team Colleague

gave in to his demand to create a new forum for spammers to have a good time in...

jwenting 1,905 duckman Team Colleague

You fail. That's not an applet, and it's not Java. It's BASIC written in Java syntax.

jwenting 1,905 duckman Team Colleague

Not going to read all that code to try and figure out what "runtime errors" you're getting.
Post the exact errors, why you think they're happening and where, and maybe we'll tell you if you're right.

jwenting 1,905 duckman Team Colleague

don't do database access from jsp, use a servlet instead.
and it will insert the data just fine, the database is just discarding the insert because you never commit the insert.

jwenting 1,905 duckman Team Colleague

but goto is deprecated in java. its not recommended to use goto

Wrong. So utterly wrong I can't begin to describe it.
Goto is NOT deprecated.
It is a reserved word that was never implemented.

This was done quite deliberately because there's never a need for goto.
Any programmer who thinks they need it have serious design flaws and need to rethink their architecture, start to learn programming Java rather than Basic.

Loops, methods, etc. are where it's at, not random jumping around in code.

jwenting 1,905 duckman Team Colleague

sounds like you need to read the manual of the tool you're using rather than expect someone else to do that for you.

jwenting 1,905 duckman Team Colleague

no, we can't.
Read the posting guidelines, code without proper formatting and code tags won't be looked at.

jwenting 1,905 duckman Team Colleague

You have no Runnable instance attached to the Threads.

jwenting 1,905 duckman Team Colleague

And please be careful in your problem description.
You're not calling an applet from a servlet, you're including an applet tag in the output generated by a servlet.

jwenting 1,905 duckman Team Colleague

doesn't matter. Just introduce a switch somewhere that opens or closes a gate :)

jwenting 1,905 duckman Team Colleague

synchronise on the counter

jwenting 1,905 duckman Team Colleague

They can get licenses, if they wanted to bother.
But most of your part of the world is awash with your attitude that you shouldn't have to pay for things so they use all pirated software and stolen documents.

jwenting 1,905 duckman Team Colleague

no need for anyone to steal your idea, there are only a few hundred such games online already.

jwenting 1,905 duckman Team Colleague

There is no webasite that's going to give you the design of a specific kind of system like that.
And there are TONS of resources available about all the possible technologies you could employ, if you bother to look for them and think just a little bit about what you're going to need.

Don't expect iow there to be some sort of "how to create a telecom billing system in 24 hours" type of book or website.

jwenting 1,905 duckman Team Colleague

Remember that Strings are immutable.
What you're doing is creating a new String where "this" is replaced with "that" and then immediately you throw that String away, leaving the old one in the array.

What you are looking for is something like

array[i] = array[i].replaceAll("this", "that");
squigworm commented: Very Very Helpful !!!! +1
jwenting 1,905 duckman Team Colleague

So you want full design documentation for such a system for free that we spent months developing with many people?
Exactly the same thing as asking for the complete source code.

Go do your own work, or tell your boss that you're incompetent and were hired under false premises and should be instantly terminated.
If you do that you MIGHT prevent the lawsuits for damages that would otherwise surely follow and haunt you for years to come.

jwenting 1,905 duckman Team Colleague

Or are you perchance just another crummy link spammer drawn here by the site policy to encourage spammers?

jwenting 1,905 duckman Team Colleague

Or one that took a group of dozens several years to build at the cost of many millions?

jwenting 1,905 duckman Team Colleague

No, plagiarism is you USING the document as your own. Theft is you giving something you don't own to someone else -- sort of. It's definitely not plagiarism.

No, he wants me to plagiarise it by handing him part of the text to which he no doubt won't give attribution.
He assumes I'm going to steal that text for him so he doesn't have to.

jwenting 1,905 duckman Team Colleague

and which shows the complete disconnect between what punters are taught in school and the real world...

jwenting 1,905 duckman Team Colleague

no, plagiarism is me handing you part of a text created by someone else.
It's also intellectual property theft.

Go buy your copy, see it as an investment in your future.

jwenting 1,905 duckman Team Colleague

in fact it's impossible to "validate an email address" using just a check of its content.
Not only does it inevitably yield a lot of false positives, it will also yield false negatives as noone ever takes into account all possible protocols and variants.

jwenting 1,905 duckman Team Colleague

no, noone should plagiarise that document for you and commit intellectual property theft in the process.
If it's really for your "master's thesis" you should know you're not supposed to commit plagiarism and IP theft and that you're not supposed to do it.
You would also have a research budget available to you from which to draw funding, and almost certainly a university library containing documents like the one you're looking for.

jwenting 1,905 duckman Team Colleague

validation rules are invalid, solution rejected.

jwenting 1,905 duckman Team Colleague

1st fundamental flaw: blaming your teacher.
2nd fundamental flaw: claiming to have studied yet clearly not even grasping the basics.

jwenting 1,905 duckman Team Colleague
jwenting 1,905 duckman Team Colleague

Well at least you didn't mention premature optimization.

not explicitly, but it was certainly implied.

jwenting 1,905 duckman Team Colleague

You won't find any "How to write an IDE in 24 hours" kind of book.
Rather you'll have to figure out what skills you need and search for dedicated material for each of them.

jwenting 1,905 duckman Team Colleague

what's wrong with it to start with is the lack of code tags and formatting. Everything else is irrelevant as that means the code won't get read.

jwenting 1,905 duckman Team Colleague

read the JDK documentation

jwenting 1,905 duckman Team Colleague

I wonder what your (former) employers would have to say about you taking all the code you wrote for them and storing it for future use in other projects they're not getting paid for.

jwenting 1,905 duckman Team Colleague

"refuses to work" is neither a runtime nor a compile time error.
What error are you actually getting (if any)?
And if none, why do you think you're getting none?

jwenting 1,905 duckman Team Colleague

The ONLY way is through extensive experience using them.
I doubt anyone knows every method and field in every class of even the core API and knows its correct usage.
And if such a person exists no doubt that knowledge is purely academic and he has no clue as to how to actually apply it to real world situations.

jwenting 1,905 duckman Team Colleague

no help for multiposting homework kiddos

jwenting 1,905 duckman Team Colleague

not urgent

jwenting 1,905 duckman Team Colleague

not urgent. And no help for multiposters.

jwenting 1,905 duckman Team Colleague

not urgent.

jwenting 1,905 duckman Team Colleague

Unfortunately, you will require a submit button to send the value to a jsp page.

No, you don't.
You could have some javascript submitting the form without the need to press a button, say on exiting the input control.

jwenting 1,905 duckman Team Colleague

might be possible, but why do that at all when you could just use their web services API and call that directly, parsing the results?

Search for it :)

jwenting 1,905 duckman Team Colleague

That sounds suspiciously like you're having some problems relating to the built-in firewall functionality of Windows causing some port redirects of blocks.

Check there, see if you have to open up something for things to work as expected.

jwenting 1,905 duckman Team Colleague

So you're repeating what I just said.

no, I'm specifying and expanding on it, not repeating it.

jwenting 1,905 duckman Team Colleague

That is interesting. Although I'm assuming you would have to declare the fact that you're going to be passing the Exception in advance (and either way, JOptionPane would have no code to deal with the Exception even if you could otherwise pass it).


Agreed, which voids the point of using an Exception to begin with. In that case, in whatever method that generates the Exception, you may as well get rid of the Exception and just print an error message to a JOptionPane to begin with.

In general, I prefer handling Exceptions to dealing with return codes.
If a method runs to completion, no need to handle the return code and check if there's an error.
If not, the exception is propagated to a level where it can be handled with minimum fuzz :)

jwenting 1,905 duckman Team Colleague

You can't pass an Exception to a method. The point of an Exception is to signal that something went wrong and to give the person who called the method the opportunity to deal with it.

False yet true.
You CAN pass an Exception to a method. In fact that's exactly what many logging APIs do all the time to properly log them :)
I can fully understand someone wanting to pass an Exception to a GUI control in order to have that control show a proper error message to the user.

A JOptionPane however doesn't know how to do that. You'll instead have to have the method that pops up that JOptionPane analyse the Exception and generate a String with the error message to be shown, then pass that String to the JOptionPane.

jwenting 1,905 duckman Team Colleague

unfortunately thats not the case, the teacher gave us this problem and just told us to read a chapter that we never covered. The chapter she gave us is 9 chapters after the last chapter she covered with us, so reading it hasn't exactly helped.

Good, so your teacher expects you to be at least somewhat capable of learning without handholding.
You say you're at the stage where you're prepping your final exam and you're still not able to read or think for yourself?
And you honestly expect to deserve to pass that exam?

Get reading, get studying, read those other chapters as well and understand them.
IF you ever graduate there'll be tons and tons of learning and reading to do with noone ever holding your hand.
Let this be a first attempt at doing so where the penalty for failure is having to retry the exam rather than loosing your job.

jwenting 1,905 duckman Team Colleague

I actually doubt myself too much when it comes to programming that is why I say that I am not that smart, but what I really want to be is a java or dot net developer. Now I am confused. I was quite sure that I would be picking UNIX during the past few days but when you said this to me I reconsidered once again.

Most professionals know both Unix and Windows reasonably well (at least at an end-user level).
When you choose .NET you're going to need more in-depth Windows knowledge more likely, but Java is pretty operating system agnostic (though many Java shops are Unix-heavy when it comes to deployment/server environments).

@all:
sorry for the late reply y'all isp connection was down for a week D:

No problem. At least you did come back unlike so many who don't get the answer they desire (meaning they get reaffirmed in their delusions more often than not) and slink away into the night.

jwenting 1,905 duckman Team Colleague

Making variables non-private is only an issue for public APIs.

Assume ALL API specifications to be public, period.

Protected (and even public) data members have their place, but that place is mostly to be found in performance critical situations where the extra overhead of creating call stacks for the getters and setters to these data members would be prohibitive.
Examples might be small classes that are uses extensively in an application, like a 3D Vector or 4D Matrix in a ray tracer.
For those (where the data members are accessed at a very high rate in comparison to most other operations) the use of getters and setters rather than direct access to the data members would yield an unacceptable performance overhead.

For most business applications however that's usually not a problem as they spend the vast majority of their time either waiting for user input, external events, or external data.

Another place might be classes that are completely internal to your library, like pure abstract classes.
For those there is no way they would ever be used directly, the only use is by derived classes. Giving those protected data members yields the same result as providing those data members as private in every inheriting class without the overhead of actually manually adding those members to each of those classes.

jwenting 1,905 duckman Team Colleague

That said, I find that a very large proportion of the world's population is utterly incapable of analytical thought, and analytical thinking is crucial to becoming a successful software developer.
MAYBE such a mode of thinking can be trained, but if so a very large number of people seem either disinterested or incapable of receiving such training.

jwenting 1,905 duckman Team Colleague

Do NOT use scriptlets in JSP. Use a servlet instead.
And NEVER (I assume you want to, it's almost always on beginners' minds....) retain life database objects between requests.

jwenting 1,905 duckman Team Colleague

People that make a big deal about Dates really do make me angry!!

They give me gas.