Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

T. Huy Nguyen

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

Recent posts by T. Huy Nguyen

We observed this stuck thread in Production server. This is the second time I see something like this: A stuck thread with RUNNABLE state. I can't understand how that can happen.

The server is WebLogic server 10.3 running on Sun JVM.

Has anyone encountered a similar situation? Please share your finding. Many thanks in advance.

Jimmy Clark wrote:Do you make more if you have 8+ years of failed projects and buggy code? I would think so. If your code does not have bugs and issues, then you should make less because you did not do a good job.



I don't really get what you said. Can you please elaborate more on this?

I'm having lots of trouble with one of my project, but if what you said is true, then I shouldn't be worried any more
9 years ago
Can you post the error?

Does your server have any authentication provider configured?
9 years ago
If I can't decide which answer is correct, I just mark it and move on to other questions. The correct answer sometimes can be found in subsequent questions.

If when I comeback, I still don't know the answer, I accept that I'm not perfect and make a (sometime random) choice. Thankfully, because of my careful preparation, I didn't have to do that often.
Perhaps you're referring to the security hazard of using Invoker servlet? If so, then I understand.

If not, then I still haven't understood why separating servlet-class and url-pattern can prevent a security hazard. Thanks though.
9 years ago
I haven't used WLS 9 before, but there should be a Connection leak profiling option in WLS's online console. If a connection leak is detected, a .tsf file will be appended with stack trace of the java code that first asked for the db connection.

Monitoring open and total connections is also possible on the online console.

Of course, you need to use WLS connection pool in order to benefit from the above.
9 years ago

William Brogden wrote:
Not even getting into the security hazard of having your whole package structure exposed everywhere.



I don't understand how that why separating servlet-class and url-pattern can prevent a security hazard. The 2 <servlet> and <servlet-mapping> are in the same document, any author of web.xml will be able to see the whole class name.

Would you mind explain further? Thanks
9 years ago
I think he did include the checking, but it's weak checking and is at the wrong location.

Now, a simple fix would be to move


inside


Of course, you may have to watch out for null and blank (contain only space) sessionId, session.
9 years ago

shaz baluch wrote:Oh sorry for that!
Actually the problem which i m facing is that with empty text boxes when i press the submit button in jsp( that is for saving the data in database),the servlet forwards the exception as 'for input string:""'. what I want is as by pressing the button(with empty field) i should get the message "fill all the fields and request should again moves to same jsp (addSession)
and again ask to enter data.

I hope now it is clear to all


Is your error due to NumberFormatException? Because that exception could happen to this code:
9 years ago
Imagine you build and run the code: if you encounter compilation error, it's CTE. Else, if you encounters error/exception when you run it, it's RTE.
Hi,

I'm just curious, how do you kill the main thread? Thanks.
I tend to agree with the result of Glassfish: If B extends A then whatever declared on A should execute first.

What do you think?
Hi,

Below is what I prepared for my exam. The > sign denotes the order of invocation. Hope it help.

- Invocation order:
+ Default interceptors > Class interceptors > Method interceptors > Bean’s interceptor methods
+ Within same group, invocation order is the same as order of specification. If DD is used to augment annotation, annotation > DD
+ Within same class (bean or interceptor class), super-classes' interceptor > current class’ interceptor. If an interceptor method is overridden by another method (regardless of whether that method is itself an interceptor method), it will not be invoked.

- DD interceptor-order element can be used to override the default order specified in annotation. However, when used, developer must specify the total ordering of interceptors

(https://sites.google.com/site/mostlyjava/scbcd/02-general-ejb-3-0-enterprise-bean-knowledge)
Since you don't tell us what is your problem, I make a wild guess: IllegalStateException.

If it is, this may help: http://download.oracle.com/javaee/5/api/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
9 years ago
Have you tried summarize the study book so that you can understand and remember the content better?

I know that may sound silly, redundant, but for me, it always work. It helps me memorize and, more importantly, understand the concept (even just theoretically) better. Besides, you get to prepare the material in your own writing style, which you may find easier to read.

Of course, having practical experience by actually trying out what you read is very beneficial to your understanding.