Nguyen Nam

Greenhorn
+ Follow
since Dec 05, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nguyen Nam

Bear Bibeault wrote:Use the value attribute on each form element to set its value.



Can you explain clearly?
My JSP page:

<%
List<Username> list = (List<Username>)(request.getAttribute("ListUsername"));
for(int i = 0; i < list.size(); i++)
{
Username nd = list.get(i);
...
...
...
%>
<form id="form" name="form" method="post" action="UpdateUserController">
<input id="username" type="text" value="<%=nd.getUsername() %>" name="username">
<input class="btn" type="submit" value="Update" style="width: 100px">
</form>
<%
...
...
}
%>
11 years ago
JSP
I have a JSP page. I have a form. When I click on submit to update data that I want to change. Record in database change but data don't show on JSP page. Afterthat, I run Tomcat, data on JSP page change. I use: JSP, Servlet, Hibernate, tomcat 6.

Example:
JSP page: textfield: value = A (load from database)
Database: value = A
---> I want to update:
JSP page: textfield: value = B
--> I click on UPDATE submit (move to Servlet to controll):
JSP page: textfield: value = A
Database: value = B
--> Run Tomcat
JSP page: textfield: value = B


Can any body tell me to reload a jsp page without error? I come from Vietnam so my writing skill no good :D
Thanks advance.
11 years ago
JSP