Need to set property for Jetty

13 views
Skip to first unread message

lon.va...@gmail.com

unread,
Oct 1, 2020, 7:01:13 PM10/1/20
to Bootique User Group
I need to set this property for Jetty:

org.eclipse.jetty.servlet.CheckingRemoteSessionIdEncoding=true

I'm not using YAML, I'm using Java properties, but I can't figure out the magic sauce to use that long name as an init parameter.  I know there is other magic sauce to do this in code, but man, injection blows my mind 😆

Can anyone help point me in a direction or two?

Thanks,

Lon

Andrus Adamchik

unread,
Oct 2, 2020, 2:46:41 AM10/2/20
to Bootique User Group
Hi Lon,

Unfortunately there's no way to express this as a Java property, as dot is a special char, and there's no escape syntax (maybe in the future we should introduce dot-escaping). So I suppose YAML is your only option. In YAML you'd do it like this [1]:

jetty:
  params:
    "org.eclipse.jetty.servlet.CheckingRemoteSessionIdEncoding": true

If you don't want an external file, you can package the YAML in your .jar (just put it in "src/main/resources"). And then you can load it in the app as follows:

   BQCoreModule.extend(binder).addConfig("classpath:my.yml");

Andrus






--
You received this message because you are subscribed to the Google Groups "Bootique User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootique-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bootique-user/ff81bfe6-117e-4e53-9a99-cfbbf2f94846n%40googlegroups.com.

Lon Varscsak

unread,
Oct 2, 2020, 3:23:35 PM10/2/20
to Bootique User Group
Yeah, that's what I figured.  I ended up overriding JettyModule and modifying the server state that way.

Reply all
Reply to author
Forward
0 new messages