Problem processing cookie set in Java, in a CF function

The cookie, uuuid, is set in a jsp (on a server running websphere). 
Cookie uuuid = new Cookie("uuuid","emailaddr");
uuuid.setPath("/");
response.addCookie(uuuid);
I then send myself to the other side (a CF server)
response.sendRedirect(response.encodeRedirectURL(urlstring));
On the CF server, I have a function that tries to process the cookie and store its value into a another cookie that lives on this host.
As opposed to the host it was first set on. But...
Cookie info = null;
Cookie[] cookies = request.getCookies();
if (cookies != null) {
  for (int i=0; i < cookies.length; i++) {
        info = cookies[i];
        String cookiename= info.getName();
        if (cookiename.equals("uuuid")) {
          if (!info.getValue().equal("")) {
              cfcookie name=SCL_AUTHDUSER value="#info.getValue()#"   
              info.setMaxAge(0); 
              info.setPath("/");
              response.addCookie(info);
generates this error: Variable INFO is undefined. Line: 67
I have the required delimiting less than and greater than symbols for cfcookie
I just keep losing the cfcookie line everytime I add those delimiters to this posting. Very frustrating as well.
Anyway around the Cold Fusion error?  Thanks for any and all information,
Nelson --------------------------------------------------------------------------------

You will probably find that the collection is an unmodifiable version. From the 5.0 API
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html
Collections.unmodifiableCollection(Collection<? extends T> c)
Returns an unmodifiable view of the specified collection. This method allows modules to provide users with "read-only" access to internal collections. Query operations on the returned collection "read through" to the specified collection, and attempts to modify the returned collection, whether direct or via its iterator, result in an UnsupportedOperationException
Check the Set and Iterator implementing classes using:
System.out.println(mySet.getClass().getName());
System.out.println(mySet.iterator().getClass().getName());Cheers, Neil

Similar Messages

  • Calling java method from c function

    Hi,
    I have been through some forums and tutorials, but nothing helps me yet.
    Here's my problem : I want to access java funtion from c function.
    <code java>
    public class MyClass {
    public int oneMethod() {
    return 5;
    </code java>
    <code c++>
    void main(int argc, char *argv[]) {
    // creation of JVM -> no problem
    cls = (env)->FindClass("MyClass");
    if (cls != 0) {
    // it finds the class
    mid = (env)->GetMethodID(cls, "oneMethod", "()I");
    if (mid != 0) {
    // it finds the method
    intReturn = (env)->CallIntMethod(cls, mid);
    printf("Result of oneMethod: %d \n", initReturn);
    </code c++>
    the initReturn gives me 0, and not 5. So what do you think the mistake is ?
    Should I pass by the GetClassObject() funtion, but in this case, what object would I pass in reference since I'm using a call from c to java.
    Thanks a lot for your response, and Happy new Year to all the comunity.

    1. You are - apparently - trying to call a method of a java object.
    2. But you are instead making the call on a class.
    3. You can do one of the following:
    o Pass a reference to the object as you call C.
    o Call some other java method (maybe static) that gets you a reference to a java object.
    o Use JNI to call a java constructor to create a java object.
    o Change your code to get the class object and call a static method.

  • Problem in cookie handling using CookieManager java1.6

    Hi all...
    I found that there is a no cookies are catched from http response for some web sites are requested by using CookieManager() in jdk1.6.
    following is source code where i test this case....
    import java.io.;
    import java.net.;
    import java.util.*;
    public class Fetch {
    public static void main(String args[]) throws Exception {
    String urlString = "http://www.google.com";
    //urlString = "http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1";
    CookieManager manager = new CookieManager();
    manager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
    CookieHandler.setDefault(manager);
    URL url = new URL(urlString);
    URLConnection connection = url.openConnection();
    if (connection instanceof HttpURLConnection) {
    HttpURLConnection httpUrlConnection = (HttpURLConnection) connection;
    httpUrlConnection.setInstanceFollowRedirects(true);
    httpUrlConnection.connect();
    BufferedReader bufferedReader
    = new BufferedReader(
    new InputStreamReader(
    httpUrlConnection.getInputStream()));
    StringBuffer stringBuffer = new StringBuffer();
    String line = null;
    while ((line = bufferedReader.readLine()) != null) {
    stringBuffer.append(line);
    stringBuffer.append("\n");
    System.out.println(stringBuffer.toString());
    CookieStore cookieJar = manager.getCookieStore();
    List<HttpCookie> cookies = cookieJar.getCookies();
    for (HttpCookie cookie: cookies) {
    System.out.printf("\nCookie: %s%n", cookie);
    }It is working well using for google web site but not working for ubs.com. i give the requested page in variable urlString remove the comment at lineno 8 after finish the normal test. It will not print any cookies for this website..But i found Cookies for both web site using httprequesttracker.
    Here is Mozilla firefox request and response for both web site....
    http://www.google.com/
    GET / HTTP/1.1
    Host: www.google.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Location: http://www.google.co.in/
    Cache-Control: private
    Set-Cookie: PREF=ID=8117eafc8d1868c5:TM=1213001085:LM=1213001085:S=iJitvzgWFvKmDTZm; expires=Wed, 09-Jun-2010 08:44:45 GMT; path=/; domain=.google.com
    Date: Mon, 09 Jun 2008 08:44:45 GMT
    Content-Type: text/html; charset=UTF-8
    Server: gws
    Content-Length: 221
    http://www.google.co.in/
    GET / HTTP/1.1
    Host: www.google.co.in
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 200 OK
    Cache-Control: private
    Content-Type: text/html; charset=UTF-8
    Set-Cookie: PREF=ID=707e00e4cd0dddda:TM=1213001085:LM=1213001085:S=kXfAKdv-DMuiSWXp; expires=Wed, 09-Jun-2010 08:44:45 GMT; path=/; domain=.google.co.in
    Content-Encoding: gzip
    Date: Mon, 09 Jun 2008 08:44:45 GMT
    Server: gws
    Content-Length: 2930Following is for usb.com website
    http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1 HTTP/1.1
    Host: apps1.ubs.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Date: Mon, 09 Jun 2008 04:47:06 GMT
    Server: Apache
    Pragma: no-cache
    Connection: close
    Location: http://apps.ubs.com:80/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    Cache-Control: no-cache
    Content-Length: 318
    Content-Type: text/html; charset=utf-8
    http://apps.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1 HTTP/1.1
    Host: apps.ubs.com:80
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Date: Mon, 09 Jun 2008 04:47:08 GMT
    Server: Apache
    Pragma: no-cache
    Set-Cookie: NavLB_Apps=apps1.ubs.com; Domain=.ubs.com; Path=/; Version=1; HttpOnly
    Connection: close
    Location: http://apps1.ubs.com:80/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828
    Cache-Control: no-cache
    Content-Length: 345
    Content-Type: text/html; charset=utf-8
    http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828 HTTP/1.1
    Host: apps1.ubs.com:80
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: NavLB_Apps=apps1.ubs.com
    HTTP/1.x 200 OK
    Date: Mon, 09 Jun 2008 04:47:08 GMT
    Server: Apache
    Content-Language: en-US
    Set-Cookie: JSESSIONID=0000vHz5HlsSRtRwAgUVx0Il0oW:-1; Path=/; Version=1; HttpOnly
    Cache-Control: no-cache="set-cookie,set-cookie2"
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Content-Type: text/html;charset=ISO-8859-1
    Connection: close
    Transfer-Encoding: chunkedI dont know wat is the problem with this CookieManager() in java1.6...
    But it is working well and print cookiees
    By replace line 10
    CookieHandler.setDefault(manager);to
    CookieHandler.setDefault(new ListCookieHandler());code for ListCookieHandler.java is avalible in
    [http://java.sun.com/developer/JDCTechTips/2005/tt0913.html#1|http://java.sun.com/developer/JDCTechTips/2005/tt0913.html#1]
    please give some idea for solve this problem....

    You are using Firefox 2.x, so i think that the cookie for the usb.com website is no http cookie, it's probably a "DOM Storage"
    (if you use an actual IE instead, then the "Set-Cookie" lines may stay anyway then it will be the "userData behavior" feature of MS).
    They both are looking similar to http-cookies because they are a kind of cookie too, but with another (more common) format.
    I'm not so familar to their format, so it is only an assumption (maybe another can affirm or disprove this), but i remembered that
    DOM Storage and userData behaviour Cookies were designed to manage persist data across multiple browser sessions -
    and on the usb.com website it is indeed starting a session (JSESSIONID=0000vHz5HlsSRtRwAgUVx0Il0oW).
    (To be sure, that this is a DOM storage you have to watch the behaviour of this cookie and the server, or you can watch the
    size of this cookie over a longer periode, if it grows much greater than 4KB it is one (DOM Storage and userData behavior can
    grow of up to nearly 6 MB), or the easiest way if you can login, do it and look if you are logged in the next day, too)
    So there is no problem with the CookieManager() in java1.6, that is only providing "HTTP cookie management"
    (see CookieManager and CookiePolicy), while ListCookieHandler seems to be a more common approach.
    Edited by: penpen on Jul 6, 2008 4:41 AM

  • Parallel processing of Jobs in Java

    Hi Sun forum Experts,
    we are facing a problem in parallel processing of jobs in java,The jdk version used is 1.4.
    Find the issue analysis as below
    Assume we have TABLE1 as below:  
    1st job completed running and updates the status to OK by running an update query (so STATUS in TABLE1 is OK )---> 1st row  
    2nd job is still running and is in IN (Status in Table) ---> 2nd row  
    3rd job is still running and is in IN (Status in Table) ---> 3rd row  
    4th job is still running and is in IN (Status in Table) ---> 4th row  
    In the meanwhile, the First job has completed the job and hence  status is "OK" now. now we are calling another update query which updates another column in another table(TABLE2) in database.  
    The query is " Update TABLE2 set STATUS="OK" where INIT_NO='123456789' AND NOT EXISTS(SELECT COUNT(*) FROM  TABLE1 WHERE STATUS in('IN','RE'))  
    Hence the subquery is returning 3 rows as count for the inner query execution which skips the updation of the TABLE2.
    {code}
    *The problem is we want all the 4 jobs to be completed first with respect to TABLE1(running a update query)   & Once this is done we need to update another column in another table(TABLE2) in database.*
    i.e as shown below
    {code}
    public void execute(){  
                 dao.updateTable1(); // calls Table1 and updates it to OK. --> This has to be performed for n number for jobs.Finish all job completion and then proceed below.  
                //Once UpdateTable1 is completed ,after this we perform the below step  
                dao.updateTable2(); //calls Table2 and updates it to OK    
    {code}
    how do we handle this scenario in Java,
    Please Note:Version in java is used is 1.4 only
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    yes sir,you are absolutely correct.
    We run 4 jobs to update table1, wait for them all to complete, then update table2   can you please tell me how do we achieve this in java,
    Please note:JDK version is 1.4 which we are using.
    Thanks
    Deepak
    Edited by: Deepak_A_L on Jun 25, 2009 12:58 AM

  • [svn] 3127: Updating asdoc to replace the avmplus call with new set of java files.

    Revision: 3127
    Author: [email protected]
    Date: 2008-09-05 14:16:53 -0700 (Fri, 05 Sep 2008)
    Log Message:
    Updating asdoc to replace the avmplus call with new set of java files.
    Removing all files related to asdochelper.
    QA: Yes, also please test on non windows platform.
    Doc:
    Tests: checkintests, asdoc
    Reviewed by: Pete Farland
    Modified Paths:
    flex/sdk/trunk/asdoc/templates/ASDoc_Config_Base.xml
    flex/sdk/trunk/asdoc/templates/asdoc-util.xslt
    flex/sdk/trunk/modules/compiler/build.xml
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocAPI.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsClass.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocHelper.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/QualifiedNameInfo.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/SortComparator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    Removed Paths:
    flex/sdk/trunk/asdoc/templates/asDocHelper
    flex/sdk/trunk/asdoc/templates/asDocHelper.linux
    flex/sdk/trunk/modules/compiler/asdoc/

    I had a generic record class that has a HashMap to hold the data fields (...)
    method called createRecord() for each record type which would populate the HashMap with the correct data fieldsI'm not sure I understand: are the contents of this field map the same between two records of the same type? Then yes, you don't need to clone the map per record instance.
    one thing that needs fixing is the fact that each time the createRecord() method is called I'm creating a new fieldMap to define the dataFields in the record class.Probably, but that will only get you a little bigger files; you won't gain an order of magnitude on the size of files. The problem for huge files is that as soon as their content is bigger than the available memory, you'll run into problems. A more radical approach if you need to address huge files is to process the records on the fly, and not load all records in memory. Of course not all algorithms or business logic can afford that...
    I know I could rewrite the code and create a class for each record type and declare the fieldMap static but I was wondering if anyone had any better suggestions The Record instance could receive and keep a reference to its RecordType instance, and ask the RecordType instance the DataType for a field's name. That way the RecordType encapsulates the map, and there's less risk that a clumsy other class modifies the static map.
    before I go rewriting a load of code.A load of code?!? Even with the idea of the static map, you only have to edit the enum type (well more accurately, each RecordType enumerated constant's createRecord() method).

  • Yahoo mail sign-in - Freeze with 'ask me everytime' cookie setting.

    3.6.13 win7-64
    * Default Plug-in
    * Shockwave Flash 10.1 r102
    * Next Generation Java Plug-in 1.6.0_23 for Mozilla browsers
    * NPRuntime Script Plug-in Library for Java(TM) Deploy
    * 4.0.51204.0
    All plugs disabled - Problem continues.
    All Extensions disabled - Problem continues.
    All removed - Problem continues.
    No themes installed.
    Obvious solution - Change the cookie setting. Which I have done... however I think it's worth asking about.

    I have the same problem, but I found a way around it. Before opening mail.yahoo.com in a tab, to to Tools -> Options. Under the Privacy tab, click the "Exceptions" button. Type in "login.yahoo.com" and click the "Allow" or "Allow for session" button. Do the same for "login.mail.yahoo.com". It's not a fix, but it will get you back into your mail!

  • Issue about Invoking a BPEL Process with the Generic Java API

    I Invoking a BPEL Process with the Generic Java API and apache axis or axis2
    it turn up a error as follow:
    org.apache.axis2.AxisFault: ORABPEL-08021
    Cannot find partner wsdl.
    parnterLink "BPELProcess1" is not found in process "BPELProcess1" (revision "v2008_11_17__38943").
    Please check the deployment descriptor of the process to find the correct partnerLink name.
         at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
         at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
         at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
         at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
         at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
         at wf.Test_axis2_callws.main(Test_axis2_callws.java:41)
    i can't solve it !
    what's problem ???
    anyone use java code to invoke bpel process successfully..can show me some example?
    thanks
    chan

    Hi,
    Check below link may help you solve your problem.
    http://www.activevos.com/cec/samples/content/sample-invoke/doc/index.html
    Regards

  • Cookie set on the request from flex disappers

    All,
    I need to set cookie for calls from flex. So on the server side I set the cookie and send the response back to flex. I used tools like tamperdata and debugbar to monitor the request calls and I found that the cookie i set is available + a
    JSessionID cookie is also available in the response headers "
    Set-Cookie".Since cookie is set on the response headers, it is expected to be available in all the next successive calls.
    But on my next successive call I see only the the Jsession id for all the calls. And in some call i see the cookie I set. 
    I use caringorm framework. So far I have analysed and found that if the call goes from same delegate I see my cookie, but if its from different delegate then i don't see the cookie in the request. I tried using same delegate for all my commands by creating objects of the same delegate but still it didn't work. 
    I feel creazy when i thing why only JseesionId is available in the cookie and not the one which i set in the calls irrespective of the delegate. I am not sure where i am going wrong. Even when i try to do document.cookie in the external interface call or in the URL using Javascript alert I only see a empty string not ven the Jsession id in the document.cookie. some thing is really creazy. 
    Sicne result event does not have the option of cookie, is flex eating the cookie set on the response. Then why on Jsessionid is available? I have also seen that in HTTPServiceMessage has an option of recordHeaders. Is my isseu is related to this. If so please let me know an example to use this. I am going insane with this issue. Please help!!

    It's probably not the same delegate you need to hit, but exactly the same HTTPService.
    This is a bit I've gleaned from encountering similar issues, so it might not be exactly right!
    The Flash Player attaches the cookie info into the Channel that is used to make the call. If you want the same cookie, you need to use the same Channel.
    The jsessionid you are seeing is the way the same session is indicated to back end resources, so if two Flash apps hit the same service it knows they are different.
    The way I'm currently playing with, is to keep the ChannelSet around and inject it into Services as I need them, that's covering most of my problems!

  • Since I did the Firefox reset, I try to open my email and it says, Your browser does not accept cookies. I have checked the cookies setting 100 times!

    Since I did the Firefox reset, I try to open my email and it says, Your browser does not accept cookies. I have checked and done your suggested setting 100 times!

    Note that a reset tries to migrate cookies to the new profile, so if you had previously as problem with cookies then the problem might have been carried over.
    If clearing cookies doesn't work then it is possible that the <i>cookies.sqlite</i> file that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookie files like <b>cookies.sqlite-journal</b> in the Firefox profile folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies

  • Parameter set in Java stack for retention of messages in PI

    Hi,
    Can you tel me which paramter is set in Java stack for retention of messages in adapter engine and where we can we find in Java stack?
    Thanks.

    RWB --> Component MOnitoring --> Adapter Engine --> Background Processing
    http://help.sap.com/saphelp_nwpi71/helpdata/en/05/b1b740f83db533e10000000a155106/frameset.htm

  • Problem in sending messages using java mail api

    Hi All,
    I have a problem in sending messages via java mail api.
    MimeMessage message = new MimeMessage(session);
    String bodyContent = "ñSunJava";
    message.setText (bodyContent,"utf-8");using the above code its not possible for me to send the attachment. if i am using the below code means special characters like ñ gets removed or changed into some other characters.
    MimeBodyPart messagePart = new MimeBodyPart();
                messagePart.setText(bodyText);
                // Set the email attachment file
                MimeBodyPart attachmentPart = new MimeBodyPart();
                FileDataSource fileDataSource = new FileDataSource("C:/sunjava.txt") {
                    public String getContentType() {
                        return "application/octet-stream";
                attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                attachmentPart.setFileName(filename);
                Multipart multipart = new MimeMultipart();
                multipart.addBodyPart(messagePart);
                multipart.addBodyPart(attachmentPart);
                message.setContent(multipart);
                Transport.send(message);is there any way to send the file attachment with the body message without using MultiPart java class.

    Taken pretty much straight out of the Javamail examples the following works for me (mail read using Thunderbird)        // Define message
            Message message = new MimeMessage(session);
            message.setFrom(new InternetAddress(from));
            // Set the 'to' address
            for (int i = 0; i < to.length; i++)
                message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    // Set the 'cc' address
    for (int i = 0; i < cc.length; i++)
    message.addRecipient(Message.RecipientType.CC, new InternetAddress(cc[i]));
    // Set the 'bcc' address
    for (int i = 0; i < bcc.length; i++)
    message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bcc[i]));
    message.setSubject("JavaMail With Attachment");
    // Create the message part
    BodyPart messageBodyPart = new MimeBodyPart();
    // Fill the message
    messageBodyPart.setText("Here's the file ñSunJava");
    // Create a Multipart
    Multipart multipart = new MimeMultipart();
    // Add part one
    multipart.addBodyPart(messageBodyPart);
    // Part two is attachment
    for (int count = 0; count < 5; count++)
    String filename = "hello" + count + ".txt";
    String fileContent = " ñSunJava - Now is the time for all good men to come to the aid of the party " + count + " \n";
    // Create another body part
    BodyPart attachementBodyPart = new MimeBodyPart();
    // Get the attachment
    DataSource source = new StringDataSource(fileContent, filename);
    // Set the data handler to this attachment
    attachementBodyPart.setDataHandler(new DataHandler(source));
    // Set the filename
    attachementBodyPart.setFileName(filename);
    // Add this part
    multipart.addBodyPart(attachementBodyPart);
    // Put parts in message
    message.setContent(multipart);
    // Send the message
    Transport.send(message);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Cookie set request gets stuck in loop

    I have encountered a reproducible problem with the setting cookie dialogue box in Firefox that can lead to a denial of service condition on certain websites.
    I have accept cookies and accept 3rd parties cookies set in preferences, but set to ask me every time.
    This normally works and I'm asked if I want to allow for session, deny, allow always.
    Under certain conditions the dialog box will be represented multiple times even if you select 'use this answer for all cookies from this website'. This has generally been intermittent, but I've managed to get it to reproduce on http://www.otherworldcomputing.com/
    When loading this page the dialog box will just consistently appear ( even if you don't answer it immediately it disappears and reappears - possibly a script setting it?). No matter what answer you give the dialog will just reappear a few moments later.
    You cannot close the window or Firefox as the dialog pops up after the window has closed and you cannot reply to it - Firefox itself hangs and has to be force quit. The Apple error reports lists the cause as a 'hang'.
    I have tried this in safe mode and the problem still occurs

    The first things that I ask, when someone encounters playability issues are:
    1.) what brand of blank media was used? Verbatim and Taiyo-Yuden are about as good as it gets. Links in this ARTICLE.
    2.) what burn speed was used? I usually drop down to about 1/2 of the max.
    This ARTICLE goes into a few more details.
    Let us know about the disc brand, and burn speed, please.
    Good luck,
    Hunt

  • CQ5 custom tag not sending cookie set in response when using IE10

    Hi,
    I have some custom code that will create a cookie and send it to the browser. This code works for Chrome, Firefox and IE9, but for some reason in IE10 the cookie will not even get sent in the response headers!
    The code that creates the cookie is just Java standard:
                   Cookie cookie = new Cookie("recently-viewed-producs-cookie", encryptedCookie);
                    cookie.setPath("/");
                    cookie.setDomain(getSlingRequest().getServerName());
                    cookie.setMaxAge(COOKIE_AGE_IN_SECONDS);
                    getSlingResponse().addCookie(cookie);
    Does anybody have an idea why this could happen? I encrypt the contens of my cookie, so there are no invalid characters (I believe).
    Other cookies created by CQ5 are sent and the browser saves them. I checked the cookie settings for the browser and it is set to accept everything, including session cookies.
    Any suggestions are welcome.
    Blanca

    BTS.MessageType is typically set by one of the Disassemblers.
    BTS.Operation has nothing to do with the Receive Port/Location and is set by the Engine only when coming from an Orchestration Port.
    But, you can set any Property in any Stage with a custom Pipeline Component as you've found.
    "Exception of type 'Microsoft.BizTalk.Message.Interop.BTSException' was thrown."
    There's usually a lot more to the stack trace.  You'll have to include the whole thing.
    Finally, what benefit do you expect from adding the ESB layer?  This is pretty trivial with an Orchestration.

  • Attempt to process file failed with java.lang.StringIndexOutOfBoundsExcep..

    Hello All,
       I am implementing file2file with file going from shared folder to FTPS server.
    I am using TLS and X.509 certificate in file receiver communication channel.
    when I implemented my scenario, this is the error its throwing :
    Success : Connect to FTP server "my ftp address", directory "/TEST/"
    Error : Attempt to process file failed with java.lang.StringIndexOutOfBoundsException: String index out of range: 3
    I know this error is caused when java expects the 3 character length string and if its getting more than that... Does any faced this kindaa problem before...Any help is greatly appreciated....Obviously even points....
    Thanks,
    Ravi

    There is no custom code at all? No mappings, no custom modules, no pre/post processing commands?
    Also, check if you get this error when sending to ftps server without certificate (or with another certificate). It may be an incompatibility issue with certificate.
    Did you import the .pfx (or .p12) file in KeyStorage Service?
    Regards,
    Henrique.

  • Can i give a process name of executing java class

    hi all,
    what i need is when i execute the class file using java at the command prompt i want to create a separate process of that class. that means when i execute this class i want 2 processes running one is "java" and the other is "The Class To be executed".
    is it possible????
    actually my requirement is that i want only one instance of my class can run at a time.
    please help me
    thanks
    bye

    hi
    actually i can not use the file lock because my application is going to run on Solaris machine and since its a mutiuser platform and every user has a limited access to his data.and any user can run my application so the problem is where one user will write into a file so that other user can also read from the same file.
    can i do it other way using native methods if yes can u elaborate please
    thanks
    bye

Maybe you are looking for

  • Exporting artwork

    I am not working with Illustrator myself but I need to work with technical artwork created in Illustrator CS2 and CS3. My problem is this: I need all artwork in the final document (a book) to look the same, i.e., the fonts and their sizes, line thick

  • Create GPP drive mapping entries programmatically

    Can anyone provide any sample codes that creates drive mapping entries in group policy preference? I am not looking for script to create the GPO, I am looking for codes to create mapping entries inside it instead. I've been searching for MS document

  • Creating (view, add, delete, modify) bsp application

    Hi gurus, Could anyone here please help. I am totally a new user in SAP and I would wish to create a small bsp application that could interact with my database in transaction se16. Below are the requirements. 1) Allow user to<b> view </b>all Database

  • Process to populate an item/field?

    So here's the scenario: I have a report with a list of organizations. I have a button that takes you to a form to add a new organization. When you navigate to the form, you fill in the fields and press create. Some of the fields included are organiza

  • Valuation category for DIEN material type

    Dear all, I have a requirement in which I need to maintain two price for  DIEN material type ,I have created two valuation type and asssigned to a valuation category and If Itry to assign valuation category in Material master it is Grayed out ,even i