Please help me !  new to jsp

I am getting null pointer exception when i am trying to execute one combox to populate the other combo box. I am not able to understand where i am doing wrong. if anybody can guide me will be greatly appreciated,
My code in the servlet is
resultSet = statement.executeQuery("SELECT * from kiosk_hitcount where kiosk_name like 'Altoona%' and l_category ='" + request.getParameter("category") + "' group by l_categoryb order by l_categoryb asc");
Vector data = new Vector();
while(resultSet.next())
String rowdata= resultSet.getString("l_categoryb");
data.addElement(rowdata);
request.getSession().setAttribute("data", data);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/MyKiosk/CategoryTest.jsp");
rd.forward(request,response);
in jsp page:
<tr><td><Font size='2'><H3>Local Sub-Category:</H3></Font></td>
<td><SELECT name="bcategory">
<%
Vector data = new Vector();
data = (Vector)request.getSession().getAttribute("data");
for(int i = 0; i< data.size(); i++)
String catb = (String)data.get(i);
%>
<OPTION value="<%= catb%>" ><%= catb%></OPTION>
<%
%>
</SELECT></TD></TR>
Thank you ,
Mary

Here is the stackTrace for the Exception
java.lang.NullPointerException
at MyKiosk._0002fMyKiosk_0002fCategoryTest_0002ejspCategoryTest_jsp_82._jspService(_0002fMyKiosk_0002fCategoryTest_0002ejspCategoryTest_jsp_82.java:176)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Similar Messages

  • HT3209 Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
    Regards.

  • PLEASE HELP (Very New to web content)

    Hi guys. I made a website for a client in ImageReady. They
    wanted to be able to update with business news on thier own, and
    have me do the major site updates. I was thinking they could do
    this by me creating a blog on blogger for them and trying to figure
    out a way insert the blog into the website I created. I want to put
    into a specific spot on the website and the client wanted it to
    scroll so that customers can see previous posts. I know alot of you
    think that scrolling boxes kind of suck but for this purpose I
    really think it would work really cool. Can you please help me. I
    have very little knowledge of code. I am actually a video motion
    graphics guy, and because of my knowledge of photoshop started to
    move into web. So if you have to talk to me like an infant about
    the code, please do. : ) Here is the wbsite I want to add it to:
    http://www.xtremefitnessco.com.
    Text
    You can see on the main page the section I am using for the
    news. Thats were I want to put the scroll box. I guess I am asking
    how to do two things here:
    1. Insert a scroll box.
    2. And have that box pull from a web log that the client
    updates.
    Thanks for any help you can give me guys. Sorry for the
    novice question.
    P.S. Let me know if you think my design needs work or if you
    like it. : )

    >> if you think my design needs work
    All you have is a series of interchangeable images. You
    really haven't built
    a website. You have built an online PowerPoint show. There is
    no text. Turn
    off graphics in your browser and look at your site. Is that
    what you want
    some visitors to see?
    The mistake is building a site in Image Ready. Build your
    images there but
    add your text in DreamWeaver.
    Sorry, but were I you I would get a good book or two and
    start over. Might
    as well do it right than have a competent designer tell your
    client you did
    it wrong.
    Walt
    "lodus411" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi guys. I made a website for a client in ImageReady.
    They wanted to be
    able to
    > update with business news on thier own, and have me do
    the major site
    updates.
    > I was thinking they could do this by me creating a blog
    on blogger for
    them and
    > trying to figure out a way insert the blog into the
    website I created. I
    want
    > to put into a specific spot on the website and the
    client wanted it to
    scroll
    > so that customers can see previous posts. I know alot of
    you think that
    > scrolling boxes kind of suck but for this purpose I
    really think it would
    work
    > really cool. Can you please help me. I have very little
    knowledge of code.
    I am
    > actually a video motion graphics guy, and because of my
    knowledge of
    photoshop
    > started to move into web. So if you have to talk to me
    like an infant
    about the
    > code, please do. : ) Here is the wbsite I want to add it
    to:
    >
    http://www.xtremefitnessco.com.
    http://www.xtremefitnessco.com
    >
    > You can see on the main page the section I am using for
    the news. Thats
    were I
    > want to put the scroll box. I guess I am asking how to
    do two things here:
    >
    > 1. Insert a scroll box.
    >
    > 2. And have that box pull from a web log that the client
    updates.
    >
    > Thanks for any help you can give me guys. Sorry for the
    novice question.
    >
    > P.S. Let me know if you think my design needs work or if
    you like it. : )
    >

  • Please help uploading new site

    How do i overwrite an old site? My old website got wiped out when i installed the new iweb..now i made a new one but it would not overwrite the old one..Please help!!

    Hello Tamara
    Same problem here.
    Regards,
    Marco

  • Please help me resolve this JSP compilation error

    Hi,
    We have deployed our web app in Sun one web server 7.0 running on Sun os, and with JRE 5.0.
    Until recently, every thing was running fine, but since a few days, I am unable to get a JSP file compiled.
    This file, has a <%@include file= .. > to another file, and both these used to work fine earlier.
    This is the error message I am getting:
    <!-- org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:792)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:472)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:353)
    at com.bt.bmsnet.shared.BMSServletBase.forward(BMSServletBase.java:126)
    at com.bt.gma.web.AccountServlet.actionUpdateAccount(AccountServlet.java:2704)
    at com.bt.gma.web.AccountServlet.doGet(AccountServlet.java:5049)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:796)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
    at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
    Caused by: java.io.IOException: tmpFile.renameTo(classFile) failed
    at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:208)
    at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:131)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:336)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595)
    ... 23 more
    -->
    The line "Caused by: java.io.IOException: tmpFile.renameTo(classFile) failed" suggests that the JSP file isn't getting compiled into the corresponding servlet.
    Can some one please help?

    Yes I have done that. Simple JSP pages are compiling well. But I have about 5 jsps which call some partial jsp using
    <%@ include file="somefile.jsp" %>
    And all these files are showing this error.
    I have a feeling that this is probably due to some kind of restriction on file sizes of compiled jsps in the server. Is there any such restriction?

  • Please Help! NullPointerException on JSP Report

    I've been trying to run a JSP Report on Oracle 9iAS, but when I call it on browser the error below appears.
    Please, Help me!
    Reports Error Page
    Mon Jul 01 14:04:24 GMT 2002
    java.lang.NullPointerException:
    java.lang.NullPointerException:
         at oracle.reports.rwclient.RWClient.getTrace(RWClient.java:969)
         at oracle.reports.jsp.JspTagUtil.getRWClient(JspTagUtil.java:59)
         at oracle.reports.jsp.RwTag.setPageContext(RwTag.java:54)
         at oracle.reports.jsp.ReportTag.setPageContext(ReportTag.java:85)
         at bench.AssemblyHistory._jspService(_AssemblyHistory.java:55)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java, Compiled Code)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:435)
         at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
         at java.lang.Thread.run(Thread.java, Compiled Code)

    hi artur,
    please check if the reports server works correctly
    on your iAS installation.
    to check this run the test.jsp report from the
    reports server test page.
    you can find the test page by accessing the default
    home page of your webserver
    http://hostname.domain:port/
    click on the demonstrations tab - business intelligence and forms - reports services
    click on the 'Test a JSP Report...' link.
    regards,
    christian

  • Please Help: Installed new CPU (i7) now system won't boot.

    I'm hoping someone can help.
    I have an MSI H55M-P31 (MS-7636) motherboard, and I updated the BIOS to 1.A0.
    But when I installed the new CPU, I get 3 Long beeps, and then my computer won't boot.
    I have 4Gigs of Memory
    Current CPU: (working 100%)
    3.07 gigahertz Intel Core i3 540
    64 kilobyte primary memory cache
    256 kilobyte secondary memory cache
    4096 kilobyte tertiary memory cache
    64-bit ready
    Multi-core (2 total)
    Hyper-threaded (4 total)
    500watt PSU
    Please Help, I don't know what to do now. (did check CPU compatibility on website - i7870)

    What PSU is that and what are the ratings of that PSU ? See the label on the side.
    Are you trying to use the onboard graphics?
    That CPU does not have integrated graphics.  http://ark.intel.com/products/41315

  • Sky Hub keeps disconnecting... please help? New customer...

    Hello there, I am a new customer to Sky only joining last month, and  my broadband hub keeps disconnecting. I use wifi which is normally good, but the last week or so, every day our hub shows an Orange face, which I know sometimes means it's updating, so I leave it for one hour or more,  and it still does  not show white and we cannot connect to wifi. We have to restart the modem everytime for it to work, and have to keep doing this every day now... please help? As i dont think we should have to keep restarting our hub everyday for it to work. Many thanks,Hayley

    That might well be one of the most ridiculous posts I've seen on here.
    If you want help then provide us with more information including your router statistics,the exact issue/issues your having along with what Sky have so far done to try to rectify them.

  • Please help Installing new Hard Drive.  PLEASE HELP

    I know this topic has been posted before and I have read all the reviews but still nothing ..
    I m trying to install a new hd. I put the screws where there needed to go, plugged in all appropriate SATA plugs into new HD, went to dicl utility and no new HD shows up to initialize or format. Please help me .. I have purchased a 500 gb Seagate HD from ramjet.
    Item:
    Seagate 500GB SATA II 7200rpm 16mb
    Specifications:
    Capacity: 500GB
    Performance
    Rotational Speed: 7200rpm
    Buffer Size: 16mb
    Transfer Rate
    Serial ATA (G/s): 3.0G/sec
    Average Seek: < 8.5ms
    Average Latency: 4.16ms
    I have installed and uninstalled the new HD about 5 times already. Please help me

    On older ATA drives there are little plastic tabs that, depending on configuration, designate a drive as "Master" or "Slave." If both drives are configured as "master" it can sometimes cause one not to be seen by the computer.
    I only mentioned it because:
    A) I had it happen 2x with my old G4.
    B) Most new drives are shipped with the jumpers in "master" position, I'm guessing because they assumed most people were replacing their primary drives, not adding them.
    Check out these links for more about jumpers on drives.
    http://www.seagate.com/support/kb/disc/ref/jumper_settings.html
    http://www.pcmech.com/show/harddrive/43/
    Good luck!
    -K

  • PLEASE HELP! New laptop won't recognise iPod.(Malfunctioned?)

    My new laptop and old iPod don't recognise each other. My iPod won't show any sign of life because my laptop refuses to charge it and says that the device has malfunctioned and windows doesn't recognise it. *PLEASE HELP!* many people have asked this question, but have not been answered. I really need some help.:( Thanks to anyone that answers. Charlie.xxx

    My iPod won't show any sign of life because my laptop refuses to charge it and says that the device has malfunctioned and windows doesn't recognise it.
    In the course of your troubleshooting to date, have you worked through the following document?
    [iPhone, iPad, or iPod is not recognized by Windows due to driver installation issues|http://support.apple.com/kb/TS1538]

  • Please help a new u

    Hello I have just bought a new Zen Vision M 30GB music player. My problem is that i have lost everything except the player itself( left it in my rental car in SC) I have no idea what to do. Can i buy a new USB chord? can i get the software online? if so what. Please help me i really want to use my MP3 player with-out having to buy a new one. Any help would be great!

    Chrismic3 wrote:
    how do i know if a file is m4a? and what is the proess to go about converting these files?
    Sorry, I don't have much experience with converting iTunes, as I've never installed it on my computer.
    To find out if it's .m4a, it should be listed at the end of the song.
    If not, select one of the tracks, right click it and scroll down the menu to Properties.
    It should give you the file extension and be listed something like this: <i>Song_Title.m4a</i>
    As for converting the songs to .mp3, again it's not something I've often had to do. There should be an explanation in that Xilisoft Audio Converter link I posted above.
    If that doesn't help, maybe this article will help.

  • Please help - Brand new X1 Carbon defective out of the box - is this normal? what should I do next?

    Hello all,
    So, as a loyal Lenovo customer I decided to purchase the X1 Carbon 2nd Gen (non-touch, I5 version).
    Last week I finally received it.
    Unfortunately, the first thing I noticed was a defective touchpad - very loose, the right bottom corner was not solid
    enough and made a weird noise while clicking it. It drove me crazy since I am used to the top build quality the Thinkpad series offers.
    I took to the local Lenovo service center, they actually replaced it on the spot and it made it better, not great but better. I still think there is something wrong there, since the bottom two "buttons" don't feet and sound as good as the upper ones.
    But that I can tolarate.
    The thing that really pissed me off was this: To me demise, after using the laptop in a dark room I noticed this massive screen bleed :
    (apologize for the ling stream of pics, didn't know how to thumbnail them)
    My question to you guys, is this okay? is this an acceptable bleed? or should I do whatever it takes to get it repaired/replaced?
    I just hope they will know how to handle this here at local center, as from my experience dealing with computer reps here, the local Lenovo agent (which is actually the importer)  will not replace it for me (their excuse is that it wasn't bought in this country)
    This is amazing, in one year Lenovo has lost it's entire reputation over the 2nd Gen X1 carbon.
    Please help me. what should I do?
    Thank you very much.

    The official method of creating / escalating to a complaint is to call support, with previous call numbers handy, and request the representative to escalate your case to a complaint.  They will then create a complaint on your behalf and also be able to inform you about the complaints proceedure.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Please Help The New Guy

    Hey Guys,
    I got my MacBook 2012 13inch for my birthday a couple days ago,
    i went to redeem a voucher in the Mac App Store and it asked me to provide my password for my apple account so i put it in and it said "ConnectionManager::invoke::Failed to find service connection url."
    i wonder if anybody else has encounted this problem and has found a good troubleshoot,
    ive been on chat to the support staff for the past 45 mins and nothing they said has worked.
    please help guys...
    many thanks

    Hey Guys,
    I got my MacBook 2012 13inch for my birthday a couple days ago,
    i went to redeem a voucher in the Mac App Store and it asked me to provide my password for my apple account so i put it in and it said "ConnectionManager::invoke::Failed to find service connection url."
    i wonder if anybody else has encounted this problem and has found a good troubleshoot,
    ive been on chat to the support staff for the past 45 mins and nothing they said has worked.
    please help guys...
    many thanks

  • Please Help on ControllerServlet-DataAccessObject-JSP

    Hello,
    First of all sorry if this seems an obvious simple issue. I am new to Servlets and JSP and am trying to develop an application using these technologies.
    I once found a question on the forum but can't seem to locate the link for reference. Many thanx to those guys because the code is from their discussion and am just trying to understand it.
    I will later get the records from the database using the same concept + some other design patterns I have read on(action classes etc).
    I have a controller servlet TestControllerServlet.java which forwards the request to a jsp page for display. The servlet gets ArrayList (from the data access object)of objects and stores it inside an HTTP Request then forwards the request to a JSP page. Each record is store a JavaBean instance.
    When I access the controller servlet I don't get the info from the records(I just get a blank page).I have included the code below:
    TestControllerServlet]
    package test_javabean;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.ArrayList;
    public class TestControllerServlet extends HttpServlet {
        public void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            //Getting the ArrayList of Objects from the database
            DeclarationDataAccess declarationDataAccess = new DeclarationDataAccess();
            ArrayList<DeclarationBean> dataRecords = declarationDataAccess.getDeclarationRecords();
            //Store the ArrayList of objects into HTTP Request
            request.setAttribute("dataRecords", dataRecords);
            //Forward the HTTP Request to a JSP page
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher("/TestDeclarationView.jsp");
            reqstDisp.forward(request,response);
        public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
    TestDeclarationView
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <html>
        <head>
            <title>JSP Page</title>
        </head>
        <body>
            <jsp:useBean id="declarationRecords" class="java.util.ArrayList" scope="request"/>
            <h1>Test Declaration</h1>
            <c:forEach var="currentRecord" items="${declarationRecords}">
                First Name: ${currentRecord.firstName}</br>
                Surname: ${currentRecord.surName}
            </c:forEach>
        </body>
    </html>
    DeclarationDataAccess
    package test_javabean;
    import java.util.*;
    public class DeclarationDataAccess {
         public ArrayList<DeclarationBean> getDeclarationRecords() {
            ArrayList<DeclarationBean> declarationRecords = new ArrayList<DeclarationBean>();
            DeclarationBean declarationRecord;
            declarationRecord = new DeclarationBean();
            declarationRecord.setFirstName("AiEx");
            declarationRecord.setSurName("Kuomboka");
            declarationRecords.add(declarationRecord);
            return declarationRecords;
    DeclarationBean
    package test_javabean;
    import java.sql.*;
    import java.io.*;
    public class DeclarationBean implements Serializable{
        private String firstName;
        private String surName;
        public DeclarationBean() {
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getSurName() {
            return surName;
        public void setSurName(String surName) {
            this.surName = surName;
    }problems:
    1. I can't understand why am getting a blank page
    2. in the TestDeclarationView.jsp I haven't understood well(from the example on the forum) why the class in <jsp:useBean id="declarationRecords" class="java.util.ArrayList"> I thought it should be <jsp:useBean id="declarationRecords" class="test_javabean.DeclarationDataAccess"> but when I do so I get the error: "javax.servlet.ServletException: Don't know how to iterate over supplied "items" in <forEach>;"
    Thank you in advance for the help.

    I always use scriplets instead of the JSP tag libs so lost touch on the JSP tag libs. Still , probably I can help you. The only problem I see in the code is regarding the id.
    Please change the following line of code
    <jsp:useBean id="declarationRecords" class="java.util.ArrayList" scope="request"/>
    to following
    <jsp:useBean id="dataRecords" class="java.util.ArrayList" scope="request"/>
    probably its the name which is creating the problem.
    Hope this helps.
    Thanks

  • Please Help with my first jsp

    Hi, this may seem basic to you but i've frying my head with simple jsp. Any books i looked at only show code segments!
    All i want to do is create an html entry page with form fields for username, password, email address, send the information to a jsp page that validates the form entries and then stores the info in database, and be able to display the info stored in the db also.
    Any help or pointers would be appreciated, or links to good tutorials!
    Thanks in advance.....

    with this i am sending my own code :
    its a html page :
    <Script LANGUAGE="JavaScript" ></Script>
    <%@ page import="java.util.*" %>
    <%@ page import="java.lang.*" %>
    <html>
    <head>
    <title>Login</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Microsoft Theme" content="expeditn 011">
    </head>
    <body background="exptextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#993300" vlink="#666600" alink="#CC3300">
    <!--mstheme--><font face="Book Antiqua, Times New Roman, Times">
    <form name="frmlogin" method="post">
    <p> 
    </p>
    <p> 
    </p>
    <p> 
    </p>
    <p> 
    </p>
    <p>                                                       
    User Name : 
    <input type="text" name="txtname">
    <br>
    <br>
    Password   : 
    <input type="password" name="txtpassword">
    </p>
    <p>                                                                    
    <input type="submit" name="submit" value="Submit" onclick="javascript: return loadmy('sub')">
    </p>
    </form>
    <script>
    var i=0;
    function loadmy(val)
              if(val=="new")
                   document.frmlogin.action='form.jsp';          
              }else
                   if(onCheck())
                        document.frmlogin.action='login.jsp';
                   }else
                        return false;
    function onCheck()
         if(document.frmlogin.txtname.value=="")
              alert("Please enter user name ..");
              document.frmlogin.txtname.select();
              document.frmlogin.txtname.focus();
              return false;
         if( document.frmlogin.txtpassword.value=="")
              alert("Please enter password ..");
              document.frmlogin.txtpassword.select();
              document.frmlogin.txtpassword.focus();
              return false;
         return true;
    </script>
    <p> </p><!--mstheme--></font></body>
    </html>
    IN this page i am taking user name and password. ok?
    now another JSP file with database connection is here: I think you have enough idea for database connection. So i'll ommit that.
    <html>
    <head>
    <title>Login Result Page</title>
    <meta name="Microsoft Theme" content="expeditn 011">
    </head>
    <%@ page import="java.lang.*,java.sql.*"%>
    <%@ page import ="Database.*" %>
    <body background="exptextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#993300" vlink="#666600" alink="#CC3300">
    <!--mstheme--><font face="Book Antiqua, Times New Roman, Times">
    <%
         String uname = request.getParameter("txtname");
    String password = request.getParameter("txtpassword");
         String pquery="Select * from login where uname='"+uname+"'";
         String query="Select * from login where uname='"+uname+"'and password='"+password+"'";
         ClsDataBase cdb = new ClsDataBase();
         Connection con = cdb.getConnection();
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(pquery);
         if(rs!=null)
              if(rs.next())
                   ResultSet r=stmt.executeQuery(query);
                   if(r!=null)
                        if(r.next())
                        session.setAttribute("uname",uname);
                        session.setAttribute("Lflag","true");
    %>
    <p><font size=4 color="green">Wel Come <%= uname %>!!!</font></p>
    <p>
    <form action="listofuser.jsp" method="post" name="f1">
    </form>
    <%                    }
                        else
    %>
    <p> <font size=4 color="red">Wrong Password.</font> </p>
    <p><font size="4" color="green">Go back to login screen</font></p>
    <%
              else
    %>
         <font size=4 color="red">Invalid user....</font>
         <p><font size="4" color="green">Go back to login screen</font></p>     
    <%
         stmt.close();
         cdb.close();
    // conn.close();
    %>
    <!--mstheme--></font>
    </body>
    </html>
    hope this will help you. bye....

  • Please help me with the jsp page

    Hi,
    I have a parent jsp page. I have a button in that page. If I click the button in the parent page, a child page will be opened which consists of huge data. I have set an option such that if I click the jsp page it asks to open directly or save so as to edit the data in MSWORD format. The child page has a print button at the end of the page which prints all the data. But since the data is very vast I want page breaks at certain places so that when I edit the data and click print button it prints the data with page breaks at certain points. I know that in MSWORD we have page breaks. But I should not do it manually as there would be thousands and thousands of pages to be printed.
    ANY IDEA OR HELP IN THIS MATTER IS GREATLY APPRECIATED. I HAVE BEEN TRYING TO SOLVE THIS MATTER AND POSTED IN MANY SITES. BUT NOBODY RESPONDED. ATLEAST PLEASE LET ME KNOW IF THE IDEA WHICH I MENTIONED IS WORNG OR NOT.
    THANKYOU
    MOUNTAINEER

    use java report?

Maybe you are looking for

  • HELP! Extremely slow response to most things...

    I rebooted my NLSBS9 server last night. It's a Dell PowerEdge 1750 with two 146Gb RAID-1 disks and 1Gb of RAM. It's been working fast until now. I hit F2 and watched the reboot process. All was fast and good until "Starting Apache...". At that point,

  • Purchase List Based upon Vendor Category

    Dear Sir, For our Excise related requirement , we are required to prepare a Material Purchase Report . The report should display  Material purchased from "Manufacturer"  , "Trader" seprately . Sir, my query is that from material purchase record say E

  • How to configure log4j in oracle bpm

    we can put log4j.jar in obpm and can use that as a logger, But I dont know the concepts of log4j. Can anyone please help me know what all we need to do to configure this, what relations are there between log4j.jar, log4j.properties, where to keep the

  • RSS Reader Ajax Portlet for Workshop 9.2

    Hi, is there any available example of RSS Reader Portlet with Ajax support for Workshop 9.2? Any help is well accepted, thanks, Ben

  • Why doesn't a wmv movie embedded in Powerpoint play, when I've downloaded Flip4Mac?

    When I play the movie directly (outside Powerpoint) using FlipPlayer, there's no audio.  When I play it using QuickTime, it plays fine. However when I try to play it in PowerPoint, it says Codec Unavailable and won't play at all. The Powerpoint file