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

.do url problems

Melisa Mitchell
Greenhorn

Joined: Sep 15, 2008
Posts: 12
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


.+*^*+.LDG.+*^*+.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61241
    
  66

Please be sure to post Struts questions in the Struts forum. I have moved this there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Sep 15, 2008
Posts: 12
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

Joined: Apr 16, 2008
Posts: 2187
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: .do url problems