Displaying keyword search results 91 - 100
Created by voodoo on July 30, 2010 14:53:33 Last update: July 30, 2010 14:54:52
The -d switch for cURL sends HTTP POST with data from the command line. To verify the data being posted, this is a CGI script that echos the data back:
#!C:/perl/bin/perl.exe ## ## echo -- echos ...Examples: POST data from command line:
C:\>curl -d input1=value1^&input1=value2 http://lo...POST data from stdin (with @ before the - symbol):
C:\>curl -d @- http://localhost/cgi-bin/echo.pl ...POST data from a file (with @ before the - symbol and input redirect):
C:\tmp>cat data.txt abcd 1234 xyz ...For some reason, @ with file name didn't work as expected:
C:\tmp>curl -d @data.txt http://localhost/cgi-bin/...One thing to notice is that cURL removes the new line characters when posting (thus the echo back is only one line instead of three). This can...
Created by voodoo on July 11, 2009 15:14:55 Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com HTTP/1.0 ...or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...Download openssl from openssl.org:
C:\>curl --help Usage: curl [options...] <url> ...
Created by voodoo on July 21, 2010 16:10:47 Last update: July 21, 2010 16:10:47
Google news RSS does not like curl:
C:\> curl --dump-header - -o NUL http://news.googl...Switch the agent to HotJava with the -A option:
C:\> curl -A "HotJava/1.1.2 FCS" --dump-header - -...
Created by Fang on April 04, 2010 04:12:14 Last update: July 21, 2010 14:52:58
The tags <c:if> The <c:if> tag may be used with or without body content:
<!-- Without body content, used to export vari...In my opinion, the version without body content is pretty much useless (the <c:set> tag is a lot more meaningful for this purpose). If body content exists, it is inserted into the page if the testCondition is true . Optional attributes var and scope may be specified. If var is specified, a variable whose name is the value of var is exported to the associated scope ( pageScope if no scope is specified). The type of the exported variable is Boolean and its value is the value of the testCondition . <c:choose>, <c:when>, <c:otherwise> These tags imitate the Java control structure if...else...
Created by Fang on July 17, 2010 03:16:53 Last update: July 17, 2010 03:18:25
This error happens when the ordering of elements in web.xml is not correct. For example, in a <servlet> declaration, <servlet-name> should come before <servlet-class> . If you switch the order of <servlet-name> and <servlet-class> , you'll get this error. This was my stack trace in JBoss when I declared <load-on-startup> before <init-param> for a servlet:
DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/...
Created by meiu on July 07, 2010 15:16:34 Last update: July 07, 2010 15:17:08
<%@ taglib prefix="fmt" uri="http://java.sun.com/j...Full attributes: Attribute Meaning value Date object to be formatted type Format time only ('time'), date only ('date'), or both date and time ('both')? dateStyle Style to format date, e.g., default, short, long, full etc (c.f. JavaDoc for java.text.DateFormat) timeStyle Style for format time, e.g., default, short, long, full etc (c.f. JavaDoc for java.text.DateFormat) pattern User defined pattern, e.g., MM/dd/yyyy timeZone Which time zone to display the date for? var If the var attribute is specified, then a String value containing the formatted date is assigned to the named variable. Otherwise, the <fmt:formatDate> tag will write out the formatting results. scope When the var attribute is present, the scope attribute specifies the scope of the resulting variable. .
Created by James on June 30, 2010 19:04:45 Last update: July 03, 2010 21:24:33
/** * * AJAX IFRAME METHOD (AIM) * http...The above code only supports HTML responses. In order to support JSON responses, the above...
Created by James on June 30, 2010 20:14:28 Last update: July 03, 2010 18:41:12
The HTML page
<!DOCTYPE html> <html> <head> <title>jQu...Client Side Code
// called before upload submit function sta...Server Side Code Using Apache Commons FileUpload as example. Upload code (responds to fileUpload.do ):
final HttpSession session = httpServletRequest...Progress code (responds to uploadProgress.do ):
HttpSession session = httpServletRequest.getSe...
Created by James on June 24, 2010 22:04:19 Last update: June 24, 2010 22:04:19
Start with this page:
<!DOCTYPE html> <html> <head> <title>jQu...When you click "Submit", the form submits fine. Now turn the form to a jQuery dialog:
<head> <title>jQuery UI Dialog</title> ...When you click "Submit", the form no longer submits! Why? When you convert the contents of the form into a dialog, the form becomes empty! The "Submit" button is no longer associated with the form. Conclusion: you should always put the form tag inside the element you are converting to a dialog.
Created by James on June 22, 2010 19:40:53 Last update: June 22, 2010 19:52:53
Use jQuery to submit a form by clicking a button not associated with the form. The jQuery submit method can also be used to associate an event handler on the form.
<!DOCTYPE html> <html> <head> <title>jQu...To submit the first form on the page: