Praveen mourya Kumar

+ Follow
since Oct 14, 2008
Praveen likes ...
Hibernate Spring Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Praveen mourya Kumar


your problem can be solve by using the webcrawler in Java. for more help, please try to visit the following link :
Good Luck
14 years ago

tangara goh wrote:so you are saying that it's better to use response.redirect inside my servlet to a jsp page that display my table?

I do not know if I have the time to learn mvc due to time constraint. I need a quick solution for now.

However, I would like to pick up the mvc when my project is ok.

Can you help me with the sorting part? Tks.

If i assume, you want to display the date from the MSAccess to client. And when the client click on the Column header(like Cust_ID, Name) for Ascending or descending order, then you want all the data should get sorted accordingly.
Better you use, Javascript. Store all the table values in multi-dimmensional array. When the user click on the sort. then you have to change the view of your page through rearranging the arrays.It will be according to column header. In this way, you can avoid going into the MVC or other pattern.
Moreover, sending request to another Servlets will again time consuming.
14 years ago

Somnath Mallick wrote:My image tag is something like this
IMG SRC="E:\\Softwares\\chart.jpg" WIDTH="600" HEIGHT="400" BORDER="0" USEMAP="#chart"
Somehow the text are not turning up in the code tag or even the quote tag!
I have tried running it in both IE and Firefox and they both display nothing!
Also could you please mention some pointers to make the JSP a little bit more readable!

Hi Somnath,

Can you please try to keep all the images under Application Context Root. I mean to say, make one folder(say images) near your WEB-INF. And try to access all the images from there.
14 years ago

Charles 'King wrote:One possible option would be to modify the header sent from the proxy to include specific client data needed. An additional anecdotal approach is:

- which works 1% of the time depending on the proxy implementation. If your proxy sends that header, it'll contain the client and proxy's ip.

I tried with the request.getHeader("X-FORWARDED-FOR") . But it gives the null as the result.

Is there is any other way to set the HEADER's environment variable like X-FORWARDED-FOR.
14 years ago
Hi All,

I am working on the User login record. Here i have to record the Destination Machine Name, Destination IP address, Source Machine Name and Source IP address. I faced two problems while handling with Servlets.

To obtain the Source Machine Name and Source IP address, we used httpServletRequestObject.getRemoteHost() and httpServletRequestObject.getRemoteAddr(). It is giving me, the same IP address, ie, Is there is any way, how to obtain the Destination Machine Name and Destination IP address.

In our project, we are using proxy server. So whenever client is trying to communicate our application, its request comes through us via proxy server.
Is there is any way to get the client machine ip address and its machine name?

We are using Tomcat 5.5 and J2EE 1.4.

14 years ago
Thanks Guys!!!
I cleared my SCJP 1.6 with 70%. Despite my score is minimum,but i feel proud and confident .It is really possible due to K&B and the Saloon's frnds experiences.
But one big problem, I am unable to register to site Please,can anybody help me. Is it the correct site or not.
15 years ago
Thanks Ryan Beckett and Himalay Majumdar for your immense help.
It is regarding NavigableMap and NavigableSet : I am not able to find the use of them. In K&B, it is not given clearly how they are useful .
Please somebody help me.
Yes.. It is as simple. But remember Java is not completly OO due to its primitive data types.

belakumari das wrote:

byte testMethod(){ int i = 42; return i;}

will not compile because int is heigher precedence than byte

below method will compile
int testMethod(){ byte i = 42; return i;}

you can cast byte to int but you can't int to byte

precedence from low to high


saurabhthard aggarwal wrote:Why do we need constructors when we can initialize variables in INSTANCE INTIALIZATION block
Is it just because we can over load constructors and not overload INSTANCE INTIALIZATION block .

Hi Sarurabh,

It is not all about the initialization of data members. Suppose you want to sell your java package for a limited time period. so you declare that constructor as private and end user can use until he is paying the package amount.

Karthick Ravi wrote:

What is the difference between

byte testMethod(){ return 42;}


byte testMethod(){ int i = 42; return i;}

The first one compiles but the second one doesn't. My understanding was, java takes in any number literal as an integer, in which case both shouldn't compile.. Thanks.

There is huge difference in returning call.
"return 42;", here compiler wants a byte to be return. So Compiler will implicitly type converted to byte.similar to
byte b+=2;
if you see the second example,"int i=42; return i;".It is obvious, you are returning an int value, which need explicit type conversion. Complier will flag a error. It is similar to below statement :
byte b=12;
b=b+13;// here compiler will raise an error.Why?
Please remember the following sequence for implicit conversion
byte --> short --> int -->long -->float-->double


if you try to go in reverse, then you need to do explicit type casting. Even you have to do explicit type casting in the case of short( or byte) to char primitive types.

Abhinav Trivedi wrote:Hi Everybody,

Actually I've a problem in understanding of the wrapper classes and their functionality. I mugged up all the books but practical aspect of using wrapper classes is still unsolved. can anybody give me a classic example of using wrapper classes and their functions.
I need only start.

Brother, you Mugged up the basic thing..Please do some coding and try to understand how interpreator and compiler are doing for you.
You can learn more by understanding rather than simply mugging. i prefer K&B, read sentence by sentence and try to visualize on your own.javascript:emoticon('');


Congrats brother !!! Just try to help others who wants to clear their certification by solving their doubts.