File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

url problem in struts

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
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="/showuser.do?command=group" />
<forward name="failure" path="/pages/loginnew.jsp" />
</action>

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

how can i show the showuser.do 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: 65
thanks Rudy Gireyev

i solved that issue by adding redirect = "true" in forward section
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: url problem in struts