473,587 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting contact list from gmail using jsp

118 New Member
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.jasp er.JasperExcept ion: Unable to compile class for JSP

An error occurred at line: 2 in the jsp file: /importcontact.j sp
Generated servlet error:
ContactListImpo rter cannot be resolved to a type

An error occurred at line: 2 in the jsp file: /importcontact.j sp
Generated servlet error:
ContactListImpo rterFactory cannot be resolved

An error occurred at line: 2 in the jsp file: /importcontact.j sp
Generated servlet error:
List cannot be resolved to a type

An error occurred at line: 2 in the jsp file: /importcontact.j sp
Generated servlet error:
Contact cannot be resolved to a type


org.apache.jasp er.servlet.JspS ervletWrapper.h andleJspExcepti on(JspServletWr apper.java:510)
org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 375)
org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:314)
org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :264)
javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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 5450
Dököll
2,364 Recognized Expert Top Contributor
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 Recognized Expert Specialist
@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.

ContactListImpo rter should be in a jar that should be downloadable here, I could imagine that ContactListImpo rterFactory 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
1109
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 be nice. -- ================================ Brian Henry The Reschini Group HTTP://www.reschini.com
0
3868
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. I've been looking at webdav as a solution to this, but i dont know much about how to use webdav or it with exchange server. Right now i'm working with VB.NET I found a sample project at...
1
2551
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 the time to answer two very elementary questions, I'd appreciate it. Suppose the contact list consists of (for example) musicians and teachers. For every person in the list, we keep name, address, etc. For musicians, we keep track of what...
1
2304
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, radio station personnel, owners of clubs, other musicians, etc. Ideally, I'd like to create a form that asks basic questions for everyone (name, phone number, etc.) No problem. But then, there will be different kinds of information,...
0
1542
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 -- fans, radio station personnel, owners of clubs, other musicians, etc. Ideally, I'd like to create a form that asks basic questions for everyone (name, phone number, etc.) No problem. But then, there will be different kinds of information,...
6
1497
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 if, else statements are getting pretty big, so I tried putting them in functions. I declared it, called it and defined it properly ( I hope) but it doesn't seem to be working. The program Compiles fine, no errors or warnings. But when the time comes...
2
2194
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
2017
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 numbers or names. And first start with saving them in a file. Then once i have that functioning correctly. Either use the text file as a temp dump to update the database. Or if that's not possible or not the correct way to go about the solution, then...
0
1685
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. Please advise me. <?xml version="1.0" encoding="UTF-8" ?> - <yahoo:error xmlns:yahoo="http://yahooapis.com/v1/base.rng" xml:lang="en-US"> <yahoo:description>Please provide valid credentials. OAuth...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.