Hello javaranchers I have created one login form ,success and failure page but whatever i type in login or password fields,control transfer to failure page why is it so? and one more thing whenever i run the program there is already user name and password come in the two fields which i have entered last time how to clear the two field for every run?
<!-- ========================= Tiles plugin ===============================--> <!-- This plugin initialize Tiles definition factory. This later can takes some parameters explained here after. The plugin first read parameters from web.xml, thenoverload them with parameters defined here. All parameters are optional. The plugin should be declared in each struts-config file. - definitions-config: (optional) Specify configuration file names. There can be several comma separated file names (default: ?? ) - moduleAware: (optional - struts1.1) Specify if the Tiles definition factory is module aware. If true (default), there will be one factory for each Struts module. If false, there will be one common factory for all module. In this later case, it is still needed to declare one plugin per module. The factory will be initialized with parameters found in the first initialized plugin (generally the one associated with the default module). true : One factory per module. (default) false : one single shared factory for all modules - definitions-parser-validate: (optional) Specify if xml parser should validate the Tiles configuration file. true : validate. DTD should be specified in file header (default) false : no validation
Paths found in Tiles definitions are relative to the main context. --> <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> <set-property property="moduleAware" value="true" /> </plug-in>
First thing first, Please edit your post and quote the source code , its very difficult to read such code !! Post your code in [C O D E] [/C O D E] (w/o spaces) !
Originally posted by khushi jainy: Hello javaranchers I have created one login form ,success and failure page but whatever i type in login or password fields,control transfer to failure page why is it so?
Yes, that is the expected behavior as per your action class, where you are checking entered user id and password ! If you enter "Scott" and "Tiger", you can forwarded to Success page..
Originally posted by khushi jainy:
and one more thing whenever i run the program there is already user name and password come in the two fields which i have entered last time how to clear the two field for every run?
Look OR Googled for reset() method of ActionForm method.