Blank page while servlet to jsp.

Hi.
am working in a code for login verification.
In my login database i have different user.For each user user access will be different.
So am verifying password for a particular user.The verification is done in servlet page .
After verification am viewing only a blank page.
Can u give me any suggestion.
my code is given below.
response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
         HttpSession session=request.getSession();
        String user="",pass="";
        //ServletContext context=null;
        ServletContext context=getServletContext();
String userName=request.getParameter("user").trim();
String passWord=request.getParameter("pass").trim();
        String query="select * from login where user='"+userName+"' ";
       String DbUserName="";
       String DbPassword="";
       String finalUser="";
       try {
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             Connection con1=DriverManager.getConnection("jdbc:odbc:register");
              Statement stat=con1.createStatement();
              ResultSet rst=stat.executeQuery(query);
                while(rst.next())
     user=rst.getString("user");
pass=rst.getString("pass");
              if((userName.equalsIgnoreCase(user))&&(passWord.equalsIgnoreCase(pass)))
            session.setAttribute("user",user);
        context.getRequestDispatcher("/Mainmenu.jsp").forward(request,response);
        else
               context.getRequestDispatcher("/LoginError.jsp").forward(request,response);
catch(Exception e){
             e.printStackTrace();
      }Thanks in advance,
regards,
satheeshkannan

Indeed, you are just printing and ignoring the exception instead of throwing it or change the flow.
Apart from this problem: why are you comparing the username once again after the query while the query should only return rows matching the username? Anyway, if your DB is well-designed (i.e. username is unique), then you can also just query for rows matching the username and the password so that you just need to check if ResultSet#next() returns true or not.
Oh, don't forget to use PreparedStatement instead. It will save you from SQL injections.

Similar Messages

  • Blank pages while printing in BO6.5.1

    Post Author: Saravanan Perumal
    CA Forum: Desktop Intelligence Reporting
    Hi,
    I'm trying to create a Business objects report 6.5 with more tables and cells than will fit across one page. This results blank pages while printing, Is there any option to fit the cells and Tables into the first page that extended to the second page.
    Any one having the idea regarding kindly let me know.
    Thanks in advance!
    Br
    Saravanan.

    Hello,
    BLANKPAGES specifies whether to suppress blank pages when you print a report. Use this keyword when there are blank pages in your report output that you do not want to print.
    rwclient.exe server=<repserver_name> report=only_main.RDF userid=scott/tiger@orcl destype=file desformat=pdf BLANKPAGES=NO
    Another solution would be the use of srw.abort_program:
    If there is no data, the report is not run:
    SRW.PROGRAM_ABORT needs to be called from a format trigger and since any object within repeating frame ( based on main query) will not be formatted unless there is data, So need to have a "Boilerplate Text" outside of Frame and placed at "Main Section"-> "Body". This Text object will have Following format Trigger.
    begin
    if :data_yn ='Y' then
    null;
    else
    SRW.MESSAGE(100, 'No Data to run report ');
    raise SRW.PROGRAM_ABORT;
    end if;
    return (False);
    end;
    Here return (false) as do not want to print the text.
    data_yn is a user parameter variable, Not exposed to user or at Parameter Page.
    There is PL/SQL Filter Written at the Main Query at Data Modal as
    function G_EMPNOGroupFilter return boolean is
    begin
    Select 'Y' into :data_yn from dual;
    return (TRUE);
    end;
    This Helps in setting data_yn to Y is there is data returned by the underlying Query. by default this is Null.
    So when Report is executed by passing 2 as value to 'no', Query does not returns any row, So PL/SQL filter will not run and while formatting Blank report, format trigger of the "Text Object" will raise exception to abort report, thus no output.
    Similarly if there is data returned by Query then PL/SQL filer will set 'Y' to data_yn and "Text object" format trigger will not raise Exception.
    Regards,
    Alex

  • Why does my computer keep reloading blank pages while reading email ?

    My computer constantly reloads a blank page while I am in my email account (Outlook.com- an old hotmail account). I have deleted cookies, deleted history and the cache files according to what one search result told me to do. I have mal-ware and anti-virus which are all up to date along with current windows versions. I reloaded Firefox also, all to no avail. Unless I take my computer to a repair shop, it is difficult to read any email.

    That's a good sign! It suggests that one of your extensions does something that isn't fully compatible with Outlook webmail. This might include blocking information that Microsoft's site expects, whether cookies, or something else. Could you review your extensions and see whether any of them might filter/block information from the site, to enhance privacy or reduce annoyances or other reasons?
    You can do that on the Add-ons page. Either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then on the right side, if you see something that might be relevant, you can click its Options dialog to see whether you can make an exception for the live.com site (server that hosts Outlook mail).

  • Journ.E touch - blank page while trying to access the virtual store

    After resetting the account and update the virtual store,
    I get a blank page while trying to access the virtual store.
    I proceeded to update firmaware. always blank page.

    after the reset, the page is still blank. no access to the virtual store. can you check the serial number of my JournE Touch?
    S / N: 5A015441DH, are this a zero? or the letter O? I write the number 0 for account creation.
    I note that this error occurred after resetting the personal account
    Personal Account - 12763
    cordially

  • Pressing Enter Button Gives a Blank Page while Cursor is in Text Field

    Hi,
    I have a problem on my jsp page that there is a text filed (input type="text") and a button (input type="button") to submit the page.
    When page loads the cursor blinks in the text field, and at the same moment if i hit the enter button of my keyboard it gives a blank page.
    Here the button on page does not clicked by this enter button, no script calls neither the page submitted to the given url.
    Kindly suggest what is going wrong.
    Thanks in Advance
    Rajiv K.

    I'd come across this issue a while back: [http://tipsandtricks.nogoodatcoding.com/2007/07/html-single-text-field-submit-caveat.html]; when there is only a single text field in a form, then pressing enter causes a submit with the text-field as the initiator. The submit button isn't invoked. This means any onsubmit actions will not be called. A simple way out is to put in a dummy text field in the form and set it's display to none (using CSS/styling)

  • WCM_PLACEHOLDER returns blank page while WCM_BEGIN_EDIT_SESSION works fine

    Hello there,
    I have created a website in SiteStudio (via JDeveloper) with the site assets as in the following link:
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10613/img/region_definitions.gif
    Note that all the elements in the above link are checked in UCM.
    I can edit the datafile which is in UCM via:
    http://127.0.0.1:16200/cs/idcplg?IdcService=WCM_BEGIN_EDIT_SESSION&dDocName=SSD-DATAFILE
    However I am unable to see the contents of the same datafile via:
    http://127.0.0.1:16200/cs/idcplg?IdcService=WCM_PLACEHOLDER&dataFileDocName=SSD-DATAFILE&placeholderDefinitionDocName=SSD-CONTENT-PHD
    No matter the value I type for the parameter dataFileDocName I always get a blank page.
    If I change the URL to:
    http://127.0.0.1:16200/cs/idcplg?IdcService=WCM_PLACEHOLDER&dataFileDocName=SSD-DATAFILE&SSContributor=true
    I get the following response: It is not possible to calculate the path to the content item 'SS_DEFAULT_REGION_TEMPLATE'.
    The thing is that I don't know why UCM is trying to find +'SS_DEFAULT_REGION_TEMPLATE'+.
    Can anybody shed some light on what is happening please?
    Thanks,
    Fabio

    Hello Jiri,
    Thanks for your reply.
    Unfortunately I am getting 404 for the link you provided.
    I have assigned a REGION DEFINITION (is that what you mean by "content" on your reply?) to the placeholder, please have a look at its source below:
    +<?xml version="1.0"; encoding="UTF-8" standalone="yes"?>+
    +<placeholderDefinition xmlns="http://www.oracle.com/sitestudio/PlaceholderDefinition/"+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/sitestudio/PlaceholderDefinition/ http://www.oracle.com/sitestudio/ss_placeholder_definition.xsd">
    +<property value="" name="description"/>+
    +<complexProperty name="flags">+
    +<property value="true" name="update"/>+
    +<property value="true" name="preview"/>+
    +<property value="true" name="reset"/>+
    +<property value="true" name="removeAssociation"/>+
    +<property value="true" name="switchDataFile"/>+
    +<property value="true" name="approve"/>+
    +<property value="true" name="viewTrackerReport"/>+
    +<property value="true" name="reject"/>+
    +<property value="true" name="switchRegionTemplate"/>+
    +<property value="true" name="docInfo"/>+
    +<property value="true" name="docInfoUpdate"/>+
    +<property value="true" name="modifyMetadata"/>+
    +<property value="true" name="viewUsageReport"/>+
    +</complexProperty>+
    +<mappings>+
    +<regionDefinition location="SSD-CONTENT-RD">+
    +<regionTemplate location="@ssd-content-rt" default="true"/>+
    +</regionDefinition>+
    +</mappings>+
    +</placeholderDefinition>+
    Supposing the above source is correct; I'd appreciate if you could bring to my attention some other potential source for such a problem so I can look into it.
    Regards,
    Fabio

  • Got Blank Page while installation

    Hello,
    I have got a blank page as captured in following when installing MSSQL 2012 SP2 Standard for trial use.  I am no idea about it.  Could anyone can advise?
    I am using Citrix Xen VM for my environment.
    Thanks!

    Have you installed SQL Server 2012 before installing the SP2 update. The screenshot shows that you are installing SQL Server 2012 SP2 which requires SQL Server 2012 to be installed first. Although SP update would have reported no instance found if there
    was no instance.
    Can you download
    SQL Server 2012 SP2 again and try
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • I have blank page while trying to access the virtual store with Journ.E tou

    after update and reset, the page is blank, no access to the virtual store
    as I entered the serial number S / N: PX1530U-1ET1 :-) the correct S / N: its not used and i dont know how i can repair it with correct password
    What to do about it??? Without virtual store is tablet unusable.
    Thanks for any solution...
    Message was edited by: mirokmiro

    Thank you for the request.
    Your Toshiba Virtual Store account 33460 has been reset.

  • Blank page display while executing Materials & Sales Order App in Fiori Launchpad Sandbox

    Hi ,
    I am getting blank page while trying to execute Materials app & Sales Order App in Fiori Launchpad Sandbox
    Fiori App to App Navigation in Web IDE - Part 1
    Kindly help me to resolve this issue.
    Regards,
    Bharani

    Hi Jamie,
    Even after recreating the material & salesorder app still getting the same blank page.
    For accessing destination (ES1) i used some other credential as i am not able to reset the password of my account since i am getting below for a longtime.
    System Down:
    The system is not accessible please have a look at the Operations Document for the system status or check back later.
    Thank you for your understanding
    So does it has any connection related to the blank page which i am getting?
    Regards,
    Bharani

  • Blank page comes out when I try to make a copy on my HP 5610xi All In One Printer

    Recently, I keep getting a Blank Page when I try to copy anything on my HP Officejet 5610xi All in One Printer.
    This question was solved.
    View Solution.

    Hi,
    I understand that you are getting a blank page while trying to copy. 
    Make sure that the printer is connected directly to a wall jack and not a surge protector.  If this fails to resolve the issue please follow the steps from the link below.
    Copy issue
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Canon Printer: Printing blank pages

    CAPTV330_MacOSX_ukEN.dmg. Downloaded this driver. Was printing correctly. Now printing blank pages, while printing some graphic outlines.
    When printing on Adobe, it prints fine. Also tried Print Bitmap mode, worked. I suspect its printing in Postscript mode, while I believe the printer, then doesn't understand the mode.
    Removing the printer from /Library/Printers/Canon/CUPSCAPT/ doesn't help.

    Problem Solved!
    1. Open System Preferences > Print & Fax
    2. Move your mouse over the Printers list
    3. Hold down the Control button and click the mouse
    4. Click the "Reset printing system ..." popup
    Then go to http://support-sg.canon-asia.com/contents/SG/EN/0100220001.html , download and install this new driver.
    After that add your printer again and select the drivers.
    It worked for me.

  • When I click links in my mails or other places I get blank pages. Think yur blocking to much, even keeping my own email site from working...

    I am a comp dummy, but I really like firefox but since I tried to personalize my firefox, all the time when I press a link or go to some less known site I get blank pages, while the adress is in the top showing. No wheels turning. Keep on burning, firefox!!!
    Blocking too much, being too bossy, I do have great internet and pc security. In my own email account, you just prevent it from working! That's ridiculous.
    Start the fire.
    Greetings,
    The wolve-like (that's what my last name means: Roelofs.
    Robin Mark Roelofs,
    The Netherlands
    Pleae do something.

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Delete blank pages

    I have imported a 100+page Pages document into iBook Author and there are some blank pages that have appeared as I have reorganised some of the text and graphics. Is it possible to delete just the blank pages because when I try to do so, the program warns that I will delete all the pages.
    Thanks
    roscoeoz

    View>Show Page Thumbnails
    1. Find offending blank page from left side bar, right click it and choose delete.
    or
    2. Go to offending page...make sure you are on that page...choose Edit>Delete
    Sounds like you had sectioned off these blank pages while in iWork Pages? Be careful and insure your pagination still is correct after doing the above. Perhaps you need to dig deeper and look at the page before and after the blank to decide.

  • Why  req.getRequestDispatcher().forward(req, resp) bring up blank page?

    Dear experts,
    I have a web application which use MVC pattern. My login.jsp submit to ControllerServlet, which then dispatch the page to entry.jsp. But, the dispatch does not work properly that it opens a blank page.
    req.getRequestDispatcher(entry.jsp).forward(req, resp)
    even the entry.jsp does exist. I tried with even just a simple HTML page, it will not open properly. However, the same codes works between the other jsp pages, that if I start with other jsp instead of login.jsp, the dispatch works.
    Any clue? thanks.

    Hi,
    Tru using
    req.getRequestDispatcher("/entry.jsp").forward(req, resp)
    If the path begins with a "/" it is interpreted as relative to the current context root else
    path is relative to the current HTTP request.
    -Amol

  • Blank Page on SRM Portal only for one user.

    Hello Guys,
    Facing a challenging issue in SRM production Portal.
    We have one user who is getting blank page while accesing confirmation link on SRM Portal.
    Everything is working fine on Portal except this link for this user.
    Everyone can see that page except this user.
    I checked below things.
    a) This user has appropriate backend and Portal roles.
    b) User has appropriate permission on Portal(checked end user permission).
    c) Checked the settings of IE.
    d) User is getting the same problem in other machines as well.
    e) I did re-create his SAP  Id and still problem persists.
    Portal is connected to Active Directory.
    Please let me know what could be the reason for this problem.
    Regards,
    Kapilendra Yadav

    Thanks for the reply.
    User hasnt done anything. He didnt collapse the page as he didnt even get on to the page.
    I  cant check the user id on different browser because of clients IT policy.
    Regards,
    Kapilendra

Maybe you are looking for

  • Itunes has encounter a problem and needs to close.

    Hi,so I have Itunes v10.6 and I have repeatedly attempted to get on to Itunes on my windows XP computer.I have uninstalled and reinstalled.gone onto Itunes in safe mode and a few other things.Each time a message pops up and says "Itunes has encounter

  • Filter Gallery by A - Z list

    On the same page I have a gallery which includes pictures and people's names. I would like to be able to filter that gallery by adding an A to Z list at the bottom of the page so that when the user clicks on the letter, "P" only the names that start

  • Missing Perl Bundle?

    Trying to run a Perl script, and I get this response: Can't locate Image/ExifTool.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl

  • Automate Archiving Jobs

    Hi We wanted to run the Archive jobs every year by Company Code and Object wise. We have around 7 sales companies  and 10 objects so we have to run 70 jobs Every year. So we wanted to automate this process so that we dodnt need to eneter the texts et

  • Please setup information of sql server database on web server

     I have create database name and userid and password and now i want to create tables on sql server through enterprise manager. I have problem to connect registration.