PDA

View Full Version : [JAVA]Si puņ avere una servlet come parametro di un custom tag?


softoxy
18-01-2008, 10:36
E' possibile passare ad un custom tag una servlet ed eseguirla?

per esempio il mio custom tag:

public class CTag extends SimpleTagSupport {
private Servelt;
public void doTag() throws JspException, IOException {
try {
JspWriter out = getJspContext().getOut();

--> out.print(servlet?id=1);
richiamare una servlet che in uscita mi fornisce un risultato in base ad un parametro
out.print("");

}
catch (Throwable t) {
t.printStackTrace();
throw new JspException(t);
}
}


????????

grazie
}

softoxy
18-01-2008, 14:17
non so se si puņ avere, ma ho risolto facendo stampare al custom tag un javascript che richiama la servlet (AJAX per intenderci).

se qualcuno č interessato me lo faccia sapere e lo spiego in dettaglio.