page, but the variables defined in the method are only valid in the method.Example:1 2 3 String SayHello () {4 return "Hello"; 5 } %>6 ③, declaring classSyntax: Note: The classes declared in the JSP page are valid throughout the page.Example:123 Public classsayhello{4 BooleanCounty;5SayHello (BooleanCounty) {6 This. county=County;7 }8 String Hello () {9 if(county)Ten return"Hello"; One Else A
Java EE session mechanismHTTP protocol: before you talk about the session, you must say the HTTP protocol, HTTP is a standard (TCP) for client and server-side requests and responses. A request is initiated by an HTTP client to establish a TCP connection to the server-specified port (by default, port 80). The HTTP server listens on that port for requests sent by the client. Once the request is received,
System integration
Weak. Minimal need to integrate with other systems
7
User interaction
Weak. The interaction is not many, the expression way is simple, more is the data deletion and modification to investigate.
8
Development process
Emphasis on agile, rapid development, and basically do not need version control.
By simple comparison, it is obvious that Internet development empha
methods here. The default is to load the profile in the SRC Directory///3, create a level cache based on profile information, Sessionfactory heavyweight objects, and do not create sessionfactory factory=config.buildsessionfactory frequently ( );//4, create session open sessions session=factory.opensession ();//5, open transaction transaction transaction= Session.begintransaction (); Student student=new Student (null, "Mikyou", 22, "male"), Session.save (Student);//6, transaction commit transact
USER ' root ' @ ' localhost ' identified by ' new password '; Note: My.ini is encoded as ANSI when saved, otherwise the following error is reported: Error:found option without preceding group in config File:d:\program files\ Mysql-5.6.25-winx64\my.ini at Line:1 Fatal error in defaults handling. Program aborted. Click to download configuration file7. Maven Configuration7.1. Open environment variable 7.2, new M2_home, Maven_home, value C:\Soft\Develop\apache-maven-3.5.07.3, modify path, append%m2
that I not only with the old man guerrilla, sometimes sleep in the computer City Square bench, in the morning to look at the first sight is security and his side to me overlooking the unequaled wolf Dog.
After understanding the ASP and the website, began to consider to learn more things, at this time I have given up my dream of writing a game program, because I do not know how to pursue this dream. I also gave up my more good SCM development (now should be called embedded). I turned to
handling a request this belongs to the session. See maintaining Client State.
Request
Subtype ofjavax.servlet.ServletRequest
WEB components handling the request.
Page
javax.servlet.jsp.JspContext
The JSP page that creates the object.
17.3.2Controlling Concurrent Access to Shared ResourcesIn a multithreaded server, the shared resources can be accessed concurrently. In addition to scope object attributes, shared resources include in-memory
1. Click File->new->other to select Maven Project2. Select Maven Project, click Next, and then click Next to enter the following screenSelect the last one and click Next3. See the following interfaceEnter the group ID and artifact ID, click Finish to complete the basic creation4. Create a good project structure (Java view)If it is a Java EE view, the project stru
() {while (true) {synchronized (obj) {if (tickets
19, multi-threaded (railway station ticket sales example with the implementation of the Runnable interface)20. Multi-threaded (deadlock)
If synchronization code is nested and the same lock is used, the deadlock may occur
Try not to nest using private static String S1 = "Chopsticks Child Left ";p rivate static String s2 =" chopstick right ";p ublic static void Main (string[] args) {new Thread () {public
.
E: Case Demo
An anonymous inner class as required
14. Object-Oriented (anonymous inner class overrides multiple method calls)
A: Case Demo
Method invocation for Anonymous inner class
15, Object-oriented (anonymous internal class in the development of the application)
A: The code is as follows
//这里写抽象类,接口都行abstract class Person { public abstract void show();}class PersonDemo { public void method(Person p) {
JDK5 Unable to wake a specified thread before
If the communication between multiple threads, you need to use Notifyall () to notify all threads, use while to repeatedly judge the condition
6, Multi-threaded (JDK1.5 new feature mutex)
1. Synchronization
Synchronizing using the Lock () and Unlock () Methods of the Reentrantlock class
2. Communication
Use the Newcondition () method of the Reentrantlock class to get the condition objec
, nosuchmethodexception {person p=new person ("Xiao Qiang",new Date ()); " Name ")); " Age ")); Date ")); (5) Use Beanutils to encapsulate the acquired value into the JavaBean at once.//method of filling all values once with Benutils@Test Public voidSetvalueall ()throwsException, invocationtargetexception {person P=NewPerson (); MapNewHashmap(); Map.put ("Name", "Xiao Qiang"); Map.put ("Age", "24"); Map.put ("Date",NewDate ()); Beanutils.populat
need to create an intermediate table that stores the primary key ID of two tables respectively)Key indicates the corresponding column,The Userdetails attribute is in the role class(4) Also many to many, with the same(5) The Department is self-related, the superior department is many to one, the subordinate department is a pair of many(6) Permissions are self-correlating, same as aboveThree: test, create a table when creating a sessionfactory, write a junit test execution(1) The Discovery table
Why are some java EE/J2EE projects inefficient or at least inefficient) English original post address: http://www.adam-bien.com/roller/abien/entry/why_some_of_the_java
1. Architects are far more proficient in PowerPoint than the popular Java IDE.2. Simply deploy the basic environment (such as applications)ProgramServers and databases). Several DVDs and severa
because it wants to download some files from the Web. So where does it download from? It is downloaded from the MAVEN default remote library (HTTP://REPO1.MAVEN.ORG/MAVEN2). This remote repository has MAVEN's core plug-in and the jar files available for download.But not all jar files can be downloaded from the default remote library, such as the one we developed ourselves. At this point, there are two options: either set up a custom library within the company or manually download and install th
+ */ surveytoken.unbind (); the return(surveyid%2) ==0? " Even ":" Odd ";//Returns the even string if it is an even number, or odd string if it is an odd number * } $SYSTEM.OUT.PRINTLN ("Survey object is empty");Panax Notoginseng return NULL; - } the +}The policy of the routed data source is determined in the overridden method: If the survey ID is even, it is saved to the answer table in the main library Lsn_surveypark, and if it is odd, it is
Java EE Learning routeFirst, the Java Foundation1. Initial knowledge of JavaMemoryDatavariables2. Structure Statements1) ConditionsifSwitch2) Cycle for while3) Statement BreakContinue3. Arrays4. Nesting loops5. Final MissionPerpetual calendar2048 Small Games Second, object-oriented 1. Classes and Objects2. Methods3.String ()DateCaldenarMath4. Object-oriented fea
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.