Java Doc for SecureLinkTool.java in  » Template-Engine » Velocity » org » apache » velocity » tools » struts » 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 » Template Engine » Velocity » org.apache.velocity.tools.struts 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.velocity.tools.view.tools.LinkTool
      org.apache.velocity.tools.struts.SecureLinkTool

SecureLinkTool
public class SecureLinkTool extends LinkTool (Code)
Tool to be able to use Struts SSL Extensions with Velocity.

It has the same interface as StrutsLinkTool and can function as a substitute if Struts 1.x and SSL Ext are installed.

Usage:

 Template example:
 <!-- Use just like a regular StrutsLinkTool -->
 $link.action.nameOfAction
 $link.action.nameOfForward
 If the action or forward is marked as secure, or not,
 in your struts-config then the link will be rendered
 with https or http accordingly.
 Toolbox configuration:
 <tool>
 <key>link</key>
 <scope>request</scope>
 <class>org.apache.velocity.tools.struts.SecureLinkTool</class>
 </tool>
 


since:
   VelocityTools 1.1
author:
   Marino A. Jonsson
version:
   $Revision: 487322 $ $Date: 2006-12-14 11:49:10 -0800 (Thu, 14 Dec 2006) $




Method Summary
public  StringcomputeURL(HttpServletRequest request, ServletContext app, String link)
     Compute a hyperlink URL based on the specified action link.
public  SecureLinkToolsetAction(String action)
    

Returns a copy of the link with the given action name converted into a server-relative URI reference.

public  SecureLinkToolsetForward(String forward)
    

Returns a copy of the link with the given global forward name converted into a server-relative URI reference.

public  StringtoEncoded(String url, String sessionId)
     Return the specified URL with the specified session identifier suitably encoded.



Method Detail
computeURL
public String computeURL(HttpServletRequest request, ServletContext app, String link)(Code)
Compute a hyperlink URL based on the specified action link. The returned URL will have already been passed to response.encodeURL() for adding a session identifier.
Parameters:
  request - the current request.
Parameters:
  app - the current ServletContext.
Parameters:
  link - the action that is to be converted to a hyperlink URL the computed hyperlink URL



setAction
public SecureLinkTool setAction(String action)(Code)

Returns a copy of the link with the given action name converted into a server-relative URI reference. This method does not check if the specified action really is defined. This method will overwrite any previous URI reference settings but will copy the query string.


Parameters:
  action - an action path as defined in struts-config.xml a new instance of StrutsLinkTool



setForward
public SecureLinkTool setForward(String forward)(Code)

Returns a copy of the link with the given global forward name converted into a server-relative URI reference. If the parameter does not map to an existing global forward name, null is returned. This method will overwrite any previous URI reference settings but will copy the query string.


Parameters:
  forward - a global forward name as defined in struts-config.xml a new instance of StrutsLinkTool



toEncoded
public String toEncoded(String url, String sessionId)(Code)
Return the specified URL with the specified session identifier suitably encoded.
Parameters:
  url - URL to be encoded with the session id
Parameters:
  sessionId - Session id to be included in the encoded URL the specified URL with the specified session identifier suitably encoded



Fields inherited from org.apache.velocity.tools.view.tools.LinkTool
final public static String HTML_QUERY_DELIMITER(Code)(Java Doc)
final protected static Log LOG(Code)(Java Doc)
final public static String SELF_ABSOLUTE_KEY(Code)(Java Doc)
final public static String SELF_INCLUDE_PARAMETERS_KEY(Code)(Java Doc)
final public static String XHTML_QUERY_DELIMITER(Code)(Java Doc)
protected ServletContext application(Code)(Java Doc)
protected HttpServletRequest request(Code)(Java Doc)
protected HttpServletResponse response(Code)(Java Doc)

Methods inherited from org.apache.velocity.tools.view.tools.LinkTool
public LinkTool absolute(String uri)(Code)(Java Doc)
public LinkTool addQueryData(String key, Object value)(Code)(Java Doc)
public LinkTool addQueryData(Map parameters)(Code)(Java Doc)
public LinkTool anchor(String anchor)(Code)(Java Doc)
public void configure(Map params)(Code)(Java Doc)
protected LinkTool copyWith(QueryPair pair)(Code)(Java Doc)
protected LinkTool copyWith(Map newQueryData)(Code)(Java Doc)
protected LinkTool copyWith(String uri)(Code)(Java Doc)
protected LinkTool copyWithAnchor(String anchor)(Code)(Java Doc)
protected LinkTool duplicate()(Code)(Java Doc)
public String encodeURL(String url)(Code)(Java Doc)
public String getAnchor()(Code)(Java Doc)
public String getBaseRef()(Code)(Java Doc)
public String getContextPath()(Code)(Java Doc)
public String getContextURL()(Code)(Java Doc)
public String getParams()(Code)(Java Doc)
public String getQueryData()(Code)(Java Doc)
public String getRequestPath()(Code)(Java Doc)
public LinkTool getSelf()(Code)(Java Doc)
public String getURI()(Code)(Java Doc)
public String getUri()(Code)(Java Doc)
public void init(Object obj)(Code)(Java Doc)
public LinkTool param(Object key, Object value)(Code)(Java Doc)
public LinkTool params(Map parameters)(Code)(Java Doc)
public LinkTool relative(String uri)(Code)(Java Doc)
public LinkTool setAbsolute(String uri)(Code)(Java Doc)
public LinkTool setAnchor(String anchor)(Code)(Java Doc)
public LinkTool setRelative(String uri)(Code)(Java Doc)
protected void setSelfAbsolute(boolean selfAbsolute)(Code)(Java Doc)
protected void setSelfIncludeParameters(boolean selfParams)(Code)(Java Doc)
public LinkTool setURI(String uri)(Code)(Java Doc)
protected void setXhtml(boolean useXhtml)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public LinkTool uri(String uri)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.