Skip to content

Commit ee22c02

Browse files
committed
Added
1 parent c71669a commit ee22c02

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tomcat7-jsp-actions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ You can import a Java bean (a getter and setter object with an empty constructor
1414
<%@ page import="thing.Hello" %>
1515
<jsp:useBean id="bean" class="thing.Hello" />
1616

17+
The actual bean is this is simple enough:
18+
19+
package thing;
20+
public class Bean {
21+
22+
private String thing = "";
23+
24+
public String getThing() {
25+
return thing;
26+
}
27+
28+
public void setThing(String thing) {
29+
this.thing = thing;
30+
}
31+
}
32+
1733
Now you can access it using a scriptlet using the variable 'bean'. You can also use the getProperty and setProperty action:
1834

1935
<jsp:setProperty name="bean" property="thing" value="SAAATTAAAN" />

0 commit comments

Comments
 (0)