Question: Hiiii

Ads

 
 
 

Share on Google+Share on Google+

Ragini Shukla
Hiiii
4 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

September 22, 2008 at 4:50 PM


Hi Ragini

if you want to learn about struts-config.xml then please use my eclipse its giving so much automatic code for using.

in that xml file we need to configure form bean class and action classes, follwing some code please see that.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">;



<struts-config>

<data-sources />

<form-beans >
<form-bean name="registerForm" type="form.RegisterForm" />
<form-bean name="memberLoginForm" type="form.MemberLoginForm" />
<form-bean name="bSPremiumeForm" type="form.BSPremiumeForm" />
<form-bean name="bSBankDetailForm" type="form.BSBankDetailForm" />
<form-bean name="incentivePercentageForm" type="form.IncentivePercentageForm" />
<form-bean name="bSPayRequestForm" type="form.BSPayRequestForm" />
<form-bean name="bSAdminLoginForm" type="form.BSAdminLoginForm" />
<form-bean name="bSChequeIssueForm" type="form.BSChequeIssueForm" />
<form-bean name="bSChangeAdminPassForm" type="form.BSChangeAdminPassForm" />




</form-beans>


<global-exceptions />

<global-forwards />

<action-mappings >
<action
attribute="registerForm"
input="/pages/BSRegistration.jsp"
name="registerForm"
path="/register"
scope="request"
type="action.RegisterAction">

<forward name="success" path="/pages/Regsuccess.jsp" />

<forward name="failure" path="/pages/M1.jsp" />

</action>
<action
attribute="memberLoginForm"
input="/pages/memberLogin.jsp"
name="memberLoginForm"
path="/memberLogin"
type="action.MemberLoginAction" />
<action
attribute="bSPremiumeForm"
input="/pages/BSPremiume.jsp"
name="bSPremiumeForm"
path="/bSPremiume"
scope="request"
type="action.BSPremiumeAction" />
<action
attribute="bSBankDetailForm"
input="/pages/BSBankDetail.jsp"
name="bSBankDetailForm"

parameter="operation"
path="/bSBankDetail"
scope="request"
type="action.BSBankDetailAction">

<forward name="success" path="/pages/banksuccess.jsp" />

<forward name="failure" path="/pages/BSBankDetail.jsp" />

</action>
<action
attribute="registerForm"
input="/pages/BSAdminRegister.jsp"
name="registerForm"
path="/bSAdminRegister"
scope="request"
type="action.BSAdminRegisterAction">

<forward name="success" path="/pages/RegAdminsuccess.jsp" />

<forward name="failure" path="/pages/M2.jsp" />

</action>
<action
attribute="incentivePercentageForm"
input="/pages/incentivePercentage.jsp"
name="incentivePercentageForm"
path="/incentivePercentage"
scope="request"
type="action.IncentivePercentageAction" />
<action
attribute="bSPayRequestForm"
input="/pages/BSPayRequest.jsp"
name="bSPayRequestForm"
path="/bSPayRequest"
scope="request"
type="action.BSPayRequestAction" />
<action
attribute="memberLoginForm"
input="/pages/BSAdminLogin.jsp"
name="bSAdminLoginForm"
path="/bSAdminLogin"
scope="request"
type="action.BSAdminLoginAction" />
<action
attribute="bSPremiumeForm"
input="/pages/BSAdminPremium.jsp"
name="bSPremiumeForm"
path="/bSAdminPremium"
scope="request"
type="action.BSAdminPremiumAction" />
<action
attribute="bSAdminLoginForm"
input="/pages/BSAdminLogin1.jsp"
name="bSAdminLoginForm"
path="/bSAdminLogin1"
scope="request"
type="action.BSAdminLogin1Action" />
<action
attribute="memberLoginForm"
input="/pages/BSMemberLogin.jsp"
name="memberLoginForm"
path="/bSMemberLogin"
scope="request"
type="action.BSMemberLoginAction" />
<action
attribute="bSChequeIssueForm"
input="/pages/BSChequeIssue.jsp"
name="bSChequeIssueForm"
path="/bSChequeIssue"
scope="request"
type="action.BSChequeIssueAction" />
<action
attribute="bSChangeAdminPassForm"
input="/pages/BSChangeAdminPass.jsp"
name="bSChangeAdminPassForm"
path="/bSChangeAdminPass"
scope="request"
type="action.BSChangeAdminPassAction" />
<action
attribute="bSChangeAdminPassForm"
input="/pages/BSChangeMember.jsp"
name="bSChangeAdminPassForm"
path="/bSChangeMember"
scope="request"
type="action.BSChangeMemberAction" />






</action-mappings>


<message-resources parameter="ApplicationResources" />

</struts-config>





September 22, 2008 at 4:53 PM


Hi Ragini,


<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">;

<struts-config>
<!--Form Bean Definitions -->
<form-beans>
<form-bean name="login" type="test.struts.LoginForm" />
</form-beans>

<!--Global Forward Definitions-->
<global-forwards>
</global-forwards>

<!--action Mapping Definitions -->
<action-mappings>
<action path="/login" type="test.struts.LoginAction" >
<forward name="valid" path="/jsp/MainMenu.jsp" />
<forward name="invalid" path="/jsp/LoginView.jsp" />
</action>
</action-mappings>

</struts-config>




Visit for more information.

http://www.roseindia.net/struts/understandingstruts_action_class.shtml


Thanks.

Amardeep.


September 22, 2008 at 4:54 PM


Hi Ragini

if you want to learn about struts-config.xml then please use my eclipse its giving so much automatic code for using.

in that xml file we need to configure form bean class and action classes, follwing some code please see that.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">;;



<struts-config>

<data-sources />

<form-beans >
<form-bean name="registerForm" type="form.RegisterForm" />
<form-bean name="memberLoginForm" type="form.MemberLoginForm" />
<form-bean name="bSPremiumeForm" type="form.BSPremiumeForm" />
<form-bean name="bSBankDetailForm" type="form.BSBankDetailForm" />
<form-bean name="incentivePercentageForm" type="form.IncentivePercentageForm" />
<form-bean name="bSPayRequestForm" type="form.BSPayRequestForm" />
<form-bean name="bSAdminLoginForm" type="form.BSAdminLoginForm" />
<form-bean name="bSChequeIssueForm" type="form.BSChequeIssueForm" />
<form-bean name="bSChangeAdminPassForm" type="form.BSChangeAdminPassForm" />




</form-beans>


<global-exceptions />

<global-forwards />

<action-mappings >
<action
attribute="registerForm"
input="/pages/BSRegistration.jsp"
name="registerForm"
path="/register"
scope="request"
type="action.RegisterAction">

<forward name="success" path="/pages/Regsuccess.jsp" />

<forward name="failure" path="/pages/M1.jsp" />

</action>
<action
attribute="memberLoginForm"
input="/pages/memberLogin.jsp"
name="memberLoginForm"
path="/memberLogin"
type="action.MemberLoginAction" />
<action
attribute="bSPremiumeForm"
input="/pages/BSPremiume.jsp"
name="bSPremiumeForm"
path="/bSPremiume"
scope="request"
type="action.BSPremiumeAction" />
<action
attribute="bSBankDetailForm"
input="/pages/BSBankDetail.jsp"
name="bSBankDetailForm"

parameter="operation"
path="/bSBankDetail"
scope="request"
type="action.BSBankDetailAction">

<forward name="success" path="/pages/banksuccess.jsp" />

<forward name="failure" path="/pages/BSBankDetail.jsp" />

</action>
<action
attribute="registerForm"
input="/pages/BSAdminRegister.jsp"
name="registerForm"
path="/bSAdminRegister"
scope="request"
type="action.BSAdminRegisterAction">

<forward name="success" path="/pages/RegAdminsuccess.jsp" />

<forward name="failure" path="/pages/M2.jsp" />

</action>
<action
attribute="incentivePercentageForm"
input="/pages/incentivePercentage.jsp"
name="incentivePercentageForm"
path="/incentivePercentage"
scope="request"
type="action.IncentivePercentageAction" />
<action
attribute="bSPayRequestForm"
input="/pages/BSPayRequest.jsp"
name="bSPayRequestForm"
path="/bSPayRequest"
scope="request"
type="action.BSPayRequestAction" />
<action
attribute="memberLoginForm"
input="/pages/BSAdminLogin.jsp"
name="bSAdminLoginForm"
path="/bSAdminLogin"
scope="request"
type="action.BSAdminLoginAction" />
<action
attribute="bSPremiumeForm"
input="/pages/BSAdminPremium.jsp"
name="bSPremiumeForm"
path="/bSAdminPremium"
scope="request"
type="action.BSAdminPremiumAction" />
<action
attribute="bSAdminLoginForm"
input="/pages/BSAdminLogin1.jsp"
name="bSAdminLoginForm"
path="/bSAdminLogin1"
scope="request"
type="action.BSAdminLogin1Action" />
<action
attribute="memberLoginForm"
input="/pages/BSMemberLogin.jsp"
name="memberLoginForm"
path="/bSMemberLogin"
scope="request"
type="action.BSMemberLoginAction" />
<action
attribute="bSChequeIssueForm"
input="/pages/BSChequeIssue.jsp"
name="bSChequeIssueForm"
path="/bSChequeIssue"
scope="request"
type="action.BSChequeIssueAction" />
<action
attribute="bSChangeAdminPassForm"
input="/pages/BSChangeAdminPass.jsp"
name="bSChangeAdminPassForm"
path="/bSChangeAdminPass"
scope="request"
type="action.BSChangeAdminPassAction" />
<action
attribute="bSChangeAdminPassForm"
input="/pages/BSChangeMember.jsp"
name="bSChangeAdminPassForm"
path="/bSChangeMember"
scope="request"
type="action.BSChangeMemberAction" />






</action-mappings>


<message-resources parameter="ApplicationResources" />

</struts-config>


Thanks,

Rajkumar,
Bhsinsoft India Ltd.
Bangalore.

Ads









Related Tutorials/Questions & Answers:
Advertisements
RAJ9992
Servlet sending image  hiiii In my html page i use how to send this image value to servlet plz be inform me anybody
input using scanner and add/sub/mul/div of a matrix
input using scanner and add/sub/mul/div of a matrix  hiiii...... performe matrix add/sub/mul/div using scanner
RAJ9992
Send Image Value to Servlet  hiiii In my html page i use input type=image src="" value="" name="" how to send this image value to servlet plz be inform me anybody
meenakshi
meenakshi  HIIII, Any one can help me,, I have created a form in jsp and bind it by using spring:bind in spring. I have use ModelAndView of SimpleFormController . But when i called onSubmit thn onSubmit not called
login data
login data  Hiiii Sir I am doing banking project on Asp.net i have created database on sql and also created a connection to gui but m not getting the data after login i want to show particular data for particular user means if i
login data
login data   Hiiii Sir I am doing banking project on Asp.net i have created database on sql and also created a connection to gui but m not getting the data after login i want to show particular data for particular user means
error in accessing database - JSP-Servlet
error in accessing database  hiiii im tanushri im tryng to connect my database to the servlet i hv succeeded in connectivity but im stuck to nother error called Got minus one from read call although i hv feeded data to my
error got minus one from read call - JSP-Servlet
error got minus one from read call  hiiii while connecting my servlet to database im getting error called java.sql.SQLException: Io exception: Got minus one from a read call oracle.jdbc.dbaccess.DBError.throwSqlException
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads