I have a jsp page with a custom tag which greets the person in language based on the type of country selected from a drop down list. For example, if country is US the greet in english.
So, I have made a custom tag with a language attribute that will be dynamiclly upgraded with the values selected from the user.
Please tell me how to use EL(expression language) in the attribute to provide the value on run time of the country selected. Also how to use objects of my own made classes in EL.

Custom tag
<myTag:tagLibrary language="put dynamic value here from CustomTagLibraryClass" />


CustomTagLibrary Class

package tagLibrary;
import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;


public class CustomTagLibrary implements Tag {

private PageContext pc = null;
private Tag parent = null;
private String language = "english";


public void setPageContext(PageContext p) {
pc = p;
}

public void setParent(Tag t) {
parent = t;
}

public Tag getParent() {
return parent;
}

public void setLanguage(String s) {
language = s;
}

public String getLanguage() {
return language;
}

public int doStartTag() throws JspException {
try {

if(language.equals("english")) {
pc.getOut().write("Hi there");
}
else if(language.equals("german")){
pc.getOut().write("Gutten Tag");
}

else if(language.equals("hindi")){
pc.getOut().write("Namashkar");
}

else if(language.equals("Irani")){
pc.getOut().write("Salam");
}
} catch(IOException e) {
throw new JspTagException("An IOException occurred.");
}
return SKIP_BODY;
}

public int doEndTag() throws JspException {
return EVAL_PAGE;
}

public void release() {
pc = null;
parent = null;
language = null;
}
}




Please also tell me how to give value to this custom tag based on value selected by user from drop down.