Help coderanch get a
new server
by contributing to the fundraiser

viswanath sastry

+ Follow
since May 04, 2003
Merit badge: grant badges
For More
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 viswanath sastry

Today i closely followed your table of contents and i found that every section started with a Verb,(Implementing,Creating,Automating,Securing...), doing an activity.And i have also observed that activities that range from Designing till Maintaining and Testing were handled. The table of contents looks very well planned. I hope, if the contents (actual code and steps to follow) of the book are also presented with the same practical-hand book manner, then it will definetely be a hot cake.But you should also be prepared for revision if you think of a better way down the line.
I hope appropriate Design patterns have been considered for each case.
Thanks, Mark
Iam happy that your book covers XDoclet, iam planning to integrate xdoclet into my application server. Does your book also give this integration procedure? i am a student and so i want to do all code my self without any code generation tool, but still i want to use it at some point of time just to get used to it.
and i also heard from someone that all entity beans have to be container managed in this true? though container managed has its own advantages, wont we lose the control that we have with bean managed and what about complex joins, will container manage complex joins by itself.
Iam new to EJB world, though i have some experience with Java Web Components and i have a couple of questions for you..
Which EJB server (like weblogic, websphere, orion) have you used for your examples and was there any specific reason for choosing that server?
When I use Microsoft Internet Explorer and Applet as a client, will i be able to call EJB Interfaces, because i have read some time back that IE lacks java.rmi package (though i cannot understand why IE should need that package, because it is your code that needs that package).

and yes, please include me as a participant in this week's give aways .
[ August 05, 2003: Message edited by: viswanath sastry ]
i was trying to get the get gamma weblogic certification link
but it is no more working. has the link changed?
please provide the new one.
21 years ago
This is the question in,
File 'temp.jsp' is in the myApp root.
Identify true statement when the url for tempServlet is typed in the location bar of a browser e.g.:
A <servlet-name> should be the parent tag of
B Contents of temp.jsp from the myApp root is
displayed on the screen
C 'servlet' should be 'Servlet' in the URL -
capital 'S'
D Error is generated
The explanation given was,
D is true. A is false as it is fine the way it is mapped.Error is generated. The url-pattern should have a preceding forward slash: /temp.jsp to be succesful. And the idea is that when temp.jsp is called - tempServlet is displayed, not the other way around.
But,i have not seen in the specification nor in deshmukh book saying that url-pattern must have a forward slash. Please explain this to me.
Since <session-config> element in web.xml is optional, What will be the session timeout,if we don't have it in web.xml? Will sessions be timed out at all? Or will there be a container specific time out value out of web.xml?
This has not been mentioned in servlet specifications.
21 years ago
Thanks Amer,
This was a new concept for me.i haven't read about invoker servlets in scwcd study kit(the book only mentions steps in appendix to make invoker servlet work and no where else)
My question is , will there be questions regarding invoker servlet in scwcd exam?

If you don't use the mapping your JSP engine will create two different instances. which explain the fact of having two different results by using the above URLs. However the web.xml you are using already has the mapping in, try to take the statement of mapping off, save the file and restart Tomcat, and then try again, you'll see at that time two different results.

i know why case 2 is working, because there is a servlet mapping. idont have a problem with that.but why is case 1 giving the same result? and how is it different from case 3(which i know should not work as expected)?my only problem is what makes case 1 give the same result as case 2.?
in chapter 12 of hanuman deshmukh book,i have
web.xml configured like below,

and when i use, the following two cases, iam getting the same result,
1. http://localhost:8080/chapter12/servlet/ InitTestServlet
2. http://localhost:8080/chapter12/initTest.jsp
and if i use below request, iam getting 404 error
3. http://localhost:8080/chapter12/InitTestServlet
is it the <jsp-file>/initTest.jsp</jsp-file> element that is making the difference.i dont understand this jsp-file element for this case at all.
and what is the /servlet/ code in first case doing?

Waiting for your replies.
quote from boddy chaurasia

sessionDidActivate(HttpSessionEvent event) is a Callback after the session activates, and since sessions can not be carried over from one JVM to another, It will be called after the session activates

im sure sessions can be migrated from one jvm to another but they wont span multiple jvm's. and as far as "Callback" is considered im not sure i understand you there.
Would Appreciate responses.
21 years ago
Since the event that drives HttpSessionListener and HttpSessionActivationListener is the same(HttpSessionEvent),will the methods sessionDidActivate()and sessionWillPassivate() be called on session attributes after a session is created and before a session is destroyed? or is it only in the case when sessions are migrated across jvm's?
Thanks to all.
21 years ago
Thanks Andres,
In the second question, i was actually trying to ask....
if i return EVAL_BODY_BUFFERED on doStartTag() and use the two cases given, in doStarTag()/doEndTag()/doAfterBody() methods,
Is there any difference in case 1 and case 2? Is it like in the first case iam writing to output directly instead of buffer and in the second case iam writing to buffer?and where does getPreviousOut() method come into picture?
These are the two questions i have on implementing BodyTag Interface
1.Say,iam implementing BodyTag Interface,
and in my doStartTag() method, I return
EVAL_BODY_BUFFERED.Now, when the doAfterBody() method is called, will there be *any* difference if I return EVAL_BODY_AGAIN or EVAL_BODY_BUFFERED?will one effect Buffering and the other not?any such difference?
2.when implementing BodyTag Interface,if I have the following in doStarTag()/doEndTag()/doAfterBody() methods
case 1: pageContext.getOut().print("how are you?");
case 2: JSPWriter out = bodyContent.getEnclosingWriter() ;
out.print("how are you?") ;
Is there any difference in case 1 and case 2? Is it like in the first case iam writing to output directly instead of buffer and in the second case iam writing to buffer?and where does getPreviousOut() method come into picture?
Thanks to all.

doStartTag must indicate whether to evaluate the body. Try this:
public int doStartTag() throws JspException

EVAL_BODY_TAG is deprecated in jsp 1.2.There are EVAL_BODY_BUFFERED and EVAL_BODY_INCLUDE or EVAL_BODY_AGAIN now as the case may be.
21 years ago