Hello:
I'm brand new to this software. was trying to make sure all the settings where right. So I started a new project, left it empty. When you press "run test" you get a page that is basically an empty form that says "form details" and a "save" button
I am running a tomcat server as a service (on windows), which I can access at localhost/manager. I configured tomcat to listen to port 80 while I installed. I want to write an app for my intranet, and I don't want to have to use weird URL's with port numbers.
I set up the parameters for publishing, and when you press "publish" it publishes without errors.
I can see the .war file in the webapps directory, and I can see my project in the /manager screen. but when I click on it, I get a "status 404" error. I've tried to press the "reload" button in /manager, without errors.
Any ideas what to try?
Dan
I'm brand new to this software. was trying to make sure all the settings where right. So I started a new project, left it empty. When you press "run test" you get a page that is basically an empty form that says "form details" and a "save" button
I am running a tomcat server as a service (on windows), which I can access at localhost/manager. I configured tomcat to listen to port 80 while I installed. I want to write an app for my intranet, and I don't want to have to use weird URL's with port numbers.
I set up the parameters for publishing, and when you press "publish" it publishes without errors.
I can see the .war file in the webapps directory, and I can see my project in the /manager screen. but when I click on it, I get a "status 404" error. I've tried to press the "reload" button in /manager, without errors.
Any ideas what to try?
Dan
RE: error 404 when trying to open my project in Tomcat
Welcome to the forum.
I'm sorry you are having trouble, but I am sure we can get this working for you.
If I understand correctly, you have a 'blank' project that is working fine in run test, but you are trying to make sure you can publish and deploy it to your target server.
It looks like you have successfully created and deployed the WAR file, but you can't seem to access the resulting application.
As there are no errors reported from Tomcat, my first thought would be to check the URL you are using to try and access the application. By default there is unlikely to be anything present to handle a request for the root of the application so this might be why you are getting the 404 error.
Can you try adding the action name to the end of the URL (eg http://localhost/<appname>/start.do or http://localhost/<appname>/startForm.do) to see if you then get a response?
If this works ok, then you should be able to solve your issue by adding an index.jsp file to the root of your project webapp with the following content:
<% request.getRequestDispatcher("startForm.do").forward(request, response); %>
This should ensure that any requests to the root of the application (eg http://localhost/<appname>) get forwarded to the correct location. If required, you should change 'startForm' to the correct action name.
If you place this index.jsp file at <WebMaker install dir>/users/user1/<workspace name>/mvc/<project name>/webapp it should get included correctly when you publish the project again.
Hopefully this will resolve the problem.
If not, and you are unable to access the published application even when the correct action is added to the URL, we will need to look into the logs to try and debug further. In this case, if you can provide copies of the Tomcat log files, as well as the WebMaker log file from within the doc directory of the published web application, that would be great.
I hope this helps. Please let me know how you get on.
Regards,
Gerard
RE: error 404 when trying to open my project in Tomcat
[hr][/hr]
does it make a difference that i am using the community version of WebMaker?
RE: error 404 when trying to open my project in Tomcat
The WebMaker version shouldn't make a difference for this.
There won't be an index.jsp file there initially so that is ok.
If you are able to access the form by adding the action name to the URL (eg http://localhost/qms/startForm.do) then you can just create a new index.jsp file, and give it the content from above.
Regards,
Gerard
RE: error 404 when trying to open my project in Tomcat
[hr][/hr]
to clarify, I used the complete URL http://grm/qms/start.do
[hr][/hr]
also, the firewall is ok, I can access http://grm/manager
RE: error 404 when trying to open my project in Tomcat
The names of the *.do URLs are set by the action (line) names coming out of the pages on the Application Map. The exception being the start.do URL which is built in to always display the 'start' page.
If the app was running correctly and the wrong action URL was used, I would expect you to get an error page stating 'Unable to find mapping for URL...' instead of a 404 error anyway.
It looks to me like it has not deployed correctly, so we will need to look into the Tomcat logs to investigate this. Within your Tomcat installation directory there should be a logs sub directory containing a number of files. If you are able to send through any files that have recent content I can have a look at them to see if I can identify the issue.
It would also be worth checking if the WebMaker application itself has produced any logs by looking for a .../webapps/qms/doc/log.txt file.
Hopefully these logs will give us some pointers to resolve the issue.
Regards,
Gerard
RE: error 404 when trying to open my project in Tomcat
SO.... typing //grm/qms/start.do works. but plain //grm/qms doesn't. So I need to create some kind of index page?
[hr][/hr]
oh wait, start.do only works from localhost, not remotely....
[hr][/hr]
so there's some kind of permissions problem?
RE: error 404 when trying to open my project in Tomcat
That's good you have made some progress.
It looks like there are two issues to resolve.
The first is setting up the action to use by default if one hasn't been provided in the URL. You should be able to resolve this fairly easily by creating an index.jsp file as I mentioned previously.
The second issue is the access restrictions problem if not using localhost. I would guess this is likely to require some kind of configuration change either in Tomcat or your firewall.
If you are sure that the firewall is not blocking it, then I would concentrate on the Tomcat options.
I am not sure exactly what changes you may need to make, but hopefully you can find some helpful information online or in the Tomcat docs.
If you are still having issues, please let me know the versions of Tomcat and Windows you are using and I can try and look into it.
Regards,
Gerard
RE: error 404 when trying to open my project in Tomcat