masteryoda Posted July 24, 2013 Share Posted July 24, 2013 I have tried a lot of URL mentioned in the document --http://community.jaspersoft.com/sites/default/files/docs/jasperreports-server-web-services-guide_1.pdf#pdfjs.action=download. but none of them are working. many are showing the error of page not found.eg.-- http://localhost:8080/jasperserver/rest/serverinfo/When i tried to find the rest in the jasperserver folder it was not there.can somebody tell me how can i integrate rest with jasper server . I am using version 5.1.0.thanks in advance..... Link to comment Share on other sites More sharing options...
pssp25 Posted July 24, 2013 Share Posted July 24, 2013 Hi Masteryoda, Here is a javascript function (needs jquery) function login() { $.get("http://localhost:8080/jasperserver-pro/rest/login?j_username=jasperadmin&j_password=jasperadmin", function() { alert("Logged in! Do stuff here!") }).fail(function() { alert("Cannot login!") }); } Let me know if it works. Kind regards, Paulo Link to comment Share on other sites More sharing options...
Solution masteryoda Posted July 24, 2013 Author Solution Share Posted July 24, 2013 edit: this has been mistakenly selected as the best answer...... this is the question i am asking.I am using the following program in html<!DOCTYPE html><html><head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script>$(document).ready(function () { $.get("http://localhost:8080/jasperserver-pro/rest/login?j_username=jasperadmin&j_password=jasperadmin", function() { alert("Logged in! Do stuff here!") }).fail(function() { alert("Cannot login!") });}});</script></head><body> </body></html> but the page is not showing anything... Link to comment Share on other sites More sharing options...
d.wendler Posted July 25, 2013 Share Posted July 25, 2013 You have to login first and keep the jsessionid for further requests.If you are using PHP, have a look at this library which contains basic access to jasper server: https://github.com/flowl/jasper/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now