JSON request for database
At the moment i'm working on a school project, we are configuring a Raspberry Pi as a Wifi AP with a captive portal.
We already build a .HTML landing screen, where the user can provide his name and ticketnumber. That information gets send to a java servlet with HTTP post.
In the java servlet the name and ticketnumber are saved as a variable.
The school provides a database where the name's and ticketnumbers are saved. We have to use a JSON request to check the name and ticketnumber, and that get a valid reply. I have no idea where to start, or how this will work. Maybe someone has a idea on where to start, or where to look or what to read. The JSON request we have to send will look something like this:
"function":"Check",
"teamID":xxxxx,
"teamKEY":xxxxx,
"firstName":"Henk",
"lastName":"Jansen",
"requestId":"15"
I think i have to call the database through the URL we got, and then use Java to POST the data the user provide's to the database.
I cannot use PHP or something, it has to be Java!
Sorry for bad English and thanks in Advance!
Ps. I'm not asking u to do my homework, i just need some directions :-)
java html captiveportal
add a comment |
At the moment i'm working on a school project, we are configuring a Raspberry Pi as a Wifi AP with a captive portal.
We already build a .HTML landing screen, where the user can provide his name and ticketnumber. That information gets send to a java servlet with HTTP post.
In the java servlet the name and ticketnumber are saved as a variable.
The school provides a database where the name's and ticketnumbers are saved. We have to use a JSON request to check the name and ticketnumber, and that get a valid reply. I have no idea where to start, or how this will work. Maybe someone has a idea on where to start, or where to look or what to read. The JSON request we have to send will look something like this:
"function":"Check",
"teamID":xxxxx,
"teamKEY":xxxxx,
"firstName":"Henk",
"lastName":"Jansen",
"requestId":"15"
I think i have to call the database through the URL we got, and then use Java to POST the data the user provide's to the database.
I cannot use PHP or something, it has to be Java!
Sorry for bad English and thanks in Advance!
Ps. I'm not asking u to do my homework, i just need some directions :-)
java html captiveportal
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35
add a comment |
At the moment i'm working on a school project, we are configuring a Raspberry Pi as a Wifi AP with a captive portal.
We already build a .HTML landing screen, where the user can provide his name and ticketnumber. That information gets send to a java servlet with HTTP post.
In the java servlet the name and ticketnumber are saved as a variable.
The school provides a database where the name's and ticketnumbers are saved. We have to use a JSON request to check the name and ticketnumber, and that get a valid reply. I have no idea where to start, or how this will work. Maybe someone has a idea on where to start, or where to look or what to read. The JSON request we have to send will look something like this:
"function":"Check",
"teamID":xxxxx,
"teamKEY":xxxxx,
"firstName":"Henk",
"lastName":"Jansen",
"requestId":"15"
I think i have to call the database through the URL we got, and then use Java to POST the data the user provide's to the database.
I cannot use PHP or something, it has to be Java!
Sorry for bad English and thanks in Advance!
Ps. I'm not asking u to do my homework, i just need some directions :-)
java html captiveportal
At the moment i'm working on a school project, we are configuring a Raspberry Pi as a Wifi AP with a captive portal.
We already build a .HTML landing screen, where the user can provide his name and ticketnumber. That information gets send to a java servlet with HTTP post.
In the java servlet the name and ticketnumber are saved as a variable.
The school provides a database where the name's and ticketnumbers are saved. We have to use a JSON request to check the name and ticketnumber, and that get a valid reply. I have no idea where to start, or how this will work. Maybe someone has a idea on where to start, or where to look or what to read. The JSON request we have to send will look something like this:
"function":"Check",
"teamID":xxxxx,
"teamKEY":xxxxx,
"firstName":"Henk",
"lastName":"Jansen",
"requestId":"15"
I think i have to call the database through the URL we got, and then use Java to POST the data the user provide's to the database.
I cannot use PHP or something, it has to be Java!
Sorry for bad English and thanks in Advance!
Ps. I'm not asking u to do my homework, i just need some directions :-)
java html captiveportal
java html captiveportal
edited Nov 13 '18 at 20:34
pushkin
4,043112752
4,043112752
asked Nov 13 '18 at 19:17
pro10boi96pro10boi96
1
1
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35
add a comment |
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35
add a comment |
1 Answer
1
active
oldest
votes
You could look into googles java http client following the links below. This might be a good place to start.
https://github.com/googleapis/google-http-java-client
https://developers.google.com/api-client-library/java/
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53288063%2fjson-request-for-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could look into googles java http client following the links below. This might be a good place to start.
https://github.com/googleapis/google-http-java-client
https://developers.google.com/api-client-library/java/
add a comment |
You could look into googles java http client following the links below. This might be a good place to start.
https://github.com/googleapis/google-http-java-client
https://developers.google.com/api-client-library/java/
add a comment |
You could look into googles java http client following the links below. This might be a good place to start.
https://github.com/googleapis/google-http-java-client
https://developers.google.com/api-client-library/java/
You could look into googles java http client following the links below. This might be a good place to start.
https://github.com/googleapis/google-http-java-client
https://developers.google.com/api-client-library/java/
answered Nov 13 '18 at 19:29
ahembergahemberg
34
34
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53288063%2fjson-request-for-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi there, welcome to Stack Overflow. This question is a little broad, because there are many ways to do what you want, and many people will have different ideas. It might be helpful for you to search (on Google, e.g. "how to send JSON request in Java"), or ask (your teacher, or another developer working on the project, e.g. "can you explain what sending a JSON request means?"), and come back to Stack Overflow when you are stuck but have a more specific obstacle
– MyStackRunnethOver
Nov 13 '18 at 19:35