Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Professional Java for Web Applications
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Java for Web Applications
This is the forum to discuss the Wrox book Professional Java for Web Applications by Nicholas S. Williams; ISBN: 978-1-118-65646-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Java for Web Applications section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 17th, 2017, 07:04 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Are these URLs considered different?

On page 48 of "Professional Java for Web Applications", author wrote 'mapped to different URLs" referring -
Code:
<servlet> 
    <servlet-name>oddsStore</servlet-name>
    <servlet-class>com.wrox.StoreServlet</servlet-class>
</servlet >
<servlet>
    <servlet-name>endsStore</servlet-name>
    <servlet-class>com.wrox.StoreServlet</servlet-class>
</servlet>
Don't they have the same class of servlet?
Reply With Quote
  #2 (permalink)  
Old April 28th, 2017, 12:42 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

They are indeed the same class of Servlet.

When the author says mapped to different URLs he is referring to the following lines:

Code:
<servlet-mapping>
  <servlet-name>oddsStore</servlet-name>
  <url-pattern>/odds</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>endsStore</servlet-name>
  <url-pattern>/ends</url-pattern>
</servlet-mapping>
The servlets named oddsStore and endsStore are instances of the same class - com.wrox.StoreServlet - but they are mapped to different urls through the url-pattern field above - /odds and /ends.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative URLs member4953 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 May 15th, 2009 05:40 PM
Sending XHTML as text/html Considered Harmful skillmanp BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 August 3rd, 2005 01:37 PM
urls muhammadtahir4000 HTML Code Clinic 1 December 9th, 2004 04:41 AM
How Long Before We're Considered Inactive? Ben Horne Forum and Wrox.com Feedback 8 April 29th, 2004 11:55 AM
Automatic URLs Imar Forum and Wrox.com Feedback 13 June 19th, 2003 04:01 AM



All times are GMT -4. The time now is 02:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.