Frds , I have an given link to a string as <a href=**\myservlet>xyz</a> after clicking on string 'xyz' a servlet will be called ,I want to pass string 'xyz' to the servlet. How i should do this?
Udayan Naik
Ranch Hand
Joined: Oct 18, 2000
Posts: 135
posted
0
I think the following code should work..
Here 'param' can be any name u wish to give. Then u can retrieve the value of param by
------------------ Udayan Naik Sun Certified Java 2 Programmer
Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
A few things about this. First, you should never use '\' slashes in a URL. Although some browsers (particularly IE) find this acceptable in some situations, it is very non-standard. Please use '/' slashes instead. Second. You should always put the values of attributes in quotes. This is important for XML and XHTML compatibility, but vital if your parameter values might ever contain spaces or other dangerous characters. Get in the habit of quoting all attribute values now. So the example give might look more like: