DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2010

    Exclamation Jsp variables cannot be resolved

    I hav created a page "one.jsp" where I took a String as an input in a text box

    <form name="form" method="post" onsubmit="return checkform()" action="two.jsp">
    <input type="text" name="firstname" title="Enter the first name">

    and I have received the value of the field in "two.jsp"....
    <% String fname=request.getParameter("firstname");%>

    and when i put it in a table and print it...
    <td width="367" ><%=fname %></td>

    it works fine....

    but now when I try to use the same String variable...in a table in
    another jsp page, eg, "three.jsp" using -

    <td width="367" ><%=fname %></td>

    it says.."fname cannot be resolved"

    even, if I use in "three.jsp"...

    <% String fname=request.getParameter("firstname");%>
    <td width="367" ><%=fname %></td>

    It doesn't work!!...but I need to use the same String variable in both "two.jsp" and "three.jsp" !!

    Plzz suggest me wats wrong with my code....and how to mend it using least modifications...!!

    Thanking you guys in advance...!!

  2. #2
    Join Date
    Jun 2010
    You should use javabeans

Similar Threads

  1. Servlets and JSP
    By Purnima in forum Java
    Replies: 1
    Last Post: 12-29-2005, 04:14 AM
  2. Replies: 3
    Last Post: 03-24-2005, 08:42 PM
  3. Replies: 0
    Last Post: 06-28-2001, 09:59 AM
  4. Replies: 0
    Last Post: 04-26-2001, 10:01 PM
  5. How To Do It - Shared Class Variables Part II
    By Patrick Ireland in forum .NET
    Replies: 3
    Last Post: 04-26-2001, 02:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.