You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by slideharmony <se...@tiscali.it> on 2007/11/22 17:58:27 UTC

param tag won't work!

hi,
I'm using the following code in my jsp:

<s:url id="url" action="Test">
  <s:param name="test" value="test"/>
</s:url>
<s:a href="%{url}">Link</s:a>

       the following code for my action:

package prova.actions;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Test extends ActionSupport {

    public String execute() throws Exception {
        return SUCCESS;
    }

    
    private String test;

	private String getTest() {
		return test;
	}

	private void setTest(String test) {
		this.test = test;
	}
    
    
}

Here is my struts.xml:

<package name="test" extends="struts-default">
        <action name="Test" class="actions.Test">
            <result>/Test.jsp</result>
        </action>
</package>

and finally my Test.jsp:

<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
    <head>
        <title>Hello World!</title>
    </head>
    <body>
        <h2><s:property value="test"/></h2>

    </body>
</html>


It should print "test" right? But it doesn't print nothing! And I have
logged the request parameter map, the test parameter doesn't appear! Any
ideas????

-- 
View this message in context: http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
Sent from the Struts - User mailing list archive at Nabble.com.


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


Posted by Rajagopal_Yendluri <Ra...@satyam.com>.
Hi ..

 

   Here is my Requirement:

 

   I am getting a list of colleges from Database and displaying it in a
page like the following:

 

I have the "college" POJO List and I will displayL

 

            

CollegeId

CollegeName

123456789

Abcdefghijkl

 

 

I know how to do the above :

 

Now I have to make a decision about the college; which type of college
it is "say Grade: A grade or B grade" and the region of that college and
I have to make a decision whether that college is good or not.

 

Screen looks like the following:

 

 

CollegeId

CollegeName

Grade(DropDown)

Region(Dropdown)

Accept/Rejct (Radio Button).

 

 

 

 

 

 

 

How can I proceed with the above requirement == >>>  Here dynamically I
have to attach the values to the "college" POJO the others ( Grade,
Region and Accept/Reject).

 

 

 

Any Suggestions ??????????

 

 

Regards,

Rajagopal Y (Raj)

HCU-Consulting & Enterprise Solutions.

Phone: (C) +91-9986584084 / (W)+91-80-6658 3685.



DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

Re: param tag won't work!

Posted by slideharmony <se...@tiscali.it>.
ok, hope to find the solution



slideharmony wrote:
> 
> hi,
> I'm using the following code in my jsp:
> 
> <s:url id="url" action="Test">
>   <s:param name="test" value="test"/>
> </s:url>
> <s:a href="%{url}">Link</s:a>
> 
>        the following code for my action:
> 
> package prova.actions;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.Set;
> 
> public class Test extends ActionSupport {
> 
>     public String execute() throws Exception {
>         return SUCCESS;
>     }
> 
>     
>     private String test;
> 
> 	private String getTest() {
> 		return test;
> 	}
> 
> 	private void setTest(String test) {
> 		this.test = test;
> 	}
>     
>     
> }
> 
> Here is my struts.xml:
> 
> <package name="test" extends="struts-default">
>         <action name="Test" class="actions.Test">
>             <result>/Test.jsp</result>
>         </action>
> </package>
> 
> and finally my Test.jsp:
> 
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> <html>
>     <head>
>         <title>Hello World!</title>
>     </head>
>     <body>
>         <h2><s:property value="test"/></h2>
> 
>     </body>
> </html>
> 
> 
> It should print "test" right? But it doesn't print nothing! And I have
> logged the request parameter map, the test parameter doesn't appear! Any
> ideas????
> 
> 

-- 
View this message in context: http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13909544
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: param tag won't work!

Posted by Rajagopal_Yendluri <Ra...@satyam.com>.
It seems everything is correct, let me try the same on my machine.. 


-----Original Message-----
From: slideharmony [mailto:setoiori@tiscali.it] 
Sent: Friday, November 23, 2007 2:53 PM
To: user@struts.apache.org
Subject: Re: param tag won't work!


well actually I've also tried  with

href="#url"

but it doesn't work yet..



newton.dave wrote:
> 
> Is it rendering properly? (I'm actually a little
> surprised you don't have to use the "#" character, eg.
> href="#url"--I thought you did.)
> 
> --- slideharmony <se...@tiscali.it> wrote:
> 
>> 
>> hi,
>> I'm using the following code in my jsp:
>> 
>> <s:url id="url" action="Test">
>>   <s:param name="test" value="test"/>
>> </s:url>
>> <s:a href="%{url}">Link</s:a>
>> 
>>        the following code for my action:
>> 
>> package prova.actions;
>> import java.util.Iterator;
>> import java.util.Map;
>> import java.util.Set;
>> 
>> public class Test extends ActionSupport {
>> 
>>     public String execute() throws Exception {
>>         return SUCCESS;
>>     }
>> 
>>     
>>     private String test;
>> 
>> 	private String getTest() {
>> 		return test;
>> 	}
>> 
>> 	private void setTest(String test) {
>> 		this.test = test;
>> 	}
>>     
>>     
>> }
>> 
>> Here is my struts.xml:
>> 
>> <package name="test" extends="struts-default">
>>         <action name="Test" class="actions.Test">
>>             <result>/Test.jsp</result>
>>         </action>
>> </package>
>> 
>> and finally my Test.jsp:
>> 
>> <%@ taglib prefix="s" uri="/struts-tags" %>
>> 
>> <html>
>>     <head>
>>         <title>Hello World!</title>
>>     </head>
>>     <body>
>>         <h2><s:property value="test"/></h2>
>> 
>>     </body>
>> </html>
>> 
>> 
>> It should print "test" right? But it doesn't print
>> nothing! And I have
>> logged the request parameter map, the test parameter
>> doesn't appear! Any
>> ideas????
>> 
>> -- 
>> View this message in context:
>>
>
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13909084
Sent from the Struts - User mailing list archive at Nabble.com.


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




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

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


Re: param tag won't work!

Posted by slideharmony <se...@tiscali.it>.
no, it's not! it doesn't render nothing..




newton.dave wrote:
> 
> Is it rendering properly?
> 
> --- slideharmony <se...@tiscali.it> wrote:
> 
>> 
>> well actually I've also tried  with
>> 
>> href="#url"
>> 
>> but it doesn't work yet..
>> 
>> 
>> 
>> newton.dave wrote:
>> > 
>> > Is it rendering properly? (I'm actually a little
>> > surprised you don't have to use the "#" character,
>> eg.
>> > href="#url"--I thought you did.)
>> > 
>> > --- slideharmony <se...@tiscali.it> wrote:
>> > 
>> >> 
>> >> hi,
>> >> I'm using the following code in my jsp:
>> >> 
>> >> <s:url id="url" action="Test">
>> >>   <s:param name="test" value="test"/>
>> >> </s:url>
>> >> <s:a href="%{url}">Link</s:a>
>> >> 
>> >>        the following code for my action:
>> >> 
>> >> package prova.actions;
>> >> import java.util.Iterator;
>> >> import java.util.Map;
>> >> import java.util.Set;
>> >> 
>> >> public class Test extends ActionSupport {
>> >> 
>> >>     public String execute() throws Exception {
>> >>         return SUCCESS;
>> >>     }
>> >> 
>> >>     
>> >>     private String test;
>> >> 
>> >> 	private String getTest() {
>> >> 		return test;
>> >> 	}
>> >> 
>> >> 	private void setTest(String test) {
>> >> 		this.test = test;
>> >> 	}
>> >>     
>> >>     
>> >> }
>> >> 
>> >> Here is my struts.xml:
>> >> 
>> >> <package name="test" extends="struts-default">
>> >>         <action name="Test" class="actions.Test">
>> >>             <result>/Test.jsp</result>
>> >>         </action>
>> >> </package>
>> >> 
>> >> and finally my Test.jsp:
>> >> 
>> >> <%@ taglib prefix="s" uri="/struts-tags" %>
>> >> 
>> >> <html>
>> >>     <head>
>> >>         <title>Hello World!</title>
>> >>     </head>
>> >>     <body>
>> >>         <h2><s:property value="test"/></h2>
>> >> 
>> >>     </body>
>> >> </html>
>> >> 
>> >> 
>> >> It should print "test" right? But it doesn't
>> print
>> >> nothing! And I have
>> >> logged the request parameter map, the test
>> parameter
>> >> doesn't appear! Any
>> >> ideas????
>> >> 
>> >> -- 
>> >> View this message in context:
>> >>
>> >
>>
> http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
>> >> Sent from the Struts - User mailing list archive
>> at
>> >> Nabble.com.
>> >> 
>> >> 
>> >>
>> >
>>
> ---------------------------------------------------------------------
>> >> 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
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13909084
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13912926
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: param tag won't work!

Posted by Dave Newton <ne...@yahoo.com>.
Is it rendering properly?

--- slideharmony <se...@tiscali.it> wrote:

> 
> well actually I've also tried  with
> 
> href="#url"
> 
> but it doesn't work yet..
> 
> 
> 
> newton.dave wrote:
> > 
> > Is it rendering properly? (I'm actually a little
> > surprised you don't have to use the "#" character,
> eg.
> > href="#url"--I thought you did.)
> > 
> > --- slideharmony <se...@tiscali.it> wrote:
> > 
> >> 
> >> hi,
> >> I'm using the following code in my jsp:
> >> 
> >> <s:url id="url" action="Test">
> >>   <s:param name="test" value="test"/>
> >> </s:url>
> >> <s:a href="%{url}">Link</s:a>
> >> 
> >>        the following code for my action:
> >> 
> >> package prova.actions;
> >> import java.util.Iterator;
> >> import java.util.Map;
> >> import java.util.Set;
> >> 
> >> public class Test extends ActionSupport {
> >> 
> >>     public String execute() throws Exception {
> >>         return SUCCESS;
> >>     }
> >> 
> >>     
> >>     private String test;
> >> 
> >> 	private String getTest() {
> >> 		return test;
> >> 	}
> >> 
> >> 	private void setTest(String test) {
> >> 		this.test = test;
> >> 	}
> >>     
> >>     
> >> }
> >> 
> >> Here is my struts.xml:
> >> 
> >> <package name="test" extends="struts-default">
> >>         <action name="Test" class="actions.Test">
> >>             <result>/Test.jsp</result>
> >>         </action>
> >> </package>
> >> 
> >> and finally my Test.jsp:
> >> 
> >> <%@ taglib prefix="s" uri="/struts-tags" %>
> >> 
> >> <html>
> >>     <head>
> >>         <title>Hello World!</title>
> >>     </head>
> >>     <body>
> >>         <h2><s:property value="test"/></h2>
> >> 
> >>     </body>
> >> </html>
> >> 
> >> 
> >> It should print "test" right? But it doesn't
> print
> >> nothing! And I have
> >> logged the request parameter map, the test
> parameter
> >> doesn't appear! Any
> >> ideas????
> >> 
> >> -- 
> >> View this message in context:
> >>
> >
>
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
> >> Sent from the Struts - User mailing list archive
> at
> >> Nabble.com.
> >> 
> >> 
> >>
> >
>
---------------------------------------------------------------------
> >> 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
> > 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13909084
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> 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: param tag won't work!

Posted by slideharmony <se...@tiscali.it>.
well actually I've also tried  with

href="#url"

but it doesn't work yet..



newton.dave wrote:
> 
> Is it rendering properly? (I'm actually a little
> surprised you don't have to use the "#" character, eg.
> href="#url"--I thought you did.)
> 
> --- slideharmony <se...@tiscali.it> wrote:
> 
>> 
>> hi,
>> I'm using the following code in my jsp:
>> 
>> <s:url id="url" action="Test">
>>   <s:param name="test" value="test"/>
>> </s:url>
>> <s:a href="%{url}">Link</s:a>
>> 
>>        the following code for my action:
>> 
>> package prova.actions;
>> import java.util.Iterator;
>> import java.util.Map;
>> import java.util.Set;
>> 
>> public class Test extends ActionSupport {
>> 
>>     public String execute() throws Exception {
>>         return SUCCESS;
>>     }
>> 
>>     
>>     private String test;
>> 
>> 	private String getTest() {
>> 		return test;
>> 	}
>> 
>> 	private void setTest(String test) {
>> 		this.test = test;
>> 	}
>>     
>>     
>> }
>> 
>> Here is my struts.xml:
>> 
>> <package name="test" extends="struts-default">
>>         <action name="Test" class="actions.Test">
>>             <result>/Test.jsp</result>
>>         </action>
>> </package>
>> 
>> and finally my Test.jsp:
>> 
>> <%@ taglib prefix="s" uri="/struts-tags" %>
>> 
>> <html>
>>     <head>
>>         <title>Hello World!</title>
>>     </head>
>>     <body>
>>         <h2><s:property value="test"/></h2>
>> 
>>     </body>
>> </html>
>> 
>> 
>> It should print "test" right? But it doesn't print
>> nothing! And I have
>> logged the request parameter map, the test parameter
>> doesn't appear! Any
>> ideas????
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13909084
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: param tag won't work!

Posted by Dave Newton <ne...@yahoo.com>.
Is it rendering properly? (I'm actually a little
surprised you don't have to use the "#" character, eg.
href="#url"--I thought you did.)

--- slideharmony <se...@tiscali.it> wrote:

> 
> hi,
> I'm using the following code in my jsp:
> 
> <s:url id="url" action="Test">
>   <s:param name="test" value="test"/>
> </s:url>
> <s:a href="%{url}">Link</s:a>
> 
>        the following code for my action:
> 
> package prova.actions;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.Set;
> 
> public class Test extends ActionSupport {
> 
>     public String execute() throws Exception {
>         return SUCCESS;
>     }
> 
>     
>     private String test;
> 
> 	private String getTest() {
> 		return test;
> 	}
> 
> 	private void setTest(String test) {
> 		this.test = test;
> 	}
>     
>     
> }
> 
> Here is my struts.xml:
> 
> <package name="test" extends="struts-default">
>         <action name="Test" class="actions.Test">
>             <result>/Test.jsp</result>
>         </action>
> </package>
> 
> and finally my Test.jsp:
> 
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> <html>
>     <head>
>         <title>Hello World!</title>
>     </head>
>     <body>
>         <h2><s:property value="test"/></h2>
> 
>     </body>
> </html>
> 
> 
> It should print "test" right? But it doesn't print
> nothing! And I have
> logged the request parameter map, the test parameter
> doesn't appear! Any
> ideas????
> 
> -- 
> View this message in context:
>
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> 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