Sub Handle(req As ServletRequest, resp As ServletResponse)
Log(req.GetParameter("userid"))
Log(req.GetParameter("bookid"))
resp.Write("processing...")
End Sub
but my question is can i do it without adding the value keys in the url?
I'm using jetty 9.0.3. How to map an URL such as www.myweb.com/{servlet}/{parameter} to the given servlet and parameter? For example, the URL '/client/12312' will route to clientServlet and its d...
yes, this solution is already known to me as I wrote above but according to the Stackoverflow thread we can edit the URL pattern in the web.xml file and maybe we can allow adding ":" to the URL and still direct to the correct server handler.
the question is can we edit the web.xml file? would that be the solution for this problem?
if not i still can parse the URL by myself.
ok thank you @EnriqueGonzalez but i do read that we can add a custom URL pattern to web.xml file of the jetty library and like this we maybe could add a patter that will accept : inside the url. what do you think would that be possible?
Hi i have created a maven project with embedded jetty server which is executing fine. After getting jetty server started in eclipse console so to access welcome file (index.jsp) url could be someth...
I'm using jetty 9.0.3. How to map an URL such as www.myweb.com/{servlet}/{parameter} to the given servlet and parameter? For example, the URL '/client/12312' will route to clientServlet and its d...
How would one route the following path in Jetty ? /users/user_id/transactions/transaction_id I tried it this way: /users/*/transactions/* But I'm getting an error stating below : java.lang.
stackoverflow.com
As you can see jetty by design allows only the *
If you can catch this url client/323/book/6363
You can parse it manually, seems easy to do.
How would one route the following path in Jetty ? /users/user_id/transactions/transaction_id I tried it this way: /users/*/transactions/* But I'm getting an error stating below : java.lang.
stackoverflow.com
As you can see jetty by design allows only the *
If you can catch this url client/323/book/6363
You can parse it manually, seems easy to do.
I made the research months ago and arrived at that SO answer. At first i thought it was a deal breaker but after many projects it seems that you can live without that feature, it is not that important
I made the research months ago and arrived at that SO answer. At first i thought it was a deal breaker but after many projects it seems that you can live without that feature, it is not that important
Hi! so i was chatting with @ilan about the idea of having multiple entries on the url parameters. https://www.b4x.com/android/forum/threads/url-routing.133665/ Due my experience, i know this is not possible, until later in the day i found in some documentation on Stripe that Spark (jetty...
Select elements(Main.ELEMENT_ACTION)
Case "view"
If elements.Length - 1 = Main.ELEMENT_ID Then
Select elements(Main.ELEMENT_ID)
Case "all"
View("all")
Case Else
View(elements(Main.ELEMENT_ID))
End Select
Else
Response.SendError(500, "Unknown action")
End If
Case Else
Response.SendError(500, "Unknown action")
Return
End Select
The code snippets above are part of my API Server project.
Updates Web API Server v2 is available Version: 1.16 Description: Create Web API Server with CRUD functionalities Sample application: [B4X] Todo List based on Web API Template: Web API Server (1.16).b4xtemplate Depends on following libraries: ByteConverter JavaObject jServer Json...