I have a jsp page in which textarea element is popoulated with data from request parameter. I want to make some of the words in the text area bold and italics, how do I apply css to selective words inside textarea. or can I make those words bold , italics in java itself before sending to jsp? I googled it but no solution.
You would be better off using an existing solution rather than recreating it on your own. You could try something (but not limited to) this. There are tons out there. Just Google for "html rich text editor".
You can achieve this by including(hard code) the corresponding HTML tags between the text. (guess that you might have tried this)
To my knowledege, you cannot associate a CSS style in this case, as css style need to be attached to a HTML component tag.
Since no one said it yet, It is impossible to style portions of a textarea differently. If you apply a style, it has to apply to everything in that element. You would have to look at at RTE as Gregg mentioned. There are plenty of options out there.