Umm

I like the sound of that. I haven't thought it through fully yet so there could be some glitch i've missed. just to complement the suggestion (other than having an ant task the fire everything up) you could have xdoclet comments to generate your web.xml

<%
/**
 *
 * @web.servlet
 *     name="FooTile"
 *     display-name="FooTile"
 *     description="My tile"
 *     load-on-startup="3"
 *
 * @web.servlet-mapping
 *     url-pattern="/tiles/FooTile"
 */
%>

Something still doesn't smell right though, tiles-defs? and maybe struts config? Perhaps have the a tile attribute in your definition of type page that calls the servlet mapping.

<put name="body" value="/tiles/FooTile" type="page" />

Okay.. so that theory seems okay. what about tiles with forms?

what about the form paths? and then mapping those in struts config to tiles defs (by way of forwards, assuming thats the way one would want to do things). and the additional problem of multiple forms on one page?

I'll ponder some more..


On 18 Feb 2004, at 15:47, Carl Walker wrote:


Compile the tiles into .java files, compile these files into .class files
and jar them up. You'll need to add servlet mappings to every webapp's
web.xml, though.


Here's the test JSP I'm working with (called myjsp.jsp).

<%@ page session="false" %>
<%@ page import="java.util.Date" %>

<html>
<body>
<h1>Hi, the date is <%= new Date() %></h1>
</body>
</html>

The directory structure I have is
./classes/
./jsp/
./jsp/myjsp.jsp
./src

The command to precompile the JSP
$ jspc.sh -d src/com/yourpackage -p com.yourpackage -uriroot jsp -webxml
web.xml jsp/myjsp.jsp


The directory structure is now
./classes
./jsp/myjsp.jsp
./src/com/yourpackage/myjsp_jsp.java

Then run this...
$ $ javac -classpath
$CATALINA_HOME/common/lib/servlet.jar:$CATALINA_HOME/common/lib/ jasper-runtime.jar
\^J-d classes src/com/yourpackage/myjsp_jsp.java


"Raymaker, Dora" wrote:

Hello, I am wondering if tiles can be put in a jar so that they become
accessible to multiple struts applications.  Any information would be
much appreciated!



Thanks,



Dora Raymaker

Sr. Technical Writer

XO Communications, Interactive Division

503.972.6808

[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to