This is my form bean:
public class LoadPowerForm extends ActionForm {
private
String strForecastDataFile;
public void setStrForecastDataFile(String strForecastDataFile) {
this.strForecastDataFile = strForecastDataFile;
}
public String getStrForecastDataFile() {
return strForecastDataFile;
}
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) {
String[] strFileDir = getFileName(getStrForecastDataFile()); //Here i am getting Unknown Source Problem
}
private String[] getFileName(String strAbsoluteFileName) {
String strFileDir[] = new String[2];
try
{
File file = new File(strAbsoluteFileName);
strFileDir[0] = file.getParent();
strFileDir[1] = strAbsoluteFileName.substring(file.getParent().length()+1);
}
catch(Exception e) {
//error message
}
return strFileDir;
}
}
//Here is my
Jsp
External Power Forecast Data File : <html:file property="strForecastDataFile" name="LoadPowerForm"/>
This is perfectly worked once i deployed in windows environment but giving the problem only when i deployed in the linux environment.