Caused by: org.hibernate.AnnotationException: @Column(s) not allowed on a @OneToOne property:
Solution :
Instead of using
@Column(name="columnName") Use @JoinColumn(name="columnName")
Perplexity is the beginning of Knowledge
Solution :
Instead of using
@Column(name="columnName") Use @JoinColumn(name="columnName")
Struts is an open source web application framework which will be used to develop the web-
based applications. Struts framework was implemented based on 3 popular design patterns.
MVC design pattern :-
There are 3 layers in MVC Design pattern
I. Presentation Layer
II. Controller Layer
III. Model Layer
I Presentation Layer :-
It contains the presentation logic and can be implemented with JSP or with any other presentation frameworks like flex, velocity etc. Struts Presentation Layer contains following components.
1) JSPs/HTMLs
2) Struts custom tags
3) Form Beans
4) Message Bundles
1) JSPs/HTMLs:
In struts presentation layer JSPs will be used to display the data to the client and also used to receive the input data from the client.
2) Struts custom tags:
Apache has implemented various custom tags for the struts based application development and are categorized as follows.
Form bean is a simple java bean styled class which stores the data. When we are writing the form bean java class, the bean class must be a subclass of one of the following.
Message Bundles are nothing but property files which contain key value pair. Mainly message bundles will be used to achieve i18n (internationalization).
II Controller Layer :-
The Controller portion of the application is focused on receiving requests from the client (typically a user running a web browser), deciding what business logic function is to be performed, and then delegating responsibility for producing the next phase of the user interface to an appropriate View component. Following are the various components which we use in struts controller layer.
i) ActionServlet
ii) RequestProcessor
iii) Action class
i) ActionServlet:
ActionServlet is the one and only servlet for the entire struts application which is implemented based on Front controller design pattern and this servlet is loaded during server startup time. ActionServlet is responsible for receiving all incoming request and delegating to RequestProcessor. It also initialize the struts-config.xml file.
ii) RequestProcessor
RequestProcessor is responsible for processing all incoming request. It is implemented on Application Controller Design pattern. RequestProcessor is responsible for identifying the incoming action class and its form bean, it is also responsible for managing life cycle of form bean. After getting response, it manages to return to corresponding jsp by using ActionForward.
iii) Action class
Action Class is the beginning of application’s business logic.
III Model Layer : –
Since there are no predefined components for model layer in struts like presentation layer and controller layer, so struts will not deal with model layer. But struts allows us to make use of any of the following model layer.
i) Simple JDBC component
ii) DAO + Hibernate
iii) DAO + JDBC
iv) Spring
v) Web services etc…
STRUTS FLOW
flow diagram showing struts flow
Steps for the flow