| Author |
Problem while uploading an image using UploadBean
|
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
I am trying to upload a photo using UploadBean. But I am getting error.
Here is my exception :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /test/dbupload.jsp(5,0) The value for the useBean class attribute javazoom.upload.UploadBean is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1220)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Generator.generate(Generator.java:3417)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:231)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
note The full stack trace of the root cause is available in the Apache Geronimo (Embedded Tomcat/@VERSION@) logs.
Apache Geronimo (Embedded Tomcat/@VERSION@)
|
Shounak
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
|
And I have added the jar files ( cos.jar , struts.jar , upload.jar and another one ) to my project...
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
so guys please help me..... I am just stuck with this file uploading problem....
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
Shounak Kundu wrote:
As you have already imported using:
I think you would have to replace the class name with just UploadBean.
|
Mohamed Sanaulla | My Blog
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
mohamed sanaullah
Post Yesterday 06:14:58 PM Subject: Problem while uploading an image using UploadBean
Shounak Kundu wrote:
view plaincopy to clipboardprint?
1. <jsp:useBean id="upBean" scope="application" class="javazoom.upload.UploadBean" >
2. //Note: Change the class to UploadBean, as you have already imported the package
<jsp:useBean id="upBean" scope="application" class="javazoom.upload.UploadBean" > //Note: Change the class to UploadBean, as you have already imported the package
As you have already imported using:
view plaincopy to clipboardprint?
1. <%@ page language="java" import="javazoom.upload.*,java.util.*" %>
<%@ page language="java" import="javazoom.upload.*,java.util.*" %>
I think you would have to replace the class name with just UploadBean.
I have done that already. Same error persists.....
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
Ok, now I have resolved that the problem is only for Eclipse.
In Windows , I tried to run the same project in NetBeans IDE, it ran correctly.
But, back in Linux when I try to run , the same problem persists.
I suspect the problem is of adding external jars of uploadbean , though I have added DB2 jar file correctly and it's working fine.
Here I am giving the screenshots :
/ 1st Screenshot
/ 2nd Screenshot
please help....
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
Can you solve this exception :
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Sounds like you simply have CLASSPATH issues, make sure the required libraries are in your CLASSPATH. In Eclipse this is under the Run Configuration area.
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Shounak Kundu
Ranch Hand
Joined: Jul 29, 2010
Posts: 60
|
|
The problem was solved. I just had to extract the jar files and copy the extracted folders to build/classes/ folder.
Thank you guys for your support......
|
 |
 |
|
|
subject: Problem while uploading an image using UploadBean
|
|
|