# How to set up a basic module with controller

**URL:** <https://talk.openmrs.org/t/how-to-set-up-a-basic-module-with-controller/11815>\
**Category:** Uncategorized\
**Tags:** module, openmrs-sdk, spring\
**Created:** [June 9, 2017, 12:56pm UTC](https://talk.openmrs.org/t/how-to-set-up-a-basic-module-with-controller/11815 "2017-06-09T12:56:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdg583](https://talk.openmrs.org/letter_avatar/mdg583/32/6_449c533f586939b6e5f246632a46421f.png) [@mdg583](https://talk.openmrs.org/u/mdg583)\
**Post date:** [June 9, 2017, 12:56pm UTC](https://talk.openmrs.org/t/how-to-set-up-a-basic-module-with-controller/11815/1 "2017-06-09T12:56:49Z")

</div>

Hello all,

I am looking for some very basic help with trying to build a first module. I have very little experience with java, and also very little understanding of the Spring framework, and for now I’m looking just to make a simple “Hello World” type of module.

I’m basically trying to understand how openmrs/spring controllers work to give a responce to a http request at a url.

Eventually I’m trying to make a module that runs a Dicom query on the server side (using dcm4che) to a PACS system, and returns a list of studies as a JSON response. I think I don’t have the java skill to do this in a ‘correct’ way, so for now I’m aiming for a simple approach that works.

Steps I’ve taken:

1. installed openmrs sdk

2. ran `mvn openmrs-sdk:create-project` Created a platform 1.12.0 module, gave a name (pacsquery), etc.

3. I belive [this bug](https://issues.openmrs.org/browse/SDK-212) is affecting me, so I edit `omod/src/main/java/org/openmrs/module/pacsquery/web/controller/PacsQueryController.java` to use my modules artifactId

4. I run `mvn openmrs-sdk:build openmrs-sdk:run -DserverId=tests1`

5. I go to [http://MYIP:8080/openmrs/module/pacsquery/pacsquery.form](http://MYIP:8080/openmrs/module/pacsquery/pacsquery.form) and it gives an error, in the console: `WARN - DispatcherServlet.noHandlerFound(1108) |2017-06-09 15:34:30,932| No mapping found for HTTP request with URI [/openmrs/module/pacsquery/pacsquery.form] in DispatcherServlet with name 'openmrs'`

I’m wondering, what are the steps missing to have a module with a working controller?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [June 11, 2017, 7:45pm UTC](https://talk.openmrs.org/t/how-to-set-up-a-basic-module-with-controller/11815/2 "2017-06-11T19:45:50Z")

</div>

Does it work if you change view to? VIEW = “/module/pacsquery/pacsqueryform”

---

<div class="post-metadata">

**Author:** ![mdg583](https://talk.openmrs.org/letter_avatar/mdg583/32/6_449c533f586939b6e5f246632a46421f.png) [@mdg583](https://talk.openmrs.org/u/mdg583)\
**Post date:** [June 12, 2017, 6:01am UTC](https://talk.openmrs.org/t/how-to-set-up-a-basic-module-with-controller/11815/3 "2017-06-12T06:01:05Z")

</div>

Hi Daniel, Thanks for the input. I found that omod/src/main/resources/config.xml also had placeholder variables in curly braces, for id, name, version and description. Replacing these fixed the issue.
