Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Roy Simon

Ranch Hand
+ Follow
since Aug 26, 2005
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 Roy Simon

Is it possible to switch the phone to silent mode from a j2me midlet.. If so can some one lead me in the right direction..
10 years ago
There is a syntax error in your query
//statement.execute("insert into ip_table values(address)")

this should be
string query = "insert into ip_table values('" + address + "')";
statement.execute(query);

Regards
Roy
[ March 08, 2007: Message edited by: Roy Simon ]
Click me
Check out that link... 12 years and 3 months... Just awesome....
11 years ago
hey ppl....
Dont reply not you and not me...
Put in your age...

Regards
Simon
11 years ago
Who is the youngest SCWCD??

Am just curious to know...

Thanks..

Regards
Simon
11 years ago
hi...
I took up the SCWCD exam this morning and passed with 84%
The exam was quite simple..
Thanks to all...
Regards
Simon

I am talking about "obj" and not the Object that "obj" points to.


if the Object that obj points to is not thread safe... How can obj be thread safe.. ?? obj is just an handle that refers to the Object on the heap..

Regards
Simon
hi
i, req and res are thread safe...

i is thread safe because it is declared final.
req and res are thread safe because there is only one object of each for each request... unless the goGet() or doPost() create threads and pass the request and response when creating them.

session objects are not thread safe.. it should be noticed here that a session object is not a local scoped object... the session is captured in the request via cookies.. so the state remains even after the service method completes...
the same can also be said about the servlet context and the Object 'obj' Eventhough the Object 'obj' has method scope.. it refers to a object(attribute) that can be accessed globally...

Regards
simon
For tag files its.. Scriptless... but for custom tags.. its mandatory...
hi,
Yes dude i think u are right well atleast thats what the HFS book says....
"if there were not <http-method> elements in the <web-resource-collection>, it would mean that NO HTTP methods are allowed by anyone in any role...".. well i too have the same interpretation as u \
Regards
Simon
hi,

have a question on web-app security...
when having more than one <security-constraint> elements in the DD with conflicts... the HFS book describes how the various conflicts can be resolved...
here is the DD..

<web-app>

<security-constraint>
<web-resource-collection>
<web-resource-name>Something</web-resource-name>
<url-pattern>/me/Display/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint/>
</security-constraint>

<security-constraint>
<web-resource-collection>
<web-resource-name>Something</web-resource-name>
<url-pattern>/me/Display/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint> ///this or is this tag is not included at all...
<role-name>*</role-name>
</auth-constraint>
</security-constraint>

the book discusses all combinations except this one ... one that allows all roles to request and one that allows none to access... though the DD may not make sense nevertheless it is one valid combination...
The HFS book says that an empty <auth-constraint/> has the final word but the next line says that --- "If one of the <security-constraint> elements has not <auth-constraint> element then it combines with anything else to allow access to all"...
so does the abv combination allow access to all roles or does it prevent access to all....

Regards
Simon

[ May 16, 2006: Message edited by: Roy Simon ]

[ May 16, 2006: Message edited by: Roy Simon ]
[ May 16, 2006: Message edited by: Roy Simon ]
hi,
the output would be option a followed by option b
the reason is that before a subclass object is created its super class instance is initiated first (its like every sublass object has a super class object inside it)

Regards
Simon
hi,
u can communicate with other java programs using sockets or RMI..
Regards
Simon
12 years ago
thats what i am trying to say... the wrapper classes have overriden the .equals() and the hashcode() method and may have used the instance of operator to check for the class type..... since wrappers are primitives wrapped in objects.. just think of it ... can two objects of two different classes be same.. its the same argument here...
hope this helps
Regards
Simon