How To Send a URL

I am making an application the needs to go to a URL
I do not need to see the URL but i need to be able to have a connection made to it to send data to the server like a GET method
Example....
URL is http://www.myserver.com?name=hello
Can someone help me with this.
Thanks in advance.

Would the URLConnection Connect method do it?
I was looking at both of those classes... just not sure what methods to use.

Similar Messages

  • How to send an URL with arguments in a mailto: link ?

    Hello,
    I need to build simple mailto links to send urls in the body of the message.
    Unfortunately there are arguments in this url : like http://host/SearchServlet?toSearch=foo";
    When I click on the link the body is truncated before the ?
    even when I replace ? with %3F or ? !!!
    How can I pass this URL ?
    Regards
    PS : Below is sample javascript
    <html>
    <body>
    <script language="javascript">
    function mailpage()
    mail_str = "mailto:?";
    mail_str += "body= Link to http://host/SearchServlet?toSearch=foo";
    mail_str += "&subject=Search";
    location.href = mail_str;
    </script>
    <A HREF = "javascript:mailpage()">E-mail This Page</A> E-mail This Page
    </body>
    </html>

    Try to replace the ? and the =.
    Somewhat like:
    function mailpage() {
      mail_str = "mailto:?";
      mail_str += "body=Link to http://host/SearchServletQuestionMarktoSearchEqualsfoo";
      mail_str += "&subject=Search";
      location.href = mail_str;
    }Happy Coding! :-)

  • How to send the url automatically

    hello,
    I want to send the webdav URL of a file in a mail automatically but i don't find the way to do it. A solution?

    jukian,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Sending a URL link instead of workitem

    Hi Friends
    Could anyone explain me how to send a URL link to the inbox of a user instead of an workitem?
    -Vinod

    Hello,
    You can send a URL in an email, but I assume you already know that.
    regards
    Rick Bakker
    hanabi technology

  • How to send the username logged in to a URL

    Hi everyboy!
    I have a question about ORacle Portal version 10
    I have created a portlet which contains a page, in this page have several URL. This URL can be jsp, asp, etc.
    Do you know how to send the username to the URL?,
    I want to send the username in a parameter.
    Is it necessary create an omniportlet?
    How do I must do?
    I expect your prompt reply, any help will be very appreciated.
    Thank you in advance.
    Best Regards

    Hi Angrydot
    Thank you for helped me,
    But I want that the username be stored in a parameter and this parameter must be sent by method post.
    In the oracle portal when I created the URL I only want to write only url, without writting ?variableusername=valuevariableusername.
    How do I must create this variable?
    Any help will be very appreciated.
    Best Regards

  • How to send URL (of length 500 Characters) in SAP Mail??

    Hi Everybody,
    I need to send the URL in SAP mail  using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    The URL is of length 500 characters. Is there anyway I can send this URL in mail, even as attachment will do.
    The Mail is accepting 255 characters in one line. In my case I need to split it in to two lines.
    But in mail only firstline is coming as URL and next line is truncating.
    Thanks in advance.
    Praveen.

    hi prashant,
    using this function module.... when sending the url into attachement it will not take any text beyound 255 caharacters.
    so u need to split your url and add the remain to the next line of the internal table that ur passing to this FM.
    in the form where u build the table for the attachment
    FORM f_build_datatable.
    DATA: lwa_excel TYPE gty_excel,
            lwa_attach_list TYPE solisti1,
            lv_attach TYPE string,
            lv_xcnt        TYPE i.
         loop at gt_url into lwa_url
    CONCATENATE lwa_url INTO lv_attach SEPARATED BY gc_con_tab .
        CONCATENATE lv_attach gc_con_cret INTO lv_attach.
        DO.
          lwa_attach_list-line = lv_attach.
          APPEND lwa_attach_list TO gt_attach_list.
          lv_xcnt = STRLEN( lv_attach ).
          IF lv_xcnt > 255.
            lv_attach = lv_attach+255.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
        CLEAR: lwa_url, lwa_attach_list.
      ENDLOOP.
    ENDFORM.                    " f_build_display_file
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:48 PM

  • How to open a URL without session ID and reuse the current browser session?

    Hi All,
    I have a question about HTMLDB 2.0
    How to open a URL without session ID and reuse the current browser session?
    That was the behaviour in HTMLDB 1.6 ...
    My usecase for this is the following:
    We have written an issue tracking application, which sends e-mail to the interested users, when something happens.
    In these email we've put a link to some page, with some parameters in the URL.
    The idea is for the user to be easy to click on the hyperlink and to see the details of the ticket.
    When the user clicks on such a link he is directed to a login screen (page 101) and he enters his Username and password, and is then forwarded to the details for the ticket.
    Then he receives another email (e.g. for another ticked). He clicks on the link and :
    a) in HTMLDB 1.6 he goes to the details as he didn't close his browser and session is remembered
    b) in HTMLDB 2.0 he is prompted to enter username, password with the username populated
    Please tell me how can I achieve the same behaviour in HTMLDB2.0 as it was in HTMLDB 1.6.
    I understand this change is somehow security related, althogh I don't understand how. If you can explain this either I would be very happy?
    Best regards,
    Mihail Daskalov

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • How to send the payload to a jsp using receiver Http adapter?

    Hi experts,
    I have this scenario from Legacy to XI to external app server.I have a test jsp to execute that functionality .Its a jsp which has 1 textarea named "test" and when I click on the submit buton I get a response back.This way I am able to test this independently.Now from XI when I am executing my scenario I am getting status code '1250' and message as ' http request(test) is null'.Now in the scenario in http adapter I just provide the target host : ip of server ,
    service number : port no ,
    path: the container or the request handler. But this scenario fails and gives me the above erroneous response.Now Basically I am not able to get how to send the value to the textarea "test"? please provide help as soon as possible.Do we have to put the name of the jsp in the "path" in http adapter and use prolog as test=.I tried this but it doesnt work.
    Is there any way to check the URL that it forms after appending the querystring in the url ...?
    So please provide help on this or suggest a solution to [email protected] as soon as possible.....
    Thanx in advance.
    Akshata

    hey Shekhar,
    thanx for that prompt reply but I have configured the communication channel in the same manner as suggested by u.
    actually I have this jsp page http://xx.xx.xx.xx:8080/abcdef/try/efg.jsp where there is a textarea "test" which has to be filled and there is a submit button.When I test this http client i.e the above jsp page independently then it goes to handler
    http://xx.xx.xx.xx:8080/abcdef/trial/    And it gives a proper response message after clicking on the submit button.
    now I want to carry out the same using receiver http adapter. I need to pass the value for this inputfield names "test" on that jsp . so right now I have configyured the adapter as
    addressing type: url
    target host : xx.xx.xx.xx
    service no:8080
    path : here I have given the path of handler i.e /abcdef/trial I tried giving the jsp page also but logically I guess it should be the handler.
    content type: text/xml; charset=iso-8859-1
    xml code: UTF-8
    Mask special characters (URL escaping) checked.
    now since the name of the inputfield is "test" in the prolog I gave test=
    But it doesnt work I get this error "http request parameter [test] is null" in the response message  which I guess suggests that it is not able to send the value for the field"test" to that handler.Please suggest how to send this and tell me if there are any other configurations that I have to do in the receiver communication channel.
    Thanx ,
    Akshata

  • How to catch invalid emails & How to send to multiple emails

    This is a long two-part question.
    Part One:
    I would like to catch invalid emails within the JavaMail code and send the valid emails. I am using the following code to do this. The problem I am running into is when there is a valid email, sometimes it will be caught within the code without being sent and it will show up as a validunsentemail. I have set sendpartial to true, so this shouldn't be happening. Also, is there a way to check if a domain name is in existence before sending the email?
    Part Two:
    For testing purposes, I would like to mix valid and invalid emails for TO, but I don't know how to send to more than one email using an array. I have looked at other posting on the forum of how to do this, but I keep getting errors when I try other's suggestions. Maybe somebody will be able to help with this problem if they see the code below.
    Thanks in advance for all your help!
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.event.*;
    import javax.activation.*;
    public class Practice
    public static void main (String[] args) {
    Transport trans = null;
    try {
    Properties props = System.getProperties();
    props.put("mail.smtp.host", "hostname");
    props.put("mail.smtp.sendpartial","true");
    Session mailConnection = Session.getDefaultInstance(props, null);
    Message msg = new MimeMessage(mailConnection);
    Address angela= new InternetAddress("[email protected]");
    InternetAddress[] address ={new InternetAddress("[email protected]")};
    msg.setRecipients(Message.RecipientType.TO, address);
    msg.setContent("This is a test. This is only a test. What's Next?", "text/plain");
    msg.setFrom(angela);
    msg.setSubject("Testing 123");
    msg.setSentDate(new Date());
    msg.saveChanges();
    trans = mailConnection.getTransport(address[0]);
    trans.connect();
    trans.send(msg, address);
    System.out.println("Mail was sent successfully.");
    try {Thread.sleep(5);}catch(InterruptedException e){}
    } catch (MessagingException mex){
    try {Thread.sleep(5);}catch(InterruptedException e){}
    mex.printStackTrace();
    System.out.println();
    Exception ex = mex;
    do{
    if (ex instanceof SendFailedException){
    SendFailedException sfex = (SendFailedException) ex;
    Address[] invalid = sfex.getInvalidAddresses();
    if (invalid != null){
    System.out.println(" ** Invalid Addresses");
    if (invalid != null) {
    for (int i=0; i< invalid.length; i++)
    System.out.println(" " + invalid);
    Address[] validUnsent = sfex.getValidUnsentAddresses();
    if (validUnsent != null){
    System.out.println(" ** ValidUnsent Addresses");
    if (validUnsent !=null){
    for (int i=0; i<validUnsent.length; i++)
    System.out.println(" "+validUnsent[i]);
    Address[] validSent = sfex.getValidSentAddresses();
    if (validSent != null){
    System.out.println(" **ValidSent Addresses");
    if (validSent != null){
    for (int i=0; i<validSent.length; i++)
    System.out.println(" "+validSent[i]);
    System.out.println();
    if (ex instanceof MessagingException)
    ex = ((MessagingException)ex).getNextException();
    else
    ex = null;
    } while (ex != null);
    } finally {
    try {
    trans.close();
    } catch (MessagingException mex){  /*  ignore */}

    I am working on exactly the same problem. What you need to do is use the destination mail server to send mails. For example: address
    [email protected] is an invalid user.
    Using normal way you wont be able to catch invalid mail box error.
    If you use mail server of jabcreative.com to send email then you will get an unknown user exception.
    To find mail server of jabcreative.com you will have to do MX LookUp on DNS entry
    Have a look at this URL
    http://www.cee.hw.ac.uk/courses/5nn2/3/12.htm

  • How to send XML via HTTPS in Servlet

    I am new to Java. I need to make a servlet which can send a message via HTTPS with a content type of XML to another web server when it is called. each msg is proceeded with a header in the following format:
    requestID=rid&userID=uid&password=mypd
    and a detail information in XML:
    <S_Request>
    <requestControllID>1-rf200</requestControlID>
    <zipCode>99012</zipCode>
    <orderQuantity>35</orderQuantity>
    </S_Request>
    I have basic idea of how to send an http post with parameter string by using the Redirect function but don't know how to deal with the XML detail. Any one has idea about this? Any help will be greatly appreciated!

    This is what I did for one of my projects;
    String myXML = "all the xml tags and fields";
    URL url = new URL("https://www.somesite.com");
    HttpsURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setDoOutput(true);
    OutputStream outXML = connection.getOutputStream();
    outXML.write(myXML.getBytes());
    I think you can add the requestID and all to the begining of the string myXML
    Good luck
    Rajesh

  • In solman 4.0 how to send message to SAP through service desk

    Dear all,
            I have configured service desk functionality, My requirement is from service desk how to send message to SAP.
    Regards,
    Pavan.

    Hi,
    Following the steps:
    &#131;Basic configuration - RFC Connections to SAP
    Check if the RFC Connectino SAPOSS is working properly
    Check if load distribution group is set to EWA
    The RFC Connections:
    - SAP-OSS (Send Message to SAP)
    - SAP-OSS-LIST-O01 (Update Message from SAP)
    will be created automatically by the system with a user which has been assigned
    previously.
    IMG Path: SAP Web Application Server | SAP Web Application Server | SAP Solution Manager| Basic Settings | SAP Solution Manager System | Connection to SAP | Assign user for forwarding Service Desk Message
    With transaction SM59 you can adjust the RFC connections.
    - For further information on SAP R/3 Front-end connections, see SAP Notes: 33135, 766505, 24177
    - To forward Service Desk notifications and Issues to SAP, you need to assign a user to the SAPNet R/3
    Front-end connection to SAP.
    Activities:
    - 1. From the SAP Solution Manager (transaction SOLUTION_MANAGER), choose (Edit-> Global Settings.
    - 2. Choose Display<->Change.
    - 3. For SAP Service Marketplace, specify http://service.sap.com as the URL.
    - 4. In the Connection to SAP tab, specify SAPOSS as the RFC destination. Note that the entry is casesensitive.
    - 5. For User forwading messages, enter a valid user and a password. This user will require all the authorizations for SAPNet R/3 Front-end for your customer number.
    - 6. Save your changes.
    The system automatically generates the following RFC destinations and assigns the S-User and password you specified: SAP-OSS, SAP-OSS-LIST-O01
    Good Lucky!

  • How to send a String to a Servlet using a HTTP POST

    Well, I have designed a servlet that receives a HTTP POST, I was testing it using an HTML form to send (using POST) information, now, I have coded a Java App to send it a string, I don't know how to make the servlet recognize that info so it can make its work, I am posting both codes (Servlet & API) so anyone can guide me and tell me how and where to modify them
    Servlet:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    res.setContentType("text/HTML");
    String cadena = req.getParameter("cadena");
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(cadena);
    out.close();
    salida.println("OK");
    Now, the JAVA API is:
    import java.io.*;
    import java.net.*;
    public class HTTPSender {
    public static void main(String[] args) throws Exception {
    URL url1 = new URL
    ("http://localhost:8080/XMLSender/xmlwriter");//internal site
    URLConnection UrlConnObj1 = url1.openConnection();
    HttpURLConnection huc1 = (HttpURLConnection)UrlConnObj1;
    huc1.setRequestMethod("POST");
    huc1.setDoOutput(true);
    huc1.setDoInput(true);
    huc1.setUseCaches(false);
    huc1.setDefaultUseCaches(false);
    String cadena = ""
    + "<root>\n"
    + "<tlf>$TLF$</tlf>\n"
    + "<op>$OP$</op>\n"
    + "<sc>$SC$</sc>\n"
    + "<body>$BODY$</body>\n"
    + "</root>";
         PrintWriter out = new PrintWriter(huc1.getOutputStream());
    System.out.println("string="+cadena);
    out.write(cadena);
    out.close();
    I'm a JAVA newbie, so, maybe I'm getting a bad idea of what I need to do, anyway, every (detailed) help is welcome. What my servlet should do (and it doesn't when I send the message through the API) is to write a file with the info received.

    I'm not trying to send a string from a WEB Page, I'm tryring to send it using a JAVA program, I mean, using a HTTPSender, in fact, I already have made the code to do that:
    import java.io.*;
    import java.net.*;
    public class HTTPSender {
    public static void main(String[] args) throws Exception {
    try {
    String cadena = "Message to be written";
    // Send data
    URL url = new URL("http://localhost:8080/XMLSender/xmlwriter");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(cadena);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    String line;
    while ((line = rd.readLine()) != null) {
    // Process line...
    wr.close();
    rd.close();
    } catch (Exception e) {
    And modified my servlet so it can receive anything:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    res.setContentType("text/HTML");
    String cadena = req.toString();
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(cadena);
    out.close();
    salida.println("OK");
    Now the problem is that, the servlet in fact DOES create the file, but....the file is empty, that means that no info is arriving to the servlet, why?, how should I send it then? I repeat FORGET about a Web Page Form, that is in the past and I don't need that.

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • How to send a user defined parameter to a web form?

    Hi,
    I4m looking for a solution how to send a user defined parameter to a web form when I start the form from a html-page.
    I think that it should work to add the parameter to the URL.
    Example: I added myparam=myvalue at the end oft the URL
    http://my.server.com:7777/f60cgi?form=myform.fmx&userid=scott/tiger@mydb&otherparams=useSDI=NO&lookAndFeel=generic&colorScheme=teal&myparam=myvalue
    How can I fetch the parameter myparam in forms?

    You have the user the otherParams parameter, which you can specify in the formsweb.cfg file, or override on the url. e.g. http://myhost/servlet/f690servlet?config=myApp&otherParams=myParam=myValue
    In the Forms Builder, in the Navigator window, there is a node called Parameters. Create one in there, and then you can refer to it like a block variable. e.g. if :myparam = 'myvalue' then...
    At runtime, Forms will match up any parameters on the command with parameters defined in your form, and populate them for you. You don't have to do anything.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • How to send PUT, DELETE HTTP request in HttpURLConnection ?

    Hi all.
    I want to know that is it possible to send PUT, DELETE request (practically) through java.net.httpURLConnection to http based URL. I have read so many articles describing that how to send GET, POST, TRACE, OPTIONS request but still not finding any sample code which successfully perform PUT and DELETE request. Can any one give idea regarding that?
    Thanks

    Help_Me_Solve wrote:
    Hi all.
    I want to know that is it possible to send PUT, DELETE request (practically) through java.net.httpURLConnection to http based URL. I have read so many articles describing that how to send GET, POST, TRACE, OPTIONS request but still not finding any sample code which successfully perform PUT and DELETE request. Can any one give idea regarding that?
    ThanksIt's technically possible I am sure but 100% impractical because almost nobody uses an HTTP server for that purpose. I don't know what HTTP servers actually implement PUT and DELETE but you can be sure even in those that do the behaviour is off by default.
    If you need to do PUT/DELETE sort of operations you should be using FTP.

Maybe you are looking for

  • Schedule Job and Read Spool

    Hi Guru's, my requirement is 1.I need to run one standard program 3 times with 3 diffrent selection's. 2.the resultant 3 diffrent ouput will be displayed in only ONE output. ( the prgram should have the capalibilty to ceate 3 diffrent jobs simulateno

  • How do I disable future iOS updates till later date to prevent problems with non iOS compliant Apps?

    Hello first time post here so excuse me if my posting etiquette is off and this seems lengthy. I am a beginning tech (4 months) in a school district that has started the 1 to 1 initiative with iPads (iPad 2). There is a huge learning curve I am facin

  • Why can't I see the changes in my image when I move the sliders in LR's Develop Module

    When I use the quick develop tools in the LR 5.3 Library module, I see the changes in the selected image. When I switch to the Develop Module, when I move the sliders for the different tools, nothing happens to my image. When I go back to the Library

  • Aperture, MBP, and external hard drive

    I have looked all over the previous topics on this and I'm just confused. I do not want to do the wrong thing and make my life more difficult than it already is. We have an iMac and a MBP, both with Aperture. We are going on vacation. We want to down

  • Index not usable in my simple query

    Hi, I have created index for INC_ID coloumn but when I use it in queries, it is not working. Verified the index it is on valid stat only, eventhough its not using in queries. can you please suggest why it is not using. what I have to do for this. I a