File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes url problem in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "url problem in struts" Watch "url problem in struts" New topic

url problem in struts

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 68
hi friends,

i have an issue in url. my application have a login action and when user submit username and password control goes to login action and on successfull login i redirect to showuser action
my struts config part is as below

<action path="/login" type="com..action.Login" name="login" scope="request" input="input">
<forward name="success" path="/" />
<forward name="failure" path="/pages/loginnew.jsp" />

in browser i can see the page corresponding to showuser, but the url still shows, so on calling links from this page it not works as expected. all my links direct to login action

how can i show the in url?

thanks in advance.....
Rudy Gireyev
Ranch Hand

Joined: May 03, 2011
Posts: 39
The browser will only show what you entered in your HTML/JSP form tag. The action attribute of HTML form tag to be precise. What you have in your STRUTS is completely irrelevant.
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 68
thanks Rudy Gireyev

i solved that issue by adding redirect = "true" in forward section
I agree. Here's the link:
subject: url problem in struts
It's not a secret anymore!