• Post Reply Bookmark Topic Watch Topic
  • New Topic

Navigate to same servlet without using value of any element in servlet for making if condition  RSS feed

 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other thread i found out how to navigate to same servlet
for all CRUD operation.



But i've heard there is another way to do this without using value of any
element something relating to url and ?
please tell me how to do it without using hidden element or any other element's value.



thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you are asking, but because the requests will have different HTTP methods (I assume you meant method="GET" in your form? Please take more care when posting) different methods in the servlet will be called. No need for an if at all.
 
Ishan Pandya
Ranch Hand
Posts: 228
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think that both operations should use the same controller. Please read the below link for the clarification.

PageControllers and Task Controllers
 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


sorry everyone
what i meant is:


could you please tell me without using hidden parameter
how can i navigate to same servlet using url and ?



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not right. Your form tags have two actions. Please take the time to make sure your posts are correct. Otherwise you are waiting not only your time, but ours.

Why do you want to do this? It's generally not a good idea to mash up stuff into the same processing unit. Why should they not be separate?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!