how do i find html of struts?
I am really new and not familiar with this...I am trying to edit this folder with a ton of files in it including .xml....I need to find the html part but it is using "struts" and I don't know much about it other than it being a Java MVC framework...
How can I find the html part? the URL is http://localhost:8080/ContractView.do
I searched inside 1 of the x开发者_运维百科ml file and found this which might be of use:
<action name="DashBoardForm" path="/DashBoard" type="com.manageengine.servicedesk.dashboard.action.DashBoardAction">
<forward name="viewDashBoard" path="/dashboard/Dashboard.jsp"/>
</action>
Any Ideas on how I can get the html?
I want to basically add an extra option to the menu.
I am really new to this and just trying to add an extra menu to the navigation bar so that I can embed php files in it that it will link to..
it is a software, can be downloaded at http://www.manageengine.com/products/service-desk/download.html
/dashboard/Dashboard.jsp
should be a view page containing html. In Struts the struts-config.xml
file dictates which request gets served by which servlet. In your case, ContactView.do
should have a mapping to an action class. Look for the xml config line in that file that contains path="/ViewContact"
.
In the actual jsp page you may see a mix of struts constructs - (ie. s:<some_tag>
), JSTL (ie. c:<some_tag>
, and pure html). However, they all obviously get translated to HTML when you are viewing it in a client (ie. browsers).
Another thing you may want to check out is whether it is using tiles. A lot of times the view page may be defined in the tiles-defition.xml
file. So that may be another place for you to look where ContactView
jsp may be defined at. If it is using tiles then you will find the name of tile definition in the struts-config.xml and then find the actual JSP path in the tiles-definition.xml.
UPDATE
After you added the link to struts-config.xml, I can tell you exactly which JSP your request goes to which is originally what you asked in your post.
Take a look at the following snippet:-
<action name="ContractViewForm" path="/ContractView" scope="request" type="com.adventnet.servicedesk.contract.action.ContractViewAction" input="ContractListView.jsp">
<forward name="contractListView" path="/contract/ContractListView.jsp?task=ContractListView"/>
<forward name="newContract" path="/contract/ContractDef.jsp?task=ContractDef"/>
</action>
<form-bean name="ContractViewForm" type="com.adventnet.servicedesk.contract.form.ContractViewForm"/>
From this snippet as you can see depending on how the page was forwarded from the previous action (ie. form submit) it will either go to /contract/ContractListView.jsp
or /contract/ContractDef.jsp
. The backing action class is com.adventnet.servicedesk.contract.action.ContractViewAction
which is the class where all the business logic processing starts. The form is com.adventnet.servicedesk.contract.form.ContractViewForm
where all the form fields are stored and it is at requqest
scope.
Hope this helps!
精彩评论