REST vs Dynamic web project - eclipse

I developed a dynamic web project in eclipse java EE ide as index.jsp, when I run it on Tomcat Server7.0 server it says http://localhost:8080/filename/ something. is that what they mean by REST? or do I need Spring to run a REST ?. rest is what that comes in a url, if i provide this url in my browser it opens the file, then why I can't call it as rest service?

Restful is an architectural style that make in disposition through HTTP a number of resources under different formats, usually json, to set or retrive the ressources, simple http operations (PUT, GET, POST, and DELETE. PUT) could be used for that.
I recommend you to use JAX-RS, but here u can see how to work with rest web service with Spring:
Building a RESTful Web Service Spring

Related

Calling spring boot rest service from GWT

I want the gwt app to call a spring boot rest service with basic authentication which consumes and produces a json object and is deployed on a seperate server from the gwt app.
Any hints on how this can be done ?
There is a library called restygwt to easily define REST calls. I think there is an easy way to set the 'Basic' header.

Using REST api to build a web app

What happens when we do not use REST api to build a web application? And also please tell how to build a web service using REST api in PHP.
What happens when we do not use REST api to build a web application?
Nothing, you can do your project with or without REST API. Assume you are running a restaurant and you want to attach with online food service like Foodpanda,zomato you need to provide an API to interact your data without any user interface which can be done easily using REST.
Why do we need RESTful web services?
REST should be used if it is very important for you to minimize the coupling between client and server components in a distributed application. [read more]
How to build a web service using REST api in PHP?
There are many resources available in internet. Here I found something related to PHP
PHP RESTful Web Service

Restful Webservice SAP testing

Is there any way to test rest Webservices in SAP?
I know it's possible to test SOAP Webservices with eCATT but to do that a WSDL file is needed.
The Problem with rest Webservices is, there is no such WSDL file.
Thanks in advance.
I'm assuming from your question that you'd like to test the service from within your SAP system rather than by using an external tool.
If you have access to a system that has the Gateway components deployed, you can use the Gateway client (transaction code /IWFND/GW_CLIENT). It provides a very similar set of functionality to Postman, Paw, et al.
You can use some rest clients available on the browsers:
Postman -> Chrome
RESTClient -> Firefox
Futhermore, if you need a more robust client, you can use SoapUI. See this link.
You may use Fiddler.
Here is detailed instructions on how to test a web service (I know the instructions are for asp.net web services but the Fiddler part should work for any web services).

Can two version of resteasy & jetty be loaded in same JVM

I have a very typical problem. I am using in-house developed platform which uses Jetty server and rest easy to provide a wrapper over REST framework. When they did that they made lot of tweaks for some specific scenes.
Now problem is that when I developed a REST based service with raw interfaces of rest easy and embed my jetty server in same JVM. My service can receive the request but response is always 500 server error.
I feel the in-house framework is intercepting the response doing some security validations so my response doesn't reach.
I was wondering if there is a way to use the different rest easy version and run in same JVM. I have tried to embed a jetty server and added a normal Servlet and I can access it but I can't achieve the same with my rest based servlet.
Any Idea how could I load two versions of rest easy on same JVM ?
What you can't have is two applications in the same web application context, since you are supposed to define only one class implementing javax.ws.rs.Application.
But that shouldn't be a problem, as long as classes live in different ClassLoaders. Each web application context must be in isolation of other contexts, each defining its own ClassLoader.
You can perform all kinds of class loading manipulation in Jetty: https://wiki.eclipse.org/Jetty/Reference/Jetty_Classloading
In conclusion, as long as you use different jar files of RESTEasy in each web context, you should be able to run two REST applications using different RESTEasy versions in the same JVM process.

How to create Rest Web service client and server

Hi I need to use REST web service but not getting how to start. Although I have checked different articles but there is no proper example which tells flow of REST SERVER and REST CLIENT. Is there any good example link which tells how a REST server will be created with php and how this web service will be called with which technique. I need web service to show customers and then update customers using web service as well. I need to create my own web service for my application so I need to create both Rest server and Rest client.
Thanks
Crinch
REST isn't a technology, it's a style of software architecture
If you want some concrete examples and a simple framework to get started, try cherrypy, which is a minimal web framework written in python.
This should get you started with a web server that can help you adhere to REST design principles.
You Can Try PHP REST Data services https://github.com/chaturadilan/PHP-Data-Services