Win a copy of Rust Web Development this week in the Other Languages forum!

Mani Venkata Kanth

Ranch Hand
+ Follow
since Aug 21, 2006
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 Mani Venkata Kanth


I am new to JNI & reverse JNI.

I have prepared a long string which is of more than 10 thousand characters. I wanted to set this to the Java string. I am using below code snippet.

string temp="....................";
jstring temp2 = env->NewStringUTF(temp);

And I am setting this temp2 value to java variable using reverse JNI.

The string i get in Java is only the some part of the string. Hence, missing the complete string.

Please help me out...

Thanks in advance.
10 years ago
Hi Sahni,

My question is not reading the input dynamically... its about writting multi line input to the Java Runtime Process.

10 years ago
I have a batch file which will 3 inputs one by one.

Its like 'changepassword.bat' with below inputs:

Old Pwd:
New Pwd:
Confirm Pwd:

User need to enter each input and press enter to enter second input.

Now, I am planning to simulate the same in java program.
For this I am using Runtime.exec();
I am writting inputs to outputStream which is the process.getOutputStream() like below:


the process is being started and keep on waiting for the input.

I am assuming that the process is taking all my data written to stream as single input like ,
and waiting to either <enter> event or for other inputs.

Please help me solving this issue. or suggest any other approach.
10 years ago
Hi Tim Holloway,

Thank you for your response.

I have some other modules in Apache which will be executed like input and output filters for before and after tomcat processing.
So, I wanted to calculate time taken at apache front not only with the mod_jk but including.

Please give me some suggestions.

10 years ago
Hi all,

We are using Apache and tomcat with mod_jk connector.
I want to calculate amount of time taken for the request at Apache side (for both request and response cycle)
means time to forward req to tomcat and get response back and send back to client through apache.

please help

10 years ago
FileInputStream looks for exact file location like,

FileInputStream fis=new FileInputStream("C:/RAD7-0-projects/WebDnldCtr/WebDnldCtr/WebContent/Common/conf_en_US.gif")


If your current logic file in WebDnldCtr folder, you can write like

FileInputStream fis=new FileInputStream("./WebDnldCtr/WebContent/Common/conf_en_US.gif")

10 years ago
Hi all, Thank you for your replies.

Paul, Yes... I am calculating start & end times in the filter and finally setting time diff to singleton. Yep, I did synchronization. It is hitting some performance issues.
Any more ideas please???

Paul Clapham wrote:I don't see why parallel requests should cause a problem, unless perhaps your strategy was to pass this singleton object a starting timestamp and a finishing timestamp and ask it to calculate the difference.

If you had code in the filters which used local variables to calculate the running time and then pass the result to this singleton object, you would just need a tiny bit of synchronization in the singleton to remove the issue.

10 years ago
I have 3 filters configured for a servlet.I have to calculate average time taken by each filter.


1. I wrote a singleton object to maintain average times.

2. I am adding System.currentTime() in each filter doFilter() method start and end & at end setting these values to request.

3. In the servlet, I am adding these times & incrementing the requests count in the singleton object.

Till this point it is working properly.

But, In the first filter starting, I have to send this counters values by reading from singleton object to some monitoring logs.
Here is the problem.

Parellel requests causing inconsistent time values... Any ideas please???
10 years ago

But using opens a new browser.. if parent window is closed it wont be closed, which will create issue.

is it not possible with modal window??

Thanks in advance
10 years ago
hi, please help in appenders logic code for below scenarios:

a - Rollover now. Rollover is only performed at startup.
b - Rollover. Files rollover when they grow to the limit set by LogSize.
c - Rollover now with size. Files rollover at startup and then grow to the limit set by LogSize.

its urgent... thanks in advance

I have an application running in Linux environment. This modules reads the below string and writes in a new file.


However, while writing using the below line, I am getting the out put as below.


Due to this my application throws an exception.

Please suggest me if there is any turn around or suggestions to resolve this issue.

11 years ago
you can reach me at :
14 years ago
Then post your code > you will get good answer.
14 years ago
For this we need a hidded field like 'browserback'
and make it 'true'. On page load check for Browserback it is true and your data base validatoin is true then only popup the message.

on form submit make the hidded field 'browserback' as false.

NOw if you use browser back button that popup will not come.

I guess it will help you!!!

Krishna Prasad
SCJP - 95%
See When your using back button all values which are added to session will be available in first jsp also.
But your not getting the values from session and putting in your fields.

What you need to do is:
In first jsp check in session whether any attribute was set with the name 'yourname'. if it is not null it means that you used back button from 3rd jsp.
so then get the value from session and put it in input value attribute.

Got it!!!
I guess my answer will help you. Let me know for any clarification on this.

Krishna Prasad
14 years ago