Converting web application to RESTful web service
I'm building a simple web application with java. Right now it contains a jsp in which the user can enter some data (via textareas in a html file), that is processed in the servlet by the program logic. After that the result gets pushed back to the jsp by setattribute and is displayed to the user. Its working quite fine...
Now I'm told to convert this program to the REST architecture, which I have never heard before. I have to do this task with jax-rs and jersey. In which way does these two concepts differ from another one and do you guys have a recommendation how I should start?
Thanks for all the comments!
EDIT:
Thanks for the quick reply!
I have watched 60% of the tutorial recommended in the comments and now I'm understanding the REST architecture to some extend.
Nevertheless I'm confused how to start with my application, which should transform an input to another encoding (for example: base64 to binary).
With my understanding right now I write the origin input in the request body of a post method(?) and receive the encoded data in the respond body.
A conversion would look like this:
/conversion/format1/format2
Is this approach is somewhat correct?
Secondly do I have to create a method for each conversion (like base64 --> binary or base64 --> hex) or is there any way to avoid this?
Soz for my poor English...
java rest jsp servlets frontend
add a comment |
I'm building a simple web application with java. Right now it contains a jsp in which the user can enter some data (via textareas in a html file), that is processed in the servlet by the program logic. After that the result gets pushed back to the jsp by setattribute and is displayed to the user. Its working quite fine...
Now I'm told to convert this program to the REST architecture, which I have never heard before. I have to do this task with jax-rs and jersey. In which way does these two concepts differ from another one and do you guys have a recommendation how I should start?
Thanks for all the comments!
EDIT:
Thanks for the quick reply!
I have watched 60% of the tutorial recommended in the comments and now I'm understanding the REST architecture to some extend.
Nevertheless I'm confused how to start with my application, which should transform an input to another encoding (for example: base64 to binary).
With my understanding right now I write the origin input in the request body of a post method(?) and receive the encoded data in the respond body.
A conversion would look like this:
/conversion/format1/format2
Is this approach is somewhat correct?
Secondly do I have to create a method for each conversion (like base64 --> binary or base64 --> hex) or is there any way to avoid this?
Soz for my poor English...
java rest jsp servlets frontend
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21
add a comment |
I'm building a simple web application with java. Right now it contains a jsp in which the user can enter some data (via textareas in a html file), that is processed in the servlet by the program logic. After that the result gets pushed back to the jsp by setattribute and is displayed to the user. Its working quite fine...
Now I'm told to convert this program to the REST architecture, which I have never heard before. I have to do this task with jax-rs and jersey. In which way does these two concepts differ from another one and do you guys have a recommendation how I should start?
Thanks for all the comments!
EDIT:
Thanks for the quick reply!
I have watched 60% of the tutorial recommended in the comments and now I'm understanding the REST architecture to some extend.
Nevertheless I'm confused how to start with my application, which should transform an input to another encoding (for example: base64 to binary).
With my understanding right now I write the origin input in the request body of a post method(?) and receive the encoded data in the respond body.
A conversion would look like this:
/conversion/format1/format2
Is this approach is somewhat correct?
Secondly do I have to create a method for each conversion (like base64 --> binary or base64 --> hex) or is there any way to avoid this?
Soz for my poor English...
java rest jsp servlets frontend
I'm building a simple web application with java. Right now it contains a jsp in which the user can enter some data (via textareas in a html file), that is processed in the servlet by the program logic. After that the result gets pushed back to the jsp by setattribute and is displayed to the user. Its working quite fine...
Now I'm told to convert this program to the REST architecture, which I have never heard before. I have to do this task with jax-rs and jersey. In which way does these two concepts differ from another one and do you guys have a recommendation how I should start?
Thanks for all the comments!
EDIT:
Thanks for the quick reply!
I have watched 60% of the tutorial recommended in the comments and now I'm understanding the REST architecture to some extend.
Nevertheless I'm confused how to start with my application, which should transform an input to another encoding (for example: base64 to binary).
With my understanding right now I write the origin input in the request body of a post method(?) and receive the encoded data in the respond body.
A conversion would look like this:
/conversion/format1/format2
Is this approach is somewhat correct?
Secondly do I have to create a method for each conversion (like base64 --> binary or base64 --> hex) or is there any way to avoid this?
Soz for my poor English...
java rest jsp servlets frontend
java rest jsp servlets frontend
edited Nov 13 '18 at 14:25
Ooooof
asked Nov 12 '18 at 21:11
OoooofOoooof
33
33
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21
add a comment |
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21
add a comment |
1 Answer
1
active
oldest
votes
I think nobody can answer your question fully with one reply post here.
I would advise you to learn about REST architecture first and then jax-rs and jersey.
So i would refer you this tutorial where every aforementioned topics are covered in a very easily understandable and organized way,
https://javabrains.io/courses/javaee_jaxrs/
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%2f53270180%2fconverting-web-application-to-restful-web-service%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
I think nobody can answer your question fully with one reply post here.
I would advise you to learn about REST architecture first and then jax-rs and jersey.
So i would refer you this tutorial where every aforementioned topics are covered in a very easily understandable and organized way,
https://javabrains.io/courses/javaee_jaxrs/
add a comment |
I think nobody can answer your question fully with one reply post here.
I would advise you to learn about REST architecture first and then jax-rs and jersey.
So i would refer you this tutorial where every aforementioned topics are covered in a very easily understandable and organized way,
https://javabrains.io/courses/javaee_jaxrs/
add a comment |
I think nobody can answer your question fully with one reply post here.
I would advise you to learn about REST architecture first and then jax-rs and jersey.
So i would refer you this tutorial where every aforementioned topics are covered in a very easily understandable and organized way,
https://javabrains.io/courses/javaee_jaxrs/
I think nobody can answer your question fully with one reply post here.
I would advise you to learn about REST architecture first and then jax-rs and jersey.
So i would refer you this tutorial where every aforementioned topics are covered in a very easily understandable and organized way,
https://javabrains.io/courses/javaee_jaxrs/
answered Nov 13 '18 at 5:02
Ibrahim KhalilIbrahim Khalil
312
312
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%2f53270180%2fconverting-web-application-to-restful-web-service%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
I recommend that you start by writing code. And when you have a specific problem with code you have written, you should ask about that specific problem here.
– The Head Rush
Nov 12 '18 at 21:18
Welcome to Stack Overflow. Unfortunately, your question is too broad for this site. Please take some time to go through the help center to review what type of questions are good questions for this site. Thanks, and good luck.
– Paul Samsotha
Nov 12 '18 at 23:21