I have an Action class in com.kog.action --> VendorListAction.java
package com.kog.action;
import com.kog.Vendor;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import java.sql.*;
public class VendorListAction extends ActionSupport{
public
String execute() throws Exception
{
Vendor v=new Vendor();
return SUCCESS;
}
}
Also my bean class is in com.kog ---> Vendor.java
package com.kogent;
import com.opensymphony.xwork2.ActionSupport;
public class Vendor{
private String productName;
private String productCategory;
private String vendorName;
private String vendorLocation;
private String contactPerson;
private String emailId;
private int phoneNumber;
Vendor(String productName,String productCategory,String vendorName,String vendorLocation,String contactPerson,String emailId,int phoneNumber)
{
this.productName = productName;
this.productCategory = productCategory;
this.vendorName = vendorName;
this.vendorLocation = vendorLocation;
this.contactPerson = contactPerson;
this.emailId = emailId;
this.phoneNumber = phoneNumber;
}
public String getProductName(){
return productName;
}
public void setProductName(String productName){
this.productName = productName;
}
public String getProductCategory(){
return productCategory;
}
public void setProductCategory(String productCategory){
this.productCategory = productCategory;
}
public String getVendorName(){
return vendorName;
}
public void setVendorName(String vendorName){
this.vendorName = vendorName;
}
public String getVendorLocation(){
return vendorLocation;
}
public void setVendorLocation(String vendorLocation){
this.vendorLocation = vendorLocation;
}
public String getContactPerson(){
return contactPerson;
}
public void setContactPerson(String contactPerson){
this.contactPerson = contactPerson;
}
public String getEmailId(){
return emailId;
}
public void setEmailId(String emailId){
this.emailId = emailId;
}
public int getPhoneNumber(){
return phoneNumber;
}
public void setPhoneNumber(int phoneNumber){
this.phoneNumber = phoneNumber;
}
}
While complile Vendor.java , there is no problem
But Compiling VendorListAction.java , the error is,
VendorListAction.java:9: cannot find symbol
symbol : class Vendor
location: package com.kog
import com.kog.Vendor;
^
VendorListAction.java:14: cannot find symbol
symbol : class Vendor
location: class com.kog.action.VendorListAction
Vendor v;
^