1

may be it is not a worthy question but i am new at angular js that is why going to ask this ! I have a small portal which has forms develop in jsp. Now my requirement is to display data from db on page by not moving to next page using Angular JS. Can i do this easily using jsp? or I should use c#? But transferring from jsp to c# will be quite daunting task! I shall be very great full if someone suggest a way using jsp.

Kind Regards.

Michail Michailidis
12.2k6 gold badges70 silver badges112 bronze badges
asked Oct 27, 2014 at 12:43

1 Answer 1

0

If you can return/echo json files from JSP and you can consume requests (get,post,update delete) coming to it and redirect it to whatever handles the business logic (e.g controllers) then you are set to go. I believe with JSP you mean JSP + Java Servlets + Java Beans. Or in other words controllers better be Java classes. If that is your case, then you definitely can do that without converting to C# + ASP.NET ;)

Update:

The fact that you are only using JSP is good for starters but as you get better and want the application to scale more you need to move talking with the database in a Java class/servlet. JSP should be used only for presentation/templating and no business logic (if/else this that). Now you are consuming your request names from the form like username password etc.. With angularJS will be the same. The main difference is that angular will submit the form with ajax so no page redirection will happen (there are many questions in stackoverflow how to stop a form from submitting). Then the JSP will have to return/print some json and this will be returned to angularjs for rendering that in your page.In other words there will be no html in your JSP. All the templating will happen in the client side (Javascript/AngularJS)

Links:

answered Oct 27, 2014 at 13:22

18 Comments

Michail Michailidis i have a form in jsp and i am storing records in db using jdbc, now i have to use angular js to display above mentioned records on a page by not moving the page ? can you help me out as i am a beginner and not very much familiar with new web technologies !
What are you using in the backend for consuming the data and talking to the database? Do you have java classes or you do everything in jsp?
every thing in jsp ! using jdbc !
got it @Michail Michailidis, is there any tutorial which explains this step by step so that i can implement it ! ? Regards.
I am going through it , if there is any problem i will ask you and disturb you little more again :p
|

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.