Easy Newbie question (hopefully)

Hello,
I am a Lotus Notes developer and I need to write some code in Java.
I found an some open source package called Httpclient (http://jakarta.apache.org/commons/httpclient/2.0/index.html ) that does exactly what I want. (HTTP Post & Get inside the Notes client in the backend).
I amusing eclipse 3.0/ JDK 1.4x/ Win XP SP2
My problem is that eclipse does not seem to recognize my import statements
I have put the jar file in c:\Lotus\Notes\httpclient\
I have included the following in my Path statement in the environment variables:
C:\Lotus\Notes5;C:\j2sdk1.4.2_06;C:\Lotus\Notes5\httpclient;C:\Lotus\Notes5\httpclient\commons-httpclient-2.0.2.jar
In eclipse under Preferences\Java\Build Path\user libraries i added C:\Lotus\Notes5\httpclient\commons-httpclient-2.0.2.jar.
I copied the following example code into a new class:
import java.io.File;
import java.io.FileInputStream;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
import org.apache.commons.httpclient.methods.PostMethod;
* Example how to use unbuffered chunk-encoded POST request.
* @author Oleg Kalnichevski
public class ChunkEncodedPost {
public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.out.println("Usage: ChunkEncodedPost <file>");
System.out.println("<file> - full path to a file to be posted");
System.exit(1);
HttpClient client = new HttpClient();
PostMethod httppost = new PostMethod("http://localhost:8080/httpclienttest/body");
File file = new File(args[0]);
httppost.setRequestEntity(new InputStreamRequestEntity(new FileInputStream(file)));
httppost.setContentChunked(true);
try {
client.executeMethod(httppost);
if (httppost.getStatusCode() == HttpStatus.SC_OK) {
System.out.println(httppost.getResponseBodyAsString());
} else {
System.out.println("Unexpected failure: " + httppost.getStatusLine().toString());
} finally {
httppost.releaseConnection();
No matter what I do eclipse always tells me that the httpclient package cannot be resolved.
I have looked through this forum for answers plus tried to find some eclipse specific ones(not many)
I relativly sure this is a configuration issue or a code 18 but Java not being my strong suit so the answer eludes me.
Any help or suggestions would be appreciated...
Karl the Notes guy......

So I should remove it?
Also what is the proper location within the workspace
folders to put a jar files?Pretty much whereever you want to. However, I'd suggest that you copy that jar file in the project's directory tree, not in Lotus Note's directories (it doesn't belong to Lotus Notes, but rather to your app). The master copy of it should be in something like a /jakarta/commons directory, and then copy that jar to your application's directory structure.
+(root) - your project's root folder
|--- src/java - your source code
|--- lib - external jars your app needs, including the httpclient jar

Similar Messages

  • Easy newbie question re; Address Book

    I am trying to add a keyword in the Note field of each person to whom I want to send a Xmas card. I hit "edit" and then I cannot use my mouse to go immediately to the "note" field. It stays in the "first name" field unless I use the tab key to go down one-by-one.
    How to quickly access the "note" field?
    Thanks in advance for any help with this! (I bet this one has a "duh" type answer.)
    edited: I was clicking on the word "note" instead of inside the empty area. Sorry for the stupidity of the question. Duh!
    Message was edited by: MarieBoyer

    Hi Marie,
    why not create a group in Address Book (hit the '+' symbol in the bottom left hand corner)? Call it 'Christmas cards' and then drag the applicable contacts into this list. Don't worry as they not duplicated but just referenced from the total list of contacts. You could make 'sent' and 'received' lists if you wanted.
    Seasons greetings!
    Steffan

  • 2 easy newbie questions

    Is there a way to display the channel strips vertically larger (mixer) so I can see more detail of how loud each channel is?
    Also is there a window that has the audio anelizer signal, I saw it on a friends pro tools and want to learn to read this? It looks like a video vectorscope, only for audio!

    1. not that I know of.
    2. There are a couple different metering plugs in in the channel strip insert plugins --> Metering.

  • Two kind of newbie questions hopefully

    I have a simple movie that I import into Flash as a .flv.
    On a layer above it, I have some text that appears. 
    When I publish, the .swf shows the text fine.  But when I try to view it through the .html page, the text doesn't appear.  Any idea what's going on there?  Obviously it must have to do with the HTML code Flash generates when it publishes, but I don't know enough Javascript etc to decode it. 
    UPDATE:  If I put the text in on frame 1 and the put a blank keyframe in at frame 7, the text continues to stay there throughout the duration of the movie.  But only when I play the published html file.  Not when I play the swf directly.  ???  What on earth is going on there?
    Also, what is the correct directory location for the .flv on the remote server?  Does it need to seen an identical path structure as on the local computer?
    Thanks in advance!

    Here's the screenshot. 
    When I publish this, the SWF plays fine.  The text stays on for one second, then disappears.
    When I double click on the published HTML file, which opens a Firefox window and presumably plays the same .swf, the text stays on the entire length time, ignoring the fact that it should not display after frame 24.
    When I move the text to frame 2, the text NEVER shows in the HTML published file.
    So, for some reason, the HTML will play the first frame of text (and leave it there throughout the duration), but nothing else. 
    Basically, all I'm trying to do is import a movie I created from another source into Flash, put some text on it, and the output it.
    I'm baffled...

  • Easy newb question

    I have a "P" that I need to fill with white but when I try to fill it it fills up the hole in the P also. The letters I am trying to fill are represented by lines that I drew in AutoCAD and that were imported into illustrator via a .dxf file. I am trying to spruce up the company logo a bit..
    Thanks in advance,

    Select the P and its hole, and compound them: Object>Compound Path>Make.

  • SG200-08 Newbie Questions

    I have recently purchased the SG200-08 Smart Switch, but I have a few "newbie questions" about it as I get started using it.
    The on board firmware shows 1.0.1.0. Is that the latest firmware to the switch?
    Do I need to enable IPv6 Auto Configuration and DCHPv6 in my switch settings to be ready for IPv6 as my ISP rolls it out down the road?
    How do I go about changing the switch's username? I was able to easily change the password, but having issues getting the username to change.
    Do I need to do anything about the LLDP-MED settings? What exactly is that?
    How do I confugure the System Time Settings so the switch functions in my time zone (USA Central Time)?
    Thanks a bunch for any assistance!

    Hi Nathan,
    My guess is that NAT is already on - you have one public IP address from your ISP. Your router will use NAT (network address translation) to allow multiple clients (and either dynamically assign them private IPs via dhcp or you set them statically) to connect to the internet using the one public IP. It also sounds like your RV042G is assigning both ipv6 and ipv4 addresses, and theres nothing wrong with that. Unless you have specific information re: ipv6 from your isp, however, I would suggest not worrying about it until you hear from them. Are your macs connected to the router via the SG200 switch? If so, it looks like its passing ipv6 just fine.  UPnP is something completely different - thats with opening ports like you mentioned - its a way that your devices can communicate with the router to automatically enable the proper port forwarding for the device/application.
    Regarding the username, create a new user account. I don't think you can edit the cisco user, but try deleting it after creating and testing a new user account..
    I'm not familiar with the Polycom system, but I would leave the settings as default unless you are using true IP phones (rather than an ATA adapter). From a quick google of the polycom device, I don't think you will gain anything from LLDP/CDP as the handsets use regular cordless phone freqs. With my setup, we use cisco IP desk phones and cordless wifi phones, CDP makes life easy as the cisco access point, wifi phones, cisco switch, and cisco desk phones (connected via ethernet) see each other and know what they're dealing with automatically.
    I don't see the SNTP setting for unicast / broadcast that you're looking at. For the switch to get the time from a sntp server, under administration -> time -> sntp settings, add a server, and then back on time-> system time, enable sntp server as the main clock source. What are you using as your sntp source? Do you have an internal sntp server? You don't need to enable dhcp on the sntp server.
    May I also point you to the two manuals, I think they may be helpful:  RV042G  & SG200
    Hope thats helpful.
    Best,
    David
    Please rate any helpful posts.

  • WebDynPro Newb question

    Hey All,
    I need to begin working with WebDynPro. I have a couple of Newb questions:
    1) I need to jump right in fairly quickly, so can anyone suggest any good documentation that could help me get the basics down about working with WebDynPro?
    2) I loaded a Sample WebDynPro project into NetWeaverDev Studio, but I am unable to export this to our instance of EP on our Development Server. For a .par file its easy to do exports, but I can't for the life of me find where i go in NetWeaverDev Studio to do an export of a WebDynPro project. When I goto export in the WebDynPro perspective, it appears to only want to allow me to export locally, but I need to push to a different server. Can anyone help me with this?
    I appreciate any advice and suggestions. Thanks All!!
    Take care,
    -Kevin

    Hey Rich,
    I have the Engine setup, but I do not get prompted for the SDM password, do I need to configure that somewhere? I get the following error when trying to deploy:
    <i>Jul 15, 2005 10:13:17 AM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
    [004]Deployment aborted
    Deployment exception : Cannot determine sdm host (is empty). Please configure your engine/sdm correctly !</i>
    Thanks,
    -Kevin

  • MEGA-Newbie Question

    This has to be the most newbie of all newbie questions. Interestingly enough, it is the one that is most rarely answered in a non-technical way that the novice can understand.
    What exactly do I need Motion for? What, in common-sense, regular-language terms, does it do?
    My manuals tell me how to do all the things it does. But they assume I am an experienced editor (I'm an experienced filmmaker, but only just started working in editing) who already knows all the things that CAN be done and only wants to know HOW to do them in Motion. This is not me.
    So, say I am making a 90-minute HDV feature music doc. I have footage, I have stills. I will need captions, titles and text on screen. I will need an end credit roll. What is it I will probably want Motion to do for me that FCP can't do on its own?
    I'd appreciate an answer in somewhat non-technical language that addresses the practical use -- from a filmmaker's point of view -- of this no doubt amazing program.
    Thank you.

    hi Paul,
    You are right you can do much of the things Motion does in FCP, but Motion takes them further and often makes them easier to do.
    Briefly whereas FCP is generally for editing moving pictures from rushes to a coherent whole, Motion is used to composite or layers of moving pictures to make a new coherent whole picture.
    So i plain words, you can meld different sources of video, stills text and other sources together to make a new end peice. You can animate text, warp pictures, create fires, smoke, hide bits ( masking), animate graphical elements. In short whenever you need to layer up multiple sources of imagery Motion is your man. Sure FCP can handle a lot of this, but Motion is designed specifically and only to do this, and does it very well. ( You would not want to edit in Motion!)
    In your 90 minute example you could do it all in FCP and make it look very nice. But you might need to go the extra mile with the title sequence, perhaps the captions will have some kind of generic strap line ( lower third) under All these things could be done easier and better in motion. However you would not want to import the whole 90 minute programme into Motion and start throwing captions on it. Rather you would want to build each element ( strap line, animating titles, opening sequence etc) in Motion and then import them into FCP for the final mastering. Motion is for short sequences, and FCP is used to collect them all into one programme.
    I make music commercials for a living, do all the cutting on FCP and build all the graphic elements in Motion, take a look at my site for some examples if you'd like,
    http://www.moojoose.co.uk
    Hope this helps you
    regards
    adam

  • RV042G Newbie Questions

    I have the new Cisco RV042G router, and I have just a few "newbie questions" about it as I get started using it:
    The firmware on board is v4.2.1.02. Since this is a brand new router, is that the latest firmware?
    Under Time>DST Dates, what do I need to configure in there? I'm in the US, Central Time.
    I want to use Back to My Mac from iCloud (formerly MobileMe). Under the iCloud preferances pane on my Mac, it's saying: "Back to My Mac may be slow because NAT Port Mapping (NAT-PMP) or Universal Plug and Play (UPnP) is turned off on your router. Turn on NAT-PMP or UPnP." What should I enable on my router in order for Back to My Mac to better function?
    I'm using a VOIP phone on the network (only 1 device with a couple phones). Are there any QoS settings I should tweak for better performance of my VOIP phone? I did change the port the VOIP phone is connected to to High (instead of Normal) under Port Settings. Will this help boost performance?
    I also want to setup a VLAN on a port for guests to access the Internet, but not have any access to my personal network. Here's the steps I've done so far. Is this sufficient or is there anything else I need to do?
    I went to Setup>Network, enabled Multiple Subnets.
    I added 192.168.254.1/255.255.255.0 as a subnet.
    I went to Port Management>Port Setup, set the port I wanted to use (Port 4) to VLAN2.
    I went to Firewall>Access Rules, added two rules:
    Deny All Traffic from 192.168.254.0 to 192.168.1.0.
    Deny All Traffic from 192.168.1.0 to 192.168.1.0.
    Thanks everyone for your help!

    Easy.  just goto the DHCP field and fill in the Static DHCP fields.
    Assigning static IP addresses by adding devices from a list
    Click Show unknown MAC addresses. The IP & MAC binding list appears. If the web browser displays a message about the pop-up window, allow the blocked content.
    The devices are listed by the IP address and the MAC address. (Typically the MAC address appears on a label on the bottom panel or back panel of a device.) If needed, you can clickRefresh to update the data.To select a device, first enter a descriptive Name. Then check the Enable box. Alternatively, select all devices in the list by clicking the check box at the top of the Enable column.
    Click OK to add the devices to the Static IP list, or click Close to close the pop-up window without adding the selected devices. After you click OK, a message appears. The message includes important information. Read it before clicking OK. Keep the browser open and wait until the selected MAC addresses appear in the Static IP list.
    Modify or remove list entries, as needed:
    To modify the settings: Click a device in the list. The information appears in the text fields. Make the changes, and then click Update. If you do not need to make changes, you can click Add New to de-select the entry and clear the text fields.
    To delete an entry from the list: Click the entry that you want to delete, and then clickDelete. To select a block of entries, click the first entry, hold down the Shift key, and then click the final entry in the block. To select individual entries, press the Ctrl key while clicking each entry. To de-select an entry, press the Ctrl key while clicking the entry.
    Assigning static IP addresses by entering devices manuallyIn the Static IP Address section, add or edit entries as needed. Remember that the settings are not saved until you click the Save button.
    To add a new device to the list: Enter the following information, and then click Add to list.
    Static IP Address: Enter the static IP address. You can enter 0.0.0.0 if you want the router to assign a static IP address to the device.
    MAC Address: Enter the MAC address of the device. (Typically the MAC address appears on a label on the bottom panel or the back panel of a device.) Enter the address without punctuation.
    Name: Enter a descriptive name for the device.
    Enable: Check this box to assign the static IP address to this device.
    To add another new entry: Enter the information, and then click Add to list.
    To modify the settings: Click a device in the list. The information appears in the text fields. Make the changes, and then click Update. If you do not need to make changes, you can clickAdd New to de-select the entry and clear the text fields.
    To delete an entry from the list: Click the entry that you want to delete, and then click Delete. To select a block of entries, click the first entry, hold down the Shift key, and then click the final entry in the block. To select individual entries, press the Ctrl key while clicking each entry. To de-select an entry, press the Ctrl key while clicking the entry.
    Using the Static IP List to Block Devices
    You can use the Static IP list to control access to your network. You can block access by devices that are not on the list or do not have the correct IP address.
    Add devices to the Static IP list as described in Static IP Addresses.
    Enable or disable the following features:
    Block MAC address on the list with wrong IP address: Check this box to prevent a computer from accessing your network if its IP address has been changed. For example, if you previously assigned a static IP address of 192.168.1.100 and someone configures the device to use 192.168.149, the device will not be allowed to connect to your network. This feature discourages users from changing their device IP addresses without your permission. Uncheck the box to allow access regardless of the current IP address assignment.
    Block MAC address not on the list: Check this box to block access from devices that are not included in the Static IP list. This feature prevents unknown devices from accessing your network. Uncheck the box to allow access by any connected device that is configured with an IP address in the correct range.
    Hope that helps.
    Regards Simon
    http://www.linksysinfo.org

  • Total Newbie Question ... Sorry :-(

    I know it's a windows thing, and I am now converted to Mac but I gotta know this because it's doing my head in. It's a complete stupid green gilled newbie question.
    When installing new programs on a Mac can you create shortcuts to the programs on the Dock? I did what I THOUGHT it would be, i.e I made an Alias and stuck it in the dock, but on rebooting my Mac later on, in place of the shortcuts where 3 question marks which when clicked on did absolutely nothing???
    Help?
    A.L.I
    Windows XP Pro Desktop, Macbook Pro, 60GB iPod Video   Mac OS X (10.4.5)   OS X

    You aren't installing something from a dmg file are you? The dmg is a disk image – kind of a virtual CD. So when you double click the dmg and then get the little disk/hardrive/custom icon on your desktop that is the same as if you had mounted a CD. You then need to drag the application off of that "CD" into your application folder. Then it is truly installed.
    You can then "eject" the icon your your desktop. This is what happens when you shutdown and without remounting the image your dock shortcut can't find the original.
    Just a thought.

  • Newbie Question. just installed IE7.. how do I set up a local host to preview sites?

    Sorry for the newbie question... but it's been a long time since I have done this
    Thanks!

    Just define your site in DW as always.  For a static site, that's all you need to do.

  • Newbie Question about FM 8 and Acrobat Pro 9

    Hello:
    I have some dcouments that I've written in FM v8.0p277. I print them to PDF so that I can have a copy to include on a CD and I also print some hard copies.
    My newbie question is whether there is a way to create a  PDF for hard copy where I mainitain the colors in photos and figures but that the text that is hyperlinked doesn't appear as blue. I want to keep the links live within the soft copy. Is there something I can change within Frame or with Acrobat?
    TIA,
    Kimberly

    Kimberly,
    How comes the text is blue in the first place? I guess the cross-reference formats use some character format which makes them blue? There are many options:
    Temporarily change the color definition for the color used in the cross-reference format to black.
    Temporarily change the character format to not use that color.
    Temporarily change the cross-reference definition to not used that character format.
    Whichever method you choose, I would create a separate document with the changed format setting and import those format into your book, create the PDF and then import the same format from the official template.
    - Michael

  • Newbie Question - Best Method of Burning to DVD?

    Hi, I apologize in advance for how easy this question may be. I recently edited 20 minutes of footage for a friend and I'd like to have it burned to a DVD.
    In the past, I've burned plenty of video files with Nero but this project exports as a 4.3gb file, which won't fit on the DVD. I know next to nothign about codecs and such. The file type I used was Microsoft DV AVI and the Compressor was DV NTSC, frame size is 720 by 480 and pixel aspect ratio is D1/DV NTSC (0.9). I hope this helps... I believe these were chosen by default.
    I just want to be able to burn it to a DVD or export it as a manageable file size to burn later, without sacrificing too much quality, as the quality is already pretty poor.
    Thanks for any help :D

    Encore will compress the file to MPEG for you.

  • Domain name settings - Newbie question

    Sorry for a newbie question!
    I am already pointing a domain name to web hosting for email account. Now, I need an application server to run ERP software and Oracle, and installing Solaris and Oracle need a domain name.
    If I point my domain name to the server, how do I receive emails from web hosting???
    Install an email server to the application server instead? What can I do if I want the same domain name? Any option?

    Setting up a mailserver and making sure it doesn't suddenly turn into a spambox is not something you do with the use of a few commands. I suggest to dive into the Solaris admin guide on docs.sun.com and read up on e-mail and network services.
    If that is asking too much of your time you'll be better off getting your ISP to handle all this for you.

  • Domain Name settings in Solaris - Newbie question

    Sorry for a newbie question!
    I am already pointing a domain name to web hosting for email account. Now, I need an application server to run ERP software and Oracle, and installing Solaris and Oracle need a domain name.
    If I point my domain name to the server, how do I receive emails from web hosting???
    Install an email server to the application server instead? What can I do if I want the same domain name?

    Your questions are completely off-topic for the forum.
    These SunOS forums are for questions on <i>"how do I install my OS"</i>
    You particular question is in the <i>"how can I install Solaris while using the CD drive"</i> forum.
    So, if you had a question on how to edit the /etc/inet/hosts file to establish a FQDN on the computer, then it might be appropriate for the forum.
    Unfortunately, I don't have a clue on where to redirect you, except perhaps to the Sun Java Enterprise System suite of applications?

Maybe you are looking for