yogen joshi

Greenhorn
+ Follow
since May 02, 2003
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 yogen joshi

Hi,
Normally only 1 instance of a servlet is created, but if we configure the web server to have multiple instance say 10 instances of a servlet A, then in that situation, how many times will the init() method be called?
1 or 10 times?
Thanks in advance for your answer.
Yogen
Hi,
Normally only 1 instance of a servlet is created, but if we configure the web server to have multiple instance say 10 instances of a servlet A, then in that situation, how many times will the init() method be called?
1 or 10 times?
Thanks in advance for your answer.
Yogen
16 years ago
Thanks Sawan, So it means A, B & D are the correct answers.
Yogen
Hi,
I am not sure if this has been discussed previously,
Question id 22 from JPilot Exam,

Which are true about session beans?

A. A client can pass a remote home object reference to another application.

B.The javax.ejb.EJBMetaData interface is intended to allow application assembly tools to discover information about the session bean, and to allow loose client/server binding and client-side scripting

C.The javax.ejb.EJBLocalHome interface defines the method create() which returns javax.ejb.EJBLocalObject.

D.The javax.ejb.EJBLocalHome interface defines the method remove(Object primaryKey) which returns null.Which are true about session beans?

The correct answer given is A, B, C.

I did not understand why C is one of the correct choice? EJBLocalHome does not define a creat() method.
Can anyone please clarify this.
Thanks a lot.
Yogen
I do not understand the point of this discussions about the usefulness / uselessness
of certificates.
Well lets get one thing clear,
If experience was the only thing required then what is the whole point of going to
university and get a degree and get qualified?
Because everyone knows that no organisation is going to care a thing about what you
say or try to convince about your experience,.... they are going to ask you for your
qualifications.
Similarly getting certified is at least half the battle won. The other half is your
experience and qualities as a programmer. Why cant anyone realize this.
Certificates might not guarantee a job, but at least they will merit a second look by
the employer.
In the corporate jungle you have to ensure that your CV looks better than the rest,
and no one will less agree that professional certificates do add a boost to it.
All the best
yogen
Hey Shan,
What is the TEST KING stuff for the exam.
Can you please provide a link to it.
cheers,
yogen
18 years ago
Can anybody tells which portion of the jsp page gets included in the jspInit() after translation.
yogen
Now this is getting confusing,
Can anybody once and for all definitely confirm what actually happens,
requestDispatcher.forward(req, res) -- > returns control back to the calling servlet after the call. [true / false]
requestDispatcher.include(req, res) --> returns the control back to the calling servlet after the call. [true / false]
yogen
Hi all,
My answer is as follows,
1. request expires after its corresponding response object is committed.
2. session expires after a specific session inactivity time which can be
configured in minutes in the web.xml.
<session-config>
<session-timeout>5</session-timeout>
</session-config>
or
programatically inside a servlet
session.setMaxInactiveInterval(int second)

or
through a call to
session.invalidate();
3.ServletContext expiration can be done by a SysAdmin etc. or when the
web server stops.
Anybody has a better answer ?
yogen
Thanks Amer,
I got it.
yogen
Hi All,
I was reading the jsp specs, and came across the <jsp:include> & this is what it says about flush,

The flush attribute controls flushing. If true, then, if the page output is buffered
and the flush attribute is given a true value, then the buffer is flushed prior to the
inclusion, otherwise the buffer is not flushed. The default value for the flush
attribute is false.

I did not quite understand this.
Consider the following 4 different cases,

case1.jsp.
<%@ page language='java' autoflush='true' %>
-- --
jsp code
-- --
<jsp:include page='blah.jsp' flush='false' />

case2.jsp.
<%@ page language='java' autoflush='true' %>
-- --
jsp code
-- --
<jsp:include page='blah.jsp' flush='true' />

case3.jsp
<%@ page language='java' autoflush='false' %>
-- --
jsp code
-- --
<jsp:include page='blah.jsp' flush='true' />

case4.jsp
<%@ page language='java' autoflush='false' %>
-- --
jsp code
-- --
<jsp:include page='blah.jsp' flush='false' />

Can anyone please give me the answer to what will happen in each case.
Thanks in advance.
yogen
Yes you are right Andy. It refers to the creation of new request - responce object, for each new request, the session remaining the same.
yogen
Question 1
If the question asks for 1 correct answer then
b. ServletContext

If the question asks for all possible answers then
b. ServletContext
c. HTTPServletRequest.

This is because the method getRequestDispatcher() belongs to the ServletRequest.

Question 2
My answer is
b
a, c, - will give resource not found since there is no web app context.
b - will call the oranges servlet because /fruits/oranges matches the url pattern /oranges
d - will return the default index page.
yogen
Sorry Mate,
I did not realize that you had already posted the reply.
I take back my previous mail.
Thanks for your help.
yogen
Hey Andres,
I figured it out myself. That was a clever one!!
Guess you decompiled the java.io.PrintWriter class from rt.jar.
yogen