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…
![](../../users/profiles/940642.webp)
vikas27
- 551
- 5
- 12
- 35
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();
…
![](../../users/profiles/1349281.webp)
tarka
- 4,623
- 8
- 41
- 71
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…
![](../../users/profiles/1349281.webp)
tarka
- 4,623
- 8
- 41
- 71
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…
![](../../users/profiles/1660228.webp)
Loki
- 3,747
- 4
- 24
- 47
1
vote
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…
![](../../users/profiles/1196170.webp)
jprism
- 2,680
- 2
- 32
- 45
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:…
![](../../users/profiles/218592.webp)
ŁukaszBachman
- 32,989
- 10
- 61
- 69
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:…
![](../../users/profiles/1009265.webp)
Junaid
- 1,606
- 7
- 29
- 48
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…
![](../../users/profiles/4119789.webp)
Nishant Modi
- 533
- 1
- 5
- 17
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
![](../../users/profiles/4119789.webp)
Nishant Modi
- 533
- 1
- 5
- 17
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',
…
![](../../users/profiles/4658699.webp)
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);…
![](../../users/profiles/1163802.webp)
Vladimir Dyuzhev
- 17,603
- 9
- 45
- 61
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(),…
![](../../users/profiles/8029105.webp)
Mahmood Sanjrani
- 156
- 2
- 17
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…
![](../../users/profiles/11832749.webp)
Michael
- 59
- 7
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…
![](../../users/profiles/7923929.webp)
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 ?
![](../../users/profiles/4119789.webp)
Nishant Modi
- 533
- 1
- 5
- 17