Can we please have a notification scheme enabled for Undertow Jira?
by Darran Lofthouse
Can we please have a notification scheme enabling for the Undertow Jira
project so that we can receive e-mail notifications.
I would suggest just use the same one as is used for Remoting JMX, it
should be sufficient to have the notifications go to the general mailing
list and interested individuals.
Regards,
Darran Lofthouse.
10 years, 3 months
Servlet request and form parameters
by Michal Petrov
Hi,
I'm from the RichFaces team and I've run into a problem with the HttpServletRequestImpl on WildFly 8 Final (Undertow 1.0.1.Final).
In our fileUpload component we're intercepting the request and parsing the parts to find the uploaded files, wrapping it and passing it on. Reading the parts sets readStarted to true and so in the Restore View phase when JSF is checking the request parameters they are inaccessible because readStarted stops the parsing of form data. I can work around that but I'm wondering what's the reason for preventing the parsing.
Thanks,
Michal
10 years, 8 months
Sharing session attributes in NonBlocking Handlers and Traditional Servlets
by Lightspoke Discussion
Hello,
Does anyone know how you might go about sharing session attributes between
a servlet and a non-blocking handler in the same project?
InMemorySessionManager sessman = new
InMemorySessionManager(foundsessid);
SessionAttachmentHandler sessattach = new
SessionAttachmentHandler(sessman, sessconf);
SessionManager regsessman = sessattach.getSessionManager();
Session session;
session = sessman.getSession(exchange, sessconf);
//returns null
SessionCookieConfig sessconf = new SessionCookieConfig();
String foundsessid = sessconf.findSessionId(exchange);
session = regsessman.getSession(foundsessid);
System.out.println("getsession by id ="+session );
//returns null
session = regsessman.createSession(exchange, sessconf);
System.out.println("create session ="+session );
//returns a session - but ...
1. session attributes from servlet do not return its value and
2. session attributes across http requests do not persist in memory
Thanks in advance!
--
--
Mike
10 years, 8 months
UndertowClient and SSL
by Cristian Constantin
Hi,
I am using io.undertow.server.handlers.proxy.SimpleProxyClientProvider to
implement a Reverse Proxy with Undertow.
If I proxy a remote service that uses HTTPS I get the following error:
'java.lang.IllegalArgumentException: UT000065: SSL must be specified to
connect to a https URL' at line 61 in HttpClientProvider (I'm using
undertow-core-1.0.1.Final).
Digging in the sources I found that
io.undertow.client.http.HttpClientProvider#connect is called from
io.undertow.client.UndertowClient#connect with parameter XnioSsl ssl always
null.
So is the SSL support for the HTTP client not implemented yet? Or am I
missing something here?
Regards,
Cristian Constantin
10 years, 9 months
Help Configuring Handlers
by Ari King
>
> There can only be one root handler. Basically handlers chain together, so
> the current handler picks the next handler (or generates a response).
> It sounds like what you want to do is map the JAX-RS handlers to the root
> of the servlet deployment, and then use a path handler with the servlet
> deployment under /api and the resource handler under /.
>
Yes, that was exactly what I was intending/attempting to do.
Alternatively you just set the Servlet deployment's ResourceManager and
> then the resources will just be served up by the DefaultServlet.
>
>From the docs I know the "ResourceManager" is a built in handler, but is
there more information on it or an example of how to set it?
Thanks.
-Ari
10 years, 9 months
Fwd: Help Configuring Handlers
by Ari King
Hi,
I'd appreciate help in understanding how to setup handlers. I want paths
that begin with "/api" to be handled by JAXRS and all others to be handled
by the file resource manager.
I'm confused as to why using the defaultContainer works, but using a
servlet container factory instance doesn't. When I use the defaultContainer
approach, executing a curl GET command against
http://localhost:8080/api/example works as expected, however, if I use the
servlet container factory, the endpoint is not found.
DeploymentManager manager =
Servlets.defaultContainer().addDeployment(deployInfo);
// But if I switch the container to:
// ServletContainer.Factory.newInstance().addDeployment(deployInfo)
// and add a path handler:
// private final PathHandler pathHandler = new PathHandler();
// pathHandler.addExactPath("/api", manager.start());
// and then set the handler:
// .setHandler(pathHandler)
// the endpoint(s) aren't found
try {
server = Undertow.builder()
.addHttpListener((int) conf.get("port"),
conf.get("host").toString())
.setHandler(manager.start())
.build();
} catch (NumberFormatException | ServletException e) {
logger.error("Undertow server build error: {}", e.getMessage());
}
Thanks.
-Ari
10 years, 9 months