You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antony Stace <s4...@yahoo.com> on 2002/02/15 06:27:36 UTC

Using tag around tag. Is it legal?

Hi Ladies and Gentlemen

I want to use <logic:equals> tags around a <html:form action> but I am having
errors.  I am not sure if this is allowed in struts.  Can someone please confirmthat this is not or is allowed in struts.

The code I have is

--------------------------snip----------------------------

<logic:equal name="testPageBean" property="typeOfProcess" value="add">
<html:form action="/addUser" focus="username">
</logic:equal>
<logic:equal name="testPageBean" property="typeOfProcess" value="modify">
<html:form action="/modifyUser" focus="username">
</logic:equal>
....rest of form definition

--------------------------snip-----------------------------

The error I am getting is

org.apache.jasper.compiler.ParseException: /WEB-INF/pages/clientDetails.jsp(21,0) ??????????????: ???? &lt;/logic:equal&gt; ???????????????????
	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)
	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
	at org.apache.jasper.compiler.Parser.parse(Parser.java)



-- 


Cheers

Tony。
---------------------------------------------------------------------


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Log4J - Log file gets overwritten

Posted by Praveer Mathur <pr...@delhi.tcs.co.in>.
Hi !

I am using Log4J version 1.1.3 downloaded from jakarta.apache.org.
Everything seems to be working fine with it except that even if i set

log4j.appender.R.MaxFileSize = 100KB
log4j.appender.R.MaxBackupIndex = 10

I get only one log file and when it rolls over the 100K limit, it gets
overwritten.

According to documentation on the site, it should rename the old copy and
start with a new file with the same name.

Has anybody faced this problem before?Any solution?

Regards,
Praveer



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Antony Stace <s4...@yahoo.com>.
Hi Patrick

Thanks for all your help Patrick, I really appreciate it.  
Seeing your email made me try the code again, I am not sure why but when
I tryed the example lines this morning, I got and error.  Maybe I changed
something else somewhere.  If I have in my jsp code the following  

<logic:equal name="pageBean" property="typeOfProcess" value="new">
<bean:define id="formAction" value="processNewClient" />
<H1>NEW</H1>
</logic:equal>

<logic:equal name="pageBean" property="typeOfProcess" value="edit">
<bean:define id="formAction" value="processExistingClient" />
<H1>EDIT</H1>
</logic:equal>

<bean:define id="formAction" value="processExistingClient" />  -(1)
<html:form action='<%=formAction%>' focus="username">


with the line (1) in then the code works.  However,  if I do not have the
line (1) in then I get an error which I have put at the bottom of this
email.  I can verify that the code goes into the <logic:equals> sections
since when I run the code with line (1) in it then <H1>EDIT</H1> is displayed.

Any ideas?

Cheers

Tony

---------------snip start error message--------------------------
2002-02-20 17:01:46 action:  Validating input form properties
2002-02-20 17:01:46 action:  Looking for Action instance for class ClientEditAction
2002-02-20 17:01:53 ApplicationDispatcher[/sturdy] ?????? jsp ?Servlet.service()?????????
org.apache.jasper.JasperException: JSP????????????????: sun.tools.javac.Main ?????????


JSP????: /WEB-INF/pages/clientDetails.jsp ????: 32???????????

?????????????????:
/var/tomcat4/work/localhost/sturdy/WEB-INF/pages/clientDetails$jsp.java:1182: formAction ??????????
    _jspx_th_html_form_0.setAction(formAction);
                                   ^
??? 1 ?, ?? 1 ?

	at org.apache.jasper.compiler.Compiler.compile(Compiler.java)
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java)

----------------snip end error message----------------------

On Wed, 20 Feb 2002 08:32:35 +0100
Patrick Refondini <pa...@jpnet.ch> wrote:



> I have copy pasted your lines :
> 
> <bean:define id="formAction" value="/test" />
> <%=formAction%><br />
> <%= 1+1 %><br />
> <bean:write name="formAction" filter="true" /><br />
> 
> and I obtain the expected output:
> 
> /test
> 2
> /test
> 
> The error must come from elsewhere.
> What error do you obtain ?
> 
> Patrick
> 
> 
> 
> 
> 
> Antony Stace wrote:
> 
> >Thank you very much for your reply Patrick.
> >
> >I got an error with the <%=formAction%> line.  As test I tried
> >
> ><bean:define id="formAction" value="/test" />
> ><%=formAction%>
> >
> >in my jsp page, I always get an error, it is strange since
> >
> ><%= 1+1 %>   and
> ><bean:write name="formAction" filter="true" />
> >
> >works fine.  Any ideas why
> >
> ><%=formAction%>
> >
> >is giving an error?
> >
> >Cheers
> >
> >Tony
> >
> >
> >
> >
> >On Tue, 19 Feb 2002 12:05:27 +0100
> >Patrick Refondini <pa...@jpnet.ch> wrote:
> >
> >>the wrong syntax seems to come from my previous quick and dirty answer :(
> >>
> >>Problems:
> >>1. bean:define value must not be define as body content but as value 
> >>attribute.
> >>2. forget about action='<bean:write name="formAction">'  it compiles but 
> >>the bean:write tag is not interpreted so at runtime the action looked 
> >>for is <bean:write name="formAction">
> >>
> >>This time I tested the following code sample, it works :)
> >>
> >>    <bean:define id="formAction" value="/test" />
> >>
> >>    <html:form action='<%=formAction%>' >
> >>      (...)
> >>    </html:form>
> >>
> >>Hereafter corrections regarding your example
> >>
> >>Antony Stace wrote:
> >>
> >>>Hi 
> >>>
> >>>Can someone please give me the syntax for defining the action using the contents of
> >>>formAction in the <html:form> line.
> >>>
> >>>><bean:define id="formAction" >defaultAction</bean:define>
> >>>>
> >>should become 
> >><bean:define id="formAction" value="defaultAction" />
> >>
> >>
> >>>>
> >>>><logic:equal name="testPageBean" property="typeOfProcess" value="add">
> >>>><bean:define id="formAction" >/addUser</bean:define>
> >>>>
> >><bean:define id="formAction" value="/addUser" />
> >>
> >>
> >>>></logic:equal>
> >>>>
> >>>><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
> >>>><bean:define id="formAction" >/modifyUser</bean:define>
> >>>>
> >><bean:define id="formAction" value="/modifyUser"/>
> >>
> >>>></logic:equal>
> >>>>
> >>>>
> >>>><html:form action='<bean:write name="formAction">' focus="username">
> >>>>or 
> >>>><html:form action='<%=formAction%>' focus="username">
> >>>>
> >>This one should work 
> >>
> >><html:form action='<%=formAction%>' focus="username">
> >>
> >>
> >>I hope this time your problem is solved ...
> >>
> >>Patrick
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >>For additional commands, e-mail: <ma...@jakarta.apache.org>
> >>
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 


Cheers

Tony。
---------------------------------------------------------------------


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Patrick Refondini <pa...@jpnet.ch>.
I have copy pasted your lines :

<bean:define id="formAction" value="/test" />
<%=formAction%><br />
<%= 1+1 %><br />
<bean:write name="formAction" filter="true" /><br />

and I obtain the expected output:

/test
2
/test

The error must come from elsewhere.
What error do you obtain ?

Patrick





Antony Stace wrote:

>Thank you very much for your reply Patrick.
>
>I got an error with the <%=formAction%> line.  As test I tried
>
><bean:define id="formAction" value="/test" />
><%=formAction%>
>
>in my jsp page, I always get an error, it is strange since
>
><%= 1+1 %>   and
><bean:write name="formAction" filter="true" />
>
>works fine.  Any ideas why
>
><%=formAction%>
>
>is giving an error?
>
>Cheers
>
>Tony
>
>
>
>
>On Tue, 19 Feb 2002 12:05:27 +0100
>Patrick Refondini <pa...@jpnet.ch> wrote:
>
>>the wrong syntax seems to come from my previous quick and dirty answer :(
>>
>>Problems:
>>1. bean:define value must not be define as body content but as value 
>>attribute.
>>2. forget about action='<bean:write name="formAction">'  it compiles but 
>>the bean:write tag is not interpreted so at runtime the action looked 
>>for is <bean:write name="formAction">
>>
>>This time I tested the following code sample, it works :)
>>
>>    <bean:define id="formAction" value="/test" />
>>
>>    <html:form action='<%=formAction%>' >
>>      (...)
>>    </html:form>
>>
>>Hereafter corrections regarding your example
>>
>>Antony Stace wrote:
>>
>>>Hi 
>>>
>>>Can someone please give me the syntax for defining the action using the contents of
>>>formAction in the <html:form> line.
>>>
>>>><bean:define id="formAction" >defaultAction</bean:define>
>>>>
>>should become 
>><bean:define id="formAction" value="defaultAction" />
>>
>>
>>>>
>>>><logic:equal name="testPageBean" property="typeOfProcess" value="add">
>>>><bean:define id="formAction" >/addUser</bean:define>
>>>>
>><bean:define id="formAction" value="/addUser" />
>>
>>
>>>></logic:equal>
>>>>
>>>><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
>>>><bean:define id="formAction" >/modifyUser</bean:define>
>>>>
>><bean:define id="formAction" value="/modifyUser"/>
>>
>>>></logic:equal>
>>>>
>>>>
>>>><html:form action='<bean:write name="formAction">' focus="username">
>>>>or 
>>>><html:form action='<%=formAction%>' focus="username">
>>>>
>>This one should work 
>>
>><html:form action='<%=formAction%>' focus="username">
>>
>>
>>I hope this time your problem is solved ...
>>
>>Patrick
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Antony Stace <s4...@yahoo.com>.
Thank you very much for your reply Patrick.

I got an error with the <%=formAction%> line.  As test I tried

<bean:define id="formAction" value="/test" />
<%=formAction%>

in my jsp page, I always get an error, it is strange since

<%= 1+1 %>   and
<bean:write name="formAction" filter="true" />

works fine.  Any ideas why

<%=formAction%>

is giving an error?

Cheers

Tony




On Tue, 19 Feb 2002 12:05:27 +0100
Patrick Refondini <pa...@jpnet.ch> wrote:

> the wrong syntax seems to come from my previous quick and dirty answer :(
> 
> Problems:
> 1. bean:define value must not be define as body content but as value 
> attribute.
> 2. forget about action='<bean:write name="formAction">'  it compiles but 
> the bean:write tag is not interpreted so at runtime the action looked 
> for is <bean:write name="formAction">
> 
> This time I tested the following code sample, it works :)
> 
>     <bean:define id="formAction" value="/test" />
> 
>     <html:form action='<%=formAction%>' >
>       (...)
>     </html:form>
> 
> Hereafter corrections regarding your example
> 
> Antony Stace wrote:
> 
> >Hi 
> >
> >Can someone please give me the syntax for defining the action using the contents of
> >formAction in the <html:form> line.
> >
> >><bean:define id="formAction" >defaultAction</bean:define>
> >>
> should become 
> <bean:define id="formAction" value="defaultAction" />
> 
> 
> >>
> >>
> >><logic:equal name="testPageBean" property="typeOfProcess" value="add">
> >><bean:define id="formAction" >/addUser</bean:define>
> >>
> <bean:define id="formAction" value="/addUser" />
> 
> 
> >>
> >></logic:equal>
> >>
> >><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
> >><bean:define id="formAction" >/modifyUser</bean:define>
> >>
> <bean:define id="formAction" value="/modifyUser"/>
> 
> >>
> >></logic:equal>
> >>
> >>
> >><html:form action='<bean:write name="formAction">' focus="username">
> >>or 
> >><html:form action='<%=formAction%>' focus="username">
> >>
> This one should work 
> 
> <html:form action='<%=formAction%>' focus="username">
> 
> 
> I hope this time your problem is solved ...
> 
> Patrick
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 


Cheers

Tony。
---------------------------------------------------------------------


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Patrick Refondini <pa...@jpnet.ch>.
the wrong syntax seems to come from my previous quick and dirty answer :(

Problems:
1. bean:define value must not be define as body content but as value 
attribute.
2. forget about action='<bean:write name="formAction">'  it compiles but 
the bean:write tag is not interpreted so at runtime the action looked 
for is <bean:write name="formAction">

This time I tested the following code sample, it works :)

    <bean:define id="formAction" value="/test" />

    <html:form action='<%=formAction%>' >
      (...)
    </html:form>

Hereafter corrections regarding your example

Antony Stace wrote:

>Hi 
>
>Can someone please give me the syntax for defining the action using the contents of
>formAction in the <html:form> line.
>
>><bean:define id="formAction" >defaultAction</bean:define>
>>
should become 
<bean:define id="formAction" value="defaultAction" />


>>
>>
>><logic:equal name="testPageBean" property="typeOfProcess" value="add">
>><bean:define id="formAction" >/addUser</bean:define>
>>
<bean:define id="formAction" value="/addUser" />


>>
>></logic:equal>
>>
>><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
>><bean:define id="formAction" >/modifyUser</bean:define>
>>
<bean:define id="formAction" value="/modifyUser"/>

>>
>></logic:equal>
>>
>>
>><html:form action='<bean:write name="formAction">' focus="username">
>>or 
>><html:form action='<%=formAction%>' focus="username">
>>
This one should work 

<html:form action='<%=formAction%>' focus="username">


I hope this time your problem is solved ...

Patrick



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Antony Stace <s4...@yahoo.com>.
Hi 

Can someone please give me the syntax for defining the action using the contents of
formAction in the <html:form> line.

> 
> <bean:define id="formAction" >defaultAction</bean:define>
> 
> <logic:equal name="testPageBean" property="typeOfProcess" value="add">
> <bean:define id="formAction" >/addUser</bean:define>
> </logic:equal>
> 
> <logic:equal name="testPageBean" property="typeOfProcess" value="modify">
> <bean:define id="formAction" >/modifyUser</bean:define>
> </logic:equal>
> 
> 
> <html:form action='<bean:write name="formAction">' focus="username">
> or 
> <html:form action='<%=formAction%>' focus="username">

I get errors when I try and use the above two ways to try and define the action.


Cheers

Tony







> 
> 
> Patrick
> 
> 
> Antony Stace wrote:
> 
> >Hi Ladies and Gentlemen
> >
> >I want to use <logic:equals> tags around a <html:form action> but I am having
> >errors.  I am not sure if this is allowed in struts.  Can someone please confirmthat this is not or is allowed in struts.
> >
> >The code I have is
> >
> >--------------------------snip----------------------------
> >
> ><logic:equal name="testPageBean" property="typeOfProcess" value="add">
> ><html:form action="/addUser" focus="username">
> ></logic:equal>
> ><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
> ><html:form action="/modifyUser" focus="username">
> ></logic:equal>
> >....rest of form definition
> >
> >--------------------------snip-----------------------------
> >
> >The error I am getting is
> >
> >org.apache.jasper.compiler.ParseException: /WEB-INF/pages/clientDetails.jsp(21,0) ??????????????: ???? &lt;/logic:equal&gt; ???????????????????
> >	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> >	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by Patrick Refondini <pa...@jpnet.ch>.
Hi Antony,
I guess you are not allowed to enclose a tag start within a logic tag
whithout enclosing the tag end as well.
This leads to :

<logic:equal name="testPageBean" property="typeOfProcess" value="add">
<html:form action="/addUser" focus="username">
...
</html:form>
</logic:equal>

Of course if the only difference in your forms (addUser, modifyUser) are
the form action attribute it will duplicate a lot of code.
In this case as action attribute is a RunTime Expression you might deal
with something like :

<bean:define id="formAction" >defaultAction</bean:define>

<logic:equal name="testPageBean" property="typeOfProcess" value="add">
<bean:define id="formAction" >/addUser</bean:define>
</logic:equal>

<logic:equal name="testPageBean" property="typeOfProcess" value="modify">
<bean:define id="formAction" >/modifyUser</bean:define>
</logic:equal>


<html:form action='<bean:write name="formAction">' focus="username">
or 
<html:form action='<%=formAction%>' focus="username">

I am not sure about syntax ... but this is the idea


Patrick


Antony Stace wrote:

>Hi Ladies and Gentlemen
>
>I want to use <logic:equals> tags around a <html:form action> but I am having
>errors.  I am not sure if this is allowed in struts.  Can someone please confirmthat this is not or is allowed in struts.
>
>The code I have is
>
>--------------------------snip----------------------------
>
><logic:equal name="testPageBean" property="typeOfProcess" value="add">
><html:form action="/addUser" focus="username">
></logic:equal>
><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
><html:form action="/modifyUser" focus="username">
></logic:equal>
>....rest of form definition
>
>--------------------------snip-----------------------------
>
>The error I am getting is
>
>org.apache.jasper.compiler.ParseException: /WEB-INF/pages/clientDetails.jsp(21,0) ??????????????: ???? &lt;/logic:equal&gt; ???????????????????
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using tag around tag. Is it legal?

Posted by CyberZombie <Cy...@mediaone.net>.
When I ran into that issue, I just used two action mappings --
"/editUser" to initialize the form (including an action property that
identified add vs. edit) and forward that to the .jsp. And in the .jsp
form tag I used "/storeEditUser" to process the results.

Antony Stace wrote:

>Hi Ladies and Gentlemen
>
>I want to use <logic:equals> tags around a <html:form action> but I am having
>errors.  I am not sure if this is allowed in struts.  Can someone please confirmthat this is not or is allowed in struts.
>
>The code I have is
>
>--------------------------snip----------------------------
>
><logic:equal name="testPageBean" property="typeOfProcess" value="add">
><html:form action="/addUser" focus="username">
></logic:equal>
><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
><html:form action="/modifyUser" focus="username">
></logic:equal>
>....rest of form definition
>
>--------------------------snip-----------------------------
>
>The error I am getting is
>
>org.apache.jasper.compiler.ParseException: /WEB-INF/pages/clientDetails.jsp(21,0) ??????????????: ???? &lt;/logic:equal&gt; ???????????????????
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
>	at org.apache.jasper.compiler.Parser.parse(Parser.java)
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


theserverside.com feature interview Craig McClanahan

Posted by "emmanuel.boudrant" <b7...@yahoo.fr>.
 see here :
http://www.theserverside.com/events/videos/CraigMcClanahan/dsl/interview.html



---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Re: Using tag around tag. Is it legal?

Posted by Keith <ke...@yahoo.com>.
<logic:equal 
       <html:form
       </html:form
</logic:equal>
is valid xml & should work (never done it myself).

<logic:equal 
       <html:form
</logic:equal>
       </html:form
isnt valid xml.

But this means you'll have a large piece of duplicated jsp code.
In my limited experience when I hit this situation I have 2 JSP's, I find lots
of code inside <logic tags very nasty.
Actually you could probably use struts include to hold the duplicated bit.
Does any-one know if you can have form fields inside an include?

--- Antony Stace <s4...@yahoo.com> wrote:
> Hi Ladies and Gentlemen
> 
> I want to use <logic:equals> tags around a <html:form action> but I am having
> errors.  I am not sure if this is allowed in struts.  Can someone please
> confirmthat this is not or is allowed in struts.
> 
> The code I have is
> 
> --------------------------snip----------------------------
> 
> <logic:equal name="testPageBean" property="typeOfProcess" value="add">
> <html:form action="/addUser" focus="username">
> </logic:equal>
> <logic:equal name="testPageBean" property="typeOfProcess" value="modify">
> <html:form action="/modifyUser" focus="username">
> </logic:equal>
> ....rest of form definition
> 
> --------------------------snip-----------------------------
> 
> The error I am getting is
> 
> org.apache.jasper.compiler.ParseException:
> /WEB-INF/pages/clientDetails.jsp(21,0) ??????????????: ????
> &lt;/logic:equal&gt; ???????????????????
> 	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java)
> 
> 
> 
> -- 
> 
> 
> Cheers
> 
> Tony��
> ---------------------------------------------------------------------
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>