| Author |
Invoke action method with URL
|
Alex Hui
Greenhorn
Joined: Jul 28, 2006
Posts: 4
|
|
|
Is it possible to invoke a action method in a managed bean with a URL entered to the web browser directly, and not with actionLink or actionButton? With struct I have some way to do it.
|
 |
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
|
|
|
you can write a servlet that calls the action method of the backing bean in the doGet() / doPost() methods.
|
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
|
 |
Sergey Smirnov
Ranch Hand
Joined: May 29, 2003
Posts: 167
|
|
Take a look at How to Make Struts People Happy with JSF article. P.S. In general, best way to use jsf effectively is to avoid using a Struts paradigm in web development.
|
 |
Alex Hui
Greenhorn
Joined: Jul 28, 2006
Posts: 4
|
|
I get this in the exadel blog:
I think the reason why JSF doesn�t let an action handler determine the view to use on a GET request is that this is an unnatural thing to do given the semantics of GET! POST, PUT, DELETE can �decide� things, but GET should just display something; the same thing every time
I think displaying same thing with same URL does not contradict with invoking action with URL (HTTP get request). Since in GET requests, request parameters are also included in the URL and will be bookmarked. If we entered different parameter, different thing will be display. So URL still points to a specific result page.
Originally posted by Sergey Smirnov: Take a look at How to Make Struts People Happy with JSF article. P.S. In general, best way to use jsf effectively is to avoid using a Struts paradigm in web development.
|
 |
 |
|
|
subject: Invoke action method with URL
|
|
|