groovlet - hiding .groovy extension with

View: New views
3 Messages — Rating Filter:   Alert me  

groovlet - hiding .groovy extension with

by Sector7B :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi, i have an example groovlet working at /joe.groovy

however id like to map it to /joe in web.xml

I tried a bunch of different ways with now luck.
Is it possible?  If so can someone reply with a snippit?

WEB-INF/groovy/joe.groovy

<servlet>
        <servlet-name>joe</servlet-name>
<!--It can never find this class, no matter what i try.-->
   
        <servlet-class>/groovy/joe.groovy</servlet-class> 
    </servlet>
    <servlet-mapping>
        <servlet-name>joe</servlet-name>
        <url-pattern>/groov</url-pattern>
    </servlet-mapping>

I've tried putting in com.blah with classs com.joe.groovy.joe.groovy too.

thanks,



Re: groovlet - hiding .groovy extension with

by Guillaume Laforge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Joe,

On the Gaelyk website, I've given some example's of Groovy Servlets'
url pattern matching replacement system:
http://gaelyk.appspot.com/tutorial/

Basically, if you have a look at the JavaDoc of the
AbstractHttpServlet, it's mentioned there too:
http://groovy.codehaus.org/api/groovy/servlet/AbstractHttpServlet.html

But the first link gives some more examples and concrete usage of that
regex replacement stuff.

Guillaume


On Thu, Oct 22, 2009 at 06:23, Joe Greenawalt <joe.greenawalt@...> wrote:

> hi, i have an example groovlet working at /joe.groovy
>
> however id like to map it to /joe in web.xml
>
> I tried a bunch of different ways with now luck.
> Is it possible?  If so can someone reply with a snippit?
>
> WEB-INF/groovy/joe.groovy
>
>> <servlet>
>>         <servlet-name>joe</servlet-name>
>> <!--It can never find this class, no matter what i try.-->
>>
>>         <servlet-class>/groovy/joe.groovy</servlet-class>
>>     </servlet>
>>     <servlet-mapping>
>>         <servlet-name>joe</servlet-name>
>>         <url-pattern>/groov</url-pattern>
>>     </servlet-mapping>
>
> I've tried putting in com.blah with classs com.joe.groovy.joe.groovy too.
>
> thanks,
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: groovlet - hiding .groovy extension with

by Sector7B :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

great info, thanks much!
joe

On Mon, Nov 2, 2009 at 11:39 AM, Guillaume Laforge <glaforge@...> wrote:
Hi Joe,

On the Gaelyk website, I've given some example's of Groovy Servlets'
url pattern matching replacement system:
http://gaelyk.appspot.com/tutorial/

Basically, if you have a look at the JavaDoc of the
AbstractHttpServlet, it's mentioned there too:
http://groovy.codehaus.org/api/groovy/servlet/AbstractHttpServlet.html

But the first link gives some more examples and concrete usage of that
regex replacement stuff.

Guillaume


On Thu, Oct 22, 2009 at 06:23, Joe Greenawalt <joe.greenawalt@...> wrote:
> hi, i have an example groovlet working at /joe.groovy
>
> however id like to map it to /joe in web.xml
>
> I tried a bunch of different ways with now luck.
> Is it possible?  If so can someone reply with a snippit?
>
> WEB-INF/groovy/joe.groovy
>
>> <servlet>
>>         <servlet-name>joe</servlet-name>
>> <!--It can never find this class, no matter what i try.-->
>>
>>         <servlet-class>/groovy/joe.groovy</servlet-class>
>>     </servlet>
>>     <servlet-mapping>
>>         <servlet-name>joe</servlet-name>
>>         <url-pattern>/groov</url-pattern>
>>     </servlet-mapping>
>
> I've tried putting in com.blah with classs com.joe.groovy.joe.groovy too.
>
> thanks,
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email