![]() | You can watch the high resolution, full screen videos here:
http://www.thebookonhibernate.com/j2ee/index.jsp?link=07cust
omtags
Creating Your Own Custom JSP Tags
This free, multimedia tutorial shows you how to use IBM's Rational Application Developer (IRAD) 6.0 to create a custom tag library (well, one custom tag, so it is a pretty impoverished library), and the corresponding Java code and tld file to make a custom tag work on a JSP page.
If you found something helpful here, please do your part and help support the site. Link to us, buy some books, support our sponsors, tell your developer friends about us, and remember: Happy Java!
package com.examscam.servlet.tags;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
import com.examscam.common.Timer;
public class TimerTag extends TagSupport {
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
ServletRequest request = pageContext.getRequest();
ServletResponse response = pageContext.getResponse();
ServletContext application = pageContext.getServletContext();
HttpSession session = pageContext.getSession();
Timer t = (Timer)session.getAttribute("timer");
if (t==null){
t = new Timer();
session.setAttribute("timer", t);
}
try {
out.print("Elapsed Time: " + t.getElapsedTime());
out.print("Start Time: " + t.getStartTime());
} catch (IOException e) {
e.printStackTrace();
}
return SKIP_BODY;
}
}
Please check out my SCJA Java Certification Mock Exam website:
http://www.scja.com/associate/
And for Hibernate and JPA tutorials, check out:
http://www.thebookonhibernate.com
http://www.scja.com/j2ee/index.jsp?link=03httpsessionswf Auteur: Javaprogrammingcbts Tags: begin Custom end Exams Java JSF JSP Mock Pages SCBCD SCEA SCJA SCJP SCWCD Server Struts tag Tags Ajoutée: lundi 31 janvier 2028 02:04:08 |
Ajouter cette vidéo à vos favoris
Envoyer cette vidéo à vos amis




![Tutorial Cusom Spell Wc3 [No Jass]](http://i.ytimg.com/vi/qgjEuWL5azI/default.jpg)











