Using Tomcat 8, I am creating a new web application called 'recipewebapp', while aiming to create the appropriate data structure 'recipewebapp'...
Using this web.xml file, this is what I have so far...
This is what this web.xml file corresponds with, according to what I have created in Tomcat 8 so far on my virtual machine:
C:\progs\tomcat8\webapps\recipewebapps\WEB-INF\classes\com\cs330\meals
I have created this web.xml file to access these three web services, which are accessible from the following URLs:
To retrieve all recipes (aka all values in my MySQL 'recipe' database).
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes
To retrieve recipes by id (aka all values in my MySQL 'recipe' database by a specific given ID).
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes/2
To retrieve recipes by numOfServings (greater than or equal to the parameter) (aka all values in MySQL 'recipe' database by a specfic variable called 'NumOfServings').
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes/recipe?serving s=6
This is the MySQL database code in which the web.xml is associated with:
All of this seems right so far - however, now I have to create some java code to associate with both the web.xml code and the MySQL code alongside it, which looks like this so far... With my aim being to match what goes alongside the MySQL database code.
Unlike before, I have made some effort to re - type this code a little and make it match what's require of it in MySQL. If there are any suggestions on how I can tweak or improve this code, it would be greatly appreciated.
Thank You.
Using this web.xml file, this is what I have so far...
This is what this web.xml file corresponds with, according to what I have created in Tomcat 8 so far on my virtual machine:
C:\progs\tomcat8\webapps\recipewebapps\WEB-INF\classes\com\cs330\meals
I have created this web.xml file to access these three web services, which are accessible from the following URLs:
To retrieve all recipes (aka all values in my MySQL 'recipe' database).
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes
To retrieve recipes by id (aka all values in my MySQL 'recipe' database by a specific given ID).
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes/2
To retrieve recipes by numOfServings (greater than or equal to the parameter) (aka all values in MySQL 'recipe' database by a specfic variable called 'NumOfServings').
http://localhost:8080/recipewebapp/reciperesources/rp1/recipes/recipe?serving s=6
This is the MySQL database code in which the web.xml is associated with:
All of this seems right so far - however, now I have to create some java code to associate with both the web.xml code and the MySQL code alongside it, which looks like this so far... With my aim being to match what goes alongside the MySQL database code.
Unlike before, I have made some effort to re - type this code a little and make it match what's require of it in MySQL. If there are any suggestions on how I can tweak or improve this code, it would be greatly appreciated.
Thank You.