Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

application url , why is doesn't change?

Status
Not open for further replies.

martinjohnholmes

Programmer
Dec 19, 2003
2
0
0
GB
Hi I have developed a simple web application with struts and I am having
trouble understanding why the url in the address bar changes to a path set
by a link or a form submission, but does not change when forwarded from the
mapping .findforward() in an action object.

Ideally I would like the url in the address bar to reamain the same throught
site navagtion.
Can someone please help me understand these points.

thanks martin
 
sorry for the mistakes in the previous post [ I am scratching my head] may be that's why I never received a reply. :)

Anyway just in case someone wants to know, here is a reply I managed to get on another forum.

The Servlet API provides for an internal forward that happens
server-side. The request does not go back to the client, and so the
client has no clue that some other resource has responded.

There is a redirect attribute in the forward element that causes a
"round trip" with the client: it has the client make another request for
the resource and so the address bar changes. The side effect there is
that you lose the servlet request context (since it completes one
request and creates another).

If you want the address bar to remain constant, one solution is to use
frames (which has its own baggage).

Of course, none of this is really about Struts, but about how web
applications work. For more background, see the Web Technology section
of the Java WebServices Tutorial
< along
with the other links in the Preface to the Struts User Guide
<
HTH, Ted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top