Take a look at this:

I got my Tomcat working on my computer and it works fine.

1. For when I get on a website on the internet, will it have the ability to do what my localhost did and create those parameters and output it using Java?

2. Can I use PHP and MySQL queries INSIDE the java file?

Thanks