wood burning stoves 2.0*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "org.apache.jasper.JasperException: tag Watch "org.apache.jasper.JasperException: tag New topic
Author

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

deep kathuria
Greenhorn

Joined: Jun 13, 2011
Posts: 2
index.jsp

<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 />
</s:form

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

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

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

HelloWorld


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) {
this.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: http://aspose.com/file-tools
 
subject: org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap' in struts2