Here request is an implicit object provided by JSP. It is described along
with other implicit objects in JSP presentation.

-- 
Regards,
Artashes Hovasapyan

2009/7/5 merve t <t.merve2...@gmail.com>

> hi,
> i must add a parameter "myparameter" with value "Passion" to request object
> and forward the request to the middle.jsp.
>
> my index.jsp:
>
> <html>
>     <head><title>Hello</title></head>
>     <body bgcolor="white">
>         <img src="duke.waving.gif">
>         <h2>Hello, my name is Duke. My hobby is golf. I was born in
> America. What are your name and hobby and birth place?</h2>
>         <form method="get">
>             <input type="text" name="username" size="25">
>             <input type="text" name="hobby" size="25">
>             <input type="text" name="birthplace" size="25">
>             <p></p>
>             <input type="submit" value="Submit">
>             <input type="reset" value="Reset">
>         </form>
>
>         *<%
>             String username = request.getParameter("username");
> //where have this request been described?
>             if ( username != null && username.length() > 0 ) {
>         try {
>             request.setAttribute ("myparameter", "Passion!");
>         request.getRequestDispatcher("middle.jsp").forward(request,
> response);
>     } catch (Exception ex) {
>         ex.printStackTrace ();
>     }
>                 }
>         %>*
>
>     </body>
> </html>
>
> my middle.jsp is:
>
> <html>
>     <head>
>         <meta http-equiv="Content-Type" content="text/html;
> charset=windows-1252">
>         <title>JSP Page</title>
>     </head>
>     <body>
>         <h1>Hello World!</h1>
>         <%...@include file="response.jsp" %>
>     </body>
> </html>
>
> my response.jsp is:
> <h2><font color="black">Hello, ${param.username}! </font></h2>
> <h2><font color="black">Your hobby is ${param.hobby}!</font></h2>
> <h2><font color="black">Your birth place is
> ${param.birthplace}!</font></h2>
> <h2><font color="black">Parameter "myparameter" is ${param.myparameter}!
> </font></h2>
>
> there is only, name hobby and birthplace parameters on my last view of web
> page. there is no "passion" string.
> where is the mistake?
> thanks
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to