KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > servlets > EntryServlet


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2005 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.servlets;
14
15 import info.magnolia.cms.Aggregator;
16 import info.magnolia.cms.Dispatcher;
17 import info.magnolia.cms.beans.config.ConfigLoader;
18 import info.magnolia.cms.beans.config.VirtualMap;
19 import info.magnolia.cms.beans.runtime.Cache;
20 import info.magnolia.cms.core.CacheHandler;
21 import info.magnolia.cms.core.CacheProcess;
22 import info.magnolia.cms.core.Path;
23 import info.magnolia.cms.security.Permission;
24 import info.magnolia.cms.security.SessionAccessControl;
25
26 import java.io.BufferedReader JavaDoc;
27 import java.io.IOException JavaDoc;
28 import java.io.UnsupportedEncodingException JavaDoc;
29 import java.security.Principal JavaDoc;
30 import java.util.Enumeration JavaDoc;
31 import java.util.HashMap JavaDoc;
32 import java.util.Locale JavaDoc;
33 import java.util.Map JavaDoc;
34
35 import javax.jcr.RepositoryException;
36 import javax.servlet.RequestDispatcher JavaDoc;
37 import javax.servlet.ServletInputStream JavaDoc;
38 import javax.servlet.http.Cookie JavaDoc;
39 import javax.servlet.http.HttpServlet JavaDoc;
40 import javax.servlet.http.HttpServletRequest JavaDoc;
41 import javax.servlet.http.HttpServletResponse JavaDoc;
42 import javax.servlet.http.HttpSession JavaDoc;
43
44 import org.apache.commons.lang.StringUtils;
45 import org.apache.log4j.Logger;
46
47
48 /**
49  * This is the main http servlet which will be called for any resource request this servlet will dispacth or process
50  * requests according to their nature -- all resource requests will go to ResourceDispatcher -- all page requests will
51  * be handed over to the defined JSP or Servlet (template). Updated to allow caching of virtual URI's
52  * @author Sameer Charles
53  * @version 2.1
54  */

55 public class EntryServlet extends HttpServlet JavaDoc {
56
57     /**
58      * Request parameter: the INTERCEPT holds the name of an administrative action to perform.
59      */

60     public static final String JavaDoc INTERCEPT = "mgnlIntercept"; //$NON-NLS-1$
61

62     /**
63      * Stable serialVersionUID.
64      */

65     private static final long serialVersionUID = 222L;
66
67     /**
68      * Logger.
69      */

70     private static Logger log = Logger.getLogger(EntryServlet.class);
71
72     /**
73      * The default request interceptor path, defined in web.xml.
74      */

75     private static final String JavaDoc REQUEST_INTERCEPTOR = "/RequestInterceptor"; //$NON-NLS-1$
76

77     /**
78      * This makes browser and proxy caches work more effectively, reducing the load on server and network resources.
79      * @param request HttpServletRequest
80      * @return last modified time in miliseconds since 1st Jan 1970 GMT
81      */

82     public long getLastModified(HttpServletRequest JavaDoc request) {
83         return info.magnolia.cms.beans.runtime.Cache.getCreationTime(request);
84     }
85
86     /**
87      * Allow caching of this specific resource. This method always returns <code>true</code>, and it's here to allow
88      * an easy plug-in of application-specific logic by extending EntrySrvlet. If you need to disable cache for specific
89      * requests (not based on the request URI, since this is configurable from adminCentral) you can override this
90      * method.
91      * @param req HttpServletRequest
92      * @return <code>true</code> if the page returned by this request can be cached, <code>false</code> if cache
93      * should not be used.
94      */

95     protected boolean allowCaching(HttpServletRequest JavaDoc req) {
96         return true;
97     }
98
99     /**
100      * All HTTP/s requests are handled here.
101      * @param req HttpServletRequest
102      * @param res HttpServletResponse
103      * @throws IOException can be thrown when the servlet is unable to write to the response stream
104      */

105     public void doGet(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) throws IOException JavaDoc {
106
107         if (ConfigLoader.isBootstrapping()) {
108             // @todo a nice page, with the log content...
109
res.getWriter().write("Magnolia bootstrapping has failed, check bootstrap.log in magnolia/logs"); //$NON-NLS-1$
110
return;
111         }
112
113         try {
114             if (isAuthorized(req, res)) {
115
116                 // allowCaching allows users to plug-in application specific logic
117
boolean cacheable = allowCaching(req);
118
119                 // try to stream from cache first
120
if (cacheable && Cache.isCached(req)) {
121                     if (CacheHandler.streamFromCache(req, res)) {
122                         return; // if success return
123
}
124                 }
125                 if (redirect(req, res)) {
126
127                     // it's a valid request cache it
128
if (cacheable) {
129                         this.cacheRequest(req);
130                     }
131                     return;
132                 }
133                 intercept(req, res);
134
135                 // aggregate content
136
Aggregator aggregator = new Aggregator(req, res);
137                 boolean success = aggregator.collect();
138                 if (success) {
139                     try {
140                         Dispatcher.dispatch(req, res, getServletContext());
141                     }
142                     catch (Exception JavaDoc e) {
143                         log.error(e.getMessage(), e);
144                     }
145                     this.cacheRequest(req);
146                 }
147                 else {
148                     if (log.isDebugEnabled()) {
149                         log.debug("Resource not found, redirecting request for [" //$NON-NLS-1$
150
+ req.getRequestURI() + "] to 404 URI"); //$NON-NLS-1$
151
}
152
153                     if (!res.isCommitted()) {
154                         res.sendError(HttpServletResponse.SC_NOT_FOUND);
155                     }
156                     else {
157                         log.info("Unable to redirect to 404 page, response is already committed"); //$NON-NLS-1$
158
}
159                 }
160             }
161         }
162         catch (RepositoryException e) {
163             log.error(e.getMessage(), e);
164         }
165         catch (RuntimeException JavaDoc e) {
166             log.error(e.getMessage(), e);
167         }
168     }
169
170     /**
171      * All requests are handles by get handler.
172      * @param req HttpServletRequest
173      * @param res HttpServletResponse
174      * @throws IOException can be thrown when the servlet is unable to write to the response stream
175      */

176     public void doPost(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) throws IOException JavaDoc {
177         doGet(req, res);
178     }
179
180     /**
181      * Uses access manager to authorise this request.
182      * @param req HttpServletRequest as received by the service method
183      * @param res HttpServletResponse as received by the service method
184      * @return boolean true if read access is granted
185      * @throws IOException can be thrown when the servlet is unable to write to the response stream
186      */

187     protected boolean isAuthorized(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) throws IOException JavaDoc {
188         if (SessionAccessControl.getAccessManager(req) != null) {
189             String JavaDoc path = StringUtils.substringBefore(Path.getURI(req), "."); //$NON-NLS-1$
190
if (!SessionAccessControl.getAccessManager(req).isGranted(path, Permission.READ)) {
191                 res.sendError(HttpServletResponse.SC_FORBIDDEN);
192             }
193         }
194         return true;
195     }
196
197     /**
198      * Redirect based on the mapping in config/server/.node.xml
199      * @param request HttpServletRequest
200      * @param response HttpServletResponse
201      * @return <code>true</code> if request has been redirected, <code>false</code> otherwise
202      */

203     private boolean redirect(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
204         String JavaDoc uri = this.getURIMap(request);
205         if (StringUtils.isNotEmpty(uri)) {
206             try {
207                 // first reset the existing URI attribute
208
Path.resetURI(request);
209                 request.getRequestDispatcher(uri).forward(request, response);
210             }
211             catch (Exception JavaDoc e) {
212                 log.error("Failed to forward - " + uri); //$NON-NLS-1$
213
log.error(e.getMessage(), e);
214             }
215             return true;
216         }
217         return false;
218     }
219
220     /**
221      * Attach Interceptor servlet if interception needed
222      * @param request HttpServletRequest
223      * @param response HttpServletResponse
224      */

225     private void intercept(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
226         if (request.getParameter(INTERCEPT) != null) {
227             try {
228                 request.getRequestDispatcher(REQUEST_INTERCEPTOR).include(request, response);
229             }
230             catch (Exception JavaDoc e) {
231                 log.error("Failed to Intercept"); //$NON-NLS-1$
232
log.error(e.getMessage(), e);
233             }
234         }
235     }
236
237     /**
238      * @return URI mapping as in ServerInfo
239      * @param request HttpServletRequest
240      */

241     private String JavaDoc getURIMap(HttpServletRequest JavaDoc request) {
242         return VirtualMap.getURIMapping(StringUtils.substringAfter(request.getRequestURI(), request.getContextPath()));
243     }
244
245     /**
246      * Caches this request if level-1 cache is active and request is part of cacheable mapping
247      * @param request HttpServletRequest
248      */

249     private void cacheRequest(HttpServletRequest JavaDoc request) {
250         if (!Cache.isInCacheProcess(request) && info.magnolia.cms.beans.config.Cache.isCacheable(request)) {
251             CacheProcess cache = new CacheProcess(new ClonedRequest(request));
252             cache.start();
253         }
254     }
255
256     /**
257      * Simply a copy of the original request used by CacheProcess.
258      */

259     private static class ClonedRequest implements HttpServletRequest JavaDoc {
260
261         /**
262          * Request attributes.
263          */

264         private Map attributes = new HashMap JavaDoc();
265
266         /**
267          * Request headers.
268          */

269         private Map headers = new HashMap JavaDoc();
270
271         /**
272          * Parameters.
273          */

274         private Map parameters;
275
276         /**
277          * Request URI.
278          */

279         private String JavaDoc uri;
280
281         /**
282          * Request context path.
283          */

284         private String JavaDoc contextPath;
285
286         /**
287          * Character encoding.
288          */

289         private String JavaDoc characterEncoding;
290
291         /**
292          * Server port.
293          */

294         private int serverPort;
295
296         /**
297          * Request scheme (http or https).
298          */

299         private String JavaDoc scheme;
300
301         /**
302          * Server name.
303          */

304         private String JavaDoc serverName;
305
306         /**
307          * Server name.
308          */

309         private String JavaDoc method;
310
311         /**
312          * Instantiate a new ClonedRequest, copying needed attributes from the original request.
313          * @param originalRequest wrapped HttpServletRequest
314          */

315         public ClonedRequest(HttpServletRequest JavaDoc originalRequest) {
316             this.contextPath = originalRequest.getContextPath();
317             // remember URI
318
this.uri = originalRequest.getRequestURI();
319             this.characterEncoding = originalRequest.getCharacterEncoding();
320             // copy neccessary attributes
321
this.attributes.put(Aggregator.EXTENSION, originalRequest.getAttribute(Aggregator.EXTENSION));
322             this.attributes.put(Aggregator.ACTPAGE, originalRequest.getAttribute(Aggregator.ACTPAGE));
323
324             // copy headers
325
String JavaDoc authHeader = originalRequest.getHeader("Authorization"); //$NON-NLS-1$
326
if (authHeader != null) {
327                 this.headers.put("Authorization", authHeader); //$NON-NLS-1$
328
}
329
330             // needed if cacheDomain is not set
331
this.serverPort = originalRequest.getServerPort();
332             this.scheme = originalRequest.getScheme();
333             this.serverName = originalRequest.getServerName();
334             this.method = originalRequest.getMethod();
335             this.parameters = originalRequest.getParameterMap();
336         }
337
338         /**
339          * @see javax.servlet.http.HttpServletRequest#getRequestURI()
340          */

341         public String JavaDoc getRequestURI() {
342             return uri;
343         }
344
345         /**
346          * @see javax.servlet.http.HttpServletRequest#getHeader(java.lang.String)
347          */

348         public String JavaDoc getHeader(String JavaDoc key) {
349             return (String JavaDoc) this.headers.get(key);
350         }
351
352         /**
353          * @see javax.servlet.ServletRequest#getAttribute(java.lang.String)
354          */

355         public Object JavaDoc getAttribute(String JavaDoc key) {
356             return attributes.get(key);
357         }
358
359         /**
360          * Throws UnsupportedOperationException.
361          * @see javax.servlet.http.HttpServletRequest#getContextPath()
362          */

363         public String JavaDoc getContextPath() {
364             return this.contextPath;
365         }
366
367         /**
368          * @see javax.servlet.ServletRequest#getCharacterEncoding()
369          */

370         public String JavaDoc getCharacterEncoding() {
371             return this.characterEncoding;
372         }
373
374         /**
375          * @see javax.servlet.ServletRequest#getScheme()
376          */

377         public String JavaDoc getScheme() {
378             return this.scheme;
379         }
380
381         /**
382          * @see javax.servlet.ServletRequest#getServerName()
383          */

384         public String JavaDoc getServerName() {
385             return this.serverName;
386         }
387
388         /**
389          * @see javax.servlet.ServletRequest#getServerPort()
390          */

391         public int getServerPort() {
392             return this.serverPort;
393         }
394
395         /**
396          * @see javax.servlet.http.HttpServletRequest#getMethod()
397          */

398         public String JavaDoc getMethod() {
399             return this.method;
400         }
401
402         /**
403          * @see javax.servlet.ServletRequest#getParameterMap()
404          */

405         public Map getParameterMap() {
406             return this.parameters;
407         }
408
409         /**
410          * @see javax.servlet.ServletRequest#getParameter(java.lang.String)
411          */

412         public String JavaDoc getParameter(String JavaDoc s) {
413             return (String JavaDoc) this.parameters.get(s);
414         }
415
416         /**
417          * Throws UnsupportedOperationException.
418          * @see javax.servlet.http.HttpServletRequest#getRequestURL()
419          */

420         public StringBuffer JavaDoc getRequestURL() {
421             throw new UnsupportedOperationException JavaDoc();
422         }
423
424         /**
425          * Throws UnsupportedOperationException.
426          * @see javax.servlet.http.HttpServletRequest#getServletPath()
427          */

428         public String JavaDoc getServletPath() {
429             throw new UnsupportedOperationException JavaDoc();
430         }
431
432         /**
433          * Throws UnsupportedOperationException.
434          * @see javax.servlet.http.HttpServletRequest#getSession(boolean)
435          */

436         public HttpSession JavaDoc getSession(boolean b) {
437             throw new UnsupportedOperationException JavaDoc();
438         }
439
440         /**
441          * Throws UnsupportedOperationException.
442          * @see javax.servlet.http.HttpServletRequest#getSession()
443          */

444         public HttpSession JavaDoc getSession() {
445             throw new UnsupportedOperationException JavaDoc();
446         }
447
448         /**
449          * Throws UnsupportedOperationException.
450          * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid()
451          */

452         public boolean isRequestedSessionIdValid() {
453             throw new UnsupportedOperationException JavaDoc();
454         }
455
456         /**
457          * Throws UnsupportedOperationException.
458          * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromCookie()
459          */

460         public boolean isRequestedSessionIdFromCookie() {
461             throw new UnsupportedOperationException JavaDoc();
462         }
463
464         /**
465          * Throws UnsupportedOperationException.
466          * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromURL()
467          */

468         public boolean isRequestedSessionIdFromURL() {
469             throw new UnsupportedOperationException JavaDoc();
470         }
471
472         /**
473          * Throws UnsupportedOperationException.
474          * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromUrl()
475          */

476         public boolean isRequestedSessionIdFromUrl() {
477             throw new UnsupportedOperationException JavaDoc();
478         }
479
480         /**
481          * Throws UnsupportedOperationException.
482          * @see javax.servlet.http.HttpServletRequest#getAuthType()
483          */

484         public String JavaDoc getAuthType() {
485             throw new UnsupportedOperationException JavaDoc();
486         }
487
488         /**
489          * Throws UnsupportedOperationException.
490          * @see javax.servlet.http.HttpServletRequest#getCookies()
491          */

492         public Cookie JavaDoc[] getCookies() {
493             throw new UnsupportedOperationException JavaDoc();
494         }
495
496         /**
497          * Throws UnsupportedOperationException.
498          * @see javax.servlet.http.HttpServletRequest#getDateHeader(java.lang.String)
499          */

500         public long getDateHeader(String JavaDoc s) {
501             throw new UnsupportedOperationException JavaDoc();
502         }
503
504         /**
505          * Throws UnsupportedOperationException.
506          * @see javax.servlet.http.HttpServletRequest#getHeaders(java.lang.String)
507          */

508         public Enumeration JavaDoc getHeaders(String JavaDoc s) {
509             throw new UnsupportedOperationException JavaDoc();
510         }
511
512         /**
513          * Throws UnsupportedOperationException.
514          * @see javax.servlet.http.HttpServletRequest#getHeaderNames()
515          */

516         public Enumeration JavaDoc getHeaderNames() {
517             throw new UnsupportedOperationException JavaDoc();
518         }
519
520         /**
521          * Throws UnsupportedOperationException.
522          * @see javax.servlet.http.HttpServletRequest#getIntHeader(java.lang.String)
523          */

524         public int getIntHeader(String JavaDoc s) {
525             throw new UnsupportedOperationException JavaDoc();
526         }
527
528         /**
529          * Throws UnsupportedOperationException.
530          * @see javax.servlet.http.HttpServletRequest#getPathInfo()
531          */

532         public String JavaDoc getPathInfo() {
533             throw new UnsupportedOperationException JavaDoc();
534         }
535
536         /**
537          * Throws UnsupportedOperationException.
538          * @see javax.servlet.http.HttpServletRequest#getPathTranslated()
539          */

540         public String JavaDoc getPathTranslated() {
541             throw new UnsupportedOperationException JavaDoc();
542         }
543
544         /**
545          * Throws UnsupportedOperationException.
546          * @see javax.servlet.http.HttpServletRequest#getQueryString()
547          */

548         public String JavaDoc getQueryString() {
549             throw new UnsupportedOperationException JavaDoc();
550         }
551
552         /**
553          * Throws UnsupportedOperationException.
554          * @see javax.servlet.http.HttpServletRequest#getRemoteUser()
555          */

556         public String JavaDoc getRemoteUser() {
557             throw new UnsupportedOperationException JavaDoc();
558         }
559
560         /**
561          * Throws UnsupportedOperationException.
562          * @see javax.servlet.http.HttpServletRequest#isUserInRole(java.lang.String)
563          */

564         public boolean isUserInRole(String JavaDoc s) {
565             throw new UnsupportedOperationException JavaDoc();
566         }
567
568         /**
569          * Throws UnsupportedOperationException.
570          * @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
571          */

572         public Principal JavaDoc getUserPrincipal() {
573             throw new UnsupportedOperationException JavaDoc();
574         }
575
576         /**
577          * Throws UnsupportedOperationException.
578          * @see javax.servlet.http.HttpServletRequest#getRequestedSessionId()
579          */

580         public String JavaDoc getRequestedSessionId() {
581             throw new UnsupportedOperationException JavaDoc();
582         }
583
584         /**
585          * Throws UnsupportedOperationException.
586          * @see javax.servlet.ServletRequest#getAttributeNames()
587          */

588         public Enumeration JavaDoc getAttributeNames() {
589             throw new UnsupportedOperationException JavaDoc();
590         }
591
592         /**
593          * Throws UnsupportedOperationException.
594          * @see javax.servlet.ServletRequest#setCharacterEncoding(java.lang.String)
595          */

596         public void setCharacterEncoding(String JavaDoc s) throws UnsupportedEncodingException JavaDoc {
597             throw new UnsupportedOperationException JavaDoc();
598         }
599
600         /**
601          * Throws UnsupportedOperationException.
602          * @see javax.servlet.ServletRequest#getContentLength()
603          */

604         public int getContentLength() {
605             throw new UnsupportedOperationException JavaDoc();
606         }
607
608         /**
609          * Throws UnsupportedOperationException.
610          * @see javax.servlet.ServletRequest#getContentType()
611          */

612         public String JavaDoc getContentType() {
613             throw new UnsupportedOperationException JavaDoc();
614         }
615
616         /**
617          * Throws UnsupportedOperationException.
618          * @see javax.servlet.ServletRequest#getInputStream()
619          */

620         public ServletInputStream JavaDoc getInputStream() throws IOException JavaDoc {
621             throw new UnsupportedOperationException JavaDoc();
622         }
623
624         /**
625          * Throws UnsupportedOperationException.
626          * @see javax.servlet.ServletRequest#getParameterNames()
627          */

628         public Enumeration JavaDoc getParameterNames() {
629             throw new UnsupportedOperationException JavaDoc();
630         }
631
632         /**
633          * Throws UnsupportedOperationException.
634          * @see javax.servlet.ServletRequest#getParameterValues(java.lang.String)
635          */

636         public String JavaDoc[] getParameterValues(String JavaDoc s) {
637             throw new UnsupportedOperationException JavaDoc();
638         }
639
640         /**
641          * Throws UnsupportedOperationException.
642          * @see javax.servlet.ServletRequest#getProtocol()
643          */

644         public String JavaDoc getProtocol() {
645             throw new UnsupportedOperationException JavaDoc();
646         }
647
648         /**
649          * Throws UnsupportedOperationException.
650          * @see javax.servlet.ServletRequest#getReader()
651          */

652         public BufferedReader JavaDoc getReader() throws IOException JavaDoc {
653             throw new UnsupportedOperationException JavaDoc();
654         }
655
656         /**
657          * Throws UnsupportedOperationException.
658          * @see javax.servlet.ServletRequest#getRemoteAddr()
659          */

660         public String JavaDoc getRemoteAddr() {
661             throw new UnsupportedOperationException JavaDoc();
662         }
663
664         /**
665          * Throws UnsupportedOperationException.
666          * @see javax.servlet.ServletRequest#getRemoteHost()
667          */

668         public String JavaDoc getRemoteHost() {
669             throw new UnsupportedOperationException JavaDoc();
670         }
671
672         /**
673          * Throws UnsupportedOperationException.
674          * @see javax.servlet.ServletRequest#setAttribute(java.lang.String, java.lang.Object)
675          */

676         public void setAttribute(String JavaDoc s, Object JavaDoc o) {
677             this.attributes.put(s, o);
678         }
679
680         /**
681          * Throws UnsupportedOperationException.
682          * @see javax.servlet.ServletRequest#removeAttribute(java.lang.String)
683          */

684         public void removeAttribute(String JavaDoc s) {
685             this.attributes.remove(s);
686         }
687
688         /**
689          * Throws UnsupportedOperationException.
690          * @see javax.servlet.ServletRequest#getLocale()
691          */

692         public Locale JavaDoc getLocale() {
693             throw new UnsupportedOperationException JavaDoc();
694         }
695
696         /**
697          * Throws UnsupportedOperationException.
698          * @see javax.servlet.ServletRequest#getLocales()
699          */

700         public Enumeration JavaDoc getLocales() {
701             throw new UnsupportedOperationException JavaDoc();
702         }
703
704         /**
705          * Throws UnsupportedOperationException.
706          * @see javax.servlet.ServletRequest#isSecure()
707          */

708         public boolean isSecure() {
709             throw new UnsupportedOperationException JavaDoc();
710         }
711
712         /**
713          * Throws UnsupportedOperationException.
714          * @see javax.servlet.ServletRequest#getRequestDispatcher(java.lang.String)
715          */

716         public RequestDispatcher JavaDoc getRequestDispatcher(String JavaDoc s) {
717             throw new UnsupportedOperationException JavaDoc();
718         }
719
720         /**
721          * Throws UnsupportedOperationException.
722          * @see javax.servlet.ServletRequest#getRealPath(java.lang.String)
723          */

724         public String JavaDoc getRealPath(String JavaDoc s) {
725             throw new UnsupportedOperationException JavaDoc();
726         }
727
728         /**
729          * Throws UnsupportedOperationException.
730          * @see javax.servlet.ServletRequest#getRemotePort()
731          */

732         public int getRemotePort() {
733             throw new UnsupportedOperationException JavaDoc();
734         }
735
736         /**
737          * Throws UnsupportedOperationException.
738          * @see javax.servlet.ServletRequest#getLocalName()
739          */

740         public String JavaDoc getLocalName() {
741             throw new UnsupportedOperationException JavaDoc();
742         }
743
744         /**
745          * Throws UnsupportedOperationException.
746          * @see javax.servlet.ServletRequest#getLocalAddr()
747          */

748         public String JavaDoc getLocalAddr() {
749             throw new UnsupportedOperationException JavaDoc();
750         }
751
752         /**
753          * Throws UnsupportedOperationException.
754          * @see javax.servlet.ServletRequest#getLocalPort()
755          */

756         public int getLocalPort() {
757             throw new UnsupportedOperationException JavaDoc();
758         }
759
760     }
761
762 }
763
Popular Tags