Varun K. Gupta

Greenhorn
+ Follow
since Jun 14, 2009
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 Varun K. Gupta

Hello Friends,

Today I clarified Enterprise Edition 6 Web Services Developer Certified Expert Exam with 100%. This is what I strictly followed :

1. Read and did every single code given in Oreilly Java Web Services Up and Running - Martin Kalin. I followed this book every page and every code and wrote every single code in eclipse by hand. No copy paste :-).
2. Lots of online quizzes and questions using Google search.
3. IVAN A KRIZSAN Study notes - MUST MUST MUST study. An excellent, perfect and superb reference material. Over my career I have read so many technical books but these study notes is GENIUS piece of ART. It is such nicely written that if follow these notes by every line you will learn much much more. Thanks Ivan for contributing your excellent efforts for Java community. I am very much thankful to you. Did you get a chance to write any study material for Java EE 6 Enterprise Architect Certified Master Exam? Please share the link if you have (even your draft version will work for me )..

Last not least again back to online quizzes and question using Google search to gear up for last minute. Last piece of advice (Don't get confused with many resource available online .. you may stick to limited books but read them thoroughly .. Practice writing Code code and more code is what it requires. )

Hope it will help others who are preparing for this exam. Please let me know if you have any questions or anything you want to add on :-)


Regards,
Varun
9 years ago
Is there any way to set From parameter of AddActionListener with some expression..

SetActionListener listener = new SetActionListener();

listener.setFrom("#{node.id}");

ValueExpression valueEx = facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{myBean.id}", Boolean.class);
actionListerParameter.setValueExpression("to", valueEx);

The code is not getting evaluated at runtime. it is taking it as string #{node.id}

I am getting exception
java.lang.IllegalArgumentException: Cannot convert ValueExpression[#{node.id}] of type class com.sun.el.ValueExpressionImpl to class java.lang.Long
10 years ago
JSF
in jsf I can write something like this:

<af:commandLink text="Save"
actionListener="#{pageFlowScope.myBean.saveMethod}"
id="save">
<af:setActionListener from="#{student.id}" to="#{pageFlowScope.myBean.id}"/>
<af:setActionListener from="#{student.name}" to="#{pageFlowScope.myBean.name}"/>
</af:commandLink>

I need to generate this kind of code programmitically. it generate multiple save links.

Now I can write programmitically like:

RichCommandLink saveLink = new RichCommandLink();
MethodExpression mbForSave =
facesContext.getApplication().getExpressionFactory().createMethodExpression(facesContext.getELContext(),
"#{pageFlowScope.myBean.saveMethod}",
null,
new Class[] { ActionEvent.class });
saveLink.addActionListener(new MethodExpressionActionListener(mbForSave));


but how to set from and to parameters programmitically?
10 years ago
JSF
Hi,

I am using javascript to show confirm popup message like "Do you want to delete" but i have cross browser title issues...

on Firefox : it doesn't show me any title
on IE: confirm popup title is like "Message from webpage"
on Chrome it says: "The page at localhost 8080 says" ...

I need to customize title for all browse like "My title" on popup box.. is there any generic way.. currently I am using only javascript.. no jquery..
yes Mohana, I am excepting only *.pdf it should not show me "All Files" or any other type in dropdown.
10 years ago
Hi

I am using s:file struts2 tag to upload multiple files. I want to restrict file type to PDF or XML while clicking on browser button.

Accept attribute is not supported by major browser. Is there any way when browser button is clicked, the "Chose file to upload" popup contains only File of type as PDF only.. currently it is showing me All File[*]...

10 years ago
Hi Deepak.. Many Congrats! Could you share the tips. Also I just want to know how much a voucher costs to you. Is it the same voucher that can be used for any exam like SCJP, SCWCD 5 and OCE Javaserver pages and servlet developer i.e SCWCD 6 or is it specific to exam?
use name=input.next();

It will not work in case name contains more than one word....

One question why you extends Object class ? There is particulary no need of it. Object class is a super class of every class so each class will inherit all its property. Extends should be used carefully as we can use for extending only one class
13 years ago
use input.next() instead of input.nextLine(), problem will get solved
13 years ago
As far as a method with single parameter is concerned not much difference is involved. However few good points can be consider in case of ELLIPSIS(...)

1) There can be ONLY ONE ellipsis parameter in the method and which MUST be the last parameter. There in no such restriction for String[] version
2) It can be analysed using int printf(String,...) method of C Programming in which it can accept variable number of arguments. like printf("%d",1);printf("%d%f",1,1.0);
3) Elipsis provide a way to define single method defination for variable argument calls with ZERO TO 'N' number of arguments of same or type that can be IMPLICITLY CASTED to that parameter.
4) Ellipsis version comes with 5.0 version.
5) Ellipsis provides more freedom as compare to array[] version.

No hard rules which to use when.
13 years ago