Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1030030 // Webserver for demonstrating (fixed) FireFox https problem

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6591L/46K).

1  
!7
2  
3  
p {
4  
  set NanoHTTPD_debug;
5  
  NanoHTTPD.LOG.setLevel(Level.FINEST);
6  
  serveHttps(8443, serverSocketFactory_botCompanyEtc());
7  
}
8  
9  
sS demoText() {
10  
  ret lines(mapI(countIterator(1000), i -> "Line " + (i+1)));
11  
}
12  
13  
html {
14  
  if (eq(uri, "/submit")) {
15  
    S text = params.get("text");
16  
    ret "Data received (" + nChars(text) + ")";
17  
  }
18  
  
19  
  ret hpostform(
20  
    p(htextarea(demoText(), name := "text", rows := 10, cols := 40))
21  
    + p(hsubmit()),
22  
    action := "submit");
23  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030030
Snippet name: Webserver for demonstrating (fixed) FireFox https problem
Eternal ID of this version: #1030030/9
Text MD5: fbd6d76d1bff69346a3b01e41e23a7ea
Transpilation MD5: 10ad0bc186a8bcac8ae26f9d2c9b28ee
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-02 16:11:37
Source code size: 489 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 723
Version history: 8 change(s)
Referenced in: [show references]