Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

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
283
In last 30 days
0
Total given
715
Likes
Total received
490
Received in last 30 days
4
Total given
463
Given in last 30 days
10
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Frits Walraven

Congratulations, well deserved.... have a couple of Cows!
1 week ago
Congratulations  

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

http://localhost:8080/MyServletA/hello
1 week 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 weeks 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 weeks 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 weeks 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 weeks ago
Please post your html file, your web.xml file, and the contents of your war file.
2 weeks 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 weeks ago
    You don't need the CLASSPATH, you do need to update the PATH variable.
    2 weeks ago
    ok, the CLASSPATH is wrong.

    Update your PATH from a cmd window like this:
    2 weeks 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 weeks ago
    You might want to look at this small tutorial, it is old but still usable: HowToCreateWebApplicationWithoutAnIDE
    2 weeks ago
    Have you listed all entities in the persistence.xml?

    If so, then you should add PreCandidat there as well.
    3 weeks ago