Frits Walraven

Creator of Enthuware JWS+ V6
+ Follow
since Apr 07, 2010
Frits likes ...
Android Chrome Eclipse IDE
Amersfoort, The Netherlands
Cows and Likes
Cows
Total received
289
In last 30 days
2
Total given
739
Likes
Total received
494
Received in last 30 days
3
Total given
468
Given in last 30 days
4
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Frits Walraven

All mentioned certifications are now officially retired.

Congratulations, well deserved.... have a couple of Cows!
2 months ago
Congratulations  

You didn't give up and that deserves a Cow!
2 months ago
So, what happens if you go to the following URL in a browser when Tomcat is running?

http://localhost:8080/MyServletA/hello
2 months ago

C:\Program Files\Java\apache-tomcat-9.0.14\webapps\MyServletA  


I thought you had named your war file HelloWorld.war, so it seems it isn't.... You called it MyServletA.war? This is important because it will determine your contex-root (e.g. starting URL of your web-application)

The URL servlet-mapping in the web.xml will tell the mapping
points to your MyServletA servlet.

In other words, if your war file is called MyServletA.war, then you need the following action: (notice the capital A, I didn't see that in your code)

<form method="GET" action="/MyServletA/hello">type some text: <input <br /> type="text" name="any" />


2 months ago
Did you change the link in your HTML file to something simular to the tutorial?


<form method="GET" action="/HelloWorld/hello">
type some text: <input type="text" name="any" />


<input type="submit">
</form>

2 months ago
The link in the HTML file is incorrect, you can't point to a file.

If you check the tutorial again it should be something like:

http://localhost:8080/HelloWorld/hello



if your war file is called HelloWorld.war this URL should work from any browser.
2 months ago

How do I post the contents of the .war file  


Sorry, I meant the structure of your war file (like in the small tutorial)

What is the exact URL you are using again?
2 months ago
Please post your html file, your web.xml file, and the contents of your war file.
2 months ago
Try this:

  • open a cmd window from the tomcat directory (the dir where startup.bat is)
  • set PATH=%PATH%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin
  • run startup.bat

  • 2 months ago
    You don't need the CLASSPATH, you do need to update the PATH variable.
    2 months ago
    ok, the CLASSPATH is wrong.

    Update your PATH from a cmd window like this:
    2 months ago
    what does java -version in a cmd window give you as a result?

    You don't need JRE_HOME.

    CATALINA_HOME is tomcat's home directory.
    2 months ago
    You might want to look at this small tutorial, it is old but still usable: HowToCreateWebApplicationWithoutAnIDE
    2 months ago