how to pass parameter from servlet to html form

Answer Posted / haneef

By the Hidden form fields..

we can set the name and values here

<input type="hidden" name="uName" value="xxx" />

this way, u can send u r parameters to html

(or) by cookies
Cookie c1=new Cookie("uName","xxx");
response.addCookie(c1);

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if we pass negative value in load-on-startup?

1055


Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!

2036


Why is httpservlet declared abstract?

814


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

3140


What's the difference between servlets and applets?

782


What is servlet container?

893


What is servlet in tomcat?

806


What is the difference between forward () and sendredirect () functions in servlet? Explain

780


What are the common methods that are included in the http servlet class?

812


Explain url encoding in servlet?

824


Explain the servlet context.

833


How do you get the ip address of the client in servlet?

772


Why the concept of single thread model interface is used?

757


Is servlet a server side scripting language?

841


What are important features of Servlet 3?

849