Can anyone give me an idea why this will not compile?
I would be very greatfull!!!
George
LookupAction.java [48:1] cannot resolve symbol
symbol : class LookupForm
location: class com.actmort.LookupAction
LookupForm lookupForm = (LookupForm) form;
^
LookupAction.java [48:1] cannot resolve symbol
symbol : class LookupForm
location: class com.actmort.LookupAction
LookupForm lookupForm = (LookupForm) form;
^
2 errors
Errors compiling LookupAction.
ackage com.actmort;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LookupAction extends Action {
protected Double getQuote(
String symbol) {
if ( symbol.equalsIgnoreCase ("SUNW") ) {
return new Double(25.00);
}
return null;
}
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse Response)
throws IOException, ServletException {
Double price = null;
// Defau;t target to success
String target = new String("success");
if ( form != null ) {
// Use te LookupForm to get the request parameters
LookupForm lookupForm = (LookupForm) form;
String symbol = lookupForm.getSymbol ();
price = getQuote(symbol);
}
// Set the target to failure
if ( price == null ) {
target = new String("failure");
}
else {
request.setAttribute("PRICE", price);
}
//Forward to the appropriate View
return (mapping.findForward(target));
}
}