JSP and Restlets - restlet

I developed a simple web servie using restlets . everything s fine i can call a URI and connect to db and do modifications , but when i tried to do the same using jsp s i was not able to get the jsp page itself in the browser . How can i connect a jsp page to this restlet ?

See this stack and the answer from Rich Seller. I personally prefer using Freemarker

Related

SSRS URL Change

I am struggling with getting SSRS to have a domain name without naming the virtual directory. To give an example.
I currently have reporting.domain.com/reports working fine. It's great. However, I want to eliminate the /reports, and I want to use reports.domain.com.
I have tried to google this, but I haven't found any instructions on getting this done.
Does anyone have any idea what I can do? This is for INTERNAL purposes and not public web purposes.
Reiteration:
reporting.domain.com/reports (currently works fine)
to
reports.domain.com (I want end users to use this)
You can enable IIS on the SSRS box and have it forward http://reports.domain.com to https://reports.domain.com/reports.
See eg https://www.sqlservice.se/how-to-redirect-ssrs-url/
This is possible, the above answer was close but just off base.
Install IIS Services.
Create a website with the name you want.
Create a page called Default.htm and make it a HTML document. Input the HTML meta code to redirect to another website.
Create a DNS record for your website, and it should work.
Using an HTTP Redirect built into IIS will not work with the SSRS stuff, must use the HTML meta code.
<meta http-equiv="refresh" content="delay_time; URL=new_website_url" />

Upload files by GWT to Rails server

I am working on an app that I need to upload files using GWT in the client side, then a servlet receives the uploaded file. My problem that I need to pass the file from the servlet to the ruby on rails controller (on the same server with the servlet). Any suggestion is appreciated.
I am do not see any particular problem here. Just prepare somewhere a non GWT html page with a form, an input and submit that can send a file to your Rails server. Now everything that you need is to prepare the same form using GWT components. In a case of standart GWT components you can use FormPanel and FileUpload components. Be sure that encoding and method was correctly set (example for built-in GWT components):
FormPanel form = prepareForm();
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
// sending file
form.submit();

Relative url in Visual web part

In my Visual web part I'm using relative url like following and it's working fine . But I assume it will not work when I deploy my project in different site structure on another server. So my question is how to make links,urls dynamic which will work in all the scenarios.
../../something.aspx
Please note I have some JQuery files included in <script> tag I can't only rely on building dynamic url using code.
Rishi,
Are you using a document library to store the page? If so, you could use SPDocumentLibrary.DefaultViewURL. If you're trying to navigate to a different web, then you can get a web's URL from SPWeb.Url.
Best,
-Tony

Sending Values to web-service - BEGINNER

I am getting the following error when i try to execute send some values via SenchaTouch to the web service. What does this mean, and how can i solve this? The remaining of my code can be found at this SO post
XMLHttpRequest cannot load http://testWebService/service/. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
note: I found this link, but it still didn't help.
If you are planning to run your application as a web application, you have to make sure your web service is in the same domain as your application.
Try this if you are planning to deploy sencha touch through phonegap but want to debug on your browser.
Using chrome,
to disable Cross-site scripting security:
Disable same origin policy in Chrome
Or using safari : (for this method http://localhost won't work)
Open the file locally on safari.(cmd+o and select the html file you wanna run)
Safari does not have XSS security for local files.
Hope it helps.
Regards,
Steve0hh
This is the browser blocking a cross domain XMLHttpRequest. You will need to either run a local copy of the web service on localhost, or upload your application to the TestWebService domain.
See enable-cors.org, to enable Cross-Origin Resource Sharing.

REST support within a java templating engine such as StringTemplate, FreeMarker, Velocity or Tiles?

I'd like to compare some templating engines that supports creating RESTful URLS for templating header/body/footer pages in a java application. I don't want my pages to have a jsp, .st or .ftl extension. Does anyone have links to example applications that illustrate how to set up REST with any of the popular templating engines?
Thanks.
-John
It's not a problem with any of the mentioned engines. They only provide the MVC View. The visited URL belongs to the MVC Controller (the "action"). Thus, the page URL should never contain the template file name. (In JSP Model-2 frameworks you forward the HTTP request to the view page, so in that sense the templates have an URL. But this request forwarding is entirely server side, so the template URL is still not visible on the client side.) If the MVC Controllers are JSP pages, you can still hide the .jps extension by creating a catch-all central controller servlet (or filter) that adds the .jsp extension to the URL and forwards the HTTP request internally.