mohamed ewis

Greenhorn
+ Follow
since Feb 05, 2006
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 mohamed ewis

hi , all

What is true about Java EE authentication mechanisms?

1- If your deployment descriptor correctly declares an authentication type of CLIENT_CERT, your users must have a certificate from an official source before they can use your application.

2 - If your deployment descriptor correctly declares an authentication type of BASIC, the container automatically requests a user name and password whenever a user starts a new session.

3 - If you want your web application to support the widest possible array of browsers, and you want to perform authentication, the best choice of Java EE authentication mechanisms is DIGEST.

4 - To use Java EE FORM authentication, you must declare two HTML files in your deployment descriptor, and you must use a predefined action in the HTML file that handles your user's login.

why answer #4 only is the correct answer
i think answer #1 is also correct
is that true
Which of the following statements are correct? ( choose 2 )
1 - The implicit variable 'session' can be used to store values needed by other servlets or JSPs of the same web application.

2 - The implicit variable 'request' can be used to store values needed by other servlets or jsps across multiple requests.

3 - You can use the implicit variable 'response' to set the content type of the output.

4 - The implicit variable 'out' is same as returned by response.getWriter()

5 - All JSPs have access to 'request', 'response' and 'session' variables.

why choice #4 is not correct
mock exam answers was #1 & # 3
hi amol ,thanks for reply
i tried the code as you wrote and no exceptions thrown ,
it out NewServlet at /JSPStudy in browser window
thanks Abinesh for your reply
manuly flush response and still no exception

PrintWriter out = response.getWriter();
try {
out.println("<html>");
out.println("<head>");
out.println("<title>NewServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>NewServlet at "
+ request.getContextPath () + "</h1>");
out.println("</body>");
out.println("</html>");
out.flush(); // flush response
response.sendRedirect("http://www.cnn.com");
sendredirect : i know taht We cannot call this method if the response is committed�that is,if the response header has already been sent to the browser
but when i write it after commiting response no exception thrown ,why

PrintWriter out = response.getWriter();
try {
out.println("<html>");
out.println("<head>");
out.println("<title>NewServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>NewServlet at "
+ request.getContextPath () + "</h1>");
out.println("</body>");
out.println("</html>");
response.sendRedirect("http://www.cnn.com");
unified EL represents a union of the expression language offered by JSP 2.0 and the expression language created for JavaServer Faces technology
hi all , i am now preparing for scwcd 5 ,i want to know if the exam ask about EL or unified EL
hi
i passed my scjp with 93% thanks for javaranche

what is the next step
16 years ago
String s3= new String("lkj");
String s4= new String("lkj");

3 object created

object for s3 , object for s4 and the string "lkj" which created in the string pool
hi
the order of execuation is

1- static inializers
2- super constractor
3- non static inializers allocated in the memory
4-allocate constracuctors in memory
you are right Edisandro

5 string objects in Q1 and 10 string object in Q2
hi

two stringbuffer object created and one string object
hi Edisandro
you are correct only object created in m method eligible for gc
hi henry

if i create class that extend thread i can throw it as thread parameter
as you give him a runnable object is not true ?
hi
please help answering the following question

What must be true for the RunHandler class so that instances of RunHandler can be used as written
in the code below?

class Test
{
public static void main(String[] args)
{
Thread t = new Thread(new RunHandler());
t.start();
}
}

choose 2 only
(A) RunHandler must implement the java.lang.Runnable interface
(B) RunHandler must extend the thread class
(C) RunHandlermust provide a run method declared as public and returning
(D) RunHandler must provide an init() method

i say a and b correct