Re: How to give a text field name dynamically?

2007-09-04 Thread Pooja Kaur
Try this:

   
 <% int i= 1;
%>
   
<% String propertyName = "Qn"+i;
i++;
%>

   
   Question 
   

   
   
 
   
   




Thanks


On 8/31/07, Subhani Shaik <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I have the following code...
>
>
>
>
>Question  /> value="route" />
>
> 
>
>
>
>
>
> 
> 
> 
>
> Here, 'Questions' is a class that contains 'questionID' as a field. And
> this
> returns 'List' over here. When i am iterating i'll get single item from
> the
> list. And my textfield name should be as the value of questionID (this is
> the key).
>
> I want something like this...
>
> 
> 
> 
> ... so on
>
>
> Regards,
> Subhani.
> --
> View this message in context:
> http://www.nabble.com/How-to-give-a-text-field-name-dynamically--tf4358482.html#a12421314
> Sent from the Struts - User mailing list archive at 
> Nabble.com
> .
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: switch action - doubt

2007-08-13 Thread Pooja Kaur
Thanks all for replying.
Here is my actual problem statement:
I have one web project named eg. "Training"
and 2nd project named eg. "Test".
The login to application is through the "Test" Project. I want a link in the
Test project which points to the "Training" project and this 'Training"
project should be able to get the user details from the session.
What I have done is:
I created a WAR file for this new Training project and put this war file in
the EAR file of the "Test" project. In this application.xml file of "Test"
project, now there are 2 wars present with different context roots.
I tried using SwitchAction to switch between these war files and have
mentioned the problems i am facing.
Is there a better and feasible way to implement this scenario. I am running
my appl through WSAD.


On 8/13/07, Nagraj Rao <[EMAIL PROTECTED]> wrote:
>
>
> Are you submitting any request params or simply redirecting it to the new
> URL??
> I hope simple re-directing should work. For that you can specify
> redirect=true as an attribute in the forward tag.
>
> Sorry to be replying directly. For some reason my mails are  not reaching
> the struts group.
>
> N
>
> -Original Message-
> From: Pooja Kaur [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 13, 2007 2:44 PM
> To: user@struts.apache.org
> Subject: Re: switch action - doubt
>
> Please anyone reply
>
>
>
> On 8/13/07, Pooja Kaur <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > I have 2 war files added to an EAR. Both of them have a different
> context
> > root. Eg. Module A has test1 as the context root and Module B has test2
> > I did the following in the struts-config of Module A which is the
> default
> > module:
> > 1. Added an action
> >
> > 
> >
> > 2. The link to switch the module has the URL eg.
> >
> > toModule.do?prefix=/test2
> > &page=/forwardToTrainingDB.do
> >
> > When I click on the link with the above url , i get 400 (Bad Request)
> > Error message.
> >
> > The mapping for forwardToTrainingDB.do is present in the struts-config
> xml
> > file of test2 module.
> >
> > Please help me how to resolve this problem.
> >
> > Thanks
> >
> >
> >
>
>


Re: switch action - doubt

2007-08-13 Thread Pooja Kaur
Please anyone reply



On 8/13/07, Pooja Kaur <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have 2 war files added to an EAR. Both of them have a different context
> root. Eg. Module A has test1 as the context root and Module B has test2
> I did the following in the struts-config of Module A which is the default
> module:
> 1. Added an action
>
> 
>
> 2. The link to switch the module has the URL eg.
>
> toModule.do?prefix=/test2
> &page=/forwardToTrainingDB.do
>
> When I click on the link with the above url , i get 400 (Bad Request)
> Error message.
>
> The mapping for forwardToTrainingDB.do is present in the struts-config xml
> file of test2 module.
>
> Please help me how to resolve this problem.
>
> Thanks
>
>
>


Re: switch action - doubt

2007-08-13 Thread Pooja Kaur
The application.xml file of the EAR has two different wars with different
context roots specified for them? What else should I update to imply to the
server that the context root has changed?
I tried by adding a global forward:



and put the url as test2. But , when I run the appl, the complete url formed
is:

http://localhost:9080/test1/test2

whereas I want it to be http://localhost:9080/test2/forwardToTrainingDB.do

What should i do?



On 8/13/07, Paul Benedict <[EMAIL PROTECTED]> wrote:
>
> SwitchAction does not switch between applications. It switches between
> Struts modules within one application. What you want to do is include the
> context root in your paths. There's an attribute for that. I believe it's
> contextRelative=true
>
> Paul
>
> On 8/13/07, ANIMESH SAXENA <[EMAIL PROTECTED]> wrote:
> >
> > Could you please mention which struts version??
> >
> > On 8/13/07, Pooja Kaur <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > > I have 2 war files added to an EAR. Both of them have a different
> > context
> > > root. Eg. Module A has test1 as the context root and Module B has
> test2
> > > I did the following in the struts-config of Module A which is the
> > default
> > > module:
> > > 1. Added an action
> > >
> > > 
> > >
> > > 2. The link to switch the module has the URL eg.
> > >
> > > toModule.do?prefix=/test2
> > > &page=/forwardToTrainingDB.do
> > >
> > > When I click on the link with the above url , i get 400 (Bad Request)
> > > Error
> > > message.
> > >
> > > The mapping for forwardToTrainingDB.do is present in the struts-config
> > xml
> > > file of test2 module.
> > >
> > > Please help me how to resolve this problem.
> > >
> > > Thanks
> > >
> >
> >
> >
> > --
> > Animesh Saxena
> >
> >
> > http://inlovewithlinux.blogspot.com
> >
>


Re: switch action - doubt

2007-08-13 Thread Pooja Kaur
Struts Version is : 1.1
One more strange thing that is happening is:

If i put the url as :
http://localhost:9080/spmod/toModule.do?prefix=&page=/forwardToTrainingDB.doand
debug, I reach the ActionClass having 'forwardToTrainingDB' as the
action mapping, and then I get 404 error.
It seems like it is not recognising the Module B's context root.

On 8/13/07, ANIMESH SAXENA <[EMAIL PROTECTED]> wrote:
>
> Could you please mention which struts version??
>
> On 8/13/07, Pooja Kaur <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > I have 2 war files added to an EAR. Both of them have a different
> context
> > root. Eg. Module A has test1 as the context root and Module B has test2
> > I did the following in the struts-config of Module A which is the
> default
> > module:
> > 1. Added an action
> >
> > 
> >
> > 2. The link to switch the module has the URL eg.
> >
> > toModule.do?prefix=/test2
> > &page=/forwardToTrainingDB.do
> >
> > When I click on the link with the above url , i get 400 (Bad Request)
> > Error
> > message.
> >
> > The mapping for forwardToTrainingDB.do is present in the struts-config
> xml
> > file of test2 module.
> >
> > Please help me how to resolve this problem.
> >
> > Thanks
> >
>
>
>
> --
> Animesh Saxena
>
>
> http://inlovewithlinux.blogspot.com
>


switch action - doubt

2007-08-13 Thread Pooja Kaur
Hi,
I have 2 war files added to an EAR. Both of them have a different context
root. Eg. Module A has test1 as the context root and Module B has test2
I did the following in the struts-config of Module A which is the default
module:
1. Added an action



2. The link to switch the module has the URL eg.

toModule.do?prefix=/test2
&page=/forwardToTrainingDB.do

When I click on the link with the above url , i get 400 (Bad Request) Error
message.

The mapping for forwardToTrainingDB.do is present in the struts-config xml
file of test2 module.

Please help me how to resolve this problem.

Thanks