I want send the message also in the following code.
String message= "Id is assigned"; try { url= "/jsp/Mb/SignUp.jsp"; rd= context.getRequestDispatcher (url); rd.forward (req, res); }catch (Exception ee) {out.println (ee); ee.printStackTrace ();} How can I do so?
Scott Duncan
Ranch Hand
Joined: Nov 01, 2002
Posts: 363
posted
0
it would have to be in the request or the req object in the case of your code. In the servlet: req.setAttribute("message", message); in the SignUp.jsp you need something like: <% String message = (String)request.getAttribute("message"); if( message != null ){ %> <font color=red><i><b><%=message%></b></i></font><br><br> <% } %>
No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?