Allen Bandela

Ranch Hand
+ Follow
since Feb 16, 2006
Allen likes ...
MS IE Eclipse IDE Tomcat Server
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 Allen Bandela

I just want to inform that the setFetchSize method of ResultSet proved very useful in retrieving the data quickly from the database. I was returning large number of records (~6million).
10 years ago
As far as I know I'm not removing it from session anywhere else in the application.
The attribute is being found in ServletContext but not in Session.
11 years ago

I'm trying to store an ArrayList object in HttpSession, serializing the objects it contains. But, I'm unable to find that attribute in session, next time I retrieve it.
This doesn't work even if I stored a plain String object in session.

I was however able to store and retrieve the same objects from ServletContext.

Why could this be happening.

11 years ago
The installation manager hangs while installing websphere application server v 7.0 test environment in a RAD 7.5.5 package. I notice a java.exe process is created before it is hung. I think that process is related to 'update installer' for WAS 7. I've searched the internet for help on this but didn't find any.

I read that WAS v 7.0 is compatible with Windows 7. I'm using Windows 7 professional 64-bit. I'm installing the 32-bit version of WAS 7. Please advise.
11 years ago
My goal: to get to the binary data of the response and cache it. The requests are for zip-files such as /2/ . I'm using an IBM objectgrid as a cache.
My code:

My response wrapper code:

How can I get access to the zip-file in the response, in order to cache it.
While debugging, I noticed that the getOutputStream() method of the responsewrapper is not called. I was assuming that the container would call it. All I found while debugging that the responsewrapper had a SRTServletResponse within it that had my file data (mime-type:application/x-zip).
12 years ago
The server may be crashing due to a use-case not being replicated on the local system.

You can generate thread dumps when a crash is imminent. This may help identify the code causing the server crash.

If you are going to generate a thread dump, a nice procedure to analyze is generate multiple dumps between small intervals and determine if any thread is in the same code in all the dumps. This code could then point to the issue.
13 years ago
Hi Sateesh,

It appears that you want to display the states in the second combo box based on country selected in the first combo box. If that is correct, then the following is one way to accomplish that.

Firstly, it appears that you are storing the country in a variable called 'city'. That's OK. Now, the reason 'city' contains the last value in the first combo box is because it is a server-side variable in the Servlet's service() (or doGet or doPost) method that your server translates to. In your scriptlet, it was last assigned to the last value retrieved from the database, which is the last value in the first combo box.

If you want it to be the value chosen by the user, you have to send the selected value to the server in a new request as follows:

Then use the "ctry" input parameter value to retrieve the state from the database and display in a new page.
13 years ago
the following is maybe what you need.

a. set the action attribute of the button to a logical outcome name
b. set the value attribute of the text field to a bean property using a method expression like value="#{user.input}"
c. within the select one menu in the outcome web page, use the bean property to display the value like value="#{user.input}"
d. within faces-config.xml, add a navigation rule to map the above logical outcome name to actual web page
ex: <navigation-rule>

This rule states that the success outcome navigates to /welcome.xhtml if it occured inside /index.xhtml. I think the <to-view-id> can be same as <from-view-id>, if your select-one menu is in the same page as the text-field. Initially, a blank may be displayed.
13 years ago

what new features does this book talk of.
14 years ago

I've stumbled across an unexpected behaviour (atleast for me) on using the HashMap.put(Object, Object) method.

Would you expect the value assigned to key 'o' to be 3? I did. But, its 2. passing values to method in Java is pass by value, correct? in other words isn't the JVM passing the address in 'i' to put(..) above?

Well, basically, I was going through past code and found this. I thought, hey , there's a bug, 'i' was already incremented . But, it was working as intended.


14 years ago
I think you may need to reload the page as the back button does not actually do that for your code to run. You could probably reload with javascript when the back button is clicked.
14 years ago
Hi, according to this link Configuring a Realm Tomcat 5.5, what you have configured looks correct.

The web application used to process each HTTP request is selected by Catalina based on matching the longest possible prefix of the Request URI against the context path of each defined Context.

- tomcat docs

Your request URI look like /TestRealm/resource. Try specifying the absolute pathname to this directory or war file in docBase.
14 years ago
This is the exception in question: EOF after reading only: '0' of: '85' promised bytes, out of which at least: '0' were already buffe
at weblogic.servlet.internal.PostInputStream.complain(
at weblogic.servlet.internal.ServletInputStreamImpl$
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(

I figure that ServletInputStream is reading the bytes from the stream. It first got the size of the stream. Created a buffer of that size. It then tries to load the stream into the buffer, but fails.

What could possibly cause the stream size to show '85' but have '0' bytes in it. Any ideas?
14 years ago

if the load balancer balances among several web servers, their log might be able to tell you something about the client ?

The content switch (load balancer) does not log such info. as IP address of the client.

I checked our monitoring stats and the load is not quite a lot when this issue occurs. For intance the CPU is low, heap usage is only at 70% and number of sessions are not quite high when this error occured. It looks like the error request is occuring just like any other request at any time during the day.

14 years ago