Win a copy of Java Challengers this week in the Java in General forum!

Prabhat Shankar

Greenhorn
+ Follow
since Oct 08, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prabhat Shankar

How to invalidate session on the basis of session ID in servlet.
10 years ago
Hi,

on the basis of if condition you can give break or continue.

The purpose of break is to return out from loop at that point.

And for continue is it will not execute code which is after continue .it will go directly to for loop.
11 years ago
Hi,



how my servlet is maintained in container for multi thread environment.

OR

How container manage to serve servlet to number of request.
11 years ago
Hi,

You can pass encrypted form of user id & password in url.

You can create temporary table in database for storing user id & password which you are sending to other application and instead of sending userID and password you can send the slno from table for that userId and password.
Tell that application to retrieve userID & password from table.


11 years ago

Prash Singh wrote:Dear all,

Please tell me, in which situations to make a servlet and in which a JSP.

Thanks in Advance.



Prash Singh,


JSP should be used only for view part and servlet you should go for writing business logic in web application.

Always avoid to write business logic inside JSP that should be only for view part.
11 years ago

Henry Wong wrote:
The Reentrant Lock class "implements it". And it does so without using Java synchronization.

Obviously, it does it via using JNI (or indirectly, using the atomic classes).

Henry



Henry,

I am not getting ....Please explain me properly...

Hi,

if synchronized keyword was not there in java how to implement it ?

Hi,


why we have checked & unchecked exception.

Durga Krishna wrote:I din't get proper answer from the given articles. Thanks every body.

The payment gateway is another application, not available in my server.

If I use send redirect, it will be new request object.
Then what about the values (selected items id in the page) in the request object in the current request?

And how can I show success message in the current page?



I think payment gate way third party would have provided you to pass some credential in url parameters.

Ex:
www.java.com?user=prabhat&accNo=452556555
11 years ago
Hi,

Please give some more extra details ....
So, that we can help you.
11 years ago
Hi,

You can call doPost or doGet method from form submission.
At the time of form submission you can set the method.
11 years ago
Hi,

It seems to be correct ...Seesion time out should happen after 1 minute.

Otherwise you can use below method in your servlet for session time out it will help:
session.setMaxInactiveInterval(1*60);
11 years ago

Bear Bibeault wrote:Perhaps this article might help.



Hi,

Basically main difference between forward and sendredirect is that when we want to call any JSP or Servlet which is not in my web application then we should go for sendredirect. sendredirect initiate a new request for different JSP or Servlet.


forward is used when we want to call any JSP or Servlet which is present in my web application here same request is sent to different JSP & Servlet.
11 years ago
Yes it is good....if they are giving good package then you can join.

projects does not matter ......if you have good knowledge then you can jump to other company any way.

So, All the best dude....
11 years ago