This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes Can i use java class in action attribute in form tag of jsp page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Can i use java class in action attribute in form tag of jsp page?" Watch "Can i use java class in action attribute in form tag of jsp page?" New topic
Author

Can i use java class in action attribute in form tag of jsp page?

ehsan ulhaq dar
Greenhorn

Joined: Jun 04, 2008
Posts: 17
Can i use java class in action attribute in form tag of jsp page? If yes then how i get the parameter from the jsp page? Like if we use jsp page in action attribute of form tag we use request.getParameter("controlName"), how can we get in java page??
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by ehsan ulhaq dar:
Can i use java class in action attribute in form tag of jsp page? If yes then how i get the parameter from the jsp page?


why you want to do this? infact servlet is nothing but java class
ehsan ulhaq dar
Greenhorn

Joined: Jun 04, 2008
Posts: 17
Actually i want to use java class instead of jsp page which i am using currently, actually i forget servlet option that is also fine. Thanks seetharaman venkatasamy
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The action attribute of an HTML form tag needs to be a URL.

On the server side, you can map servlets and JSPs to urls with the servlet-mapping entry in your web.xml file (deployment descriptor).


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by ehsan ulhaq dar:
Actually i want to use java class instead of jsp page which i am using currently


is it runing?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can i use java class in action attribute in form tag of jsp page?