aspose file tools
The moose likes JSF and the fly likes Invoke action method with URL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Invoke action method with URL" Watch "Invoke action method with URL" New topic
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Invoke action method with URL
 
Similar Threads
value submit html:select
Double invoking on Action in struts
Cannot find file..? Help
Invoke a method through URL
How to pass url to Struts1.3