Aarav Thomas

Ranch Hand
+ Follow
since Dec 17, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Aarav Thomas

I'm new to web service. I'm using only Java SDK to create web services.

I'm writing some simple web services for testing and I have the following questions.

I have read that JAX-RPC supports array of primitive types. But when I write a simple web service.



and generate the client code from wsdl i get the following WS client interface.



It generates IntArray class having the member protected List


Is this how the arrays are supported in JAX-RPC? So, the only way to pass the array is to create an instance of IntArray and set List of Integers to it?

Also when i make the webservice to Document style

The WS client interface from WSDL has the following method:



The int[ ] array in the original service, became List< Integer>. Same is the case when i try using String array, it becomes List of String.

Does this mean that Array type in the web service is always converted to List in the client code generated from wsdl?
11 years ago
Hi,

I'm trying to get the JSP file name in my custom tag. So, i'm using the following code to achieve it.



But i'm getting the following error:

[Servlet Error]-[/WEB-INF/pages/auth/Signon.jsp]: com.ibm.ws.jsp.JspCoreException: /WEB-INF/pages/auth/Signon.jsp(29,83) JSPG0055E: Unable to create an xml attribute from name [${pageContext.request.requestURI}] value [/>]
at com.ibm.ws.jsp.translator.document.Jsp2Dom.getJspDocumentAsJspPage(Jsp2Dom.java:300)
at com.ibm.ws.jsp.translator.document.Jsp2Dom.getJspDocument(Jsp2Dom.java:179)
at com.ibm.ws.jsp.translator.JspTranslator.<init>(JspTranslator.java:73)
at com.ibm.ws.jsp.translator.JspTranslatorFactory.createTranslator(JspTranslatorFactory.java:116)
at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:229)
at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:114)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:501)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:428)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:290)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:145)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:286)

But when i try to print the file name as follows, then it prints the file name correctly:



Can some please explain what is wrong in the below code? Any help in this regard would be much appreciated.



(There seems to be no issues with my custom tag, because when i put some random literal string in place of then my tag works fine.)

Also please note in the custom tag; "pageContext.getRequest()" gives me an instance of ServletRequest; so i can not use "pageContext.getRequest().getRequestURI()" in my custom tag.
14 years ago
JSP
Thanks Srikanth for your valuable inputs!

Actually i have basic knowledge of JSP and Servlets, as i have 4 years of work experience. But i have never worked in EJB and i just wanted to learn.
So, thought of preparing for SCBCD.

I'm starting my preparation with the book 'EJB 3.0 in Action' as suggested by many in this forum. Also i'll be doing some mock project to understand the concepts well.

once again thanks for your inputs...
Hello Ranchers,

I have just completed SCJP 5.0 with 91% on 10/31. Now thought of preparing for SCBCD. I have never worked in EJB and i don't even know a b c of EJB. I'm completely new to this technology. I have to start learning from the very beginning and i hope i'm in the right forum.

Really had nice time in the SCJP forum and i'm hoping that i can make good friends in this forum as well.

I have gone through SCBCD FAQs. And i just wanted to from the folks who are preparing for SCBCD, who have started from the scratch with no knowledge of EJB, how much time is required to completely learn EJB from scratch and be ready for the test? (I know the obvious answer from many people might be 'It depends..'. I just want to know in general, the approximate time.)

Hoping to have good time in this forum
Hello Dear Ranchers,

After one month of rigorous preparation, today i cleared SCJP 5.0 with 91%. The score was way below my expectations and i was very much disappointed when i came to know the score. But i think that is what i deserve.

Anyways this is really a some sort of success and this has definitely boosted some confidence in me.

I would like suggest something here, more on a stupid thing i did in the exam. Try to finish exam as early as possible and spend some time on reviewing all the questions. You might have overlooked something in the first pass, which you can correct in the second pass. I thought i have lot of time and i started solving the questions so slowly (than necessary) that i had only 20 minutes left by the time i answered 72nd question. So, in fact i didn't review any question i answered in my first pass. And when i see my score card, i feel i might have done some silly mistakes over easy questions:

My score :
Declarations, initialization and scoping - 100%
Flow Control - 90%
API Contents - 100%
Concurrency - 62%
OO Concepts - 80%
Collections/Generics - 100%
Fundamentals - 100%


I prepared only with K&B book and i would like to thank Kathy and Bert for such a wonderful and lively book. I would strongly recommend this book for SCJP aspirants.
Also i would like to thank all of you who helped me to clear all my doubts. I have really learned many new things on this forum


I practiced with Whizlabs product. But unfortunately i had only last 4 days left to practice, and could not finish all the tests. With my hectic work and being on production support 24/7 with pager in my hand all the time, it was really difficult to concentrate on my preparation (BTW i work for an MNC in US (worked only 2years in Java that too Java 1.4)). I'm really glad that it's all over now.

I would suggest that practice as much as possible and try to study all the APIs well (Related to Generics, File IO, String etc.). Of course with all the new IDEs we use in our projects we don't have to remember all the APIs but unfortunately for the exam you need to know them. You should be aware which classes have what methods (For eg: i was not aware that even StringBuffer has substring() method. i thought only String class has it.). And lastly the real exam is not as tough as mock exams (of K&B and Whizlabs). I would say that with 2 months of dedicated preparation one can easily score close to 100%, if not 100%.

I still remember my first message i posted 2 years back when i started learning Java and it took quite some time for me to understand reference type casting. At that time i didn't even have the knowledge of OOP concepts and i had not studied any good Java book. And then i was busy with my regular job and didn't visit this forum. After my first 4 posts i visited this forum after two years when i decided to take SCJP 5.0 on Sep 28th. Immediately i bought K&B book and started studying it whenever i had time, and i used visit this forum regularly. I already knew few concepts of Java 5.0 so it was not very difficult to prepare for the exam and the book is really marvelous.

After spending one month on this forum i would really like to keep visiting this forum often.

Once again Thank you all!!!
15 years ago
Thanks Ankit!!! it makes sense now.
I've studied generics, and i know that the type safe are removed through type erasure during compilation. But the way i used to interpret the code was; whenever there is a class type is defined, i used to replace all the occurrences of generic type with the class type. for ex, in the above code:

Test<String> t = new Test(new Integer(1));

As Test class is defined with a generic parameter type 'Test<t>' and in the above line, the reference is defined as 'Test<String>', in my mind, i used to replace all the occurrences of 'T' with 'String' to check for compiler errors. I'm confused here, because the constructor is defined as 'Test(T g)' and in the above code we are passing Integer in the constructor and the parameter type is String.

I know my stupid brain is missing something here and i'm hopelessly confused. Can some one please clarify this with good example.
Actually i was comparing the above code with the below one:

I'm taking SCJP 5.0 shortly. But really scared of generics and File IO stuff

I was playing with generics and i'm unable to understand why the following works:


Can someone explain why the statement in main method works?

I thought when we create a reference of type 'Test<String>', then all occurrences of 'T' should be replaced by 'String'. But looks like that's not the way it works. There is no constructor that takes Integer and we are creating a reference of type 'Test<String>'. I'm totally confused

[ October 25, 2008: Message edited by: Aravind Jerubandi ]
[ October 25, 2008: Message edited by: Aravind Jerubandi ]
Thank you so much!!!

I got it. Don't know why it didn't strike to me...
When i check the java doc 'ExceptionInInitializerError' extends 'Error'. But i'm able to catch it with 'Exception' class as shown below. When i replace 'Exception' with 'Error' in the below code it doesn't catch the exception/error!!!

Is 'ExceptionInInitializerError' an exception or an error? Someone please clarify.




[ October 25, 2008: Message edited by: Aravind Jerubandi ]

[ October 25, 2008: Message edited by: Aravind Jerubandi ]
[ October 25, 2008: Message edited by: Aravind Jerubandi ]
I think yes. As long as you are able to register in prometric it should not be a problem. Prometric will not object you from taking the exam if you are allowed to register.
I read the API regarding finalize method but i'm unable to understand the following line

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.


Can someone explain what does this exactly mean. As per my understanding the exception will be ignored but the object will not be garbage collected. So, does this mean the object will never be garbage collected?