File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HTML tags and Filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTML tags and Filters" Watch "HTML tags and Filters" New topic

HTML tags and Filters

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 751
Hi, I can't seem to imaging how I would try to filter HTML tags through servlet filters. I know that I could get all the parameters through response.getParameterNames(), but how am I suppose to send the filtered names to the servlet request again? I guess I better let my code speak for me...

Sorry, I couldn't find any other way to explain the problem. I hope you understand. Thanks!

SCJP 1.5 -
ak pillai
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
You can't alter the request parameters, just read them. If you could there would be a setParameter() method. You save the altered values as the request attributes and use your saved request attributes in your servlet.Parameters and attributes do not share a name space so a parameter named "name" and an attribute keyed "name" are distinct.

java j2ee job interview questions with answers | Learn the core concepts and the key areas
I agree. Here's the link:
subject: HTML tags and Filters
It's not a secret anymore!