Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Name

Embedded JSP Plugin

Publisher

Apache Software Foundation

License

Open Source (ASL2)

Version

not released (Struts sandbox)

Homepage

this is it

Wiki Markup
{rate:title=Rating|theme=dynamic}

The Embedded JSP plugin

Excerpt

allows you to use JSPs from the classpath (from jar files)

.

...

Code Block
XML
XML
 <package name="example" namespace="/example" extends="jspembeddedjsp-default">
     <action name="HelloWorld" class="example.HelloWorld">
         <result type="embeddedJsp">org/myexample/jsps/Hello.jsp</result>
     </action>
 </package>

...

Code Block
xml
xml
<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-jsp-plugin</artifactId>
    <version>2.1.8-SNAPSHOT</version>
</dependency>

To use the embeddedJSP result you can either extend the embeddedjsp-default package or define the result in your package:

Code Block
xml
xml

<package ...>
     <result-types>
          <result-type name="embeddedJsp" class="org.apache.struts2.EmbeddedJSPResult"/>
     </result-types>
</package>