How to get the query values from the url in a servlet and pass them to jsp

ok..this is the situation...
all applications are routed through a login page...
so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

ok..this is the situation...Sounds like you have a bad design on your hands.
You're going to send passwords in a GET request as clear text? Nice security there.
Why not start with basic security and work your way up?
%

Similar Messages

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • How to get updated table values from objectlistdataproviders

    how to get updated table values from objectlistdataproviders

    Hi,
    Here is a sample code
    start-of-selection.
    *Select the data you need into an internal table
      loop at it_mara into wa_mara.
    data that needs to be displayed in the output list
        write:/ box as checkbox,
                wa_mara-matnr under text-001,
                wa_mara-maktx under text-002,
                wa_mara-lgort under text-003.
    Hide the data that needs to moved to internal table
        hide:wa_mara-matnr, wa_mara-maktx, wa_mara-lgort.
      endloop.
      clear wa_mara.
    end-of-selection.
      lines = sy-linno.
    at line-selection.
      clear:it_matnr. 
      do lines times.
        check sy-index > 1.
        box = space.
        read line sy-index field value box.
        if box = 'X'.
    *data selected using check box is moved to internal table
          append wa_mara to it_matnr.
        endif.
      enddo.
    Regards,
    Jisha.

  • Accessing the email value from the iPhone AddressBook

    Need some help getting the email value from the AddressBook. This is what I have so far ...
    Used to open up the picker and limit to email only
    -(void) browseButtonPressed:(id)sender
    ABPeoplePickerNavigationController* controller = [[ABPeoplePickerNavigationController alloc] init];
    controller.peoplePickerDelegate = self;
    NSNumber* emailProp = [NSNumber numberWithInt:kABPersonEmailProperty];
    controller.displayedProperties = [NSArray arrayWithObject:emailProp];
    controller.navigationBar.tintColor = [UIColor blackColor];
    [self presentModalViewController:controller animated:YES];
    The delegate method in the same class
    - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
    shouldContinueAfterSelectingPerson:(ABRecordRef)person
    property:(ABPropertyID)property
    identifier:(ABMultiValueIdentifier)identifier
    NSString *email = (NSString *)ABRecordCopyValue(person, kABPersonEmailProperty);
    NSLog(@"selected person: %@", email);
    [[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
    return NO;
    The NSLog prints the following ...
    selected person: <NSCFType: 0x1d81c0>
    Any idea why it's not printing a string rather I am getting NSCFType ?

    Great Post. One of the few times that I was able to come to a conclusion about the code I need. Here is an example of the delegate method in reference to getting the email address.
    - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
    ABMultiValueRef emails = ABRecordCopyValue(person, property);
    CFStringRef email = ABMultiValueCopyValueAtIndex(emails, identifier);
    NSLog( (NSString *) email);
    self.receiverEmail.text = (NSString *) email;
    [self.tabBarController dismissModalViewControllerAnimated:YES];
    return NO;
    }

  • Book out the Consumption value from the planned consumption

    Hello everybody,
    i am going to develope a consumption report, is there a BABI or Something Like This that  available to book out the Consumption value from the planned consumption? (to unplanned consumption)
    Thanks
    Best regards.
    DANI.

    I am currently working on a SQVI report just a prototype prior to having the programmer create an ABAP report. The trouble I am having is truly understanding how SAP tabulates the consumption. We are putting significant effort into this report and will let you know the results.

  • "An error occurred while attempting to retrieve the KPI value from the list"

    Hi all.
    when I used KPI, this error occured:
    An error occurred while attempting to retrieve the KPI value from the list
    what happened?
    any suggestion.
    thanks.

    Hello,
    Unfortunatly, I don't have the option to re-create my SP list.  I have created my KPI list in the same site as the targeted list.  I have made all items available in the list view, I've tried several different list views, I still get the
    An error occurred while attempting to retrieve the KPI value from the list.
    message. 
    I am at a loss here, I've search the internet high a low and haven't found any helpful info. 
    In MOSS 2007 I've created a list with about 24 columns.  I need a KPI based on one of the columns.  I've tried to creat a view with that one column, I've tried to creat a view with all columns
    and make it the defualt column...  I don't know what else to try here.
    Any help would be very appriciated!
    Cheers,
    ~Bryan

  • Retrieving  the score value from the captivate into flash

    Hi,
    We have used Captive 2 to built course & publishing it as
    a non e-learning output
    and loading the published swf file in custom built flash
    movie (wrapper).
    We have accessed some of the captivate variables to control
    the captivate swf.
    Does anyone know how to retrieve the score value from the
    captivate into flash ?
    Thanks
    Regards
    Chetan

    Hello,
    Use the Object Browser in .NET and search on "Summaryinfo" and you'll find the API to use.
    Thank you
    Don

  • How to get the selected values from the shuttle

    Hi
    Please tell me how to get the selected option values from the shuttle leading list.
    Thanks

    you can also obtain the option values present in the leading and trailing lists using the
    following methods:
    public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)
    public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
    order in which they appear in the list:
    String[] trailingItems =
    shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • Getting a field value from the first page on the second page in HTML

    I have a 2 page form I'm presenting in HTML to the user. The first page they select an action, enter a USERID and click the next page button. (The button executes "xfa.host.pageDown();" on the click action at the server)
    On the initialize of the second page I try to get the value of the USERID field from the first page and create a SQL statement to open my data connection. The issue I have is that I cannot get the value of the USERID field. This code works cause if I hardcode a valid value the query works. I tried to work around this by putting the same field on page 2, but it still did not work but the field was populated with displayed. I only assume the data is not populated at the time the initialize is invoked.
    Here is my code on the initialize..
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").commandType = "text"
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").select.nodes.item(0).value = "Select * from TABLE where userid = '" + xfa.form.resolveNode("form1.Page1.txt_EmployeeLogin").rawValue + "'"
    xfa.sourceSet.DataConnetion.open()
    Any help is greatly appreciated.
    THANKS!!

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • Need to get the selected values from the selectManyShuttle

    Hi,
    I am using ADF11g newer version.
    I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
    I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    Any sample code or link is really appreicated.
    Thanks

    Thanks for the reply.
    I am using a View Object and I dropped it as SelectManyShuttle
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2"
    valueChangeListener="#{POBacking.getSelectedValues}"
    valuePassThru="true"
    autoSubmit="true">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
    System.out.println("Testing Shuttle");
    ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    String val = "";
    String sqlStmt = "";
    try {
    if (list != null) {
    for (int i = 0; i < list.size(); i++) {
    int l = list.size() - 1;
    val = list.get(l).toString(); //returns , delimited string
    System.out.println(" value:" + val);
    if (val != null) {
    val = val.replaceAll("[\\[\\]]", ""); //remove []
    StringTokenizer st = new StringTokenizer(val, ",");
    int nto = st.countTokens();
    for (int j = 0; j < nto; j++) {
    String users = st.nextToken().trim();
    System.out.println("Users:" + users);
    //sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
    // " where project_id = "+rHdr.getAttribute("ProjectId") +
    // " and clip_name ='"+ clip_Name +"'";
    //System.out.println("sqlStmt:" + sqlStmt);
    //stmt.executeUpdate(sqlStmt);
    //am.getDBTransaction().commit();
    //if (stmt != null)
    // stmt.close();
    // am.getDBTransaction().commit();
    } catch (Exception ex) {
    ex.printStackTrace();
    I don't see the values in the list.
    I gets printed as
    value:[Ljava.lang.Integer;@1b10691
    Users:Ljava.lang.Integer;@1b10691
    how to get the individual values in the list?
    Thanks
    Saru

  • How to read the Key value from the Message using the text value.. Urgent

    I need to read the Key valuefrom the message pool using the text value for the Key.. Is it possible.. Please help me with sample code..
    Thanks and Regards
    Avijit

    Avijit,
    I got your requirement. I really dont know the scenario your working on but its possible to do it. There is no direct way to do so, but complexity is in getting to know the Keys dynamically from interface.
    Here you go..
         try
              Class msgClass      = IMessageTestWDApps.class;
    //Replace IMessageTestWDApps with IMessage<Your WD Component name>
              Field keys[]      = msgClass.getFields();
              IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
              if(keys != null)
                   String key = "";
                   for(int index=0;index<keys.length;index++)
                        key = keys[index].getName();
                        wdComponentAPI.getMessageManager().reportSuccess("Key= "+key);
                        if(textAccessor.getText(key).equals("My message text"))
                             //your logic.
         catch(Exception cnfe)
              wdComponentAPI.getMessageManager().reportException("Exe "+cnfe.getMessage(),false);
    Regards
    Abhilash
    Message was edited by:
            Abhilash Gampa

Maybe you are looking for