i have a n application in which single servlet is going to be accessed by no. of JSP pages.So in order to minimize the maintainence risk and other issues whiach pattern can i use?
as i am new to this j2ee can you please give me the proper guidence?
vijay.
-
Which pattern fits best? (1 messages)
- Posted by: abc d
- Posted on: September 16 2004 09:44 EDT
Threaded Messages (1)
- Which pattern fits best? by Arun Nair on September 17 2004 10:20 EDT
-
Which pattern fits best?[ Go to top ]
- Posted by: Arun Nair
- Posted on: September 17 2004 10:20 EDT
- in response to abc d
Hi there,
I am not sure what or any specific pattern you could use. May be you could introduce Struts like action in your servlet.
for example : Servlet
.... doPost(request, response) ....
{
Action action = request.getAction().execute();
action.next();
}
By doing this u might not touch u r servlet anymore. all u r actions are abstracted in u r specific action classes.
I am not sure this would help. but just a thought
/* example action - something like this. u could modify or make it more valuable */
Class UserValidateAction implements Action
{
ActionDO actionDO = null;
public UserValidateAction(ActionDO ADO)
{
this.actionDO = ADO
}
public void execute()
{
//do something using the values from DO
}
public next()
{
//where to go after this action.
}
}
}
Note :- Action is already in java so use some other name ....
-arun