Re: OT: Alternative to html frames

2008-02-12 Thread Antonio Petrelli
2008/2/11, Frank W. Zammetti <[EMAIL PROTECTED]>:
>
> Marc, what aren't you happy about with the frame-based design?  I've
> done a lot of that over the years and, once you learn to avoid the
> pitfalls, it's worked out great.  I admit that in recent years I've
> leaned towards iFrames when frames were necessary at all, and certainly
> some of the problems associated with regular frames are avoided with
> iFrames... but what problems are you seeing that you're trying to
> overcome?  That answer will guide your decision-making quite a bit.



Frank, you might love this article :-)
http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong.aspx

Antonio


Re: OT: Alternative to html frames

2008-02-12 Thread Antonio Petrelli
2008/2/11, Laurie Harper <[EMAIL PROTECTED]>:
>
> Antonio Petrelli wrote:
> > 2008/2/11, Marc Eckart <[EMAIL PROTECTED]>:
> >> But we are not so happy with this frame aproaches in general. But we
> don't
> >> know how to integrate the different (indepentend) applications
> transparent
> >> to the users without frames.
> >
> > A portlet container?
>
> Regular divs loaded via AJAX? (e.g. using 

Re: Actualizar Strust 1 a Strust 2

2008-02-12 Thread Antonio Petrelli
2008/2/12, Alvaro Ernesto Gomez Cerna <[EMAIL PROTECTED]>:
> Bueno leo un poco de ingles pero prefiero mejor el español, pero te aviso como
> voy en los avances asi que me ayudes a solucionar algunos travas que pueda el
> tener.

Ti parlo in italiano, tanto tra italiani e persone di lingua spagnola
ci si capisce :-)
Questa è una mailing list in inglese, quindi è preferibile scrivere in
inglese. Noi non facciamo caso agli errori di grammatica e ortografia.
Nel caso in cui non capiamo qualcosa, chiediamo di spiegarlo meglio.
Quindi sforzati un po' per l'inglese, oppure cerca una mailing list in
spagnolo :-)

Ciao
Antonio

Translation in English
I write in Italian, since Italians and Spanish-speaking people
understand themselves :-)
This is an English-speaking mailing list, so it is preferable to write
in English. We don't care of grammar and ortography errors. If we
don't understand something, we simply ask to explain it better.
So try to write in English, or find a Spanish-speaking mailing list :-)

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Advanced Use of Struts Tiles

2008-02-12 Thread Antonio Petrelli
2008/2/12, Asad Habib <[EMAIL PROTECTED]>:
>
> Hello. I have the following definitions in place in my tiles-def.xml file:
> ...
> There are several layers of nested tiles. I am having trouble using
> this. Are there any examples of nesting that is several layers deep
> online? Thank you.



I have to say that nesting definitions in Struts-Tiles is very difficult,
and the same for the current version of Tiles 2 (2.0.5).
In fact you already have an example of what nesting definition means. I
filed a JIRA issue for this at Tiles 2:
https://issues.apache.org/struts/browse/TILES-85
The patch is, anyway, outdated.

If you are willing to migrate to Tiles 2, there is a chance that this issue
will be fixed; if you want to stick with Struts-Tiles, nothing will change,
since Struts-Tiles will not be updated anymore (with the exception of
security issues).

Antonio


Re: Using il8n text in an interceptor

2008-02-12 Thread Pablo Vázquez Blázquez

// For future i18n purpose
private String translate(String name) {
   
String i18Name = LocalizedTextUtil.findDefaultText(name, locale);
   
if (i18Name == null) {

i18Name = name;
}
   
return i18Name;

}

Grish escribió:

I'm studying how interceptors work and made a login interceptor based on Mark
Menard's great tutorial:
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

I managed to integrate the interceptor in my sample application but I want
to access my resource bundle for the localized error message. Is there a
method similar to the getText method for Interceptors? What would be  the
best approach for adding localized action error messages from an
interceptor?
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic setup question (tiles 2)

2008-02-12 Thread Antonio Petrelli
Tiles 2 has got a new home:
http://tiles.apache.org/
Please post Tiles 2 related questions to the Tiles Users mailing list:
http://tiles.apache.org/mail.html

Antonio

2008/2/11, Allen, Daniel <[EMAIL PROTECTED]>:
>
> Hi.
>
> I'm completely new at Struts and Tiles, but was given the task of
> converting an app that relied on the first versions of those to the the
> newer version.
>
> We build with Maven 2, and as instructed by the documentation at
> http://tiles.apache.org/dev/snapshots.html, I added
>
> 
> org.apache.struts.tiles
> tiles-core
> 2.0-SNAPSHOT
> 
>
> To my pom.xml file. This downloaded tiles-api.jar and tiles-core.jar.
> However, at http://tiles.apache.org/migration/index.html, it says that
> there are three jars needed (tiles-jsp.jar being the third). When I try
> to access a site, I get an exception that
> "http://tiles.apache.org/tags-tiles"; was not found, and it seems likely
> that the missing JSP jar is the cause. Can anyone tell me where I can
> find that jar, and what I need to give Maven as a ? I tried
> copying the above and replacing the artifact ID with "tiles-jar" but
> that gave me an error saying that the artifact was not found in the
> repositor (which is set as per the snapshots link above).
>
> Does anyone know what the dependency for tiles-jsp.jar is?
>
> Thanks,
> ~Dan Allen
>
> --
> This message may contain confidential, proprietary, or legally privileged
> information. No confidentiality or privilege is waived by any transmission
> to an unintended recipient. If you are not an intended recipient, please
> notify the sender and delete this message immediately. Any views expressed
> in this message are those of the sender, not those of any entity within the
> KBC Financial Products group of companies (together referred to as "KBC
> FP").
>
> This message does not create any obligation, contractual or otherwise, on
> the part of KBC FP. It is not an offer (or solicitation of an offer) of, or
> a recommendation to buy or sell, any financial product. Any prices or other
> values included in this message are indicative only, and do not necessarily
> represent current market prices, prices at which KBC FP would enter into a
> transaction, or prices at which similar transactions may be carried on KBC
> FP's own books. The information contained in this message is provided "as
> is", without representations or warranties, express or implied, of any kind.
> Past performance is not indicative of future returns.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Need a Help

2008-02-12 Thread mohammed hussain
hi
   i have eclipse in that iam developing a web apllication,now i want to
develop the same using struts ,can it be done using the same eclipse,or else
i have to go for another one,pls help me out from this problem

tell me how can i develop struts application using ecllipse.

thanx


Re: Using il8n text in an interceptor

2008-02-12 Thread Grish

Thanks for the suggestion! I tried integrating it to my code but the problem
is findDefaultText always returns null. I traced the name and the locale
that I am passing and they are correct. 

my package_en_US.properties is in my org.test.app.action package. My
interceptor is in the org.test.app.interceptor package. Would the location
of the property file be the problem? 

I read the API and I had the impression that if I moved up the properties up
one level the properties file will still be seen. 

I tried moving it to org.test.app package  but i still seem to be getting
null. Is there something wrong with my setup perhaps?


Pablo Vazquez wrote:
> 
> // For future i18n purpose
>  private String translate(String name) {
> 
>  String i18Name = LocalizedTextUtil.findDefaultText(name, locale);
> 
>  if (i18Name == null) {
>  i18Name = name;
>  }
> 
>  return i18Name;
>  }
> 
> Grish escribió:
>> I'm studying how interceptors work and made a login interceptor based on
>> Mark
>> Menard's great tutorial:
>> http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor
>>
>> I managed to integrate the interceptor in my sample application but I
>> want
>> to access my resource bundle for the localized error message. Is there a
>> method similar to the getText method for Interceptors? What would be  the
>> best approach for adding localized action error messages from an
>> interceptor?
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-il8n-text-in-an-interceptor-tp15427096p15429285.html
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: Advanced Use of Struts Tiles

2008-02-12 Thread Asad Habib
Hello Antonio. Are you saying that multiple level nesting is not
possible with Struts Tiles? Cedric has demonstrated single level
nesting in one of his articles so I was hoping that it would be.
Anyway, I appreciate your feedback. If anyone has done this with
Struts Tiles, I would appreciate your help. Thank you.

- Asad



On Feb 12, 2008 3:10 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
> 2008/2/12, Asad Habib <[EMAIL PROTECTED]>:
> >
> > Hello. I have the following definitions in place in my tiles-def.xml file:
> > ...
> > There are several layers of nested tiles. I am having trouble using
> > this. Are there any examples of nesting that is several layers deep
> > online? Thank you.
>
>
>
> I have to say that nesting definitions in Struts-Tiles is very difficult,
> and the same for the current version of Tiles 2 (2.0.5).
> In fact you already have an example of what nesting definition means. I
> filed a JIRA issue for this at Tiles 2:
> https://issues.apache.org/struts/browse/TILES-85
> The patch is, anyway, outdated.
>
> If you are willing to migrate to Tiles 2, there is a chance that this issue
> will be fixed; if you want to stick with Struts-Tiles, nothing will change,
> since Struts-Tiles will not be updated anymore (with the exception of
> security issues).
>
> Antonio
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Advanced Use of Struts Tiles

2008-02-12 Thread Antonio Petrelli
2008/2/12, Asad Habib <[EMAIL PROTECTED]>:
>
> Hello Antonio. Are you saying that multiple level nesting is not
> possible with Struts Tiles?



Yes it is possible: as long as you are able to do single-level nesting, you
can nest at all levels.
What I meant is that it is "difficult" since you have to create definitions
over and over.

Antonio


Re: Need a Help

2008-02-12 Thread Giovanni Azua
As far as I can tell, yes it can be done in the same Eclipse. If you 
already have a
web application development setup using Eclipse then the only thing you 
would require
to be able to use Struts in your application is just to drop the 
relevant jars in e.g.

struts2 core, plugins etc and configure your web.xml

That said, I permanently use MyEclipse plugin and I am very happy with it
specially when it comes to Web development.

regards,
Giovanni

mohammed hussain wrote:

hi
   i have eclipse in that iam developing a web apllication,now i want to
develop the same using struts ,can it be done using the same eclipse,or else
i have to go for another one,pls help me out from this problem

tell me how can i develop struts application using ecllipse.

thanx

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need a Help

2008-02-12 Thread Shailendra Kumar Gupta
U can use the same eclipse.

Simply create one project in your eclipse by selecting Struts project
and you can proceed.

-Original Message-
From: mohammed hussain [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 2:42 PM
To: Struts Users Mailing List
Subject: Need a Help

hi
   i have eclipse in that iam developing a web apllication,now i want to
develop the same using struts ,can it be done using the same eclipse,or
else
i have to go for another one,pls help me out from this problem

tell me how can i develop struts application using ecllipse.

thanx



_
This message may contain confidential and proprietary material for the sole use 
of the intended recipient. 
Any review or distribution by others is strictly prohibited. If you are not the 
intended recipient, please contact the sender and delete all copies.
Before printing, think about the environment.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Advanced Use of Struts Tiles

2008-02-12 Thread Asad Habib
Hello Antonio. Do you have access to any examples that I could look at? Thanks.

- Asad



On Feb 12, 2008 4:27 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
> 2008/2/12, Asad Habib <[EMAIL PROTECTED]>:
> >
> > Hello Antonio. Are you saying that multiple level nesting is not
> > possible with Struts Tiles?
>
>
>
> Yes it is possible: as long as you are able to do single-level nesting, you
> can nest at all levels.
> What I meant is that it is "difficult" since you have to create definitions
> over and over.
>
> Antonio
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need a Help

2008-02-12 Thread mohammed hussain
hi  Giovanni Azua
   thanx for ur response
can u tell me how  can i add that plugin and jar
in myeclipse
thanx

On Feb 12, 2008 2:58 PM, Giovanni Azua <[EMAIL PROTECTED]> wrote:

> As far as I can tell, yes it can be done in the same Eclipse. If you
> already have a
> web application development setup using Eclipse then the only thing you
> would require
> to be able to use Struts in your application is just to drop the
> relevant jars in e.g.
> struts2 core, plugins etc and configure your web.xml
>
> That said, I permanently use MyEclipse plugin and I am very happy with it
> specially when it comes to Web development.
>
> regards,
> Giovanni
>
> mohammed hussain wrote:
> > hi
> >i have eclipse in that iam developing a web apllication,now i want to
> > develop the same using struts ,can it be done using the same eclipse,or
> else
> > i have to go for another one,pls help me out from this problem
> >
> > tell me how can i develop struts application using ecllipse.
> >
> > thanx
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Need a Help

2008-02-12 Thread mohammed hussain
hi Shailendra Kumar Gupta
  In my eclipse struts project is not there,can u tell where i can find that
.
thanx

On Feb 12, 2008 3:00 PM, Shailendra Kumar Gupta <[EMAIL PROTECTED]>
wrote:

> U can use the same eclipse.
>
> Simply create one project in your eclipse by selecting Struts project
> and you can proceed.
>
> -Original Message-
> From: mohammed hussain [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 12, 2008 2:42 PM
> To: Struts Users Mailing List
> Subject: Need a Help
>
> hi
>   i have eclipse in that iam developing a web apllication,now i want to
> develop the same using struts ,can it be done using the same eclipse,or
> else
> i have to go for another one,pls help me out from this problem
>
> tell me how can i develop struts application using ecllipse.
>
> thanx
>
>
>
>
> _
> This message may contain confidential and proprietary material for the
> sole use of the intended recipient.
> Any review or distribution by others is strictly prohibited. If you are
> not the intended recipient, please contact the sender and delete all copies.
> Before printing, think about the environment.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Advanced Use of Struts Tiles

2008-02-12 Thread Antonio Petrelli
2008/2/12, Asad Habib <[EMAIL PROTECTED]>:
>
> Hello Antonio. Do you have access to any examples that I could look at?
> Thanks.



The example is in the code that you posted :-)
.mainContentLayout contains .middleContentLayout.
.externalMainLayour contains .mainContentLayout.

   
   
   
   
   

   
   
   
   
   
   

Antonio


RE: Need a Help

2008-02-12 Thread Shailendra Kumar Gupta
First get the struts plugin and copy it to your eclipse plugin folder
and you will get it.

-Original Message-
From: mohammed hussain [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 3:05 PM
To: Struts Users Mailing List
Subject: Re: Need a Help

hi Shailendra Kumar Gupta
  In my eclipse struts project is not there,can u tell where i can find
that
.
thanx

On Feb 12, 2008 3:00 PM, Shailendra Kumar Gupta
<[EMAIL PROTECTED]>
wrote:

> U can use the same eclipse.
>
> Simply create one project in your eclipse by selecting Struts project
> and you can proceed.
>
> -Original Message-
> From: mohammed hussain [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 12, 2008 2:42 PM
> To: Struts Users Mailing List
> Subject: Need a Help
>
> hi
>   i have eclipse in that iam developing a web apllication,now i want
to
> develop the same using struts ,can it be done using the same
eclipse,or
> else
> i have to go for another one,pls help me out from this problem
>
> tell me how can i develop struts application using ecllipse.
>
> thanx
>
>
>
>
>

_
> This message may contain confidential and proprietary material for the
> sole use of the intended recipient.
> Any review or distribution by others is strictly prohibited. If you
are
> not the intended recipient, please contact the sender and delete all
copies.
> Before printing, think about the environment.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



_
This message may contain confidential and proprietary material for the sole use 
of the intended recipient. 
Any review or distribution by others is strictly prohibited. If you are not the 
intended recipient, please contact the sender and delete all copies.
Before printing, think about the environment.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxTag 1.3 support?

2008-02-12 Thread Pablo Vázquez Blázquez
I have read this discussion and I would like to know whether there is a 
struts 2 way of doing the same that with ajax-tags-1.3 ajax:updateField tag.


http://ajaxtags.sourceforge.net/usage.html

Note: I have a selector and when I select one item I would like to set 
the value for 2 input text.


Thanks.


Griffith, Michael * escribió:
Hi all, 


I can't seem to get a simple Ajax based look ahead search to work. I am
trying to use AjaxTags 1.3 (http://ajaxtags.sourceforge.net/) in my
Struts2 application. What is the correct response to return? I am also
using Tiles2.

If I write the response directly to the output stream, that's what
displays in my browser (obviously it's the response from the server) --
if I return the result, Struts complains that the mapping is not
correct. 


Here's what I have:

My form looks like this:


  Search Question Text: 



 
My Action looks like this:


public class QuestionAction extends BaseAction implements
ModelDriven, Preparable, ServletRequestAware,
ServletResponseAware {

... 

public String getSearchTerm() throws Exception{

System.out.println(" Question Search Term:" + qt);
List results=
questionService.getQuestions(qt);
AjaxXmlBuilder builder= new AjaxXmlBuilder();
builder.addItems(results, "questionType", "text");
System.out.println(" Question Search Result:" +
builder.toString());

 response.setContentType("text/xml");
 response.setHeader("Cache-Control", "no-cache");
 ServletOutputStream out = response.getOutputStream();
 out.print(builder.toString());
 out.close();

return SUCCESS;
}


My struts mapping:



question.panel



The struts 2 Ajax documentation seems manic and dated. It seems the S2
Ajax implementation is tied closely to sitemesh, which I am not using.

If anyone can help me get this going I would definitely be interested in
participating in the project updating the documentation. 


Michael Griffith
Application Architect (Consultant)
Office of the Chief Information Officer
Office of the Commissioner
U.S. Food and Drug Administration
5600 Fishers Lane
Rockville, MD 20857
301.827.2381
507.581.6606 (cell) 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



appfuse generated basic struts project how to access the logged in user from action

2008-02-12 Thread Prashant Khanal
Hello all,

I am working on the appfuse generated basic struts 2 project. It uses acegi
as a security framework for authentication and authorization. How can i
access the logged in user from the action?
To show the logged in user in the header.jsp page i used a jstl tag provided
by acegi as:
Welcome, logout
unfortunately this is also shown in login page as Welcome anonymous, logout
:)
how can i hide that based on whether or not the user is logged in?


-- 
Thanks,
Prashant Khanal


how do i obtain the selected value of the select element

2008-02-12 Thread Prashant Khanal
Hello all,
I just started working on struts 2 and stuck in a problem.
I have a page that consists of a select element and a submit button:




The select element populates list of Banner objects.
@Entity
@Table(name="DTC_BANNER")
public class Banner implements Serializable {

private Long id;
private String bannerName;

@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="banner_id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}

@Column(name="banner_name")
public String getBannerName() {
return bannerName;
}
public void setBannerName(String bannerName) {
this.bannerName = bannerName;
}

}

So i fetch the list of available banners from the database and populate in
the select element. The select element displays correctly.

Now after the user clicks on the submit button the
SequenceSelectionAction.java comes into act and now i want to fetch the
banner selected in the previous page. In fact i could only fetch the id of
the banner object selected as the listKey property is assigned "id".

Is there any way i can get the Banner object rather than just id?

-- 
Thanks,
Prashant Khanal <[EMAIL PROTECTED]>



BUG in checkboxlist

2008-02-12 Thread Moacir Cardoso
Hello, I'm getting some errors when using checkboxlist in situations 
where the name attribute or listKey and listValue are null values.

The actual template doesn't tests for null values.

If you do not use the name parameter this error occurs: "Expression 
parameters.name is undefine"

If the name are required then the tld does not reflect this need.
I think this is a bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Great. Thanks! 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 5:14 PM
To: Struts Users Mailing List
Subject: RE: Source for Struts Tiles Plugin?

--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> I downloaded this source code, but it's just the main Struts core, as
> far as I can tell. That's been helpful, but there are still gaps where
> control is passed to the Struts Tiles plug-in. 

http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_6/plugins/ti
les/

> Does anyone know where the source for the plug-in is? 
> 
> I've hit a total dead-end on the Apache site:
> http://struts.apache.org/2.0.6/index.html
> Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
> Click Tiles Plugin:
http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> And then I end up here:
> http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> That has a link labelled "downloads", but it just takes me back to the
> main Struts Downloads page in a loop. Honestly, in order to even get
the
> jar in the first place, I had to "cheat" and get Maven to download it
> for me from a repository, but those don't keep the source. 
> 
> I also tried another path, and ended up in a framework site of
> documentation headers. That has this page:
>
http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
> y.html
> But the URL its gives for the SVN repository responds with a 404.
> 
> Does anyone know a valid URL for the SVN repository, or a link to a
> ZIP/TAR/whatever file?
> 
> ~DVA
> 
> 
> -Original Message-
> From: Dave Newton [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 12, 2008 2:51 PM
> To: Struts Users Mailing List
> Subject: RE: Source for Struts Tiles Plugin?
> 
> See http://struts.apache.org/dev/builds.html; releases are under
> /tags/STRUTS_2_n_n:
> 
> Source distros are also available, see
> http://struts.apache.org/download.cgi
> and follow the archive link http://archive.apache.org/dist/struts/. I
> believe
> there is a S2.0.9 source distro there.
> 
> Dave
> 
> --- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> 
> > PS: I'm looking for v2.0.9 specifically, if that makes any
difference.
> > 
> > -Original Message-
> > From: Allen, Daniel 
> > Sent: Tuesday, February 12, 2008 2:44 PM
> > To: Struts Users Mailing List
> > Subject: Source for Struts Tiles Plugin?
> > 
> > Hi. I'm trying to move a web app from Struts1/Tiles1 to
> Struts2/Tiles2.
> > Unsurprisingly, quite a few things are going wrong.
> > 
> > In particular, I have a tiles-def.xml file in WEB-INF/classes, and
> it's
> > not being picked up, or at least not being read properly. I was able
> to
> > trace through the definitions loading up to a point, and see that
the
> > correct file path is being given to
> > ServletTilesApplicationContext.getResource(), but within that method
> > there's a call to servletContext.getResource() which goes into the
> > ConfiguredServletContext class. That class is part of the Struts
Tiles
> > Plugin jar, and I don't have the source to step inside and see what
> > specifically is going wrong.  So, if anyone could give me a SVN or
CVS
> > command or provide a link to download the source, that would really
> > help.
> > 
> > Thanks,
> > ~Dan Allen
> > 
> > -- 
> > This message may contain confidential, proprietary, or legally
> privileged
> > information. No confidentiality or privilege is waived by any
> transmission
> > to an unintended recipient. If you are not an intended recipient,
> please
> > notify the sender and delete this message immediately. Any views
> expressed
> > in this message are those of the sender, not those of any entity
> within the
> > KBC Financial Products group of companies (together referred to as
> "KBC
> > FP"). 
> > 
> > This message does not create any obligation, contractual or
otherwise,
> on
> > the part of KBC FP. It is not an offer (or solicitation of an offer)
> of, or
> > a recommendation to buy or sell, any financial product. Any prices
or
> other
> > values included in this message are indicative only, and do not
> necessarily
> > represent current market prices, prices at which KBC FP would enter
> into a
> > transaction, or prices at which similar transactions may be carried
on
> KBC
> > FP's own books. The information contained in this message is
provided
> "as
> > is", without representations or warranties, express or implied, of
any
> > kind. Past performance is not indicative of future returns.
> > 
> > 
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> This message may contain confidential, proprietary, or legally
privileged
> information. No confidentiality or privile

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Dave Newton
--- Dave Newton <[EMAIL PROTECTED]> wrote:
> --- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> > I downloaded this source code, but it's just the main Struts core, as
> > far as I can tell. That's been helpful, but there are still gaps where
> > control is passed to the Struts Tiles plug-in. 
> 
>
http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_6/plugins/tiles/

Oops, typed it in upside-down.

http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_9/plugins/tiles/

> 
> > Does anyone know where the source for the plug-in is? 
> > 
> > I've hit a total dead-end on the Apache site:
> > http://struts.apache.org/2.0.6/index.html
> > Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
> > Click Tiles Plugin: http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> > And then I end up here:
> > http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> > That has a link labelled "downloads", but it just takes me back to the
> > main Struts Downloads page in a loop. Honestly, in order to even get the
> > jar in the first place, I had to "cheat" and get Maven to download it
> > for me from a repository, but those don't keep the source. 
> > 
> > I also tried another path, and ended up in a framework site of
> > documentation headers. That has this page:
> > http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
> > y.html
> > But the URL its gives for the SVN repository responds with a 404.
> > 
> > Does anyone know a valid URL for the SVN repository, or a link to a
> > ZIP/TAR/whatever file?
> > 
> > ~DVA
> > 
> > 
> > -Original Message-
> > From: Dave Newton [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, February 12, 2008 2:51 PM
> > To: Struts Users Mailing List
> > Subject: RE: Source for Struts Tiles Plugin?
> > 
> > See http://struts.apache.org/dev/builds.html; releases are under
> > /tags/STRUTS_2_n_n:
> > 
> > Source distros are also available, see
> > http://struts.apache.org/download.cgi
> > and follow the archive link http://archive.apache.org/dist/struts/. I
> > believe
> > there is a S2.0.9 source distro there.
> > 
> > Dave
> > 
> > --- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> > 
> > > PS: I'm looking for v2.0.9 specifically, if that makes any difference.
> > > 
> > > -Original Message-
> > > From: Allen, Daniel 
> > > Sent: Tuesday, February 12, 2008 2:44 PM
> > > To: Struts Users Mailing List
> > > Subject: Source for Struts Tiles Plugin?
> > > 
> > > Hi. I'm trying to move a web app from Struts1/Tiles1 to
> > Struts2/Tiles2.
> > > Unsurprisingly, quite a few things are going wrong.
> > > 
> > > In particular, I have a tiles-def.xml file in WEB-INF/classes, and
> > it's
> > > not being picked up, or at least not being read properly. I was able
> > to
> > > trace through the definitions loading up to a point, and see that the
> > > correct file path is being given to
> > > ServletTilesApplicationContext.getResource(), but within that method
> > > there's a call to servletContext.getResource() which goes into the
> > > ConfiguredServletContext class. That class is part of the Struts Tiles
> > > Plugin jar, and I don't have the source to step inside and see what
> > > specifically is going wrong.  So, if anyone could give me a SVN or CVS
> > > command or provide a link to download the source, that would really
> > > help.
> > > 
> > > Thanks,
> > > ~Dan Allen
> > > 
> > > -- 
> > > This message may contain confidential, proprietary, or legally
> > privileged
> > > information. No confidentiality or privilege is waived by any
> > transmission
> > > to an unintended recipient. If you are not an intended recipient,
> > please
> > > notify the sender and delete this message immediately. Any views
> > expressed
> > > in this message are those of the sender, not those of any entity
> > within the
> > > KBC Financial Products group of companies (together referred to as
> > "KBC
> > > FP"). 
> > > 
> > > This message does not create any obligation, contractual or otherwise,
> > on
> > > the part of KBC FP. It is not an offer (or solicitation of an offer)
> > of, or
> > > a recommendation to buy or sell, any financial product. Any prices or
> > other
> > > values included in this message are indicative only, and do not
> > necessarily
> > > represent current market prices, prices at which KBC FP would enter
> > into a
> > > transaction, or prices at which similar transactions may be carried on
> > KBC
> > > FP's own books. The information contained in this message is provided
> > "as
> > > is", without representations or warranties, express or implied, of any
> > > kind. Past performance is not indicative of future returns.
> > > 
> > > 
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTE

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Dave Newton
--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> I downloaded this source code, but it's just the main Struts core, as
> far as I can tell. That's been helpful, but there are still gaps where
> control is passed to the Struts Tiles plug-in. 

http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_6/plugins/tiles/

> Does anyone know where the source for the plug-in is? 
> 
> I've hit a total dead-end on the Apache site:
> http://struts.apache.org/2.0.6/index.html
> Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
> Click Tiles Plugin: http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> And then I end up here:
> http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
> That has a link labelled "downloads", but it just takes me back to the
> main Struts Downloads page in a loop. Honestly, in order to even get the
> jar in the first place, I had to "cheat" and get Maven to download it
> for me from a repository, but those don't keep the source. 
> 
> I also tried another path, and ended up in a framework site of
> documentation headers. That has this page:
> http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
> y.html
> But the URL its gives for the SVN repository responds with a 404.
> 
> Does anyone know a valid URL for the SVN repository, or a link to a
> ZIP/TAR/whatever file?
> 
> ~DVA
> 
> 
> -Original Message-
> From: Dave Newton [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 12, 2008 2:51 PM
> To: Struts Users Mailing List
> Subject: RE: Source for Struts Tiles Plugin?
> 
> See http://struts.apache.org/dev/builds.html; releases are under
> /tags/STRUTS_2_n_n:
> 
> Source distros are also available, see
> http://struts.apache.org/download.cgi
> and follow the archive link http://archive.apache.org/dist/struts/. I
> believe
> there is a S2.0.9 source distro there.
> 
> Dave
> 
> --- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:
> 
> > PS: I'm looking for v2.0.9 specifically, if that makes any difference.
> > 
> > -Original Message-
> > From: Allen, Daniel 
> > Sent: Tuesday, February 12, 2008 2:44 PM
> > To: Struts Users Mailing List
> > Subject: Source for Struts Tiles Plugin?
> > 
> > Hi. I'm trying to move a web app from Struts1/Tiles1 to
> Struts2/Tiles2.
> > Unsurprisingly, quite a few things are going wrong.
> > 
> > In particular, I have a tiles-def.xml file in WEB-INF/classes, and
> it's
> > not being picked up, or at least not being read properly. I was able
> to
> > trace through the definitions loading up to a point, and see that the
> > correct file path is being given to
> > ServletTilesApplicationContext.getResource(), but within that method
> > there's a call to servletContext.getResource() which goes into the
> > ConfiguredServletContext class. That class is part of the Struts Tiles
> > Plugin jar, and I don't have the source to step inside and see what
> > specifically is going wrong.  So, if anyone could give me a SVN or CVS
> > command or provide a link to download the source, that would really
> > help.
> > 
> > Thanks,
> > ~Dan Allen
> > 
> > -- 
> > This message may contain confidential, proprietary, or legally
> privileged
> > information. No confidentiality or privilege is waived by any
> transmission
> > to an unintended recipient. If you are not an intended recipient,
> please
> > notify the sender and delete this message immediately. Any views
> expressed
> > in this message are those of the sender, not those of any entity
> within the
> > KBC Financial Products group of companies (together referred to as
> "KBC
> > FP"). 
> > 
> > This message does not create any obligation, contractual or otherwise,
> on
> > the part of KBC FP. It is not an offer (or solicitation of an offer)
> of, or
> > a recommendation to buy or sell, any financial product. Any prices or
> other
> > values included in this message are indicative only, and do not
> necessarily
> > represent current market prices, prices at which KBC FP would enter
> into a
> > transaction, or prices at which similar transactions may be carried on
> KBC
> > FP's own books. The information contained in this message is provided
> "as
> > is", without representations or warranties, express or implied, of any
> > kind. Past performance is not indicative of future returns.
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> This message may contain confidential, proprietary, or legally privileged
> information. No confidentiality or privilege is waived by any transmission
> to an unintended recipient. If you are not an intended recipient, please
> notify the sender and delete this message immediately. Any views expressed
> in this message are 

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Dave: 

I downloaded this source code, but it's just the main Struts core, as
far as I can tell. That's been helpful, but there are still gaps where
control is passed to the Struts Tiles plug-in. 

Does anyone know where the source for the plug-in is? 

I've hit a total dead-end on the Apache site:
http://struts.apache.org/2.0.6/index.html
Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
Click Tiles Plugin: http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
And then I end up here:
http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
That has a link labelled "downloads", but it just takes me back to the
main Struts Downloads page in a loop. Honestly, in order to even get the
jar in the first place, I had to "cheat" and get Maven to download it
for me from a repository, but those don't keep the source. 

I also tried another path, and ended up in a framework site of
documentation headers. That has this page:
http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
y.html
But the URL its gives for the SVN repository responds with a 404.

Does anyone know a valid URL for the SVN repository, or a link to a
ZIP/TAR/whatever file?

~DVA


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 2:51 PM
To: Struts Users Mailing List
Subject: RE: Source for Struts Tiles Plugin?

See http://struts.apache.org/dev/builds.html; releases are under
/tags/STRUTS_2_n_n:

Source distros are also available, see
http://struts.apache.org/download.cgi
and follow the archive link http://archive.apache.org/dist/struts/. I
believe
there is a S2.0.9 source distro there.

Dave

--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:

> PS: I'm looking for v2.0.9 specifically, if that makes any difference.
> 
> -Original Message-
> From: Allen, Daniel 
> Sent: Tuesday, February 12, 2008 2:44 PM
> To: Struts Users Mailing List
> Subject: Source for Struts Tiles Plugin?
> 
> Hi. I'm trying to move a web app from Struts1/Tiles1 to
Struts2/Tiles2.
> Unsurprisingly, quite a few things are going wrong.
> 
> In particular, I have a tiles-def.xml file in WEB-INF/classes, and
it's
> not being picked up, or at least not being read properly. I was able
to
> trace through the definitions loading up to a point, and see that the
> correct file path is being given to
> ServletTilesApplicationContext.getResource(), but within that method
> there's a call to servletContext.getResource() which goes into the
> ConfiguredServletContext class. That class is part of the Struts Tiles
> Plugin jar, and I don't have the source to step inside and see what
> specifically is going wrong.  So, if anyone could give me a SVN or CVS
> command or provide a link to download the source, that would really
> help.
> 
> Thanks,
> ~Dan Allen
> 
> -- 
> This message may contain confidential, proprietary, or legally
privileged
> information. No confidentiality or privilege is waived by any
transmission
> to an unintended recipient. If you are not an intended recipient,
please
> notify the sender and delete this message immediately. Any views
expressed
> in this message are those of the sender, not those of any entity
within the
> KBC Financial Products group of companies (together referred to as
"KBC
> FP"). 
> 
> This message does not create any obligation, contractual or otherwise,
on
> the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or
> a recommendation to buy or sell, any financial product. Any prices or
other
> values included in this message are indicative only, and do not
necessarily
> represent current market prices, prices at which KBC FP would enter
into a
> transaction, or prices at which similar transactions may be carried on
KBC
> FP's own books. The information contained in this message is provided
"as
> is", without representations or warranties, express or implied, of any
> kind. Past performance is not indicative of future returns.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
v

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Actually, after all that, it turned out to be a stupid typo: my
 for DEFINITION_CONFIG pointed to tiles-def.xml and the
file was titlted tiles-defs.xml...

Thanks for the source link, though. That will no doubt continue to help.

~Dan Allen


-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 2:53 PM
To: Struts Users Mailing List
Subject: Re: Source for Struts Tiles Plugin?

Hi,

By default, Tiles2 use tiles.xml, you can add additional config files
via DEFINITIONS_CONFIG ->
http://tiles.apache.org/config-reference.html
Please check also DTD for tiles.xml, it was changed.


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: appfuse generated basic struts project how to access the logged in user from action

2008-02-12 Thread Prashant Khanal
hello all
anyway i got the answer but dunno whether or not it is appropriate
i wrapped the jsp snippet to hide it if the user is not logged in as

Welcome
, logout


To get the logged in user from the action i used :
SecurityContext ctx = SecurityContextHolder.getContext();
if (ctx != null) {
Authentication auth = ctx.getAuthentication();
User loggedInUser = (User) auth.getPrincipal();
}



On 2/13/08, Prashant Khanal <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I am working on the appfuse generated basic struts 2 project. It uses
> acegi as a security framework for authentication and authorization. How can
> i access the logged in user from the action?
> To show the logged in user in the header.jsp page i used a jstl tag
> provided by acegi as:
> Welcome, logout
> unfortunately this is also shown in login page as Welcome anonymous,
> logout :)
> how can i hide that based on whether or not the user is logged in?
>
>
> --
> Thanks,
> Prashant Khanal
>
>


-- 
Thanks,
Prashant Khanal
[EMAIL PROTECTED]
Solutions for your information
_
Yomari Pvt. Ltd.
HB Complex, Ekantakuna, Lalitpur.
G.P.O. Box: 21295
Kathmandu, Nepal
Tel: 977 (1) 5000111, 2113000
Fax: 977 (1) 5000157
http://www.yomari.com

Your guide to Nepal on the Net.
http://www.nepalhomepage.com


Re: Source for Struts Tiles Plugin?

2008-02-12 Thread Lukasz Lenart
Hi,

By default, Tiles2 use tiles.xml, you can add additional config files
via DEFINITIONS_CONFIG ->
http://tiles.apache.org/config-reference.html
Please check also DTD for tiles.xml, it was changed.


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Dave Newton
See http://struts.apache.org/dev/builds.html; releases are under
/tags/STRUTS_2_n_n.

Source distros are also available, see http://struts.apache.org/download.cgi
and follow the archive link http://archive.apache.org/dist/struts/. I believe
there is a S2.0.9 source distro there.

Dave

--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote:

> PS: I'm looking for v2.0.9 specifically, if that makes any difference.
> 
> -Original Message-
> From: Allen, Daniel 
> Sent: Tuesday, February 12, 2008 2:44 PM
> To: Struts Users Mailing List
> Subject: Source for Struts Tiles Plugin?
> 
> Hi. I'm trying to move a web app from Struts1/Tiles1 to Struts2/Tiles2.
> Unsurprisingly, quite a few things are going wrong.
> 
> In particular, I have a tiles-def.xml file in WEB-INF/classes, and it's
> not being picked up, or at least not being read properly. I was able to
> trace through the definitions loading up to a point, and see that the
> correct file path is being given to
> ServletTilesApplicationContext.getResource(), but within that method
> there's a call to servletContext.getResource() which goes into the
> ConfiguredServletContext class. That class is part of the Struts Tiles
> Plugin jar, and I don't have the source to step inside and see what
> specifically is going wrong.  So, if anyone could give me a SVN or CVS
> command or provide a link to download the source, that would really
> help.
> 
> Thanks,
> ~Dan Allen
> 
> -- 
> This message may contain confidential, proprietary, or legally privileged
> information. No confidentiality or privilege is waived by any transmission
> to an unintended recipient. If you are not an intended recipient, please
> notify the sender and delete this message immediately. Any views expressed
> in this message are those of the sender, not those of any entity within the
> KBC Financial Products group of companies (together referred to as "KBC
> FP"). 
> 
> This message does not create any obligation, contractual or otherwise, on
> the part of KBC FP. It is not an offer (or solicitation of an offer) of, or
> a recommendation to buy or sell, any financial product. Any prices or other
> values included in this message are indicative only, and do not necessarily
> represent current market prices, prices at which KBC FP would enter into a
> transaction, or prices at which similar transactions may be carried on KBC
> FP's own books. The information contained in this message is provided "as
> is", without representations or warranties, express or implied, of any
> kind. Past performance is not indicative of future returns.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
PS: I'm looking for v2.0.9 specifically, if that makes any difference.

-Original Message-
From: Allen, Daniel 
Sent: Tuesday, February 12, 2008 2:44 PM
To: Struts Users Mailing List
Subject: Source for Struts Tiles Plugin?

Hi. I'm trying to move a web app from Struts1/Tiles1 to Struts2/Tiles2.
Unsurprisingly, quite a few things are going wrong.

In particular, I have a tiles-def.xml file in WEB-INF/classes, and it's
not being picked up, or at least not being read properly. I was able to
trace through the definitions loading up to a point, and see that the
correct file path is being given to
ServletTilesApplicationContext.getResource(), but within that method
there's a call to servletContext.getResource() which goes into the
ConfiguredServletContext class. That class is part of the Struts Tiles
Plugin jar, and I don't have the source to step inside and see what
specifically is going wrong.  So, if anyone could give me a SVN or CVS
command or provide a link to download the source, that would really
help.

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Hi. I'm trying to move a web app from Struts1/Tiles1 to Struts2/Tiles2.
Unsurprisingly, quite a few things are going wrong.

In particular, I have a tiles-def.xml file in WEB-INF/classes, and it's
not being picked up, or at least not being read properly. I was able to
trace through the definitions loading up to a point, and see that the
correct file path is being given to
ServletTilesApplicationContext.getResource(), but within that method
there's a call to servletContext.getResource() which goes into the
ConfiguredServletContext class. That class is part of the Struts Tiles
Plugin jar, and I don't have the source to step inside and see what
specifically is going wrong.  So, if anyone could give me a SVN or CVS
command or provide a link to download the source, that would really
help.

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.



javax.servlet.UnavailableException: java.net.UnknownHostException: java.sun.com at org.apache.struts.action.ActionServlet.init(ActionServlet.java:408)

2008-02-12 Thread Haroon Rasheed
Recently I have upgraded from Struts 1.1 to Struts 1.3.8. I get the
following exception during server-startup.( when I run Resin 3.1.3 -with out
internet access).

My Server starts successfully without any Struts issues if I've internet
access.

I checked for all the DTDs/XSDs & TLD files which have 'java.sun.com' as
part of the URI.

Currently I have the following TLD/DTD files presentunder \resin-
pro-3.1.3\webapps\\WEB-INF\tld

permittedTaglibs.tld
fn.tld
validator-rules_1_1.dtd
x-1_0-rt.tld
struts-bean.tld
yoshida.tld
web-app_2_3.dtd
c.tld
SUN_MICR.SF
x-1_0.tld
fmt.tld
struts-nested.tld
struts-config_1_0.dtd
tiles-config_1_1.dtd
c-1_0.tld
sql-1_0-rt.tld
fmt-1_0-rt.tld
struts-html.tld
struts-logic.tld
taglibs-session.tld
struts-html-el.tld
x.tld
tiles-config.dtd
web-app_2_2.dtd
struts-template.tld
SUN_MICR.RSA
sql.tld
struts-form.tld
taglibs-request.tld
struts.tld
scriptfree.tld
validation_1_1.dtd
struts-bean-el.tld
c-1_0-rt.tld
taglibs-log.tld
struts-logic-el.tld
pack.properties
x-rt.tld
struts-tiles.tld
fmt-1_0.tld
struts-config_1_1.dtd
sql-1_0.tld
MANIFEST.MF
web-jsptaglibrary_2_0.xsd
web-jsptaglibrary_1_1.dtd
web-jsptaglibrary_1_2.dtd

I would like to know, which DTD/TLD/XSD file is causing ActionServlet-init
to throw the following error. Recently while  I read at
http://struts.apache.org/1.x/userGuide/installation-was352-x.html

For whatever reason, some installations do not like XML files that reference
PUBLIC DTD's - if in looking at the default_host_stdout.log file you see
errors about invalid public URL references during DTD registrations, or if
your pages say "cannot find //logon or //saveRegistration (ie. action
mappings) then do the following:

   1. Stop Default Server
   2. Go to servlets\WEB-INF\ and edit web.xml and struts_config.xml.
   3. In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and
   completely remove the line that reads "-//Sun Microsystems, Inc.//DTD Web
   Application 2.2//EN" from web.xml and remove "-//Apache Software
   Foundation//DTD Struts Configuration 1.0//EN" from struts-config.xml.


I

Appreciate your help in getting rid of this exception.

Error Logs:


[06:00:12.609] javax.servlet.UnavailableException:
java.net.UnknownHostException: java.sun.com
[06:00:12.609] at org.apache.struts.action.ActionServlet.init(
ActionServlet.java:408)
[06:00:12.609] at javax.servlet.GenericServlet.init(GenericServlet.java:70)
[06:00:12.609] at
com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(
ServletConfigImpl.java:789)
[06:00:12.609] at com.caucho.server.dispatch.ServletConfigImpl.createServlet
(ServletConfigImpl.java:716)
[06:00:12.609] at com.caucho.server.dispatch.ServletManager.init(
ServletManager.java:150)
[06:00:12.609] at com.caucho.server.webapp.WebApp.start(WebApp.java:1800)
[06:00:12.609] at com.caucho.server.deploy.DeployController.startImpl(
DeployController.java:646)
[06:00:12.609] at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(
StartAutoRedeployAutoStrategy.java:72)
[06:00:12.609] at com.caucho.server.deploy.DeployController.startOnInit(
DeployController.java:528)
[06:00:12.609] at com.caucho.server.deploy.DeployContainer.start(
DeployContainer.java:163)
[06:00:12.609] at com.caucho.server.webapp.WebAppContainer.start(
WebAppContainer.java:675)
[06:00:12.609] at com.caucho.server.host.Host.start(Host.java:437)
[06:00:12.609] at com.caucho.server.deploy.DeployController.startImpl(
DeployController.java:646)
[06:00:12.609] at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(
StartAutoRedeployAutoStrategy.java:72)
[06:00:12.609] at com.caucho.server.deploy.DeployController.startOnInit(
DeployController.java:528)
[06:00:12.609] at com.caucho.server.deploy.DeployContainer.start(
DeployContainer.java:163)
[06:00:12.609] at com.caucho.server.host.HostContainer.start(
HostContainer.java:479)
[06:00:12.609] at com.caucho.server.cluster.Server.start(Server.java:1151)
[06:00:12.609] at
com.caucho.server.cluster.Cluster.startServer(Cluster.java:719)

[06:00:12.609] at com.caucho.server.cluster.ClusterServer.startServer(
ClusterServer.java:455)
[06:00:12.609] at com.caucho.server.resin.Resin.start(Resin.java:694)
[06:00:12.609] at com.caucho.server.resin.Resin.initMain(Resin.java:1114)
[06:00:12.609] at com.caucho.server.resin.Resin.main(Resin.java:1316)

Thanks!


Re: How to redirect to the same page

2008-02-12 Thread Dravid

thanks for reply,
I have not implemented any Authentication and Authorization. I want to do it
manually using struts2 tags



Wes Wannemacher wrote:
> 
> How are you performing the Authentication and Authorization? If you
> are using container managed security, this will be done automagically.
> As an example, here are the docs for setting this up in Tomcat 5.5.x
> ->
> 
> http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
> 
> -Wes
> 
> On 2/12/08, Dravid <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> After a successful login I don't want to redirect the user to a hardcodes
>> page, but I want the user to be redirected where he wanted to go. E.g. if
>> a
>> user clicks on 'sell' he will be forced to log in and after login the
>> sell-page should be shown. If he clicks on buy the buy-page should be
>> shown
>> after login. Is there an elegant way to do this?"
>>
>> please help with a piece of code.
>>
>> thanks in advance
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-redirect-to-the-same-page-tp15436570p15436570.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Wesley Wannemacher
> President, Head Engineer/Consultant
> WanTii, Inc.
> http://www.wantii.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-to-the-same-page-tp15436570p15439623.html
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: [OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Wes Wannemacher
I use maven + struts + eclipse + tomcat as my primary dev environment.
After having maven create the archetype, you should also go into the
project directory and do 'mvn eclipse:eclipse -Dwtpversion=1.5' This
will create .project and a few other files that will help eclipse do
what it needs to do. Also, you have to setup a variable called
M2_REPO. If you look at eclipse's 'Build Path' setting for your
project, you'll likely see a bunch of references to it, but if it's
undefined, none of the jars will be found. It should be pretty easy to
figure out where to have M2_REPO point by looking at the entries for
Build Path.

On 2/12/08, Gaurav Arora <[EMAIL PROTECTED]> wrote:
> The application works when I make a war and deploy it in tomcat but
> not when I try to run tomcat from eclipse directly. It's obvious that
> the problem has something to do with eclipse, so you're right, this
> probably isn't the forum for it.
>
> But i'm still wondering if people still use the Eclipse + Maven +
> Struts + Tomcat combo and if so, how they go about managing their
> projects.
>
>
> On Feb 12, 2008 10:39 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > Tried to put a namespace="/" attribute in package tag, that didn't
> > > work. Where do I find the config-browser plugin?
> >
> > It's a standard S2 plugin shipped with the distro.
> >
> > > Yeah, I get an error when I access
> > > http://localhost:8080/application/index.action. The struts.xml file is
> > > in the classes directory.
> >
> > Is it deployed properly? Have you turned logging all the way up? Is devMode
> > turned on? Is there anything in the logs?
> >
> > > As for the eclipse build, I changed the default output directory to
> > > "bin" but eclipse still won't build my application.
> >
> > If you're running the app within Eclipse using its app server the output
> > directory should be /WEB-INF/classes. If you're using some sort of 
> > deployment
> > mechanism then it doesn't matter as long as you have it configured properly.
> >
> > "Eclipse still won't build my application" is not enough information with
> > which to provide a diagnosis, even if this *was* the correct forum for your
> > IDE issues, which it isn't.
> >
> > Did you put the required libraries in /WEB-INF/lib? Did you configure the
> > project properties to make sure the libraries are being included?
> >
> > Dave
> >
> > > On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > > > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > > > 
> > > > >   
> > > > >   
> > > > >   /jsp/index.jsp
> > > > >   
> > > > >   
> > > > >   /jsp/index.jsp
> > > > >   /jsp/helloWorld.jsp
> > > > >   
> > > > >   
> > > > > 
> > > >
> > > > What happens if you put a namespace="/" attribute in your 
> > > > element? What does the config-browser plugin show? You get the exception
> > > when
> > > > accessing /index.action?
> > > >
> > > > > how can I build my struts project using eclipse instead of maven?
> > > >
> > > > By putting the required S2 libraries (and whatever else you need) in 
> > > > your
> > > > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> > > application
> > > > build. There are a couple Maven plugins for Eclipse that help with
> > > dependency
> > > > management, but I'm not sure how they deal with packaging etc.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect to the same page

2008-02-12 Thread Wes Wannemacher
How are you performing the Authentication and Authorization? If you
are using container managed security, this will be done automagically.
As an example, here are the docs for setting this up in Tomcat 5.5.x
->

http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html

-Wes

On 2/12/08, Dravid <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> After a successful login I don't want to redirect the user to a hardcodes
> page, but I want the user to be redirected where he wanted to go. E.g. if a
> user clicks on 'sell' he will be forced to log in and after login the
> sell-page should be shown. If he clicks on buy the buy-page should be shown
> after login. Is there an elegant way to do this?"
>
> please help with a piece of code.
>
> thanks in advance
> --
> View this message in context: 
> http://www.nabble.com/How-to-redirect-to-the-same-page-tp15436570p15436570.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Doubleselect tag

2008-02-12 Thread Stanley, Eric
I have 3 selects that I'd like to chain together using a similar
construct as the  tag. Is this possible if not, what
can/should I use?

-Ryan 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 3:18 PM
To: Struts Users Mailing List
Subject: Re: Doubleselect tag

Hey brah --

I actually have not been back to it yet, but I think your remarks about
the dot notation is on the mark!

Scott

On Feb 1, 2008 4:04 PM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- [EMAIL PROTECTED] wrote:
> > I'll drop the m on the Manning site in a couple minutes.
>
> "anning"?
>
> Did you get the #request issue worked out? I probably missed your 
> followup.
>
> d.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Scott
[EMAIL PROTECTED]


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Alternative to html frames

2008-02-12 Thread Frank W. Zammetti
I think it all comes down to whether the "different application/jsp"'s 
are in the same domain.  If they are, then iFrames might do the trick 
nicely.  Note that even if they are different subdomains, you can still 
do cross-frame scripting, it just requires some playing around with the 
document.domain attribute (this isn't something I've personally had to 
do, but I've read about it).  If it's entirely different domains, then 
you're pretty close to dead in the water with frames (Brantley hinted at 
some ways around this in his reply, but it's probably fair to say that 
all those ways fall in the category of high hackery, so I for one would 
tend to avoid them).


Why your bottom frame gets "kicked out" when you get your customer 
details, I'm not sure... I think you must be submitting a form in the 
bottom frame that has no target, and therefore it replaces what's in 
that frame.  That makes sense, and it's what it should do.  What you'd 
need to do instead is target a different frame, so the results of the 
submit appears there.  It may be your top frame, or it may be a third 
frame that you need to add and organize so it's in the right place 
relative to your existing frames.


But, I'll also say this: from what you've said, it doesn't really sound 
like you have truly independent applications to host.  If that's the 
case, then iFrames probably *aren't* the write choice, something more 
AJAXy with 's almost certainly is.  If everything is within the 
same domain (which doesn't mean the same server necessarily remember), 
then iFrames vs. s is pretty close to a wash for all intents and 
purposes (with the caveats Brantley enumerated still being valid).  I'd 
probably go with s in that case just for the sake of simplicity and 
being more "politically correct", but in practice the differences 
wouldn't be *that* great.


By the way, anyone that says X, Y or Z is EVIL and should never be used 
is, in my opinion, very likely not worth listening to.  As much as I 
dislike JSF, and am on record numerous times as saying as much, I've 
also always said it may well be the right choice in some situations. 
I've never, as far as I remember, said it was evil and should never be 
used, and people would be right to simply ignore me if I did.  Same goes 
for iFrames, or anything else.  There's certainly some things to 
consider before choosing iFrames, as Brantley pointed out, but someone 
that simply dismisses them out of hand as your colleague seem to be 
doing probably isn't the first person who's opinion you should put much 
stock in :)


I mean, we've all heard the admonishment about not using a screw driver 
as a hammer because it's not the right tool for the job, and we'd all 
agree with that I'm sure.  But, sometimes a screwdriver is all you have, 
so a screwdriver it is!  And what's more, you might be working in a 
confined space where a hammer wouldn't fit, but a screwdriver does :)


Frank

--
Frank W. Zammetti
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
and "Practical DWR 2 Projects"
 (2008, Apress, ISBN 1-59059-941-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

Marc Eckart wrote:

Hi Frank,

thank you and all others for your answers ;-)

We have a similar aproach like you described. We have an application which
acts as a portal. This application has two frames - one top frame for the
navigation and another frame for hosting the embbeded (independet)
application.
One of this embbeded application is a customer search where you can select a
customer, who can be used in another application. We have a customercontext,
which exchanges the data of the customer between the applications. So the
selected customer  is just shown in the customer search and it is necessary
to reimplement the displaying of the selected customer in every application
where it should appear.

So I want to put the displaying of the selected customer in the portal top
frame to have it visible for all applications. The Problem is, when I want
to display customer details, I have to call a different application/jsp
which should display the details. But this whatever kind of display kicks
the current application out of the bottom frame. That's when my thinking
went to iframe :-) So I now have just one website, no frameset and I can put
a ajax filled div tag over the iframe to display the customer details (I
haven't tested this yet, so I don't know if it's really working :-)

I asked some colleagues, what they think about it and they said iframes are
EVIL :-) So thats why I asked to have another oppinions.

I'm not sure if portlet container can help me with this issue.

Best regards,
Marc

2008/2/12, Frank W. Zammetti <[EMAIL PROTECTED]>:

Antonio Petrelli wrote:

Frank, you might love this article :-)


http://thedailywtf.com/Articles/I-am-right

Re: Get current URL on a page

2008-02-12 Thread Dave Newton
Don't recall off-hand; IIRC there's a request wrapper that has a getRequest()
method that I thought returned the underlying request, but I could be
off-target on that one.

Personally I still think exposing the request via the action is a better way
of doing it, if this is the way you're going to implement this functionality.

Dave

--- Tommy Becker <[EMAIL PROTECTED]> wrote:

> Ugh.  Thanks for the info, but now there's another problem.   I'm using 
> Tiles 2, and apparently it's manipulating the request url.  When I do 
> this, I'm getting back the url to the Tiles template I'm using to render 
> the page, not the originally requested url  Any ideas on how to get 
> around that?
> 
> 
> Dave Newton wrote:
> > --- Tommy Becker <[EMAIL PROTECTED]> wrote:
> >   
> >> Unfortunately it is.  I'm creating a url to another site using  
> >> and passing the current url as a parameter.  I suppose I don't *have* to
> 
> >> use   Is it not possible?
> >> 
> >
> > The S2 OGNL docs say there's access to the request *context*, which means
> the
> > request attributes.
> >
> > If you're doing this in the result of an S2 action one way would be to
> expose
> > the request in the action. If you're a glutton:
> >
> >  >
>
value="#context.get('com.opensymphony.xwork2.dispatcher.HttpServletRequest').getRequestURL()"/>
> >
> > Dave
> >
> >   
> >> Randy Burgess wrote:
> >> 
> >>> If the value is not going into a struts tag then just use JSTL.
> >>>   
>  From: Tommy Becker <[EMAIL PROTECTED]>
> 
>  Is there a way to get the URL for the current page using struts tags? 
> I
>  thought I had access to the HttpRequest, and therefore could just use
>  getRequestURL() but it appears the docs have led me astray :/
>  
> 
>  
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >   
> 
> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information of
> Motricity.  Any unauthorized review, use, disclosure or distribution is
> prohibited.  If you are not the intended recipient, please contact the
> sender by reply e-mail and destroy all copies of the original message.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get current URL on a page

2008-02-12 Thread Tommy Becker
Ugh.  Thanks for the info, but now there's another problem.   I'm using 
Tiles 2, and apparently it's manipulating the request url.  When I do 
this, I'm getting back the url to the Tiles template I'm using to render 
the page, not the originally requested url  Any ideas on how to get 
around that?



Dave Newton wrote:

--- Tommy Becker <[EMAIL PROTECTED]> wrote:
  
Unfortunately it is.  I'm creating a url to another site using  
and passing the current url as a parameter.  I suppose I don't *have* to 
use   Is it not possible?



The S2 OGNL docs say there's access to the request *context*, which means the
request attributes.

If you're doing this in the result of an S2 action one way would be to expose
the request in the action. If you're a glutton:



Dave

  

Randy Burgess wrote:


If the value is not going into a struts tag then just use JSTL.
  

From: Tommy Becker <[EMAIL PROTECTED]>

Is there a way to get the URL for the current page using struts tags?  I
thought I had access to the HttpRequest, and therefore could just use
getRequestURL() but it appears the docs have led me astray :/






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
The application works when I make a war and deploy it in tomcat but
not when I try to run tomcat from eclipse directly. It's obvious that
the problem has something to do with eclipse, so you're right, this
probably isn't the forum for it.

But i'm still wondering if people still use the Eclipse + Maven +
Struts + Tomcat combo and if so, how they go about managing their
projects.


On Feb 12, 2008 10:39 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > Tried to put a namespace="/" attribute in package tag, that didn't
> > work. Where do I find the config-browser plugin?
>
> It's a standard S2 plugin shipped with the distro.
>
> > Yeah, I get an error when I access
> > http://localhost:8080/application/index.action. The struts.xml file is
> > in the classes directory.
>
> Is it deployed properly? Have you turned logging all the way up? Is devMode
> turned on? Is there anything in the logs?
>
> > As for the eclipse build, I changed the default output directory to
> > "bin" but eclipse still won't build my application.
>
> If you're running the app within Eclipse using its app server the output
> directory should be /WEB-INF/classes. If you're using some sort of deployment
> mechanism then it doesn't matter as long as you have it configured properly.
>
> "Eclipse still won't build my application" is not enough information with
> which to provide a diagnosis, even if this *was* the correct forum for your
> IDE issues, which it isn't.
>
> Did you put the required libraries in /WEB-INF/lib? Did you configure the
> project properties to make sure the libraries are being included?
>
> Dave
>
> > On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > > 
> > > >   
> > > >   
> > > >   /jsp/index.jsp
> > > >   
> > > >   
> > > >   /jsp/index.jsp
> > > >   /jsp/helloWorld.jsp
> > > >   
> > > >   
> > > > 
> > >
> > > What happens if you put a namespace="/" attribute in your 
> > > element? What does the config-browser plugin show? You get the exception
> > when
> > > accessing /index.action?
> > >
> > > > how can I build my struts project using eclipse instead of maven?
> > >
> > > By putting the required S2 libraries (and whatever else you need) in your
> > > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> > application
> > > build. There are a couple Maven plugins for Eclipse that help with
> > dependency
> > > management, but I'm not sure how they deal with packaging etc.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get current URL on a page

2008-02-12 Thread Dave Newton
--- Dave Newton <[EMAIL PROTECTED]> wrote:
> 
value="#context.get('com.opensymphony.xwork2.dispatcher.HttpServletRequest').getRequestURL()"/>

Too much cut, not enough paste:



Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Alternative to html frames

2008-02-12 Thread Brantley Hobbs

Ya know, this triggers a question of my own:

I have apps that use *tons* of iframes, and there *are* some drawbacks:

1.  Without some sort of "onload()" built-in to every page, there's no 
way of knowing if the frame has loaded when you update its .src 
attribute.  With an AJAX filled div, you'd know because the 
xmlhttprequest object changes states (of course, there's still rendering 
time, but at least you know your server response came back).
2.  Browsers sometimes render iframes inconsistently (I'm referring to 
the application of style attributes, not to the loading of the iframe).  
Divs are usually a little more predictable.

And the worst:
3.  If you load a frame from some other domain, you really have to jump 
through hoops to get around the cross-domain scripting security features 
built into the browser.


None of these are show-stoppers, but some are annoying enough that I 
started trying to rework my little homebrew application layout with 
divs.  This caused some problems when I realized that simply setting the 
.innerhtml attribute on the div wasn't good enough.  The HTML rendered, 
but things like 

Re: struts 2 request.getPramter - ActionContext

2008-02-12 Thread Dave Newton
--- Jneto <[EMAIL PROTECTED]> wrote:
> I work with struts 1 and I get paramters this way :
> 
> String v_name = request.getParameter("name");
> 
> How do I do with struts 2 in my Action attached?

public setName(String name) {
v_name = name;
}

then access via v_name or a getName() method.

There are a couple of other ways, too, like implementing ParameterAware or,
as you are asking about, directly accessing the request, which isn't a great
idea.

I'd suggest looking through some of the S2 documentation on the wiki [1, 2,
3].

Dave

[1] http://struts.apache.org/2.x/docs/home.html
[2]
http://struts.apache.org/2.x/docs/how-can-we-access-request-parameters-passed-into-an-action.html
[3] http://struts.apache.org/2.x/docs/coding-actions.html



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to redirect to the same page

2008-02-12 Thread Dravid

Hi,

After a successful login I don't want to redirect the user to a hardcodes
page, but I want the user to be redirected where he wanted to go. E.g. if a
user clicks on 'sell' he will be forced to log in and after login the
sell-page should be shown. If he clicks on buy the buy-page should be shown
after login. Is there an elegant way to do this?"

please help with a piece of code.

thanks in advance
-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-to-the-same-page-tp15436570p15436570.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Dave Newton
--- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> Tried to put a namespace="/" attribute in package tag, that didn't
> work. Where do I find the config-browser plugin?

It's a standard S2 plugin shipped with the distro.

> Yeah, I get an error when I access
> http://localhost:8080/application/index.action. The struts.xml file is
> in the classes directory.

Is it deployed properly? Have you turned logging all the way up? Is devMode
turned on? Is there anything in the logs?

> As for the eclipse build, I changed the default output directory to
> "bin" but eclipse still won't build my application.

If you're running the app within Eclipse using its app server the output
directory should be /WEB-INF/classes. If you're using some sort of deployment
mechanism then it doesn't matter as long as you have it configured properly.

"Eclipse still won't build my application" is not enough information with
which to provide a diagnosis, even if this *was* the correct forum for your
IDE issues, which it isn't.

Did you put the required libraries in /WEB-INF/lib? Did you configure the
project properties to make sure the libraries are being included?

Dave

> On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > 
> > >   
> > >   
> > >   /jsp/index.jsp
> > >   
> > >   
> > >   /jsp/index.jsp
> > >   /jsp/helloWorld.jsp
> > >   
> > >   
> > > 
> >
> > What happens if you put a namespace="/" attribute in your 
> > element? What does the config-browser plugin show? You get the exception
> when
> > accessing /index.action?
> >
> > > how can I build my struts project using eclipse instead of maven?
> >
> > By putting the required S2 libraries (and whatever else you need) in your
> > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> application
> > build. There are a couple Maven plugins for Eclipse that help with
> dependency
> > management, but I'm not sure how they deal with packaging etc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get current URL on a page

2008-02-12 Thread Dave Newton
--- Tommy Becker <[EMAIL PROTECTED]> wrote:
> Unfortunately it is.  I'm creating a url to another site using  
> and passing the current url as a parameter.  I suppose I don't *have* to 
> use   Is it not possible?

The S2 OGNL docs say there's access to the request *context*, which means the
request attributes.

If you're doing this in the result of an S2 action one way would be to expose
the request in the action. If you're a glutton:



Dave

> Randy Burgess wrote:
> > If the value is not going into a struts tag then just use JSTL.
> >> From: Tommy Becker <[EMAIL PROTECTED]>
> >>
> >> Is there a way to get the URL for the current page using struts tags?  I
> >> thought I had access to the HttpRequest, and therefore could just use
> >> getRequestURL() but it appears the docs have led me astray :/
> >> 
> >>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxTag 1.3 support?

2008-02-12 Thread Pablo Vázquez Blázquez

Why would yo advise not to use ajaxtags?? Is it incompatible with dojo?

Thanks.

Musachy Barroso escribió:

sorry to be late to this discussion. Dave and Jeromy are right on the
spot. I would advise not to use ajaxtags project and go with what
Struts 2 provides, or use YUI which will play nicely with JSON.

musachy

On Feb 4, 2008 11:57 AM, Griffith, Michael *
<[EMAIL PROTECTED]> wrote:
  

Jeromy,

Again, thanks for the reply. I appreciate your help!

Following your example below, I can see the JSON result in the app
server console when the action called, but I get the following error in
the browser:

FATAL exception raised: TypeError: Value undefined (result of expression
this.data[x][0].toLowerCase) is not object.

What is this telling me?

-- my Struts mapping:



list




-- My Form:




-- My Action:
public class QuestionSearchAction extends BaseAction {

/**
 *
 */
private static final long serialVersionUID =
1127012585409657094L;

Question[] list;
private QuestionService questionService;

public void setQuestionService(QuestionService questionService)
{
this.questionService = questionService;
}

public String execute() {
List all= questionService.getQuestions();
list= all.toArray( new Question[all.size()]);
return SUCCESS;
 }

public Question[] getList(){
return list;
}

}


Cheers!
mg

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 02, 2008 6:15 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?


I completely agree with Dave so I'll take a different tact.

Based on this example:
http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-autocomplet
erTag,
I would also take the approach of returning a JSON Result via the JSON
Plugin.  Only the configuration changes for an XML result.

So, my form looks like this:




So, my struts.xml contains the corresponding action definition with a
JSON result:


   
   
  list
   
   
 

And my action method looks like this:

private ACEntry[] list;

public String execute() {
list = populateList()
return "success";
 }

public ACEntry[] getList() {
   return list;
}

---
In summary, the autocompleter does a get to /JSONList.action
Struts2 executes the execute method of ListAction
The execute method creates a structure that will populate the
autocompleter
The action returns a JSON result type
The JSON plugin converts the root object (the list property only rather
than the whole action) to a JSON structure
The JSON plugin returns the application/json content to the
autocompleter

I'll leave it to you to determine what the list structure should like
like.  As it'll probably be re-use I'd create a bean for the purpose.
Use the FireBug plugin for firefox to inspect the format of the JSON
result to ensure it matches the format required by the javascript
library (or even better, write a unit test).
This will work with any javascript library that accepts JSON - you just
have to provide an appropriate structure.  It will also work with any
library that requires an XML response, except you'd use an XML result
type like I previously described in this thread.

I hope that helps.  Struts2 is really well suited at providing non-html
responses if you take the time to understand the ResultType
architecture.

cheers,
 Jeromy Evans

Dave Newton wrote:


--- "Griffith, Michael *" <[EMAIL PROTECTED]> wrote:

  

Thanks for the comprehensive reply. Looking at the documentation and


the


example app, I am still not sure how to configure my action/response.


I


am using tiles 2.



As previously stated if you are writing directly to the response you
  

need to


return null from the action. I am still not sure why you're using a
  

tile


definition here.



  

It seems I need to return my result in JSON format correct? By


returning


a JSON String from the action, how to I configure my response?



As Jeremy said this is, however, probably a bad idea, considering that
  

the


same outcome can be achieved in several different ways.

Using a JSON result will serialize your action to JSON automagically.
  

You'd


use a "json" result (via the JSON plugin), not a tile. Or you could
  

build the


JSON manually and configure a FreeMarker result.


  

If I use the tiles response type, I get a dojo parsing error because


the


whole page is returned from the reply.



Sure.


  

The example in the example app isn't very clear to me, as the action
returns a .JS file with the result hard coded, and not using any
template like tiles I might add.



Wha

struts 2 request.getPramter - ActionContext

2008-02-12 Thread Jneto

Hi 
All
I need a help about the ActionContext 

ActionContext context = ActionContext.getContext();

I work with struts 1 and I get paramters this way :

String v_name = request.getParameter("name");

How do I do with struts 2 in my attached Action ?

Thanks 




//=My Action==


package example;

import java.text.SimpleDateFormat;   
import java.util.ArrayList;
import java.util.Date;   
import java.util.List;
import java.util.Map;   
  
import org.apache.struts2.interceptor.SessionAware;   
  
  
import com.opensymphony.xwork2.Action;   
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;   
import example.ClienteBean;
import example.ClienteDAO;


import java.util.Map;   
  
public class teste extends ActionSupport implements SessionAware{   
   
   private static final long serialVersionUID = -300519118088286674L;   
  
 
public String execute(){

ActionContext context = ActionContext.getContext();

//=I need to get the parameter right  here, What do I do?


return "sucess"; 
   
}


@Override
public void setSession(Map arg0) {
// TODO Auto-generated method stub

}   





} 
-- 
View this message in context: 
http://www.nabble.com/struts-2-request.getPramter---ActionContext-tp15434537p15434537.html
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: appfuse generated basic struts project how to access the logged in user from action

2008-02-12 Thread Jeromy Evans

Prashant Khanal wrote:


To get the logged in user from the action i used :
SecurityContext ctx = SecurityContextHolder.getContext();
if (ctx != null) {
Authentication auth = ctx.getAuthentication();
User loggedInUser = (User) auth.getPrincipal();
}

  


As an alternative, your action may implement PrincipalAware

http://struts.apache.org/2.x/docs/servlet-config-interceptor.html

The advantage of PrincipalAware over the static call above is that it's 
easier to unit-test your action outside of the servlet context and it's 
clear to other developers that the action requires the principal.


regards,
Jeromy Evans

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
Tried to put a namespace="/" attribute in package tag, that didn't
work. Where do I find the config-browser plugin?

Yeah, I get an error when I access
http://localhost:8080/application/index.action. The struts.xml file is
in the classes directory.

As for the eclipse build, I changed the default output directory to
"bin" but eclipse still won't build my application.

On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > 
> >   
> >   
> >   /jsp/index.jsp
> >   
> >   
> >   /jsp/index.jsp
> >   /jsp/helloWorld.jsp
> >   
> >   
> > 
>
> What happens if you put a namespace="/" attribute in your 
> element? What does the config-browser plugin show? You get the exception when
> accessing /index.action?
>
> > how can I build my struts project using eclipse instead of maven?
>
> By putting the required S2 libraries (and whatever else you need) in your
> /WEB-INF/lib directory and setting up Eclipse to do a normal web application
> build. There are a couple Maven plugins for Eclipse that help with dependency
> management, but I'm not sure how they deal with packaging etc.
>
> Dave
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Dave Newton
--- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> 
>   
>   
>   /jsp/index.jsp
>   
>   
>   /jsp/index.jsp
>   /jsp/helloWorld.jsp
>   
>   
> 

What happens if you put a namespace="/" attribute in your 
element? What does the config-browser plugin show? You get the exception when
accessing /index.action?

> how can I build my struts project using eclipse instead of maven?

By putting the required S2 libraries (and whatever else you need) in your
/WEB-INF/lib directory and setting up Eclipse to do a normal web application
build. There are a couple Maven plugins for Eclipse that help with dependency
management, but I'm not sure how they deal with packaging etc.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Lukasz Lenart
Set package namespace to "/"




Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic setup question (tiles 2)

2008-02-12 Thread Lukasz Lenart
Thanks for clarification!


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
I created a new struts project using the maven archetype and then
imported it into eclipse. However when I try to run this project on
tomcat (through eclipse) i keep getting the following error :

Feb 12, 2008 9:15:00 PM org.apache.struts2.dispatcher.Dispatcher serviceAction
SEVERE: Could not find action or result
There is no Action mapped for namespace / and action name index. -
[unknown location]
at 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
at 
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
at 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at 
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)

My struts.xml is as follows :


http://struts.apache.org/dtds/struts-2.0.dtd";>




/jsp/index.jsp


/jsp/index.jsp
/jsp/helloWorld.jsp





I tried all combinations for the "name" attribute of the package tag
but it doesn't work. Is there an easier way to do this? Also, how can
I build my struts project using eclipse instead of maven?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get current URL on a page

2008-02-12 Thread Tommy Becker
Unfortunately it is.  I'm creating a url to another site using  
and passing the current url as a parameter.  I suppose I don't *have* to 
use   Is it not possible?

/*

*/ 


Randy Burgess wrote:

If the value is not going into a struts tag then just use JSTL.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



  

From: Tommy Becker <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List 
Date: Tue, 12 Feb 2008 10:31:09 -0500
To: Struts Users Mailing List 
Subject: Get current URL on a page

Is there a way to get the URL for the current page using struts tags?  I
thought I had access to the HttpRequest, and therefore could just use
getRequestURL() but it appears the docs have led me astray :/



NOTICE: This e-mail message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information of Motricity.  Any
unauthorized review, use, disclosure or distribution is prohibited.  If you
are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this Message has 
been addressed to you in error, you are not authorized to read, copy, or distribute it, 
and we ask that you please delete it (including all copies) and notify the sender by 
return email.  Delivery of this Message to any person other than the intended 
recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic setup question (tiles 2)

2008-02-12 Thread Antonio Petrelli
2008/2/12, Lukasz Lenart <[EMAIL PROTECTED]>:
>
> when you using Struts 2.0.9 -> tiles version is 2.0.4. I think the pom
> for struts-tiles-plugin should contain such dependency, it looks like
> a bug (or maybe I'm wrong)?



It *was* a bug and it is fixed in Struts 2.1.x

Antonio


Re: Basic setup question (tiles 2)

2008-02-12 Thread Lukasz Lenart
Hi,

I've probably found  the problem, struts-tiles-plugin doesn't depend
on tiles-jsp. You have to manually added it your pom.xml, like below:


org.apache.tiles
tiles-jsp
2.0.4


when you using Struts 2.0.9 -> tiles version is 2.0.4. I think the pom
for struts-tiles-plugin should contain such dependency, it looks like
a bug (or maybe I'm wrong)?


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Alternative to html frames

2008-02-12 Thread Frank W. Zammetti

Antonio Petrelli wrote:

Frank, you might love this article :-)
http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong.aspx


Hehe :)

It's a good example of the typical "taking an idea too far".  The world 
seems to be divided into the people that say frames are evil and should 
never be used (and IIRC, they are removed in HTML 5, so apparently those 
guys feel that way too) or those that say frames are DA BOMB and should 
always be used.


I'm personally in neither camp.  I'm simply someone that has used frames 
a number of times over the years with great success.  They certainly 
aren't appropriate in every case, that's why I asked what the problems 
were that Marc was having.


Portals is one way to go, sure.  The last time I touched portals was a 
couple of years ago frankly, so maybe you could answer a question for me 
that I'm curious about... if I have a Javascript variable named 
firstName in two different portlets, how does the container avoid that 
name clash?


For the past nearly two years (can't believe it's been that long!) I've 
been leading an effort to develop a single, unified back-office 
application that combines a number of new and existing applications into 
a cohesive whole.  It's been one of the most successful project to date 
at my company, and it was only possible because of a frame-based 
(iFrames in that case) architecture.  We have unique teams developing 
individual "modules", and there's never a concern about name conflicts 
with either Javascript or HTML elements.  I'm curious if a portal 
approach would have worked here too.


It's interesting because in a very real sense we pretty much developed 
our own portal container!  We have a common "Framework" that all the 
modules make use of, some common bits of functionality that runs across 
all of them (preferences, dropdown menu, some others).  But they are 
100% independent by and large (some of the modules are actually whole 
other applications hosted on other servers).  Would a portal have 
allowed for things like that?  If so, do you have any idea how it pulls 
that off without frames?  Most importantly, avoiding those naming 
conflicts I mentioned.


I don't want to hijack a thread here, but it's already marked OT, and 
since you've got my curiosity piqued, I'll ask the questions :)



Antonio


Thanks,
Frank

--
Frank W. Zammetti
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
and "Practical DWR 2 Projects"
 (2008, Apress, ISBN 1-59059-941-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 changing locale from an action

2008-02-12 Thread Forest79

Your actions must extends ActionSupport (or implements LocaleProvider). Than
you must to implement this method:

public Locale getLocale() {

return [user logged locale];
}




Jim Young wrote:
> 
> Can anybody tell us how to change the locale from an action in Struts 2. 
> We have users that log-on and in their profile is the language that they
> wish the web site to be displayed in.  I have not be able to find out how
> to change the locale.  All the examples for changing the locale for Struts
> 2 seem to be from a jsp and using a link.  This will not work for us.
>  
> Any ideas? 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-changing-locale-from-an-action-tp10209761p15434479.html
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: Get current URL on a page

2008-02-12 Thread Randy Burgess
If the value is not going into a struts tag then just use JSTL.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Tommy Becker <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Tue, 12 Feb 2008 10:31:09 -0500
> To: Struts Users Mailing List 
> Subject: Get current URL on a page
> 
> Is there a way to get the URL for the current page using struts tags?  I
> thought I had access to the HttpRequest, and therefore could just use
> getRequestURL() but it appears the docs have led me astray :/
> 
> 
> 
> NOTICE: This e-mail message is for the sole use of the intended recipient(s)
> and may contain confidential and privileged information of Motricity.  Any
> unauthorized review, use, disclosure or distribution is prohibited.  If you
> are not the intended recipient, please contact the sender by reply e-mail and
> destroy all copies of the original message.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Get current URL on a page

2008-02-12 Thread Tommy Becker
Is there a way to get the URL for the current page using struts tags?  I 
thought I had access to the HttpRequest, and therefore could just use 
getRequestURL() but it appears the docs have led me astray :/




NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



In tag change the Browes button to Attach Button

2008-02-12 Thread Naveen Kumar M
  Hi Everyone,
   
  Can any one suggest a way to change the "Browes" button to some thing called 
"Attach" button using Struts2 tag.
   
  I am using follwoing Struts2 tag which is generating the "Browes" button but 
requirment is to have "Attach" button
   
  
   
  I apprictate the help form you guys.
   
  Thanks in Advance,
   
  Minchu

   
-
 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.

How to pre-select options in

2008-02-12 Thread jpiser

I am new to Struts 2 and if anyone can help me out I would greatly appreciate
it. 

I am populating a select box with a list of job titles. After posting the
form I want to the list to remember the previous selection. (Ridiculously
simple stuff right?) But, I am missing something because after the form is
submitted the list is always reset. This is the code I have for the select
box:



titleList is an ArrayList and it populates the options fine. I am
implementing the 'preparable" interface  in my action bean and populating
titleList in the prepare() method.

Thanks for any help you can give -
-- 
View this message in context: 
http://www.nabble.com/How-to-pre-select-options-in-%3Cs%3Aselect-tag---tp15434034p15434034.html
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: OT: Alternative to html frames

2008-02-12 Thread Marc Eckart
Hi Frank,

thank you and all others for your answers ;-)

We have a similar aproach like you described. We have an application which
acts as a portal. This application has two frames - one top frame for the
navigation and another frame for hosting the embbeded (independet)
application.
One of this embbeded application is a customer search where you can select a
customer, who can be used in another application. We have a customercontext,
which exchanges the data of the customer between the applications. So the
selected customer  is just shown in the customer search and it is necessary
to reimplement the displaying of the selected customer in every application
where it should appear.

So I want to put the displaying of the selected customer in the portal top
frame to have it visible for all applications. The Problem is, when I want
to display customer details, I have to call a different application/jsp
which should display the details. But this whatever kind of display kicks
the current application out of the bottom frame. That's when my thinking
went to iframe :-) So I now have just one website, no frameset and I can put
a ajax filled div tag over the iframe to display the customer details (I
haven't tested this yet, so I don't know if it's really working :-)

I asked some colleagues, what they think about it and they said iframes are
EVIL :-) So thats why I asked to have another oppinions.

I'm not sure if portlet container can help me with this issue.

Best regards,
Marc

2008/2/12, Frank W. Zammetti <[EMAIL PROTECTED]>:
>
> Antonio Petrelli wrote:
> > Frank, you might love this article :-)
> >
> http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong.aspx
>
>
> Hehe :)
>
> It's a good example of the typical "taking an idea too far".  The world
> seems to be divided into the people that say frames are evil and should
> never be used (and IIRC, they are removed in HTML 5, so apparently those
> guys feel that way too) or those that say frames are DA BOMB and should
> always be used.
>
> I'm personally in neither camp.  I'm simply someone that has used frames
> a number of times over the years with great success.  They certainly
> aren't appropriate in every case, that's why I asked what the problems
> were that Marc was having.
>
> Portals is one way to go, sure.  The last time I touched portals was a
> couple of years ago frankly, so maybe you could answer a question for me
> that I'm curious about... if I have a Javascript variable named
> firstName in two different portlets, how does the container avoid that
> name clash?
>
> For the past nearly two years (can't believe it's been that long!) I've
> been leading an effort to develop a single, unified back-office
> application that combines a number of new and existing applications into
> a cohesive whole.  It's been one of the most successful project to date
> at my company, and it was only possible because of a frame-based
> (iFrames in that case) architecture.  We have unique teams developing
> individual "modules", and there's never a concern about name conflicts
> with either Javascript or HTML elements.  I'm curious if a portal
> approach would have worked here too.
>
> It's interesting because in a very real sense we pretty much developed
> our own portal container!  We have a common "Framework" that all the
> modules make use of, some common bits of functionality that runs across
> all of them (preferences, dropdown menu, some others).  But they are
> 100% independent by and large (some of the modules are actually whole
> other applications hosted on other servers).  Would a portal have
> allowed for things like that?  If so, do you have any idea how it pulls
> that off without frames?  Most importantly, avoiding those naming
> conflicts I mentioned.
>
> I don't want to hijack a thread here, but it's already marked OT, and
> since you've got my curiosity piqued, I'll ask the questions :)
>
> > Antonio
>
> Thanks,
>
> Frank
>
> --
> Frank W. Zammetti
> Author of "Practical Ajax Projects With Java Technology"
>   (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
>   (2007, Apress, ISBN 1-59059-816-4)
> and "Practical DWR 2 Projects"
>   (2008, Apress, ISBN 1-59059-941-1)
> Java Web Parts - http://javawebparts.sourceforge.net
>   Supplying the wheel, so you don't have to reinvent it!
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts2 action returning dynamically created Results

2008-02-12 Thread Filipe David Manana
Nevermind. I managed to find a working solution without creating
dymamic Result objects.

So in the interceptor code:

   public String intercept(ActionInvocation invocation) throws Exception
   {
  ActionContext context = invocation.getInvocationContext();
  Map session = context.getSession();
  String action = invocation.getProxy().getActionName();
  String namespace = invocation.getProxy().getNamespace();

  if ( ( action.equals("login") || action.equals("doLogin") )
&& namespace.equals("/") )
 return invocation.invoke();

  Object user = session.get("user");

  if ( user == null )
  {
 if ( session.get("_prev_uri_") == null )
 {
HttpServletRequest request = (HttpServletRequest) context
  .get(HTTP_REQUEST);

StringBuffer uri = new StringBuffer(namespace);
uri.append('/');
uri.append(action);
uri.append(ACTION_EXT); // .action, read dynamically from
struts.properties in the init() method

if ( request.getQueryString() != null )
{
   uri.append('?');
   uri.append(request.getQueryString());
}

session.put("_prev_uri_", uri.toString());
 }

 return "login";
  }

  return invocation.invoke();
}

In the doLogin action:

  public String doLogin() throws Exception
   {
  boolean validUser = false;

 // validate the user
 // etc...

  if ( !validUser )
  {
 addActionError("Authentication failed. Invalid
username/password provided.");
 return INPUT;
  }

  // valid user
  session.put("user", userName);

  redirectUri = (String) session.get("_prev_uri_");

  session.remove("_prev_uri_");

  if ( redirectUri == null )
 return "gotohome";

  return SUCCESS;
   }

And in struts.xml:


/jsp/login.jsp

true
${redirectUri}


home
/home



It was not working before, but now I changed the order of interceptors
in my interceptor stack and is working :)
If anyone interested in more details, let me know.

Thanks anyway.

On Feb 12, 2008 2:04 PM, Filipe David Manana <[EMAIL PROTECTED]> wrote:
> Yes I need. Because in the S2 configuration file I have to specify all
> the parameters of the query string one by one.
> In my app, I don't know the name and number of these parameters. So I
> am building a Servlet Redirect Action Result in an interceptor like
> this:
>
> public String intercept(ActionInvocation invocation) throws Exception
>{
>   ActionContext context = invocation.getInvocationContext();
>   Map session = context.getSession();
>   String action = invocation.getProxy().getActionName();
>   String namespace = invocation.getProxy().getNamespace();
>
>   if ( ( action.equals("login") || action.equals("doLogin") )
> && namespace.equals("/") )
>  return invocation.invoke();
>
>   Object user = session.get("user");
>
>   if ( user == null )
>   {
>  if ( session.get("_prev_uri_") == null )
>  {
> String method = invocation.getProxy().getMethod();
> ServletActionRedirectResult result = new
> ServletActionRedirectResult(namespace, action, method);
>
> Map params = context.getParameters();
> Iterator it = params.entrySet().iterator();
> Map.Entry entry = null;
>
> while ( it.hasNext() )
> {
>entry = (Map.Entry) it.next();
>result.addParameter((String) entry.getKey(), entry.getValue());
> }
>
> session.put("_prev_uri_", result);
>  }
> // etc...
>
> I tried using a "redirect" type result in the xml config, and
> appending the query string to the url, but struts2 ignores it. The
> query string was obtained with the HttpServletRequest class. (I was
> logging it and it was correct).
>
> Any suggestion?
>
>
> On Feb 12, 2008 1:54 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > Are you sure you need to do it like this? You can use OGNL expressions in
> > your S2 configuration file to do things like set a URL to redirect to etc.
> >
> > Dave
> >
> >
> > --- Filipe David Manana <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I am trying to use an action that returns directly instances of the
> > > Result class, due to the nature of my application where the result is
> > > dynamically decided by some logic.
> > >
> > > My action class method is:
> > >
> > >   public Result doLogin() throws Exception
> > >{
> > >   // etc...
> > >   if ( !validUser )
> > >   {
> > >  addActionError("Authentication failed. Inval

Re: Custom Tags for Struts2

2008-02-12 Thread lbastil

Is there any complete Howto or Tutorial right now on this issue?
Should be really of interest ...

Thank you,
Basti



Jeromy Evans - Blue Sky Minds wrote:
> 
> Varun Narang wrote:
>> Hello all,
>> I want to get started with the customzied tag writing for Struts2.
>> I was able to find out ftl files for corresponding HTML elements.
>> Actually, I want to start writing tags which are integrated with ExtJS
>> library.
>>   
> One of the developers recently mentioned they is writing a document 
> about how to do this and I think there was talk about creating a maven 
> archetype.
> 
> In the mean-time, try following some of existing code.  The current 
> version of the struts2 yui plugin provides a nice simple example as it 
> only contains two tags and is packaged as a a plugin 
> (http://code.google.com/p/struts2yuiplugin/source).
> 
> I find it's easiest to follow that example completely - use the maven 
> plugin to generate the TLD and package your tags as a struts2 plugin. 
> This isn't mandatory though as you can write the TLD by hand and include 
> the classes in your webapp directly.
> 
> In general:
>  1. create a bean that extends UIBean or ClosingUIBean (for open & close 
> tags), identifies the templates and populates the template context
>  2. create a tag class that extends AbstractUITag that creates the bean 
> instance and sets the properties of the bean
>  3. create the templates referenced by the bean
> 
> After completing these 3 steps you can start using your tag if you write 
> a TLD and include it in your classpath.  If you copy the pom.xml from 
> the example able you can use maven to generate the TLD (if you've used 
> the appropriate annotations).
> 
> The remaining steps allowing your tags to be uses within freemarker and 
> velocity templates (rather than only JSP)
> 
>  4. Create a TagLibrary and TagModels for Freemarker and Directive's for 
> velocity
>  5. Create struts-plugin.xml that declares your TagLibrary bean
> 
> Hope that helps,
> regards,
> Jeromy Evans
>  
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Custom-Tags-for-Struts2-tp14289600p15433553.html
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: Struts2 action returning dynamically created Results

2008-02-12 Thread Filipe David Manana
Yes I need. Because in the S2 configuration file I have to specify all
the parameters of the query string one by one.
In my app, I don't know the name and number of these parameters. So I
am building a Servlet Redirect Action Result in an interceptor like
this:

public String intercept(ActionInvocation invocation) throws Exception
   {
  ActionContext context = invocation.getInvocationContext();
  Map session = context.getSession();
  String action = invocation.getProxy().getActionName();
  String namespace = invocation.getProxy().getNamespace();

  if ( ( action.equals("login") || action.equals("doLogin") )
&& namespace.equals("/") )
 return invocation.invoke();

  Object user = session.get("user");

  if ( user == null )
  {
 if ( session.get("_prev_uri_") == null )
 {
String method = invocation.getProxy().getMethod();
ServletActionRedirectResult result = new
ServletActionRedirectResult(namespace, action, method);

Map params = context.getParameters();
Iterator it = params.entrySet().iterator();
Map.Entry entry = null;

while ( it.hasNext() )
{
   entry = (Map.Entry) it.next();
   result.addParameter((String) entry.getKey(), entry.getValue());
}

session.put("_prev_uri_", result);
 }
// etc...

I tried using a "redirect" type result in the xml config, and
appending the query string to the url, but struts2 ignores it. The
query string was obtained with the HttpServletRequest class. (I was
logging it and it was correct).

Any suggestion?

On Feb 12, 2008 1:54 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> Are you sure you need to do it like this? You can use OGNL expressions in
> your S2 configuration file to do things like set a URL to redirect to etc.
>
> Dave
>
>
> --- Filipe David Manana <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am trying to use an action that returns directly instances of the
> > Result class, due to the nature of my application where the result is
> > dynamically decided by some logic.
> >
> > My action class method is:
> >
> >   public Result doLogin() throws Exception
> >{
> >   // etc...
> >   if ( !validUser )
> >   {
> >  addActionError("Authentication failed. Invalid
> > username/password provided.");
> >  return new ServletDispatcherResult("/jsp/login.jsp");
> >   }
> >
> >   // valid user
> >   session.put("user", userName);
> >
> >   ServletActionRedirectResult result =
> > (ServletActionRedirectResult) session.get("_prev_uri_");
> >
> >   if ( result == null )
> >   {
> >  result = new ServletActionRedirectResult("/home", "home",
> > "execute");
> >   }
> >
> >   return result;
> >   }
> >
> >   My struts.xml:
> >
> >   
> >   
> >
> >   After executing the action's method I always get a
> > NullPointerException from ServletActionRedirectResult :S
> >
> > exception
> >
> > javax.servlet.ServletException: java.lang.NullPointerException
> >
> > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
> >
> >
> org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
> >
> > root cause
> >
> > java.lang.NullPointerException
> >
> >
> org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:184)
> >
> >
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> >
> >
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> >
> >
> actions.CaptureLastURIRequestedInterceptor.intercept(CaptureLastURIRequestedInterceptor.java:48)
> >
> >
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> >
> >
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> >
> >
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> >
> >
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> >
> >
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> >
> > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
> >
> >
> org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
> >
> > Am I missing something?
> >
> > cheers
> >
> > --
> > Filipe David Manana,
> > [EMAIL PROTECTED]
> >
> > Obvious facts are like secrets to those not trained to see them.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >

Struts2 action returning dynamically created Results

2008-02-12 Thread Filipe David Manana
Hi,

I am trying to use an action that returns directly instances of the
Result class, due to the nature of my application where the result is
dynamically decided by some logic.

My action class method is:

  public Result doLogin() throws Exception
   {
  // etc...
  if ( !validUser )
  {
 addActionError("Authentication failed. Invalid
username/password provided.");
 return new ServletDispatcherResult("/jsp/login.jsp");
  }

  // valid user
  session.put("user", userName);

  ServletActionRedirectResult result =
(ServletActionRedirectResult) session.get("_prev_uri_");

  if ( result == null )
  {
 result = new ServletActionRedirectResult("/home", "home", "execute");
  }

  return result;
  }

  My struts.xml:

  
  

  After executing the action's method I always get a
NullPointerException from ServletActionRedirectResult :S

exception

javax.servlet.ServletException: java.lang.NullPointerException

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

root cause

java.lang.NullPointerException

org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:184)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

actions.CaptureLastURIRequestedInterceptor.intercept(CaptureLastURIRequestedInterceptor.java:48)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

Am I missing something?

cheers

-- 
Filipe David Manana,
[EMAIL PROTECTED]

Obvious facts are like secrets to those not trained to see them.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need a Help

2008-02-12 Thread mohammed hussain
sorry for disturing u gupta,can u give me the link of struts plugin for
eclipse.
thanx
muzaffar



On Feb 12, 2008 3:26 PM, Shailendra Kumar Gupta <[EMAIL PROTECTED]>
wrote:

> First get the struts plugin and copy it to your eclipse plugin folder
> and you will get it.
>
> -Original Message-
> From: mohammed hussain [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 12, 2008 3:05 PM
> To: Struts Users Mailing List
>  Subject: Re: Need a Help
>
> hi Shailendra Kumar Gupta
>  In my eclipse struts project is not there,can u tell where i can find
> that
> .
> thanx
>
> On Feb 12, 2008 3:00 PM, Shailendra Kumar Gupta
> <[EMAIL PROTECTED]>
> wrote:
>
> > U can use the same eclipse.
> >
> > Simply create one project in your eclipse by selecting Struts project
> > and you can proceed.
> >
> > -Original Message-
> > From: mohammed hussain [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 12, 2008 2:42 PM
> > To: Struts Users Mailing List
> > Subject: Need a Help
> >
> > hi
> >   i have eclipse in that iam developing a web apllication,now i want
> to
> > develop the same using struts ,can it be done using the same
> eclipse,or
> > else
> > i have to go for another one,pls help me out from this problem
> >
> > tell me how can i develop struts application using ecllipse.
> >
> > thanx
> >
> >
> >
> >
> >
> 
> _
> > This message may contain confidential and proprietary material for the
> > sole use of the intended recipient.
> > Any review or distribution by others is strictly prohibited. If you
> are
> > not the intended recipient, please contact the sender and delete all
> copies.
> > Before printing, think about the environment.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
>
> _
> This message may contain confidential and proprietary material for the
> sole use of the intended recipient.
> Any review or distribution by others is strictly prohibited. If you are
> not the intended recipient, please contact the sender and delete all copies.
> Before printing, think about the environment.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts2 action returning dynamically created Results

2008-02-12 Thread Dave Newton
Are you sure you need to do it like this? You can use OGNL expressions in
your S2 configuration file to do things like set a URL to redirect to etc.

Dave

--- Filipe David Manana <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am trying to use an action that returns directly instances of the
> Result class, due to the nature of my application where the result is
> dynamically decided by some logic.
> 
> My action class method is:
> 
>   public Result doLogin() throws Exception
>{
>   // etc...
>   if ( !validUser )
>   {
>  addActionError("Authentication failed. Invalid
> username/password provided.");
>  return new ServletDispatcherResult("/jsp/login.jsp");
>   }
> 
>   // valid user
>   session.put("user", userName);
> 
>   ServletActionRedirectResult result =
> (ServletActionRedirectResult) session.get("_prev_uri_");
> 
>   if ( result == null )
>   {
>  result = new ServletActionRedirectResult("/home", "home",
> "execute");
>   }
> 
>   return result;
>   }
> 
>   My struts.xml:
> 
>   
>   
> 
>   After executing the action's method I always get a
> NullPointerException from ServletActionRedirectResult :S
> 
> exception
> 
> javax.servlet.ServletException: java.lang.NullPointerException
> 
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
> 
>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
> 
>
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
> 
> root cause
> 
> java.lang.NullPointerException
> 
>
org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:184)
> 
>
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> 
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> 
>
actions.CaptureLastURIRequestedInterceptor.intercept(CaptureLastURIRequestedInterceptor.java:48)
> 
>
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> 
>
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> 
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> 
>
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> 
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
> 
>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
> 
>
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
> 
> Am I missing something?
> 
> cheers
> 
> -- 
> Filipe David Manana,
> [EMAIL PROTECTED]
> 
> Obvious facts are like secrets to those not trained to see them.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do i obtain the selected value of the select element

2008-02-12 Thread Markus Stauffer
Hi
name="concept" means the struts Action will call the setConcept()
method with the selected value as parameter. You want to add an
instance variable named conecept in your Action class. Add getters and
setters as well.

Regards
-- 
Markus Stauffer

On Wed, Feb 13, 2008 at 5:31 AM, Prashant Khanal
<[EMAIL PROTECTED]> wrote:
> Hello all,
>  I just started working on struts 2 and stuck in a problem.
>  I have a page that consists of a select element and a submit button:
>  
>   listKey="id"
> listValue="bannerName" />
> 
>  
>  The select element populates list of Banner objects.
>  @Entity
>  @Table(name="DTC_BANNER")
>  public class Banner implements Serializable {
>
> private Long id;
> private String bannerName;
>
> @Id
> @GeneratedValue(strategy=GenerationType.AUTO)
> @Column(name="banner_id")
> public Long getId() {
> return id;
> }
> public void setId(Long id) {
> this.id = id;
> }
>
> @Column(name="banner_name")
> public String getBannerName() {
> return bannerName;
> }
> public void setBannerName(String bannerName) {
> this.bannerName = bannerName;
> }
>
>  }
>
>  So i fetch the list of available banners from the database and populate in
>  the select element. The select element displays correctly.
>
>  Now after the user clicks on the submit button the
>  SequenceSelectionAction.java comes into act and now i want to fetch the
>  banner selected in the previous page. In fact i could only fetch the id of
>  the banner object selected as the listKey property is assigned "id".
>
>  Is there any way i can get the Banner object rather than just id?
>
>  --
>  Thanks,
>  Prashant Khanal <[EMAIL PROTECTED]>
>  
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]