Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to disable the rest servlet, bonus points for also making the paths configurable. #46

Closed
denuno opened this issue Nov 17, 2016 · 8 comments

Comments

@denuno
Copy link
Member

denuno commented Nov 17, 2016

The internal server will add the default "/rest" servlet and mapping when it starts up. It would be swell if we could disable that behavior. It would also be nice to be able to bind it to a comma-separated list of paths, instead of just /rest.

@bdw429s
Copy link
Member

bdw429s commented Nov 19, 2016

This fix is causing an NPE

     [exec]   Exception in thread "main" java.lang.NullPointerException
     [exec]   at runwar.Server.startServer(Server.java:419)

The code there is

for(String path : serverOptions.getServletRestMappings()) {

@bdw429s
Copy link
Member

bdw429s commented Nov 23, 2016

What would it take to make this setting override the web.xml like we do for welcome files? This could be pretty handy even for wars so people can change or turn off the REST handler since editing their web.xml file really isn't easy on a CommandBox server.

@bdw429s
Copy link
Member

bdw429s commented Dec 15, 2016

Now that the next version of CommandBox basically doesn't have an internal server any longer-- they're all WAR-based servers, we pretty much have to allow this to override the web.xml or it will be useless.

@denuno
Copy link
Member Author

denuno commented Jan 9, 2017

Ugh, not the easiest thing to do because Adobe is weird.

Solved, I think, by checking the servlet name for CFRestServlet (adobe) and RestServlet (lucee),

Hopefully those are the only names that have been in use for those... I'd rather do it by class than servlet name, but Adobe uses a bootloader to set up all it's servlets, which makes that route an uglier one than this one.

@bdw429s
Copy link
Member

bdw429s commented Jan 9, 2017

Thx @denuno. Can you Pls keep this in a branch until I get CommandBox 3.5 released Tuesday. Actually, if you could cut a final version of Ruwar 3.5, that would be great and this can be the first thing you commit to the 3.6 snapshot. I just don't want any last minute development to get pulled into the CommandBox release.

@denuno denuno closed this as completed in 2606590 Jan 9, 2017
@denuno
Copy link
Member Author

denuno commented Jan 9, 2017

I cut 3.5, stopping after the java agent removal, since it seemed like you tested up to there basically. The cool thing is I didn't fix that snapshot-deleting-upon-release bug, so 3.5-SNAPSHOT is gone, along with the changes that are now in 3.6. If it broke any builds, "my bad", but it was good here-- though I do need to fix that bad-goodness.

@bdw429s
Copy link
Member

bdw429s commented Jan 9, 2017

Thx @denuno. No worries on the snapshot going away. I just bumped the CommandBox build to use Runwar 3.5.0 Final and running the final build for CommandBox 3.5.0 now. (Hey, our versions match!! :)

@bdw429s
Copy link
Member

bdw429s commented Mar 21, 2017

@denuno Hey, just trying to follow up on some of these older tickets. Can you confirm that this should work on the WAR-based servers by overriding the rest servlet mappings in the default web.xml that ships with the war? If so, I'll give it some testing and then finalize the CommandBox portions of actually passing the rest mappings from the user.

denuno added a commit that referenced this issue Sep 27, 2017
* Replace the default/catchall log handler with a name.contains( 'cfml' || 'undertow' ) filtered one.

* Override web.xml REST mappings when passed in as argument. Refs #46

* Bump version to 3.6.0 and update Undertow. Closes #62

* Perhaps fix chrome as an option for browser opening, also first try preferred browser vs. firefox.

* Fix relative resource path stuff, and greedy alias replacement. Closes #63

* Tone down the debug stuff.  Refs #56

* try/catch (#68)

* Try to fix some NPEs from the filters

* Update Undertow to 1.4.11.Final. Closes #62 (at least until the next version comes out.)

* Improve SSL support and add a Basic Auth feature.  Might close #69 and close #64

* Add some performance tuning options for Undertow.  Closes #71

* Allow aliases to be case insensitive.  Closes #52

* Initial go at some load balancer / clustering stuff.  Refs #73

* Add JSR websocket support.  Closes #53

* backing up for a second to cut 3.6.0

* Release 3.6.0

* Bump to 3.6.1, put the loadbalance stuff back in.

* Fix wildcard cert loading and add rough draft of adding/removing nodes from the balancer.

* Add --directory-refresh option, defaulted to false. Closes #75 (until something better comes along)

* Update loadbalancer stuff a bit, add caching resource manager for testing

* Little better error when balancehost is incomplete.

* Fix case sensitivy (#77)

Thanks!

* Improve ACF detection & fix missing cfcalsses folder (#78)

* Add option to turn on proxy peer address handling (-proxypeeraddress,--proxy-peeraddress <true|false>).  Closes #80

* Add option to disable system tray (-tray, --tray-enable <true|false>).  Closes #81

* Add missing URLRewriteFilter init parameters (--urlrewrite-check <interval>, --urlrewrite-statuspath <path>).  Closes #79

* Add support for HTTP2.  Closes #72

* Update tray dependencies. Refs #82

* Add Tray class

* Add NullPrintStream class

* bump jre

* Fix weird web.xml parse error, and add tray action to open file system browser.

* Shutdown enhancements.

* Looking at wrong flag (#84)

Thanks!

* Logging enhacements (#87)

* Ensure we pass SystemTray a tooltip < 65 chars long.

* Remove logback, add slf4j.

* Looking at wrong flag (#84)

Thanks!

* Logging enhacements (#87)

* Remove logback, add slf4j.

* Suppress some startup stuff, both from slf4j and the availability check.

* Default open-browser to true if url is specified.

* A test for debugyness

* Move try/catch to to ServerOptions versus everywhere else.

* Add PID and other Tray things.  Closes #89, Closes #90

* Tweak restart, don't think it's going to work though.

* Rework the readme (#94)

* Update the README

* Update auth so remote_user is set. Closes #83

* Remove unused imports

* Bump version for next release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants