hi everyone recently I made a jsp website as a part of my minor project now my clg wants me to host it ,since i am very new to all this i dont know how to do it ...actually I also want that my website should also be connected to the database present im mysql workbench pls explain me how to do it and also advice me that whether i should use database remotely or not

You need to buy hosting for Java Tomcat or JBOSS I don't know what are you using and then you need to deploy your website to that server. There is a lot of available hosting but you should know, if you choose sharead hosting you can't make your own changes to server (Tomcat or JBOSS) because someone else is using it. And if you application crash for some reason or someone else's app crash it will crash all apps on that server, so my opinion is to buy your own server not shared, and you can set whatever options you want to it.
All hosting offer Mysql Database so you just need to create tables on that server and you can use it like that.
If you are using some files with relative path on server you need to find the path who will work because server start as root/web/etc/etc/...

I think that there is a optiong to make your own hosting but you will need static ip address, 24h computer, big upload and so much more ...

I think that is a best way to buy some java hosting or make it all work in PHP, PHP hosting is cheaper you can even find it for free...

actually in my website a person can upload a profile picture for it ad the image get stored in a folder now if i am using the some external server where should this folder present and also

DriverManager.getConnection("jdbc:mysql://localhost:3306/student?user=root&password=vibhuti");

and will this statement change I mean that instead of localhost i have to write my domain name?? and thanxs a lot of replying

If I understand your like of code right, you have servlet called student and you send them user and password for your database.
It will be something like this:

DriverManager.getConnection("jdbc:mysql://www.yourDomen.com/student?user=root&password=vibhuti");

When you buy your host you will need to buy domen as well so your new domen will be in every place you have localhost...

okay thanxs a lot actually student is the name of database schema

If you want to host your project as an weebsite online, then you can use web hosting provided by some companies. you can search on google about java web hosting companies and within a minutes, you can easil find it. I suggest you to use tomcat hosting as it is best for java projects. Also web hosting provides support to your database., so that you don't ned to use a separate database.

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.