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

Mani Venkata Kanth

Ranch Hand
+ Follow
since Aug 21, 2006
geocities.com
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mani Venkata Kanth

Hi,

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.

Thanks
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:

out.write(bytes1);
out.write(System.getProperty("line.separator").getBytes());
out.write(bytes2);
out.write(System.getProperty("line.separator").getBytes());
out.write(bytes2);
out.flush();
out.close();

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 ,
(byte1\nbyte2\nbyte3)
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.

thanks
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

thanks
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")

OR

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
HighLevel:
I have 3 filters configured for a servlet.I have to calculate average time taken by each filter.

Details:

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
Hi,

But using window.open() 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
Hi,

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

XYZZZABDS.ÿ$ABDCJDDMDLGDMG

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

XYZZZABDS.ÿ$ABDCJDDMDLGDMG

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 : soft.munna@gmail.com
14 years ago
JSP
Then post your code > you will get good answer.
14 years ago
JSP
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!!!

Regards,
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.

Regards,
Krishna Prasad
14 years ago
JSP