Using Taglib in jsp

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page binding="#{Page1.page1}" id="page1">
<ui:html binding="#{Page1.html1}" id="html1">
<ui:head binding="#{Page1.head1}" id="head1">
<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<ui:form binding="#{Page1.form1}" id="form1"/>
</ui:body>
</ui:html>
</ui:page>
</f:view>
</jsp:root>
where to include,
<%@taglib prefix="is" uri="http://com.examples.imageslider"%>
<f:view>
<h:form>
<is:ImageSlider id="imageSlider1"
url="/resources/image1.jpg,/resources/image2.jpg"
style="border: medium solid #000080;"
width="200" height="150"/>
</h:form>
</f:view>

Hi Riaz,
You can use same code in JSP
Java Code
import java.util.*;
class TestHashMap
public static void main(String args[])
HashMap hm=new HashMap();
//store some Objects.
hm.put("Rajib Sarma","100");
//duplicate keys are not allowed.
hm.put("Rajib Sarma","200");//The value "100" is replaced by "200".
hm.put("Sazid Ahmed","200");
//Display the contents of the HashMap
System.out.println("Displaying all the keys/values.\r\n");
System.out.println("Key\t\tValue\r\n");
//get all the keys
Collection c=hm.keySet();
//obtain an Iterator
Iterator i=c.iterator();
while(i.hasNext())
//obtain a key
Object key=i.next();
//obtain the value of the key
Object value=hm.get(key);
System.out.println(key +"\t" + value);
}//while ends
}//main ends
}

Similar Messages

  • 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

  • Error in using taglib uri in jsp

    When i write the following code in my jsp to use the tags, i got the error -
    JSP Parsing Error:The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application     
    And when i used the tld (html_basic.tld & jsf_core.tld), it gave me the error
    JSP Parsing Error:Failed to load or instantiate TagLibraryValidator class: com.sun.faces.taglib.html_basic.HtmlBasicValidator

    you can use
    <taglib>
    <taglib-uri>/WEB-INF/html-basic.tld</taglib-uri>
    <taglib-location>
    /WEB-INF/html-basic.tld
    </taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/jsf-core.tld</taglib-uri>
    <taglib-location>
    /WEB-INF/jsf-core.tld
    </taglib-location>
    </taglib>
    in your web.xml

  • Display HashMap values in JSP using Taglib in struts

    Hi ,
    I am new to struts and JSTL. I am developing Discussion Forums using Struts.
    I have HashMap object with(key & values) in My Action class.
    I want to diplay in my JSP as a List with html:links to do other process.
    How can I display HashMap values in my JSP. Which is the best way to display
    My intenetion is maxmum avoiding <%%> code in jsp.
    Which is the best way to display ?
    Can I diplay using taglib which is generic tag for any collection object ?
    Can any one help me ASAP.
    thanks
    Chandra

    Hi Riaz,
    You can use same code in JSP
    Java Code
    import java.util.*;
    class TestHashMap
    public static void main(String args[])
    HashMap hm=new HashMap();
    //store some Objects.
    hm.put("Rajib Sarma","100");
    //duplicate keys are not allowed.
    hm.put("Rajib Sarma","200");//The value "100" is replaced by "200".
    hm.put("Sazid Ahmed","200");
    //Display the contents of the HashMap
    System.out.println("Displaying all the keys/values.\r\n");
    System.out.println("Key\t\tValue\r\n");
    //get all the keys
    Collection c=hm.keySet();
    //obtain an Iterator
    Iterator i=c.iterator();
    while(i.hasNext())
    //obtain a key
    Object key=i.next();
    //obtain the value of the key
    Object value=hm.get(key);
    System.out.println(key +"\t" + value);
    }//while ends
    }//main ends
    }

  • Error while using mxml taglib in jsp

    Hi,
    I am getting following error while useing the mxml taglib in
    jsp for flex 2.0.1,
    java.lang.NullPointerException
    flex.webtier.server.j2ee.jsp.MxmlTagImpl.doStartTag(MxmlTagImpl.java:112)
    flex.bootstrap.BootstrapTag.doStartTag(BootstrapTag.java:77)
    org.apache.jsp.test_jsp._jspx_meth_mm_005fmxml_005f0(test_jsp.java:79)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:54)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    My jsp as below,
    <%@ taglib uri="FlexTagLib" prefix="mm" %>
    <html><body>
    <mm:mxml source="reports/sampleapp.mxml" />
    </body></html>
    If any one knows how to resolve above error, please help me,
    My email id : [email protected]
    Regards,
    Chandra Reddy

    did u deploy your dbadapter through console to the plan mentioned for deployment?

  • Using taglib in web.xml in WLS 9.2

    I am trying to build a web application in which the JSPs refer to a JSF taglib at the following URI(http://java.sun.com/jsf/core). When i deploy the application in WLS 9.2 and attempt to load this JSP, WLS says that it is unable to resolve this taglib. I added the following to web.xml to help the application find the taglibs.
              <taglib>
              <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
              <taglib-location>
              /WEB-INF/jsf_core.tld
              </taglib-location>
              </taglib>
              But now when i attempt to startup WLS, it looks like the appserver does not recognize the <taglib> as a valid element. It gives the following exception:
              Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee
              instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee
              ..." VALIDATION PROBLEMS WERE FOUND"
              Any clues as to what i am doing wrong here since I have seen documentation which shows using taglib elements in web.xml.
              Thanks
              Ramdas

    I figured out looking at one of the webapp samples that is packaged as part of WLS9.2 that the taglib element needs to be part of the jsp-config element.
              -Ramdas

  • 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 to use Flex in JSP

    Hi ,
    I am new to Oracle BPM . I have created a sample Process flow with Two Participants and two roles .And Also i have created the ScreenFlow using Jsp's . Now my problem is we need to integrate Adobe flex inside Jsp's or is there a way we can directly use Flex mxml files for UI . Is there way to use Taglibs which supports Adobe Flex in Jsp ..?
    Thanks,
    KM
    Edited by: user7711237 on Sep 23, 2009 5:00 AM

    This is a very interesting question. Please pardon my limited knowledge of OBPM and Flex, but it sounds like there are a couple of options.
    1. PAPI - build an external web app with Flex front end and a server server-side component that uses PAPI (or PAPI WS) for integration with OBPM
    2. JSP - this is a lot more hacky (if at all possible) - build custom JSPs using the standard OBPM taglibs, etc., and Flex app. Then use Flex / JavaScript interaction to invoke submit the from on the JSPs.
    Here are a few links for #2
    http://www.switchonthecode.com/tutorials/flex-javascript-tutorial-simple-interaction
    http://www.vipercreations.com/tutorials/Adobe%20Flex/35/
    http://www.abdulqabiz.com/blog/archives/2005/04/28/calling-a-flex-function-from-javascript/
    It almost sounds like #1 might be a good long-term solution for complex UIs, while #2 would fit better for a smaller and more simple Flex UI that need to be developed quickly. Hope others might offer better suggestions.
    HTH.

  • Unable to use jstl in jsp

    Already I read out the discussion about this topic. But still I face the same problem. I have already put the jstl and standard jar files in the WEB-INF\lib directory and modified the web.xml file adding the following lines.
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/lib/fmt.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
    <taglib-location>/WEB-INF/lib/fmt-rt.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/lib/c.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
    <taglib-location>/WEB-INF/lib/c-rt.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
    <taglib-location>/WEB-INF/lib/sql.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
    <taglib-location>/WEB-INF/lib/sql-rt.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
    <taglib-location>/WEB-INF/lib/x.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
    <taglib-location>/WEB-INF/lib/x-rt.tld</taglib-location>
    </taglib>
    In jsp page I have written the following lines.
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core-rt"%>
    <%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
    I have got the following error :
    org.apache.jasper.JasperException: File "/WEB-INF/lib/c-rt.tld" not found
    please help

    Just in case someone is still having problems, the better solution is not to have these entries in web.xml at all.
    To run JSTL, all you need are the two jar files (standard.jar, jstl.jar) in the WEB-INF/lib directory,
    - NO entries in web.xml
    - NO tld files
    - no problems!!!
    You then use the "standard" uri to import the taglibraries into your jsp pages.
    JSTL1.0 - <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    JSTL1.1 - <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    Use JSTL1.0 in Servlet2.3/JSP1.2 containers (Tomcat 4)
    Use JSTL1.1 in anything more than that.

  • DeclareControl taglib in jsp

    Dear all,
    I am trying to use "declareControl" in jsp in order to use a control method.
    But I found that it can't declare the control which I stored in a seperate
    Control Project. Is that taglib restricted us to declare control within same
    project? Thx a lot.
    <netui-data:declareControl type="dbControls.ProductsDBControl"
    controlId="productsDBControl"/>
    /Karen

    Karen--
    I'd suggest upgrading to SP2. I tried this with a custom control
    (JCS) and with a simple DB control which were both visible and invokable
    with that tag from a JSP.
    Try upgrading and let me know if you see the same problem.
    Hope that helps.
    Eddie
    Karen Law wrote:
    Well, I am using WLW 8.1 GA. I have built the Control Project before runing
    my jsp. The control can imported in my jsp successfully since I can read all
    methods in my Data Palette. But I don't know why error occur everytime when
    I run the jsp. It seems locating the control in same web application.
    Thx.
    Karen
    "Eddie O'Neil" <[email protected]> wrote in message
    news:[email protected]..
    Karen--
    Hi; a couple of questions...
    Are you using WLW 8.1 GA or SP2?
    Are you building the entire application before trying to run the JSP
    (Build -> Build Application)? The control project isn't necessarily
    built if you just run the JSP itself.
    Eddie
    Karen Law wrote:
    Below are error message:
    Tag Error
    Tag DeclareControl Errors 2
    Tag Error Message A Control of type "dbControls.ProductsDBControl"
    could not be declared because: weblogic.jws.WlwProxyException: Unable to
    create proxy for: /myWeb/dbControls.ProductsDBControl.jcx
    Tag Error Message Could not create control of type
    "dbControls.ProductsDBControl".
    "Karen Law" <[email protected]> wrote in message
    news:400b7d7d$[email protected]..
    Dear all,
    I am trying to use "declareControl" in jsp in order to use a controlmethod.
    But I found that it can't declare the control which I stored in a
    seperate
    Control Project. Is that taglib restricted us to declare control withinsame
    project? Thx a lot.
    <netui-data:declareControl type="dbControls.ProductsDBControl"
    controlId="productsDBControl"/>
    /Karen

  • Associating two events with submit button using  javascript in jsp

    Hi
    How can i Associate two events with submit button using javascript in jsp. Firstly it should insert the data to database and secondly it should close the same pop-up window

    Have something like :
    <input type="submit" name="submitbtn" value="Click me" onClick="function1(); function2(); " />
    You just call both functions sequentially, it's that simple. Although using javascript to work with a database, that seems a bit tricky.

  • Error while using Beans in JSP

    I am using netbeans to develop the applications and am using tomcat version (jakarta-tomcat-4.1.18).
    When I execute the following program i get the below mentioned error::
    StringBean.java
    package test;
    import java.beans.*;
    public class StringBean {
    private String message = "No message SPECIFIED";
    public String getMessage() {
    return message;
    public void setMessage(String message) {
    this.message = message;
    StringBean.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Using JavaBeans with JSP </TITLE>
    <LINK REL=STYLESHEET HREF="JSP-Styles.css" TYPE="text/css" >
    </HEAD>
    <body
    <jsp:useBean id = "SB" class = "test.StringBean" />
    initial value is : <jsp:getProperty name = "SB" property= "message"/>
    <jsp:setProperty name= "SB" property = "message" value= "this the message after the change"/>
    final value is :<jsp:getProperty name = "SB" property= "message"/>
    </body>
    </HTML>
    javax.servlet.ServletException: test/StringBean
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    Root Cause
    java.lang.NoClassDefFoundError: test/StringBean
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
         at java.lang.Class.getConstructor0(Class.java:1762)
         at java.lang.Class.newInstance0(Class.java:276)
         at java.lang.Class.newInstance(Class.java:259)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

    Ok The class isn't found, so your classpath settings of netbeans (if you are using the run function in netbeans) isn't set.
    and if you aren't using netbeans to run it, then the class isn't in the webapp/WEB-INF/classes
    good luck

  • 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 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);

  • When to use servlets and jsp in an application like  shoping cart?

    Hi All
    I m going to design and implement a web application using servelts and jsp. I am still at its requirements analyze stage.
    The application is almost likely a shopping cart. So if any of you have the deep knowledge about this domain with servlets and jsp please help me for a good design. What I realy need to know is that
    1. what are the core requirements for a shoping cart ?
    2. use cases ?
    3. best way to follow mvc with servlets and jsp for it?
    you can answer to this at the abstract level. no need to go in detail.
    if you have any documents like design and use cases mail me to [email protected]
    your cooperation is highly appreciated in this regards.

    Look into this kid
    http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Session-Tracking.htm

Maybe you are looking for

  • Smudge on display

    Hello everbody, i've encountered a quite annoying problem with my notebook display. It seems to have developed some kind of a "digital" stain i can't really get my finger on, having already searched the forum about similar issues, and none have reall

  • Just want to open it, not save it....

    when i click to open a document or something I've received, first computer asks me if i want to open it or save it. But when i click "open" it saves it anyway in the download folder!! could somebody pls tell me how to fix that??? tanx

  • I am having trouble connecting IPAD1 to wireless any suggestions?

    I am having trouble connecting my IPad1 to Belkin Wireless Router. It was working fine until a couple of days ago. I can use my IMAC okay via wireless. I can see my network on the IPad, but message comes up "unable to join the network XXXX". I have r

  • Problem in opening the app shadowgun

    My shadowgun dead zone is crashing whenever I try to open it

  • Explanation of some code samples

    Hello, can you explain me some code samples? First: try{ wdContext.currentBapi_Flight_Getlist_InputElement(). modelObject().execute(); catch (Exception ex){ ex.printStackTrace(); wdContext.nodeOutput().invalidate(); Second: Bapi_Flight_Getlist_Input