In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to configure the initial pages of Android and WeChat Mini Programs in the Java Web project. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Java Web project
After we open the Java Web project in Eclipse, the Run As Tomcat or Apache server runs locally. If you access the project directly with http://localhost:8080, you will find that the browser will open a default page.
Where is this page configured?
Under the directory of each Java Web project, there is a directory called WEB-INF, which contains a configuration file web.xml. The default page of the Web project is defined in the welcome-file-list node inside.
Android project
We know that different Activity can be defined in an Android project, so the Activity corresponding to the initial page you see after the Android application is launched is defined in the AndroidManifest.xml configuration file of the Android project, and the attribute is android:name. Look at the following example:
Package= "com.jerry.android4" android:versionCode= "1" android:versionName= "1.0" > android:minSdkVersion=" 8 "android:targetSdkVersion=" 19 "/ > android:allowBackup=" true "android:icon=" @ drawable/ic_launcher "android:label=" @ string/app_name "android:theme=" @ style/AppTheme "> android:name=" com.jerry.android4.MainActivity "android:label=" @ string/app_name ">
The default activity launched by this Android application is com.jerry.android4.MainActivity.
WeChat Mini Program
There are a lot of views in my WeChat Mini Programs, and when I debug, I found that the input parameters of my app.js 's hook function onLaunch are populated with the view userLogin by the Wechat framework. However, what logic does the Wechat framework use to determine that userLogin is WeChat Mini Programs's initial page?
At first I thought I was configuring the initial page in WeChat Mini Programs's app.json or project.config.json file, like the web.xml of the Java Web project and the AndroidManifest.xml of Android. Later found out that there is no such configuration, the Wechat framework will take the first page under the pages attribute in the app.json file as the initialization page.
To verify this conclusion is simple, let's do a test and change the order of the appointments and userLogin views in app.json. It is found that after the exchange, it is indeed the appointments view that is currently in app.json as the initial page.
Thank you for reading! This is the end of the article on "how to configure the initial pages of Android and WeChat Mini Programs in the Java Web project". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.