Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello greetings there..

I've two jsp files,"save.jsp" and "edit.jsp". Both have same fields. Instead of maintaining two two JSPs,i want to merge those files into single JSP file. but I'm not getting. Guide me to merge them.

Pls help me to sort out..
Posted
Comments
DamithSL 26-May-14 9:16am    
update the question with your code

1 solution

1. Keep a single page.
2. Call the action with the extra option field . i.e
Java
 say your action/servlet name updateServlet. then call it

for save
/updateServlet?action=SAVE
for edit
/updateServlet?action=EDIT


you can achieved this by several way by using hidden field.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900