Pavan Sambare

+ Follow
since Aug 21, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pavan Sambare

Thanks Marco. What kind of license does the RI have? Have you used it in production?
When you load a JDBC driver you use Class.forName to load it. Any reasons why?
What I thought is that you can pass an externalized string to Class.forName and thus use any Driver at runtime.
Does it also have to do something with ClassLoader hierarchy?
Which seems to be the best implementation for JAXB? Is the RI good? The other one I found is Apache's JAXMe. Has anybody used this impl?

Any feedback is appreciated.
One feature of EE 5 or rather Java 5 that is found in SCWCD 5 is that of autoboxing.. e.x. There are questions which set primitive variables as attributes in session, etc. and ask if that is ok. This would not have been possible in Java 4 but as a feature of Java 5, it is possible.
Thanks everybody for your wishes :-)
13 years ago
Sessions are actually specific to your servers. JSPs/Servlets live on a web server and web servers have HttpSession objects in which you can store a user's session info.
EJBs live in an application server. The Session EJBs (either stateless or stateful) are totally different from the web server sessions. The stateful EJBs maintain their state across different requests from a client. It is not a session but a State of the EJB. i.e. values of it's instance variables.
I feel the thing is more to do with buffering. The getWriter() method returns a PrintWriter which actually wraps the OutputStream. It buffers the things you put in writer.println() before actually pushing them to the output stream. Hence if you do a forward before the stream is flushed/buffer is full, you will not get an IllegalStateException.
Whereas if you directly write to an OutputStream, the response is sent immediately and that is why you get the IllegalStateException.
I studied from K&B Head First Servlets and JSP and it is really good. Main thing is you dont get bored reading the book :-)
I had studied from the K&B book and the specifications for JSP and Servlets downloaded from Sun's site. This is all the material I used for studying.
13 years ago
I cleared the SCWCD 5 with 97% on this Saturday . Thanks a lot to this site and forums for all their help.
I studied from the Head First Servlets and JSP book and the Servlet and JSP specifications.
Had not studied the c ut tag properly and that is where I lost my marks.
13 years ago
You will not be able to set only int/float as the setAttribute method's signature is request.setAttribute(String, Object). You would need to set them as Wrappers.
Yes you can. Because an int[] is also an object and not a primitive.
Option 5 also seems correct. Till all the threads spawned by this Servlet instance are not done, the destroy() should not be called as destroy is called only when removing the instance from memory.

Can someone please confirm?
Yes. Effective 1st May 2008, only SCWCD 1.5 is available.
The simplest way to clone an object is to serialize it and then deserialize it into a new reference. Only thing for this is that your class should implement Serializable.
15 years ago