• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.do url problems

 
Melisa Mitchell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to post Struts questions in the Struts forum. I have moved this there for you.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic