ok would you take a look at what I have now and tell me why I cannot get the parameter 
in the jsp page.  Here is the code for my serletpackage nnet;
  | 
  | import javax.servlet.*;
  | import javax.servlet.http.*;
  | import java.io.*;
  | import java.util.*;
  | import java.security.Principal;
  | 
  | /**
  |  * <p>Title: NNET</p>
  |  * <p>Description: Northland Intranet</p>
  |  * <p>Copyright: Copyright (c) 2004</p>
  |  * <p>Company: NMI</p>
  |  * @author not attributable
  |  * @version 1.0
  |  */
  | 
  | public class home extends HttpServlet {
  | 
  | 
  |   //Initialize global variables
  |   public void init() throws ServletException {
  |   }
  | 
  |   //Process the HTTP Get request
  |   public void doGet(HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException {
  | 
  |     Principal user = request.getUserPrincipal();
  |     String username = user.getName();
  | 
  | 
  | 
  |     request.setAttribute("username",username);
  |     RequestDispatcher rd =
  |         request.getRequestDispatcher("home2.jsp");
  |     rd.forward(request, response);
  | 
  |   }
  | 
  |   //Clean up resources
  |   public void destroy() {
  |   }
  | }
  | 
and here is the code for the jsp<%@ taglib uri="http://java.sun.com/jstl/core"; 
prefix="c" %>
  | <%@ taglib uri="http://java.sun.com/jstl/sql"; prefix="sql" %>
  | <%@ taglib uri="http://java.sun.com/jstl/xml"; prefix="x" %>
  | 
  | <html>
  | <head>
  | <title>
  | index
  | </title>
  | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style 
type="text/css">
  | <!--
  | body {
  |     margin-left: 0px;
  |     margin-top: 0px;
  |     margin-right: 0px;
  |     margin-bottom: 0px;
  | }
  | -->
  | </style></head>
  | <body bgcolor="#008000">
  | 
  | 
  | <table width="100%" border="1" cellspacing="0" bordercolor="#000000">
  |   <tr>
  |     <td bgcolor="#FFFFFF"><h1>Welcome to NNET ${username}
  | 
  |     </h1></td>
  | 
  |  </tr>
  | </table>
  | <br>
  | <table width="100%"  border="0" cellspacing="0">
  |   <tr>
  |     <td width="150">&nbsp;</td>
  |     <td>&nbsp;</td>
  |     <td width="150">&nbsp;</td>
  |   </tr>
  | </table>
  | </body>
  | </html>
What is teh syntax to get the jsp page to read the parameter from the servlet??

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831994#3831994

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831994


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to