This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap' in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "org.apache.jasper.JasperException: tag Watch "org.apache.jasper.JasperException: tag New topic

org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap' in struts2

deep kathuria

Joined: Jun 13, 2011
Posts: 2

<s:form action="HelloWorld" >
<s:textfield name="userName" label="User Name" />
<s:radio name="gender" label="gender" list="{'Male','Female'}"></s:radio>
<s:select label="Select Day" name="usingMap" list="mapForSelect" theme="simple" headerKey="1" headerValue="-- Please Select --"/>
<s:checkbox name="language" label="java"/>
<s:submit />

<package name="default" extends="struts-default">

<action name="HelloWorld" class="vaannila.HelloWorld">

<result name="SUCCESS">/success.jsp</result>


package vaannila;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

* @author Meyyappan Muthuraman

public class HelloWorld {

private String message;

private String userName;
private String gender;
private boolean language;
private String country;
private ArrayList<Country> countryList;
private Map<Integer, String> mapForSelect;
private String usingMap;

public Map<Integer, String> getMapForSelect() {
return mapForSelect;

public void setMapForSelect(Map<Integer, String> mapForSelect) {
this.mapForSelect = mapForSelect;

public String getUsingMap() {
return usingMap;

public void setUsingMap(String usingMap) {
this.usingMap = usingMap;

public String getCountry() {
return country;

public void setCountry(String country) { = country;

public boolean isLanguage() {
return language;

public void setLanguage(boolean language) {
this.language = language;

public String getGender() {
return gender;

public void setGender(String gender) {
this.gender = gender;

public String execute() {

setMessage("Hello " + getUserName());
mapForSelect = new HashMap<Integer, String>();
mapForSelect.put(1, "map 1");
mapForSelect.put(2, "map 2");
mapForSelect.put(3, "map 3");
mapForSelect.put(4, "map 4");
mapForSelect.put(5, "map 5");
mapForSelect.put(6, "map 6");

return "SUCCESS";

* @return the message

public String getMessage() {
return message;

* @param message the message to set
public void setMessage(String message) {
this.message = message;

* @return the userName
public String getUserName() {
return userName;

* @param userName the userName to set
public void setUserName(String userName) {
this.userName = userName;


i am getting the error

org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap'
what is thre reason behind it
I agree. Here's the link:
subject: org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap' in struts2
It's not a secret anymore!