Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JSP error

Hi,

Hi,

I created html page where we can enter customer number and using servlet program, i am getting values and displayed in the web page for that I used the html tags in the servlet program. Now, I need to display the values using the JSP page when i used, it is generating errors.

And I used the following code for JSP page :

<%@ page language = "java" %>

<%@ page import = "myPackage.*" %>

<jsp:useBean id ="myId" scope = "session" class = "myPackage.VendorServlet" >

<jsp:setProperty name="myId" property="vendno" param = "vendno"/>

</jsp:useBean>

<html>

<head><title>Vendor Details</title>

</head>

<body>

<%

String number = myId.getVendor_No();

String name = myId.getName();

String city = myId.getCity();

String po = myId.getPo_Box();

%>

</body>

</html>

getVendor_No(), getName(), getCity(), getPo_Box() are the methods present in my Servlet Program. Error is generated becasue of this methods only .

Error message :

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 13 in the jsp file: /Details.jsp

Generated servlet error:

D:\jboss-4.0.1\server\default\work\jboss.web\localhost\contextRoot\org\apache\jsp\Details_jsp.java:67: cannot resolve symbol

symbol : method getVendor_No ()

location: class myPackage.VendorServlet

String number = myId.getVendor_No();

^

For all the four methods I am getting the same errors.

Please help me out.

Thanks,

Pavan.

Not what you were looking for? View more on this topic or Ask a question