Javabean class not found by jsp page

I have created one bean which has setFunctionId(String) and getFunctionId() methods. I put the class files at /weblogic/myserver/serverclasses directory. While I am accessing the .jsp page it is telling "Thu Aug 03 15:46:16 EDT 2000:<E> <ServletContext-General> Servlet failed with Ex
          ception
          java.lang.NoSuchMethodError: myjsp.TestBean: method setFunctionId(Ljava/lang/Str
          ing;)V not found
          at jsp_servlet._testasfs._jspService(_testasfs.java:90)
          at weblogic.servlet.jsp.JspBase.service(Compiled Code)
          at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code
          at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C
          ode)
          at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C
          ode)
          at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compile
          d Code)
          at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
          at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
          at weblogic.kernel.ExecuteThread.run(Compiled Code)"
          Would appreciate your help..
          

Thank you for your valuable feedback duffymo. Could
you explain a little what you mean by "Putting .class
files in the Tomcat examples directory is a really bad
idea in the long run". Also, could you direct me to
some source where I can find more information on
creating WAR files keeping in mind that I am a
beginner.
Thanks.But putting your web apps into WAR files, you can have quite a few different web apps running on the tomcat server as compared to if u place your files into the default webapp folder, u can only have 1 web app running.
For creating WAR file, the easiest way is to use an IDE like JBuilder.

Similar Messages

  • Class not found - from jsp sub-directories

    Hello:
    Main-Issue:
    - I have some java-class files in the \<my-web-app>\web-inf\classes directory. These classes do not belong to any packages.
    - I have some jsps in the \<my-web-app>\ directory and also in some sub-directories in the \<my-web-app>\ directory. Example: \<my-web-app>\test\index1.jsp.
    - The jsps in the \<my-web-app>\ directory can invoke the classes in the \<my-web-app>\web-inf\classes directory with no issues. But, the jsps in the sub-directories CANNOT see the classes in the \<my-web-app>\web-inf\classes directory. I get a "class not found" error. (this is just in oc4j).
    First of all, just a background to the issue:
    - I am trying to port a web application from JRUN to OC4J.
    - I want to do this with minimal changes to the existing code.
    - The application has been running on JRUN for a while. I only see the above mentioned error (class not found) error when trying to run it on oc4j.
    - As a test, I created my own test application to verify:
    (-) I wrote a simple java class (test.class) with no package and placed it in the web-inf\classes directory
    (-) I wrote a jsp file (index.jsp) to invoke test.class. I placed the jsp at the top-level directory of the web-app.
    (-) I wrote another jsp file (index1.jsp) to invoke test.class as well. I placed that jsp file in a sub-directory in the top-level directory of the web-app.
    (-) index.jsp worked without any problems. index1.jsp gave the "class not found" error.
    (-) As another test, I then modified the class to be in a package (com.benny). I then changed the jsps to call "com.benny.test" rather than just "test". This time, both index.jsp and index1.jsp worked fine.
    So, I guess my question is, do these classes have to be in a package? I am trying to avoid having to make a lot of changes to the app. If they do have to be in packages, then I have re-compile a lot of class files, add import statements to jsps, etc.
    Any help/suggestion would be appreciated.
    Thanks,
    Benny

    So, I guess my question is, do these classes have to be in a package?Answer: yes.
    As of Java1.4, classes in the "unnamed" package were no longer accessible.
    What version of java were you running with JRun?
    What version are you running with OC4J?
    Read all about it here:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4361575
    If you have to repackage the classes, the IDE Eclipse has excellent support for refactoring, and wil let you put classes into packages with a minimum of fuss.

  • Bean not found by JSP page

    Hi! All
    I am using a bean in my jsp page. When I open the jsp page, I get an error that "Class SQLBean.DbBean not found". Please help. I have my bean class compiled and saved under C:\tomcat\webapps\examples\WEB-INF\classes
    Here is the bean class:
    package SQLBean;
    import java.sql.*;
    import java.io.*;
    public class DbBean {
    String dbURL = "jdbc:db2:sample";
    String dbDriver = "jdbc:odbc:akhil.mdb";
    private Connection dbCon;
    public Class DbBean(){
    super();
    public boolean connect(String user, String password) throws ClassNotFoundException,SQLException{
    System.out.print("hey");
    Class.forName(dbDriver);
    dbCon = DriverManager.getConnection(dbURL, user, password);
    return true;
    public void close() throws SQLException{
    dbCon.close();
    public ResultSet execSQL(String sql) throws SQLException{
    Statement s = dbCon.createStatement();
    ResultSet r = s.executeQuery(sql);
    return (r == null) ? null : r;
    public int updateSQL(String sql) throws SQLException{
    Statement s = dbCon.createStatement();
    int r = s.executeUpdate(sql);
    return (r == 0) ? 0 : r;
    Here is the jsp page:
    <HTML>
    <HEAD><TITLE>DataBase Search</TITLE></HEAD>
    <BODY>
    <%@ page language="Java" import="java.sql.*" %>
    <jsp:useBean id="db" scope="request" class="SQLBean.DbBean" />
    <jsp:setProperty name="db" property="*" />
    <%!
    ResultSet rs = null ;
    ResultSetMetaData rsmd = null ;
    int numColumns ;
    int i;
    %>
    <center>
    <h2> Results from here</h2>
    <hr>
    <br><br>
    <%
    out.print("Here");
    db.connect("atayal", "arduous");
    try {
    out.print("HI");
    rs = db.execSQL("select * from contacts");
    }catch(SQLException e) {
    throw new ServletException("Your query is not working", e);
    %>
    <%
    while(rs.next()) {
    %>
    <%= rs.getString("email") %>
    <BR>
    <%
    %>
    <BR>
    <%
    db.close();
    %>
    Done
    </body>
    </HTML>
    Thanks in advance

    Thank you for your valuable feedback duffymo. Could
    you explain a little what you mean by "Putting .class
    files in the Tomcat examples directory is a really bad
    idea in the long run". Also, could you direct me to
    some source where I can find more information on
    creating WAR files keeping in mind that I am a
    beginner.
    Thanks.But putting your web apps into WAR files, you can have quite a few different web apps running on the tomcat server as compared to if u place your files into the default webapp folder, u can only have 1 web app running.
    For creating WAR file, the easiest way is to use an IDE like JBuilder.

  • Tag library 'not found' in jsp page. why?

    I'm having a big problem with jsp/tag libraries using oc4j. One
    particular
    tag library is not being 'found' for some mysterious reason. The
    particulars follow:
    kwTags.jar is the jar file containing the tag classes. It definitely
    exists in WEB-INF/lib directory.
    tld def. in web.xml:
    <taglib>
    <taglib-uri>/kw</taglib-uri>
    <taglib-location>/WEB-INF/tlds/kwTagLib.tld</taglib-location>
    </taglib>
    The tld file definitely exists in the /WEB-INF/tlds directory.
    The definition of the tag lib at the top of the kwTagLib.tld follows:
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>kw</short-name>
    <uri>/kw</uri>
    <display-name>kwTagLib</display-name>
    <small-icon></small-icon>
    <large-icon></large-icon>
    <description></description>
    The tag reference in jsp page is:
    <%@ taglib uri="/WEB-INF/tlds/kwTagLib.tld" prefix="kw" %>
    The development environment is Eclipse Workbench 5.1.0 and Eclipse
    v.3.2.1
    JDK is: j2sdk1.4.2_04
    All other tag libs (Struts v.1.3.5) are found and work correctly. This
    is the only tag library that
    a problem.
    Error Message follows:
    java.lang.NullPointerException at
    oracle.jsp.parse.JspDirectiveTaglib.validateAttributes(JspDirectiveTaglib.java:183)
    at
    oracle.jsp.parse.JspParseTagDirective.validateTagAttributes(JspParseTagDirective.java:180)
    at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:921)
    at
    oracle.jsp.parse.JspParseTagDirective.parse(JspParseTagDirective.java:326)
    at oracle.jsp.parse.JspParseTag.parseNextTag(JspParseTag.java:705)
    at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:184)
    at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:154)
    at
    oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:428)
    at
    oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:284)
    at
    oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:483)
    at
    oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:542)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
    at
    com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    at
    com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:251)
    at
    org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:99)
    at
    org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:82)
    at
    org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:51)
    at
    org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at
    org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
    at
    com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
    at
    com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    at
    com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at
    com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at
    com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at
    com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)

    java.lang.NullPointerException at
    oracle.jsp.parse.JspDirectiveTaglib.validateAttributes(JspDirectiveTaglib.java:183)
    at oracle.jsp.parse.JspParseTagDirective.validateTagAttributes(JspParseTagDirective.java:180)That NullPointerException does not sound right. What is your oc4j version?
    By the way, your declaration of taglib in web.xml can be deleted if you are not using that taglib-uri "/kw" in your jsp.

  • IUser class not recognized in JSP page

    Hi All,
               I am trying to get the roles of the user logged in. I am getting the user name by using
    IUserContext userContext = request.getUser();
    String firstName = userContext.getFirstName();
    How to get the roles of the user. When i am using IUser it is giving errors. I even included com.sap.security.api.jar file. But still it is not working.
    Can somebody help me sort this problem.
    Thank you,
    Surendra.

    Hi Surendra,
    You can convert your IUserContext to IUser like this:
    com.sapportals.portal.security.usermanagement.IUserFactory userFactory = WPUMFactory.getUserFactory();
            com.sapportals.portal.security.usermanagement.IUser eP5User = userFactory.getEP5User(userContext);
    Use IRoleFactory.getRolesOfUser(eP5User.getUniqueID(), true); method to get all assigned user roles recursively.
    IRoleFactory roleFactory = UMFactory.getRoleFactory()
    roleFactory.getRolesOfUser(eP5User.getUniqueID(), true);
    https://media.sdn.sap.com/javadocs/NW04/SP12/ume/com/sap/security/api/IRoleFactory.html#getRolesOfUser(java.lang.String, boolean)
    Greetings,
    Praveen Gudapati

  • 9.0.3 Preview - Class not found error after including jsp:useBean

    Hi,
    I got a Java.lang.NoClassDefFoundError while compiling a JSP Page, after including a simple web bean as follows:
    <jsp:useBean id="catviews" scope="request" class="CategoryView" />
    <jsp:setProperty name="catviews" property="*" />
    somewhere within the HTML page...
    <%= catviews.getCategory() %>
    The JSP page without the bean compiles fine and the Javabean itself compiles without error. The bean class is where JDev automatically puts it (i.e in a sub-directory of the classes directory within the project) and JDev does not raise any error on that JSP Page before compiling.
    The error seems to point to the first line of the page, to the directive of the JSP page:
    <%@ contentType="text/html" ... %> which is apparently harmless. What can be wrong ?
    Thanks for your reply.

    'Class not found' means 'Class not found' , the class you are referencing is not in your project's classpath. You should make sure your project's classpath point to the location where this class is deployed to. This could be a directory or a .jar file. You should also include the package name as part fo the class.

  • JSP-class not found

    My server already working properly in internet.It's a travel agent site.there after i include one more page for audio guide which is JMF with in the applet and it is plugin to my jsp page.It's work very fine in my local system.my server is Tomcat .But if i hosted to our server means it's giving applet class not found exception.
    It is already having com package ,now i include my jmf package wol to it.
    My root directory of this class file is
    web-inf/classes/wol/PlaySongs.class
    My server doesn't have JMF pack so,i just copy JMF.jar and Sound.jar to my web-inf/lib/ folder.and also to my server folder like tomcat/common/lib/ .Now i restart my server it's giving applet class not found exception.but it's working fine in local system.
    I have using following jsp code.
    <body>
    <%
    String fname = "file:" + request.getRealPath("AudioF") + "/button-1.mp3";
    %>
    <jsp:plugin type="applet" code="PlaySongs.class" codebase="/wol" width="300" height="20">
    <jsp:params>
    <jsp:param name="file" value="<%=fname%>" />
    </jsp:params>
    <jsp:fallback>
    <p> Unable to start Plug-in. </p>
    </jsp:fallback>
    </jsp:plugin>Any one help me.
    Regards
    K.Suresh

    the codebase should be a path into the webdir, not the WEB-INF dir. Your browser needs to be able to reach the applet class like any other resource.
    My server doesn't have JMF pack so,i just copy JMF.jar and Sound.jar to my web-inf/lib/ folder.and also to my server folder like tomcat/common/lib/If you are already copying it to your common/lib folder, you don't need it in the lib folder of your webapp.

  • Class not found when I run JSPs

    I set up and can run JSPs in iPlanet 4.1 SP9 on NT. But if I use anything
    such as Date() I get a Server Error and a Class Not Found in the error log.
    Can someone tell me how to confire where the .class and .jar support files
    go, or where do I put them. In the JDK install directory or in the iPlanet
    install directory.
    Thanks, Gary

    Something to note, you must have superuser priveleges to run ibconf.
    Check out this document about installing a PCI-GPIB on a Solaris machine. There is a section in it on page 9 about configuring the software with ibconf.
    If you still have problems after reading through this repost.
    JenK

  • Error in compiling: file javax\servlet\jsp\PageContext.class not found

    Hi,
    i'm getting an error when I'm trying to compile an java file. The error is as follows:
    cannot access javax.servlet.jsp.PageContext
    file javax\servlet\jsp\PageContext.class not found
    Isn't the javax package included in jdk? I've installed jdk 1.3.1_03 and j2re1.4.0_02. Shouldn't this PageContext.class be automatically loaded when i've installed jdk?
    I'm getting desperated! I've tried almost everything: i've changed the classpath, moved the directory of the java file I'm trying to compile over and over but i'm getting no success!
    Any help is very welcome!
    Thankx,
    Nuno.

    hmmm... i had a look and it seems that what you are trying to "import" is actually in a package... instead of import try:
    package javax.servlet.jsp;you may need to go download this "package" and complile it in the directory you are working in.
    my advice: try the above statement (which does compile for me), if it doesn't work, you will need to find the source code for this package and compile it just like you do any other source code.
    hope this helps.

  • Class not found error on Firefox browser

    Requirement:-
    We have Apache server on the top of a tomcat container where we have deployed application Webnow. This application will provide SSO to another application Imagenow. The requirement is we have to authenticate and authorize a user based on the client certificate which will be installed on the client side browser.
    Issue:-
    We have achieved the requirement for the browser IE. But for browser Firefox ,we are getting an exception "Class not found". Basically an applet class from the jar is not getting loaded on the Firefox.
    Further investigating on this we came to conclusion that Firefox is not able to read the SSL certificate.
    In order to eliminate this, we have imported the client certificate in java console as well. After this step, we were not getting "ClassNotFoundException" in FF. But right now, user is getting prompted for certificate/keystore password each & every time while trying to login onto the application (both in IE & FF).
    So, we are trying to find ways to remove class not found exception without importing client certificate to java console. Also , is there any way to eliminate the authentication pop up for keystore (though we might not go for this approach as it will be very difficult to manage Java console for end users). Need your urgent help on this issue.
    Attaching stack trace of both the browser and screenshot of keystore authentication pop-up . FF_Issue_stacktrace.docx is one when we were getting "class not found exception" and IE_Stacktrace.docx is one for successful case.

    We have a similar set up where we have a web app and an applet in a JSP page. You have to put your applet classes up above WEB-INF. So, if your structure for your webapp was:
    tomcat/webapps/mywebapp
    you'd want your classes under mywebapp instead of webapps/mywebapp/WEB-INF. In your case, if I read your package structure right, you'd want a Log directory under webapp that contains your LogApplet.class file.
    I hope this works for you!

  • BLOB image not shows in JSP page!!

    Hi Dear all,
    I had tried to configure how to show BLOB image to jsp page . The code are works fine and servlet works ok but image can not show only. can you help me that what need to be added. Please help me.
    Can any experts help me? BLOB image not shows in JSP page. I am using ADF11g/DB 10gR2.
    My as Code follows:
    _1. Servlet Config_
        <servlet>
            <servlet-name>images</servlet-name>
            <servlet-class>his.model.ClsImage</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>images</servlet-name>
            <url-pattern>/render_images</url-pattern>
        </servlet-mapping>
      3. class code
    package his.model;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.Map;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ClsImage extends HttpServlet
      //private static final Log LOG = LogFactory.getLog(ImageServlet.class);
      private static final Log LOG = LogFactory.getLog(ClsImage.class);
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        System.out.println("GET---From servlet============= !!!");
        String appModuleName = "his.model.ModuleAssetMgt";//this.getServletConfig().getInitParameter("ApplicationModuleName");
        String appModuleConfig = "TempModuleAssetMgt";//this.getServletConfig().getInitParameter("ApplicationModuleConfig");
        String voQuery ="select ITEM_IMAGE from MM_ITEMIMAGE where IMAGE_NO = 'P1000000000006'" ;// 'P1000000000006' this.getServletConfig().getInitParameter("ImageViewObjectQuery");
        String mimeType = "jpg";//this.getServletConfig().getInitParameter("gif");
        //?IMAGE_NO='P1000000000006'
        //TODO: throw exception if mandatory parameter not set
        ApplicationModule am =
          Configuration.createRootApplicationModule(appModuleName, appModuleConfig);
          ViewObject vo =  am.createViewObjectFromQueryStmt("TempView2", voQuery);
        Map paramMap = request.getParameterMap();
        Iterator paramValues = paramMap.values().iterator();
        int i=0;
        while (paramValues.hasNext())
          // Only one value for a parameter is expected.
          // TODO: If more then 1 parameter is supplied make sure the value is bound to the right bind  
          // variable in the query! Maybe use named variables instead.
          String[] paramValue = (String[])paramValues.next();
          vo.setWhereClauseParam(i, paramValue[0]);
          i++;
       System.out.println("before run============= !!!");
        // Run the query
        vo.executeQuery();
        // Get the result (only the first row is taken into account
        System.out.println("after run============= !!!");
        Row product = vo.first();
        //System.out.println("============"+(BlobDomain)product.getAttribute(0));
        BlobDomain image = null;
        // Check if a row has been found
        if (product != null)
          System.out.println("onside product============= !!!");
           // We assume the Blob to be the first a field
           image = (BlobDomain) product.getAttribute(0);
           //System.out.println("onside  run product============= !!!"+image.toString() +"======="+image );
           // Check if there are more fields returned. If so, the second one
           // is considered to hold the mime type
           if ( product.getAttributeCount()> 1 )
              mimeType = (String)product.getAttribute(1);       
        else
          //LOG.warn("No row found to get image from !!!");
          LOG.warn("No row found to get image from !!!");
          return;
        System.out.println("Set Image============= !!!");
        // Set the content-type. Only images are taken into account
        response.setContentType("image/"+ mimeType+ "; charset=windows-1252");
        OutputStream os = response.getOutputStream();
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[4096];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
          //System.out.println("Set Image============= loop!!!"+(is.read(buffer)));
        os.close();
        // Remove the temporary viewobject
        vo.remove();
        // Release the appModule
        Configuration.releaseRootApplicationModule(am, false);
    } 3 . Jsp Tag
    <af:image source="/render_images" shortDesc="Item"/>  Thanks.
    zakir
    ====
    Edited by: Zakir Hossain on Apr 23, 2009 11:19 AM

    Hi here is solution,
    later I will put a project for this solution, right now I am really busy with ADF implementation.
    core changes is to solve my problem:
        byte[] buffer = new byte[image.getBufferSize()];
        int nread;
        vo.remove();
        while ((nread = is.read(buffer)) != -1) {
          os.write(buffer);
        }All code as below:
    Servlet Code*
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response) throws ServletException,
                                                             IOException {
        String appModuleName =
          "his.model.ModuleAssetMgt";
        String appModuleConfig =
          "TempModuleAssetMgt";
      String imgno = request.getParameter("imgno");
        if (imgno == null || imgno.equals(""))
          return;
        String voQuery =
          "select ITEM_IMAGE from MM_ITEMIMAGE where IMAGE_NO = '" + imgno + "'";
        String mimeType = "gif";
        ApplicationModule am =
          Configuration.createRootApplicationModule(appModuleName,
                                                    appModuleConfig);
        am.clearVOCaches("TempView2", true);
        ViewObject vo = null;
        String s;
          vo = am.createViewObjectFromQueryStmt("TempView2", voQuery);
        // Run the query
        vo.executeQuery();
        // Get the result (only the first row is taken into account
        Row product = vo.first();
        BlobDomain image = null;
        // Check if a row has been found
        if (product != null) {
          // We assume the Blob to be the first a field
          image = (BlobDomain)product.getAttribute(0);
          // Check if there are more fields returned. If so, the second one
          // is considered to hold the mime type
          if (product.getAttributeCount() > 1) {
            mimeType = (String)product.getAttribute(1);
        } else {
          LOG.warn("No row found to get image from !!!");
          return;
        // Set the content-type. Only images are taken into account
        response.setContentType("image/" + mimeType);
        OutputStream os = response.getOutputStream();
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[image.getBufferSize()];
        int nread;
        vo.remove();
        while ((nread = is.read(buffer)) != -1) {
          os.write(buffer);
        is.close();
        os.close();
        // Release the appModule
    Configuration.releaseRootApplicationModule(am, true);
    }Jsp Tag
    <h:graphicImage url="/render_images?imgno=#{bindings.ImageNo.inputValue}"
                                                        height="168" width="224"/>

  • Servlet class not found error deploying a WAR on Web Logic Server 8.1

    I'm re-deploying an updated web application to a web logic server, but when I navigate to the login page of the web application to test it, I get a class not found error for my login servlet. I have both the web.xml and the weblogic.xml descriptors in my WEB-INF directory, and all of my compiled classes are in the WEB-INF/classes directory, is there something else I'm missing? Any help would be much appreciated.

    Thanks for the response. Here's the web.xml file:
    <?xml version="1.0" ?>
    <!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>
         <display-name>Web Forms</display-name>
    <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <display-name>LoginServlet</display-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ChangePasswordServlet</servlet-name>
    <display-name>ChangePasswordServlet</display-name>
    <servlet-class>ChangePasswordServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>LogoutServlet</servlet-name>
    <display-name>LogoutServlet</display-name>
    <servlet-class>LogoutServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>PageServlet</servlet-name>
    <display-name>PageServlet</display-name>
    <servlet-class>PageServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>UploadServlet</servlet-name>
    <display-name>UploadServlet</display-name>
    <servlet-class>UploadServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/LoginServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ChangePasswordServlet</servlet-name>
    <url-pattern>/ChangePasswordServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>LogoutServlet</servlet-name>
    <url-pattern>/LogoutServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>UploadServlet</servlet-name>
    <url-pattern>/UploadServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>PageServlet</servlet-name>
    <url-pattern>/PageServlet</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>Login.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    None of the classes are in a package (I know it's not the best idea, but I didn't write these, I'm just doing some updates). So the file structure is pretty much just WEB-INF/classes/
    At the moment I've got a fix by just putting the entire project (not in any sort of archive) on the server itself instead of deploying it as a WAR, any thoughts on why the WAR isn't working would be much appreciated though.

  • Bean class not found error...

    I am using Tomcat 4.0 on windows 98, when I try to use my bean class from jsp program, I get class not found error. I read/followed all the similar problems in the forum but still have not been able to solve the problem.
    The error I get is as follows:
    ==============================
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 1 in the jsp file: /handoff1.jsp
    Generated servlet error:
    D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:56: Class com.cartapp.user.User not found.
    com.cartapp.user.User handoff = null;
    ^
    An error occurred at line: 1 in the jsp file: /handoff1.jsp
    Generated servlet error:
    D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:59: Class com.cartapp.user.User not found.
    handoff= (com.cartapp.user.User)
    ^
    An error occurred at line: 1 in the jsp file: /handoff1.jsp
    Generated servlet error:
    D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:64: Class com.cartapp.user.User not found.
    handoff = (com.cartapp.user.User) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.cartapp.user.User");
    ^
    3 errors, 1 warning
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
    =============================================
    Location of files
    ==================
    My jsp file is located at:
    D:\Apps\Apache\Tomcat4.0\webapps\ROOT\cartapp
    my bean class - User - is at:
    D:\Apps\Apache\Tomcat4.0\webapps\ROOT\WEB-INF\classes\com\cartapp\user
    Contents of the jsp file
    =======================
    <jsp:useBean id="handoff" scope="session" class="com.cartapp.user.User" />
    <HTML>
    <BODY>
    This is the setting page!
    <%
    handoff.setFirstName("George");
    %>
    </BODY>
    </HTML>
    The first 2 lines of the class are:
    ==================================
    package com.cartapp.user;
    public class User {
    Environment settings
    ====================
    JAVA_HOME=D:\Apps\java\jdk
    CATALINA_HOME=D:\Apps\Apache\Tomcat4.0
    CLASSPATH=;.;F:\ola\progmn\JAVA\pkgs;D:\Apps\Apache\Tomcat4.0\common\lib\servlet.jar
    Can anyone please help. Thanks.
    Thanks.
    Ola Oke (SCJP 1.4)

    Not certain but try putting the classes folder in your classpath:
    D:\Apps\Apache\Tomcat4.0\webapps\ROOT\WEB-INF\classes\

  • APPLET.class not found error on explorer!! need solution URGENTLY!!!

    Hi,
    I am calling my applet from a jsp and trying to run it on the internet explorer but I am getting the following error:
    load: class /WEB-INF/classes/Log/LogApplet.class not found.
    java.lang.ClassNotFoundException: .WEB-INF.classes.Log.LogApplet.class
    My Explorer version is 6.0 and I am using Plug-in: Version 1.4.1_05. Why do you think it cannot find the class? it is located under the specified directory which is:
    /Web Content/WEB-INF/classes/Log/LogApplet.class
    and my jsp which is calling my applet is located under:
    Web Content/Login.jsp
    this is a very urgent problem!! could you please help me? I will appreciate your help so much.
    Thanks,
    Sofia
    here is how I wrote my jsp:
    <jsp:plugin type="applet"
    code="/WEB-INF/classes/Log/LogApplet.class"
    width="600"
    height="620"
    >
    <jsp:params>
    </jsp:params>
    <jsp:fallback>
    <p>Unable to start plugin.</p>
    </jsp:fallback>
    </jsp:plugin>
    ...

    I'm having the same problem...however my applet is located outside of the web-inf folder. the web-inf folder is only for servlets. applets can't be recognised inside it since that folder is for server-side application while applets are meant for client-side.
    i put my applet into a separate folder in the root directory of the webapp but it's generating a security error when i call it using a jsp page. so far the only way i got around it was specifying the entire codebase using localhost...but it's not a pretty good way of doing it.
    any ideas anyone?

  • Apllet class not found

    hello, i am very new to java
    i know that this question will seem stupid to the pros, but hey, this is what the newbie forum is about
    i am writing a simple checkers applet using jBuilder and it works fine in that. When i open the page it's embedded in, it runs fine. But when i try to upload it to the server, i get the folowind error in the console
    load: class javacheckers.checkersApplet.class not found.
    java.lang.ClassNotFoundException: javacheckers.checkersApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 11 more
    Do i need to set the classpath somewhere for the server? Or something else?
    In case you are curious, this is where the page is
    http://www22.brinkster.com/umbccrew/checkers/checkersApplet.html
    Thanks

    Hi, please check out that bmghandi wrote in this link:
    http://forum.java.sun.com/thread.jsp?forum=30&thread=289550

Maybe you are looking for

  • How to filter the data in a table UI/

    hi all, I have to put filter  and sort functions in my table UI.can ayone please help me how to do this with a code. regrads, Sharan

  • How do I move all the apps out of a Launchpad folder at the same time?

    Dragging them out one by one is tedious if there are many apps in a folder. Thanks!

  • Turkish Character Encoding on Tomcat 5.0

    When I enter some Turkish characters (e.g. ������������) in an Input Field and SUBMIT the form, I get rubbish characters. (the field is not related with DB, just simple JAva Bean field). I use the following lines on top of my JSP page: <%@ page langu

  • Deskjet 710C

    I have a DeskJet 710c printer which I used on my hp pavilion 503n. I just bought an HP p6732f PC. I used the CD and I got a USB to parallel converter cable to hook up the 710C. I also tried without the CD but still can't get it to work. I recently bo

  • Answers report

    Hi, I am creating an Answers report where I have some columns. I am creating this report based on a query. The query has a condition like below in the from condition from (select a, sum(b) as C1 from table where cash <> 0 and column = 'principal' gro