java - What is the accepted 'elegant' solution for parsing URL strings to select a response function in Jetty? -
question is,
what accepted 'elegant' solution parsing url strings select response function in jetty?
i've provided background, feel free skip waffle!
the situation i've written bunch of client/server code in java, using socket connection communicate serialized java objects. obviously, depended on both client , server being in java, , while fine start wish make system more universal , resilient firewalls.
therefore, i've decided create rest api communicate data on http. don't want produce html - responses json-encoded. therefore, i'd rather not create individual files each response - instead, i'd redirect each http request, based on type , url, java method produce json response. unfortunately experience of programming servers using python/django, , i'd rather not change language @ point.
so question simple - how set embedded jetty server parse urls? i've tried reading docs, had trouble making sense of this. @ moment, seems there 2 possibilities.
one target string in handle method of abstracthandler javadoc, believe contains entire url string? manually parse in java method, web requests directed.
the other use chain of contextservlethandler? not precisely sure how done, or whether intended use of function.*
Comments
Post a Comment