• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Navigating using a link

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"JStephen",
Please check your private messages.
 
Sege Stephen
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic