1 19 20 package net.sourceforge.jcetaglib.taglib; 21 22 import org.bouncycastle.jce.provider.BouncyCastleProvider; 23 24 import javax.servlet.jsp.JspException ; 25 import javax.servlet.jsp.JspWriter ; 26 import javax.servlet.jsp.tagext.TagSupport ; 27 import java.io.IOException ; 28 import java.security.Provider ; 29 30 51 public class GetVersion extends TagSupport { 52 public int doStartTag() throws JspException { 53 Provider prov = new BouncyCastleProvider(); 54 55 try { 56 JspWriter w = pageContext.getOut(); 57 w.println("JCETaglib version: 1.0 Final<BR>"); 58 w.println("JCE provider: " + prov.getName() + "<BR>"); 59 w.println("JCE provider version: " + prov.getVersion() + "<BR>"); 60 w.println("JCE provider info: " + prov.getInfo()); 61 } catch (IOException ex) { 62 throw new JspException (ex.getMessage(), ex); 63 } 64 65 return SKIP_BODY; 66 } } | Popular Tags |