Any way to fetch username in a custom JSP page?

Hi,
Wondering if there's a way to fetch the username from Oracle in a JSP page for customizing online training. I'd like to use the username to generate a PDF with the user's name, and I'd like to do it without making them enter it.
Thanks,
B

Thanq sir,I'm really delighted with ur reply...but i need little more concern from u towards me...here i present my code...and suggest me how could i modify it for displaying 10 records per page
<%@page import="java.io.*,java.sql.*"%>
<%! String name;
Connection con;
String enamefromtable;
String basic_pay;%>
<%
name=request.getParameter("nametosearch");
con=PMS.DbConnection().getConnection();
Statement  s=con.createStatement();
ResultSet rs=s.executeQuery("select ename,basic_pay from pms where ename like ' "+name+" %' ");
%>
<table width="176" height="163" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="" style=" border:1px solid ; border-collapse:collapse">
  <tr bordercolor="" bgcolor="#CCCCCC">
    <td width="82" height="35" style=" border:1px solid  ; border-collapse:collapse" border="0"><div align="center"><font color="#000000"><strong><em>Ename</em></strong></font></div></td>
    <td width="73" style=" border:1px solid  ; border-collapse:collapse" border="0"><em><font color="#000000"><strong>basicpay</strong></font></em></td>
  </tr>
  <%
  while(rs.next())
         n=rs.getString(1);
         b=rs.getString(2);
     %>
  <td>
  <tr bordercolor="">
    <td height="37" style=" border:1px solid  ; border-collapse:collapse" border="0"><div align="center"><em><font color="#000000"> 
        <%=n%>
        </font></em></div></td>
    <td style=" border:1px solid  ; border-collapse:collapse" border="0"><em><font color="#000000">
      <%=b%>
      </font></em></td>
  </tr>
  <%}
  %>
</table>
</body>and result is i'm getting 728 records from database....how could i restrict them to display only 10 records per a page.....please suggest me a easy method so that i can use it for future projects.

Similar Messages

  • Is there any way to turn off the auto formatting in Pages?  I just want to type a letter and add pictures and titles, and Pages keeps changing font sizes and doesn't let me "Do it my way".  I HATE this!

    Is there any way to turn off the auto formatting in Pages?  I'm using a blank document, so I figured I could write my letter and add pictures any way I wanted to.  But NO!  Pages keeps changing the font size!  I typed a large heading as a title, and when I try to change to a smaller font for the body of the letter, it changes the size back to the larger size!  I am getting SO FRUSTRATED!  I've spent over an hour trying to get the stupid program to let me just type my letter!  Can anyone help?

    The only one left is the "unsubmitted text" dialogue, which would not be a problem if I were not a Facebook user; after updating the "Richard is..." field (which does not require a manual submit to actually send) I get the above message. This is obviously Safari just not realising that the info has been sent and is therefore (I imagine) one for Apple themselves to answer!!
    You're welcome Rich. Glad to help.
    Not being a Facebook User, I'm not sure how to respond to the error situation. However, this would be something to report to Apple as a bug via the Safari Menu. First, open to the page in question, then select "Report Bugs to Apple".
    Mahalo for the and Aloha from Big Island.

  • Is there any way to read XML directly from a Web Page ??

    i have a url, which on sending request, shows XML in browser.
    Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
    actually the process is. :
    1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
    2.)then i have to read the Xml and show it in according to my requirements.
    Is there any way to read XML directly from a Web Page ??
    is their logic to accomplish this.
    e.g in Servlet i can do somewhat like this :
    String wholeXml=Somemethod(url);
    Please Advice

    the average Java XML parser will accept an InputStream, so just open an URLConnection to the webpage, get the inputstream from it and feed that inputstream to the XML parser. If the URL has valid XML data, it will get parsed without problems.

  • Is there any way to re-install an older version of pages on my computer? The new version lost a lot of the templates I enjoyed using...

    Is there any way to re-install an older version of pages on my computer? The new version lost a lot of the templates I enjoyed using...

    If you previously had iWork '09, those apps are still in your Applications folder in a folder named iWork '09 unless you deliberately deleted them.
    If you did delete them & have a Time Machine backup that includes your Applications folder you can restore them from there. In the past the iWork apps have not worked well when copied from another drive, but some users have reported that this works for them, especially if the apps were originally purchased from the Mac App Store. If you originally installed them from the retail disk, find the disk & reinstall them & then update to iWork 9.3.

  • Opening a seeded OAF page from custom JSP page.

    Hi All,
    We have requirement to open a seeded OAF page from custom JSP page.
    When we try to open URL of an OAF page after passing URL input parameters, we are always getting following error:
    'You have insufficient privileges for the current operation. Please contact your System Administrator.'
    On directly accessing the seeded OAF page, its encoding all the input parameters passed in URL. Also some more encoded parameters are getting added to the URL dynamically.
    Is there any standard way exists to invoke seeded OAF pages without passing encrypted parameters to it? Also where can we get more details about
    encrypting OAF URL parameters.
    Any pointers would be appreciated.
    Thanks in advance!
    Saurabh

    Have you duplicated entire Customer Service module's menu in your responsibility?
    or Also ping me the menu name..
    --Prasanna                                                                                                                                                                                                                                                               

  • How do we translate Custom JSP pages to Multiple languages

    Hi All,
    I have custom JSP pages in my appplication.
    I need to convert them to arabic specific.
    Is there any way out for this as like we do translation for OAF pages.
    Please suggest....
    Thanks,
    Nagu

    Nagu,
    You can use ResourceBundle / FND Messages to retrive the page text in JSP Code instead of hardcoding it.
    HTH.

  • Passing parameter to custom JSP page

    From an appraisal, I am adding a link thru personalization that opens a custom JSP page in a new window. I somehow need to pass the appraisal_id context from the old page to the new page so the new page displays the appropriate information.
    This is tricky because the original appraisal page isn't calling the new page within its code. Is there any way possible to pass a parameter such as appraisal id to this new page?
    Thanks for any help.
    M

    M,
    Have you tried passing the value via HTTP session.
    Thanks.
    With Regards,
    Kali.
    OSSI.

  • How to Build Custom JSP Page to bypass Oracle Apps Login

    Hi All,
    Can some one guide me how to develop a custom jsp page to bypass Oracle Apps R12 Login.
    Actually Our requirement is some external user will enter the login details in some third party login page with the third party generated username and passwrod, that user's credentials are mapped to oracle system,so as soon as they enter credentials having validated it has to redirect that external user to Oracle Apps R12 Home Page, where responsibilities are shown. Currently that third Party login page is set to redirect to RF.jsp but that is not working and throws this error:
    "You are trying to access a page that is no longer active.
    - The referring page may have come from a previous session.Please select Home to Proceed"
    So I am planning to build a custom jsp page to resolve the error.
    As soon as user enter credentials in the third party login page, it will be redirected to my custom login page which in turn redirect external user to Oracle Apps R12 Home Page, where responsibilities are shown. Is it possible? If yes what JSP Page/Servlet I have to invoke from custom JSP Page and what all URL parameters or session parameters and cookies parameter I have to pass or set.
    Can anybody please help me...
    Its very urgent. We are running short of time. Its a sev 1 issue.
    Please reply soon.
    Thanks,
    Raja Dutta

    Hi,
    Thanks for the update.
    Sir its not about calling the JSP Page from OAF page.
    My requirement is what I have explained above.
    Please suggest its urgent.
    Thanks,
    Raja Dutta

  • How to call a concurrent program from a Custom JSP page.

    Hi,
    I have a custom JSP page which i have deployed by creating a form function with the path of the JSP Page
    and added the JSP Page to the OA_HTML top.
    Now, i need to call a concurrent program from the JSP Page, i have all the parameters in my page and i am using the standard class as below:
    ConcurrentRequest cr= new ConcurrentRequest(con);
    int requestId= cr.submitRequest("XXINV",programName,null,null,false,vec);
    I have verified my connection object and it is OK but i am getting the exception that user is not set to run the program.
    I tried the below code in my JSP page and getting -1 for all test variables :-
    int userId = wctx.getUserId();
    int respApplId = wctx.getRespApplId();
    int respId = wctx.getRespId();
    I think i need to set the context in JSP page to run the program..
    Pls help ....
    Regards
    Saurabh Jaiswal

    Hi,
    Thanks for the reply,,,
    This is a possible solution but this will allow to run the program anyhow.
    But the procedure which i call thru callable statement will start with
    fnd_global.apps_initialize (3825, 50603, 704);
    fnd_request.submit_request API call.
    Now, the values of user and Responsibilty is required in the program and it changes.
    With this approach we have to hardcode the user and resp.
    The same JSP page is attached to other responsibilities and there the concurrent program would get fired as if fired from the resp Id hardcoded as above.
    Need to capture user Id and RespId.
    How can i set the apps Context in JSP page???
    Regards
    Saurabh Jaiswal

  • Any way to reuse username.seen and preserve Read flags

    After migrating from a 10.3 Server to a 10.5 Server, what I find is that the "Read/Unread" flags have been reset.
    But cyrus keeps these records in the username.seen files.
    Is there any way to reuse these files for the read/unread flags to stick through migration?
    Message was edited by: Celia Wessen

    Hi,
    Use 'FORMAT INTENSIFIED ON' before your write statements.
    Links:
    http://sap-img.com/ab027.htm
    https://forums.sdn.sap.com/click.jspa?searchID=16122441&messageID=5116798
    Regards,
    Harish

  • Is there any way to include a Numbers table into a Pages document?

    I have a nice useful well-formatted table in a Numbers sheet and now I'd like to include it in a Pages document.
    Is there any way to do this?
    I don't care that the table remain "active" (that is, it doesn't have to allow me to change values and recalculate from within Pages) BUT I do care that the formatting and values remain exactly like I painstakingly set them in Numbers.
    Dave

    You can copy and paste the entire table. Select it so you get the little square handles at each corner and side, then copy. Switch to pages and paste.
    Every cell that's calculated from other cells in that table will remain calculable in Pages. Any cell that's calculated from other tables will just have its value.
    There is no need to create a table in Numbers just because you want calculations. Tables in Pages behave just the same way, but without the help and function building facilities.

  • Is there any way to avoid duplicate copies of .docx and .pages files?

    I frequently download .docx files (and .pptx/.xlsx, but let's just stick with .docx for now).  I'm getting used to the pages format, except every time I try to modify a .docx file, I can't save it again without creating a new file.  Ultimately I'll end up with a .docx version and a .pages version of the same file.  Is there any way to edit and save just the .docx version?  Or maybe even have the original .docx version replaced by a .pages version?

    When you open a Word document with Pages you get a translated-to-Pages file & the original Word document is unchanged. There are programs that will save over the original file such as LibreOffice. Pages will not.

  • Customized JSP Page for LOV from a OAF Page

    We want a customized LOV page that will be a new JSP page instead of OAF JRAD XML. Right next to this new item we will put a link to open us this new JSP page. The base page is OAF page. When user selects the data from the new LOV JSP page, it has to be passed to the base page items. Is it possible to acheive this?

    You cannot do that, all queries and eventual data binds to UIX beans must ha[[en through VOs.
    What I can suggest as a workaround is this.
    1. Create a normal LOV based on a VO
    2. Create rows for the LOV VO
    3. populate the attributes of the VO row with the values that you have in your collection object.
    4. Insert the row in your VO.
    Thanks
    Tapash                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is there any way to fetch second webpage url after navigating from one page to another on chrome browser?

                string sCurrentURL;
                string sExpectedURL="http://www.xyz.co/";
                BrowserWindow _bw = BrowserWindow.FromProcess(proc);              
        string sURL=UIMap.UIWindow.Uri.ToString();
                HtmlHyperlink objLogoLink = UIMap.UIWindow.UIDocument.UIHyperlink;          
    //Navigates to "http://www.xyz.co/" link after click on logo
                Mouse.Click(objLogoLink);            
                 Playback.PlaybackSettings.ShouldSearchFailFast = false;
    //At this line of code I am getting issue on chrome browser
                sCurrentURL = _bw.Uri.ToString(); 
                Assert.IsTrue(sCurrentURL.Equals(sLogoURL));
                _bw.NavigateToUrl(new Uri(sURL));
    After clicking the logo link of the page, it navigates to other url. I am successfully able to get the url for firefox and IE.  I am facing issuein chrome.
    Any suggestions?
                 

    Do you use this extension tool Selenium Components for Coded UI Cross Browser Testing?
    Yes I used this extension tool. I am using only BrowserWindow name as search property.
    Error : 
    stale element reference: element is not attached to the page document
      (Session info: chrome=41.0.2272.89)
      (Driver info: chromedriver=2.8.241075,platform=Windows NT 6.1 SP1 x86_64)
    I resolved this issue using separate BrowserWindow object for each page. But i am not able to understand why BrowserWindow _bw object created from process object ( BrowserWindow
    _bw = BrowserWindow.FromProcess(proc); ) get detach when navigate to other page....
     string sCurrentURL;
     string sExpectedURL="http://www.xyz.com/";           
     string sURL=UIMap.UIWindow.Uri.ToString();
     HtmlHyperlink objLogoLink = UIMap.UIWindow.UIDocument.UIHyperlink;          
     //Navigates to "http://www.xyz.co/" link after click on logo
     Mouse.Click(objLogoLink);
     sCurrentURL = UIMap2.UISecondPageWindow.Uri.ToString(); 
     Assert.IsTrue(sCurrentURL.Equals(sLogoURL));

  • We have a satellite connection that restricts our download amount per day. Since watching videos on YouTube and viewing Facebook photos online counts as downloads, is there any way I can see how much each web page is in terms of MB or KB size?

    Our satellite company's Fair Access Policy allows:  425 mb max per 24 hours, but it seems like we often go over that amount by just surfing the internet. We have 2 adults and 3 kids who use Mac computers. Is there a way to view the amount of KB's or MB's used after viewing a page? For instance: does looking at a Facebook page use 100 KBs? does looking at a YouTube video use 10 MBs?
    Thanks.

    There are a few things you can do to cut down on bandwidth. I set Firefox never to check the cache with pages online, so that if I go back to a previous page, it does not need to download again, but can be pulled out of the cache.
    browser.cache.check_doc_frequency - set to 2 (never)
    I use Flashblock to prevent Flash items from downloading automatically. If there is any Flash item you want to see, you click the icon over that space, and that one item will load but none of the others on the page will load until you want them to do so.
    I use Adblock Plus to block ads. This saves bandwidth as well, since it stops banner ads from being loaded, and blocks popup ads as well.

Maybe you are looking for