Java Doc for BaseSampleServlet.java in  » J2EE » JOnAS-4.8.6 » emb » sample » servlet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » emb.sample.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServlet
   emb.sample.servlet.BaseSampleServlet

All known Subclasses:   emb.sample.servlet.ListSampleMedia,  emb.sample.servlet.ConvertSampleImageChained,  emb.sample.servlet.ConvertSampleVideoToMpegTs,  emb.sample.servlet.ConvertSampleVideoToMpeg,  emb.sample.servlet.ConvertSampleImageHalfSize,  emb.sample.servlet.ConvertSampleImageOverlayed,  emb.sample.servlet.ExtractHeaderData,  emb.sample.servlet.ConvertSampleImageBW,  emb.sample.servlet.ConvertSampleVideoTo3GPP,  emb.sample.servlet.RetrieveSampleMedia,  emb.sample.servlet.ConvertSampleImageFormat,  emb.sample.servlet.ConvertSampleImageSvgToPng,  emb.sample.servlet.ConvertSampleImageFrame,  emb.sample.servlet.UploadSampleMedia,  emb.sample.servlet.ActionDispatcher,  emb.sample.servlet.HomeSample,  emb.sample.servlet.LoadSampleMedia,
BaseSampleServlet
public class BaseSampleServlet extends HttpServlet (Code)
Base classes for all sample
author:
   Brice Ruzand

Inner Class :protected class StringPrinter implements Serializable

Field Summary
final protected static  StringACTION_DISPATCHER_SERVLET
    
final public static  doubleBYTE_IN_KB
    
final protected static  RandomRANDOM
    
final protected static  StringRETRIEVE_SERVLET
    
final public static  DecimalFormatSIZE_FORMAT
    
final protected static  StringTEMPLATE_JSP
    
final public static  SimpleDateFormatTIME_STAMP_FORMAT
    


Method Summary
protected  voiddisplayInfo(StringPrinter sp, MediaEntityLocal meb)
    
protected static  voiderrorLog(String msg)
     Method to print error messages to stderr and for syschronisation purpose to stdout too.
protected  voidexceptionHandler(Throwable exception, Class errorClass, HttpServletRequest request, HttpServletResponse response)
     Method to handle all exceptions of all Music Application Servlets in a uniform way using the specified error JSP (/jps/templatePage.jsp).
protected static  MediaEntityLocalHomegetMebHome()
    
protected static  MediaSampleSessionLocalgetSession(HttpServletRequest request)
    
protected static  MediaSampleSessionLocalHomegetSessionHome()
    

Field Detail
ACTION_DISPATCHER_SERVLET
final protected static String ACTION_DISPATCHER_SERVLET(Code)
Retrive servlet URI



BYTE_IN_KB
final public static double BYTE_IN_KB(Code)
tranforme Byte in KB



RANDOM
final protected static Random RANDOM(Code)
Random seed



RETRIEVE_SERVLET
final protected static String RETRIEVE_SERVLET(Code)
Retrive servlet URI



SIZE_FORMAT
final public static DecimalFormat SIZE_FORMAT(Code)
Default format for size



TEMPLATE_JSP
final protected static String TEMPLATE_JSP(Code)
template jsp URI



TIME_STAMP_FORMAT
final public static SimpleDateFormat TIME_STAMP_FORMAT(Code)
Default format for time stamp





Method Detail
displayInfo
protected void displayInfo(StringPrinter sp, MediaEntityLocal meb)(Code)
Display medi info in XHTML
Parameters:
  sp - StringPrinter
Parameters:
  meb - The media entity



errorLog
protected static void errorLog(String msg)(Code)
Method to print error messages to stderr and for syschronisation purpose to stdout too.
Parameters:
  msg - java.lang.String



exceptionHandler
protected void exceptionHandler(Throwable exception, Class errorClass, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)
Method to handle all exceptions of all Music Application Servlets in a uniform way using the specified error JSP (/jps/templatePage.jsp).

In case of error a ServletException will be thrown.
Parameters:
  exception - java.lang.Exception
Parameters:
  errorClass - class where the error locate
Parameters:
  request - com.sun.server.http.HttpServletRequest
Parameters:
  response - com.sun.server.http.HttpServletResponse
throws:
  ServletException - This exception will be thrown if theerrorhandling fails




getMebHome
protected static MediaEntityLocalHome getMebHome() throws NamingException(Code)
Provide a cached Home access MediaEntityLocalHome
throws:
  NamingException - in case MediaEntityLocalHome is not found



getSession
protected static MediaSampleSessionLocal getSession(HttpServletRequest request) throws MediaSampleException(Code)
Get a session bean to manage Media creation
Parameters:
  request - the HttpServlet request the MediaSampleSessionLocal
throws:
  MediaSampleException - if session cannot be created



getSessionHome
protected static MediaSampleSessionLocalHome getSessionHome() throws NamingException(Code)
Provide a cached Home access MediaEntityLocalHome
throws:
  NamingException - in case MediaEntityLocalHome is not found



Methods inherited from javax.servlet.http.HttpServlet
protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected long getLastModified(HttpServletRequest req)(Code)(Java Doc)
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.