i have to get the gmail contact list using jsp code. For that purpose i have to use the Google data Api
Expand|Select|Wrap|Line Numbers
- <%@ page import="com.xdatasystem.contactsimporter.*" %>
- <%
- // automatically guess the correct implementaion based on the email address
- ContactListImporter importer=ContactListImporterFactory.guess("mymail@gmail.com", "mypassword");
- List<Contact> contacts=importer.getContactList();
- for(Contact c : contacts) {
- out.println("name: "+c.getName()+", email: "+c.getEmail());
- }
- %>
By using like that code i got the errors as
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /importcontact.jsp
Generated servlet error:
ContactListImporter cannot be resolved to a type
An error occurred at line: 2 in the jsp file: /importcontact.jsp
Generated servlet error:
ContactListImporterFactory cannot be resolved
An error occurred at line: 2 in the jsp file: /importcontact.jsp
Generated servlet error:
List cannot be resolved to a type
An error occurred at line: 2 in the jsp file: /importcontact.jsp
Generated servlet error:
Contact cannot be resolved to a type
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
We think these are errors comes due to the didn't have the proper jar files.In that i didn't place any jar files in lib folder.
If these error comes due to jar files please tell that what jar files i have to to place in the lib folder.
otherwise please tell that whats the problem in my code.