1. Connection string Read
1.1 Preface
Originally I wanted to re-construct in the future, to say this question again. But a friend asked me: How to write the database connection string to Config.json and read? It turns out that everyone
Recently wrote a few about the "project-subitem-task" management system, said the system is still a little exaggerated, basically is a multi-table query call and INSERT, update database operation, but there are a lot of computational and statistical
public void Create (string mdbpath){if (file.exists (Mdbpath))//check if the database already exists{throw new Exception ("The target database already exists and cannot be created");}You can add a password so that the created database must enter a
1. Add a connection to the tab"ConnectionName" connectionstring= "server=.\sqlexpress;database=databasename; Userid=sa; Password=abc123 " Providername="System.Data.SqlClient"/>Or"ConnectionName" connectionstring= "server=.\sqlexpress;
Course Highlights:When the storage path is not found, right-click to open the file location, you can find the path of file storageVS layout if the adjustment is confusing, click the Window menu, check Reset window layoutSome windows if not found,
What is Dependency injectionDependency, which is another object that an object needs, for example, this is a store that we typically define to handle data access, let's use an example to explain, first, define a domain model as follows:Namespace
The system provides the following validators:Required (required. The field value cannot be null)Requiredstring)Stringlength (String Length validator, which requires that the field value be within the specified range; otherwise, the verification
, Configure the Action wildcard (wildcard)
Use wildcards to minimize the configuration quantity. However, you must abide by the principle that "conventions are better than configurations ".
1. wildcard characters
Asterisk (*) indicates all
{Number}
Use javs Socket to upload a compressed file and open the received File
Use javs Socket to upload a compressed file and open the received File
Public class TranFileServer {
Public static void main (String [] args ){
ServerSocket server;
Socket
Create a program to connect to the database using JDBC, which contains seven steps:1. Load the JDBC driver:Before connecting to the database, load the driver of the database to be connected to the JVM (Java Virtual Machine ),This is achieved through
Similar to the following factors:1. From the page loading time point of view: static pages do not need to be connected to the database, especially when accessing pages with large data volumes. Most of these pages need to query many result sets,
In short, JDK is an SDK for developers. It provides a Java development environment and a runtime environment. The SDK is a Software Development Kit. It generally refers to a Software Development Kit, which can include function libraries and compiled
1. JSP code:Copy codeThe Code is as follows:Document: ApplicationCreated on:, 13:18:53Author: lucifer-- %>Http://www.w3.org/TR/html4/loose.dtd> JSP Page Get Server Info:Get Context Path:Get Real Path: 2. Output:Copy codeThe Code is as follows:Get
1. How to highlight a selected row of records?Http://topic.csdn.net/t/20050105/09/3699823.html2. How to Select a value in the drop-down list box and pop out a new window?Http://topic.csdn.net/t/20050107/15/3707444.html3. How to start execl in
1. Basic java database operation process2. Several Common important skills:Record Sets that can be rolled and updatedBatch updateTransaction ProcessingBasic java database operation process: Get database connection-Execute SQL statements-process
JSP details-EL expressions (2)EL implicit object
To obtain relevant data in a Web application, EL provides 11 implicit objects. These objects are similar to the built-in JSP objects and are operated directly by the object name. In EL's implicit
ScopeLet's take a look at the effect:
The general process is as follows: when we access 04-01/index. jsp, we perform pageContext, request, session,
The variables in the four scopes of application are accumulated. (Of course, first determine whether
Add, delete, and read the content code of the specified tag in the xml file.
Webpage special effect p/jsp.html target = _ blank> added, deleted, and read the content code specified in the xml file
Package xml;
Import java. io. file;Import java.
JSP simple exercise-JSP commands
I. page commands:
When defining the global attribute value of a JSP page, you can use the page command to place it in the header of the page. For example:
Note: The contentType attribute in the page command cannot
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service