parameters - Parse a custom tag using request information in JSP -


i have simple problem haven't had luck finding solution google.

i want expand custom jsp tags want able parse differently depending on request information. example tag:

<my:tag type="..."/> 

should expanded differently if parameters in request differ:

http://localhost:8080/context/servlet?arg=web 

should yield different result than:

http://localhost:8080/context/servlet?arg=mobile 

does know how tag parsing class (usually expands tagsupport) can access or passed parameters request?

inside tag class, can access request object , parameter by

this.pagecontext.getrequest().getparameter("arg"); 

Comments

Popular posts from this blog

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -

mysql - How to insert just year and month into date field? -