Problem opening pages

I am attempting to create a simple log in form using JSP at the moment and i can't seem to get it to work properly. Can anyone see where i am going wrong? Every time i click on the login button nothing happens. thanks for any help
<%@ page language ="java" import="java.sql.*" %>
<html>
    <body bgcolor="">
        <form name="f1" method="post">
            <table>
                <tr>
                    <td>User Name</td><td><input type="text" name="t1" ></td>
                </tr>
                <tr>
                    <td>Password</td>
                    <td><input type="password" name="t2"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" name="b1" value="LogIn"></td>
                </tr>
            </table>
            <%
                        String user = request.getParameter("t1");
                        String pass = request.getParameter("t2");
                        try {
                            Connection con = DBConnect.DbConnection.getConnection();
                            Statement st = con.createStatement();
                            ResultSet rs = st.executeQuery("SELECT username, password FROM users");
                            while (rs.next()) {
                                String username = rs.getString(1);
                                String password = rs.getString(2);
                                if (user.equals(username) && pass.equals(password)) {
            %>
            <jsp:forward page="next.jsp" />
            <%                                            } else {
            %>
            <jsp:forward page="elogin.jsp" />
            <%                                  }
                        } catch (Exception e) {
                            e.getMessage();
            %>
        </form>
    </body>
</html>

Thank you again, It is so close to working I can feel it! I now only have the problem of the servlet opening in the window instead of it being redirected. I have
try {
                Connection con = DBConnect.DbConnection.getConnection();
                Statement st = con.createStatement();
                ResultSet rs = st.executeQuery("SELECT username, password FROM users");
                String user = request.getParameter("t1");
                String pass = request.getParameter("t2");
                while (rs.next()) {
                    String username = rs.getString(1);
                    String password = rs.getString(2);
                    if (user.equals(username) && pass.equals(password)) {
                        response.sendRedirect("next.jsp");
                    } else {
                        response.sendRedirect("elogin.jsp");
            } catch (Exception e) {
                e.getMessage();
            }within the servlet but im not sure how to run it automatically so that it redirects on its own. In the html file my form calls the action='servlet' and method='post'. I'm sorry if these questions are simple but i'm attempting to teach myself java for web programming.

Similar Messages

  • I am having problems opening pages in safari. the rotating wheel at the right end of the address window doesn't stop even after the page has filled up. then if i try to open other pages it gets stuck and won't open them.

    I started having problems opening pages today. When first open a page it seems to download the page OK, but the rotating wheel on the right-hand end of the address field keeps rotating after the page is completely filled up. Then if I try to open other pages it becomes slower and eventually stops filling-in the pages, while the rotating wheel keeps rotating.
    I wonder whether junk is being downloaded into my mac, or what is going on. Help will be geatly appreciated.

    When was the last time you emptied the Safari cache?
    From your Safari menu bar click Safari > Empty Cache
    If that didn't make a difference, go back to the menu bar click Safari > Reset Safari. Select the top 5 boxes then click Reset.
    And how much free space on the startup disk?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you always have a minimum of 15% free disk space. Freeing Up Hard Disk Space - Mac Guides
    If emptying cache or resetting didn't help and there's enough free space on the startup disk, login to another user account, launch Safari. Same problems there indicates a system wide problem. Log back into your admin account so you can check the startup disk.
    Launch Disk Utility. /Applications/Utilities
    Select MacintoshHD in the panel on the left then select the First Aid tab.
    Click: Verify Disk (not Verify Disk Permissions)
    If the startup disk needs repairing, follow the instructions for Using Disk Utility to verify or repair disks
    I wonder whether junk is being downloaded into my mac
    Nothing should "download" to your Mac unless you initiate the download yourself. You can check the Downloads folder from the Safari > Window menu or your Downloads folder in the Finder.

  • Fox opens an error (Problem opening page) page when ever I open a new fox window and parks it in upper left corner of my desktop, what is up with this ??

    Fox opens an error (Problem opening page) page when ever I open a new fox window and parks it in upper left corner of my desktop, what is up with this ??
    It slows down my surfing, a lot and I do not notice the error page, until I notice the slow speed, because it is as small as a page can be, showing only the " -, +, & full size boxes with a border"

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Safari problem opening pages

    why the heck safari on and off have problems opening secure pages of bank sites. I previously had problems with bank.marksandspensers.com and now with bank.barclays.com, when at the same time these pages could be opened in chrome. The error displayed is a normal page not found / server not available / server closed connection. It is very irritating. I use Trusteer and it is not available for Chrome on OS X.

    Trusteer Rapport Uninstall

  • Problem open "pages" documents from icloud

    Hi,
    I have pages for MAC and IPAD.  Quite often I cannot open or save documents located on icloud drive. The same document can be opened if I transfer it to local disk or if I look to it using "preview" but when I try to point to the orginal idrive location I get the message "document cannot be opened" or "document cannot be saved" This is odd enough as in icloud settings have pages enabled. The all idea is making my documents on MAC and being able to read them using IPAD or MAC at my own convenience.
    Any clue?
    Thanks,

    I found it helpful to convert all my old Pages '08 files to .doc files.  They can be opened by the new version of Pages.
    Since the new version of Pages is no longer back compatible, and so not good for anything you want to keep for a long time, you might consider using an open source word processing application like Libra Office.  That's what I had to do.  After seven years of being a happy Pages user - archiving thousands of files in Pages -Apple has abandoned us.  I no longer think it is wise to use the new Pages and then five years down the road (or sooner) not to be able to open them in a newer version.
    If you would like a quick way to convert your Pages '08 files to .doc, let me know.

  • Problem Opening Pages Docs

    I am using Pages 5.5.1 on my iMac, running OS X 10.10.1.  All of a sudden, when I try to open a saved Pages document, I get a message, "couldn't be opened. The required index.xml file is missing." Sometimes, Pages then quits.  The only workaround I have found is to select the document, click "Open With" and select Pages 5.5.1, but I shouldn't have to do that constantly.  Anyone have any suggestions for a permanent fix?

    You have both Pages '09 and Pages 5.5.1 on your MAc and are alternately opening your documents with the wrong version.
    Pages 5.5.1 is in your Applications folder.
    Pages '09 is in your Applications/iWork folder.
    Open with the correct version by right click > Open With…
    You will find Pages 5.5.1 is missing over 100 features and is incompatible with everything but itself and Yosemite/iOS 8.
    Peter

  • Problem with Pages update

    Has anyone had a problem opening pages documents and it telling you that you need to update to the new pages but you already have? 

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Peter

  • Trouble opening Pages

    Since updating to Yosemite I have intermittent problems opening pages documents.  Error is xml file missing.

    You are attempting to open a Pages v5 document in Pages '09. Only Pages '09 uses the internal index.xml file content. If you have Pages '09 running and double-click a Pages v5 document, that is a surefire way to get that dialog. Use the Pages '09 file chooser, or right-click > open with > pages (4.3) selection.

  • Safari can't open page as server not responding

    I have a 2 iPhone 5s n 1 iPad Air sharing the home router with a few other computers at home. The iPhone and ipad always have problem opening page using safari. Same thing for browsing video using YouTube app. It's just not responding. Other applications such as whatsapp facebook work fine though. Even chrome application works too. Just not safari and YouTube so far. I have tried resetting network setting, clear history and cookies. It didn't work. It should not be the router issue as other application works. Can anyone help me with this? It's very annoying.

    Depending on the server software used for the downloads it may be using up all of your bandwidth leaving little for Safari.
    Use the Safari Activity window to see how the page elements load while your download is occurring.
    If you see "timed out" messages then you're going to have troubles.

  • Abnormal behaviour with Lion. Opening Pages causes my Mac to have a lethargic performance since I installed the Lion OS, anyone has a similar problem?

    Since i first installed the Lion OS, my mac has been having performance slowdowns while working on Pages. It appears to affect all functional software and hardware. E.G. when clicking either the dashboard or the desktop button it does nothing, Pages has a horrible lethargic processing, etc.
    The strange thing is that Pages does reflect a considerable improvement if working in the fullscreen environment.
    If anyone else is having or had this issue could you please give advice.
    Thank you

    You would be better asking these questions in the Mac OS X 10.7 Lion Discussions area. The Pages Discussions area is just about Pages so we won't be able to help you with general Mac OS X problems.
    However, there is a big difference opening Pages/Numbers/Keynote from Launchpad or my previous Dock. If I use Launcpad, those software open now decently quick. Using Dock is much more slower.
    Have you tried removing the Dock icons for iWork and readding them?
    I also downloaded Lion Disk Recovery Assistant - I am surprised that these were not on my Mac already, though my Automatic upgrade assistant informs that no new upgrades are available.
    You may be surprised, but you're not being singled out. The Lion Disk Recovery Assistant was not made available to anyone via Software Update. It's a manual download from Apple's Support web pages.
    If you were not aware of the Mac OS X 10.7.1 update being available you should check System Preferences > Software Update and ensure it's set to check for updates as frequently as you require.

  • TS1398 my problem is my iphone 4s is connected to the internet(wi-fi) with full signal strength but freezes when browsing and says "Cannot Open Page, Safari could not open page because the server stopped responding".

    my problem is my iphone 4s is connected to wi-fi with full signal(3 bars) strength but freezes when browsing and says
    "Cannot Open Page"
    "Safari could not open page because the server stopped responding"
    I already reset the iphone to its factory settings and erase all contents but still the browsing speed freezes or not searching at all. Sometimes it will work and fast but then the problem uccors every now and then. Iv'e been using iphone 4 for two years and I still have it and works fine compared to this IPHONE 4S.

    Settings → scroll down to Safari → in Safari settings, I selected both Clear History and Clear Cookies and Data.
    IF that does not work -
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Finally - if problem still present -
    Go to Settings>General>Reset
         Reset the network settings - you will need to add the password of your home WiFi in your phone once more
    The device should turn itself off & back on then go into Settings>Wifi and join your network

  • How to solve problem - " Safari cannot open page because it isn't connected to the internet" but the airport is ok. signal full and i have n IP address.

    How to solve problem - " Safari cannot open page because it isn't connected to the internet" but the airport is ok. signal full and i have n IP address. and i m using Macbook pro.
    OS snow leopard and above...

    Do you have this problem with all websites, or only some? If only some, which ones?

  • When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application." Using OS X 10.6.8

    When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X."
    I've run the software update several times. Pages is located in my iWork '09 folder in Applications. Using OS X 10.6.8

    Delete and reinstall it.
    (104030)

  • When I open news or other sites in tabs, I get "Problem loading page" errors on all tabs that I attempted to open.

    I just upgraded to Firefox 20.0 as you "suggested" and now whenever I try to open a new site in a new tab, I get the error "Problem loading page". However, if I open them in new windows, they come up just fine. What have you done to a reasonably running browser?

    I can't think of any reason for a new window to load well but not a new tab. It could be the second try effect. Firefox sometimes seems to give up on a site instantly, but if you reload, everything is fine. Could you try a reload in the same tab the next time and see whether that works? Not that it's a good workaround, but just to get a better idea of what's happening.

  • When opening new page, an extra window says "problem loading page"

    Opening the Firefox browser causes a second tab at the bottom to pop up that reads "problem loading page"...the pages I want to view open up fine, on all websites, I just get an extra annoying tab with that message...if I click on that tab, a small window pops up in the upper left hand corner of the screen that has the error message. I am using FF 3.6. This just started happening recently...possibly after my las FF upgrade.

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for

  • How do I restrict content provider edit rights to a single region on a page

    We have a 2-level security requirement for Portal pages that are accessed by "the general public" - users that do not log into Portal. I'll call this population "The Public". Top Level Edit Security Web-masters need to edit all content on any page in

  • Facing error in creating ObjectInput/output stream socket

    hi I am Jatandar and i am implemeint client server program which will be using object Input/Output stream to pass data through sockets . The problem is the i m getting error when the cleint connects to the server here is the server and client code ,

  • How do you move a sound clip in the timeline?

    I have not had this problem before. I have put many songs into the timeline, and repositioned them. Today I pulled up a project and attempted to reposition a song to fit in better with the clip, and I'm unable to do so. I can't select the song, or an

  • Have a broken screen, can I hook up external

    Hi guys, I have a broken screen, is there anywhere if I hooked it up with a external screen. Like I tried hooking it up to my tv but basically the tv was a seperate screen in itself and wasn't apple to see the login propt screen. My screen is so bad

  • Document Reapproval Rules -  PO setups

    Hi Team, Can you please help us in identifying the Document Reapproval Rules related setups from Application. Below are the details we wanted to check from either application or workflow related setups. Promised Date Need-By Date We are on 11i Applic