uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
path(String path) method
Description
This method generates a new WebResource object from this object (WebResource object). The Web resource URI that is stored in the generated object is the URI for which the path specified by the parameter is added to the Web resource URI stored in this object.
Syntax
public WebResource path(String path)
Parameter
- path
- This is the path to be added.
Return value
The method returns the generated WebResource object.
Notes
- If null is set in the path parameter, the IllegalArgumentException exception is thrown.
- Specify a non-null and correct path in the path parameter. The invalid characters are automatically URL encoded according to the standard specifications.
- Note that a query string is not a part of the path; therefore, considering that a question mark is an invalid character, the question mark (?) is automatically URL encoded. The following characters are not encoded:
! $ & ' ( ) * + - / ; = @ _ ~ . ,
Single-byte alphanumeric characters (0 to 9, A to Z, and a to z)
The already URL-encoded tokens are correctly recognized and hence are not URL-encoded again.
- As and when required, a forward slash (/) is automatically inserted between the Web resource URI that is stored in this object (WebResource object) and the path specified with the path parameter. Also, if more than one forward slash (/) is inserted, the extra ones are automatically corrected.
- The entity of this object (WebResource object) is not copied to the WebResource object that is generated with this method.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.