Which version of JBoss????

Hey Peter here is the link for th project

Click Here

I selected use dedicated folder for library when creating the new project.

The Zip Folder also has the SQL File.

If it shows error "No Database Selected" when trying to import, create database with name iCorp then you can export it right there.

Im uploading the JBOSS Version which i am using so that u don't face any issues when resolving the issues of server.

Big Thanks and Thumbs Up :-)

Hey Peter.

JBOSS Uploaded version.

Click Here

Works like charm have been using this version since i started Java Web Last Year.

Hy Peter did u try the new uploaded version of the Project. Also did u manage to get ur hands on JBOSS which i uploaded.

:-)

Hy Peter I have uploaded an updated version.

This is how it goes:

The Servlet responsible for uploading images into the Database works IF and ONLY IF the user places the parameter or location of the image.

LIKE THIS:

File file =new File("C:/Users/Sagar Joshi/Pictures/IDM.jpg");

But how i want is the user selects the image from the JSP through an Form which is of

enctype="multipart/form-data"

The Servlet should then process the image and then insert it into the database.

Im kinda getting closer to solving but just need ur assistance in finding out why i am getting

INFO  [STDOUT] java.lang.NullPointerException

Hope we are getting closer to solving the problem.

Thanks Once Again :-)

Will look at it tonight

Hey Peter. Did u manage to find the problem in the code?

Imported project and link it with JBoss. However I'm not able to find back of database with tables you promissed

Here is the SQL File Peter.

When u import if it shows that no database selected please create database named iCorp and then import the SQL File.

Link is :

Click Here

Thanks A TON Peter :-)

hy peter did u try the sql file i put in the previous post.

Did u find the bug in the code?

hey peter... any luck with the code?

Would appreciate your help as i cannot move ahead without solving this thread. :-(

Hi Peter were u successful in solving the riddle regarding the project i sent u?

Any luck.

Would appreciate your assistance?

Your question was about uploadig image while registering user. However I do not see anything in that form that indicates image upload. User provided data are stored fine in the database, it is just your redirect that doesn't work properly.
Debuging in NetBeans is just pain in backside

PS: You should start using some logging library instead of system outputs.

Hey peter thanks for the response. I understand the problems faced during debugging in Netbeans. Well the error i posted is that a NullPointerException is being shown when the image upload is run.

If u tried and the problem is still there, we could probably work it out together as well.

Will give a short description of the problem again.

When i provide a parameter LIKE THIS:

File file =new File("C:/Users/Sagar Joshi/Pictures/IDM.jpg");

And Run the Servlet, it gives the correct output and the image is inserted into the database correctly. (SUCCESS SO FAR).

BUT

When i put this code:

File file =new File(request.getParameter("user_image")); // User Image is the name of the file which is picked from the jsp from a form which has an input of

<input type = "file" name="user_image" />

Problems are here now.

I want the servlet to process the image selected by the user from the jsp and the process it and then insert it into the database. (FAILURE AGAIN)

So that is the current problem that i am facing.

How can i solve this riddle.

Which is why i approached you since you have experience in JSP and the use of design patterns clearly indicated in your MVC Tutorial.

Thats the situation we are facing.

I have done my level best so far but i still cant be able to solve that problem.

Is there any clue you have in solving such problem.

Even if DAO Patten is not implemented it is okay.

If the servlet processes the image and stores it to the DB it is fine, the DAO logic i will solve it on my own.

Thanks Friend :-)

PS: For the image, the jsp file is called: upload_profile.jsp and the servlet is called Upload_Profile_Image.java under the User package.

Hy Peter! Did u get the JSP and the Servlet File Which is responsible for the Uploading.

Did u get it?

I'm sorry I will not able to look at this for min 3 weeks as we are finishing/polishing an app prototype for client that will present this to investors seeking funds. So evening/weekends are put on hold

Ok Peter thanks for the response. We will take a look after a few weeks.

Hy peter been a very long tym. Are u finally done with the prototype? Do you have ample time to help me find the issue regarding the Upload Code?

Kindly assist

:-)

Hey Peter! Hope you are okay.

Can you assist me with finishing the Thread? I believe not much coding is needed to solve the thread.

Thanking You Once Again For Your Assistance throughout the Thread!

:-)

Hi @SagarSe7en ,
I have downloaded and verified the jar contents from the DROPBOX.
I found these servlet definitions in web.xml .

<servlet>
        <servlet-name>Relay</servlet-name>
        <servlet-class>FrontController.Relay</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>Login</servlet-name>
        <servlet-class>User.Login</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SignUp</servlet-name>
        <servlet-class>User.SignUp</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>Registration</servlet-name>
        <servlet-class>User.Registration</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>Upload_Profile_Image</servlet-name>
        <servlet-class>User.Upload_Profile_Image</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>Trial</servlet-name>
        <servlet-class>User.Trial</servlet-class>
    </servlet>

I did not find the java source code of these servlets in your jar file.
Please put the java source code in the drop box for me to verify

Hy Subramanya.

Thanks for the quick reply.

The source code is there. Look for the archive in dropbox.

It is all existing there.

If you experience any problem please let me know.

Thank You

@Subramanya,

Did you check the Files In Dropbox?

Are you able to access them?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.