Hi, 

Do you get a response* if you simply paste http:
//localhost:8080/axxyr/rest/login/user into your browser?

*It may be useful to return something other than null to work this out for 
sure - but you could resort to Chrome Dev Tools (network tab) to check the 
response.

The only part of your path which remains a mystery to me is the 'rest' 
part.  Where is this coming from?  Are you using a JaxRsActivator 
<https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Web_Framework_Kit/2.5/html/Getting_Started_with_an_HTML5_Mobile_Web_Project/JaxRsActivator.java_File.html>
 or 
are you configuring this in your web.xml?

Justin

On Tuesday, 24 March 2015 13:12:22 UTC+2, Polokh Andrey wrote:
>
> Hello, 
>
> I am using restangular to get data from the server, but when I try to send 
> the request I got an error message 
>
> Failed to load resource: the server responded with a status of 404 (Not 
> Found) 
>   at http://localhost:8080/axxyr/rest/login/user
>
>
> in the config part I put 
>
> RestangularProvider.setBaseUrl("/axxyr");
>
> and my service looks like this:
>
> mainApp.factory('LoginService', ['Restangular', function (Restangular) {
>
>         return {
>             getUser: function (user) {
>                 alert('here');
>                  var aPromise = Restangular.one("rest/login/user");
>                  return aPromise.getList();
>             }
>         };
>     }]);
>
>
> On the server side I have a class which should receive requests from the 
> client:
>
> package axxyr.com.rest;
>
>
> import com.suppx.axxyr.object.User;
> import java.util.ArrayList;
> import javax.ws.rs.GET;
> import javax.ws.rs.Path;
> import javax.ws.rs.Produces;
> import javax.ws.rs.core.MediaType;
>
>
> @Path("/login")
> public class LoginRestService {
>
>
>     @GET
>     @Path("/user")
>     @Produces(MediaType.APPLICATION_JSON)
>     public ArrayList<User> getUser() {
>         System.out.println("test");
>         return null;
>     }
>
>
> }
>
>
>
> What is the problem?  
> Please, advise. 
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to