Andy Jung

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

Recent posts by Andy Jung

Hi all,

why do most HttpSession methods like setAttribute(), getAttribute(), getAttributeNames(), removeAtrribute(), getCreationTime(), getLastAccessedTime(), invalidate(), isNew() declare an IllegalStateException in their throws clause and methods like getId(), getMaxInactiveInterval(), setMaxInactiveInerval() do not?
I mean if, the session has been invalidated before calling the latter category of methods, shouldn't there be an exception of this type as well?
What happens then, if I call HttpSession.getId() after the current session has been invalidated?

Kind Regards, Andy
Hi Frits,

thanks, so I just rely on the container-implementors that they do it right, no matter how they achieve this (by reflection, etc. ... ).

Kind regards,
Andy
Hi all,

if I do a OPTIONS http-request to my specific HttpServlet, how does the standard doOptions()-method know, which HTTP-methods I support? Is this done by reflection ?

Kind regards,
Andy
ok, thanks Frits, so it's just a matter of definition in the API. I just couldn't follow the awkward explanation in my study companion.
Hi,

suppose the current servlet is deployed under the context root "/". What does HttpServletRequest.getContextPath(...) return?
My study guide says "", but I don't really understand why this isn't "/" ?
I quote:

... the context path never ends with a /, and therfore "/" maps to "".

.
I just can't follow that statement.

Kind Regards,
Andy
yes, thanks Frits, so I conclude that the following statement always evaluates to true:

and the same is with getInputStream(), getWriter(), getOutputStream()
Hi,

when calling getWriter() following a call to getOutputStream() on a ServletRequest and vice versa results in an IllegalStateException.
1. What happens, if multiple calls are made to either getWriter() or getOutputStream? Same behaviour?
2. In case calling getWriter() multiple times doesn't throw a RuntimeException, are the returned references identical or different?

Kind regards,
Andy
... special thanks of course to roel de nijs and roberto perillo, who gave valuable and professional advice in this forum !
14 years ago
... isn't it already sufficient to invoke my jar (ts.jar) with -cp option where the classpath is specified?
All the libraries are located under $TAPAS_HOME/lib/ .



Nevertheless, the classpath is also resolved in the manifest-file as follows:





sorry, I didn't express myself correctly.
The jarfile, where the driver is located, is outside my jar of course. However the Java statement, which is to load the driver is inside my jar.
Hi all,

Want to load a DB2 Driver within an executable jarfile. The following statements all work if not jared, but don't if they are to be executed within a jar (ClassNotFoundException):




What's the solution to this? Do I need a special ClassLoader for the jar?

Kind regards,
Andy
Hi all,

passed the SCJD exam !
Today, Aug 9, I got an email from Oracle, which said, that I passed the exam. I submitted the exam on May 20.
However, I am disappointed, that there's no score anymore, just pass or fail grade.

Thanks to all, who gave advice in this forum.

Andy
14 years ago
... ok, that's fine, I submitted the project yesterday anyways ...
Hi all,

The assignment says:

Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package.



"Java in a Nutshell" defines member classes this way:

A member class is a class that is declared as a non-static member of a containing class.



I just placed those exceptions (RecordNotFoundException, DuplicateKeyException, SecurityException) in package suncertify.db,
without making them inner classes to any containing class.

Did I violate this requirement ?

Kind regards,
Andy


<rmic classname="suncertify.db.UrlyBirdModelImpl" base="build/classes"/>



Hi Ralf,

seems like you have exactly the same nomenclature like me .
I also named my model "suncertify.db.UrlyBirdModelImpl".

Kind regards,
Andy