Exercise 1 Question re:annotatio-war test sample

11 views
Skip to first unread message

Robert Ruth

unread,
Aug 19, 2016, 7:07:21 AM8/19/16
to JPassion.com: Java EE 6 and 7 Programming
I started this course today and am understanding most things well.   I have run into something that puzzles me and I would like to understand what is happening better.

I am using Netbeans and when I run the code, the browser pops up pointing to localhost:8080/annotation-war and the page renders with the correct message.  What I would like to know is what is it that set the name annotation-war into the URL?  The only file that I find the string "annotation-war" in is the context.xml.  I changed the string to "larry" and did a clean-build and run and the browser STILL comes up pointing to localhost:8080/annotation-war and the data displays correctly... so it is NOT the field in context.xml that sets it but I don't see anything in the @WebServlet annotation that does either.  I haven't been able to find any mapping that would do it I am frankly stumped.

If anyone can tell me, I would sure appreciate it.

Bob

Sang Shin

unread,
Aug 23, 2016, 8:40:28 AM8/23/16
to boru...@gmail.com, JPassion.com: Java EE 6 and 7 Programming

Sorry for the late response.  The default behavior,
when there no file that specifies the context explicitly,
is that the name of the war file is used as
the context.

-Sang
--
You received this message because you are subscribed to the Google Groups "JPassion.com: Java EE 6 and 7 Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpassion_javae...@googlegroups.com.
Visit this group at https://groups.google.com/group/jpassion_javaee6.
For more options, visit https://groups.google.com/d/optout.

-- 
-------------------------------------------------------------------
             Sang Shin, sangshi...@gmail.com
  President and Chief Instructor of JPassion.com (JavaPassion.com)
         http://www.linkedin.com/in/javapassion (Linkedin)
          http://twitter.com/javapassion (Tweeter)
            Life is worth living... with Passion!
    
   Practically Free 3 to 5 days Live, Hands-on, Online Codecamps on
 Java,Spring,Hadoop,HTML5,Ruby/Rails,Grails,JavaScript/jQuery,Android
             http://jpassion.com/codecamps       
----------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages