Spec : TOMCAT10 , weld -libraries from jboss
Process : Trying (CDI) insert from input-text to pojo from a pure simple JSP Page
<form method="get">
<table width="25%" border=1>
<tr>
<td>Name :</td>
<td><input type="text" maxlength="10" id="login" name="login" value="${bean.input}"/></td>
</tr>
<tr>
<td colspan=2>
<button type="button" id="TEST" value="${bean.submit()}" name="TEST" />TEST-CDI</button>
</td>
</tr>
</table>
</form>
Pojo is as follows
@Named()
@RequestScoped
public class Bean implements java.io.Serializable {
private String input;
private String output;
//Get/setters
public String getInput() {return input;}
public void setInput(String input) {this.input = input;}
public String getOutput() {return output;}
public void setOutput(String output) {this.output = output;}
public void submit() {
output = "Hello World! You have typed: " + input;
System.out.println("SUBMITTED : " + output);
}
}
O/p : SUBMITTED : Hello World! You have typed: null
Question : Why Injection of InputText not passed to pojo ?
Leads : No post avaliable on WWW (google/yahoo....)
with regards karthik