Configuring Run Struts on JDeveloper

xiaoxiao2021-03-06  39

First refer to the source program of the following address, this is an authentication program, which is built from Struts.

Struts principle and practice (1) http://tech.ccidnet.com/pub/Article/c1078_a138284_p1.htmlstruts principle and practice (2) http://tech.ccidnet.com/pub/Article/c1078_a138372_p1.html

The source program does not have to be greatly modified, and only the name and two XML files are changed. This is the web.xml file and the struts-config.xml file.

First, the web.xml file should be added:

/web-inf/struts-bean.tld

/web-inf/struts-bean.tld

That is, the position of the Struts tag library.

Then modify the struts-config.xml file, the two files are the core of the control, which is a bit of incorrect place to operate, especially, when configuring, pay attention to the order in the struts-config.xml file. Although the average person Not familiar with XML, in fact, it is not so difficult, it is difficult to lack the courage to face new technologies.

The configuration file is as follows:

Type = "Moonsoft.test.j2ee.struts.logonaction" Validate = "false">

Here is corresponding to .... and insert and between the head and tails, in addition to the order, here should pay attention to Size! The most strange thing is here I have no error in a few times, but the program can't run, saying that I can't find logon.jsp.title. Of course, I am sure in the resource file On the configuration, I went in to WAbApp, each folder saw, then I found more mypackage1 folder, this is self-built, I have changed, I have changed, I have to add mypackage1, add my own named package. The name is not. I don't know why JDeveloper is so dead. Every time I re-desented with JDeveloper, I want to delete the folder of the subordinate under the WebApp folder under Tomcat, and then re-subordinate. (The subordinate file is also deleted)

In addition to configuring, there are some red warnings when JDeveloper running, all prompts apache.struts.util ... Some packages returns a NULL value error, I don't know if the compatibility is not good or the program.

Now I have a little first place, I have to start with Struts-Config.xml and Action, the five tags are not difficult, the key should be skilled. Of course, I can't pay attention to the Struts process.

I spent 4 days, configuring Struts's operating environment. I am very excited about what I have learned now. I think of a word in the "Fu Lei family", people always have climax and low tide, in the climax It's not more than nervous, it is not too much to be decadent. (Daxin is like this) may still need to add, adhere to your own ideals, always know what you are doing.

转载请注明原文地址:https://www.9cbs.com/read-63663.html

New Post(0)