Reading/Writing Form Message Bodies

In JSP how do you read the body of a submitted form? When I run the code below I get nothing back. I'm trying to submit XML in the body of the HTML form and then read it in the JSP. What am I doing wrong?
readBody.jsp
<%@ page import="java.io.BufferedReader" %>
<%
     BufferedReader br = request.getReader();
     String curLine = br.readLine();
     while (curLine != null) {
          System.err.println("curLine = " + curLine);
          curLine = br.readLine();
%>
test.html
<html><head><title><title/><body>
<form method="post" action="readBody.jsp">
<team id="1">
<name>Tigers</name>
</team>
<input type="Submit" value="Submit Team"/>
</form>
</body></html>

This should help. But you have to understand that I did not check if there are not data sent. that is not important now. You could do that later.
If this helps, please come back to let other learn from it. This is the best way to learn.
theForm.html
<html><head><title><title/><body>
<form  action="readForm.jsp">
Name : <input type= "text" name = "user" value = " "><br/>
<input type="Submit" value="Submit Name"/>
</form>
</body>
</html>
readForm.jsp
<%@ page language="java"  contentType = "text/html" %>
<html>
   <head><title>Form Demo</title></head>
       <body bgcolor = "white" >
        <h3> Hello
        <%
               out.print(request.getParameter("user"));
              %>
        </h3>
    </body>
</html>
 

Similar Messages

  • Error reading/writing file message when opening garageband and/or files

    I've been recently getting this message when I open garageband and files
    "Error reading/writing file\U201Ccom.apple.garageband.cs\U201D
    I've been in and repaired disk permissions and all that it says it is all fine, reinstall garageband and message still comes up, weird.
    not only is garageband being a nuisance, Mac OS X 10.6.2 is being a pain when shutting down telling me to restart the computer. This only happened since upgrading to 10.6. No one as yet knows this promble so I'm gonna have to ring apple and see what is going on here.
    and also my other problem is that mac doesn't seem as snappy anymore I noticed this before upgrading to 10.6 and made no difference when "cleanly" installing 10.6. I get a colour wheel popping up and i'm having to wait with simple tasks. iMac only 2 years old.

    i give up with this discussion forum no no one knows anything

  • Error reading/writing file "com.garageband.cs":`≤Ć». message

    Hey all! Don't know if anyone can help but I keep getting the message...
    " Error reading/writing file "com.garageband.cs":`≤Ć». " with a cancel button.
    If you click on it it does go away, but after a time playback starts skipping and stuff.
    Anyone help please?
    Thanks
    Righini

    first two things to try for “oddball” probs:
    http://www.bulletsandbones.com/GB/GBFAQ.html#oddballprobs
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Keep getting message pop up "Error reading/writing file  "com.apple.logic.pro.cs": Logical end-of-file reached during read operation," and "The Preferences are not loaded completely. Save them to "com.apple.logic.pro.cs" anyway?" Using Logic pro 8. ???

    Logic froze while I was working on something so I forced quit.  Now every time I open LOGIC a message pops up that says:
    "Error reading/writing file
    “com.apple.logic.pro.cs”:
    Logical end-of-file reached during read operation."
    The only button option is cancel so I press it and another message appears that says:
    "The Preferences are not loaded completely.
    Do not save them, as you would overwrite the Preferences file with incomplete data."
    Then when i close logic a box appears saying:
    "The Preferences are not loaded completely.
    Save them to "com.apple.logic.pro.cs" anyway?"
    There are 3 button options to press; ok, cancel or dont save.
    I press "don’t save" cuz I don't want to ruin anything.
    I found a discussion located here: https://discussions.apple.com/message/9564253#9564253 that says if I delete the file "com.apple.logic.pro.cs" it will resolve the problem.  If I do this will I loose or mess anything up at all, automation, saved channel strips customizations, saved effects, synth, or ultrabeat customizations etc? Or especially will I loose any work I've done?  I have hundreds pieces of music files I've created.  I'm scared to mess anything up with all the hours and months of work I've done.  Is there anyway to fix this without loosing anything?  I'm using Logic Pro 8.
    Thank you

    You can safely delete this file - its the preference file for control surface settings - you haven't said whether you're actually using a control surface or not, if so, you will have to set it up again. A new file will be created when you fire Logic up again, but of course it will contain default settings. If you have a complicated control surface setup, remember to keep a backup copy somewhere in case any future problems arise.
    Other than that, you really have nothing to be scared about - hopefully your problem is as simple as that and there isn't an underlying problem (a corrupt hard drive, for example). You seem concerned about losing work, so I guess you want to think about backing that up on a regular basis too. If you're saving your projects to your system drive, do get an external one for this. And also check that you have plent of free space on your system drive - you need to keep about a quarter or third of it free for your OS and programs to run properly (some temporarily stored files can be quite large).

  • Read PDF form from email attachment

    Hope someone is able to help on this one...
    We are using a pdf form at work to gather some feedback and the user will be submitting the form via email...
    Using outlook 2003 I had a crack at writing a vba module to read the pdf form from the email attachment to update into an excel spreadsheet
    Is it possible to read pdf forms from the email attachment with outlook vba? Or does the attachment need to be saved to a directory first?
    I have in the past done a vba module to save the pdf form attachments to a directory and then using acrobat and it's in-built form data collection tool and exported as a csv, but this feedback form will be an ongoing thing that will be updated daily - and to minimise handling would like to run the outllook macro that reads straight from the email attachment instead of doing another 3 or so steps...
    Below is the snippet I am using - it's a mashup of different code I've found on the net
    Sub Feedback()
        On Error GoTo Feedback_err
        'Dim ns As NameSpace
        Dim objNS As NameSpace
        'Dim Inbox As MAPIFolder
        Dim objFolder As Outlook.MAPIFolder
        'Dim SubFolder As MAPIFolder
        Dim objExcel
        Dim oBook
        Dim oSheet
        Dim gApp As Acrobat.CAcroApp ' In Tools > References > Checked all Acrobat Libraries in VBA > Tools > References
        Dim pdDoc As Acrobat.CAcroPDDoc
        Dim jso As Object
        Dim Item As Object
        Dim Atmt As Attachment
        Dim filename As String
        'Dim i As Integer
        Dim myOrt As String ' Added 13/1/2010
        Set objApp = CreateObject("Outlook.Application")
        Set objNS = objApp.GetNamespace("MAPI")
        Set objFolder = objNS.PickFolder
    ' Check subfolder for messages and exit of none found
        If objFolder.Items.Count = 0 Then
        'If SubFolder.Items.Count = 0 Then
            MsgBox "There is no Feedback emails in this folder.", vbInformation, _
                   "Nothing Found"
            Exit Sub
        End If
    ' Check each message for attachments
        Set objExcel = CreateObject("Excel.Application")
        Set oBook = objExcel.Workbooks.Open("G:\Path\Filename.xls")
        Set oSheet = objExcel.Worksheets(1)
        oSheet.Range("A2").Select
        Set gApp = CreateObject("AcroExch.App") ' make acrobat session
        Set pdDoc = CreateObject("AcroExch.PDDoc")
        Set jso = pdDoc.GetJSObject ' set the Javascript object via this way we can fill in the PDF document fields
        For Each Item In objFolder.Items
            For Each Atmt In Item.Attachments
                If Right(Atmt.filename, 3) = "pdf" Then
                    Do
                    If IsEmpty(objExcel.ActiveCell) = False Then
                        objExcel.ActiveCell.Offset(1, 0).Select
                    End If
                    Loop Until IsEmpty(objExcel.ActiveCell) = True
                        objExcel.ActiveCell.value = jso.getField("CurrentDocDate").value
                        objExcel.ActiveCell.Offset(0, 1).value = Item.Session.CurrentUser
                        objExcel.ActiveCell.Offset(0, 2).value = jso.getField("txtJobNo").value
                        objExcel.ActiveCell.Offset(0, 3).value = jso.getField("rbStatus").value
                        objExcel.ActiveCell.Offset(0, 4).value = jso.getField("rbFeedback").value
                        objExcel.ActiveCell.Offset(0, 5).value = jso.getField("txtComments").value
                End If
            Next Atmt
        Next Item
        oBook.Save
        objExcel.Quit
    Feedback_exit:
        Set Atmt = Nothing
        Set Item = Nothing
        Set objNS = Nothing
        Set pdDoc = Nothing
        Set objExcel = Nothing
        Set jso = Nothing
        Exit Sub
    ' Handle Errors
    Feedback_err:
        MsgBox "An unexpected error has occurred." _
            & vbCrLf & "Please note and report the following information." _
            & vbCrLf & "Macro Name: Feedback" _
            & vbCrLf & "Error Number: " & Err.Number _
            & vbCrLf & "Error Description: " & Err.Description _
            , vbCritical, "Error!"
    Resume Feedback_exit
    End Sub
    I get a vba error 91 "Object Variable or With  block variable not set"
    Cheers
    Ben

    hi Phani,
    with regard to your problem I would suggest you to please go thru this link.
    Hope this would be helpful to you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/offline%20interactive%20pdf%20form%20using%20e-mail.pdf
    Thanks,
    kris

  • How to get the key values of record in ADF Read-only Form?

    Hi
    I am using ADF Business Component VO.
    I have a search page( ADF Search Form) and I am displaying the results of the search in a ADF Read-Only Table( only few columns are shown) .Then by selecting a record and clicking on the button 'View' , I am navigating to a different page(ADF Read-Only Form) to show all the columns of the table for the selected record.
    In the second page, I have one more button 'view child details'.Now when I click on this view child details button, I have to show another page(ADF Read-Only Form) which fetches the data from one of the child tables of parent record.
    My idea is to create a ViewLink between the parent and child tables.( I have more than 15 child tables for a parent table).
    Is there anyother way to achieve this functionality?
    Please respond ASAP.
    Thanks in advance.
    ~Sivaji..
    Message was edited by:
    Sivaji...the boss

    Sijav,
    ASAP?
    Anyway - yes, you can do this with a view link. When you add the child table to the application model, make sure you actually add it as a child of the parent table instance (select the parent VO first, then use the shuttle to add it). This way, the parent->child relationship should be coordinated for you automatically. You should not need to get the key values manually.
    Then, when you create the page to show the detail table, make sure you use the child table that is shown as a child of the parent table in the data control palette (expand parent table to see the child).
    Hope this helps,
    John

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • Read JMS Map message in BPEL

    Hi all,
    I am trying to read JMS Map message in BPEL. Below is the message which is consumed from the JMS queue by JMS adapter.
    <Receive1_Consume_Message_InputVariable>
    <part  name="body">
    <MapMessage> <entry  name="createUser"  dt="String">jcooper</entry>  
    <entry  name="Operation"  dt="String">INSERT</entry>
    <entry  name="CorrelationId"  dt="Long">2345</entry>
    </MapMessage>
    </part>
    </Receive1_Consume_Message_InputVariable>
    How to traverse all the key and name value pairs? Is there any function in XSLT to achieve this? Please let me know.
    Thanks

    I publish a JMS message to a topic in one BPEL process and have another BPEL process read from the topic and start the flow. The problem I have is that the first process is writing fine to the topic, but the second process seems to be reading twice. I am seeing two instances of the second process in em.
    Can anyone help? I am using JDev 11.1.1.1.0
    Thanks

  • Efficiency of reading/writing files character-by-character

    I've been assuming that when I do a file "open for access," that among the housekeeping functions set up behind the scenes, there is some sort of buffer created, the size of which is somehow related to the logical sector size of the disc in question, so that reading or writing short pieces of text, or even single characters, doesn't cause independent physical read/write actions at the disc drive.
    Does anyone know if this is true or false? Maybe the question would be clearer posed another way. Suppose I set up a loop to read or write 1024 characters, sequentially, but one at a time. Obviously the loop will require much more time to execute than a singe read or write statement calling for 1K of text all at once. But will there be significantly more activity at the disc drive itself? Will the data be read or written on 1024 successive spins of the platter, or will it be buffered down to one spin, or maybe a couple, depending on the exact location of sector boundaries and so on?
    Thanks.

    Thanks for this. I was sure some such facility was in operation, but I couldn't find anything explicit on the question. I have a task in which I'm trying to convert what looks like incredibly badly formed XML application files into properly tagged and well-formed XML so that I can then get them through a well-designed XML parser. To decode these utter shambles requires decision logic that goes nearly character-by-character. One tutorial page I found on Applescript file I/O suggested that reading/writing character-by-character was inherently inefficient, which I can see that it is, I just wanted to make sure the inefficiency didn't go all the way down to the mechanics of kicking the disc for every single character. The description in the tutorial was ambiguous, and a little disconcerting.
    The tutorial also suggested an alternative strategy of reading an entire file at once into a string and then working with the string. But my files are megabytes long, and I wonder how efficient operations are on megabyte strings, presuming there isn't a limit on string length. Short of trying to do some complex adaptive algorithm, which I might never get working right, I'm pretty sure that keeping to the KISS principal, and just going character-by-character, is a near-optimal strategy in my case.
    Cheers.

  • TS3899 I have an iphone5 and the reply, forward and writing a message from the mail app doesn't work. I can check my mail but can't reply to it. What's going on?

    I have an iphone5 and the reply, forward and writing a message from the mail app doesn't work. I can check my mail but can't reply to it. What's going on?

    Try a reset: hold down the home button along with the sleep/wake button until you see the apple, then let go. (No data loss)

  • Unable to read BB Messenger messages

    Hi there! I have an odd glitch. I get notification that I've received a new instant message via BlackBerry Messenger PIN. It shows in my generic inbox as a new unread message (with the yellow face beside it), but when I open the conversation with the person, there's nothing there. If I reply, my replied show up as sent, delivered and received, and the contact shows in the contact list as "writing a message", but when they send their messages, it does not show up in the conversation.
    I can't really explain this well.... but everything operates as normally (notifications, etc.) except that the messages are missing when you actually open the conversation.
    Now, this seems to fix itself if I remove the battery and reset my 8330, but then it happens again as early as the next day. Has anyone had this problem?

    you are not looking at the right memory. You need to look at the Device Memory, not the Media Memory :
    home screen >> options >> status >> file free
    you need at least 10'000'000.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Reading ActiveX Event Messages

    Hi
    I have been reading activeX event messages for sometime now
    using a combination of EventLastMatch and GetSpriteProperty.
    Within a text entry activex which I have recently imported
    into Authorware it contains within the Events Tab the following
    parameter:
    KeyDown returns nothing
    Parameter 1: KeyCode is an integer
    Parameter 2: Shift is an integer
    Silly question but if 'KeyDown' returns nothing then why is
    the Parameter 1 and 2 stated ? Does this KeyDown event actually
    return values.
    I have tried reading the KeyDown event using
    MessageValue:=CallSprite(@"ActiveX Text Entry",#KeyDown)
    and
    MessageValue:=EventLastMatched@"ActiveX Text Entry"[#KeyDown]
    But with no success. Anyone have any other methods I could
    try ?
    Thanks

    I think the AX that's been discussed is the web browser
    control...
    "Mike Baker **Adobe Community Expert**"
    <[email protected]> wrote in
    message news:[email protected]...
    >I ran a quick test with the MS Forms 2.0 text box control
    and tab events
    >are
    > getting through to the control - I can see the tab in
    the control. They
    > are
    > not returned as key events though so they're not
    completely making the
    > round
    > trip. I do get a #change event though. Not very useful
    in this case.
    > Mike - What about a Win Control?
    >
    > Mike
    > ====================
    > Mike Baker
    > Adobe Community Expert
    > [email protected]
    >
    > "Amy Blankenship *AdobeCommunityExpert*"
    > <[email protected]>
    > wrote in message
    news:[email protected]...
    >> I'm fairly sure tab events don't get passed either.
    There have been
    > several
    >> conversations about that on the Aware list.
    >>
    >> "Mike Baker **Adobe Community Expert**"
    <[email protected]> wrote in
    >> message news:[email protected]...
    >> > Hi Mike,
    >> >
    >> > Catch an event from an ActiveX with an Event
    response attached to an
    >> > interaction. EventLastMatched@"icon" refers to
    the response and not to
    > the
    >> > activex control. Unfortunately not all actions
    in Authorware wind up
    > being
    >> > events in the ActiveX. If I remember right,
    ShiftDown is a key modifier
    >> > that
    >> > doesn't even get passed to the ActiveX control
    so no event can be
    >> > returned.
    >> > Authorware waits for the actual key and it
    passes the key and the
    > modifier
    >> > to the control together.
    >> >
    >> > Mike
    >> > ====================
    >> > Mike Baker
    >> > Adobe Community Expert
    >> > [email protected]
    >> >
    >> >
    >> > "Mike P" <[email protected]>
    wrote in message
    >> > news:[email protected]...
    >> >> Hi
    >> >>
    >> >> I have been reading activeX event messages
    for sometime now using a
    >> >> combination of EventLastMatch and
    GetSpriteProperty.
    >> >>
    >> >> Within a text entry activex which I have
    recently imported into
    >> > Authorware it
    >> >> contains within the Events Tab the
    following parameter:
    >> >>
    >> >> KeyDown returns nothing
    >> >> Parameter 1: KeyCode is an integer
    >> >> Parameter 2: Shift is an integer
    >> >>
    >> >> Silly question but if 'KeyDown' returns
    nothing then why is the
    >> >> Parameter
    >> > 1
    >> >> and 2 stated ? Does this KeyDown event
    actually return values.
    >> >>
    >> >> I have tried reading the KeyDown event
    using
    >> >>
    >> >> MessageValue:=CallSprite(@"ActiveX Text
    Entry",#KeyPress)
    >> >> and
    >> >> MessageValue:=EventLastMatched@"ActiveX
    Text Entry"[#KeyDown]
    >> >>
    >> >> But with no success. Anyone have any other
    methods I could try ?
    >> >>
    >> >> Thanks
    >> >>
    >> >>
    >> >
    >> >
    >>
    >>
    >
    >

  • Oracle Forms Messages and  Codes

    Dear friends, will you, please, tell me, where can I find "Forms messages and codes manual"?

    <p>In the documentation, my friend.</p>

  • Custom Formatting of a ADF Read-Only Form

    From what I've worked with so far, the ADF read-only form will only allow you to pick the number of "rows" and "columns" to format data. Columns titles are aligned to the left and column values aligned to the right.
    But the specs I've been given are for a highly customized layout, with column titles above the column values, and with some rows containing only two columns of data and some rows requiring up to ten columns of data.
    How can I adjust the format of ADF components, like read-only forms, to customize the layout?
    Thanks in advance.

    Thanks for the advice Shay.
    What I need to do is take one view object's data (20 columns) and spread them out, in HTML terms, into multiple tables to provide various TR/TD formats on a single screen.
    Are you saying it is possible to layout a single view object's columns into different layout panels to mimic multiple HTML table formats?
    Thanks again.

  • I have a  macbook, an ipad, and an iphone with the Mail app on all three synced through icloud, but when I read and delete emails on my phone, the inbox on my ipad is not update, so I have to go through and mark as read or delete messages again. How can I

    I have a  macbook, an ipad, and an iphone with the Mail app on all three synced through icloud, but when I read and delete emails on my phone, the inbox on my ipad is not update, so I have to go through and mark as read or delete messages again. How can I sync my iphone and ipad? (it seems like each is synced only to my laptop, so don't synchronize until I go home and use my laptop.

    POP: yahoo, aol, comcast/time warnder/road runner
    Imap: google, hotmail, and more including icloud.
    If you want to use multiple devices - move to imap, I would even say "exchange", but Google does not support free exchange anymore, since January of that year. So Ironically  Icloud or Hotmail would be my choices right now.
    To find out more about what happens to you, search on Google "difference between pop and imap"

Maybe you are looking for

  • Problem getting krUFS values from SunMC 4.0 on Sunfire X2100

    If I use the snmpget command to ask the SunMC agent for the krUFS oids I'm interested in (Mount point, SystemSize, PctUsedSpace), I get no error, but I get no data either (i.e. returned value is "" for all). I'm able to get this data for T1000 and Su

  • Fsck throwing up a bunch of errors with my ESP

    I've had the same problem this guy seemed to have; my Arch install wouldn't be able to mount my EFI partition. All this happened after I updated a few packages yesterday: I had some kernel panic, and when I tried to fix it, I clearly messed something

  • TS3999 Constant "Moving calendars to server account-" that renders iCal inoperative

    Did anyone ever resolve the issue of the constant "Moving calendars to server account-" that renders iCal inoperative? If so please tell me how to get it to stop. I love using iCal but for some reason this started and I can't get it resolved.

  • Tech Tool

    Each time we run Tech Tool Deluxe 3.0.4., it reaches Test Surface and it hangs up. Any ideas? imac   Mac OS X (10.4)  

  • New 0s6 not on ihone 4

    Some of the new features for OS6 are not on the Iphone 4 such as Panarama photos, Siri, fly by on maps and facetime over cellular. Any ideas why??