Venkata Sirish

Ranch Hand
+ Follow
since Apr 09, 2007
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 Venkata Sirish

Try closing the ZipEntry using zis.closeEntry(); before line 47.

Hope this helps!

11 years ago
Hello ranchers,

Iam developing a web application using J2EE, Javascript technologies. In my application i have a signout button in every page to allow user to signOff from the application including closing the browser window.

I used the following code to close the browser window, below code works fine in IE7+ but unfortunately does not work in Firefox 3.5.

After goggling i realized that, in Firefox, browser windows opened only through javascript (using can be closed pro-grammatically. So i found that below code is a solution for this. But above code doesn't work from firefox 3.5. Any alternate solution for this ?

Any help is really appreciated. Thanks in advance for your time and attention.
Hi Hebert,

I want to send the data in Request Header not in the Response Header.
13 years ago

Hi ranchers,

Iam working on a J2EE struts web application. I want to send application information to the server through the Request Headers.

Is there anyway that i can add a custom header information like " isValidUser : true " to the HttpServletRequest object programatically just like we do it using addHeader method in the HttpServletResponse class.

I don't want to send the information through the Request Params / Query string and i want to send application information to the server in the Request Headers Only.

Any alternate way to achieve this ? Thanks in advance for your time and attention.
13 years ago

I am suppose to write unit testing code for my BO (business) layer by mocking DAO layer. I am using Java 1.4 and Spring 2.5 combination and need to strictly use this combination only.

I have tried to use the JMock API for this and i could inject the Mock DAO objects into the Business objects manually.

But i thought that it is a dirty way to inject mock objects. The difficult thing i could face using JMock is in setting up the mock data and injecting the mock objects manually.

As i am already using Spring framework for my application, i thought of making use of Spring for unit testing and automatically injecting DAO mock objects into BO objects while unit-testing.

Is there a way to define mock objects, setting expectations for mock objects, maintaining test
(kind of binding) using spring specifically using Spring configuration files. (in a configurable way)

Hope i am clear on my requirement. Thanks in advance for your time and attention.
13 years ago
Hello ranchers,

I am facing a strange issue in IE6,7 browsers.

I have a TestLink text and a image test-icon.gif inside a anchor HTML element.

Below is the code to open a child window when user clicks on the TestLink link or test-icon.gif image. when user clicks on the TestLink everything is fine as expected but when user clicks on the test-icon.gif the child window opens but the parent window gets redirected to undefined url.

As i said above it is observed only in IE6,7 browsers.

FYI: In the above code, i have used a span element inside a anchor element as i want only the TestLink text underlined inside the anchor element not the image test-icon.gif inside the anchor element.

Any help is really appreciated, thanks in advance for your time and attention.

Peter, i am using the below Spring class to make stored procedure calls.


13 years ago

Recently we have migrated from Spring 2.5 to Spring 2.5.6 SEC 02 version.

We see below error when we perform a database (DB2) call.


The SQLCODE -470 is returned when NULL values are passed to IN/OUT parameter of the Stored proc. But i could see that the parameters are getting passed as expected.

Also, when using the previous spring version(2.5) the db calls were working fine but when we moved to Spring 2.5.6 SEC 02 version we are seeing this strange issue.

Iam unable to figure it out the reason why spring 2.5.6 is behaving this way.

Any help will be really appreciated. Thanks for your time and attention in advance.
13 years ago
Thanks for your reply. This is a stand alone application so i cannot make use of any HTTP scopes like session, application.

Please let me know if it can be achieved in any other way.
Currently i am working on log4j stuff for my application. I have a specific requirement of logging. I need to define a logger for a specific call hierarchy.
Meaning all the log messages of a specific call hierarchy should go to a specific appeneder.


AddFormAction(method1) ---------------
EditFormAction(method2) --------------|---------- FormBusinessObject(method4) ------------- FormDAOObject(method5)

I want to define a logger for a specific call hierarchy 1 - 4 -5. These messages should goto addform.log.

I don't want the messages from 2-4-5 or 3-4-5 call hierarchies to go to addform.log.

Hope iam clear on my requirement. Any help is highly appreciated. Thanks all in advance for your replies.
Thanks kalai for responding.

Here is the process i followed.

1) I have downloaded & installed Apache HTTP Server 2.0 from
2) I copied, files from weblogic to apache modules folder.
3) I added the following code at the end of httpd.conf file of Apache2.0

4) In the same httpd.conf file, i have changed the Server port. Thats all.

One interesting thing that i observed is the pages is loaded perfectly fine in IE (8), but in firefox(3.5) they are not loading properly.
I think i have missed some other important configuration. Please help me.
13 years ago
I have integrated Apache2.0 web server with Weblogic 8.1.

My application is deployed on Weblogic server.

But when i access my application through web server, the scripts, css are not loaded so the pages are not loaded properly. Also as the javascripts are not loaded front-end elements are not loaded on the page.

I think i have failed to integrate the two servers completely.

Any suggestion for this problem is highly honored. Please respond me at the earliest as iam in need of it urgently..

Thanks in advance
13 years ago

I am working on struts 1.2 framework. I need to set a value of 'Accept-Encoding' in the http request header whenever

1) user clicks a link on the page.
2) user pastes the url in the address bar and hits go.

I need this for gZip compression.

can it be done in the back-end or front-end.

I googled a lot, but i could not find any solution for it.

Thanks in advance

14 years ago

I need a multiple file upload AJAX component. The requirement is each file should able to be uploaded individually with a individual submit button.

Also individual progress bar should be there. I am ready to go ahead with any suggested JavaScript frameworks.

Please let me know at the earliest. Let me know if you are expecting any more inputs from me.

Thanks in Advance for your time and attention.
HI ranchers,

I am currently working on a web project which uses struts for MVC, spring for IOC. We have used log4j for logging as usual.

But i want to remove that logging concern which is in each and every method, and centralize it using Aspect oriented programming.

Even based on the exception i want to log a particular level like if ValidationError log ERROR and if DBException log FATAL.

I want to incorporate AOP logging in all the business classes and database access classes. can this be achieved using AOP?

For AOP i have spring AOP and AspectJ. Please tell me the advantages over each other. so that using one of it adds some value to my application without any performance overhead.

Please share some urls...

Thanks for your time in advance.

14 years ago