aspose file tools*
The moose likes Struts and the fly likes Navigating using a link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Navigating using a link" Watch "Navigating using a link" New topic
Author

Navigating using a link

Sege Stephen
Ranch Hand

Joined: Oct 06, 2007
Posts: 51
Hi Guys, I am strut newbie, I haven't really read much before working on struts. So I am just about to start reading it up, but in the main time I need help. I do apologise if this has already be covered somewhere else, I can't find it.

Basically, the app I am working on goes straight to the index page when you start it, and everything is control by strut action. What I want to do is to have a page before the home(index) page which I will call build page. And on this build page, there will two links, one like will take me to the home page of my application, and the other link will take me to the home page of a slightly older application.

Right, I have been able to make changes to make the application point to the build page, but I don't know how to point the link from the build page to point to my application.


Here is the Strut action code

code.........

<action path="/Tiles/getinvref"
type="Actions.InvoiceRefAction"
name="invoiceReferenceForm" scope="request"
input="/Tiles/index.jsp"
validate="false">
<forward name="success" path="/Tiles/index.jsp"/>
</action>



THE ABOVE CODE TAKES ME TO THE HOME PAGE WHEN APP IS LAUNCHED, WHEN I CHANGED IT TO THE CODE BELOW , IT TAKES ME TO THE BUILD PAGE.

how do i link the build page to the index page? i want user to click on a link and it takes them to home page.

<action path="/Tiles/getinvref"
type="Actions.InvoiceRefAction"
name="invoiceReferenceForm" scope="request"
input="/Tiles/buildPage.jsp"
validate="false">
<forward name="success" path="/Tiles/buildPage.jsp"/>
</action>

Thanks for your help
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

"JStephen",
Please check your private messages.


[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
Sege Stephen
Ranch Hand

Joined: Oct 06, 2007
Posts: 51
I am still waiting for help.

I have two pages . I want to link page1.jsp to page2.jsp. On page1.jsp, there is a link which says

Link to Page 2.

I want to use strut action to map the link, what do I call my link or how do I map it in the strut config.xml file. As in how does it knows when I click the link, that is supposed to go to page 2. This is what I have in my page1.jsp file

<li><a href="page2.jsp"/>New Build</a></li>
Do I need to add any code in the jsp file to Identify the link, or do I need to add anything to my action class. I am very new to struts. Here is a sample of my mapping file. Thanks

<action path="/getinvref"
type="Actions.InvoiceRefAction"
name="invoiceReferenceForm" scope="request"
input="/page2.jsp"
validate="false">
<forward name="success" path="/page2.jsp"/>
</action>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Navigating using a link