You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tommy Pham <to...@yahoo.com> on 2009/09/03 15:27:04 UTC

possible bug in v2.1.6 ??

Hi,

I think I may have found a bug.  Here's the problem I've encountered.  The final UI is based on this:

<html>
<head>
<!-- js & css -->
</head>
<body id="colsHdrFtr">
<div id="header"></div>
<div id="leftSidebar"></div>
<div id="rightSidebar"></div>
<div id="mainContent"></div>
<div id="footer"></div>
</body>
</html>

I'm currently testing both jquery & spry frameworks for ajax.  If the source is all in one page, every thing works including the struts tags, specifically <s:url />.  However, if I put each section in it's own jspf file, the struts tags break.  Here's my usage:

main.jsp:

<html>
<head>
<jsp:include page="head.jspf" />
</head>
<body id="colsHdrFtr">
<jsp:include page="header.jspf" />
<jsp:include page="leftSidebar.jspf" />
<jsp:include page="rightSidebar.jspf />
<div id="mainContent"></div>
<jsp:include page="footer.jspf" />
</body>
</html>

I also tried using <%@ include /> directive also with the same undesirable results.  I've included the <%@ taglib /> for any page that uses the struts tag(s).  The undesired results, when I use <a href="<s:url value="/myPath" />">test</a>,  I see this in the final UI (web page source code) which gives action not mapped 404 error:

http://localhost:8090/recipes/%3Cs:url%20value=

The expected & desired result is http://localhost:8090/recipes/myPath

recipes is my app context.  Has anyone seen this problem before?  This works just fine in Servlet+JSP+JSTL1.2+Hibernate with either <jsp:include /> or <%@include %>.

TIA,
Tommy

PS: Dev environment is Win08 x64, JDK 1.6u14 x64, TC6.0.20, Struts 2.1.6, Hibernate 3.3.2.GA.  Both jquery (1.3.2 and jquery ui 1.7.2) & spry (1.6.1)  are on the same page.  (Spry has something I like and jquery has the other parts I like better).


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


Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
----- Original Message ----
> From: Zoran Avtarovski <zo...@sparecreative.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Friday, September 4, 2009 3:29:27 AM
> Subject: Re: possible bug in v2.1.6 ??
> 
> For what it¹s worth I was getting some strange results with included jspfs.
> In my case it was the freemarker encoding that was getting screwed up.
> 
> What I found was if I included the <%@ page
> contentType="text/html;charset=UTF-8" language="java" %> tag at the head of
> my .jspf files it worked fine.
> 
> I don¹t know if it was a tomcat or struts issue but I know that now all our
> .jspf files include the tag. And we haven¹t seen the problem again.
> 
> Z.
> 

Hi Zoran,

Thanks for the reply.  I do have that page directive in all jsp and jspf files.  When
everything is the same except the library being used JSTL vs Struts, using 
<c:url /> instead of <s:url />, JSTL works and Struts doesn't :( with the jspf file
extension.  I'll use the work around hinted by Wes.

Regards,
Tommy

> > 
> > On Thu, Sep 3, 2009 at 10:35 AM, Tommy Phamwrote:
> >> >
> >> > Hi Wes,
> >> >
> >> > Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev
> >> system?  I'd would agree with you if it fails with just the basics.
> >> >
> >> > Thanks,
> >> > Tommy
> >> >
> > 
> > To be honest I don't know, my guess is that since the original request
> > comes in through the jsp servlet, it "just works" whereas the struts
> > filter catches the request and eventually dispatches to the JSP. I'm
> > sure if I read the spec and mapped this out as a use-case, there is
> > probably a logical reason, but I just figured that if you can rename
> > the fragments, then you are better off... Another thought, instead of
> > using fragments, have you thought about using tag files? I quit using
> > includes as soon as the .tag files became available.
> > 
> > -Wes


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


Re: possible bug in v2.1.6 ??

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
For what it¹s worth I was getting some strange results with included jspfs.
In my case it was the freemarker encoding that was getting screwed up.

What I found was if I included the <%@ page
contentType="text/html;charset=UTF-8" language="java" %> tag at the head of
my .jspf files it worked fine.

I don¹t know if it was a tomcat or struts issue but I know that now all our
.jspf files include the tag. And we haven¹t seen the problem again.

Z.

> 
> On Thu, Sep 3, 2009 at 10:35 AM, Tommy Pham<to...@yahoo.com> wrote:
>> >
>> > Hi Wes,
>> >
>> > Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev
>> system?  I'd would agree with you if it fails with just the basics.
>> >
>> > Thanks,
>> > Tommy
>> >
> 
> To be honest I don't know, my guess is that since the original request
> comes in through the jsp servlet, it "just works" whereas the struts
> filter catches the request and eventually dispatches to the JSP. I'm
> sure if I read the spec and mapped this out as a use-case, there is
> probably a logical reason, but I just figured that if you can rename
> the fragments, then you are better off... Another thought, instead of
> using fragments, have you thought about using tag files? I quit using
> includes as soon as the .tag files became available.
> 
> -Wes


Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
----- Original Message ----
> From: Dale Newfield <da...@newfield.org>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, September 3, 2009 1:01:43 PM
> Subject: Re: possible bug in v2.1.6 ??
> 
> I've never found a great reference for .tag files, but good examples are nearly 
> as good as documentation, so look at the examples you get in the base deployment 
> when you install tomcat.
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

Thanks again Dale.  I'll definitely look into via google.  I realized from the start that there 
a different ways (frameworks or not) to doing something similar in Java.  That's the beauty of it.
You choose what you want to use depending on your requirements.

Thanks,
Tommy


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


Re: possible bug in v2.1.6 ??

Posted by Dale Newfield <da...@newfield.org>.
I've never found a great reference for .tag files, but good examples are 
nearly as good as documentation, so look at the examples you get in the 
base deployment when you install tomcat.

-Dale

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


Re: possible bug in v2.1.6 ??

Posted by Dave Newton <ne...@yahoo.com>.
Tommy Pham wrote:
>>> http://onjava.com/pub/a/onjava/2004/05/12/jsp2part4.html
>>> -Dale
> 
> My apologies... getting blurry vision after reading for about 6+ hours .. hehe
> Thanks Dave for the reference.  I'll definitely look into it!

Dale ;)

Dave


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


Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
----- Original Message ----
> From: Wes Wannemacher <we...@wantii.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, September 3, 2009 11:02:58 AM
> Subject: Re: possible bug in v2.1.6 ??
> 
> Thanks for finding a good article for me Dale...
> 
> @Tommy, the article Dale links to (in fact the section of the article
> he links to) gives a good explanation of .tag files.
> 
> If you haven't used 'em, give them a try. I try not to get too excited
> over technical/programming stuff, but when these babies were
> introduced, I shrieked like a little girl (yeah... what of it?!)
> 
> -Wes
> 
> On Thu, Sep 3, 2009 at 1:45 PM, Dale Newfieldwrote:
> > Tommy Pham wrote:
> >>
> >> Wes Wannemacher  wrote:
> >>>
> >>> Another thought, instead of using fragments, have you thought about
> >>> using tag files? I quit using includes as soon as the .tag files
> >>> became available.
> >>
> >> I assume you mean Apache's Tiles?
> >
> > He does not.
> >
> > http://onjava.com/pub/a/onjava/2004/05/12/jsp2part4.html
> >
> > -Dale

My apologies... getting blurry vision after reading for about 6+ hours .. hehe
Thanks Dave for the reference.  I'll definitely look into it!

Best regards,
Tommy

> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Re: possible bug in v2.1.6 ??

Posted by Wes Wannemacher <we...@wantii.com>.
Thanks for finding a good article for me Dale...

@Tommy, the article Dale links to (in fact the section of the article
he links to) gives a good explanation of .tag files.

If you haven't used 'em, give them a try. I try not to get too excited
over technical/programming stuff, but when these babies were
introduced, I shrieked like a little girl (yeah... what of it?!)

-Wes

On Thu, Sep 3, 2009 at 1:45 PM, Dale Newfield<da...@newfield.org> wrote:
> Tommy Pham wrote:
>>
>> Wes Wannemacher <we...@wantii.com>  wrote:
>>>
>>> Another thought, instead of using fragments, have you thought about
>>> using tag files? I quit using includes as soon as the .tag files
>>> became available.
>>
>> I assume you mean Apache's Tiles?
>
> He does not.
>
> http://onjava.com/pub/a/onjava/2004/05/12/jsp2part4.html
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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


Re: possible bug in v2.1.6 ??

Posted by Dale Newfield <da...@newfield.org>.
Tommy Pham wrote:
> Wes Wannemacher <we...@wantii.com>  wrote:
>> Another thought, instead of using fragments, have you thought about
>> using tag files? I quit using includes as soon as the .tag files
>> became available.
>
> I assume you mean Apache's Tiles?

He does not.

http://onjava.com/pub/a/onjava/2004/05/12/jsp2part4.html

-Dale

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


Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
----- Original Message ----
> From: Wes Wannemacher <we...@wantii.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, September 3, 2009 7:58:47 AM
> Subject: Re: possible bug in v2.1.6 ??
> 
> On Thu, Sep 3, 2009 at 10:35 AM, Tommy Phamwrote:
> >
> > Hi Wes,
> >
> > Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev system? 
>  I'd would agree with you if it fails with just the basics.
> >
> > Thanks,
> > Tommy
> >
> 
> To be honest I don't know, my guess is that since the original request
> comes in through the jsp servlet, it "just works" whereas the struts
> filter catches the request and eventually dispatches to the JSP. I'm
> sure if I read the spec and mapped this out as a use-case, there is
> probably a logical reason, but I just figured that if you can rename
> the fragments, then you are better off... Another thought, instead of
> using fragments, have you thought about using tag files? I quit using
> includes as soon as the .tag files became available.
> 
> -Wes

Hi Wes,

I assume you mean Apache's Tiles?  I did look at earlier and follow the basic tutorial/guide for version 2.1.3.  My understanding is that the structure is not much more different than the includes.  With includes, I can later add more complexity (dynamically including/excluding sections) to my site navigation as I originally planned for but not yet implemented.  That said, I rather not add more complexity than I'd have to ATM.  This project of mine started with MVC Servlet+JSP.  I considered form validation methods, both client & server side, which how Struts come into play (no sense reinventing wheel :).  As for RIA, can't really be w/o AJAX that's where jQuery/Spry comes in.  I have looked & considered JSF 1.2 (both Apache's MyFaces and Sun's Visual JSF) too but didn't quite provide what I was looking for.  Also, there's memory usage consideration for added libraries where I may not needed it.  This is just my intro phase to java :D  Once I've
 understand more about Java itself, I'd like to work a on another much BIGGER project I have in mind. Using reporting, graphics, threads, etc...

Regards,
Tommy

> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Re: possible bug in v2.1.6 ??

Posted by Wes Wannemacher <we...@wantii.com>.
On Thu, Sep 3, 2009 at 10:35 AM, Tommy Pham<to...@yahoo.com> wrote:
>
> Hi Wes,
>
> Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev system?  I'd would agree with you if it fails with just the basics.
>
> Thanks,
> Tommy
>

To be honest I don't know, my guess is that since the original request
comes in through the jsp servlet, it "just works" whereas the struts
filter catches the request and eventually dispatches to the JSP. I'm
sure if I read the spec and mapped this out as a use-case, there is
probably a logical reason, but I just figured that if you can rename
the fragments, then you are better off... Another thought, instead of
using fragments, have you thought about using tag files? I quit using
includes as soon as the .tag files became available.

-Wes

-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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


Re: possible bug in v2.1.6 ??

Posted by Musachy Barroso <mu...@gmail.com>.
> Mutjinga's children

oh boy, those you don't want to mess with.

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


RE: possible bug in v2.1.6 ??

Posted by Martin Gainty <mg...@hotmail.com>.
you'll need to know the JSTL version supported if you use struts core tagliib 

http://en.wikipedia.org/wiki/Salem_witch_trials
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 3 Sep 2009 13:14:02 -0400
> Subject: Re: possible bug in v2.1.6 ??
> From: greg.lindholm@gmail.com
> To: user@struts.apache.org
> 
> On Thu, Sep 3, 2009 at 12:37 PM, Dave Newton <ne...@yahoo.com> wrote:
> 
> > Martin Gainty wrote:
> >
> >> this is c.tld (tag library descriptor for struts core taglib)
> >>
> >
> > What in the name of Mutjinga's children are you talking about? That's a
> > JSTL taglib, and completely unrelated to the issue with the Struts taglib,
> > JSPF files, or Tomcat.
> >
> > Dave
> >
> >
> >
> He's a witch, burn him!

_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

Re: possible bug in v2.1.6 ??

Posted by Greg Lindholm <gr...@gmail.com>.
On Thu, Sep 3, 2009 at 12:37 PM, Dave Newton <ne...@yahoo.com> wrote:

> Martin Gainty wrote:
>
>> this is c.tld (tag library descriptor for struts core taglib)
>>
>
> What in the name of Mutjinga's children are you talking about? That's a
> JSTL taglib, and completely unrelated to the issue with the Struts taglib,
> JSPF files, or Tomcat.
>
> Dave
>
>
>
He's a witch, burn him!

Re: possible bug in v2.1.6 ??

Posted by Dave Newton <ne...@yahoo.com>.
Martin Gainty wrote:
> this is c.tld (tag library descriptor for struts core taglib)

What in the name of Mutjinga's children are you talking about? That's a 
JSTL taglib, and completely unrelated to the issue with the Struts 
taglib, JSPF files, or Tomcat.

Dave


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


RE: possible bug in v2.1.6 ??

Posted by Martin Gainty <mg...@hotmail.com>.
this is c.tld (tag library descriptor for struts core taglib)



<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE taglib

  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"

  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

<taglib>

  <tlib-version>1.0</tlib-version>

  <jsp-version>1.2</jsp-version>

  <short-name>c</short-name>

  <uri>http://java.sun.com/jstl/core</uri>

  <display-name>JSTL core</display-name>

  <description>JSTL 1.0 core library</description>


which targets JSTL 1.0 (not JSTL 1.2)

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 3 Sep 2009 07:35:49 -0700
> From: tommyhp2@yahoo.com
> Subject: Re: possible bug in v2.1.6 ??
> To: user@struts.apache.org
> 
> ----- Original Message ----
> > From: Wes Wannemacher <we...@wantii.com>
> > To: Struts Users Mailing List <us...@struts.apache.org>
> > Sent: Thursday, September 3, 2009 7:18:06 AM
> > Subject: Re: possible bug in v2.1.6 ??
> > 
> > I'm pretty sure the problem is that by default tomcat only maps *.jsp
> > to the jsp servlet. You can try to setup an extra servlet mapping in
> > your web.xml, but if you can use .jsp instead of .jspf, you're
> > probably better off.
> > 
> > You are right, it is a convention to use .jspf (for JSP Fragment), but
> > it looks like Tomcat devs forgot about that one ;)
> > 
> > -Wes
> > 
> > 
> 
> Hi Wes,
> 
> Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev system?  I'd would agree with you if it fails with just the basics.
> 
> Thanks,
> Tommy
> 
> 
> > On Thu, Sep 3, 2009 at 9:58 AM, Tommy Phamwrote:
> > >
> > > Hi Wes,
> > >
> > > Thank you very much for fast response and solution to my problem (didn't think 
> > about trying with this).  Yes, changing from jspf to jsp works as desired.  Is 
> > my implementation wrong?  I remember reading somewhere (I can't remember where) 
> > that by convention, jsp fragments should be used with extension .jspf and placed 
> > inside /WEB-INF/jspf/*.jspf where my jspf files are located currently.
> > >
> > > Thanks,
> > > Tommy
> > 
> > 
> > -- 
> > Wes Wannemacher
> > 
> > Head Engineer, WanTii, Inc.
> > Need Training? Struts, Spring, Maven, Tomcat...
> > Ask me for a quote!
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009

Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
----- Original Message ----
> From: Wes Wannemacher <we...@wantii.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, September 3, 2009 7:18:06 AM
> Subject: Re: possible bug in v2.1.6 ??
> 
> I'm pretty sure the problem is that by default tomcat only maps *.jsp
> to the jsp servlet. You can try to setup an extra servlet mapping in
> your web.xml, but if you can use .jsp instead of .jspf, you're
> probably better off.
> 
> You are right, it is a convention to use .jspf (for JSP Fragment), but
> it looks like Tomcat devs forgot about that one ;)
> 
> -Wes
> 
> 

Hi Wes,

Why then does it work with Servlet+JSP+JSTL1.2 on the same exact dev system?  I'd would agree with you if it fails with just the basics.

Thanks,
Tommy


> On Thu, Sep 3, 2009 at 9:58 AM, Tommy Phamwrote:
> >
> > Hi Wes,
> >
> > Thank you very much for fast response and solution to my problem (didn't think 
> about trying with this).  Yes, changing from jspf to jsp works as desired.  Is 
> my implementation wrong?  I remember reading somewhere (I can't remember where) 
> that by convention, jsp fragments should be used with extension .jspf and placed 
> inside /WEB-INF/jspf/*.jspf where my jspf files are located currently.
> >
> > Thanks,
> > Tommy
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Re: possible bug in v2.1.6 ??

Posted by Wes Wannemacher <we...@wantii.com>.
I'm pretty sure the problem is that by default tomcat only maps *.jsp
to the jsp servlet. You can try to setup an extra servlet mapping in
your web.xml, but if you can use .jsp instead of .jspf, you're
probably better off.

You are right, it is a convention to use .jspf (for JSP Fragment), but
it looks like Tomcat devs forgot about that one ;)

-Wes


On Thu, Sep 3, 2009 at 9:58 AM, Tommy Pham<to...@yahoo.com> wrote:
>
> Hi Wes,
>
> Thank you very much for fast response and solution to my problem (didn't think about trying with this).  Yes, changing from jspf to jsp works as desired.  Is my implementation wrong?  I remember reading somewhere (I can't remember where) that by convention, jsp fragments should be used with extension .jspf and placed inside /WEB-INF/jspf/*.jspf where my jspf files are located currently.
>
> Thanks,
> Tommy


-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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


Re: possible bug in v2.1.6 ??

Posted by Tommy Pham <to...@yahoo.com>.
Hi Wes,

Thank you very much for fast response and solution to my problem (didn't think about trying with this).  Yes, changing from jspf to jsp works as desired.  Is my implementation wrong?  I remember reading somewhere (I can't remember where) that by convention, jsp fragments should be used with extension .jspf and placed inside /WEB-INF/jspf/*.jspf where my jspf files are located currently.

Thanks,
Tommy



----- Original Message ----
> From: Wes Wannemacher <we...@wantii.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, September 3, 2009 6:50:23 AM
> Subject: Re: possible bug in v2.1.6 ??
> 
> Just for troubleshooting purposes try to change the filename of the
> included file to .jsp instead of .jspf... I have a theory, but I want
> you to verify it first.
> 
> -Wes
> 
> On Thu, Sep 3, 2009 at 9:27 AM, Tommy Phamwrote:
> > Hi,
> >
> > I think I may have found a bug.  Here's the problem I've encountered.  The 
> final UI is based on this:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > I'm currently testing both jquery & spry frameworks for ajax.  If the source 
> is all in one page, every thing works including the struts tags, specifically 
> .  However, if I put each section in it's own jspf file, the struts 
> tags break.  Here's my usage:
> >
> > main.jsp:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > I also tried using <%@ include /> directive also with the same undesirable 
> results.  I've included the <%@ taglib /> for any page that uses the struts 
> tag(s).  The undesired results, when I use 
> />">test,  I see this in the final UI (web page source code) which gives 
> action not mapped 404 error:
> >
> > http://localhost:8090/recipes/%3Cs:url%20value=
> >
> > The expected & desired result is http://localhost:8090/recipes/myPath
> >
> > recipes is my app context.  Has anyone seen this problem before?  This works 
> just fine in Servlet+JSP+JSTL1.2+Hibernate with either or 
> <%@include %>.
> >
> > TIA,
> > Tommy
> >
> > PS: Dev environment is Win08 x64, JDK 1.6u14 x64, TC6.0.20, Struts 2.1.6, 
> Hibernate 3.3.2.GA.  Both jquery (1.3.2 and jquery ui 1.7.2) & spry (1.6.1)  are 
> on the same page.  (Spry has something I like and jquery has the other parts I 
> like better).
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Re: possible bug in v2.1.6 ??

Posted by Wes Wannemacher <we...@wantii.com>.
Just for troubleshooting purposes try to change the filename of the
included file to .jsp instead of .jspf... I have a theory, but I want
you to verify it first.

-Wes

On Thu, Sep 3, 2009 at 9:27 AM, Tommy Pham<to...@yahoo.com> wrote:
> Hi,
>
> I think I may have found a bug.  Here's the problem I've encountered.  The final UI is based on this:
>
> <html>
> <head>
> <!-- js & css -->
> </head>
> <body id="colsHdrFtr">
> <div id="header"></div>
> <div id="leftSidebar"></div>
> <div id="rightSidebar"></div>
> <div id="mainContent"></div>
> <div id="footer"></div>
> </body>
> </html>
>
> I'm currently testing both jquery & spry frameworks for ajax.  If the source is all in one page, every thing works including the struts tags, specifically <s:url />.  However, if I put each section in it's own jspf file, the struts tags break.  Here's my usage:
>
> main.jsp:
>
> <html>
> <head>
> <jsp:include page="head.jspf" />
> </head>
> <body id="colsHdrFtr">
> <jsp:include page="header.jspf" />
> <jsp:include page="leftSidebar.jspf" />
> <jsp:include page="rightSidebar.jspf />
> <div id="mainContent"></div>
> <jsp:include page="footer.jspf" />
> </body>
> </html>
>
> I also tried using <%@ include /> directive also with the same undesirable results.  I've included the <%@ taglib /> for any page that uses the struts tag(s).  The undesired results, when I use <a href="<s:url value="/myPath" />">test</a>,  I see this in the final UI (web page source code) which gives action not mapped 404 error:
>
> http://localhost:8090/recipes/%3Cs:url%20value=
>
> The expected & desired result is http://localhost:8090/recipes/myPath
>
> recipes is my app context.  Has anyone seen this problem before?  This works just fine in Servlet+JSP+JSTL1.2+Hibernate with either <jsp:include /> or <%@include %>.
>
> TIA,
> Tommy
>
> PS: Dev environment is Win08 x64, JDK 1.6u14 x64, TC6.0.20, Struts 2.1.6, Hibernate 3.3.2.GA.  Both jquery (1.3.2 and jquery ui 1.7.2) & spry (1.6.1)  are on the same page.  (Spry has something I like and jquery has the other parts I like better).
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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