Mukhtar Ahmed

Greenhorn
+ Follow
since Nov 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mukhtar Ahmed

Thank you Mike. That clears my doubts. I really appreciate your help.
Hi Mike, Thanks for the reply.
Let me just make sure I understand it right. The following code:
TagAdapter tagAdapter=(TagAdapter)childTag.getParent();
SimpleTag simpleTag = (SimpleTag)tagAdapter.getAdaptee();
will be inside the classic tag handler class (the innerClassic:y).
So who will create the TagAdapter? The container? or do we have to implement childTag.getParent(); method so that it returns TagAdapter?
TagSupport.getParent() returns a Tag. So does the implementation of TagSupport class makes sure that TagAdpater object is returned if the parent tag is a SimpleTag?
Also, while writing a JSP page, do we have to change anything is the parent tag of a classic tag is a SimpleTag? Or the code that I wrote above willl work without any modification? I.e will the following code work?
<outerSimple:x>
<innerClassic:y/>
</outerSimple:x>
I am not able to understand how and when to use TagAdapter class. I understand by reading the specs that SImpleTag does not extend Tag so it cannot be a parent of a Classic tag. But then what is the use of TagAdapter?
How do I use it to make a simple tag a parent of a classic tag?
Can I do something like:
<outerSimple:x>
<innerClassic:y/>
</outerSimple:x>
Where outserSimple:x is a simple tag and innerClassic:y is a classic tag?
Thank you Ivan. Can you tell me how do I use the reference of the XSD in web.xml? The web.xml in tomcat examples uses reference to 2.3 dtd:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

Originally posted by Simon Good:

Anyone agree. Holding onto database connections for the lifetime of a servlet doesn't seem to be a great idea.


how is it different from taking a connection from pool and giving it back? the connection will still be open till the lifetime of the servlet.
You know the servlet 2.4 specification has given the same example where they say that you should create a connection in ServletContextListener.
Which version of Tomcat should I use for testing Servlet 2.4 and JSP 2.0 code?
On tomcat site, it say 5.0.18 it implements 2.4 but it used 2.3 dtd?
Even in the servlet 2.4 spec, they haven't given 2.4 dtd. They still have old 2.3 dtd and while they have introduced new tags in web.xml in the specification.
So what do I do?
I am so happy to inform you that with Allah's grace I have passed the SCJP exam with 87%. I am very grateful to my friends Salim who helped me whenever I had a problem in understanding. I am also very grateful to my manager Matt, who let me take time off for this.
I am in DBA support group and I am new in Java so I had to put lot of efforts. I read Khalid Mughal book (thanks again, Salim) and bought Head First Java by kathy seirra. Both are very good books. I took all the mock free exams available on the net. I also did jqplus exams by enthuware, another very good resource. I also read discussions on this site which increased my confidence.
May God bless you all. I hope and pray that everybody will pass.
21 years ago
I think it is because the method somemethod does not declare it in the throws clause. Since somemethod is calling dostuff which throws MyException, somemethod has to either handle it or put it in the throws clause.
This is my first post on this great site. So please bear with my ignorance but what is a "regular inner class"? Can you provide an example?