Karthik Srinivas

Greenhorn
+ Follow
since May 07, 2008
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 Karthik Srinivas

Can anyone explain?
8 years ago

What did you expect to happen?



I expected the code to throw java.lang.OutOfMemoryError: Java heap space error after consuming 256MB of memory since I have set my heap memory to that value. But, it goes on and on till my RAM is exhausted completely. If my heap is not consumed for creating these objects then where are they getting created and how can I limit that memory reservation?
8 years ago
Hi All,
Basically we set an Initial heap memory and Maximum heap memory limit by setting -Xms and -Xmx parameters. I run the following program with -Xms set as 256MB and -Xmx set as 256 MB. But, when I run the following program, I expect an error "java.lang.OutOfMemoryError: Java heap space" since I am creating so many threadpools but never shutting down. But it doesn't happen. Instead it eats up all the RAM available and finally terminates without any error. And when I view the action through JConsole, I am not seeing any climb of both heap and non-heap memory beyond "Max". Can someone explain why it happens so? Where are the threadpool objects/threads created and why does Java doesn't consider memory params in this case.



VM args:

8 years ago
Hi all,
I am having an issue and I want to know reason for the same. I am currently having Apache Tomcat 6.0.32 as a windows service. My Memory configurations are as follows:

Initial Memory pool : 256 MB
Maximum Memory pool : 1024 MB
Thread stack size : 1024 KB.

Other VM memory params are
-XX:PermSize=64m
-XX:MaxPermSize=256m

I have deployed few applications on this setup and after a period of time, through JConsole I find the following memory observations:
Heap
====
Used: 361,371 kbytes
Committed: 488,956 kbytes
Max: 1,046,464 kbytes

Non-heap
======
Used: 181,080 kbytes
Committed: 273,984 kbytes
Max: 311,296 kbytes

If we add the "Committed" memory in both the cases, it comes to 488,956 + 273,984 = 762940 which is approximately 762MB.
But if I go to task manager and see the memory consumption of tomcat6.exe it show 1148644 which is approximately 1148 MB.
Now the issue is , why there is a difference of 386 MB additional consumption? This difference increases as the heap gets used more and more. Are there any other memory reservations specifically for tomcat6.exe since its run as a windows service? Please provide an answer if you know.
8 years ago
i resolved the issue using LookupDispatchAction
12 years ago
@Merrill Higginson

I went through the FAQ. But the case explained there is where there are two actions, one to display and one to process. Hence, after form validation fails, the display action is called to repopulate the bean(by fetching from database) and then the jsp is displayed.

I have a scenario like this, where there is a user registration form with around 10 fields for user input. I want to retain these values, even after a server-side validation failure. Note that there is no specific action before displaying the form.
12 years ago
I too face the same problem of form bean resetting after a validation files. Can anyone provide a solution?
12 years ago
I found many topics related to bypassing struts validation, but they dealt with server-side validation. I have a query reg. client-side validation
**************************************************************************

I have a form with around 10 fields. I have enabled client-side validation in Struts by specification in validator-rules.xml. I have two submit buttons, which I process at the backend using LookupDispatchAction. Now, only when I click one submit, I want the validator to validate the 10 fields. If I click other submit button, the the validation shouldn't happen. How to achieve it?

Please help. Thanks in advance.
12 years ago
I have the following scenario.

I have a jsp containing one form. I need to trigger two actions, dynamically depending on which button is clicked. I just found the following url for the approach.

MultipleSubmit

When I convert the above code to struts format, I find the "action" URL is not generated. Its as what I have given inside action="".

How to solve the above problem using JavaScript in Struts?
Please help.
Thanks
12 years ago
Just use eclipse and choose Export -> WAR file. That would be very easy.
12 years ago
In which OS are you trying to install tomcat?
12 years ago