Questions tagged [restlet-2.3.1]
15 questions
12
votes
4 answers
Restlet javax.net.ssl.SSLHandshakeException: null cert chain
I am testing SSL communication between client and server locally.
So I generated certificate using OpenSSL commands. Added this certificate in cacert file. Also generated .p12 file.
I am using the same .p12 file in server and client.
This is the…

vikas27
- 563
- 5
- 14
- 36
3
votes
0 answers
Restlet SSL without Keystore
Is it possible for Restlet to use SSL certificates without a keystore? My application currently uses the DefaultSslContextFactory like this.
...
int httpPort = appConfig.getHttpPort();
int httpsPort = appConfig.getHttpsPort();
…

tarka
- 5,289
- 10
- 51
- 75
2
votes
1 answer
Migrating from Restlet 1.x to 2.x
I am migrating Restlet from 1.2 to 2.2.3 and found out Guard is now deprecated. I started using ChallengeAuthenticator (HTTP_BASIC scheme). The issue is here, I used to extend Guard class and override the method checkSecret to authorize app specific…

jprism
- 3,239
- 3
- 40
- 56
2
votes
2 answers
Restlet 2.3 Override WWW-Authenticate Header
In Restlet 2.3 I am using a ChallengeAuthenticator with ChallengeScheme.HTTP_BASIC to protect application resources. When the server receives an incorrect set of credentials the server correctly returns a 401 Unauthorized response. Also correctly it…

tarka
- 5,289
- 10
- 51
- 75
2
votes
1 answer
Upload a file using Restlet multipart/form-data in java
So I searched quite a bit now for sample codes but the only thing I found was on examples for the server side, meaning the receiving part.
I want to create an application, that uses restlet to upload a file, content type: multipart/form-data. So I…

Loki
- 4,065
- 4
- 29
- 51
1
vote
1 answer
Should I manually return 304 response for cached requests (ETag) in Restlet?
I added a custom caching behavior to my application, similar to what Thierry has proposed in this article. For every CSS, JS and HTML file server in my static content I am adding the two following headers:
// Added by me
ETag:…

ŁukaszBachman
- 33,595
- 11
- 64
- 74
1
vote
1 answer
Restlet Representation Error 422
I am getting this representation error. Can someone help to get it fixed?
Error:
Process: com.package, PID: 10791
java.lang.RuntimeException: Unable to resume activity {com.package/com.package.MainActivity}: org.restlet.resource.ResourceException:…

Junaid
- 1,668
- 7
- 30
- 51
1
vote
1 answer
Auto Conversion to XML from Java Object is not working in Restlet
I have a method
@Get("xml")
public User getUser()
{
return new User();
}
In this case when calling this method browser is showing null as response. I have also annotated the User class with @XmlRootElement Tag.
It is working fine for Json…

Nishant Modi
- 669
- 1
- 6
- 19
1
vote
1 answer
How to create sub resource in restlet
How to create a sub resource in restlet
1- I want to have two @Get annotated method in same resource
2- I want to assign each method a URI

Nishant Modi
- 669
- 1
- 6
- 19
1
vote
0 answers
Restlet ServerResource does not return JsonRepresentation, when response status = 400
I have implemented a REST service using the Restlet Framework (2.3.1). The service accepts (username, password) and returns an MD5 authentication string. A jQuery Ajax-call is executed as follows:
$.ajax({
url: host + '/authentication',
…

matt
- 41
- 1
- 6
1
vote
2 answers
Restlet framework: how to bind to localhost only?
I need to build a (standalone Java) restlet-based service that only listens on localhost, i.e. no requests from network are allowed.
I was trying to do the obvious:
Server srv = new Server(Protocol.HTTPS, "localhost", httpsPort);…

Vladimir Dyuzhev
- 18,130
- 10
- 48
- 62
0
votes
1 answer
how to request another api as Client in ServerResource method in Restlet
I have created a API in Restlet 2.4.2 java everything is working fine.
I get this error when I try to call another API as a client in my ServerResource file.
here is my calling API as client code:
Client client = new Client(new Context(),…

Mahmood Sanjrani
- 108
- 3
- 19
0
votes
1 answer
Error in backend of REST API: "INFO: The connection was broken. It was probably closed by the client. Reason: Closed"
So I am trying out a simple full stack project of my own that involves a java backend implementation of a REST API, for which I am using the org.restlet.com framework/package and jetty as the server.
Whilst I was testing my API using Postman I…

Michael
- 325
- 3
- 14
0
votes
0 answers
RESTLET - Serving static content with Server Component
I have a problem when trying to use the org.restlet.Server Component to serve static content when using the Restlet Framework.
When I ran the following code, I get:
HTTP ERROR: 404
Problem accessing /. Reason:
Not Found
Restlet throws the following…

NgigiW
- 1
- 1
0
votes
1 answer
How to use annotations instead of web.xml in Restlet
I want to remove Configuration of Application in web.xml and want to do it using annotation like jersey in Restlet.
1- Is it possible?
2- If yes then How ?

Nishant Modi
- 669
- 1
- 6
- 19