Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

viswanath sastry

Greenhorn
+ Follow
since May 04, 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 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 future.is 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.
thanks,
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 .
thanks,
[ August 05, 2003: Message edited by: viswanath sastry ]
i was trying to get the get gamma weblogic certification link http://www.getgamma.com/wlscert/
but it is no more working. has the link changed?
please provide the new one.
Thanks
18 years ago
This is the question in withmilk.com,
Given:
<servlet-mapping>
<servlet-name>tempServlet</servlet-name>
<url-pattern>temp.jsp</url-pattern>
</servlet-mapping>
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.: http://127.0.0.1:8080/myApp/servlet/myPackage.tempServlet
A <servlet-name> should be the parent tag of
<servlet-mapping>
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.
Thanks
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.
Thanks.
18 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.


Thanks,
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.?
Thanks.
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.
Thanks.
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.
Thanks.
18 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.
18 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?
Thanks.
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?") ;
bodyContent.writeOut(out);
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
{
return EVAL_BODY_TAG;
}


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.
18 years ago
JSP