How to save uploaded image in mysql using jsp?

Reply

Join Date: Jun 2009
Posts: 19
Reputation: farahshafilla is an unknown quantity at this point 
Solved Threads: 0
farahshafilla's Avatar
farahshafilla farahshafilla is offline Offline
Newbie Poster

Re: How to save uploaded image in mysql using jsp?

 
0
  #21
Jul 5th, 2009
adatapos...

i try run your program....
this error appear:
type 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: 22 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
i am using apache as my web server
Last edited by farahshafilla; Jul 5th, 2009 at 11:40 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 19
Reputation: farahshafilla is an unknown quantity at this point 
Solved Threads: 0
farahshafilla's Avatar
farahshafilla farahshafilla is offline Offline
Newbie Poster

Re: How to save uploaded image in mysql using jsp?

 
0
  #22
Jul 5th, 2009
my web server is apache tomcat and the version is 6.0.16
Last edited by farahshafilla; Jul 5th, 2009 at 11:45 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,555
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 452
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to save uploaded image in mysql using jsp?

 
0
  #23
Jul 6th, 2009
Which method is used by you to create a web application? - Manual or NetBeans or something else.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 19
Reputation: farahshafilla is an unknown quantity at this point 
Solved Threads: 0
farahshafilla's Avatar
farahshafilla farahshafilla is offline Offline
Newbie Poster

Re: How to save uploaded image in mysql using jsp?

 
0
  #24
Jul 6th, 2009
Originally Posted by adatapost View Post
Which method is used by you to create a web application? - Manual or NetBeans or something else.
i use netbean 6.1
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,555
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 452
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to save uploaded image in mysql using jsp?

 
0
  #25
Jul 6th, 2009
I am uploading a zip containing the code which I had posted in previous thread. I have use NetBeans6.1. Unzip it, open it uwing netbean6.1, change the mysql - database/user/password and (run)deploy it.
Attached Files
File Type: zip ImageUploadEx.zip (768.6 KB, 7 views)
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: How to save uploaded image in mysql using jsp?

 
0
  #26
Jul 6th, 2009
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 19
Reputation: farahshafilla is an unknown quantity at this point 
Solved Threads: 0
farahshafilla's Avatar
farahshafilla farahshafilla is offline Offline
Newbie Poster

Re: How to save uploaded image in mysql using jsp?

 
0
  #27
Jul 6th, 2009
Originally Posted by adatapost View Post
I am uploading a zip containing the code which I had posted in previous thread. I have use NetBeans6.1. Unzip it, open it uwing netbean6.1, change the mysql - database/user/password and (run)deploy it.
still it cannot save in the database.
it is my data base incorrect
my data base is :
  1. CREATE TABLE `testimage` (
  2. `id` VARCHAR(11) DEFAULT NULL,
  3. `image` BLOB
  4. )
Last edited by peter_budo; Jul 6th, 2009 at 6:07 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,555
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 452
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to save uploaded image in mysql using jsp?

 
0
  #28
Jul 6th, 2009
it is my data base incorrect
my data base is :
CREATE TABLE `testimage` (
`id` varchar(11) default NULL,
`image` blob
)
I didn't get you. Are you not creating a table into a database or something else?

At mysql prompt use following commands
  1. >Use database_name
  2. >Create table testimage
  3. (
  4. imageid varchar(100) primary key,
  5. imagedata blob
  6. );
  7. >
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 19
Reputation: farahshafilla is an unknown quantity at this point 
Solved Threads: 0
farahshafilla's Avatar
farahshafilla farahshafilla is offline Offline
Newbie Poster

Re: How to save uploaded image in mysql using jsp?

 
0
  #29
Jul 6th, 2009
Originally Posted by adatapost View Post
I didn't get you. Are you not creating a table into a database or something else?

At mysql prompt use following commands
  1. >Use database_name
  2. >Create table testimage
  3. (
  4. imageid varchar(100) primary key,
  5. imagedata blob
  6. );
  7. >
i already have my own database.
when i change the database name,username and passwoprd,that u give, the image still not save in the database.so im confused,what's wrong with the code.
it is because of my database or others thing.
Last edited by farahshafilla; Jul 6th, 2009 at 6:24 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,555
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 452
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to save uploaded image in mysql using jsp?

 
0
  #30
Jul 6th, 2009
Drop the table you have and create a new one.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC