| Author |
Why .action not show up in URLs
|
James Lee
Ranch Hand
Joined: Oct 16, 2006
Posts: 36
|
|
Hi everyone, Each request is sent to an action which processes the request and then redirected to a JSP result page based on the execution of the action class. So the <action name>.action should be in the URL when we browse a web site built in struts. My question is why the <action name>.action is not in the browser's URLs. Thanks.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26157
|
|
James, If I understand correctly, "<action name>.action" is a JSP. JSPs don't show up in the web browser history in Struts because they are results of a forward. In the browser's mind, it simply doesn't exist. Consider the steps involved in a forward: - browser requests URL - action processes - struts forwards to JSP - JSP is output - browser receives output of JSP Since the browser only received one thing, it thinks the output of the JSP is the output of the URL it requested. The browser doesn't know something else happened in between.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Why .action not show up in URLs
|
|
|