You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Luca Passani <pa...@eunet.no> on 2005/07/19 16:20:32 UTC

Integrating Struts with my taglib

Hello,

I have developed a JSP tag-library to fix mark-ups on mobile phones (WALL).
Some people are using it with struts and they request that my anchor tag
<wall:a> integrates with Struts by being able to mimic the behavior of 
the struts
<html:link> tag:
http://struts.apache.org/userGuide/struts-html.html#link

question: where do I start?

right now I use my tag like this:

<wall:a href="url">Text</wall:a>

how do I integrate this so that I can do things like:

<wall:a href="/do/setUpEmployeeForm">Add An Employee</wall:a>

I'm ready to do my reading, but a few pointers in the right direction 
would definitely help.

Thanks

Luca



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Integrating Struts with my taglib

Posted by Luca Passani <pa...@eunet.no>.
Martin Cooper wrote:

>
>You probably want to look at the way the Struts tags are implemented,
>and especially the latest code in 'trunk'. The code you want has most
>likely already been extracted into the RequestUtils and TagUtils
>classes, outside the tags themselves.
>  
>
ok. Thanks. I'll post here the result of my effort once I am done.

Luca


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Datagrid and servlet 2.4

Posted by Lamine Ba <la...@hotmail.com>.
Hi all,

According to the apache forum,the Datagrid tglib (from sandbox) is not
compatible with servlet 2.4.  So, in order to use the taglib, I need to
modify the header of my web.xml .

FROM::

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
web-app_2_4.xsd"
    version="2.4" >

TO::

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">


This situation bothers me because I am using Struts.
Is there any wayto work around it?  Anybody knows if Jakarta has
provided a fix for this issue?

Thanks,
Lamine.

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Integrating Struts with my taglib

Posted by Martin Cooper <mf...@gmail.com>.
On 7/19/05, Luca Passani <pa...@eunet.no> wrote:
> Martin Cooper wrote:
> 
> >
> >Pointer 1 would be to ask about this on the Struts lists rather than
> >the Taglibs lists, since the Struts taglibs are part of, uh, Struts,
> >not Taglibs. ;-)
> >
> >
> you are right of course. It's just that I knew that you (one of the
> major authors behind the Struts taglibs)
> are on this list too :)

Um, I'm also on the Struts lists, believe it or not... ;-)

> >Pointer 2 would be to create your tag by extending the Struts
> ><html:link> tag. See:
> >
> >http://struts.apache.org/userGuide/struts-html.html#link
> >
> >
> this does not really apply, I am afraid. WALL is for creating apps for
> mobile devices,
> i.e. multiserving WML, XHTML-MP and CHTML to mobile devices, i.e. not HTML.
> 
> http://wurfl.sourceforge.net/java/tutorial.php
> 
> Please note that <wall:a href="url"> could turn into an hyperlink for
> some devices and
> into an <option onpick="url"> for other (WML) devices.
> There is no point for me requiring that WALL users install Struts.The to
> things are independent.
> What I really want is to mimic in my tag what html:link does behind the
> scenes to turn the link to an action
> into an actual link.

You probably want to look at the way the Struts tags are implemented,
and especially the latest code in 'trunk'. The code you want has most
likely already been extracted into the RequestUtils and TagUtils
classes, outside the tags themselves.

--
Martin Cooper


> Thanks
> 
> Luca
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Integrating Struts with my taglib

Posted by Luca Passani <pa...@eunet.no>.
Martin Cooper wrote:

>
>Pointer 1 would be to ask about this on the Struts lists rather than
>the Taglibs lists, since the Struts taglibs are part of, uh, Struts,
>not Taglibs. ;-)
>  
>
you are right of course. It's just that I knew that you (one of the 
major authors behind the Struts taglibs)
are on this list too :)

>Pointer 2 would be to create your tag by extending the Struts
><html:link> tag. See:
>
>http://struts.apache.org/userGuide/struts-html.html#link
>  
>
this does not really apply, I am afraid. WALL is for creating apps for 
mobile devices,
i.e. multiserving WML, XHTML-MP and CHTML to mobile devices, i.e. not HTML.

http://wurfl.sourceforge.net/java/tutorial.php

Please note that <wall:a href="url"> could turn into an hyperlink for 
some devices and
into an <option onpick="url"> for other (WML) devices.
There is no point for me requiring that WALL users install Struts.The to 
things are independent.
What I really want is to mimic in my tag what html:link does behind the 
scenes to turn the link to an action
into an actual link.

Thanks

Luca





---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Integrating Struts with my taglib

Posted by Martin Cooper <mf...@gmail.com>.
On 7/19/05, Luca Passani <pa...@eunet.no> wrote:
> 
> Hello,
> 
> I have developed a JSP tag-library to fix mark-ups on mobile phones (WALL).
> Some people are using it with struts and they request that my anchor tag
> <wall:a> integrates with Struts by being able to mimic the behavior of
> the struts
> <html:link> tag:
> http://struts.apache.org/userGuide/struts-html.html#link
> 
> question: where do I start?
> 
> right now I use my tag like this:
> 
> <wall:a href="url">Text</wall:a>
> 
> how do I integrate this so that I can do things like:
> 
> <wall:a href="/do/setUpEmployeeForm">Add An Employee</wall:a>
> 
> I'm ready to do my reading, but a few pointers in the right direction
> would definitely help.

Pointer 1 would be to ask about this on the Struts lists rather than
the Taglibs lists, since the Struts taglibs are part of, uh, Struts,
not Taglibs. ;-)

Pointer 2 would be to create your tag by extending the Struts
<html:link> tag. See:

http://struts.apache.org/userGuide/struts-html.html#link

--
Martin Cooper


> Thanks
> 
> Luca
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org