04/02 Class Seen
Servlet ->
JSP -> Java Server Pages
MVC -> Model View Controller
The controller receives the request of the html, which is collected by a method and Returns a Vista (. Jsp) q contact Model (where we put dynamic information)
The view is one. jsp. From jsp how to talk to the model is through the $ sign} {05/02
If the application does not work and we know q happens:
- stopped the Tomcat
- ANT - > clean (deletes all compiled code)
- ANT -> undeploy (deletes the application server)
- ANT -> deploywar (deployed application)
- Earrings
Tomcat Development: Responding to a web application
1. New method in Driver and annotation indicating the web application and returning the name of the jsp.
2. Create the corresponding jsp.
3. Included in the model and access dynamic information from the jsp via $ {key}.
Installing Maven - maven Unzip the folder in C
- Modify the path variable enotrno without clear your path, add the path of our maven jdk and end with a, and \\ bin behind each q added.
example:% path% C: \\ Program Files \\ Java \\ jdk1.6.0_03 \\ bin, C: \\ Program Files \\ Java \\ jdk1.6.0_03 \\ bin, C: \\ apache-maven-2.0.8 \\ bin
- Create 2 new environment variables with the following routes:
JAVA_HOME: C: \\ Program Files \\ Java \\ jdk1.6.0_03
M2_HOME: C: \\ apache-maven-2.0.8
- Open the console and run it following: mvn - version
- Then open the configuration file this application to look at it, the file path is: C: \\ apache-maven-2.0.8 \\ conf and called settings.xml
In this file puts us where they will download all the libraries: Default: ~ / .m2/repository
Steps Maven and AppFuse:
1.
cd workspace 2. mvn archetype: create-DarchetypeGroupId = org.appfuse.archetypes-DarchetypeArtifactId = appfuse-basic-spring -DremoteRepositories = http://172.16.1.51/repository -DarchetypeVersion = 2.0.1-DgroupId = com.mycompany.app-DartifactId = myproject2
3. mvn eclipse: eclipse
4. mvn-Declipse.workspace = C: \\ tamara \\ j2ee eclipse: add-maven-repo
5. mvn install
0 comments:
Post a Comment