tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blanchard Andrew H (CPOCEUR)" <ablanch...@chrma.hqusareur.army.mil>
Subject RE: Custom Tag Can't Compile problem.
Date Wed, 29 Aug 2001 09:35:39 GMT
To be honest, I don't believe a Tag can be implemented as a singleton.
However, you could *use* a singleton class from within your custom-tag and
probably achieve the same effect.  For example,

public int doEndTag() throws JspException {
    MySingleton sing = MySingleton.getInstance();
    sing.doStuff();
    return EVAL_PAGE;
}

Hope this helps.

Its kind of interesting that the custom-tag didn't work without being in a
package.  Like I said, I have never tried it that way.  Hmmm.

-- Andy

-----Original Message-----
From: MindTerm [mailto:mindterm@yahoo.com]
Sent: Wednesday, August 29, 2001 10:54 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: Custom Tag Can't Compile problem.


Dear Blanchard Andrew H,

   Before, it is /WEB-INF/classes/TagManager.java (
without package ) and it doesn't work. After change,
it is /WEB-INF/classes/tools/TagManager.java ( inside
package tools ) and it works. 

   I have one more question, can Custom Tag Handler (
TagManager.java in this case ) work as singleton ?

M.T.

Mime
View raw message