JSP - Servlet - Please help

Hi:
Can any one suggest me the code for the following scenerio, Am new to jsp-Servlet....
I need to give an EMPNAME in a Textbox on clicking GO button from my JSP page, a servlet must process thei query and display the output of that employee details back to that JSP page..
Please help me out with some code snippets...
Regards,

The sun's site provides a detailed introduction to JDBC. or
have to google for JDBC and once you've understood the JDBC concept, then you could progress from there. There is no simple way of doing what you asked.
You will need a database, though you could use MS Access. But you still need the JDBC.

Similar Messages

  • Synchronized problem in JSP/Servlet, please help me.

    Hi, all
    I have many processes in one JSP page or Servlet program of my project.
    When many people visit at one time, then the project throws some SQL/DB Errors.
    I have updated it and test it many times, I think, that is a synchronized problem.
    At last I used ��synchronized (this){my JSP/Servlt SQL/DB processes}�� to synchronize
    The process. Then the errors removed.
    And now I think that too danger to use the ��synchronized (this){}�� to synchronized.
    If use it then some other problem may be growling on. Such as when one people need to use
    This service others must to wait, the process may be too slow! And when an exception throws
    from the SQL/DB or some other place, what I do? Need any advice from you.
    Sincerely
    Urey
    *** my JSP/Servlt Server is tomcat ***

    As Chuck points out, there isn't a new instance of the Servlet/JSP for each request - they are probably all calling the same instance so any state will be shared. If your Connection is stored as a member variable then you'll have problems with it already being in use if two people hit the page at the same time.
    Limited resources such as database connections should ideally be pooled anyway to ensure that you're not opening them all the time and that you can control how many are open across the entire application. Then you'd simply need to get a fresh connection out of the pool at the top of the page and make sure you put it back when you're done.
    Incidentally, although it might work, synchronizing the database access in the JSP would be a bad idea since you'd just create a queue of requests waiting to use the one Connection whereas you really need a number of Connections to deal with everyone simultaneously.
    If you need some example code for a simple JSP using a database connection pool (DataSource) just say.
    Hope this helps.

  • Problems with Servlet  to JSP communication please help!!!

    Hello All ,
    we have different web applications running
    e.g.
    We have 2 webApp named A and B are running and there URL are
    http://localhost:8080/A and
    http://localhost:8080/B
    and we have one common WebApp running at
    http://localhost:8080/common
    Our problem is that whenever a user log in to the system he/she will first call the
    common URL and then enter his user name and password
    and depending on his username we have redirect user to either A or B with his pasword and username as parameter to the request.
    i.e. in common module whenever i get userName and password we call a Servlet to authenticate the user and to detemine which webapp to forward to..
    i have to call jsp accordingly from servlet in common webApp to JSP in different webapp.
    I m wonderning how it is possilble.
    As
    i don't know how to call another webApp using
    RequestDispatcher.forward () method and
    also
    i am not able to set paramters with the request whenever i user response.sendRedirect() method
    I am wondering what could be the way to pass paramer to the request from servlet in one webApp to JSP in another webApp
    Please help its urgent!!!
    thankx in advance

    forward() can't call another webapp.
    There are several ways you could do this.
    1) Share the session object across both webapps and set something as an attribute of the session.
    2) Use a database or file storage to record the transaction, then go to the second webapp, which picks up that info.

  • Problem with Accessing Deployed Servlets Please help, very urgent.

    Inspite of going through lots of Docs. I am not able to access the JSP which is deployed using JDeveloper 3.2 in the browser? What should be the URL and where should I place the JSP and the related files in the Apache Server (Specific directory)?
    Please help, this is very Urgent.
    Could I get some sites where I can get detailed description of how to deploy and access Servlets and JSPS using JDeveloper 3.2 for OAS 9i?
    Thanks in advance,
    Regards,
    Kavita.
    null

    Hi Kativa,
    In answer to your first question: In most apache installs, you want to place all your JSPs under the Apache/htdocs directory. This htdocs directory becomes the root directory of your HTTP request, so, for example, to access the file
    Apache/htdocs/mydir/myJSP.jsp
    you'd point your browser to
    server:port/mydir/myJSP.jsp]http://server:port/mydir/myJSP.jsp
    As to your second question: Do you mean Oracle 9iAS? If so, look at this HOWTO: http://technet.oracle.com:89/ubb/Forum2/HTML/006398.html
    JDeveloper 3.2 does not support deployment to OAS (the predecessor to iAS), but there was no OAS 9i.
    null

  • New with Servlets - please help

    Hello:
    I am using JDev to work with JSPs/Servlets .Can someone please direct me how to setup JDev to work with JSPs and Servlets.
    Question 1: I downloaded JDev Full Version which said that it included JDK1.5 . But I don't know where it installed it. I just unzip the folder. Do I have to install JDK differently?
    Q2: Using Tomcat Application Server - it asked to locate the folder where JRE is installed . Where can I get that info.
    Q3 : How to setup Servlets so that I can load a servlet file in the browser. I created a "Hello World" app using Servlets but I can't load it .
    I will appreciate you help.
    THanks

    user517625,
    First, for your information, Tomcat is a servlet container, not an application server. Second, Oracle JDeveloper includes an [embedded] application server: OC4J. So you don't really need Tomcat if you only want to create and test some servlets and JSPs. JDeveloper includes extensive "help" information and sample code that shows you how to create servlets and JSPs.
    Good Luck,
    Avi.

  • Issue about jsp taglib,please help

    Hello all,
    I want to use jsp tag like following:
    <c:import url="xxx.jsp">
    <c:param name="xxxAction" value="<portlet:renderURL/>"/>
    </c:import>
    and the value of the c:param can not accept the value generated by the <portlet:renderURL/> tag.
    I can resolve the issue by writing java code in the jsp(like ...java code...<c:param name="xxxAction" value="%=...%"/> ),much java code occur in the jsp,I do not like this solution.
    anybody has good solution please help me.
    thanks and rgds.

    Ram is correct. You can't nest custom tags as attributes to other custom tags.
    In this case the <c:param> tag offers the option of specifying the value as the body of the tag though, so the following should work:
    <c:import url="xxx.jsp">
    <c:param name="xxxAction"><portlet:renderURL/></c:param>
    </c:import>

  • Junk characters like" � � "displayed in the jsp page please help.

    Hi,
    I am getting junk characters like � � displayed in the jsp page.
    In the JSP page i used javascript "& nbsp" for appending spaces to a string "CCR" to get "CCR " .
    Now the Resultant string "CCR " has three spaces appended to its right.
    This String is set in session in that JSP page.
    In the next JSP page i am getting that string from session.
    After getting the string the "substring" function is performed to get only the first 5 charcters of the string. Now the result is displayed as " CCR� � " with has last 2 characters as junk values � � insteed of displaying as "CCR ". Please help me in solving this issue.
    Please note that initially the sting "CCR" is got from the Oracle database in Solaris Machine.
    Regards,
    Vijay

    have you tried:
    strenuously inspecting the string that is coming from the db? do an actual loop over the string, character by character, dumping to System.out to make sure the characters are EXACT coming out of the db.
    note you have to append " " not just "& nbsp"
    post the code that is doing the output. the relevant bean code, the jsp, everything relevant - WITH COMMENTS discussing where things are happening.
    Also, is it "weird characters" in the browser only? have you done a view source on the actual html source that the browser is rendering (right click in IE and click view source). browsers can act odd if you don't feed then exactly what they want, and it looks like you're feeding it escaped characters that it is rendering as something else.

  • Error in JDBC while using in a Servlet.Please HeLP!!!!!!!

    &#304;s there any one can help me I will be very glad.
    I'm preparing a homework for University and have a small(for me B&#304;&#304;G) problem.
    I want to make a database connection with servlet .
    as a full working program I try to use CONNECT.java To Run in a Servlet.
    My program can run on eclipse platform with out any problem but when I want to use it in my server with servlet (I change the program as a servlet) I take This error What Sould I dou.
    PLEASE Help.....
    MY ERRoR is:
    java.lang.ClassNotFoundExeption: com.microsoft.jdbc.sqlserver.SQLserverDriver
    It works on Ecl&#304;pse but Not in my server with servlet
    HELP HELP HELP....

    You don't have the JDBC-SQLServer driver in the classpath when you run it on the server. (You probably added the driver into the Eclipse project library.)
    Depending on how you set up your server and java container, you might try putting the driver in the "WEB-INF/lib" directory (if it's a .jar file).

  • Jsp newbie, please help about @include

    I am new to JSP.
    I have two jsp files, say , jsp1 and jsp2.
    JSP2 is perfectly working. I want to display the result of jsp2 with the result of jsp1.
    But I additionally want to supply a value from jsp1 to a variable in jsp2 before calling jsp2.
    The result of jsp2 depends on the value supplied.
    I couldn't figure out how to do this. A simple @include directive like
    <%@ include file="jsp2.jsp" %> doesn't seem to be suitable here.
    What options are available here? Please help.
    Thank you.

    Thank you friends for the suggestion. I have yet to try your suggestions.
    Before that I came across another problem. Would someone help please?
    Why the jsp fails when I include the same JSP page twice in another jsp page?
    Of the following two jsp files, the upper one is OK, but the lower one complains that it cannot compile (org.apache.jasper.JasperException).
    test1.jsp:
    <html><head><title></title></head>
    <body>
    <table>
    <tr><td><%@ include file="single.jsp" %></td></tr>
    </table>
    </body>
    </html>
    test2.jsp:
    <html><head><title></title></head>
    <body>
    <table>
    <tr>
    <td><%@ include file="single.jsp" %></td>
    <td><%@ include file="single.jsp" %></td>
    </tr>
    </table>
    </body>
    </html>
    I want to populate the cells of an HTML table with the results from the same jsp file, by supplying different values to a variable in the jsp file so that its results will be different for each cell. Am I being to foolish here?
    Thanks.

  • Want to run the servlet (please help me)

    Hello Guys, I'm very new to java, I have downloaded the tomcat's servlets runner, and could able to write servlets and then could able to compile them without any errors, but the major problem is I'm not at all able to run them, first of all I dont know where shall I put the comiled servlet.class files, and I'm starting the Tomcats http server, and it is not picking up my servlets, could u please specify in whcih directory should I place my compiled servlets,
    with regards,
    shabeer.

    Hello Ajit, well I have read all the documentation and I have run all the example servlets in Tomcat, but the problem is my oracle server is listening at 8080 port so I have given a different port number(2002) to tomcat while installation, im using(http://localhost:2002/examples/servlet/MyFirstServlet) and I have placed my compiled servlet in the classes file and trying to access it, Tomcats HTTP server is recognising the servlet but it is giving some exception, I think it is saying something about configuration, do I need to make any changes in the server.xml file please advice me...here is the error what it says on the browser servlet exception....
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cannot allocate servlet instance for path /examples/servlet/MyFirstServlet
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:427)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         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 filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class MyFirstServlet with modifiers ""
         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
         at java.lang.Class.newInstance0(Class.java:300)
         at java.lang.Class.newInstance(Class.java:259)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:892)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:408)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         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 filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    Apache Tomcat/4.1.12
    please help me

  • JSP frameset (Please help)

    What in the world happen? I have to surrender myself to the simple HTML. Ok, I have a a.jsp that contains the following code:
    <html>
    <head>
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page</h1>
    <FRAMESET ROWS="80,20" NORESIZE>
    <FRAME SRC="main.jsp" NAME=upframe SCROLLING=NO>
    <FRAME SRC="transfer.jsp" NAME=downframe SCROLLING=NO>
    </FRAMESET>
    </body>
    </html>
    As you can see, it's fairly straightforward and simple. But, the problem is I can't view the content of main.jsp and transfer.jsp which contains some text inside them! Please help.It's not even starting my work, i am stucked with this HTML problem. Unbelievable.

    <FRAMESET ROWS="80,20" NORESIZE>
    <FRAMESET ROWS="80%,20%" NORESIZE>Try this.
    And also you should not use <BODY> tag when you use <FRAMESET>. So remove this and also remove <h1> tag and line from the page.
    Message was edited by:
    harishoty

  • Working with EAR file & (Servlet/JSP) Clustering - Please Help

              Hi,
              In my project we pack our application using EAR file. We read BEA's article, which
              discussed the class loaders hierarchy and it looks like this problem should not occur:
              When the garbage collection is being invoked - it somehow fails to resolve the class
              weblogic.jndi.WLInitialContextFactory.
              We have encountered the following error (stack trace):
              Message: severity="ERROR" sessionId="9IUUN4xoQf1wOkfEN8m62SFjEpNC1e4lLHSzyc2s01GPk5Up25cJ!-1680906364!182460375!7559!7002!1728341859!182464192!7559!7002!1023972500766"
              date="Jun 13, 2002" time="3:49:05 PM" threadId="Finalizer"
              Description:
              Throw:     amdocs.jspInfra.exceptions.FailedToRemoveEjbException: [an error occurred
              while trying to remove an ejb.]
              null- caused by: amdocs.jspInfra.exceptions.InitialContextCreationFailureException:
              [an error occurred while trying to create a new initial context.]
              null- caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory]
              amdocs.jspInfra.exceptions.InitialContextCreationFailureException: [an error occurred
              while trying to create a new initial context.]
              null- caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory]
              javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory.
              Root exception is java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory
                   at java.lang.Class.forName0(Native Method)
                   at java.lang.Class.forName(Class.java:195)
                   at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
                   at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
                   at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
                   at javax.naming.InitialContext.init(InitialContext.java:222)
                   at javax.naming.InitialContext.<init>(InitialContext.java:198)
                   at amdocs.jspInfra.userManagement.RequestContext._createContext(RequestContext.java:550)
                   at amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.java:391)
                   at amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.java:415)
                   at amdocs.jspInfra.beans.GenericJspBean._removeConversation(GenericJspBean.java:466)
                   at amdocs.jspInfra.beans.GenericJspBean._cleanUp_(GenericJspBean.java:413)
                   at amdocs.jspInfra.beans.GenericJspBean.cleanUp_(GenericJspBean.java:117)
                   at amdocs.jspInfra.beans.GenericJspBean.finalize(GenericJspBean.java:593)
                   at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                   at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
                   at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
                   at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
              

    The context classloader needs to be set so that the thread can load the
              Weblogic context factory class inside the finalizer thread.
              Simply save the context classloader when running inside the ejb code and set
              that inside finalize method so that the class can get loaded correctly.
              1) keep a member variable
              ClassLoader myccl;
              2) Instantiate it in the regular application thread as
              myccl = Thread.currentThread().getContextClassLoader();
              3) In the finalize() method keep this as the first line.
              Thread.currentThread().setContextClassLoader(myccl);
              -Sabha
              "Yossi Cohen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > In my project we pack our application using EAR file. We read BEA's
              article, which
              > discussed the class loaders hierarchy and it looks like this problem
              should not occur:
              > When the garbage collection is being invoked - it somehow fails to resolve
              the class
              > weblogic.jndi.WLInitialContextFactory.
              > We have encountered the following error (stack trace):
              >
              > Message: severity="ERROR"
              sessionId="9IUUN4xoQf1wOkfEN8m62SFjEpNC1e4lLHSzyc2s01GPk5Up25cJ!-1680906364!
              182460375!7559!7002!1728341859!182464192!7559!7002!1023972500766"
              > date="Jun 13, 2002" time="3:49:05 PM" threadId="Finalizer"
              > Description:
              > Throw: amdocs.jspInfra.exceptions.FailedToRemoveEjbException: [an error
              occurred
              > while trying to remove an ejb.]
              > null- caused by:
              amdocs.jspInfra.exceptions.InitialContextCreationFailureException:
              > [an error occurred while trying to create a new initial context.]
              > null- caused by: javax.naming.NoInitialContextException: Cannot
              instantiate class:
              > weblogic.jndi.WLInitialContextFactory [Root exception is
              java.lang.ClassNotFoundException:
              > weblogic/jndi/WLInitialContextFactory]
              > amdocs.jspInfra.exceptions.InitialContextCreationFailureException: [an
              error occurred
              > while trying to create a new initial context.]
              > null- caused by: javax.naming.NoInitialContextException: Cannot
              instantiate class:
              > weblogic.jndi.WLInitialContextFactory [Root exception is
              java.lang.ClassNotFoundException:
              > weblogic/jndi/WLInitialContextFactory]
              > javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory.
              > Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory
              > at java.lang.Class.forName0(Native Method)
              > at java.lang.Class.forName(Class.java:195)
              > at
              com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
              > at
              javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
              > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
              > at javax.naming.InitialContext.init(InitialContext.java:222)
              > at javax.naming.InitialContext.<init>(InitialContext.java:198)
              > at
              amdocs.jspInfra.userManagement.RequestContext._createContext(RequestContext.
              java:550)
              > at
              amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.j
              ava:391)
              > at
              amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.j
              ava:415)
              > at
              amdocs.jspInfra.beans.GenericJspBean._removeConversation(GenericJspBean.java
              :466)
              > at amdocs.jspInfra.beans.GenericJspBean._cleanUp_(GenericJspBean.java:413)
              > at amdocs.jspInfra.beans.GenericJspBean.cleanUp_(GenericJspBean.java:117)
              > at amdocs.jspInfra.beans.GenericJspBean.finalize(GenericJspBean.java:593)
              > at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
              > at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
              > at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
              > at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
              >
              

  • JSP/Servlet/Bean help

    Pretty new to java and I am getting an error that I have tried to figure out for a few days here and ... well... not getting far.
    I have a servlet that calls one of two jsp pages depending on GET or POST. index.jsp is called on GET and works fine. On POST the servlet gets a db pool connection does a quick select count(*) query and then populates a bean with the results. This all works fine (as I have system.out.println's showing me the results)
    But when it forwards to the next jsp page the page bombs out because it can't seem to find the Bean.
    The error is below.
    my set up is Tomcat 4.x
    the main servlet AECPhoneServlet is in ...webapps/damn/WEB-INF/classes
    the bean (QueryBean) is in ...webapps/damn/WEB-INF/classes/com/phone
    jsp's are in ...webapps/damn
    web.xml looks like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>AECPhoneServlet</servlet-name>
    <servlet-class>AECPhoneServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>AECPhoneServlet</servlet-name>
    <url-pattern>/AECPhone</url-pattern>
    </servlet-mapping>
    </web-app>
    Classpath is
    echo $CLASSPATH
    :/usr/tomcat/jakarta-tomcat-4.1.24/webapps/damn/WEB-INF/classes/com/phone:.:/usr/tomcat/jakarta-tomcat-4.1.24/common/lib/servlet.jar
    I am beating my head against the wall here. Any and all help would be greatly appreciated. Assume I know nothing. lol. Because basically I don't.
    ype Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 2 in the jsp file: /rs.jsp
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] /usr/tomcat/jakarta-tomcat-4.1.24/work/Standalone/localhost/damn/rs_jsp.java:8: package com does not exist
    [javac] import com.phone;
    [javac] ^
    [javac] /usr/tomcat/jakarta-tomcat-4.1.24/work/Standalone/localhost/damn/rs_jsp.java:45: cannot resolve symbol
    [javac] symbol : class TestBean
    [javac] location: class org.apache.jsp.rs_jsp
    [javac] TestBean tBean = null;
    [javac] ^
    An error occurred at line: 2 in the jsp file: /rs.jsp
    Generated servlet error:
    [javac] /usr/tomcat/jakarta-tomcat-4.1.24/work/Standalone/localhost/damn/rs_jsp.java:47: cannot resolve symbol
    [javac] symbol : class TestBean
    [javac] location: class org.apache.jsp.rs_jsp
    [javac] tBean = (TestBean) pageContext.getAttribute("tBean", PageContext.PAGE_SCOPE);
    [javac] ^
    An error occurred at line: 2 in the jsp file: /rs.jsp
    Generated servlet error:
    [javac] /usr/tomcat/jakarta-tomcat-4.1.24/work/Standalone/localhost/damn/rs_jsp.java:50: cannot resolve symbol
    [javac] symbol : class TestBean
    [javac] location: class org.apache.jsp.rs_jsp
    [javac] tBean = (TestBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "TestBean");
    [javac] ^
    [javac] 4 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
         at AECPhoneServlet.doPost(AECPhoneServlet.java:56)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         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:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    my set up is Tomcat 4.x
    the main servlet AECPhoneServlet is in
    ...webapps/damn/WEB-INF/classes
    the bean (QueryBean) is in
    ...webapps/damn/WEB-INF/classes/com/phone
    jsp's are in ...webapps/damn
    /usr/tomcat/jakarta-tomcat-4.1.24/work/Standalone/local
    ost/damn/rs_jsp.java:45: cannot resolve symbol
    [javac] symbol : class TestBean
    [javac] location: class org.apache.jsp.rs_jsp
    [javac] TestBean tBean = null;
    [javac] ^
    I don't know if this is a typo, but above you say the class name is QueryBean. However, the compiler errors refer to a class called TestBean.

  • Applet talking to Servlet - Please help!!!

    Hi,
    Below is the code for a very simple servlet. After that is the code for an applet that sends a query to the servelt. After that is the .html file that invoques the applet. At the bottom is my directory structure and the location of my files. This is what happens:
    1. When I type in the browser: "http://localhost:8080/servlet/myApp/TestingServlet", two things happen:
    a) I get the html greeting "Welcome to ..." on the browser.
    b) The tomcat console displays "Hello from TestingServlet...".
    2. When I type in the browser: "http://localhost:8080/myApp/TestApp.html", I expect to see the message in the tomcat window as in b) above; but nothing is displayed there. Apparently the applet doesn't find the servlet.
    I hope you can point to me what I'm doing wrong.
    Thanks,
    Miguel
    // this is the servlet code: TestingServlet.java
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class TestingServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    System.out.println("Hello form TestingServlet...");
    PrintWriter out = response.getWriter();
    out.println("<HTML>");
    out.println("<HEAD>");
    out.println("<TITLE>Servlet Testing</TITLE>");
    out.println("</HEAD>");
    out.println("<BODY>");
    out.println("Welcome to the Servlet Testing Center");
    out.println("</BODY>");
    out.println("</HTML>");
    // here is the applet: TestApp.java
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class TestApp extends JApplet {
    public void init() {
    String inline = "http://localhost:8080/servlet/myApp/TestingServlet";
    debWindow.prnt("Request: " + inline);
    try {
    URL url = new URL(inline);
    URLConnection connection = url.openConnection();
    connection.setDoOutput(true);
    } catch (IOException ex) {
    // this is the TestApp.html file
    <HTML> <HEAD>
    <TITLE>Test/TITLE></HEAD>
    <BODY>
    <APPLET CODE="TestApp.class"
    WIDTH = 500 HEIGHT = 400 MYSCRIPT>
    </APPLET></BODY></HTML>
    My directory structure is as follows (all in one computer):
    tomcat
    webapps
    myApp
    WEB-INF
    classes
    myApp contains TestApp.class and TestApp.html
    classes contains TestingServlet.class

    This bit:
    } catch (IOException ex) {
    }Insures that you will never see any helpful exception messages. Change it to
    } catch (IOException ex) {
        System.out.println("Error: " + ex.toSting());
    }Or some such and then look at your Java console and see what it says. My guess is you are getting a security exception at or around the openConnection call.
    Good luck
    Lee

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello,
    I have exhausted searching on internet to find a book
    which tells how to build Dynmic menus in JSP.I dont want
    to use DHTML as this becomes complex as the menu categories
    are built using data from database.Is there any workaround in
    java to do this without DHTML or atleast sample code.
    can somebody help me in this regard.
    Thanks
    Jack

    Hello a.s.kumar,
    I would be greatful if you could send me the sample code.
    [email protected]
    we can't let MM Flash run away with the show can we. Javascript can do a decent job, but the underlying menu data is static.
    Cheers, Darren

Maybe you are looking for

  • Purchasing songs for 2 Ipods

    Hi, I purchased 2 Ipod shuffles for my kids. I set up and registered each one. I downloaded a couple of songs from Itunes and created a playlist for one of the kids. My second kid wanted the same songs on his Ipod so I assumed I would need to downloa

  • HT4946 does anyone with a 3GS have a preference as to where to do the data back up?

    i know it's become an antique, and i probably have waaaay to much info on it, but my 32gb 3GS is getting harder and harder to raise from the dead. i have an appt tomorrow to have it looked at at the genius bar - as they are the ones who Know All and

  • BPM 11g: Adding external application link to process workspace

    Hi, In my project, I have a requirement to show a search link the applications panel of the process workspace (link will trigger a ADF application). Currently it is being implemented using a process with a single initiator task. The disadvantage of t

  • Photo Directories don't all display (Ipad)

    I'm trying to sync photos from my PC to my Ipad, however iTunes does not recognize all of the photo folders in my My Pictures folder. When I select specific folders, only a few of the folders in the My Pictures directory show up. Any ideas?

  • Debugging problem

    hi, I want to debug my AIR app built with Flash Builder on the iPad. I followed the instructions on http://renaun.com/blog/2010/11/debugging-air-apps-on-idevices-with-flash-builder-4-or-burr ito/ I compiled my application using the -debug option. Whi