Skip to main content

 Advanced

Advanced topics

Servlet: Default

com.pageseeder.Default

Description

This servlet accepts GET, HEAD or OPTIONS requests for a file (document) stored on PageSeeder, checks access permission and fetches the file.

It must be accessed via one of the following URL paths:

  • /ps/uri/[uriid][ext] (e.g. /ps/uri/123 or /ps/uri/123.gif)
  • /ps/docid/[docid] (e.g. /ps/docid/myid123)
  • [docPath] (e.g. /ps/acme/specs/mydoc.psml)

If publication=true and publicationid is not specified then the publications for this document (that the current member can access) are ordered alphabetically by display title (then by ID) and the first publication is used.

The HTTP cache headers returned depend on the publication (if any) and whether there is any content transcluded from other documents as follows:

no publicationpublication root accessible to ps-grouppublication root NOT accessible to ps-group
transcluded content
Cache-Control:
 no-cache
Cache-Control:
 no-cache
Cache-Control:
 no-cache
NO transcluded content
Cache-Control:
 must-revalidate
ETag:
 [document etag]
Last-Modified:
 [document
  modified date]
Cache-Control:
 must-revalidate
ETag:
 [publication etag]
Last-Modified:
 [publication
  modified date]
Cache-Control:
 private,
 must-revalidate
ETag:
 [publication etag]
Last-Modified:
 [publication
  modified date]

HTTP parameters

NameDescriptionRequiredTypeDefault value
uriidThe URI ID of the document (required if no docPath or docid and overrides them)maybelong[from path info]
docidThe document ID of the document (required if no docPath or docid and overrides docPath)maybestring[from path info]
docPathThe path for the document (required if no uriid or docid)maybepath[from path info]
groupThe group for the document edits (different groups can have different edits)nostring[the first user's group with access]
versionidThe version ID of the document/metadata to return (overrides version except for transclusions and auto-numbering as ID is specific to this document)nolong
versionThe version of the document/metadata to return (applies to transclusions and auto-numbering). If 'original' or 'current' load original or current version. If the value is a float or ISO 8601 date and none match, the closest previous version is loaded.nostring[current version]
compareuriidThe URI ID of the document to compare withnolong[uriid]
comparegroupThe context group of the document to compare withnostring[the first user's group with access]
compareidThe version ID to compare the selected version with (overrides compare except for auto-numbering as ID is specific to this document)nolong
compareThe version to compare the selected version with (applies to auto-numbering). If 'original' or 'current' compare with original or current version. If the value is a float or ISO 8601 date and none match, the closest previous version is loaded.nostring
compare-diffxWhether to include diffx markup for comparison (if no compareid or compare compare with current version)nobooleanfalse
transcludeWhether to transclude content for transclude XRefs (only applies if no compare* parameters)nobooleanfalse
ps-reloadWhether to refresh the document cache contentsnobooleanfalse
psmlWhether to return PSML metadata for non-PSML filesnobooleanfalse
positionThe position (instance number) of this document in the publication (requires publication=true)nointeger[first embedded position of URI]
publicationWhether to use publication for version and adjustments (e.g. numbering) in contentnobooleanfalse
publicationidThe ID of the publication context for version and numbering (requires publication=true).nopublicationid[first publication found for URI]
behaviorIf set to 'download' add filename attachment headers to trigger download by browser.nostring

For backward compatibility parameter names can be prefixed by “ps-”.

Created on , last edited on