Open URL method=POST

I need a button which does the following HTML,
<form method="post"
action="http://abc.com/etc&etc&etc">
<input name="ServiceTag" value="<this value is read from the DB>" type="hidden" />
<input name="logout" value="" type="hidden" />
<input type="submit" value="Support Agreement" />
</form>
The button should open a new window.
I have seen examples of javascript, but I think the important bit here is the method="post"
Any help would be much appreciated.
Paul
Found that I could add the serial number to the url and perform http get, rather than a post.
Message was edited by:
pjflynn

Hi
Is JavaProgram a Applet or Servlet?
Opening a new window directly from server,probably not possible? From your question
what I understand is, A html page is displayed
and when u click on a link opens a new window.
The parameters to the link should be posted using POST method, again
it is not possible this can be done only by appending
"?name1=value1&name2=value2..."to the link
Vinay
[email protected]

Similar Messages

  • Open URL, use POST method in new window

    From a Java program, how do we open a https connection, basically a secured site, in a new window and pass some parameters to the link, using POST method?

    Hi
    Is JavaProgram a Applet or Servlet?
    Opening a new window directly from server,probably not possible? From your question
    what I understand is, A html page is displayed
    and when u click on a link opens a new window.
    The parameters to the link should be posted using POST method, again
    it is not possible this can be done only by appending
    "?name1=value1&name2=value2..."to the link
    Vinay
    [email protected]

  • HTTP Method Post not supported by this URL

    We are running WL6.0sp1 on Win2000. When we try to open a JSP page which calls
    a servlet we get a "HTTP Method Post not supported by this URL". This same setup
    (WL 6.0sp1 on Win2000) on another machine works absolutely fine running from the
    same client. Is there any setup that needs to be done in Weblogic for this? Any
    pointers on this would be appreciated.
    Rgds

    Normally when you get this error, your username/password is not correct.
    It's not a clean way of errorhandling. I have had the same issue and after a while i noticed the password i entered was not correct.

  • HTTP Status 405 - HTTP method POST is not supported by this URL

    dear all
    can u solve my problem.am getting the *"HTTP Status 405 - HTTP method POST is not supported by this URL"* msg from the browser when i press the search button in my form.plz suggest me the solution for my fault.these are the following html,xml,class files:
    search.html*
    <html>
    <head>
    <title>Search Page</title>
    </head>
    <body>
    <p align="center"><font size="6" color="#0000FF"><b>Search Module</b></font></p>
    <p align="center"> </p>
    <center>
    <form method="POST" action="./emp">
    <table border="1" width="43%">
    <tr>
    <td width="50%">
    <p align="right">Employee Name</td>
    <td width="50%"><input type="text" name="empname" size="36"></td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <p align="center"><input type="submit" value="Search" name="B1"></td>
    </tr>
    </table>
    </form>
    </center>
    </body>
    </html>
    web.xml*
    <web-app>
    <servlet>
    <servlet-name>jdbc</servlet-name>
    <servlet-class>searchModule</servlet-class>
    <init-param>
    <param-name>driver</param-name>
    <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
    </init-param>
    <init-param>
    <param-name>url</param-name>
    <param-value>jdbc:odbc:first</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>scott</param-value>
    </init-param>
    <init-param>
    <param-name>pass</param-name>
    <param-value>tiger</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>jdbc</servlet-name>
    <url-pattern>/emp</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>search.html</welcome-file>
    </welcome-file-list>
    </web-app>
    SearchModule.java*
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class searchModule extends HttpServlet
    Connection con;
    public void init() throws ServletException
    String d=getInitParameter("driver");
    String u=getInitParameter("url");
    String us=getInitParameter("user");
    String pwd=getInitParameter("pass");
    try
    Class.forName(d);
    con=DriverManager.getConnection(u,us,pwd);
    catch(ClassNotFoundException e)
    System.out.println(e);
    catch(SQLException e)
    System.out.println("Unable to establish the connection");
    }//init
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    String empname=req.getParameter("empname");
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
    try
    pw.println("<html><body><center>");
    Statement st=con.createStatement();
    String sql="select * from employee where empname="+empname;
    ResultSet rs=st.executeQuery(sql);
    if(rs.next())
    pw.println("<h2>Employee Details</h2>");
    pw.println("<table border=1>");
    pw.println("<tr><th>Employee No.</th>");
    pw.println("<th>Employee Name</th>");
    pw.println("<th>Designation</th>");
    pw.println("<th>Department</th>");
    pw.println("<th>Salary</th>");
    pw.println("</tr><tr>");
    pw.println("<td>"+rs.getInt(1)+"</td>");
    pw.println("<td>"+empname+"</td>");
    pw.println("<td>"+rs.getString(3)+"</td>");
    pw.println("<td>"+rs.getString(4)+"</td>");
    pw.println("<td>"+rs.getInt(5)+"</td>");
    pw.println("</tr></table>");
    else
    pw.println("<h2>Employee Record Not Found</h2>");
    pw.println("</center></body></html>");
    pw.close();
    rs.close();
    st.close();
    catch(SQLException e)
    System.out.println(e);
    }//doPost
    public void destroy()
    if(con!=null)
    try
    con.close();
    catch(Exception e)
    System.out.println("Connection Closed");
    }//destroy
    }//searchModule
    in control panel i selected System DNS and created the name as first and driver as Microsoft ODBC for Oracle
    plz suggest me the solution where i committed mistake.

    <form method="*POST*" action="./emp">
    public void doGet (HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    HTTP method POST is not supported by this URL

  • HTTP method POST is not supported by this URL

    Hi everyone,
    I'm having a problem in my application.
    I used the ADF Security Wizard to enable the ADF Security in my application. So, it created the pages login.html, error.html and welcome.jsp.
    The problem is when I try to sign in in my applicaton. On the page login.html I filled in the fields username and password and click on the button to post the form. But when the form is posted I get the message: "HTTP method POST is not supported by this URL".
    The form is posted to the bean j_security_check.
    Does anybody know why is it happening? What should I do to fix it?
    Thanks a lot
    Daniel
    Edited by: [email protected] on 23/02/2010 05:37

    Normally when you get this error, your username/password is not correct.
    It's not a clean way of errorhandling. I have had the same issue and after a while i noticed the password i entered was not correct.

  • 405 HTTP method POST is not supported by this URL

    When I use GET method to browse a servlet by using TOMCAT or Resin, receive the following message:
    405 HTTP method POST is not supported by this URL
    Thanks!

    Just post your question once and be patient:
    http://forum.java.sun.com/thread.jspa?threadID=573890
    %

  • Connection refused--while executing (HttpConnection) Connector.open(url);

    Hi,
    i'm using netbeans mobility 5.0
    as i was new to this mobile programming i'm getting the output as "Connection Refused"
    plz plz plz plz....... help me out from this problem
    here is my code..
    code:_
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class FileViewer extends MIDlet implements CommandListener
    private Display display; // Reference to Display object
    private TextBox tbViewer; // View file contents in a textbox
    private Command cmView; // Command to view file
    private Command cmExit; // Command to exit
    private String url = "http://www.corej2me.com/midpbook_v1e1/scratch/fileViewer.hlp";
    public FileViewer()
    display = Display.getDisplay(this);
    // Define commands
    cmView = new Command("View", Command.SCREEN, 2);
    cmExit = new Command("Exit", Command.EXIT, 1);
    tbViewer = new TextBox("Viewer", "", 250, TextField.ANY);
    tbViewer.addCommand(cmView);
    tbViewer.addCommand(cmExit);
    tbViewer.setCommandListener(this);
    public void startApp()
    display.setCurrent(tbViewer);
    private void viewFile() throws IOException
    HttpConnection http = null;
    InputStream iStrm = null;
    try
    http = (HttpConnection) Connector.open(url);
    // Client Request
    // 1) Send request method
    http.setRequestMethod(HttpConnection.GET);
    // 2) Send header information (this header is optional)
    http.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
    // 3) Send body/data - No data for this request
    // Server Response
    // 1) Get status Line
    System.out.println("Msg: " + http.getResponseMessage());
    System.out.println("Code: " + http.getResponseCode());
    // 2) Get header information
    if (http.getResponseCode() == HttpConnection.HTTP_OK)
    // 3) Get data (show the file contents)
    iStrm = http.openInputStream();
    int length = (int) http.getLength();
    if (length > 0)
    byte serverData[] = new byte[length];
    iStrm.read(serverData);
    tbViewer.setString(new String(serverData));
    finally
    if (iStrm != null)
    iStrm.close();
    if (http != null)
    http.close();
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command c, Displayable s)
    if (c == cmView)
    try
    viewFile();
    catch (Exception e)
    System.out.println(e.toString());
    else if (c == cmExit)
    destroyApp(false);
    notifyDestroyed();
    output*
    build.xml(debug)*
    some....
    Application descriptor does not declare any MIDlet. Direct execution is not allowed.
    Generated "C:\Documents and Settings\Lakshmi Narayan J\jlnexample\dist\jlnexample.jar" is 2655 bytes.
    post-jar:
    debug:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\src\.timestamp
    Starting emulator in debug server mode on port 1469
    com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
    The manifest or the application descriptor MUST contain the attribute: MIDlet-1
    nbdebug:
    KdpDebugTask connecting to debugger 1 ..
    KdpDebugTask connecting to debugger 2 ..
    KdpDebugTask connecting to debugger 3 ..
    KdpDebugTask connecting to debugger 4 ..
    KdpDebugTask connecting to debugger 5 ..
    Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:306: The following error occurred while executing this line:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:311: Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    BUILD FAILED (total time: 43 seconds)
    Debugger console:
    Attaching to localhost:1469
    Connection refused.
    Edited by: LAKSHMI_NARAYAN_J on Jun 23, 2008 9:54 AM

    It's called potential deadlock. The emulator blocks your app 'cause any connection and commandAction needs its own thread. So I suggest use a new thread with this http connection then your program will be run successful.

  • Linking to external URL using POST from a button in APEX

    APEX Experts
    Does anyone know how to link to an external URL using POST rather than GET behind an APEX button? I'm pretty sure there must be a javascript call but I'm a real newbie to both APEX and Javascript.
    Also does anyone know why APEX decodes an encoded URL before sending it out and how to stop it?
    Thanks
    Deborah

    I did something similar recently but it was in .NET.
    Hopefully someone else here can help you do with Apex and Oracle. I am new to both.
    To POST instead of GET is not as easy as it sounds.
    What I did was open a new window where I outputted a dynamically created form. I would think that you would do that by using the pl/sql web toolkit to call a procedure and output the form using htp.p. You may also be able to do it with Apex (I think they are built using the same tech).
    Basically, your proc would look something like this:
    htp.p('<html><head>');
    htp.p('</head><body onload="document.FORM.submit();">');
    htp.p('<form name="FORM" method="POST" action="www.UrlToPostTo.com" >');
    htp.p('<input name="PostVar" type="hidden" value="' || MyValueToPost || '">');
    htp.p('</form></body></html>');
    So, it creates a html page with a form. When the page loads, it runs the javascript to submit the form to the other site. You can add in as many post items as you need. I marked them as hidden so that the user only sees a blank page briefly before the form is submitted.
    I am sure there is more to it than that, but it gives the general outline of how to post to another site dynamically. Hopefully someone else can fill in the rest.

  • Re-open the Previous posting period

    hi...
    we have closed the posting period for the month of 01-02(april-may) and open the 03-04(june-july)...
    but now we want to open the previous posting period i.e. 01-02(april-may) again...so how could we do this..
    one solution i have got is that...
    1. go to OX18 delete all the assignment for that company code and plant.
    2. go to OMSY and change the posting period..
    3.  go to OX18 and reassign the plant and company code again...
    this is the right method to do that..?
    will there be any -ive implications if I open the previous period by this procedure..?
    or suggest me some other way to do that...
    Thanks in advance

    Hi
    You can open Closed MM periods but be careful because SAP does recommend opening closed MM periods.
    Steps are :
    1) Tcode MMPI --from Tool Bar select - System - User Profile - Own Data - In parameter Tab Enter "MMPI_READ_NOTE" in parameter Field.
    Try to remove assignment of plants from company code.
    Now Go to -
    T-Code OMSY & Set the required Period.
    Re-assign Plants to Company Code & Check whether correct preriod is open thru T-Code - MMRV
    Now use T-code - OMWD to Assign Valuation grouping code to Valuation area because the earlier data gets deleted when assignment of Plants was removed.
    Use the transaction code OMS2 then select FERT (or any other Material Type used by your company)
    Then click on the quantity and value update.
    Select your plant or valuation area and put Tick Marks in Value update and Quantity update
    Even check this link...Reopening the posting period that was closed
    This will definitely reslove your problem.
    Thanking you.

  • Open url from xchat in opera

    I'd like to open urls from xchat in opera.
    Under settings>advanced>url handler:
    !opera -remote 'openURL(%s)'
    xchat has tcl as an optional dep, so I installed that.
    This is in xfce4 and I have set opera as the preferred browser.

    Well, I'm afraid that is not an option.
    The goButton is in a table row. There are lots of rows so if I use EL for Destination attribute the URL would be retrieved for each of rows.
    The method of URL retreiving is heavyweight operation which includes calling plsql functions, working with strings and others. So if I do it for each table row my application hungs and then I receive an exception of CPU usage.
    That's why I switched to normal commandButton witch actionListener which retrieves url on click - only once. So I need to open URL from Java.

  • Open URL from Java in a new browser tab

    Hi OTN,
    Surprisingly can't find the implimintation.
    In an ADF managed bean I retrieve String url. I need to open a new browser tab with this url.
    Found this thread Open a url in a new window in the backing bean which shows using javascript "service.addScript(facesContext, "window.open(http://www.google.coml)");".
    But in my case in doesn't work. The code is executed, but nothing happens. Maybe because the bean is called from a taskflow inline popup.
    ADF 11.1.1.4
    Thanks.

    Well, I'm afraid that is not an option.
    The goButton is in a table row. There are lots of rows so if I use EL for Destination attribute the URL would be retrieved for each of rows.
    The method of URL retreiving is heavyweight operation which includes calling plsql functions, working with strings and others. So if I do it for each table row my application hungs and then I receive an exception of CPU usage.
    That's why I switched to normal commandButton witch actionListener which retrieves url on click - only once. So I need to open URL from Java.

  • ERROR RENDERING PDF IN SERVLET WITH FORM method="post"

    Hello,
    we are trying to render a dinamic PDF document in a servlet building with XSL:FO apache or itext.
    The problem ocurs when we sending a Form data with method post, the output of the servlet is a blank page instead of the pdf document. Also if we send the form data with method "get" we can view the pdf document corretly.
    But we need to send amount information, and can?t use method get.
    Thank

    You can always use GET to send information by generating a dynamic URL in the query string (after the '?'). Granted, you don't want to send file data that way, but it will work for small numbers of arguments where privacy is not a concern.
    As to why you see the PDF in one instance and not another, I'm not sure. There is no difference from an HTTP standpoint. You sent a request, you are getting a response. The browser should treat the response the same, regardless of GET vs POST.
    Are you setting the content-type to application/pdf? Are you doing something fishy with Javascript? Do you have conditional logic in your code that fires on a POST but not on a GET that actually has a bug in it (since GET works but it was designed for POST)?
    - Saish
    "My karma ran over your dogma." - Anon

  • How to use method POST to send XML using utl_http?

    Hi,
    I am trying to work out how to use the POST method to mimic submitting data from a HTML form, using utl_http.
    I cannot use SOAP for this as the people I am sending the data to are just expecting an XML document to be sent to a standard CGI script running on their web server.
    There is a lot of documentation on how to submit data using the POST method (using Utl_Http.Write_Text etc), but I cannot find anything that tells me how to submit form variables.
    The examples on OTN say this:
    "Alternatively use method => 'POST' and Utl_Http.Write_Text to
    build an arbitrarily long message"
    but don't tell me how to actually place the data into the required input parameters of the CGI program I am hitting.
    I need to hit a URL such as
    www.asite.com/cgiprogram
    and pass in a parameter, eg
    in_param="test+data"
    I am currently doing this as a GET, which works, but the XML document I am passing in could potentially be bigger than the GET method will allow.
    Any help would be greatly appreciated.
    Thanks,
    Leon.

    Please try the PL/SQl forum

  • I tried to submit an interactive PDF form,  but received a message: Error opening URL to submit the

    I tried to submit an interactive PDF form,  but received a message: Error opening URL to submit the form. My form is created in InDesign cs6 and exported to interactive PDF with text fields. any one has some tips to deal wiith this?

    Did you get this resolved? I am doing the same thing, passing in a url to the submitForm method via cURL. I am submitting as FDF, and specifying the #FDF at end of URL.
    Currently working against a localhost url, which is allowed and trusted in acrobat to rule out the enhanced security of the reader.
    Any ideas?

  • Open URL in default Browser java.awt.Desktop was working...

    I downloaded Net Beans 6.5 with JavaFX 1 and now java.awt.Desktop isn't even an option for the imports, is there an alternative method to open URLs from my application?

    No, you aren't wrong.
    It's, and I mean this with all due respect, idiotic.
    I found some code on the net that does the same thing:
    http://www.centerkey.com/java/browser/
    Just one class, very simple.
    But I really would like java.awt.Desktop to work, I want the system tray integration stuff.
    Questions about getting Java 1.6 compatibility (the reason why the import doesn't work) go unanswered. It seems there is some hard coded -target 1.5 in some part of the javafx compiler. I can't figure out how to change it.

Maybe you are looking for

  • Itunes wont run and now i lost my cd drive

    I installed itunes to my windows xp computer and after the installation I tried to run the program. It would not run and now I lost my cd drive. I deleted itunes and then in order to get my drive back I would have to use the windows restore program.

  • Error in Adapter engine in RWB

    Hi, I'm facing 2 type of issues in RWB, Issue 1) Adapter Engine is in Red State in Component monitoring, Error: Details for 'Is the Adapter Engine Running?' Response from Adapter Engine: Fatal ArchiveJob (Archiving) failed.(Details: Code: MS.JOB.ARCH

  • Posting Problem

    Hi Exports,    I am doing excise invoice J1IIN , while getting below error, Balance in transaction currency Message no. F5702 Diagnosis A balance has occurred in transaction currency 'INR' with the following details: Exchange rate '00', amount '     

  • Got my wife a iphone for xmas

    I already own and iphone and love it. I bought one for my wife and i have a few questions before she gets it on the 25th. She currently uses a PC but i want her the use the mac to sync her phone, so i set up a users account with her name. Now all our

  • HT4759 I did a a factory reset to my I phone 4G but it ask for the original owner account but I don't know the original owner, how can I activate my device?

    I did a a factory reset to my I phone 4G but it ask for the original owner account but I don't know the original owner, how can I activate my device?