MY new module-link seems not to work

iam trying to customise a new module. but wherever i click the module link in the admin page… it gives me this error

HTTP Status 404 - /openmrs/WEB-INF/view/module/conceptName/viewconceptNames.jsp
type Status report

message /openmrs/WEB-INF/view/module/conceptName/viewconceptNames.jsp

description The requested resource is not available.

Apache Tomcat/7.0.37

here is my tocat error-log https://hastebin.com/otupabohen.sql

@k.joseph @tendomart @dkayiwa @ssmusoke @wyclif

here is my controller class

@Controller
public class BasicModuleFormController {
	
	@ModelAttribute
	public Concept getConcept(@RequestParam(required = false, value = "conceptId") Concept concept) {
		
		return concept;
		
	}
	
	@RequestMapping(value = "module/conceptName/viewconceptNames.form", method = RequestMethod.GET)
	public void showForm() {
		
	}
	
}

and here is my class which defines the link

public class AdminList extends AdministrationSectionExt {
	
	/**
	 * @see org.openmrs.module.web.extension.AdministrationSectionExt#getMediaType()
	 */
	public Extension.MEDIA_TYPE getMediaType() {
		return Extension.MEDIA_TYPE.html;
	}
	
	/**
	 * @see org.openmrs.module.web.extension.AdministrationSectionExt#getTitle()
	 */
	public String getTitle() {
		return "CONCEPT NAME MANAGEMENT";
	}
	
	/**
	 * @see org.openmrs.module.web.extension.AdministrationSectionExt#getLinks()
	 */
	public Map<String, String> getLinks() {
		
		Map<String, String> map = new LinkedHashMap<String, String>();
		
		map.put("module/conceptName/viewconceptNames.form", "CONCEPT MANAGEMENT");
		
		return map;
	}
	
}

Try change the return type of showForm() to String. And then return module/conceptName/viewconceptNamesForm

1 Like

now shoudi leave the extension link as

module/conceptName/viewconceptNames.form

or i also change it to module/conceptName/viewconceptNamesForm

it still fails

here is my jsp named “viewconceptNames”

 <%@ include file="/WEB-INF/template/include.jsp"%>

    <%@ include file="/WEB-INF/template/header.jsp"%>

    <form method = GET>
      CHOOSE A CONCEPT : <openmrs_tag:conceptField  formFieldName= "conceptId"/>
      <input type ="submit"  value = "view"> </input>
    </form>
    <br/>
    <table>
      <tr>
       <th>CONCEPT ID</th>
       <th>${concept.conceptId} </th>
      </tr>
      
      <tr> 
           <th>UUID</th>
           <th>${concept.uuid}</th>
      
      </tr>
      
     
          <tr>
            <th> NAMES</th>
            <td>
              <table border="1">
                   <tr>
                        <th>Locale </th>
                        <th>Prefered</th>
                        <th>Type</th>
                        <th>Nmae</th>
                         <th>Tags</th>
                   </tr>
                    <c:forEach var="cn" items="${concept.names}">
                        <tr>
                           <td>${cn.locale } </td>
                            <td>${ cn.localePreferred } </td>
                           <td>${ cn.conceptNameType } </td>
                            <td> <c:out  escapeXml ="true" value="${cn,name}"/></td>
                           <td>
                            <c:forEach var="t" items="${cn.tags}">
                           
                              <c:out  escapeXml ="true" value="${t.tag}"/>
                               <c:if test = "${not status.last }"> ,</c:if>
                           </c:forEach>
                           
                           </td>
                         </tr>
                     </c:forEach>
                   
              </table>
            </td>
            
          </tr>		
     
    </table>

    <%@ include file="/WEB-INF/template/footer.jsp"%>

and here is my error log

https://hastebin.com/ikowodiwat.sql

Put your entire module on github for inspection.

1 Like

here it is Dr @dkayiwa

my-module

The problem is that you did more than i told you.

oh am very sorry sir, i first tried out wat u told me, probably worngly, and i got an error,so i kept on adjusting slighty… :persevere:

u can look at my last commit. i tried to do it as per the instruction. but it still failed

The module id seems like the problem, what is your module id? I see basicmodule in the pom file but you are using conceptName in your URL, can you please clean all this up.

1 Like

:joy: :joy: :joy: your right…brother @wyclif …your right. i dint think that that url is supposed to have an id. God bless u. it has worked finally after a full week of stuggle.

thx so much Dr @dkayiwa… also please bear with my sickness . i shall surely heal :persevere: . i promise to be a gud patient