Rodrigo Vieira

Greenhorn
+ Follow
since Jul 04, 2008
Merit badge: grant badges
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 Rodrigo Vieira

What is the better choice thinking about performance and less memory use:

A:
List<MyObject> myList = new ArrayList<>();
MyObject myObject = null;
for (*****){
myObject = new****;
myList.add(myObject);
}


B:
List<MyObject> myList = new ArrayList<>();
for (*****){
MyObject myObject = new****;
myList.add(myObject);
}
8 years ago
you can use, for exemple:
ses.invalidate();
ses.getAttribute("test");
ses.isNew();
or all the other methods from interface HttpSession.
I didn�t get what you mean when you say => Because it is not possible to declared an object of interface(HttpSession).

ses is an Object of HttpSession...
Hi Higor,
I am from Rio but now living in Brasilia. What about you? did you take SCJA? I am serious thinking about try this before SCBCD, do you have any suggestion about good books in portuguese?
I just passed yesterday with 78% score. I have been studying for 1 month and 2 weeks, very short time for someone who works 8 hours per day and is 24 years old. I live a normal life to my age, it means that I go for a drinks with friends every week, enjoy my girlfriend and I like to travel to beaches and amazing waterfalls that we have in Brazil, reducing my time for study. However, I work with J2EE since 5 years ago, what gave me a experience that helped a lot to understand the knowledge needed to the exam.

This community is fantastic and was the main guide for me to decide which way to study, i really want to say thanks to everybody that make this the best java community.

I also have some complains about this certification experience. First, I bought HFJS, that is a very good book, thanks to the authors, but unfortunately I got one translated to portuguese(because of my short time), that has a lot of translations mistakes, specially in the mock exams. And i disagree with the final exam of HFJS to don�t give us the answer, some question just say a reference where we can find the answer, what make us to lost time with questions that we don�t need to study more, specially if we don�t have enough time. Another problem that i had, was during the exam, I didn�t know that we can�t go for a toilet and I have drunk a lot of water before, it was terrible, i asked for the receptionist of prometric place but she said that is not allowed.

Now I am deciding if I will keep studying hard to EJB certification or if i will take a holiday in my free time studying to Java Associate.
Sandeep Bhandari, I think you made a mistake, the method to put attributes in the request is setAttribute(), not addAttribute().
These attributes are available to the requestScope implicit variable. The diference between this variable and pageContext.request is because the second one have acess to other methods of HttpServletRequest while requestScope is limited to acess attributes.
The problem is not with us, unfortunatelly the prometric system was not made by ranch programmers, soh there are a lot of mistakes that suggest us that our ID has been lost, so its a normal behavior to create another one. I wrote a mail explaining this but i don�t thing they care about this.
Manifest should be always edited, this file is used to create a classpath of your application, so you can write the reference of all yous libs there. It�s much better then put in the WEB-INF/lib because if you have more then one application using the same lib you are spending your hard disk. Also, creating a reference when you change the version of this lib, all of your applications will change as well without create new WAR.
[ August 04, 2008: Message edited by: Rodrigo Villelaaa ]
maybe C is correct as well, because when you call super you are referecing BodyTagSupport thats implements the method getAncesterWithClass() but i am not 100% sure.
request and page have a similar behavior, the difference is that page works only for JSP, not in servlets. Also, If you forward from a jsp to another jsp the request will keep but not the page.
I will try:

1) How usebean standard action behaves when type attribute alone is used?
TypeClass x = (TypeClass)request.getAtttribute("attribute");

Please explain with an example.

a) if type alone is used, will both the reference type and the object type will be the same as the value of type attribute ?
If the type is used alone you must have an existing attribute, so the server will never instaciate this object, it means that doesn�t metter the object because the server will always do like in question one. If he tries to create a new one and error will occur.

2) If we use page scope in usebean, will it search in all the scopes or just the page scope?
just in the page scope



Kindly explain !!
Which language is your book? My book is cleared true but in other language. I believe that you hidden one important part of the statement.
it�s impossible. In web.xml is allowed to pass just a string value. If you want a list you should use ServletContext.setAttribute("newList", new ArrayList()).
In the confirmation email for schedule SCWCD i received this information:
Appointment Duration: 03:15 [hh:mm]