programmatic-config

How to use android to connect to an ESP8266 access point without internet in a stable way?

梦想与她 提交于 2019-12-22 17:38:19
问题 I have a Wifi Micro controller ESP8266 which also has an access point. I have referred to other blogs which talk about programmatically connecting to an access point and tried both the way Using the exposed standard APIS wifiManager.enableNetwork(netId, true); wifiManager.saveConfiguration(); wifiManager.reconnect(); Using the APIs which have @ hide on them wifiManager.connect(netId, ActionListener) The problem I am facing is that some time after i connect to the access point its getting

Programmatically change session timeout

心不动则不痛 提交于 2019-12-12 09:00:02
问题 I can logout user after defined time of inactivity. <session-timeout>240</session-timeout> But, is there some way to logout in specified time, or better, for example until 5 minutes of inactivity after specified time.? 回答1: You can change the session timeout by HttpSession#setMaxInactiveInterval() wherein you can specify the desired timeout in seconds. When you want to cover a broad range of requests for this, e.g. all pages in folder /admin or something, then the best place to do this is to

How to use android to connect to an ESP8266 access point without internet in a stable way?

孤者浪人 提交于 2019-12-06 13:24:39
I have a Wifi Micro controller ESP8266 which also has an access point. I have referred to other blogs which talk about programmatically connecting to an access point and tried both the way Using the exposed standard APIS wifiManager.enableNetwork(netId, true); wifiManager.saveConfiguration(); wifiManager.reconnect(); Using the APIs which have @ hide on them wifiManager.connect(netId, ActionListener) The problem I am facing is that some time after i connect to the access point its getting disconnected from the esp8266 access point and connecting back to my router in both the above mentioned

Map servlet programmatically instead of using web.xml or annotations

孤街浪徒 提交于 2019-11-30 17:23:49
问题 How can I implement this mapping programmatically without web.xml or annotations? The mission is not to use any framework like spring or something else. <servlet> <servlet-name>hello</servlet-name> <servlet-class>test.HelloServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>hello</servlet-name> <url-pattern>/hello</url-pattern> </servlet-mapping> 回答1: Since Servlet 3.0 you can use ServletContext#addServlet() for this. servletContext.addServlet("hello", test.HelloServlet.class);

how to specify welcome-file-list in WebApplicationInitializer.onStartup()

跟風遠走 提交于 2019-11-29 17:05:17
问题 Currently I have a web application where we are using web.xml to configure the application. The web.xml has welcome-file-list. <web-app> ... <welcome-file-list> <welcome-file>home.html</welcome-file> </welcome-file-list> </web-app> We are planning to use spring framework and use java class for application configuration. class MyApplication extends WebApplicationInitializer { public void onStartUp(ServletContext context){ ... } } How do I specify welcome-file-list in this java class? 回答1: