process.php, process.jsp and mysql database

Upload core product.
CortoMaltese
Posts: 19
Joined: Sun Sep 13, 2009 10:25 am

process.php, process.jsp and mysql database

Post by CortoMaltese »

Hey guys
I thought i would open a topic for that particular subject

2 questions :

1. Is there a way to use process.jsp and adding the file name in a mysql database, knowing i only know php and all my site is in php .

2. in process.php I can't find the right place(s) to put my mysql insert query. I tried all I found on the forum, but none work
The only good result is when I launch directly process.php and using the form in it... But the same one via the applet, do not work !

Thank you very much

C.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php, process.jsp and mysql database

Post by support »

1. Is there a way to use process.jsp and adding the file name in a mysql database, knowing i only know php and all my site is in php .
No, JSP requires Java and servlet engine (such as TOMCAT) on server-side. If you have TOMCAT then integrating MySQL won't be a problem.
2. in process.php I can't find the right place(s) to put my mysql insert query. I tried all I found on the forum, but none work
The only good result is when I launch directly process.php and using the form in it... But the same one via the applet, do not work !
I would add this after: $message = do_post_upload($target_folder,$max_size,$resume);
or inside do_post_upload

CortoMaltese
Posts: 19
Joined: Sun Sep 13, 2009 10:25 am

Re: process.php, process.jsp and mysql database

Post by CortoMaltese »

No, JSP requires Java and servlet engine (such as TOMCAT) on server-side. If you have TOMCAT then integrating MySQL won't be a problem.
But this will have to be coded in jsp right ?
I would add this after: $message = do_post_upload($target_folder,$max_size,$resume);
or inside do_post_upload
I try that...

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php, process.jsp and mysql database

Post by support »

But this will have to be coded in jsp right ?
You should create a JavaBean and just call a method such as myBean.store(filename);
The JavaBean is an external Java class based on JDBC API to access MySQL.

CortoMaltese
Posts: 19
Joined: Sun Sep 13, 2009 10:25 am

Re: process.php, process.jsp and mysql database

Post by CortoMaltese »

ok thanks

kmvijay
Posts: 12
Joined: Fri Nov 06, 2009 1:10 pm

Re: process.php, process.jsp and mysql database

Post by kmvijay »

Could anyone please describe how to get successfully uploaded file name to text box in the same web page, but without clicking any buttons?.

"JFileUpload/documentation/samples/javascript_api/applet_http.html" This page describes only after clicking the buttons. But I want without clicking any buttons?.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php, process.jsp and mysql database

Post by support »

You mean start upload automatically ? Without end-user action ?

kmvijay
Posts: 12
Joined: Fri Nov 06, 2009 1:10 pm

Re: process.php, process.jsp and mysql database

Post by kmvijay »

No.

In a web page I have one Text Box i.e. (http://tinymce.moxiecode.com/) actually it is tinymce HTML editor.
Under the editor, I like to use your JFileUpload container.

When the user drag and drop the image single/multiple files, once it is successfully uploaded to the Server, then I have to show the exact Server URL LINK (e.g. <img src="https://server.com/files/2009/14507-image1.jpg" alt="14507-image1.jpg" /><br /> ) in the TinyMCE Editor.

Is it possible to show the URL Link in the HTML editor without clicking any buttons after user drag and dropped the images?.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php, process.jsp and mysql database

Post by support »

I think that you should use JSAPI add-on. Once upload is completed you can have a JavaScript callback so you could update your editor from JavaScript.
http://www.jfileupload.com/products/tools/index.html

kmvijay
Posts: 12
Joined: Fri Nov 06, 2009 1:10 pm

Re: process.php, process.jsp and mysql database

Post by kmvijay »

Hi,
Below is the error message after running html web page applet_http_jsapi.html in Internet Explorer. I haven't changed any configuration. Just tried to see the applet is is running in web page.

But if I run applet_http.html, it's running ok.

Java Plug-in 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\user1
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/P
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.access$400(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jfileupload.transfer.client.core.P
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 20 more
Caused by: java.io.IOException: open HTTP connection failed:http://localhost/test/jfileupload/jfile ... re/P.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 24 more
Exception: java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/P
Last edited by kmvijay on Wed Nov 11, 2009 12:58 pm, edited 1 time in total.

Post Reply