You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Isak Rickyanto <is...@telkom.net> on 2001/09/18 17:15:26 UTC

Include JSP file to show form

Hello all

I have edit.jsp code to EDIT AND VIEW member DATA...
In this code there are links to EDIT and VIEW member DATA
I use jsp:forward to VIEW member data and it is run well

but i use the same file(edit.jsp)  to view the form with <jsp:include> to
include FORM to EDIT DATA...
and I want to use  edit.jsp to be the action file to process the form...

My code (edit.jsp) is running well.. but there is a problem..

If I submit the form, the code like this (this code is in included file)
<%
String nama="";
String pass="";
String email="";
String alamat="";
String kota="";
String kodepos="";
String propinsi="";
String telepon="";
%>
<form method="post" action="edit.jsp?aksi=edit">
<table width="100%" border="1">
    <tr>
      <td colspan="3">Form Edit Anggota</td>
    </tr>
    <tr>
      <td width="8%">1</td>
      <td width="22%">Nama</td>
      <td width="70%">
        <input type="text" name="nama" value="<%=nama%>">
      </td>
    </tr> .. bla..bla..

When I submit... my edit.jsp process this form well...
but I want to show the form again... filled with the value which has been
submitted...
so the user do not need to fill all of the form again......
but my program always show the blank form .......
I had found that if i include the form... I must declare the variable
first...
so I declare it in the included file because if I declare it on edit.jsp it
is useless...
because it show error

Anyone can help me?

Than'ks for your attention