Karel KoboojBot

Ranch Hand
+ Follow
since Apr 09, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Karel KoboojBot

If you are talking about the Servlet 2.4 specification, then page 19 of the official spec states the following:

All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols such as HTTPS may be supported

Since a lot of extra power comes from the usage of additional plugins, the following question arises quickly: does a plugin repository exist for Eclipse plugins (eg something like the NetBeans module repository) ? If not, are there any actions taken in order to set up such a repository.

Greetings,
Karel KoboojBot.
There has been a discussion in an earlier post in this forum. You will find a good explanation to your question in that topic


- Expression Language
- Simple Tag and Tag files
- JSTL 1.1



You can find information about these topics on the official Java JSP site.

The book "Head First Servlet & JSP" will be coming out very soon and it is aimed specifically at the 1.4 version of the exam thus covering these topics extensively. Release date is set before the JavaOne conference which starts at June 28.
Because of dynamic binding. The actual instance method that will be called depends upon the runtime type of the object you are using. Even if you type this. it still will look at the runtime type of the object and use the method of that type.

Be careful, with static elements and instance variables the behaviour is different in these cases. Try it out with a few examples is the best thing to do to get a clear idea on this subject.


1. You first check out the precedence of the operators. In this case the ~ has precedence over >>. So this will be executed first. resulting in a binary value of 111111...1111 (32 times 1).

2. Then you get the expression 1111...1111 >> 1 which results in 111...111

3. This means that the value of a will be -1.

PS: The way to convert (~) a value is by taking the binary form, inverting all bits and then adding one to the result.
Thanks Nick and reddy
20 years ago
Hi all,

I have the following situation: A DispatchAction contains a number of methods that can be called and that all return an ActionForward. Every method returns to the same URL upon success. I want to add a separate parameter in every method to the success URL. How can I do this without having to explicitly set the path of the forward (using setPath()) ?

For example:
DispatchAction doSomething has two methods methodA and methodB. They both forward to result.jsp. In result.jsp I want to display the sentence "Method X has been successfully executed", replacing X by either A or B. What is the best way to achieve this ? I prefer no solutions that explicitly place data in the session variable.
20 years ago


The code you have sent will compile and run because you do an explicit creation of an array. Anywhere you do a X id = new X[] then the array will be filled with the default value for type X. For numerics this means 0 in their respective format, for reference types this means the special value null. If you would have written the following int arr[]; instead of int arr[]=new int[10] then it will result in a compile time error saying "variable might not have been initialized".
I thought the expiry date of the voucher is printed somewhere on the voucher itself.

When you schedule an exam, you can always reschedule as long as you reschedule before 6 pm the day before the exam.

To be sure you'ld better check on the prometric site.
yes, private is not allowed.

When you execute the start() method then the JVM thread scheduler will start a new thread. At that point in time, there are two threads running (at least two that are important for the explanation of this question). You've got the main thread and the one that you have just started (I'll call it thread X from now on).
The JVM thread scheduler is not obliged to follow any specific rules regarding thread scheduling.
Case 1: The thread scheduler might continue to run the main thread first and then finish thread X. This results in the output "vandeleur".
Case 2: The thread scheduler might decide to completely run the thread X first and then finish the main thread. In this case the output will be "vandeleur 0 1 2".
Case 3-4-5: The thread scheduler might also decide to run thread X first, but to switch on the main thread once in a while. The result of this case is that "vandeleur" will certainly be printed, but the numbers can be "0", "0 1" or "0 1 2", depending on the time that the thread scheduler decided to discontinue running the thread X.
Hope this is a bit clear, but the bottom line is that the Java Language Specification does not impose rules on the thread scheduling mechanism.
In general they are, but when used in combination with &&, || and ?: this is not the case.
The Java Language Specification has a very clear section on this. You could check out paragraph 15.7 of the JLS. It's a very short and not so technical explanation.