Não estou conseguindo testar o exemplo do livro, pois está aparecendo o seguinte erro de compilação:
[code]package foo;
public class AdvisorTagHandler extends SimpleTagSupport { // ERRO: SimpleTagSupport cannot be resolved to a type
private String user;
public void doTag() throws JspException, IOException {
getJspContext().getOut().write("Hello" + user + " <br>");
getJspContext().getOut().write("Your advice is: " + getAdvice());
}
public void setUser(String user) {
this.user = user;
}
String getAdvice() {
String[] adviceStrings = {"That color's not working for you.", "You should call in sick.", "You might want to rethink that haircut"};
int random = (int) (Math.random() * adviceStrings.length);
return adviceStrings[random];
}
}
[/code]
Estou usando o eclipse galileo, tomcat 6.0.20, já adicionei jsp-api.jar, servlet-api.jar, jstl.jar, standard.jar na pasta lib de WEB-INF.
No java build path do projeto, na aba libraries adicionei os external jars (jsp-api.jar, servlet-api.jar, jstl.jar).
Já adicionei todos os jars da pasta lib do tomcat em WebAppLibraries, mas nada funcionou!
Aguém poderia me ajudar, a resolver esse problema?