I'm trying to call a function testMethod using onClick
where testMethod placed in the same servlet. and SQA.System is the package.
There is no syntax error. The application runs correctly untill I click on Topic1 where the function testMethod should be processed but it doesn't. I think the problem is with the way I passed the function I also tried it without the package name.
Does any one knows what I did wrong? How I should pass the method testMethod?
For servlet methods, you need to create url mapping and call url for servlet from HTML page.
Ok. can I call another servlet using onClick? if not
What is url mapping? and how I can do it?
in my application the user enter a query concept and when submit it, in the doPost method where an ontology model is accessed and the results are displayed as following
important learning resources
I have no problem with the first list. With the second list I need each topic to be a link that when clicked the same process will be repeated where the query now is the selected topic? it works except for that part where the links are not direct URLs instead the process of the doPost is repeated but this time the user will not enter the query instead the query is assigned to the selected topic
This is why I tried methods to do the search jop and display the results.
I use tomcat 7 where web.xml is not required instead I use @WebServlet("/SQA") wher in my html file I use
<form action="SQA" method = "get">
in the doGet method I use the following to get the user query
response.getWriter().print("<form action = './SQA' method = 'post'>");
then in the doPost model I do the search process which creates the results then from these results I need to do the process again? shall I call the doPost again asigning value to the query variable instead of getting it from parameters?