struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davargas123 <>
Subject Struts HTML taglib vs. Standard HTML tags
Date Fri, 04 Dec 2009 15:48:54 GMT

When I change the standard HTML tags of my .jsp page into the Struts tags,
the page loads up completely blank, aside from what is loaded by the
tiles-def. What could be causing this? I'm thinking that's why my page
doesn't submit data to the actionform, but I don't see why it wouldn't be
rendering the struts tags at all. For instance, if I even add ONE struts tag
in the middle of my working code that isn't the html:form tag, the entire
jsp page will not be rendered at all. It's driving me nuts, I've been
working on figuring this out for far too long and would greatly appreciate
some input.

<%@taglib uri="/taglib/struts-html" prefix="html"%>
<%@taglib uri="/taglib/struts-bean" prefix="bean"%>
<%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
function encryptSSN(){

function showError(){

function validateSSN(){
        var ssn = document.ssnLookupForm.ssn.value;
    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
<html:form method="post" action="/SSNLookupEncrypt">
        <div style="text-align: center; font-family: arial;">
      <div class="productsdiv" style="margin: 0 auto; padding: 5px;
text-align: left; width: 43%">
            SSN: <input type="text" name="ssn"
            <div class="spacer"> </div>
            Format: XXX-XX-XXXX
         <div class="spacer"> </div>
         <div style="text-align: center;">
           <input type="button" value="Encrypt" onclick="validateSSN()"/>
         <div class="textBox" id="box1" style="text-align: center;
         <div class="spacer"> </div>
           Encrypted Value: <%=ssnLookupForm.getEncryptedSSN()%>
      <div class="spacer"> </div>
This is the corresponding ActionForm:

public class SSNLookupForm extends ActionForm{

        private static Logger log =
        private String ssn = "XXX-XX-XXXX";
        private String encryptedSSN = "[Encrypted Value]";
        public String getSSN(){
                return ssn;
        public void setSSN(String ssn){
                this.ssn = ssn;
        public String getEncryptedSSN(){
                return encryptedSSN;
        public void setEncryptedSSN(String encryptedSSN){
                this.encryptedSSN = encryptedSSN;
        public void reset(ActionMapping mapping, HttpServletRequest request)
            this.ssn = "XXX-XX-XXXX";
            this.encryptedSSN= "[Encrypted Value]";

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message