post

SAXParseException when doing post with a XML file in jersey

Hi out there. I use jaxb in my REST application. I want to send an XML file via a web form. Then the java Class will unmarshal the InputStream. private void unmarshal(Class<T> docClass, InputStream inputStream) throws JAXBException { String packageName = docClass.getPackage().getName(); JAXBContext context = JAXBContext.ne...

curl POST to RESTful services

Hello All, There are a lot of questions on Stackoverflow about curl but I could not figure out what is that I am doing what I am not supposed to. I am trying to call a RESTful service that I had written using Jersey API and am trying to POST an xml string to it and I get HTTP 415 error which is supposed to be a Media Type error. Here i...

PHP Server Side Post to Recreate Replace Secure Single Sign On

I host and intranet and manager several Single Sign Ons for outside websites. We have always done this through some sort of hidden form. Example <form method="post" action="example.php"> <input type="hidden" value="user" name="user" /> <input type="hidden" value="password" name="password" /> </form> We can then have a javascript ...

Empty Postbacks on ASP.NET pages

We are having a problem that seems to only be a problem when accessing our websites from internal intranet machines. When logged into the domain, and accessing our websites, postbacks are not working. Basically the page behaves as if it were refreshed and nothing was changed. When logging the GETs and POSTs with an HTTP analyzer, the ...

ServerVariables and POST Data

I've got a piece of tracking code which is capturing REMOTE_HOST, SERVER, REQUEST_METHOD, SCRIPT_NAME and QUERY_STRING. It grabs these from ServerVariables and sticks them in a database by user and IP. What is the best way to pick up the exact contents of what was posted back to a URL in ASP.NET? Is there an HTTP_POST? I'd rather not gr...

PHP4 HTTP Post without cURL

I have the following code that works on PHP5 to send a HTTP POST without using cURL. I would like this to work on PHP 4.3.0 and above: $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-type: application/x-www-form-urlencoded\r\n" . "Content-Type: application/json\r\n", 'content' => $q...

how do I POST a jpeg to a web form the way a browser would?

I need to upload a file to a form. This is a generic browser based upload I want to mimic. I have looked through the HTML documentation but I can't figure out how it works. right now I am using a URL to submit the rest of the form information "www.domain.com/form.html?field=value&field2=value2". This is all there is to the HTML for the...

JAVA: POST data via HTTPS does not seem to get sent?

Hi guys (and girls), I have a problem POSTing data via HTTPS in Java. The server response is the same whether or not I send 'query'. Maybe someone can point out what the problem is... Thanks! Main class: package bind; public class Main { public static final String urlString = "https://www.sms.ethz.ch/cgi-bin/sms/send.pl"; ...

how to refresh mulitple divs when after posting using jquery

i have a screen with multiple little widgets (all with different divs around them). i have one form and when i post (using jquery) right now it updates the single form using ajax. i want two other divs to refresh as well (that are outside the form). What is the best way to trigger a refresh of multiple different divs on a single jquer...

applet communication using post method

I have an applet that is communicating with a servlet. I am communicating with the servlet using POST method. My problem is how do I send parameters to the servlet. Using GET method, this is fairly simple ( I just append the parameters to the URL after a ?). But using POST method how do I send the parameters, so that in the servlet side,...

PageMethods security

Hi, I'm trying to 'AJAX-ify' my site in order to improve the UI experience. In terms of performance, I'm also trying to get rid of the UpdatePanel. I've come across a great article over at Encosia showing a way of posting using PageMethods. My question is, how secure are page methods in a production environment? Being public, can anyon...

Jquery $.post and PHP - Prevent the ability to use script outside of main website.

I have a PHP script setup using Jquery $.post which would return a response or do an action within the targeted .php file within $.post. Eg. My page has a form where you type in your Name. Once you hit the submit form button, $.post is called and sends the entered Name field value into "mywebsite.xyz/folder/ajaxscript.php" If a user wa...

Sending html data via $post fails

I am using the code below which is fine but when I use the code below that in an attempt to send an html fragment to a processing page to save it as a file but I get nothing. I have tried using ajax with processData set to false ads dataTypes of html, text and xml but nothing works. I can't find anything on this so I guess I must be mis...

Call code behind method from Jquery

Hi, I have this question: How could I call a codebehind method from jquery? I have a web page: (ForgetPass.aspx) with its respective codebehind (ForgetPass.aspx.cs). On the codebehind I have a public method: public void ChangeSession(string strChangeSession) { some stuff... } When I was working on MVC, calling that method was as ...

Why are $_POST variables getting escaped in PHP?

When my PHP script receives data from an AJAX POST request, the $_POST variables are escaped. The really strange thing is that this only happens on my production server (running PHP 5.2.12 on Linux) and not on my local server (running PHP 5.3.1 on Windows). Here is the AJAX code: var pageRequest = false; if(window.XMLHttpRequest) p...

asp.net mvc post variable to controller

Hello fellow programmer I came from PHP language(codeigniter), but now I learning ASP.Net MVC :) In PHP codeigniter we can catch the post variable easily with $this->input->post("theinput"); I know that in ASP.Net MVC we can create an action method that will accepts variable from post request like this public ActionResult Edit(str...

http_post_data adding extra characters in response

Hey Guys I am getting some extra characters like '5ae' and '45c' interspersed along with valid data when using http_post_data. The data I am sending is XML and so is the response. The response contains these weird characters thats making the XML invalid. If I use fsockopen I do not have this issue. Would really like some input on thi...

PHP form values after POST in dropdown

I have a form with 'selected' values pulled from the database. Now I want the user to edit the values. When the data is send I want to show the new values. When I submit my form I always get the 'green' value? What am I doing wrong here? <?php // pulled from db $color = "blue"; // update if (isset($_POST['Submit'])) { echo "write ...

Ruby, post and redirect

Hi! I have situation like this: user submits form with action='/pay' in '/pay' I have to add some additional parameters and send post request to www.paymentprovider.com/new_payment The problem is that I want to post and redirect (at the same time) user to this new website www.paymentprovider.com/new_payment. Currently I am using N...

Jquery qtip ajax issue

Hi All, I am trying to post the value of an input box (In this case a imdb link) to my imdbgrabber.php page and have it return the info of that movie into a qtip box. EDIT: View here http://movieo.no-ip.org/ Hover the images and you will see the error. Everything works fine until i try and post the variable to the imdbgrabber page. Th...