WebSphere packaged web applications and deployment scenarios, the original quote from:
Find assembly.bat and setupCmdLine.bat these two documents, the following diagram:
One assembly.bat file is used to start the application assembly tool; setupCmdLine.bat is used to configure the startup parameters, located in the file at the beginning of the two possible (if it is copy over a) the need to configure:
SET WAS_HOME = D: \ WebSphere5 \ AppServer
SET JAVA_HOME = D: \ j2sdk1.4.2_03
WAS_HOME: Webshpere 5 installation directory or Webshpere 5 copies of directory;
JAVA_HOME: jdk directory, defaults to $ (WebSphere5) \ AppServer \ java directory, but not necessarily valid, you can try to point to your jdk common directory;
Parameters configured, run assembly.bat document, after the end of the process interface, the application assembly tool to show the main interface, the following diagram:
[The main interface]
Will open the following interface:
Where the red coil painting named after the package name of your ear, and then right-click on the left side of the directory tree [Web module] and click [New], the following diagram
Pop up its configuration interface, the following diagram:
Naming a good file name (war package name) and the context root and click [OK] button, and then expand [Web modules] directory tree, get the next map interface:
The following steps more crucial, including:
Delineation of some of the red line to make the following modifications:
Its meaning is used to define the data connection in the pool, there are other roles that you see at a glance. Then, click [bound] Tab page, the following figure:
The key here is to write your database connection pool JNDI name in the application after the release will be defined in detail, and good, by definition, I have written is as follows:
At this point we have a database connection resource reference defined finished, click [OK] button bar!
Open the following interface:
Note that the red part of the concept of the coil set, a brief explanation, we generally use a directory such as the following diagram:
In this opensrc is your root directory or archive. Click [Browse] button, select the folder the following figure, after opensrc:
In the left tree expand WEB-INF directory select the classes directory, and then under the right side of the content on the display all the contents of the classes, as follows:
The right to select all the contents, click [Add] button, the following diagram:
You can also go to get rid of some unwanted content, such as we often use the VSS of the resulting "vssver.scc", is selected and click [Remove] button, okay completed click [OK] button.
You can click on the red line delineated in the [expansion] head, sort, select all need to remove the files, and then press the keyboard [DEL] key to delete. Such files are added to finish.
2, configuration jar file
Add a jar file and add the class file operations identical, but in the directory tree on the left select "WEB-INF/lib" directory, it is noteworthy to add certain if the "jar" file, if not, such as the spring of the "spring-beans . dtd "file, the tool will remind you, do not ignore it, and as long as [OK] on the line.
3, configuration resource file
Add a resource file in two steps:
Ø In the directory tree on the left select the "root" directory, in this is the "opensrc" directory, it is noteworthy that the choice to remove the right of the contents of note "WEB-INF" directory, the following figure:
Ø In the directory tree on the left select "WEB-INF" directory, it is noteworthy that the choice to remove the right of the contents of note "classes" and "lib" directory, the following figure:
Click [OK] button, everything OK, Oh! Wrong, how the list is not "struts-config.xml" and other documents, I do not know why, the tool did not show them up, but you rest assured that they have been included entered.
Next we must configure all of the servlet and servlet mapping, you can control the original web.xml file one by one added to the "web component" and the servlet mapping to go, pay attention to configure a number of initialization parameters and other attributes.
Tool shows preservation process:
Then happy to pop-up:
HA HA ! 're Done! Do not worry, we have to check the use of RAR will be ". Ear" open the packet
Oh! The original is the case, to further open the "META-INF" directory:
"Struts-config.xml" and other documents are in operation. Note that the directory level of war will not confuse the bag, a mess in general to re-package the resource file, be sure.