2014年5月17日星期六

How to get the data from the server writes html page already exists containers ?

For example, the page has a div, trying to get some information from the server writes this div inside.
There is jquery in jsp can call the variables?
------ Solution ---------------------------------------- ----
your server refers to the database or the value passed it?
------ Solution ---------------------------------------- ----

el expressions on the line , $ {message} you can take to value , there is no relationship with jquery
------ Solution -------- ------------------------------------
upstairs positive solution el expression
------ Solution ------------------------------------------- -
find examples of finished pieces to cook three times.
------ For reference only -------------------------------------- -
say on the server to determine the user's login information , user name, password can not be empty :
if ("" equals (username.trim ()) |. | "." equals (password.trim ())) {
request.setAttribute ("message", " user name or password can not be empty " ) ;
request.getRequestDispatcher ("/ index.jsp") forward (request, response).;
return;
}
How to display request.getAttribute ("message") inside the content in a div on the page where ?

As the database is returned rs I think it should be a principle , are you ?

没有评论:

发表评论