• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

.do url problems

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Everyone,

When I go to my page for the first time, i use personalInfo.do, this page loads only half the info, but if i type in personalInfo.do?tab=1 then it loads properly. What id like to happen is that the tab=1 is loaded when you go to the page for the first time. so if tab 2 or 3 is not clicked, the by default i want tab 1 to load. This is what I have...

In the form (personalInfoForm.java) i have tab="1" (tab is a string)
In the struts xml file i have
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to post Struts questions in the Struts forum. I have moved this there for you.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When I go to my page for the first time, i use personalInfo.do



Users should not be visiting the Controller URLs directly. They should only be visiting JSP page URLs only. Clients interact with the View only, not the Controller. Check out Model-View-Controller object-oriented design pattern for more details.

Create a basic JSP page that has a link to the whatever page you need.



Or,



In JSP page have:

[ December 29, 2008: Message edited by: James Clark ]
 
Melisa Mitchell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My jsp page is called personal_melisa.jsp which has these links below...
Even if you go to personal_melisa.jsp its the same thing. I just want the results from loading the personalInfo.do?tab=1 to show when you go to this page...
In my jsp i have this...

[ December 29, 2008: Message edited by: Melisa Mitchell ]
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What page links to personal_melisa.jsp? This is the page that must process the Action and them forward control and display personal_melisa.jsp.

How do/will users get to this JSP page? If this is the first page, then you must do a few other things to get the results you are looking for.

You can remove the .do mapping and change it to map to .htm

You should be using the Struts HTML JSP tag library.


[ December 29, 2008: Message edited by: James Clark ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic