aspose file tools
The moose likes Servlets and the fly likes I want attach my own object also in...... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "I want attach my own object also in......" Watch "I want attach my own object also in......" New topic
Author

I want attach my own object also in......

Huzefa Zohaib
Ranch Hand

Joined: Nov 21, 2001
Posts: 40
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
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?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: I want attach my own object also in......
 
Similar Threads
Using J2EE Vs JEE in SCEA (my experience)
How relevant?
Which is the most suitable application server to prepare for SCDJWS?
Jave EE/JRE installation
Spring Framework in NetBeans