How can use interface in JSP?

hi! friends i have one dought in JSP? it's possible interface in JSP? how?
waiting for ur reply!

hi
i think u can not use interface in JSP but u can extend a class which implements an interface

Similar Messages

  • How can use ' Vector ' in JSP

    I use rs.getString(1); can get three strings like "12:00-13:00", "01:00-02:00", "02:00-03:00" from sql 2000. I would like these time one by one, if it equals user select. System will show the message...then I use following code...but doesn't work because jsp said Vector not a type.(cannot resolve).... I would like to know any other methods can do the same things. hope sb help... thank you
    Vector stringVector = new Vector();
    while(rs.next()){
    stringVector.addElement(rs.getString(1));
    Iterator sv = stringVector.iterator();
    while (sv.hasNext()){
    if(time.equals((String)sv.next())
    out.println("wrong");
    else{
    ......

    I personally would use an ArrayList. From what I hear, it's better than a vector. You want to make sure that you include the line at the top
    <%@ page import = "java.util.ArrayList" %>
    ArrayList stringVector = new ArrayList ();
    while(rs.next()){
    stringVector.add(rs.getString(1));
    for (int i =0; i < stringVector.size(); i++){
       if(time.equals((String)stringVector.get(i))
       out.println("wrong");
    else{No need to bother with any of that iterator stuff. My guess is that you're not including the Vector below, or a required jar file is missing (but Vector is part of the core java package, so the file can't be missing)

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use cookies in jsp

    Hi all,
    I'm new to jsp, please let me know how to use cookies with jsp.
    I have three web applications, in run time I have to switch from one application to another application based on single login page. I have taught cookies are one of the solution. But while I'm googling I unable to get such a good material.
    please give some examples,
    Thanks in advance.
    achchayya

    Read a cookie in jsp
    HttpSession session = request.getSession();
    Cookie cookie_session = getCookie(request, "COOKIENAME");
              if (cookie_session == null) {
                   sesID = session.getId();
              } else {
                   sesID = cookie_session.getValue();
              }or
    get all cookie in the browser
    This gets all the cookies and according to the cookie name given u can get the cookie value
    Cookie[] cookies = request.getCookies();
              if (cookies != null) {
                   for (int i = 0; i < cookies.length; i++) {
                        if (cookies.getName().equals(cookieName))
                             return cookies[i];
                   }but i am not sure if this works for ur requirement try and see                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use threads in JSP???

    hello
    i want to use threads with JSP.
    i want to write a jsp page which will
    start 2 different threads. the 1st thread should just display a message and the second page should redirect this page to another jsp page.
    till the redirection is goin on, the message should be displayed in the browser from the 1st thread.
    i dont know actually how to use threads in JSP by implementing the Runnable insterface, if not m then how do i do it ??
    thanx
    Kamal Jai

    Why do you want to use threads to do this ??
    If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
    I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows.

  • How to use datagrid in jsp ?

    Hi All ,
    Can any body let me know , how to use datagrid in jsp pages .I have downloaded the taglibs-datagrid.jar file and taglibs-datagrid.tld. I have saved the .jar File in the WEB-INF/lib and .tld to the WEB-INF directories.
    I wrote a program that is getting a collection from the request and i just want to display the objects in the datagrid.Please help me out of this problem.It's better to explain with example. Waiting for a response.
    Regards,
    Rakesh

    Why do you want to use threads to do this ??
    If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
    I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows.

  • How can use files *:SCR in AS400

    Actually I working with OLAP ESSBASE in a AS400.<BR>I need create a process to automated the clear all of a Cube<BR>I know the process in Windows<BR>Create a notepad file with this sentences and save file with the extension SCR<BR>            LOGIN "Machine" "User" "Password" "Application" "Database";<BR>            RESETDB ;<BR>            EXIT ;<BR>Then, create a file :bat with a sentence<BR> ESSCMD FILE.SCR<BR>and finally execute the file *.bat<BR><BR>In AS400 the ESSCMD have a lot parameters:<BR><BR> RUN ESSBASE/400 COMMANDS (ESSCMD) <BR> <BR>INPUT FILE NAME . . . . . . . . INFILE NONE         <BR>  LIBRARY  . . . . . . . . . . .                  LIBL <BR>INPUT MEMBER . . . . . . . . . . INMBR FIRST        <BR>OUTPUT FILE NAME . . . . . . . . OUTFILE        NONE <BR> LIBRARY . . . . . . . . . . . LIBL       <BR>OUTPUT MEMBER NAME . . . . . . . OUTMBR         FIRST <BR>ERROR LOG FILE NAME . . . . . . ERRFILE NONE         <BR>  LIBRARY  . . . . . . . . . . .                  LIBL <BR>ERROR LOG MEMBER NAME . . . . . ERRMBR FIRST        <BR><BR>I tested with a file source and a member TXT with the sentences of the file .scr<BR>and then put every parameters in a INPUT options and run the Command, but inmediatelly show me the next screen :<BR> Essbase Command Mode Interface - Release 6.5.4 (6.5.4) <BR> Copyright(c) 1991-2003 Hyperion Solutions Corporation. All rights reserved. <BR> <BR> U.S. Patent Number 5,359,724 <BR> U.S. Patent Number 6,317,750 <BR> <BR> <BR> ESSCMD/400 is running in AS/400 interactive mode <BR> ESSCMD/400 is using *COMPLETE script syntax                                 <BR>                                                                             <BR>                                                                             <BR> ESSLANG environment variable not set                                        <BR>                                                                             <BR> Using default locale "English_UnitedStates.US-ASCII@Binary"...              <BR>                                                                             <BR> (Wed Feb  1 16:18:52 2006)Local////Error(1040007)                           <BR> Error 1040007. Cannot find message database                                 <BR><BR><BR><BR>Can somebody help me?<BR>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    There's a sample in the FABridge.zip download (called
    EmptySwf.as) that
    shows how to use the bridge in a non-framework actionscript
    only app.
    There's nothing in the bridge that requires the framework.
    Jason Szeto
    Adobe Flex SDK Developer
    "wlt008" <[email protected]> wrote in
    message
    news:e4c2k4$rob$[email protected]..
    >I want to build an ActionScript project instead of flex,
    how can use
    >FABridge library in my project?

  • How can i access the jsp file in a asp file

    Hi every one..
    we have two projects one is developed in ASP and one is developed in JSP both are running in two different locations.
    now i want to include a jsp file from one project to ASP file in the other project.
    please tell me how can i insert the JSP file in ASP application.
    thanx in advance.

    Wouldn't that be an ASP question for an ASP forum?

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use EJB in JSP...urgent!!!

    hello,
    i am novice programmer in EJB.
    i am using weblogic 6.1 ...
    my problem is how to use EJB in jsp page.
    my code is as follow..but its not displaying any result.
    <%@ page import="javax.naming.InitialContext,
    javax.naming.Context,
    java.util.Properties,
    firstEJB.First,
    firstEJB.FirstHome"%>
    <%
         long t1 = System.currentTimeMillis();
         System.out.println(t1);
         Properties props = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
         props.put(Context.PROVIDER_URL, "localhost:7001");
         Context ctx = new InitialContext(props);
         FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
         First bean = home.create();
         String time = bean.getTime();
         bean.remove();
         ctx.close();
         long t2 = System.currentTimeMillis();
    %>
    <html>
         <head>
              <style>p { font-family:Verdana;font-size:12px; }</style>
         </head>
         <body>
              <p>Message received from bean = "<%= time %>".<br>Time taken :
              <%= (t2 - t1) %> ms.</p>
         </body>
    </html>
    please tell me the solution.

    Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
    FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class);

  • How can use linux in my macbook?

    how can use linux in my macbook?

    You can use various distributions of Linux either by running them under Boot Camp, or in a virtualized environment such as Parallels or VMWare's Fusion. Note that you may have to try several different distros until you find one that works. I settled on Ubuntu running under Parallels.
    Best of luck.

  • How can use my songs as my ringtone...???

    How can use my songs as my ringtone...???

    You have to create the ringtones.
    Type "create iphone ringtones" inot the google search bar.  I did and got several links to learn how to make ringtones.

  • How can use my Wireless Location Appliance to work with RF ID's?

    How can use my Wireless Location Appliance to work with RF ID's for Asset Tagging.
    It seems Smartcard used for ID cards have a small RF ID, can I use this for Asset Tagging?
    Thanks in Advance

    There are two kinds of RFID tags: Active tags, which have a battery or other internal power source, and passive tags, which have no power source and work by reflecting the energy from an RFID scanner (basically). At the energy levels and distances used for WiFi location detection, passive tags will not return a detectable signal.
    Take a look at http://www.aeroscout.com/ for more info on WiFi RFID tagging.

  • How to use taglibs in JSP for Database access

    Hi
    Could any one please tell me how to use taglibs in JSP for Database access
    with regrds
    Jojo

    This is a sample how to connect to a MySQL database with JSTL 1.0:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>JSTL MySQL</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <c:catch var="e">
    <sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
                           user="Your_Username_Here" password="Your_Password_Here"
                           driver="com.mysql.jdbc.Driver"/>
    <c:out value="datasource= ${datasource},  Class = ${driver.class}"/>
    <br />
    <br />
    <sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
    <table>
    <%-- Get the column names for the header of the table --%>
    <c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
    <tbody>
    <%-- Get the value of each column while iterating over rows --%>
    <c:forEach var="row" items="${deejays.rows}">
      <tr><c:forEach var="column" items="${row}">
            <td><c:out value="${column.value}"/></td>
          </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    </c:catch>
    <br />
    <br />
    <c:if test="${e!=null}"><span class="error">Error</span>�
      <c:out value="${e}" />
    </c:if>
    </body>
    </html>And this thread might help you:
    http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

Maybe you are looking for

  • How to open iPhoto in the new update ??

    Why can i no longer open iPhoto after the Yosemite update ?

  • Cannot connect to Exchange server (Small Business Server 2008) using Windows 8.1 and Outlook 2013

    I am at my wits end. I have got a new PC running Windows 8.1 and Outlook 2013 simply WILL NOT connect to my work Exchange server. The REALLY annoying thing is that the Windows Mail client inbuilt to Windows 8.1 works perfectly! But I have to have Out

  • Photo stroke effects in InDesign?

    I'm creating an annual report in InDesign and I'm placing a photo on a page. I'd like the photo to have a ragged edge effect, like you could achieve in Illustrator with a box that has a torn edge brush stroke. However, there seems to be no brush effe

  • Where clause causes empty values

    Hi All, question: I have a query where I use a filter for DateTime. If I use it only for one day the query works. But if I change it and expand the period for 2 days, the query just returns a zero velue. Could you please explain me how could that be

  • Slideshows on HD TV's

    I am using DVDSP to make slideshows. When I am in the Simulate mode of DVDSP, I can switch from SD to HD720, and to HD 1080. When I go to the HD modes, the picture gets burry. How can I made Standard DVD's using my slideshows from DVDSP that will not