masijade 1,351 Industrious Poster Team Colleague Featured Poster

As already said, it depends on the scope of the individual transactions.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

See the first thread in this forum.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Um, yeah. Brain fail - I was thinking "instance variable" for some reason. Okay, yes, I'm wrong on that one. Thanks.

It is still false, however, as it should be "all objects/instances created from the same classloader". Instances created from one classloader will not have the same reference value as those created using another classloader. They may have the same "content value", depending on how it is defined, of course, but they will not have the same reference value.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And the problem would be?

BTW, we are not going to do your (home)work for you. This is your assignment, not ours. We are more than happy to help you fix your problem but we are not going "to provide the solution ASAP". For that see this.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Are you new to JEE or new to to Java in general. If the first, then, as long as you are capable in core Java the official JEE6 or JEE5 or J2EE 1.4 tutorials should be more than enough to get started. Use the one that is applicable to the web container/application server that you are going to be using.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If you are working with relatively small amounts of records (in the low thousands in one hit) with a single transaction, use hibernate or some other object representation framework, if you are working in bulk (hundreds of thousands of records or more in one hit), use straight JDBC (or maybe something like ibatis). In either case use the containers connection pool.

peter_budo commented: Good to know that some others know ibatis. My colleague will be very happy ;) +16
masijade 1,351 Industrious Poster Team Colleague Featured Poster

You create three inputs of type submit but with different values, then, in the jsp/servlet that is the target of the action field of the form, you simply look at the value of the submit parameter to decide what to display.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

ohhhhh man ............yes ......problem with id......

All I can say is "attention to detail", as I don't know anything about "Sales Force CRM", but I can now make a few "educated" guesses about how it works.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Hey @masijade i am not here to fight anyone if anyone is here and help me out then please help me .........if this forum is not helping people...........then y you are moderating this

And that post was not "fighting" you. That post was advice.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, for one, I would like to know which two fields are getting successfully added, and if they are the "First Name" and "Lead Source" fields, then I would say to inspect the input ids (and names).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

u want to show my Coding part ..........then i can show you........

I don't really care, but when you come to forum and say I have this, it does (or doesn't) do this and then reject the first suggestion made, you are not improving your chances of getting any quality help.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

there is no issue with Coding part

And you're so sure of that? Well, if that's the case the problem is your form, but I would then say to ask the developers of Sales Force CRM (or, probably just read the manual).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why are only two fields getting inserted into the db? Uhm, bad code? We have no idea what is going wrong as we have no idea what the form (the HTML of the form, not a screenshot) looks like, nor do we know how that is being read and processed (the code).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

What database are you using? If it is not Access then use the JDBC Driver meant for that DB, not the JDBC-ODBC bridge, and if you are using Access, then use a different db.

And, if you want to know what the problem is, then don't hide it behind your own meaningless error statement. Add a printstacktrace call to that catch block.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Looks like C# is just a rip from Java.

Now you're catching on. They had to do something with the invalid JVM that they developed.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Show how you instantiated it. As an instance or a class variable?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Because you cannot call non-static methods from a static context without using an instance of the class containing those methods. i.e.

Whatever variable = new Whatever();
variable.someMethod();
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm, the last post here was about two years ago, and the last meaningful post was about four years ago. Killing this zombie now.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

HttpURLConnection. Use one to get the listing (you will, of course, also need an HTMLParser for parsing that content), then another connect call with a new URL per file. Google HttpURLConnection and HTMLParser and try a few things out. And, P.S., hopefully the directory is "listable" and the files "retreivable" (from an http point of view, i.e. that you can already do this from a browser) or none of this will help, of course.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

method String.replace required char[] data type in arguments. Try:

url.replace(" ".toByteArray(), "".toCharArray());

P.S.: sorry my english

No it doesn't, and besides, as of Java 5 the way he tried it in the OP will work, but since this thread is a four year dead zombie, that doesn't matter anymore, and neither does the post I'm responding to. Killing this zombie now.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Post the actual stack trace. And I hope the class containing this call does not import a class named "File" (or that its package does not contain a class named "File") that is different from the "File" imported in DirLocator (or from a class named File in its package).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If you mean whether or not an email address exists, then send it a mail with a "verification" link inside and wait on the answer.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No it is not. You should read the mysql user manual (and pay close attention to the part about grants) and give the root login a password (or restrict it to only the unix socket connection), delete the "blank" user account, and create an application user for your application.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Seemingly you "saved" a password.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Because both threads are using the same instance of r1, and so the same "x" variable, but since nothing there is synchronized (except the println which is synched internally) the 22 came out later than you might have expected (and it might not have come out at all since you can't sure which thread will have which value, when, but you are probably on a single core machine, and the thread interlace has produced, to you, strange results) but it is the result of both threads doing x + 1 and x + 10 on the same, non-synched, variable.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

it must be if (th<T1 && sw1==true)

Actually, it should be

if (th<T1 && sw1)

IMHO I find that "boolean==true" or "boolean==false" completely assinine. Some say it helps "readability". BS, complete BS. If any programmer cannot read "boolean" or "!boolean" there's a problem, and not with the code. If you don't agree with this, that's your prerogative, but this is just a little pet peeve of mine.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm split and take the last entry?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

BufferedReader, it's readLine method, and a counter variable.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Create an object with two instance fields. One for the original index and one for the value. Have it implement Comparable and sort according to the value. Sorting, of course, will give the objects a new index within the array, but they will, at least, still have an instance field indicating what the original index was.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Read the MySQL documentation, everything you need is right there.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Nope.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

6 % 2 = 0
So, if I have a remainder of 0 and a divisor of 2, what did I start with?
Well, that would be; 2, or 4, or 6, or 8, or... (DO YOU SEE A PATTERN HERE?)
There is no answer here.
There is no way to do a reversal of the mod (%) function.

Correct, and, OP, that is what

funtions dat arent 1 to 1 dnt hv inverses.

means. I.E. modulo returns the same "answer" for multiple inputs, using the same modulo factor, so there is a "one to many" relationship and so is impossible to determine which of the "many" was used to produce the "one".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Read the API docs. When you do new ObjectInputStream(InputStream) it will attempt to read the "header" object created by on the other end when doing new ObjectOutputStream(OutputStream), and that read call blocks until it gets something. You need to create the ObjectOutputStream before creating the ObjectInputStream or design the thing in such a way (i.e. in a thread or something) that it doesn't matter that the creation of ObjectInputStream blocks until it gets the "header".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

By creating another class, of course. A simple class with two instance fields. and if you don't feel like making the setter/getter methods and/or a special constructor simply make the fields public.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Creating a new ObjectOutputStream around an OutputStream will cause a new "header" object to be created and written to the Stream, which you do not want to do more than once (unless you are also creating a new ObjectInputStream on the other end with every "read", both of these is which an extreme waste of effort and bandwidth).

Create an Object to hold both a Socket and an ObjectOutputStream and add these objects to your hashtable rather than the socket.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm, you do know that the cost of a programmers time to write something like that (which I didn't even read BTW), and test it, is more than the cost of a few routers, right?

You also know that it possible for any computer you have to be a router, right?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No idea what it is you want, but "onLoad" is JavaScript and has nothing to do with JSP. Moving this post.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The parameters in the request object, it is a JSP default object.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

That is for a servlet (you aren't using scriptlets in the JSP, are you?).

for a JSP it is ${param.movieIdHidden}

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? And when something else uses that list without synchronizing on it (or the instance)? That is where the problem is coming from.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

try "man gcc" or google for gcc documentation.

vedro-compota commented: ++++++++ +3
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, for one, you haven't closed the if statement with "fi" nor closed the for statement with "done". Also, you need to check for links first or a link to a directory will probably be counted as a directory.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, it has nothing to do, most likely, with the servlet, but rather with the css and html it is producing. Post the produced html on a html forum and ask there, is the best advice I can give you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No, because there isn't one.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Please ask a coherent question.

Ezzaral commented: No kidding! +15
masijade 1,351 Industrious Poster Team Colleague Featured Poster

You need to use defined bytes '00000000', '00000001', '00000010', and '00000011' i.e.

byte oo = 0x00;
byte oi = 0x01;
byte io = 0x02;
byte ii = 0x03;

as what you are using now is actually zero, one, ten, and eleven. Not quite what you want.

or use the 0x form directly.

(P.S. you can also use 0, 1, 2, and 3 directly, of course.)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

but I gave them unlocked *.mdb file

It already belonged to them, and if you hadn't have given it to them, and they decided they needed it they could have come after you legally.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

@ not at all, some InHouseAppS have long, long story :-)

Yes, all. If a company contracts someone to write code for them, or someone writes (or even just tests) some code on that companys computers, that code belongs to the company. The only way it does not is if the company wrote a specfic contract in that manner, in which case they hopefully contracted for support, and if not, they need to throw it out as it is nothing but a dead weight for them and they were fools for doing it that way.

Edit: And, p.s., if it is a program that got into the company in any other way (i.e. someone wrote it at home and simply brought it to work and started using it) then the company still needs to throw it out as a security risk (and possibly/probably prosecute/discipline the employee) or the employee needs to start a process of getting it verified/certified with the company, which would then, probably, also require a support agreement, again.

Edit Again: At least this is the way in which most company employment contracts and/or computer use restriction documents are written.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. Anything you do will be a crutch and/or workaround. If "this person" wrote the code for this company (i.e. the company paid them to do it or they did while working for the company, even if in some other form) then the source code belongs to the company and they should have it somewhere, if they do not have it, but should, then find the guy and get it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So, the person who wrote is not there. And? Does that mean you don't have the source code either? The "solution" is, of course, to simply add it to the original code.