Posting data using HTTP POST to a Servlet

by arun » Wed, 20 Jan 2010 02:06:33 GMT

Sponsored Links

I am trying to use the below to post my data to a servlet but seems
like not working. 

I am posting to a servlet in Tomcat in my local machine using host:

Basically I am posting the data to,

1. Save into database using servlet
2. Then I need to get that data back from DB using HTTPGET via another

Please help.


Other Threads

1. IMX31 3stack board. Error msg: Warning: unable to open an initial console

Hail to all experts,

I'm having the error message (bottom). Unlike others mine stopped at
line "Warning: unable to open an initial console.".
"...mydroid/out/target/product/generic/root" compiled into kernel
kernel parameters using "noinitrd android.console=ttymxc1,115200
and I have the file system setup as:

RedBoot> fis list
... Read from 0x07ee0000-0x07eff000 at 0x00080000: ..
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x00000000  0x00000000  0x00040000  0x00000000
FIS directory     0x00080000  0x00080000  0x0001F000  0x00000000
RedBoot config    0x0009F000  0x0009F000  0x00001000  0x00000000
kernel            0x00100000  0x00100000  0x001E0000  0x00100000
cramfs_system     0x00600000  0x00600000  0x01FE0000  0x00600000
jffs2_data        0x02E00000  0x02E00000  0x00020000  0x02E00000

<And the mx3_3stack.c>

  .name = "nand.bootloader",
  .offset = 0,
  .size = 1024 * 1024},
  .name = "nand.kernel",
  .size = 5 * 1024 * 1024},

  .name = "nand.cramfs_system",
  .size = 40 * 1024 * 1024},
  .name = "nand.jffs2_data",
  .size = 56 * 1024 * 1024},
  .name = "nand.configure",
  .size = 8 * 1024 * 1024},
  .name = "nand.userfs",
  .size = MTDPART_SIZ_FULL},

<init.rc as>
# mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a
    mount cramfs /dev/block/mtdblock2 /system
    mount cramfs /dev/block/mtdblock2 /system ro remount

    # We chown/chmod /data again so because mount is run as root +
    mount jffs2 /dev/block/mtdblock3 /data nosuid nodev
    chown system system /data
    chmod 0771 /data

    # Same reason as /data above
    mount yaffs2 m...@cache /cache nosuid nodev
    chown system cache /cache
    chmod 0770 /cache

    # This may have been created by the recovery system with odd
    chown system system /cache/recovery
    chmod 0770 /cache/recovery

Am I having a faulty Android kernel? Please comment, thanks.

<Error msg>
entry=0x80008000, target=0x80008000
Using base address 0x00100000 and length 0x001d2114

............................................................ done,
booting the k
Linux version 2.6.24-335-g47af517 (x...@xin-desktop) (gcc version 4.2.3

 G++ Lite 2008q1-126)) #14 PREEMPT Thu Mar 12 13:38:31 GMT 2009

CPU: ARMv6-compatible processor [4107b364] revision 4 (ARMv6TEJ),
Machine: Freescale MX31/MX32 3-Stack Board
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets

Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
Kernel command line: noinitrd console=ttymxc0,115200
Unknown boot option `android.console=ttymxc1': ignoring

MXC IRQ initialized
PID hash table entries: 512 (order: 9, 2048 bytes)
MXC GPT timer initialized, rate = 16625000
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Memory: 128MB = 128MB total
Memory: 125824KB available (3328K code, 490K data, 264K init)
- Hide quoted text -

Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
L2X0 cache controller enabled
CPU is i.MX31 Revision 2.0
Clock input source is 26000000
MXC GPIO hardware
3-Stack Debug board detected, rev = 0x0200
MXC DMA API initialized
SCSI subsystem initialized
CSPI: mxc_spi-0 probed
CSPI: mxc_spi-1 probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
MXC I2C driver
clk: Unable to get requested clock: dfm_clk
mc13783 Rev 3.3 FinVer 0 detected
PMIC RTC successfully probed
PMIC Light successfully loaded
MC13783 regulator successfully probed
Device spi2.2 probed
<6>PMIC Power successfully probed
NET: Registered protocol family 2
Time: mxc_gpt clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
Low-Level PM Driver module loaded
usb: Host 2 host (isp1504) registered
usb: DR host (isp1504) registered
usb: DR gadget (isp1504) registered
DPTC driver module loaded
JFFS2 version 2.2. (NAND)  2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
mxc_ipu mxc_ipu: Channel already uninitialized 14
Console: switching to colour frame buffer device 30x40
mxc_ipu mxc_ipu: Channel already uninitialized 15
mxcfb: fb registered, using mode Epson-VGA
VGEN ID is 9
VMMC ID is 20
ch7024: TV encoder present: id = 45
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing
Serial: MXC Internal UART driver
mxcintuart.0: ttymxc0 at MMIO 0x43f90000 (irq = 45) is a Freescale MXC
console [ttymxc0] enabled
mxcintuart.1: ttymxc1 at MMIO 0x43f94000 (irq = 32) is a Freescale MXC
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 18) is a Freescale MXC
loop: module loaded
smsc911x: Driver version 2007-07-13.
eth%d: SMSC911x MAC Address: 00:04:9f:00:97:c5
Linux video capture interface: v2.00
MXC Video Output MXC Video Output.0: Registered device video16
Driver 'sd' needs updating - please use bus_type methods
MXC MTD nand Driver 2.1
NAND device: Manufacturer ID: 0xec, Chip ID: 0xaa (Samsung NAND 256MiB
1,8V 8-bi
RedBoot partition parsing not available
Creating 6 MTD partitions on "NAND 256MiB 1,8V 8-bit":
0x00000000-0x00100000 : "nand.bootloader"
0x00100000-0x00600000 : "nand.kernel"
0x00600000-0x02e00000 : "nand.cramfs_system"
0x02e00000-0x06600000 : "nand.jffs2_data"
0x06600000-0x06e00000 : "nand.configure"
0x06e00000-0x10000000 : "nand.userfs"
MXC MTD nand Driver 2.4
usbmon: debugfs is not available
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
MXC keypad loaded
input: Unspecified device as /class/input/input0
i2c /dev entries driver
MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec
IPU Post-filter loading
SSI 1 module loaded successfully
SSI 2 module loaded successfully
PMIC Character device: successfully loaded
PMIC Audio driver loading...
PMIC Battery successfully probed
PMIC Connectivity driver loading..
hmp4e: init
hmp4e: VGA encoder initialized
ioctl pointer: c0204560.  mmap pointer: c0203f6c
RNG Driver: Loading
SEC: mxc_sec_mod_init() called
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20
19:16:42 200
7 UTC).
Control ALSA component registered
ALSA device list:
  #0: MXC Freescale with PMIC
oprofile: using arm/armv6
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation
mxc_rtc mxc_rtc.0: rtc core: registered mxc_rtc as rtc0
Real TIme clock Driver v1.0
Power Management for Freescale MX31
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev
MXC Backlight Device mxc_ipu_bl.0 Initialized.
input: mxc_ts as /class/input/input1
mxc input touchscreen loaded

mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:17:44 UTC
Freeing init memory: 264K

Warning: unable to open an initial console.

2. Does the AndroidManifest.xml file is mandatory to make changes to apk with aapt tool ???


I would like to make some configuration changes to the apk, Does the
AndroidManifest.xml is a mandatory file required from the source
( since the AndroidManifest.xml in APK cannot be reused) to make the
changes to the apk using the aapt tool.

Vikram Dattu

3. Has 3GPP PSS Release 6 been fully supported in cupcake

4. encoder support in OpenCORE/cupcake

5. C to CPP conversion (or vice-versa) based on the package type having C or CPP.

6. "Android Developers Group for Singapore and South East Asia" IRC channel is up

7. question about tabs at the bottom