Find the answer to your Linux question:
Results 1 to 4 of 4

Thread: sudo gedit

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    sudo gedit

    I am having trouble with an exercise involving http post and get requests.

    Comparing HTTP GET and HTTP POST Requests
    1. Run the following command to start the web server.
    2. Start web browser and visit “http ://localhost:8080/demo/echoPost. html”.
    3. Use the gedit (menu item “Applications|Accessories|gedit Text Editor”) text editor to open and review the contents of file “~/tomcat/webapps/demo/echoPost. html”.
    4. Enter your name in the name text field, and click on the submit button. Observe that the URL doesn’t include your name. Read the returned web page for information that was submitted from your web browser to the Tomcat web server.
    5. Redo steps 2-4 but visit http ://localhost:8080/demo/echoGet. html (“~/tomcat/webapps/demo/echoGet. html”).

    Question 56: If you change the action value of the form in “demo/echoGet. html” or “demo/echoPost. html” from “http ://localhost:8080/demo/echo” to “/demo/echo”, do you see any differences in the behavior of form data submission? (You need to use “sudo gedit echoGet. html” to change the file since the file was created by “root”)

    I go to the command line and punch in "sudo gedit echoGet.html" and the gedit text editor pops up blank. I copy and paste the original code but modify the action value to just /demo/echo and then save but I do not know what to do from here. When I open up the new browser and visit the http ://localhost:8080/demo/echoGet. html website and enter my name in the text field I do not notice any difference when changing the action value. Am I supposed to do something different to see the action value change have any affect on the information displayed?

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Virginia, USA
    are you in the directory /tomcat/webapps/demo ?? If not, cd /tomcat/webapps/demo

  3. #3
    Sry, it's so basic that I'll only give you a hint:
    Have you done Steps 1-5?
    Have you had any problems/warnings with step 5?

    For further information I recommend a bash manual:
    sudo Man Page |
    superuser means you have all rights ... so you can do a lot of damage

    And gedit ... is the text editor ...

    sudo gedit echoGet.html
    Means ... open "echoGet.html" with the editor ... without any user-restriction

  4. $spacer_open
  5. #4

    sudo gedit

    Yes, I have been in the directory /tomcat/webapps/demo. I have no problem with steps 1-5. I am having the problem when I try to change the action value in the form code using the sudo gedit echoGet. html. After I have saved the updated echoGet. html file with the new action value of /demo/echo instead of http ://localhost:8080/demo/echo, when I re-run steps 1-5 I see nothing different on the webpage. Should anything necessarily be different if I change the action value?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts