J'ai mis une propriété dans la classe d'action comme suitMa propriété ne Rendring sur le jsp struts 2.0
public class HelloWorld{
public String execute() { ANNOTATION #1
setCustomGreeting(GREETING + getName());
return "SUCCESS";
}
private String customGreeting;
public String getCustomGreeting()
{
return customGreeting;
}
public void setCustomGreeting(String customGreeting){
this.customGreeting = customGreeting;
}
}
Et Im essayant de le rendre sur jsp comme suit
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>HelloWorld</title>
</head>
<body>
<h3>Custom Greeting Page</h3>
<h4><s:property value="customGreeting"/></h4>
</body>
</html>
Mais il est n'imprimant rien sur le jsp, aidez-moi s'il vous plaît?
Etes-vous en train d'ouvrir une page ou une action JSP dans l'adresse url? –