• Post Reply Bookmark Topic Watch Topic
  • New Topic

form in multilingual

 
sandeeps srivastava
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

i want to desing some form in jsp , i have problem with fields of form , i want to these field treated as variable so that i stored and fetch from database of their equivalent meaning in other languages.

for eg.


<FORM action="http://somesite.com/prog/adduser" method="post">
<P>
<LABEL for="firstname">First name: </LABEL>
<INPUT type="text" id="firstname"><BR>
<LABEL for="lastname">Last name: </LABEL>
<INPUT type="text" id="lastname"><BR>
<LABEL for="email">email:        </LABEL>
<INPUT type="text" id="email"><BR>
<INPUT type="radio" name="sex" value="Male"> Male<BR>
<INPUT type="radio" name="sex" value="Female"> Female<BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</P>
</FORM>


in the above code i want to first name , last name access from database , please help me
 
Sagar Birari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connect to database using JDBC then fetch record with condition
then used jsp expression tag for display value in text field
like this
<INPUT type="text" id="firstname" value="<%=rs.getString("fname")%>">

search on google for examples

Regards
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This kind of localized data is usually kept in property files. Then you can use JSTL's <fmt:...> tags to display the localized strings. See http://www.ibm.com/developerworks/java/library/j-jstl0415/ for details.
[ September 17, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!