siva raju

Ranch Hand
+ Follow
since Oct 10, 2003
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 siva raju

Thanks guys, now it works allright.
But I never thought that such a seemingly easy task would have a solution like this.
16 years ago
Sorry, I forgot to mention that I was using ANT.
16 years ago
Hi all,

I want to copy only files from a directory excluding all subdirectories whose names I do not know. I tried with various combinations of ** but it doesn't seem to work. Any help is appreciated.
16 years ago
I use eclipse 3.1. I have the option for comparing a file with its local history but I do not have any merge option. The cvs plugin probably does this but we do not use cvs. Is there any free plugin or any eclipse setting that does this.
Hi there ranchers,

I have a file containing the filenames. I need to pass each filename to a third-party task as a pre-defined property name. Since ant does not have the concept of loops, how can i accomplish this?
Any help is appreciated.
16 years ago
Only the core tags. You can relax.
Hey Deep,

Great score n
Still confused. Let me rephrase a bit. The container calls the stateless session bean ejbCreate() just prior to putting it in the pool.

Container adds a bean to the pool
bean.newInstance()-> bean.setSessionContext() -> bean.ejbCreate()

The EJBObject is created in direct relation to the client calling a Home.create() which generally occurs much later.

Client invoked create
EJBHome.create() -> EJBObject.newInstance()

So, how can the bean instance access the SessionContext.getEJBObject() from the ejbCreate() when there is no EJBObject associated?
Thx in advance.
Yes, control returns to the calling resource like in any method. Only, you can't access the output stream.
If you insert <jsp:forward...> in a jsp, then in the translated servlet, the container might insert a 'return' statement immediately after the rd.forward() call.
How can a stateless session bean get a reference to the EJB Object in the ejbCreate().
Its clearly mentioned in HFEJB that the bean creation(setSessionContext + ejbCreate) occur at a completely different/unrelated time from the client called Home.create() when the EJBObject is created.
What am I missing?
Hi Hasan,

You could try doing

String addr = request.getScheme() + "//" + request.getServerName() + ":" + request.getServerPort();

String uri = (String) request.getAttribute("javax.servlet.include.request_uri");
if(uri==null) uri = request.getRequestURI();
System.out.println(addr + uri);

You could use getLocalName and getLocalPort in constructing the 'addr'. See the api for the subtle differences.

About the various attributes and how they are used, check the servlet specification.

I tried and Weblogic 8.1 (which supports servlet spec 2.3) gave that output for <jsp:include../> and not <%@ include..%>

The filter is applied once for login.jsp and one for each <jsp:include>(header and footer). The getRequestURL() returns the URL the client requested. This remains the same in the included pages unless you modify it.
But to get separate uri (not url) for each different included page, you could modify your print on the following lines,

String uri = (String) req.getAttribute("javax.servlet.include.request_uri");
I had similar problems,

Problem 1: Internal server error.

If there is an non-null exception object in the error handler page, the error handler sets the response status as
I looked at the generated jsp source code by Tomcat 5 to know this. I verified this by seeing the HTTP headers.
In older operating systems, the browser might not have handled this(a 5XX error) correctly. When it sees a 5XX, the browser might be throwing up.
When you set the isErrorPage="false", there is no "exception" implicit object.Hence, You dont see this message.

Problem 2. ${pageContext.exception} is empty while <%= exception %> works.

Looking at the Tomcat 5 jasper source code, this value is equal to the attribute, "javax.servlet.jsp.jspException"
Again from the code, I found that this attribute is set only if the jsp that throws the exception, has its

errorPage="xxxx" value set.
<%= exception %> works bcos it takes it source from another request attribute "javax.servlet.error.exception". This

attribute is always set irrespective of the errorPage value.
Hi BoBo,

HFS is "Head First Servlets and JSP". I take it that you mean Hanumanth Deshmukh's book when you say "Exam Study Kit". If you are going for the new SCWCD for j2ee 1.4 platform, then HFS is better. But if are taking the older version of the exam for the j2ee 1.3 platform, you can stick to the study kit.

I see what you are getting at. But see the exact wordings of the answer,

"Tag3Handler may use the getParent method twice to gain access to the instance of Tag1Handler"

which is quite true. The answer does not suggest that we gain access to the instance to Tag2Handler.