Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp

Hariom Tiwari

Greenhorn
+ Follow
since Jun 15, 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 Hariom Tiwari

Hi,
I have to display a button's value in two lines.
for example
hello
hello
how we can do this?
Hi all,
I have to return true or false from a Map. I have extended the HastTable class for this.
Please see the below code snippet.
public class MapUtil<S,B> extends Hashtable<String, Boolean> {
public boolean get(String key){
Boolean isAvailable=(Boolean)super.get(key);
if(isAvailable!= null)
{
return isAvailable.booleanValue();
}
else{
return true;
}
}

}
I have set values as follow:
Hashtable<String,Boolean> operations= new Hashtable<String, Boolean>();
operations.put("Review_DeleteQuote", true);
remoteEvents.setOperations(operations);
when I am trying to read it like
CustomerProducts.setOperations(remoteEvents.getOperations());
it is throwing java.lang.ClassCastException: java.util.Hashtable exception

I have written setOperations() as below
public static void setOperations(Hashtable<String, Boolean> operations) {
CustomerProducts.operations = (MapUtil<String, Boolean> operations;
}

please let me know where I am doing mistake.
9 years ago
Thannks Eric.
Is there any work around?
Hi Friends,
I have to display a confirm box with a string in bold ie "Changes not Saved ..." and some more text.
Is there any solution to this.
Please help me out.
Hi...
I want to create javadoc. My script is working fine except its not creating index-files folder.
Please help me out.
Thanks
9 years ago
How does unknown attribute work in <action> element.
I am not getting it.What should be the action in form and what should be the value of path attribute in <action> element?
Can someone please explain it with an example code.

thanks
10 years ago
just out of curiousity.
I guess there needs to be any such mechanism.In case thousands of requests come for a particular servlet ,wont performance drgrade?
10 years ago
Hi,
Is there any way to set Thread pool size for a particular/general servlet?
10 years ago
Hi All,
In doPost/doGet method we call all methods on request/response, while they are references only and the methods being called are also abstract.
My understanding says methods can be called only on objects.
Please tell me the mechanism behind this behavior.
10 years ago
My undersatnding says that we use <servlet-name> to tie a <servlet> elemet to a specific <servlet-mapping> element.e.g.

<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>myservlet.class</servlet-class>
<servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/myservlet</url-pattern>
<servlet-mapping>

My concern is why can't we use something like

<servlet>
<url-pattern>/myservlet</url-pattern>
<servlet-class>myservlet.class</servlet-class>
<servlet>

after all <servlet-name> is being used internally.
10 years ago