Geting response on same JSP page

hi everybody
i want to select an item from dropdown box and want to display
all data related with this selected item on same jsp page
plz help me out
thx in advance

hi friends
i am a newbie to java, i have some problem, can any one help me out?
my form has few entries like
USERNAME(text field),
PASSWORD(text field),
COUNTRY(select field - drop down list box),
STATE (select field -drop down list box) n so on
i have successfully populated countries list in the drop down list box taken from database dynamically using jsp
"HERE COME THE COUNTRY CODE"
<select size="1" name="country">
<option selected value="Select">Select</option>
<%
while(rscoun.next())
     String coun=rscoun.getString(1);
     %>
     <option value ="<%=coun%>"><%=coun%></option>
     <%
     } %>
</select>
now when the user selects the country (say INDIA) , states list should be populated dynamically depending on the user selection
and all this should happen on the same page
please let me know how to achieve this , i need the help badly
thanks inadvance
kind regards
suman

Similar Messages

  • Regarding incorporate the two page nations in the same JSP page

    Hi folks,
    i am unable to do two page nations in the same JSP page using paging tag libray,I am getting the follwoing problem while setting the offset value to the Pager.offset.
    I have written the code like this.
    <pg:pager items="<%=size%>" export="sreenyOffset=offset, currentPageNumber=pageNumber;" isOffset="true" scope="request">
         <pg:index export="totalItems=itemCount">
         <% System.out.println("Before currentPageNumber:"+currentPageNumber); %>
         <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" nowrap>
              <tr class="pagenation" >
                   <td width="1%">&nbsp<br><br></td>
                   <td width="40%" align="left"> 
                        <pg:page export="firstItem, lastItem">Displaying results <strong><%= firstItem %>-<%= lastItem %></strong> of <strong><%=      totalItems %></strong> found</pg:page></td>
                             <td width=20%></td>
                        <pg:prev export="pageUrl,firstItem" >
                             <td width="5%" align="right" height="22">
                             <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><b>Previous</b></a></td>
                        </pg:prev>
                        <pg:pages export="pageUrl,firstItem,pageNumber">
                        <%
                             System.out.println("pageNumber :"+pageNumber+"^currentPageNumber:"+currentPageNumber);
                        %>
                             <% if (pageNumber == currentPageNumber) { %>
                                       <td width="2%" align="right" height="22"><font color=#FFFFFF><%= pageNumber %></font></td>
                             <% } else { %>
                             <td width="2%" align="right" height="22">
                                       <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><font color=#415481> <%= pageNumber %> <font></a>
                   </td>
                        <% } %>
                        </pg:pages>
                        <pg:next export="pageUrl,firstItem" ifnull="<%= true %>">
                             <% if (pageUrl != null) { %>
                   <td width="5%" align="right" height="22">
                        <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><b>Next</b></a></td>
                        <% } %>
                        </pg:next>
              </tr>
         </table>
         </pg:index>
              <html:hidden property="offset" value="0"/>
              <html:hidden property="pager.sreenyOffset" value="0"/>
    </pg:pager>
    I need some clarification for following things.
    1)i have given the export like this
    export="sreenyOffset=offset, currentPageNumber=pageNumber;"
         but while setting the offest for pager, i am doing like this
                   <html:hidden property="pager.sreenyOffset" value="0"/>
         can i customize the pager.offset to pager.(someting) like that.
    2)if i use pager.offset for two page nations in the same page pager.offset value is overriding,So i am unable to maintian the page nations.
    3)i can change the offset value into sreenyoffset in the export property of pager tag,if iam able to change the pager.offset value to customized value my problem will solve.
    4)
    can i declare the export property like this.
    <pg:pager items="<%=size%>" export="sreenyOffset=offset, currentPageNumber=pageNumber;" isOffset="true" scope="request">
    Please give me your valuable suggestions,it will be very helpful to me.
    Also give me some suggestions how to do the two page nations in the same page.I am desperately waiting for response.
    Thanks & Regards,
    Sreeny Reddy.

    Hi,
    I was trying the pagination concept in jsp. I am getting a lot of errors. Can u help me for displaying this pagination.i need to display dynamic records according to search criteria. In search criteria, an area is selected and the data related to that area should be displayed from a table in mysql . It has 100+ records each
    with 6 columns, each page should be displaying 10 records, what we call pagination. I was trying this(in java jsp)( should not do in struts, should be done only in jsp) for a long time. By ur faq, i understood u hava already done it. Pls try to help me. Can u pls send me a sample program regarding this?
    I would be very grateful if u help me.
    thanks in advance,
    regards,
    mv.

  • Two managed beans in same jsp page

    Hello
    First this could be a stupid question, but i just can't find a solutions on this problem.
    I wondering that could it be a two managed beans in same jsp page, here is a example:
    index.jsp
    <t:commandLink disabled="#{listBean.currentPage == 1}" id="previous2" type="button" immediate="true" style="font-size:small" action="#{listBean.previousPage}">
    <h:outputText value="Edellinen" id="prev"/>
    </t:commandLink>
    <t:commandLink disabled="#{listBean.currentPage == listBean.totalPages}" id="next2" type="button" immediate="true" style="font-size:small;" action="#{listBean.nextPage}">
    <h:outputText value="Seuraava" id="next"/>
    </t:commandLink>
    then i have a dataTable like this:
    <t:dataTable value="#{customerListBean.customerBeans}"
    binding="#{customerListBean.dataTable}" preserveDataModel="true" style="text-align:left">
    My problem is that when i push a commandLink it doesn't refresh a dataTable. Does anyone know a solution here or is this just a impossible way to do it?
    Thanks for help.

    when i push nextPage (commandLink) it's call action
    and count a new range of dataset and after that it's
    calls a method which is declared on subClass and that
    method get a new data of database on given params.
    and put it on DataTable.
    So listBean is upper class and customerListBean
    extends on ListBeanNo, it doesn't work that way as you expected. You have created two independent instances. They doesn't communicate automatically with each other or so. Just use one CustomerListBean instance and call the inherited methods of ListBean on the #{customerListBean} managed bean instance.

  • Error while trying to open the same JSP page.

    Hi partners,
    After solving some issues with JSP deployment, we are getting another error message.
    This is when we try to open the same JSP page at the same time.
    500 Internal Server Error
    javax.servlet.jsp.JspException: oracle.express.idl.util.OlapiException: ORA-22275: invalid LOB locator specified at oracle.dss.addins.jspTags.PresentationTag.doStartTag(PresentationTag.java:194) at Principal.jspService(_Principal.java:68) [SRC:/Principal.jsp:6] at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:513)
    I mean this is a concurrency problem.
    Any information about this will be really appreciated.
    Best regards!!!!!
    Francisco Mtz.

    After running the BI_Checkconfig tool I got an inconsistent OLAP API Metadata
    result, it was because a partner was modifying the OLAP metadata without saving
    the changes.
    After saving the changes in the OLAP metadata, I ran the BI_Checkconfig tool
    again with success (no metadata errors).
    Now the pages are displayed without any error message.
    Best regards!!!!
    Francisco Mtz.

  • How update the info on same Jsp page

    i have a Jsp page.on left side of this page having menu bar. in this menu bar having links of some colleges.
    i want when i click on link of first college name, same page should be updaed with updated menu bar where i can show the information of the concerning college.
    please focus on this.

    I have two Jsp pages named bestschool.jsp and schoolnames.jsp.
    I am calling schoolnames.jsp from bestschool.jsp.
    I want when I click the link on INDUS School. It can show all concerning link of INDUS School links like profile, result, facility etc. in the same place instead of other naming school links.
    my requiremet main is i want to update the information on same Jsp page.
    How can I implement this with in Servlets/Jsp.
    Please review below JSP’s files
    schoolnames.jsp
    <table width="200" border="0" align="center" cellpadding="5">
    <tr>
    <td height="100" bgcolor="#476bc0">
    <div align="center" class="boldhead"><font size="+1">
    School list</font></div>
    </td>
    <tr>
    <td height="30" bgcolor="#5577C6">
    <a href="" class="smalltext">INDUS School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">Vaise School</a>
    </td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.G.V School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.P.S School </a></td>
    </tr>bestschool.jsp
    <html>
    <head>
    <title>Best school</title>
    <link href="mystyle.css" rel"stylesheet" type="text/css">
    </head>
    <body>
    <div align="center"><font size="+2">
    Best Schools in Rohtak</font>
    </div>
    <table width="700" height="500" border="0" align="left"
    cellspacing="0">
    <td width="200" rowspan="2" valign="top">
    <%@ include file="schoolnames.jsp" %>
    </td>
    <td height="328" bgcolor="#476BC0" valign="top">
    <p> </p><p> </p><p> </p>
    </html>please suggest.

  • More than one business component (views) in the same JSP page

    Hi, I am trying to have more than one business component (views) in the same JSP page as Input Form.
    For example:
    There are two BC4J:
    Person:
    Code.
    Name.
    Address:
         Person_code
         Street.
         City.
    There is a master detail relationship between them and there is a link between both views in the application module.
    I want to create a JSP page with an Input form for both views. When the user decides to create a Person, I need to insert in both tables.
    Insert code and name into Person table.
    Insert Person_code, Street and City into Address table.
    It is possible to do in Forms but I am not sure if I can be able to do this in JDeveloper 10G.
    Thanks

    Sorry I lost the tabs
    Person has two attributes Code and Name.
    Address has three attributes Person_coden Street, City.

  • Dynamicaly populating textbox in same same jsp page

    hi,
    i have a list box like
    <select name="ss">
    <option value="1">one
    <option value="2">two
    <option value="3">three
    </select>
    if i select "one" from list box than two text should be populated in same jsp page.
    please tell me how to achive this.

    It isn't a disturbance, it just looked different then what it is.
    My favorite way of doing this is to create the three text boxes, but hide two of them (and disable them). Then use the javascript function to show and enable them... like this:
    <html>
    <head>
    <script type="text/javascript">
      function showBoxes() {
        selectElem = document.getElementById("ss");
        selectedValue = selectElem.options[selectElem.selectedIndex].value;
        text2 = document.getElementById("text2");
        text3 = document.getElementById("text3");
        if (selectedValue==1) {
          text2.style.display = "none";
          text2.disabled = "disabled";
          text3.style.display = "none";
          text3.disabled = "disabled";
        if (selectedValue==2) {
          text2.style.display = "inline";
          text2.disabled = null;
          text3.style.display = "none";
          text3.disabled = "disabled";
        if (selectedValue==3) {
          text2.style.display = "inline";
          text2.disabled = null;
          text3.style.display = "inline";
          text3.disabled = null;
    </script>
    </head>
    <body>
    <form>
    <select name="ss" id="ss" onchange="showBoxes();">
      <option value="1" selected="selected">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
    </select><br/>
    <input type="text" name="text1" id="text1" style="display:inline;"/>
    <input type="text" name="text2" id="text2" style="display:none;" disabled="disabled"/>
    <input type="text" name="text3" id="text3" style="display:none;" disabled="disabled"/><br/>
    <input type="submit"/>
    </form>
    </body>
    </html>

  • I want to post the values of the form in the same Jsp Page

    I want to post the values of the form in the same Jsp page.

    Was that a question? Or are you just informing the world of your grand intentions?
    But yeah, all you need to do is direct your action to the same page you're in. So, if this is your foo.jsp, it'd be something like...
    <%
    if(request.getParameter("bar") != null) out.println("Hello");
    %>
    <form method="post" action="foo.jsp">
       <input type="text" name="bar" value="baz">
       <input type="submit">
    </form>When you submitted your form, it would post the value to the same JSP page as you're already in, and print out Hello to the screen. "Hello" would not print out on the first visit, as the request would obviously not contain the parameter "bar" yet.

  • I want to display many records in the same jsp page

    Hi,
    i want to display many records with in the same jsp page providing the next,previous,first last .
    give me clear idea how to do that one
    note :only using servlets,jsp,jdbc and javascript

    I believe that this is the fourth time this question has been asked by the same person
    http://forum.java.sun.com/thread.jspa?threadID=720977&messageID=4159465#4159465
    http://forum.java.sun.com/thread.jspa?threadID=720945&messageID=4159338#4159338
    http://forum.java.sun.com/thread.jspa?threadID=720919&tstart=0

  • Slow response time for JSP pages under iAS 6.0 SP4

    Hi,
    I got an application deployed on iplanet app server 6.0 SP4 on solaris
    2.8. Using a single kjs engine and lite sessions. kjs memory size is
    min 256 and max 256 megs. but verbose:gc shows memory is 98% free.
    when i restart the app server, all JSP pages are really rendered fast.
    After a while (1 or 2 days), the time to service the same request to
    JSP pages is getting much longer (even with JSP pages having only
    static content in them). CPU is idle ... It just takes time. KXS log
    shows requet is taking like 2-4 seconds instead of about 150 milli
    secs when the engine is just restarted.
    Now if i call a servlet (which do not dispath to a JSP), the response
    time is ok! Memory is ok. It looks like its related to JSP pages
    only.
    Anyone having an idea what the problem could be? One conig param is
    the JSP page cache in iASAT. Default value is 10. What is a correct
    setting for production? I have 4 different web app deployed in the
    same server instance.
    Tanks a lot for your input
    Andre Paradis

    Andre,
    I have found the answer to my problem and perhaps yours. It seems that I18N (internationalization) in SP4 may have a performance bug in it.
    My soak tests show that with i18N checked in the iAS Admin Tool, testing the fortune cookie sample application with light load (1 request / sec) resulted in a kxs response time initially of 15ms, however this response time increased by roughly 1% per request (i.e after 100 requests the response time had more than doubled).
    Switching I18N off yielded a steady 7ms kxs response time from the fortune cookie application.
    I would add that I turned I18N on AFTER the installation procedure.
    Is this a known issue in SP4? Is there a patch?
    regards,
    Owen

  • Two buttons in same jsp page

    hello to java people
    My ? is, jsp page named as login.jsp, In this page i want to use two buttons.
    If i click on one buton it will goto sucess.jsp and for another button it will go to find.jsp.
    i.e, two actions in same page, is it possible ?
    help me by giving sample code.
    thanks

    thanks balu for ur answer.
    pure java ?
    But my doubt is see we take one form
    <form action="sucess.jsp">
    <input text...>
    <input text...>
    <input type=submit name=sucess>
    <input type=submit name=find>
    </form>
    means whether i take two buttons as submit and names r diff..
    but at top only one action is there .
    how can they know to which page it has to go?
    do u understand my ?
    can u please give some sample code so that i can understand
    thanks

  • Multi user concept of same jsp page

    i have a problem i the jsp page used when there are multi users for the same page.....example when 2 users login at the same time..the id for the second user is same as the first one is displayed but his original id..what can be done for this..please help me out as soon as possible its very urgent

    Your posting is a little hard to understand...but if I am guessing your problem is that you have two users whose data is being shown to the other user... the problem could be either of the following:
    1. If you used a bean to hold the data, your scope for the bean is set incorrectly...you may have it at "Application" when it should have been "Session".
    2. If you used a JSP variable to hold the value, you declared it as static by using <! String x = "myString"; />
    Good luck.

  • How to load the same jsp page and set user id to 0 when checkbox is selecte

    I hope this question isn't too amateurish to answer, but it is something that has been troubling me.
    I have a jsp page page that display information about a user and has the userID passed in the link. So something like user.jsp?userID=12 for example.
    On the same page I have a form with a checkbox, and a submit button, the html code is as follows:
    <form name="form1" method="get" action="user.jsp">
    <p><input name="userID" id="userID" type="checkbox" value="0"></p>
    <p><input name="Submit" type="submit" value="Submit"></p>
    </form> What I want to do is, if a user ticks the checkbox and presses Submit, I want to load the same page again, but
    set the userID to zero and so the top url has the following: user.jsp?userID=0
    How can I achieve this.
    Thanks for all the help
    Zub

    actually I need a check code which on submit checks if the checkbox is ticked then set the value of UserID to zero. so when I press submit and before the page loads to simply does a check if its ticked? I can write the if statment but I do not know what how to check if the checkbox is ticked and were to include the code

  • Two Identical forms on the same JSP page.???

    Hi want to have two identical submit forms on the same form but for some reason a get a javascript error when i add the second form to the JSP page... can you help me...

    I assume you meant "two identical submit buttons", instead of "two identical submit forms". Seeing your description of the problem, I believe you can reproduce it with a pure .html page, that is, a page containing not JSP code. So it is not a problem in JSP domain proper.
    I was going to direct you to the Technologies>>Internet>>Dynamic Services forum at
    http://forums.oracle.com/forums/thread.jsp?forum=95
    Then I found you have posted the same question as thread 298169 there.

  • Linking between two IFRAME tags on the same JSP page

    I have a JSP (lets call it �PAGE_A.jsp�) that contains a table� the <TD> tags hold IFRAME tags with an initial �src� referencing a �blank.jsp��

    <!-- Report View Table-->
    <table width="100%">
    <tr>
    <td>
    <iframe id='report_view' name="report_view" width='60%' height="500" frameborder="0" src='blank.jsp'>
    </td>
    <td align="left">
    <iframe id='drilldown_view' name="drilldown_view" width='40%' height="500" frameborder="0" src='blank.jsp'>
    </td>
    </tr>
    </table>

    At a point, the user initiates a call to a servlet, and the output (PAGE_B.jsp) is returned to the first IFRAME �report_view�.
    PAGE_B.jsp contains HTML anchor tags that call the servlet again, this time the return target is the second IFRAME �drilldown_view� :
    ( Some Text).
    Clicking the link produces the desired page to be generated and displayed in the correct IFRAME running IE 5.5, however, the same code under NETSCAPE 7.x causes the �linked� page to open in a new browser window.
    I have deduced that this effect may be due to the NETSCAPE browser �thinking� that the targeted IFRAME (�drilldown_view�) should be a �child� of the IFRAME that contains the link (�report_view�), instead of another IFRAME belonging to PAGE_A.jsp. Under this circumstance, NETSCAPE cannot find the �target�, and thus redirects to a new browser window.
    Q: Is there a way to specify the �parent� of the �iframe� in the anchor�s �target� attribute?

    target in a link shouldn't care, as long as the IFRAME is in the same window... It should be able to find it.
    Otherwise, you could explore using Javascript to get a reference to the object by specifying the path:
    var oIFrame = top.document.getElementById('drilldown_view');
    oIFrame.src = 'somepage.html';
    that could work.. I've used that type of thing before.

Maybe you are looking for