Login screen in struts and mysql database

This coding is used for only jsp page like login screen. Now i want to use this coding in struts and mysql. will u please help how can i use this coding in struts. please help me
Index.jsp
Admin : <input type="text" name="admin_name" size="22" value="">
Password : <input type="password" name="admin_password" size="22">
<input value="Login" name="login" type="submit" value="Login">
<input value="Cancel" name="login" type="submit" value="Cancel">
admincheck.jsp
try
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection
("Jdbc:mysql://localhost:3306/domaininform","root","");
String admnName = request.getParameter("admin_name") ; // Get
the User Name
String admnPwd = request.getParameter("admin_password") ;
statement = conn.createStatement();
String Query = ("select * from admin " ) ;
rs = statement.executeQuery(Query);
while(rs.next())
admn = rs.getString(1);
pwd = rs.getString(2);
if( (admnName.equals(admn)) && (admnPwd.equals(pwd)))
{ %>
<jsp:forward page="selectTable.jsp?butType=normal"/>
<% } %>
<% if( (admnName != admn) && (admnPwd !=pwd ))
{   %>
<jsp:forward page="index.jsp">
<jsp:param name="errMsg"
value="Sorry Your UserName and Password is Mismatch" />
</jsp:forward>
<% } %>

i know struts. but i don't know exactly send the
textbox values in form page, action page and
database. if u give coding like this i can easily
manage. please help me.Read up on form beans, action classes and how they are associated in struts configuration files. You database level code (usually DAOs) can be called from action classes unless your architecture chooses to have some other layers.
x

Similar Messages

  • Problem occurs when working with the struts and mYsql database

    Hi all,
    I am working on Struts and using database mysql. I am getting this error when i tries to modify the values of jsp page and after modify when i submit a page ,the values are modifying but it is showing this error.
    After modifying the values i am forwarding the controller to the Display page where all records from the databse will be displayed.Please tell me how to solve.this..
    Thanks
    javax.servlet.ServletException: Cannot find bean employees in any scope
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495)
         at org.apache.jsp.viewEmployee_jsp._jspService(viewEmployee_jsp.java:208)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    javax.servlet.jsp.JspException: Cannot find bean employees in any scope
         at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
         at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
         at org.apache.jsp.viewEmployee_jsp._jspService(viewEmployee_jsp.java:124)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Apache Tomcat/4.1.31

    Hi,
    i think you have got this sample application from Mastering Jakarta Struts book.
    Try the following changes, you can escape from this exception:
    1) In the employeelist.jsp, change the name attribute to "USER instead of "employees" as follows
    <logic:iterate id="employee" name="USER">
    and also <logic:present name="USER"> </logic:present> before and after the iterate tags.
    2)In the EmployeeList Action.java,add the following in the excute method...
              EmployeesActionMapping employeesMapping =
                   (EmployeesActionMapping)mapping;
                   if ( employeesMapping.isLoginRequired() ) {
                        HttpSession session = request.getSession();
                             if ( session.getAttribute("USER") == null ) {
                                  System.out.println("session.getAttribute is NULL");
                                  target = "login";
                             ActionErrors errors = new ActionErrors();
                             errors.add(ActionErrors.GLOBAL_ERROR,
                             new ActionError("errors.login.required"));
                             if (!errors.empty()) {
                             saveErrors(request, errors);
                        }else{
                   session.setAttribute("USER",getEmployees());
    Thanks,
    Shanmu

  • Software as a Service and MySQL database

    Hi all,
    We are a young, new company on the market. We are starting to open up new markets in other countries (Europe).
    It somewhat is a challenge for us: we can't share our data and mysql database between all our different services. So here is my question: do you think it would be possible to find an ETL program that could work in the cloud?
    It would not have to be too complex, but sturdy and working as a Software as a Service.
    Thanks a lot for your help.

    Talend with Talend On Demand is a good solution.
    This solution is based on the open source Talend Open Studio. You are offered a collaborative platform to work on, meaning that all your teams in different countries will be working on the same database on a secured web service.
    Go check it out on the website: http://www.talend.com/talend-on-demand/talend-on-demand.php . Hope this helps.

  • Provide me solution for STRUTS and MySQL connection

    Hi,
    friends.
    I am developing application in which i using mySQL database 5
    and using struts.
    I follow steps searched through google but i could not established
    database connection
    kindly step by step instruct me to connect with Database using struts
    if possible give me sample application to
    [email protected]
    Thanks.

    but i could not established database connectionPlease be specific. How did you conclude that? Which exceptions are you getting? Show the full message and the trace. They are not to be ignored :)

  • My login screen is grey and wont change. i tried restarting but it didn't help

    i had logged in earlier today on a guest user account, just to see how it worked, then after i was finished i logged out. My login screen was a grey colour. i went on to my usual login and tried changing the background screen but it didnt work! i also disabled guest accounts and tried to restart it but yet nothing happened!!!!!!!!!

    i had logged in earlier today on a guest user account, just to see how it worked, then after i was finished i logged out. My login screen was a grey colour. i went on to my usual login and tried changing the background screen but it didnt work! i also disabled guest accounts and tried to restart it but yet nothing happened!!!!!!!!!

  • Crystal Reports 2008 Server and MySQL DataBase source for reports

    Hello,
    I am having an issue with crystal reports server 2008. I have created a report on my local machine with crystal reports and the datasource is a ODBC connection to a MySQL database.
    The report works fine on my local. if i publish to the Crystal Reports Server, i get an error when i try and run the report.
    "error Failed to open the connection. "
    I have gone into the database connections for this report and put in the connection details. I have also created a ODBC connection on the server in windows to the actual database (installed both the 32bit and 64bit ODBC drivers, both Test succesfully). But when i go into crystal no matter what settings i try it will not work.
    anyone have any ideas?
    kthank you

    I have solved the issues. This may be usefull for anyone ...
    1. Make sure on the developer machine you have your ODBC connection setup under the System DNS setting in windows.
    2. On the Crystal Report Server, the exact same setup must be done under System DNS, same name, etc
    Once this was done, everything was fixed.

  • JSP,Struts and MySQL

    I have 2 date fields(say: from , to) in JSP. based on these date, i want to retrieve data from MySQL database. In Database, the date format is "yyyy-mm-dd" but i am using date picker in JSP for entering From date and TO date. Could you please help me how to read these date fields so that i could use them in query

    hi,
    use date fromatter to formate the date comming from date picker while preparing the query..
    Surya

  • After Hard System Freeze, Login Screen is Pinstriped and Unresponsive

    I had a hard freeze on Sunday on my G5/2x2 PowerMac running 10.5.6. I could move the mouse, but nothing else on the system responded. The dock wouldn't even unhide. I couldn't force quit anything. So, I shut down the system using the button on the Mac. When I tried to start the Mac, I got to the login screen, but it had a pinstripe and then froze on the screen with the Apple, but no login screen. I tried booting with the shift key. Same. Then, I tried booting from the internal back-up drive and a got a pinstriped screen with a question marked folder, then the same freeze. The same happened when I attached a firewire boot drive and tried to boot holding cmd-opt-shift-del. Same result. Any ideas? Thanks.

    In my original post I said that, after the hard freeze, I restarted my Mac and got to the login screen. I did NOT get to the login. I meant to say that I got to the grey screen with the Apple logo. I don't know if that makes any difference in diagnosing the problem. Thanks in advance for any suggestions.
    EDIT: Also, when I tried to zap the PRAM, the system never chimed. As I said, the screen stayed black the whole time and I held the keys for more than two minutes, which is way longer than it should take based on my experience from back in the 1990's. I don't remember having to do it since I switched to Mac o/s X.
    Message was edited by: Neil2

  • Stuck on "FileVault Login" screen after downloading and installing Mavericks

    After I finally installed Mavericks all it does now after booting up is show the Apple symbol and a popup comes up saying something like "FileVault login informatoin has changed, enter your old password."  But I can't even type anything. Mouse still moves but I can't type so I can't login?

    Try rebooting into safe mode by holding down the shift key after pressing the power button.

  • Java web start and MySQL database

    My application needs to connect to a database wich is inth server. When a user is connecting some specific information are dowlonding from the database. Is it possible to do this with java web start?

    best would be to have a app. server running and clients reading urls or should use EJB.
    You will have problems if any firewall is set up on the server side making direct sql calls to db, for example.

  • Newbie in iplanet "does iplanet supports struts and mysql"

    hi
    i am a newbie in iplanet , i wish to know that do iplanet webserver 6.0 sp4 supports struts application, as i have a running struts appiication which is deployed on tomcat but its not working on iplanet is there any kind of special configuration i have to do. please help me out

    Refer to
    JBuilder 5, Struts 1.0 & WebLogic 6.0, a Tutorial
    http://www.netstore.ch/mesi/strutsTutorial/
    'Struts Example for iPlanet Application Server, SP3'
    http://www.icsynergy.com/downloads/struts/strutsHowTo.html
    iPlanetApplication Server Installation
    http://jakarta.apache.org/struts/userGuide/installation-ip.html
    "dan" <[email protected]> wrote:
    >
    Can anyone tell me how can i implement a struts 1.1 application in the
    following
    servers:
    iPlanet Web server 6.0
    iPlanet Application Server
    BEA WebLogic Server 7.0

  • Login  screen. User and buttons dissapeared

    http://db.tt/9684aE6r
    As you can see, the invited user is.onlly showing. Help.me! Cant log in, i.need my computer. Sorry, on my cellphone

    Ok. I<m on the guest only user at the moment. so i can write better a little.
    So. when i try to log on, i only get the GUEST user (See picture) http://db.tt/9684aE6r and i can<t lon in the main user since the icon isnt there.
    What should i do^ I tried to fix the permissions, repair the disk and even fsck. Please help me! Thanks!

  • User updated to WinXP SP3 and now it does not show login screen

    Hi,
    I have a user that updated to Windows XP3, that Install and shutdown option, but the user closed the notebook.
    Now Windows XP boots but after showing the mouse and the blue wallpaper, the login screen never appears and windows stops there.
    The mouse pointer is from windows and it is moving, the hard disk shows no activity, no funny noise, etc.
    I think it was a problem with the update. I even have done a Install in place of windows xp sp2 and nothing.
    Could it be hardware? Or just windows?
    Many thanks
    Oliver

    Dude! Why did you unistall IE7? I don't know that I've ever heard that being a problem in all the few thousand posts I've read.
    My recommendation at his point is to boot in the safe mode and do a restore to a time when you didn't have any problems.
    It's going to take some good decisions at this point. Let us know how it goes.
    One of the rules is not to make things worse than they are... just to let you know.
    ThinkPad T23, 2647 HU8, Based on 2647-8RU: PIII-M 1.20GHz (512KB), 512MB RAM, 40.0GB HDD, 14.1 XGA(1024x768) TFT LCD, 8x8x24x/8x CDRW/DVD, Modem(MPCI), Ethernet(CDC), WinXP Home, Linksys Wireless B adapter.

  • Php/mysql: can't write to mysql database [SOLVED]

    I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn't write to the mysql database but has no errors. Here is register.php:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    echo("adding $username,$password<br />");
    $q = "INSERT INTO " . TBL_USERS . " VALUES ('$username', '$password')";
    echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    echo("$result<br />");
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <form method="Post" name="login">
    <input type="text", name="username" /> Username<br />
    <input type="text", name="password" /> Password<br />
    <input type="submit" name="reg", value="Register" />
    </form>
    </body>
    </html>
    and here is the output (without the form):
    adding lexion,6f1ed002ab5595859014ebf0951522d9
    query: INSERT INTO users VALUES ('lexion', '6f1ed002ab5595859014ebf0951522d9')
    Also, I tried manually adding the content to the database:
    $ mysql -p -u root
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version 5.1.42 Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> users
    -> INSERT INTO users VALUES('lexion', 'foo')
    -> ^D
    -> Bye
    I would assume that I got something wrong with the last bit, but the php script seems like it should work. Does anybody know why it doesn't?
    Last edited by Lexion (2010-01-10 19:04:15)

    What is wrong with your PHP? Why do you think it is failing? An INSERT query doesn't return anything. Also, it's a good idea to specify which fields you are inserting into, unless you want to have to provide something for every field (tedious for tables with many fields with default values). eg:
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('$username', '$password')";
    As for your experiment with the mysql prompt; queries have to end with a semicolon. PHP is nice and hides that little detail from you.
    edit: Also, you're echoing text out before the HTML starts. That won't produce valid HTML. I also noticed a few other things which I corrected; look at my comments:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    // echo("adding $username,$password<br />"); - Don't echo stuff before HTML starts.
    // Also, clean up user-supplied data before plugging it into a query unless you want to be vulnerable to SQL injection.
    $cleanusername = mysql_real_escape_string($username, $connection);
    $cleanpassword = mysql_real_escape_string($password, $connection); // Obviously you'd generally use some hashing algorithm like md5 or sha1 for passwords
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('{$cleanusername}', '{$cleanpassword}')"; // The backticks tell MySQL not to interpret any text within as a keyword (good for field names, eg a field called `date`. The curly brackets tell PHP that the stuff within refers to a variable; it's nice as PHP knows exactly what the variable name is with no possible ambiguity.
    // echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    // echo("$result<br />"); - This won't do anything; in addition to INSERT queries not returning anything, the $result variable doesn't contain the results of the query, it's a pointer to them for use with mysql_result().
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <?php
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <form method="Post" name="login">
    <input type="text" name="username" /> Username<br />
    <input type="text" name="password" /> Password<br />
    <input type="submit" name="reg" value="Register" />
    </form>
    </body>
    </html>
    <?php
    mysql_close($connection); // Not strictly needed, as PHP will tidy up for you if you forget.
    ?>
    Last edited by Barrucadu (2010-01-10 17:34:20)

  • JSP contacting MySQL database

    I want to make a simple Login page that queries a MySQL database. Can someone please tell me if they know of documentation that can take me through easily?

    Connection to any database is alike. Only the database drivers differs. If I am not wrong, this is the string to get connected to MySql database.
    Class.forName("org.gjt.mm.mysql.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://200.200.200.200/xxxxxx","xxxxxx","xxxxx");
    where first xxxx is the dsn name, and the second xxxx is the userid and the third xxxx is the password to get connected to the mysql database.
    Hope it helps
    Uma
    http://www.javagalaxy.com

Maybe you are looking for

  • COST OF PRINT HEAD?

    COST OF PRINT HEAD?

  • Error in rendering/encoding in iDVD v 7.1.2 with MacMini & music in intro not playing

    I am having some difficulty in creating a DVD in iDVD.  I've created  50+ home DVDs before, but now I am getting this error message every time: Error in rendering/encoding "There was an error during rendering/encoding of the menus/slideshows. The bur

  • Problem downloading from servlet in WLS6

    A servlet running in WLS6 is used for downloading files. When the file is           selected in IE5 the dialog asking what to do with the file (open from           current location/save) opens. If the file is small enough the service           reques

  • Load Balancing in PI

    Hi Experts, Can any body explain how to do load balancing in PI7.0 What are the parameters needs to change related to Runtime WorkBench when doing load balancing. Please provide if  any one having material related to this. Adavance Thanks Rohit

  • FM used to display detail in text.

    Hi all,          i have a requirement as ,     on pressing a button(user defined) on app tool bar , i must get an F1 type details. Please note : it is not on any field F1