Karthik Vaidiswaran

Greenhorn
+ Follow
since Jan 11, 2005
Merit badge: grant badges
For More
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 Vaidiswaran

I think the visibility of the protected method [doProtectedMethod2()]is due to the import statement (import chapter1.fruit.Banana in fruit.java

Please correct me if I am wrong.

Thanks
Karthik
Hi Valentin Tanase

Thanks for the reply

Thanks
Karthik
I found this in jGuru- EJB Tutorials

In stateful beans, passivation means the bean's conversational-state is written to a secondary storage (often disk) and the instance is removed from memory

To my understanding, removal of bean instance from memory should be done by the remove() method. Does passivation call the remove() method?
Please clarify this.


Thanks
Karthik
I am having problems with deploying jar files in TOMCAT. I am using TOMACT version 5. I created a web application and copied a jar file into /WEB-INF/lib directory and restarted TOMCAT. The jar file is not getting deployed.

I came to know from some forums that problems like these exist only in older versions of TOMCAT (version 3). I am not able to understand why this exists in version 5 of TOMCAT.

Please clarify this.

Thanks
Karthik
19 years ago
Dear Mr. James,

Thanks for replying. I dont have any tag by name <jsp-config> in my web.xml.
I downloaded jar files for JSTL from apache.org. I have given one of the jar files (standard.jar) as reference in my IDE. Now I am getting an exception which says

[Servlet Error]-[javax/servlet/jsp/el/ELException]: java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException


Please advise in this regard.

Thanks
Karthik
19 years ago
JSP
I am trying to write a Hello World app using custom tags.
I am using IBM Websphere Studio App Developer -v 5.1


When I include the taglib directive as shown below
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

,I get an error message saying
Broken link: "http://java.sun.com/jsp/jstl/core

Please advise in this regard.


Thanks
Karthik
19 years ago
JSP
Hi Ram,

Thanks for the reply.


Regards
Karthik
19 years ago
I call openConnection() method on a URL object. I try to assign this to HttpURLConnection reference ,

url = URL(...); //LINE 1
HttpURLConnection huc = url.openConnection(); //LINE 2

I am getting an error which says

incompatible types
found : java.net.URLConnection
required: java.net.HttpURLConnection
huc = url.openConnection();

When I do System.out.pritln(url.openConnection().getClass()), I get something like
classs sun.net.www.protocol.http.HttpURLConnection.

I expected the class to be of type java.net.HttpURLConnection. Please tell me why the class is different. Please help me in fixing the error I get in line 2 of code

Thanks
Karthik
19 years ago

Originally posted by Anand Koppal:
I1 []i1 = (I1[])obj; // 4 Here at runtime obj refers to base object and is assigned to object of type I1 which is parent of base. Definitely this is valid at runtime.

Hope this clears



I think i1 is not parent of base. I1 is an interface reference to an object of type base. I feel Line 4 is valid at runtime because an object reference (obj) can be casted to an interface reference (i1) if the object's class implements that interface. (class base implements I1 in this case)

Please correct me if I am wrong.

Thanks
Karthik
Java performs an implicit narrowing conversion if certain conditions are satisfied.
Please go through this page
http://www.absolutejava.com/main-articles/data-type-conversions/


Thanks
Karthik
19 years ago
Hello Ben,

Thanks a lot for the reply.

Regards
Karthik
19 years ago
My doubt is about getParameter method of the HttpServletRequest object. I have a form that submits 3 values(HPUnix, Solaris, Linux). When I retrieve these values and display them I get the values in reverse-alphabetical order , i.e (Solaris, Linux, HPUnix). I think that parameter values from a form are submitted in the order in the which the corresponding elements appear in the form. I assume that the reverse alhabetical order is because of getParameter method. Please let me know whether I am correct.

Thanks
Karthik.
19 years ago
Thanks for all the replies.It was helpful

Karthik.
19 years ago
Methods declared in an interface are implicitly public and abstract. These methods cannot have modifiers such as static/native/synchronized/strictfp.

Fields (member variables) in an interface are implcitly public static final.

When you consider modifiers for interface itself, they can be private/protected for Nested interfaces. Nested interfaces are implicitly static. You cannot apply private/protected/static for top-level interfaces.

Refer http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html#235947 for more details.

Thanks
Karthik.
19 years ago
Hello,

This is regarding your question about inner interfaces.......

Member Interfaces are never INNER. Member interfaces are always implicitly static. This is from JLS http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#262890

Thanks
Karthik
19 years ago