Perdón, se me olvidó postear el código. Aquí va, esta es la forma en que debo llamar al calendario. Decir que el calendario está en Javascript y que funciona perfectamente, pues como comente en el otro post lo he probado a parte.
<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<html>
<head>
<title><bean:message key="registro.titulo"/></title>
<!-Hoja de estilos del calendario -->
<link rel="stylesheet" type="text/css" media="all" href="calendar-blue.css" title="win2k-cold-1" />
<!-- librería principal del calendario -->
<script type="text/javascript" src="calendar.js"></script>
<!-- librería para cargar el lenguaje deseado -->
<script type="text/javascript" src="lang/calendar-es.js"></script>
<!-- librería que declara la función Calendar.setup, que ayuda a generar un calendario en unas pocas líneas de código -->
<script type="text/javascript" src="calendar-setup.js"></script>
<script>
function cargarSelectDia(mes){
var longitudMes = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var comboDia = document.forms[0].diaFechaNac;
var diaSel = '<bean:message key="dia.texto"/>';
if(comboDia.options.length > 1){
diaSel = comboDia.option[comboDia.selectedIndex].value;
}
if(comboDia.options.length == 1){
diaSel = document.forms[0].diaSel.value;
}
comboDia.options.length = longitudMes[mes-1];
for(var i=1;i<=longitudMes[mes-1];i++){
var nuevaOpcion = new Option(i, i);
comboDia.options[i] = nuevaOpcion;
if(diaSel == i){
comboDia.options[i].selected = true;
}
}
}
function cargarSelectMes(){
var meses = new Array(<bean:message key="meses.array"/>);
var mesSel = document.forms[0].mesSel.value;
var comboMes = document.forms[0].mesFechaNac;
for(var i=1;i<=12;i++){
var nuevaOpcion = new Option(meses[i-1], i);
comboMes.options[i] = nuevaOpcion;
if(mesSel == i){
comboMes.options[i].selected = true;
}
}
}
function cargarSelectANo(anoIni, anoFin){
var comboANo = document.forms[0].anoFechaNac;
var anoSel = document.forms[0].anoSel.value;
for(var i=anoIni;i<=anoFin;i++){
var nuevaOpcion = new Option(i, i);
comboANo.options[i-anoIni + 1] = nuevaOpcion;
if(anoSel == i){
comboANo.options[i-anoIni + 1].selected =true;
}
}
}
function cambioSelectMes(){
var comboMes = document.forms[0].mesFechaNac;
var mes = comboMes.options[comboMes.selectedIndex].value;
if(mes == 0)
cargarSelectDia(1);
else
cargarSelectDia(mes);
}
function iniciar(){
objetoDate = new Date()
cargarSelectANo(1970, objetoDate.getYear());
cargarSelectMes();
cargarSelectDia(1);
if(document.forms[0].tipoDeEnseNanza.value != 'S'){
document.forms[0].creditosTotales.disabled = false;
}else{
document.forms[0].creditosTotales.disabled = true;
document.forms[0].creditosTotales.value = '';
}
}
function enviar(accion){
document.forms[0].accionAlumno.value = accion;
document.forms[0].submit();
}
</script>
</head>
<body onload="iniciar();">
<html:form action="/registroUsuario">
<table>
<tr>
<td align="right">
<bean:message key="nombre.texto" />
</td>
<td>
<html:text property="nombre" size="30" />
<html:errors property="nombre" />
</td>
</tr>
<tr>
<td align="right">
<bean:message key="apellidos.texto" />
</td>
<td>
<html:text property="apellidos" size="30" />
<html:errors property="apellidos" />
</td>
</tr>
<tr>
<td align="right">
<bean:message key="fechaN.texto" />
</td>
<td align="left">
<html:select property="diaFechaNac">
<html:option value="0">
<bean:message key="dia.texto" />
</html:option>
</html:select>
<html:select property="mesFechaNac" onchange="cambioSelectMes();">
<html:option value="0">
<bean:message key="mes.texto" />
</html:option>
</html:select>
<html:select property="anoFechaNac">
<html:option value="0">
<bean:message key="año.texto" />
</html:option>
</html:select>
<html:errors property="fechaNac" />
</td>
<td align="right"><html:image alt="cal" page="/imAgenes/cal.jpg"></html:image></td>
</tr>
<tr>
<td align="right">
<bean:message key="sexo.texto" />
</td>
<td>
<html:radio property="sexo" value="H" />
<bean:message key="hombre.texto" />
<html:radio property="sexo" value="M" />
<bean:message key="mujer.texto" />
<html:errors property="sexo" />
</td>
</tr>
<tr>
<td align="right">
<bean:message key="tipoE.texto" />
</td>
<td>
<html:select property="ocupacion">
<html:option value="S">
<bean:message key="seleccioneO.opcion" />
</html:option>
<html:option value="E">
<bean:message key="estudiante.opcion" />
</html:option>
<html:option value="T">
<bean:message key="trabajador.opcion" />
</html:option>
<html:option value="O">
<bean:message key="otros.opcion" />
</html:option>
</html:select>
<html:errors property="ocupacion" />
</td>
</tr>
<tr>
<td align="right">
<html:reset>
<bean:message key="restablecer.label"/>
</html:reset>
</td>
<td align="left">
<html:button property="seleccionarM"
onclick="enviar('irSeleccionarMaterias');">
<bean:message key="seleccionarM.label"/>
</html:button>
</td>
</tr>
</table>
<html:hidden property="accionAlumno" value="execute" />
<input type="hidden" value="<bean:write name="registroForm" property="anoFechaNac"/>" name="anoSel"/>
<input type="hidden" value="<bean:write name="registroForm" property="mesFechaNac"/>" name="mesSel"/>
<input type="hidden" value="<bean:write name="registroForm" property="diaFechaNac"/>" name="diaSel"/>
<input type="hidden" value="<bean:write name="registroForm" property="ocupacion"/>" name="ocupSel"/>
</html:form>
<!-- formulario con el campo de texto y el botón para lanzar el calendario-->
<form action="#" method="get" id="lanzador">
<input type="text" name="date" id="campo_fecha" />
<input type ="image" src="./imAgenes/cal.jpg" /></form>
<!-- script que define y configura el calendario-->
<script type="text/javascript">
Calendar.setup({
inputField : "campo_fecha", // id del campo de texto
ifFormat : "%d/%m/%Y", // formato de la fecha que se escriba en el campo de texto
button : "lanzador" // el id del botón que lanzará el calendario
});
</script>
</body>
</html>
Por último decir que he colocado el calendario al final, pero esa no es la ubicación que llevará finalmente, irá al lado de la fecha de nacimiento.
Gracias.