473,395 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Getting contact list from gmail using jsp

118 100+
hi,

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
  1. <%@ page import="com.xdatasystem.contactsimporter.*" %>
  2. <%
  3. // automatically guess the correct implementaion based on the email address
  4. ContactListImporter importer=ContactListImporterFactory.guess("mymail@gmail.com", "mypassword");
  5. List<Contact> contacts=importer.getContactList();
  6. for(Contact c : contacts) {
  7.   out.println("name: "+c.getName()+", email: "+c.getEmail());
  8. }
  9. %>
  10.  
  11.  

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.
Dec 8 '08 #1
2 5441
Dököll
2,364 Expert 2GB
Hey there friend!

I am not sure if it is a jar file problem, but I can tell you from my own experience using mail (similarly to yours)... An attempt to use Gmail gateway failed, I supposed because Google did not allow me to use their mail server to send mail.

I suspect you'll need to figure out a way to be allowed into your mail in code, which may mean getting Google's okay.

Not sure if Gmail gives out their mail gateway info for use.

Good luck finding it, please post your findings for all to see, if you could:-)
Dec 9 '08 #2
Nepomuk
3,112 Expert 2GB
@swethak
I don't really know JSP, but the errors indicate, that you either haven't imported those libraries (I'm guessing you normally have to in JSP just like in normal Java) or that it can indeed not find the jars.

ContactListImporter should be in a jar that should be downloadable here, I could imagine that ContactListImporterFactory is in the same jar. List is probably java.util.List and Contact will be in some Google API, I would think.

Greetings,
Nepomuk
Dec 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Brian Henry | last post by:
Does anyone know of a way to pull my contact lists out of exchange server and into a VB.net application? or even a public contact list? Thanks! This is something I need really bad, any help would...
0
by: Brian Henry | last post by:
I want to pull my contact list (personal one) from the exchange server into a local text file. I know how to write stuff into a text file, just getting it from an exchange server is my problem....
1
by: Robert J. Bonn | last post by:
I'm trying to set up a contact list in MS Access 97. I've looked through a reference book and the program's help screens, but the light bulb isn't quite coming on for me. If one of you could take...
1
by: rjbonn | last post by:
I'm setting up a contact list for a musician, who is about to release her first CD. She would like a contact list that can track the people she meets, who will be in various categories -- fans,...
0
by: Robert J. Bonn | last post by:
I am setting up a contact list for a musician, who is about to release her first CD. She would like a contact list that can track all the people she meets, who will be in various categories --...
6
Hunderpanzer
by: Hunderpanzer | last post by:
I've been working on that "contact list" on and off now, and now I'm really trying to get it complete. I'm trying to reduce the clutter right now, and make it more readable. All the braces and...
2
by: FCI | last post by:
Hi! My Name is Faraz. I want to get the Contact list from Yahoo, Hotmail, Gmail, AOL from corresponding account provided the EmailID and Password in ASP.Net using C#. Please help me out.
3
by: d3ph03n1x | last post by:
What I'm trying to do is create a Simple contact list, with a menu, which i would add contacts too, edit contacts, view them, and search them when there is a long list, maybe on the basis of contact...
0
by: krisssgopi | last post by:
Hi Team, Am really got frustrated. since i have written the coding for getting yahoo contact list using asp.net. After getting the "xoauth_yahoo_guid" i cant able to retrieve the contact list....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.