Question in using sockets in parsing XML!!!!(urgent plz help)

i have a server/client program and the client has some XML files the server want to process and parse them using DOM.
But i want to do this without having to transfer neither the whole file nor line-by-line of the file
does anybody know how to do this???
how to connect the output stream of the socket of the client with this file??
thanks in advance

i did it and here are the exact line of code to do it:
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
/factory.setValidating( true );
// obtain object that builds Documents
DocumentBuilder builder = factory.newDocumentBuilder();
URL url = new URL("file://comp1/xml/Stack.xml");
// obtain document object from XML document               Document document = builder.parse( url.openConnection() .getInputStream() );

Similar Messages

  • How to install adapters in pi 7.0 ex(tibco adapter) its urgent plz help

    hi  friends
                   can any one help me how  to insatlll  the tibco adapter in pi 7.0 its urgent plz help
    thanks in advance
    bye
    raja

    Hi Raj,
    Is  your Sender System  Tibco If  so  Use  JMS Adapter  to get  the Data from tibco  and Use  IDOC  Adapter  to Post  in R3. For this you no need to Install any Adapter in XI System.
    Similar discussions ,
    XI integration with Tibco
    XI Integration with Tibco EMS (Using JMS Adapter)
    Regards
    Agasthuri Doss

  • I forget icloud password. Apple ID and icloud have different password  And i cant use apple id in i cloud   Plz help me

    This is my icloud acount ******
    I forget icloud password
    Apple ID and icloud have different password
    And i cant use apple id in i cloud
    Plz help me
    <Email Edited By Host>

    Hello, Alialyousufi. 
    Thank you for visiting Apple Support Communities.
    You can reset your Apple ID password via the steps in the first article below.  If you do not have access to the email account or are not receiving the password reset link, see the second article.
    Apple ID: If you forget your password
    http://support.apple.com/kb/ht5787
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • How to ignore empty text element while using DOM to parse xml??

    hi everyone,
    i am using DOM to parse an xml file. But i dont know how to cinfig the DocumentBuilderFactory to ignore empty text elements.
    For example, i have an xml file like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
        <child>Tom</child>
        <child>Jerry</child>
    </root>I used the following codes to parse:
    String fname = "Tom-and-Jerry.xml";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setIgnoringElementContentWhitespace(true);
    factory.setIgnoringComments(true);
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    // Generate a DOM tree from the DOM builder.
    org.w3c.dom.Document dom = builder.parse(new File(fname));
    org.w3c.dom.NodeList list = dom.getChildNodes();
    for (int i=0; i<list.getLength(); i++) {
        System.out.println("Child No."+i);
        System.out.println("NodeName="+list.item(i).getNodeName());
        System.out.println("NodeType="+getType(list.item(i).getNodeType()));
        System.out.println("NodeValue="+list.item(i).getNodeValue());
        System.out.println();
    }The result is not exactly what i want ---- there are 5 children in list!! The 1st, 3rd and 5th are #text and their values are all empty. Only the 2nd and the 4th are the child that i expect.
    It is really troublesome to get all these silly empty texts as sub elements. I tried to get rid of them, but i failed. I just dont understand why factory.setIgnoringElementContentWhitespace(true) did not work.
    Anyone can help me? thanks.
    Heavy ZHENG

    I just dont understand why factory.setIgnoringElementContentWhitespace(true) did not work.That only does something if the XML has a DTD that enables it to know what whitespace can be ignored and what is significant. The API documentation for the method refers you to this document:
    http://www.w3.org/TR/REC-xml#sec-white-space

  • Very urgent plz help me

    Friends,
    I have been struggling to convert the from address of the retrieved from the inbox to a normal string.
    I have tried using the toString() method, but still I am able to print only the internet address only .
    Though it may look like a silly question to many of u, it would be really helpful to me if I get the answer.
    Please help me mail gurus.

    I know this is ridiculously incredibly amazingly outstandingly urgent, but it would still help if you took a few seconds to actually describe the problem.
    An example might help. What is this "internet address" you mention and what is a "normal string" version of it?

  • Refreshing JEditorPane (Urgent) plz help

    hello programmers,
    i'm building an html editor:
    My html editor has a split pane, the 2 pane got of the split pane are JEditorPanes, one on which i write tag and the other i display them,... thankfully all's working great, my syntax is highlighting and the html is displayed well but i've got the following problem:
    when i save a html page , i wanna my browser (on the right side of the slipt pane) to display the html page... it's ok .. it displays it with the method JHTMLEditorPane.setPage(file:/// directory/ file) but the problem is that when i save the page again using the same filename... my html page on the JHTMLEditorPane stays the same... it does not update...
    is their a refresh function for the JEditorPane? how can i update my JHTMLPane to reflect the changes i've brought to it? ONe thing , the page changes when i save it by aother file name..... PLz help it's very urgent!!!!!!!
    Bernard

    Have you tried to close and then re-open the file in your editorpane after you've saved?
    It will work when you change the name because it has to open the file as new. Java can't dynamically update values upon files like C does with pointers.

  • RECORDING WITH F-32 .......ITS URGENT PLZ HELP ME

    HI GUYS
    HERE IS MY REQUIREMENT
    I WANT TO DO A RECORDING USING F-32 AND I HAVE TO DO THE FOLLOWING WAYS
    1- ENTER ACCOUNT
    2-COMPANY CODE
    3-CLEARING DATE
    4-OPENITEM SELETION
    5-I HAVE TO SELECT THE REFERENCE RADIO BUTTON
    HERE IS MY ERROR , I DONT KNOW WHAT ARE THE VALUE I HAVE TO ENTER IN THE REFERENCE FIELD AND HOW TO PROCEED ,PLZ HELP ME IT IS VERY VERY URGENT FOR ME.
    THANKS A LOT
    MRUTYUN

    This should get you started:
    FORM clearing USING    p_purch_order
                           p_cus
                           p_ven.
      DATA: okcode(3).
      CLEAR bdcdata.
      CLEAR messtab.
      REFRESH bdcdata.
      REFRESH messtab.
      MESSAGE s205 WITH 'Clearing A/R Invoice to Invoice Receipt.'.
      PERFORM dynpro USING:
       'X' 'SAPMF05A'        '0131',       "Clear Customer: Header Data
       ' ' 'RF05A-AGKON'      bill_to,
       ' ' 'BKPF-BUDAT'       today_ch,
       ' ' 'BKPF-BUKRS'      'UOFT',
       ' ' 'BKPF-WAERS'      'CAD',
       ' ' 'RF05A-XNOPS'     'X',
       ' ' 'RF05A-XPOS1(2)'  'X',
       ' ' 'BDC_OKCODE'      '/16'.        "Process Open Items
      PERFORM dynpro USING:
       'X' 'SAPMF05A'        '0730',       "Amount popup
       ' ' 'BDC_OKCODE'      '/16'.        "Process Open Items
      PERFORM dynpro USING:
       'X' 'SAPMF05A'        '0730'.       "Press enter
      PERFORM dynpro USING:
       'X' 'SAPMF05A'        '0710',"Clear Customer: Enter selection criteri
       ' ' 'RF05A-AGBUK'     'UOFT',
       ' ' 'RF05A-AGKON'      bill_to,
       ' ' 'RF05A-AGKOA'     'D',
       ' ' 'RF05A-XNOPS'     'X',
       ' ' 'RF05A-XMULK'     'X',
       ' ' 'RF05A-XPOS1(1)'  'X',
       ' ' 'BDC_OKCODE'      '/16'.        "Process Open Items
      PERFORM dynpro USING:
       'X' 'SAPMF05A'        '0609',       "Additional Accounts popup
       ' ' 'RF05A-AGKON(1)'   p_ven,
       ' ' 'RF05A-AGKOA(1)'  'K',
       ' ' 'RF05A-XNOPS(1)'  'X'.
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '1102',       "Clear Customer: Select open item
       ' ' 'BDC_OKCODE'      'OMX'.        "Select all
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '1102',       "Clear Customer: Select open item
       ' ' 'BDC_OKCODE'      '/6'.         "Inactive
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '1102',       "Clear Customer: Select open item
       ' ' 'BDC_OKCODE'      '/6'.         "Find
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '2000',       "Select search criteria popup
       ' ' 'BDC_OKCODE'      '/24'.        "Next page
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '2000',       "Select search criteria popup
       ' ' 'RF05A-XPOS1(10)' 'X'.          "Allocation
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '0731',       "Search for Allocation
       ' ' 'RF05A-SEL01(1)'   p_purch_order.                    "PO
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '1102',       "Clear Customer: Select open item
       ' ' 'BDC_OKCODE'      'OMX'.        "Select all
      PERFORM dynpro USING:
    'X' 'SAPDF05X'        '1102',         "Clear Customer: Select open item
       ' ' 'BDC_OKCODE'    '/05'.          "Active
      IF p_test = space.
        okcode = '/11'.                    "save
      ELSE.
        okcode = 'BS'.                     "simulate
      ENDIF.
      PERFORM dynpro USING:
       'X' 'SAPDF05X'        '1102',
       ' ' 'BDC_OKCODE'       okcode.      " save or check
      IF p_test NE space.                  "exit from screen after check
        PERFORM dynpro USING:
         'X' 'SAPMF05A'        '0700',
         ' ' 'BDC_OKCODE'       '/15'.     "Save or check
        PERFORM dynpro USING:              "popup
         'X' 'SAPLSPO1'        '0200',
         ' ' 'BDC_CURSOR'      'SPOP-OPTION1'.       "choose yes
      ENDIF.
      CALL TRANSACTION 'F-32' USING bdcdata MODE u_mode UPDATE 'S'
                                            MESSAGES INTO messtab.
      PERFORM get_message TABLES messtab USING text 'CL'.
      IF text IS INITIAL.
        PERFORM batch_input USING 'F-32'.
      ENDIF.
    ENDFORM.                               " CLEARING
    Rob

  • How to use padding scheme FIPS81 in java plz help?

    Plz refer the below code using this code I m trying to decrypt XLS file using pass phrase.
    I m using the same pass phrase which was used @ the time of encryption.
    But the problem I m facing is that the file was encrypted in DOT NET_ using padding scheme FIPS81 and there impelmentation of FIPS81 is not available in JAVA so that it gives exception at the time of decryption which is given below
    Exception : javax.crypto.BadPaddingException: Given final block not properly padded
    I urgently need the solution of this problem so somebody plz help me to find the solution of this problem.....Ur reply would be appriciated.....!!
    The File is Encrypted using below mechanism
    ALGORITHM : AES
    MODE : ECB
    PADDING SCHEME : FIPS81
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.UnsupportedEncodingException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    public class DecryptTest {
         public static void main(String[] s){
              String passPhrase = "passphrase";
              String encFileName = "encsample.xls";
              String decFileName = "decsample.xls";
              FileInputStream encFileIn = null;
              FileOutputStream decFileOut = null;
              File f = null;
              byte[] message;
              try {
                   f = new File(encFileName);
                   encFileIn = new FileInputStream(f);
                   decFileOut = new FileOutputStream(decFileName);
                   message = new byte[encFileIn.available()]; //Read the encrypted file in from disk
                   encFileIn.read(message);
                   SecretKeySpec spec = new SecretKeySpec(passwordToKey (passPhrase), "AES");
                   //decrypt it
                   Cipher c = Cipher.getInstance("AES/ECB/NoPadding");
                   c.init(Cipher.DECRYPT_MODE, spec);
                   System.out.println("Block Size is >-->" + c.getBlockSize());
                   String decryptedString = new String(c.doFinal(message));
                   System.out.println("Decrypted message: " + decryptedString);
                   //To write into another files
                   decFileOut.write(decryptedString.getBytes());
              }catch (Exception e) {
                   System.out.println(e);
              }finally {
                   try {
                        encFileIn.close();
                        decFileOut.close();     
                   } catch (IOException ioe) {
         }Is there any mechanism is available for FIPS81 or Is there any third party Provider available for it plz reply........????????

    I suggest you look in google http://www.google.co.uk/search?q=SWF+java

  • Java Mail Project HELP Required....URGENT PLZ HELP!!!

    hello there!!
    i took up a pjct for my engineering on java mail..got the code..and i thought that ill analyse it...the code is submitting the mail to the smtp server but after dat its failing to deliver to the client..as i can see this error in the logs on SMTP server...can anyone help me out in analysing this code!!!
    plz help, exams are near...(am new to java)
    //java FINAL!
    import javax.swing.*;
    import java.net.URL;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class EmailProg extends JPanel implements ActionListener {
    protected JTextArea textArea;
    protected String newline = "\n";
    static final private String composemail = "compose";
    static final private String sendmail = "send";
    static final private String about = "about";
    static final private String submit = "submit";
    static final private String exit = "exit";
    JLabel lSubmit = new JLabel("Submit");
    JButton subbutton = new JButton();
    JTextArea emailfrom = new JTextArea(1,1);
    JTextArea emailto = new JTextArea(1, 1);
    JTextArea emailsubject = new JTextArea(1, 1);
    JTextArea emailmessage = new JTextArea(25, 1);
    //------BAG LAYOUT
    JLabel lFrom = new JLabel("From:");
    JTextField cFrom = new JTextField(32);
    JLabel lTo = new JLabel("To:");
    JTextField cTo = new JTextField(32);
    JFrame frame2 = new JFrame("Compose New");
    JLabel lSubject = new JLabel("Subject");
    JTextField cSubject = new JTextField(32);
    JLabel lMessage = new JLabel("Body");
    JTextArea cMessage = new JTextArea(5,32);
    //====================================
    public EmailProg() {
    super(new BorderLayout());
    //Create the toolbar.
    JToolBar toolBar = new JToolBar();
    addButtons(toolBar);
    //Create the text area used for output. Request
    //enough space for 5 rows and 30 columns.
    textArea = new JTextArea(5, 30);
    textArea.setEditable(false);
    textArea.setText("Welcome to Jeff's email program! With this program you can compose and send emails. I hope I get a good grade on thise, and marine world finds a good use for it :-D:-D (implements really just testing the scroller!!!)");
    JScrollPane scrollPane = new JScrollPane(textArea);
    //Lay out the main panel.
    setPreferredSize(new Dimension(450, 110));
    add(toolBar, BorderLayout.NORTH);
    add(scrollPane, BorderLayout.CENTER);
    //==================================
    protected void addButtons(JToolBar toolBar) {
    JButton button = null;
    //first button
    button = makeNavigationButton("/toolbarButtonGraphics/general/ComposeMail24.gif", composemail ,"Compose new Email", "compose new");
    toolBar.add(button);
    //second button
    button = makeNavigationButton("toolbarButtonGraphics/general/SendMail24.gif", sendmail,"Send The Mail","send");
    toolBar.add(button);
    //third button
    button = makeNavigationButton("toolbarButtonGraphics/general/About24.gif", about,"About","About");
    toolBar.add(button);
    //exit button
    button = makeNavigationButton("toolbarButtonGraphics/general/Stop24.gif", exit, "Exit", "Exit");
    toolBar.add(button);
    //===================================
    protected JButton makeNavigationButton(String imageName, String actionCommand, String toolTipText, String altText) {
    //Look for the image.
    String imgLocation = imageName;
    URL imageURL = EmailProg.class.getResource(imgLocation);
    //Create and initialize the button.
    JButton button = new JButton();
    button.setActionCommand(actionCommand);
    button.setToolTipText(toolTipText);
    button.addActionListener(this);
    if (imageURL != null) {                      //image found
    button.setIcon(new ImageIcon(imageURL));
    } else {                                     //no image found
    button.setText(altText);
    System.err.println("Resource not found: "+ imgLocation);
    return button;
    //=============================
    public void actionPerformed(ActionEvent e) {
    String cmd = e.getActionCommand();
    String description = null;
    // Handle each button.
    if (exit.equals(cmd)){
    textArea.setText("");
    description = "EXITING";
    System.exit(0);
    if (composemail.equals(cmd)) { //first button clicked
    textArea.setText("");
    description = "Write new mail.";
    composeWindow();
    } else if (sendmail.equals(cmd)) { // second button clicked
    textArea.setText("");
    description = "This button does'nt do anything yet :x";
    } else if (about.equals(cmd)) { // third button clicked
    textArea.setText("");
    description = "About this program. (See pop-up)";
    coolWindow();
    else if (submit.equals(cmd))
    if (cFrom.getText().equals("")||cTo.getText().equals("")||cSubject.getText().equals("")||cMessage.getText().equals(""))
    textArea.setText("One or more of the fields was not filled in.");
    else{
    try {
    String smtpServer="serverhere";
    String to=cTo.getText();
    String from=cFrom.getText();
    String subject=cSubject.getText();
    String body=cMessage.getText();
    send(smtpServer, to, from, subject, body);
    textArea.setText("");
    description = "Mail Sent.";
    JOptionPane.showMessageDialog(null, "Message Sent.");
    catch (Exception ex)
    System.out.println("Usage: java com.lotontech.mail.SimpleSender"
    +" smtpServer toAddress fromAddress subjectText bodyText");
    //CLOSE THE FRAME2 WINDOW IIIIIIIIFFFFFFF SENDING IS SUCCESSFUL!!
    }//end of else during send
    }//end of if of submit
    displayResult(description);
    //============================
    protected void displayResult(String actionDescription) {
    textArea.append(actionDescription + newline);
    //=============================
    public void coolWindow() {
    JFrame frame = new JFrame("About");
    JTextArea filecontents = new JTextArea();
    filecontents.setText("Use the tool bar to compose\n compose new emails, in which you can\n send to anyone on the\n srvhs email server. \n Fill in all the blanks before pressing send. If you dont\n you will receive an error! \n For more information about this program click on the\n information button.");
    frame.getContentPane().add(filecontents, BorderLayout.CENTER);
    frame.pack();
    frame.setResizable(false);
    frame.setSize(300,200);
    frame.setVisible(true);
    //===============================
    public void composeWindow() {
    frame2.getContentPane().setLayout(new GridBagLayout());
    frame2.setResizable(false);
    frame2.setSize(600,500);
    frame2.setVisible(true);
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.insets = new Insets(5, 10, 5, 10);
    cMessage.setLineWrap(true);
    subbutton = makeNavigationButton("toolbarButtonGraphics/general/SendMail24.gif", submit,"submit","submit");
    addRow(gbc, lFrom, cFrom);
    addRow(gbc, lTo, cTo);
    addRow(gbc, lSubject, cSubject);
    addRow(gbc, lMessage, cMessage);
    addRow(gbc, lSubmit, subbutton);
    //===============================
    private void addRow(GridBagConstraints gbc, Component left, Component right) {
    gbc.gridx = GridBagConstraints.RELATIVE;
    gbc.gridy = GridBagConstraints.RELATIVE;
    gbc.gridheight = 1;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.EAST;
    frame2.getContentPane().add(left, gbc);
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.anchor = GridBagConstraints.WEST;
    frame2.getContentPane().add(right, gbc);
    frame2.pack();
    //=======================
    public static void send(String smtpServer, String to, String from, String subject, String body) {
    try {
    Properties props = System.getProperties();
    props.put("localhost", smtpServer);
    Session session = Session.getDefaultInstance(props, null);
    System.out.println(smtpServer);
    // -- Create a new message --
    Message msg = new MimeMessage(session);
    // -- Set the FROM and TO fields --
    msg.setFrom(new InternetAddress(from));
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
    // -- We could include CC recipients too --
    // if (cc != null)
    // msg.setRecipients(Message.RecipientType.CC
    // ,InternetAddress.parse(cc, false));
    // -- Set the subject and body text --
    msg.setSubject(subject);
    msg.setText(body);
    // -- Set some other header information --
    msg.setHeader("X-Mailer", "LOTONtechEmail");
    msg.setSentDate(new Date());
    // -- Send the message --
    Transport.send(msg);
    System.out.println("Message sent OK.");
    catch (Exception ex)
    ex.printStackTrace();
    public static void main(String[] args) {
    JFrame frame = new JFrame("EmailProg");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    EmailProg newContentPane = new EmailProg();
    newContentPane.setOpaque(true);
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    }

    The code to retrieve the messages from SMTP
    finally all working fine...
    thanx guys!!!
    package EmailProg;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
      * A simple email receiver class.
    public class SimpleReceiver
        * Main method to receive messages from the mail server specified
        * as command line arguments.
      public static void main(String args[])
        try
          String popServer=args[0];
          String popUser=args[1];
          String popPassword=args[2];
          receive(popServer, popUser, popPassword);
        catch (Exception ex)
          System.out.println("Usage: java com.mail.SimpleReceiver" +" popServer popUser popPassword");
        System.exit(0);
         * "receive" method to fetch messages and process them.
       public static void receive(String popServer, String popUser, String popPassword)
         Store store=null;
         Folder folder=null;
         try
           // -- Get hold of the default session --
           Properties props = System.getProperties();
           Session session = Session.getDefaultInstance(props, null);
           // -- Get hold of a POP3 message store, and connect to it --
           store = session.getStore("pop3");
           store.connect(popServer, popUser, popPassword);
           // -- Try to get hold of the default folder --
           folder = store.getDefaultFolder();
           if (folder == null) throw new Exception("No default folder");
           // -- ...and its INBOX --
           folder = folder.getFolder("INBOX");
           if (folder == null) throw new Exception("No POP3 INBOX");
           // -- Open the folder for read only --
           folder.open(Folder.READ_ONLY);
           // -- Get the message wrappers and process them --
           Message[] msgs = folder.getMessages();
           for (int msgNum = 0; msgNum < msgs.length; msgNum++)
             System.out.println(msgs[msgNum]);
         catch (Exception ex)
           ex.printStackTrace();
         finally
           // -- Close down nicely --
           try
             if (folder!=null) folder.close(false);
             if (store!=null) store.close();
           catch (Exception ex2) {ex2.printStackTrace();
      }

  • FlashPlayer suddenly turns black screen, urgent plz help

    I am a game developer. my game work fine for two months. but recently some player told me that when in playing games flashplayer suddenly turns black screen. when i using flashplayer debug. it didn't throw any excepetion or error. and when i right click in flashplayer content. the menu show 2 opptions. do not load movie and flashplayer verison is 11.6.602.180...
    many many player told me about this. and my game is still running for all the player. so plz help, verry urgent, thx

    If they are on Windows, they may need to update their display adapter drivers; see http://forums.adobe.com/thread/945765

  • Urgent plz help me......plz

    Am very nem to jsp.
    am doing my final year project in jsp.
    I want to retreive value in the textbox depending on the selectino made in the dropdown.
    in the dropdown menu i retrieve employee id frm backend. n in the textbox i shuld get employee name depending on the selection made in the dropdown list. that is data in the textbox shuld change depending on the selectin made in dropdown.
    here is my code which i tired but in the textbox the value is alwys remaning the last record value n it is not changing depending on slectino made in dropdwon list
    <%@ page import="java.util.*" %>
    <%@ page language="java" %>
    <%@ page import="java.sql.*" %>
    <HTML>
    FAQ
    Category choice
    <FORM ACTION="selection.jsp" METHOD="POST">
    <%
    String nameselection = null;%>
    <SELECT NAME="Category" id= Category >
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn=DriverManager.getConnection("jdbc:odbc:man","scott","tiger");
    Statement statement = conn.createStatement();
    ResultSet rs = statement.executeQuery("SELECT DISTinCT empid FROM employee" );%>
    <OPTION VALUE='nochoice'>Please choose a category</OPTION>";
    <%while(rs.next()) {
    nameselection = rs.getString("empid");%>
    <OPTION value ="optcategory"><%out.println(nameselection);%>
    </OPTION>
    <% } %>
    </SELECT>
    Question selection
    <%
    String password = null;%>
    <%ResultSet m1 = statement.executeQuery("SELECT * FROM employee WHERE empid = ( '" + nameselection + "')");
    String mm1;
    while(m1.next()){%>
    <input type =text name=mm value="<%= m1.getString(2) %>">
    <%}%>
    </FORM>
    </HTML>
    plz help me....
    am very new to it.
    Thanx in advance

    hi manisha
    good try & sorry for late reply
    To say the truth i'm too new to jsp
    i'll give u my code see it for reference.. if u have any doubts in that pls don't forget to ask me
    function display()
      var index=document.form1.drug.value;
      document.form1.hid.value=index;
      form1.submit();
    function refresh()
         var indexOfcombobox = document.form1.drughid.value;
         sel = document.form1.drug;
         for (i=0; i<sel.options.length; i++) {
              if (sel.options.text ==indexOfcombobox ) {
                   sel.selectedIndex = i;
    <form name="form1" method="post" action="">
    <body onload="refresh() ">
    <select name="drug" id="drug" value="hid" onChange="display()">
    <option value="" selected> </option>
    <%
    while(rs.next())
    %>
    <OPTION VALUE="<%=rs.getString("DrugName")%>"><%=rs.getString("DrugName") %></OPTION>
    <%
    %>
    </select>
    <input type="hidden" name="hid">
    </div></td>
    </tr>
    <tr>
    <td>NDC code #</td>
    <td>
    <%
    //query for selecting the values from the database
    String sql1 = "SELECT ProductCode,DrugName,Dosageform from ProductMaster where DrugName='"+request.getParameter("hid")+"' ";
    rs=stm.executeQuery(sql1);
    %>
    <% while (rs.next())
    String val1=rs.getString("ProductCode");
    String val2=rs.getString("DrugName");
    String val3=rs.getString("Dosageform");
    out.println (val1 +"</td>");
    out.println ("<input type=hidden name=ndc value='" + val1 + "'>");
    out.println ("<input type=hidden name=drughid value='" + val2 + "'>");
    out.println("<td>Dosageform    :     "+val3);
    }Regards
    kalai                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Urgent Plz Help

    hi
    actually my problem is that i have to print the page which is not in the brouser
    i,e a html page which cannnot be viewed but has to printed.
    normlly a page opened in any brouser can be given to the printer but how to give the unseen page to a printer .I dont know if it can be done through java but if it can it has to be done using jdk1.3.
    plz help me in this..

    First of all , Wrong forum!! This is a client side issue(unless you are trying to print the page in a server side printer). Anyway, to print in client side put the unseenable data in a hidden frame and use javascript window.print(). If you are using DHTML enabled browser(IE 5+) , you will be able to use CSS to specify alternate document for printing <link rel=alternate media=print href="printversion.doc"> .See http://www.pageresource.com/dhtml/d_a_01.htm

  • Maitaining of AP Datasource (Urgent) plz help ...

    hi Edwin ,
    This is prakash,
    My requirement is to design the Account Payables (line item) cube for that one i am using business content datasource is 0FIAP_3 this is the line item details ,in intial stage i want to add the some more fields like (allocation number,business area,material,purchase order date) these fields are not avilable for predefined structure.i want these fields  also so, how can i add the fields ? ,is it going to enhancement or to add the extract structure  ?
    iam confusued so plz help me
    advanced thanks
    prakash
    Message was edited by:
            Prakash V
    Message was edited by:
            Prakash V

    Hi,
    Follow the information given in the below help;
    http://help.sap.com/saphelp_bw32/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm
    That means if the required field is available either in BSIK or in BSAK, then just add the field to CI_BSIK and no code in CMOD.
    With rgds,
    Anil Kumar Sharma .P

  • Urgent plz help in currency conversions

    hi to all
             wrbtr = sum of dmbtr
    wrbtr = document currency
    dmbtr = local currency
    how can i match these
    there is any function module to convert one to other.
    plz help me in this issue
    take example wrbtr = 20,000
    sum of dmbtr =200
    i am not understanding does i should use a fm or some other to make
    wrbtr = sum of dmbtr
    does the local currency and document currencies r same.
    plz helpme
    Message was edited by: kranthi reddy

    Hi,
      Local currency & document currencies need not be same, and that is the reason function modules are used ( Convert_to_local_currency & Convert_to_foreign_currency ) to convert the amount either to your Local or to Document currency, if they are same there is no need for conversions,
      Can you elaborate on your query related to summing up the values as it is not clear,
    Rgds,

  • Flashing question mark folder on start up, macbook pro. plz help

    Hey folks,
    I know there are threads on this but since I am using my blackberry to write this message I am unable to search the forum.
    Ok. So that's what my macbook pro is doing and its also not letting insert a cd or dvd in the superdrive, seems like it just jammed up. However when I press T on the start up it brings me into a firewire mode? How can I fix my start up issue?
    Secondly I hear the left side of my macbook pro (I think that's where the hard drive is) while the computer starts up I hear it sipping and the noise it makes is like a scratching noise.
    And finaly no idea as to why its over heating?
    Plz help.
    -Joey

    generally, the flashing folder mark means it can not find the startup drive.
    if you hear those kind of noises your hard drive is most likely dead. while this is almost certainly true you can try booting from the install DVD and see if the drive is visible in disk utility. if you can't insert the DVD try this. reboot and hold option at the chime. this should boot you into startup drive manager. there you should be able to insert the DVd and choose it as the startup drive. boot from the DVd and once past the language screen start disk utility from the Utilities menu at the top. see if it detects the internal drive. if it does, try repairing it. if it doesn't the drive is dead.

Maybe you are looking for