anindya halder

Greenhorn
+ Follow
since Oct 03, 2012
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by anindya halder

Any solution?? I am facing the same problem too........
Runs fine in localinstance and throws nullpointerexception in live instance...
7 years ago
Hi Everyone...

I am trying to set property name of the bean dynamically in <jsp:setProperty> .

I found out that when a field value is empty,bean is not called implicitly by <jsp:setProperty name="someName" property="*" />.
Therefore I am trying to do it forcefully ......
As there are two many fields I dont want to do it individually and trying to do it dynamically like this........


<%

for(Enumeration e = request.getParameterNames(); e.hasMoreElements(); ){
String ParameterNames = (String)e.nextElement();

if (request.getParameter(ParameterNames).equals(""))
%>
<jsp:setProperty name="adetails" property = "<%= ParameterNames %>" value="" /> ;

<%
}
%>



But I am getting an error....
Cannot find any information on property '' in a bean of type 'tdcbeans.ApplicationDetails'

[adetails is the object of 'tdcbeans.ApplicationDetails' class.

Please help.
8 years ago
JSP
Hi AmritP,
I will try to explain you...hope you understand.....

Look carefully at class Alpha....its STATIC beta b1.

because b1 is a static variable of the class,its not confined to one object but to the whole class. So a1.b1 is same as a2.b1 ...Actually its Alpha.b1.

When we are writing a1.b1 = b1 ,implicitly a2.b1 is also referring to the object referred to by b1 (i.e a2.b1 = b1)
(please look carefully.....same names have been used to confuse us........ a1.b1 and and a2.b1 refers to the static variable of the class Alpha...........and b1 is the object of class Beta).


And so you can realize now that though we are nulling references a1,b1 and b2.......still a2.b1 is referring to b1 and therefore the object is not elligible for gc.

Hope this helps.

8 years ago

Mansukhdeep Thind wrote:There is nothing called static polymorphism as far as I understand. I don't know who coined that term. Read this article. Polymorphism is related to method overriding in Java i.e. when a class inherits a method of its parent class by extending it, and re-implements it in its own specific manner. Hence depending on the type of object at run-time, that class's method will be called.

@ Campbell : Have a look at this article. Don't you think he is talking non -sense when he says that method overloading is a type of polymorphism? Isn't he wrong? Or is my understanding flawed?



Got the idea.thanks a ton!!
8 years ago
Hi all,
As far as I know polymorphism is how how a single object can take different forms according to situations...
and static polymorphism can be achieved by method overloading and dynamic polymorphism can be achieved by method overriding?

I am ready KS book for SCJP exam......where its written method overloading is not polymorphism.......

Can anyone explain me why...........??

8 years ago

Niraj Jha wrote:in the action write "Login.jsp".If you write Login then it looks for similar url mapping from web.xml as what we are doing in case of servlet



Thanks a ton :)
8 years ago
JSP
I have a HTML page......simple one...a form with a input text field and a submit button.
<form action="Login" method="post">

when I submit the form I want my Login.jsp file to be called.

I have not done any configuration in web.xml because as far as i know the jsp file will be automatically converted to a servlet.

But when I am running the application...its giving error like..

type Status report

message /LoginJSPDemo/Login

description The requested resource is not available.


Please help.
8 years ago
JSP