[ot] RE: Images

2007-10-19 Thread Manu Mahajan
Try removing the / before the image path 

Change this

to


-Original Message-
From: Prashant Desai [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 19, 2007 5:05 AM
To: user@struts.apache.org
Subject: Images


I have some images displayed on my website... the images on the first page
do not get loaded when the page displays for the first time.. you can see it
here... http://www.hapandharpur.com. there are images in the right top
corner. One is a logo and one is a symbol.. Both of those images do not get
loaded when I access the site that is deployed on internet. If I access the
local code(which is my dev env) it opens fine...
 
what could be the problem??
 
This is the tag that I am using.
 

 
Thanks for your help.
 
prashant
_
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us



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



RE: and Hibernate

2007-10-19 Thread Manu Mahajan
I had to use the s:tree with struts 2.0.9 some time back. I had posted an
example with working code(including the action class) at
http://www.codepencil.com/?p=7#more-7. It might be useful.

Manu

-Original Message-
From: Cosmin Stanciu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 11:20 PM
To: Struts Users Mailing List
Subject: Re:  and Hibernate

Yes! My Jsp file looks exactly like the one provided into the "Example
Applications" (struts-2.0.9-apps.zip).

function treeNodeSelected(nodeId) {
dojo.io.bind({
url: "?nodeId="+nodeId,
load: function(type, data, evt) {
var displayDiv = dojo.byId("displayId");
displayDiv.innerHTML = data;
},
mimeType: "text/html"
});
};
dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");

 


 

The tree works fine with the data provided in the example application but I
can't make it work with the data received from my Hibernate layer. So I just
want to know I should write the "ShowDynamicTreeAction.java". 

Thank you!
Cosmin



- Original Message 
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Thursday, October 18, 2007 7:27:32 PM
Subject: Re:  and Hibernate

--- Cosmin Stanciu <[EMAIL PROTECTED]> wrote:
> Action tab the funtionality is not shown. :(

Are you filling tree data via Ajax (which the example
on the wiki isn't)?

d.


---
Hi! 
I have been trying for a week now to populate one  with the data
from a database table but with no luck . I would really apreciate some
guidance in how to write the ShowDynamicTreeAction class that sends the date
to the tree.

I'm using Hibernate DAO to receive the data from my database table and it
looks like this.
Category: id, name, parent_category_id (from a a recursive 1:n relation to
the same table using the id).
The Hibernate generated object (Category.java) has the fallowing fields: 
private Integer id;
private Category category;
private String name;
private Set categories = new HashSet(0);

In the CategoryDAO class I have all the methods needed to retreive data from
the table:
- Category findById(int Id), List findById(int Id), List findParents() and I
can add any needed method...

My struts.xml has a reference to the class showDynamicTreeAction:

/jsp/CategoryList.jsp


I'm sure that helping solving this issue would be of much interest for all
those that intend to use s:tree in their application, as there no example or
help regarding this matter on the internet.

Thanks a lot!
Cosmin



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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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



RE: Callback after AJAX call

2007-10-19 Thread Manu Mahajan

With notify topics you can handle before and after topics separately.
Suppose submitForm is the name of the topic that you are publishing then you
can do something like this.


dojo.event.topic.subscribe("/submitForm", function(data, type, e){
   if (type=="before"){
//do something before the form is submitted
   }
   if (type=="load")
   {
//do something after the form is submitted
   }
   });


Manu

-Original Message-
From: Eduardo Yáñez Parareda [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 3:32 PM
To: user@struts.apache.org
Subject: Callback after AJAX call

Hello, I'm new to Struts 2.
In a project we're using version 2.0.9, and have some questions about AJAX
calls.
How could I call a javascript function after making an AJAX call?

I know that in future 2.1 version there is a afterNotifyTopics parameter
that I could use
to do that, but how could I do it on 2.0.9?

We tried notifyTopics, but this one executes the javascript code before and
after calling.

-- 
Eduardo Yáñez Parareda



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



RE: specifying the location of struts.xml

2007-09-27 Thread Manu Mahajan
As far as I know the struts.xml has to be in the root of your classpath and
there is no way of changing this. The maximum you can do is add it to the
root of a jar in the WEB-INF/lib folder but not directly in the WEB-INF
folder.

Manu

-Original Message-
From: Pavel Sapozhnikov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 3:22 AM
To: Struts Users Mailing List
Subject: specifying the location of struts.xml

Hi I have this issue where Struts only sees struts.xml in classes folder
this is an issue because if I want to add another jar or something else it
will delete struts.xml from my classes folder. Is there a way I could
specify so that application will look for struts.xml in /WEB-INF folder.
Thanks.

-- 
Pavel Sapozhnikov
xFact, Inc
[EMAIL PROTECTED]



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



RE: listen/notify Topics doubt

2007-09-27 Thread Manu Mahajan
Hi

If you want to handle the before and after topics separately you can do
something like this. Note I am publishing a separate topic for the form
(submitForm) and then handling it using some javascript code





...  








dojo.event.topic.subscribe("/submitForm", function(data, type, e){
   if (type=="before"){
//do something before the form is submitted
   }
   if (type=="load")
   {
//do something after the form is submitted
//you can publish the refreshTree topic here
dojo.event.topic.publish("/refreshTree");
   }
   });


Now your tree will only be refreshed once... 

Manu

-Original Message-
From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 5:38 PM
To: Struts Users Mailing List
Subject: listen/notify Topics doubt

Hi all!

I have a simple question:

When a div tag contains the "listenTopics" attribute, the associated 
href is executed *Before and After* the action associated to the tag 
which invokes the notifyTopics??




...  







When I submit the form it invokes the action form and i have 2 threads 
invoking "refreshTreeUrl"... I would like to first invoke the action 
form, and then, notifyTopics. Is it possible??

Thanks.


-
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: Set the tree node to a given value

2007-09-14 Thread Manu Mahajan
You are right there is no way to expand the parents. That is why in my
example every time a node is selected I am storing the state in a cookie and
then restoring the tree to the same state before selecting.

-Original Message-
From: GEDA [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 14, 2007 11:20 AM
To: user@struts.apache.org
Subject: RE: Set the tree node to a given value


Thank you for the info. It was really helpful although I didn't use it :(
Because the expansion of the parents is not done automatically ... I see no
reason for using this. Maybe in the future they will integrate the automatic
expansion of the parents of selected node.






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



RE: Set the tree node to a given value

2007-09-13 Thread Manu Mahajan
Hi.

For your specific question 

Try 

treeSelector = dojo.widget.byId('treeSelector_TREENAME')
treeNode = dojo.widget.byId(ID) 
treeSelector.doSelect(treeNode);
dojo.event.topic.publish("treeSelected",
{node:dojo.widget.byId(treeSelection)});

Replace TREENAME with the name of your tree, ID is the id of the node that
you want to select

I have posted a detailed example of using the tree on my blog which you
might find useful. It's at http://www.codepencil.com/?p=4

Manu

-Original Message-
From: GEDA [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 13, 2007 12:30 PM
To: user@struts.apache.org
Subject: Set the tree node to a given value


Hi.

All worked great for displaying the http://www.nabble.com/Set-the-tree-node-to-a-given-value-tf4433953.html#a126
49709
Sent from the Struts - User mailing list archive at Nabble.com.


-
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: Dynamic Tree Example

2007-09-06 Thread Manu Mahajan
Hi Session

I am really sorry I couldn't work on the examples as I had promised. I have
just been extremely busy over the last few weeks. I want to contribute and
it's the first thing I will do when I get some time.

I have already answered your question on saving and restoring the state of a
tree.

For adding icons I am sure it can be done in the latest version dojo but I
will have to explore this a bit. I am not sure if it can be done with the
version of dojo bundled with struts. 

There is an example of loading a tree dynamically in the showcase but I
think what you are looking for is to load a partial tree and then load the
rest of the nodes based on what node is expanded. I haven't found any such
examples.

Interestingly we have a similar requirement in one of our projects and after
reading your mails in the morning I asked my boss to let me work on that :)

So I will be working on this for the next few days and I will update you if
I make any progress.

Manu

-Original Message-
From: Session A Mwamufiya [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 05, 2007 10:39 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: Dynamic Tree Example

Hi Manu,

You seem to have had lots of experience with s:tree; would you please help
me answer the following questions (with example code if you have them):
- how do you go about expanding the tree to the node level it was at before
a refresh?
- can you add icons (not changing the plus/minus ones) to the tree nodes
individually, to differentiate between the types?
- are there examples of lazy-loading data in a tree?

Thanks,
Session


> Thanks Manu.  I'm new with the tree, and am attempting to implement one
> for a project I'm working on.
> 
> I'm having a number of difficulties: - I can't manage to reload at the
> node level I want, it always reloads with root showing - it takes a long
> time to load
> 
> and I have a couple of feature questions: - can images be added depending
> on the type of the node object (category, question, answer, ...) - is
> there a functionality to move nodes around and do a check to ensure that
> they are allowed to be inserted in the new location or not.
> 
> I would be interesting to have a fully functional tree example in the
> showcase, as it would help answer a number of these questions.
> 
> Thanks for the effort, Session
> 
> 
>> I have worked with the tree extensively but that was about two months
>> ago with 2.0.6. I faced a lot of problems when I first encountered this
>> and so I'll try and fix the showcase examples in the coming weekend and
>> submit a patch next week . I hope not much would have changed between
>> then and in the current version.
>> 
>> Manu
>> 
>> Ted Husted wrote:
>>> We do try to tag the examples that are broken, in the hope that
>>> someone will someday fix them. I just didn't realize that this one
>>> wasn't working the way it should. The Showcase could use a lot of
>>> work, especially in terms of explaining exactly what the example
>>> should do. If you can fix the example, please submit a patch.
>>> Otherwise, feel free to open a JIRA ticket suggesting that the example
>>> be tagged as broken for the next release.
>>> 
>>> -Ted.
>>> 
>>> On 8/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>> 
 Do you think leaving known broken code on the "Showcase" is a good 
 idea realizing developers are flocking to this resource to figure
 out how to do things?  If it is known not to work, maybe it should
 say this or be removed from the Showcase!
 
 On 8/10/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
 
> Yes the example had several problems on 2.0.x, some of them were 
> fixed, others are still there.
> 
> musachy
> 
> On 8/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
>> I'm studying the dynamic tree example in the showcase, and
>> there are a couple problems.  First, when you view sources, the 
>> configuration for
>> 
> the
> 
>> dynamicTreeSelectAction is not visible.  Also, as I inspect
>> this action,
>> 
> I'm
> 
>> discovering that its dynamicTreeSelect.jsp never displays the 
>> node selected!  Is this example not finished?
>> 
>> -- Scott [EMAIL PROTECTED]
>> 
>> 
> -- "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> -- -- To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
 -- Scott [EMAIL PROTECTED]
 
>>> 
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>> additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>> additional comm

RE: reloading a tree at a certain level of expension

2007-09-06 Thread Manu Mahajan
Hi Session

I don't know if it can be done only via the struts tags but I was able to
achieve this by using some dojo javascript code in my jsp. 

Here are some code snippets that might solve your problem



.
.
.
  
  
  //The following extensions are required to save or restore state of a tree
  dojo.require("dojo.widget.TreeLoadingController");
  dojo.require("dojo.widget.TreeControllerExtension");
  
  dojo.addOnLoad(function() {
dojo.lang.mixin(dojo.widget.byId('treeController'),
dojo.widget.TreeControllerExtension.prototype);
//The following code will make sure that the saveExpandedIndices
function is called everytime a node 
//is collapsed or expanded
dojo.event.topic.subscribe("contentTree/expand",saveExpandedIndices);
dojo.event.topic.subscribe("contentTree/collapse",saveExpandedIndices);


  });
  
  //The following function saves the state of the tree
  function saveExpandedIndices() {
// You can save this object as tree persistent state
indices = dojo.widget.byId('treeController').saveExpandedIndices(
  dojo.widget.byId('contentTree')
);
/*
* "indices" is a javascript object which is nothing but a
multi-dimension arrays containing indices of all expanded nodes
* I am saving this object inside a cookie. You can have a different
implementation...
* I am using json.js to convert the object into a string
* and then a custom function called storeCookie which stores the string
in a cookie
*/
storeCookie("categoryTreeState",indices.toJSONString(),1);
  }
.
.
.
  //The following function restores the state of the tree. This can probably
be called body-onload
  //You will have to pass it the stored indices object though
  function restoreExpandedIndices(indices) {
  dojo.widget.byId('treeController').restoreExpandedIndices(
  dojo.widget.byId('contentTree'), indices
);
  }
.
.
.


.
.
.



.
.
.


Hope this helps.

Manu

-Original Message-
From: Session A Mwamufiya [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 05, 2007 10:34 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: reloading a tree at a certain level of expension

Anyone knows whether this feature has been added in yet?

> Session A Mwamufiya wrote:
>> I'm relaunching this thread in case an s:tree expert may have missed it
>> the first time around :).
>> 
>>> Is there a way that when a s:tree is reloaded, it expends to a
>>> particular level of expansion?  I presume that I will save that
>>> expansion level in my session object, but I'm not sure how to get it
>>> or set the tree to it, or if it's even possible.
> 
> 
> Looking into TreeSelector API I found a selectedNode parameter - will it
> do the job? Feel free to ask Struts2 developers to include selectedNode
> parameter into s:tree tag if is does what you expect (and if it's not
> included there yet - sometimes S2 code changes faster than its
> documentation).
> 
> Oleg
> 
> - 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]




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



RE: [ot] multiple messages (Solved)

2007-09-04 Thread Manu Mahajan
It seems that the error was coming from outlook. It's duplicating the
incoming message. The same thing is working fine in thunderbird.

Now I need to find an outlook mailing list or maybe it's time to shift to
thunderbird ;)

Sorry for the bother.
Manu

-Original Message-----
From: Manu Mahajan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 04, 2007 5:42 PM
To: 'Struts Users Mailing List'
Subject: [ot] multiple messages

Hi All

I had recently subscribed to the mailing list using this email id (earlier I
had a subscription for another address). The problem is that I am getting
two copies of all messages on *this* email id after subscription. I have
tried to unsubscribe and then subscribe again but I'm still getting every
message twice. Has anyone faced this problem before? Let me know what could
be causing the issue.

Thanks
Manu



-
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]



[ot] multiple messages

2007-09-04 Thread Manu Mahajan
Hi All

I had recently subscribed to the mailing list using this email id (earlier I
had a subscription for another address). The problem is that I am getting
two copies of all messages on *this* email id after subscription. I have
tried to unsubscribe and then subscribe again but I'm still getting every
message twice. Has anyone faced this problem before? Let me know what could
be causing the issue.

Thanks
Manu



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



Re:

2007-08-22 Thread Manu Mahajan
I put the folder in the root of the application, at the same level as 
WEB-INF


All the best! May the force be with you ;)

GEDA wrote:

Struts version is 2.0.9

I will try once again and repeat the steps you wrote here. Wish me luck.
One question: Where exactly did you put the folder template/ajax in your
application ?

Thanks.


Manu Mahajan-2 wrote:
  

This is the link to the file that I used
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl?view=markup&pathrev=528866

All I did was
1. added this file to a template/ajax folder in my app
2. modified the function treeNodeSelected in treeExampleStatic.jsp in 
the showcase app to the following (the only change is nodeId changed to 
message.node.widgetId)


 function treeNodeSelected(message) {
dojo.io.bind({
url: "value='/tags/ui/ajax/staticTreeSelectAction.action'/>?nodeId="+message.node.widgetId,

load: function(type, data, evt) {
var divDisplay = dojo.byId("displayIt");
divDisplay.innerHTML=data;
},
mimeType: "text/html"
});
};

3. restarted tomcat

And it worked for me. I just tried this with the 2.0.8 and 2.0.9 
showcase apps


What version of struts are you using?


GEDA wrote:


No problem. I took the latest version from svn (it had the description
with
the topic notification fixed) and still doesn't fire any event because I
tested it with an alert function. I also created the path /template/ajax
and
put the tree.ftl file in there. What's wrong with it ?

  
  

-
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:

2007-08-21 Thread Manu Mahajan

This is the link to the file that I used
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl?view=markup&pathrev=528866

All I did was
1. added this file to a template/ajax folder in my app
2. modified the function treeNodeSelected in treeExampleStatic.jsp in 
the showcase app to the following (the only change is nodeId changed to 
message.node.widgetId)


function treeNodeSelected(message) {
   dojo.io.bind({
   url: "value='/tags/ui/ajax/staticTreeSelectAction.action'/>?nodeId="+message.node.widgetId,

   load: function(type, data, evt) {
   var divDisplay = dojo.byId("displayIt");
   divDisplay.innerHTML=data;
   },
   mimeType: "text/html"
   });
   };

3. restarted tomcat

And it worked for me. I just tried this with the 2.0.8 and 2.0.9 
showcase apps


What version of struts are you using?


GEDA wrote:

No problem. I took the latest version from svn (it had the description with
the topic notification fixed) and still doesn't fire any event because I
tested it with an alert function. I also created the path /template/ajax and
put the tree.ftl file in there. What's wrong with it ?

  



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



Re:

2007-08-21 Thread Manu Mahajan
Sorry about the link that came in because I copy pasted text from the 
web page and thunderbird copied the hyperlink as well. Please ignore the 
link. I assume you have got the correct tree.ftl file.


Please note that the parameter passed to the javascript callback 
function will not be the "nodeId" but it will be a dojo "message" object.


try replacing the following code

function treeNodeSelected(nodeId)
{
dojo.byId("id_group").value = nodeId;
}

with

function treeNodeSelected(message)
{ 
dojo.byId("id_group").value = message.node.widgetId;

}

GEDA wrote:

I did download the tree.ftl file from the file attachement but still doesn't
work. The link you gave me is not an actual file but a diff file which I
don't know how to use it. :(


Manu Mahajan-2 wrote:
  

Hi

Try this. Create a directory template/ajax in your application and copy 
the file tree.ftl from this page

https://issues.apache.org/struts/browse/WW-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
You can search for this string  
"/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl 
<http://svn.apache.org/viewcvs.cgi//struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl/?rev=528866&view=diff&r1=528866&r2=528865&p1=/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl&p2=/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl>" 


(You'll find a link to the file modified on 14th Apr)

Your code should work now. I just tested this with a standard 2.0.8 
showcase app.


Manu

GEDA wrote:


Is there a workaround in order for this to work ?




 function treeNodeSelected(nodeId) {
 dojo.byId("id_group").value = nodeId;
 };   
 dojo.event.topic.subscribe("treeSelected", this,

"treeNodeSelected");
 

Thank you.
  
  


-
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:

2007-08-21 Thread Manu Mahajan

Hi

Try this. Create a directory template/ajax in your application and copy 
the file tree.ftl from this page

https://issues.apache.org/struts/browse/WW-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
You can search for this string  
"/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl 
" 


(You'll find a link to the file modified on 14th Apr)

Your code should work now. I just tested this with a standard 2.0.8 
showcase app.


Manu

GEDA wrote:

Is there a workaround in order for this to work ?




 function treeNodeSelected(nodeId) {
 dojo.byId("id_group").value = nodeId;
 };   
 dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");

 

Thank you.
  




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



Re: Dynamic Tree Example

2007-08-13 Thread Manu Mahajan
I have worked with the tree extensively but that was about two months 
ago with 2.0.6. I faced a lot of problems when I first encountered this 
and so I'll try and fix the showcase examples in the coming weekend and 
submit a patch next week . I hope not much would have changed between 
then and in the current version.


Manu

Ted Husted wrote:

We do try to tag the examples that are broken, in the hope that
someone will someday fix them. I just didn't realize that this one
wasn't working the way it should. The Showcase could use a lot of
work, especially in terms of explaining exactly what the example
should do. If you can fix the example, please submit a patch.
Otherwise, feel free to open a JIRA ticket suggesting that the example
be tagged as broken for the next release.

-Ted.

On 8/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
  

Do you think leaving known broken code on the "Showcase" is a good idea
realizing developers are flocking to this resource to figure out how to do
things?  If it is known not to work, maybe it should say this or be removed
from the Showcase!

On 8/10/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


Yes the example had several problems on 2.0.x, some of them were
fixed, others are still there.

musachy

On 8/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
  

I'm studying the dynamic tree example in the showcase, and there are a
couple problems.  First, when you view sources, the configuration for


the
  

dynamicTreeSelectAction is not visible.  Also, as I inspect this action,


I'm
  

discovering that its dynamicTreeSelect.jsp never displays the node
selected!  Is this example not finished?

--
Scott
[EMAIL PROTECTED]



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

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


  

--
Scott
[EMAIL PROTECTED]



-
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: [s2] weird problem with Chinese characters and SOLVED

2007-06-13 Thread Manu Mahajan

Ok! I've found a solution. It seems that I was looking at the wrong place.

I am using sitemesh and the problem was coming due to a bug in sitemesh.

If you use  for your action path in 
decorators.xml then it will not print utf-8 encoded characters properly. 
I created a simple decorator and changed the configuration to point to 
that and the problem was solved.


So it's not a struts2 problem after all! I'm posting the solution in 
case someone else faces the same problem.


Manu


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



Re: [s2] weird problem with Chinese characters and

2007-06-12 Thread Manu Mahajan
Thanks Dave. I tried and I seem to get correct output when using 
properties files but the problem occurs when I put an object containing 
Chinese data on the value stack. The same code works fine if I bypass 
the action and run it directly from a jsp.


Dave Newton wrote:

I am, but all the Chinese (so far) is in properties
files, not the DB.

d.
  




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



Re: [s2] weird problem with Chinese characters and

2007-06-12 Thread Manu Mahajan
Also I would like to know if anyone is using struts 2 to develop a site 
containing Chinese content because my entire application seem to be 
affected by this. Either I am missing something very trivial or no one 
has used struts2 in this context.



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



Re: [s2] weird problem with Chinese characters and

2007-06-12 Thread Manu Mahajan
I'm disappointed that I did not get any response. Anyway I have filed a 
bug here


https://issues.apache.org/struts/browse/WW-1985


Manu Mahajan wrote:

Hello

I tried removing the s:iterate and s:property tags and shifted the 
code to a scriptlet, I was still getting the same problem. But then I 
disabled the struts/struts-cleanup filters from my web.xml and created 
a standalone jsp to test the functionality and called it directly. To 
my surprise the jsp was painted completely.


I am using the default interceptor stack and I have not made any 
changes to default struts configuration. I am using strutts 2.0.6


What could be causing this loss in data?

A description of the problem again in simple words

- I am trying to print some text in Chinese(Traditional) language 
inside a loop. (I have tried s:iterator and a for loop inside scriplets)
- Somewhere towards the end of the loop the printwriter stops writing 
to the jsp. All out.println statements are ignored.
- But the code is being executed and i get system.out messages in the 
server logs.
- So in my browser I get an html terminated abruptly at a random place 
towards the end.

- No exceptions are being thrown
- The same code works perfectly for other languages.

I really dont know how to proceed with this. Any help would be 
appreciated.


Thanks
Manu

Manu Mahajan wrote:

Hi

I am having a really weird problem with data containing chinese 
characters. I have something similar to the following code in a jsp.



   
   
   
   
   


This works fine otherwise but when 'translationText' contains Chinese 
characters an incomplete jsp is painted.


Like say if the loop has to run 20 times, only 18 or 19 lines are 
printed and NO code after the loop is printed. It's as if the 
jspwriter has crashed or something but no exception is thrown. I am 
using tomcat 5.5.21.


At first I thought it was a buffer related issue so added out.flush() 
to every iteration
I also reduced the number of iterations. Now if the loop is running 
10 times still 7 or 8 rows are being printed.
I added a system.out.println() in the middle of the loop and I im 
getting 20 lines printed in the logs... but in the jsp i can only see 
18 or 19.  And this works for all other languages.


Has anyone ever faced a problem like this? I tried searching on 
google but couldn't find anything.


Please suggest what can I do?

Thanks
Manu


-
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]








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



Re: [s2] weird problem with Chinese characters and

2007-06-12 Thread Manu Mahajan

Hello

I tried removing the s:iterate and s:property tags and shifted the code 
to a scriptlet, I was still getting the same problem. But then I 
disabled the struts/struts-cleanup filters from my web.xml and created a 
standalone jsp to test the functionality and called it directly. To my 
surprise the jsp was painted completely.


I am using the default interceptor stack and I have not made any changes 
to default struts configuration. I am using strutts 2.0.6


What could be causing this loss in data?

A description of the problem again in simple words

- I am trying to print some text in Chinese(Traditional) language inside 
a loop. (I have tried s:iterator and a for loop inside scriplets)
- Somewhere towards the end of the loop the printwriter stops writing to 
the jsp. All out.println statements are ignored.
- But the code is being executed and i get system.out messages in the 
server logs.
- So in my browser I get an html terminated abruptly at a random place 
towards the end.

- No exceptions are being thrown
- The same code works perfectly for other languages.

I really dont know how to proceed with this. Any help would be appreciated.

Thanks
Manu

Manu Mahajan wrote:

Hi

I am having a really weird problem with data containing chinese 
characters. I have something similar to the following code in a jsp.



   
   
   
   
   


This works fine otherwise but when 'translationText' contains Chinese 
characters an incomplete jsp is painted.


Like say if the loop has to run 20 times, only 18 or 19 lines are 
printed and NO code after the loop is printed. It's as if the 
jspwriter has crashed or something but no exception is thrown. I am 
using tomcat 5.5.21.


At first I thought it was a buffer related issue so added out.flush() 
to every iteration
I also reduced the number of iterations. Now if the loop is running 10 
times still 7 or 8 rows are being printed.
I added a system.out.println() in the middle of the loop and I im 
getting 20 lines printed in the logs... but in the jsp i can only see 
18 or 19.  And this works for all other languages.


Has anyone ever faced a problem like this? I tried searching on google 
but couldn't find anything.


Please suggest what can I do?

Thanks
Manu


-
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]



[s2] weird problem with Chinese characters and

2007-06-12 Thread Manu Mahajan

Hi

I am having a really weird problem with data containing chinese 
characters. I have something similar to the following code in a jsp.



   
   
   
   
   


This works fine otherwise but when 'translationText' contains Chinese 
characters an incomplete jsp is painted.


Like say if the loop has to run 20 times, only 18 or 19 lines are 
printed and NO code after the loop is printed. It's as if the jspwriter 
has crashed or something but no exception is thrown. I am using tomcat 
5.5.21.


At first I thought it was a buffer related issue so added out.flush() to 
every iteration
I also reduced the number of iterations. Now if the loop is running 10 
times still 7 or 8 rows are being printed.
I added a system.out.println() in the middle of the loop and I im 
getting 20 lines printed in the logs... but in the jsp i can only see 18 
or 19.  And this works for all other languages.


Has anyone ever faced a problem like this? I tried searching on google 
but couldn't find anything.


Please suggest what can I do?

Thanks
Manu


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



[s2] s:url escaping '&' between params

2007-04-11 Thread Manu Mahajan

Hi

I'm facing a very annoying problem with s:url. For some reason it is 
encoding the '&' between the params to &


Here's my code


   
   




The above code outputs the url with parameters and '&' encoded

What could be the reason?


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



Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan

joey wrote:

only interceptors,results will be inherited from parent package.



Ok. Thanks.


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



Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
Ok. So what happens when I extend a package? Do i inherit its 
namespaces, interceptors and actionmappings in the sub package?



joey wrote:
Package 's name is the key to for other packages to reference like 
extend.

Namespace could be different  to name.

On 4/6/07, Manu Mahajan < [EMAIL PROTECTED]> wrote:


Manu Mahajan wrote:
> 1. How can I redirect a result from an action to an action in another
> namespace?
> I have separate configuration files for each namespace.
>
> 2. What is the significance of packages? Should the package name
> always be the same as the namespace?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
Ok. I just found out the answer to the first question in the docs...

Did something like this...

menu
/project


But I'm still not sure how package and namespace are related. Please 
help.




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






No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.26/748 - Release Date: 4/5/2007 3:33 
PM
  




Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan

Manu Mahajan wrote:
1. How can I redirect a result from an action to an action in another 
namespace?

I have separate configuration files for each namespace.

2. What is the significance of packages? Should the package name 
always be the same as the namespace?



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





Ok. I just found out the answer to the first question in the docs...

Did something like this...

   menu
   /project


But I'm still not sure how package and namespace are related. Please help.


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



[S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
1. How can I redirect a result from an action to an action in another 
namespace?

I have separate configuration files for each namespace.

2. What is the significance of packages? Should the package name always 
be the same as the namespace?



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



Re: unable to capture events with

2007-04-03 Thread Manu Mahajan

I have posted a comment and the suggested patch on Jira.

I think this has probably broken due to a change in Dojo upstream.

Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:
  

If your code is working then can you please check
what version of struts you are using because it's


not
  

working for me. I am using struts2-core-2.0.6.jar



I'm using 2.0.6, fairly recently upgraded from 2.0.5.

I tried it out again as a sanity check and, of course,
it no longer works (and something *horrible* is
happening on that page that makes Firefox lock up for
like 3 minutes, but I was in the process of changing
it so I must have left something in an awkward
state...)

So yes, I'd say there's a problem, although I'm not
sure when it actually started. Nothing relating to the
tree stuff (appears to have, anyway!) changed between
2.0.5-2.0.6; haven't checked 2.0.4 yet.

I probably won't be able to look at it again until I
resolve my rendering issue, but maybe someone else has
some input.
  

Please suggest if I'm on the right track and if this
could be incorporated in the struts code and what is



  

the formal way to suggest this to the developers.



File a JIRA ticket against .

It looks as though this may have already been done:

https://issues.apache.org/struts/browse/WW-1813

so you could add a comment and attach your proposed
patches.

(I am curious as to when it broke, now; I would have
sworn it worked under 2.0.5, but now I'm thinking
maybe not since 2.0.4? I dunno.)

d.



 


Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 


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



  




Re: unable to capture events with

2007-04-02 Thread Manu Mahajan
Yes, I've tried with those options. I'm not getting any debug output in 
this case.


Can anyone verify if the struts showcase app examples work. Because to 
me it seems that they don't either. Here's code from the sample app.





function treeNodeSelected(nodeId) {
alert(nodeId)//added by manu for testing
dojo.io.bind({
</pre><tt>url: "<s:url 
</tt><tt>value='/tags/ui/ajax/dynamicTreeSelectAction.action' />?nodeId="+nodeId,
</tt><pre style="margin: 0em;">
load: function(type, data, evt) {
var displayDiv = dojo.byId("displayId");
displayDiv.innerHTML = data;
},
mimeType: "text/html"
});
};

dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");









Please click on any of the tree nodes.




I have added the alert in the function. It never seems to get called.

Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:
  

function treeNodeSelected(){
alert('Temporary like Achilles')
}
dojo.event.topic.subscribe("/treeSelected",
this, "treeNodeSelected");


 



I just don't see anything immediately wrong; the only
differences are the arguments to the JavaScript
function (did you try with a single argument like
mine?) and the "/" in the topic, which definitely
shouldn't matter (but try it anyway).

You're getting no debug output?

  

I have a feeling that I'm missing some dependancy.
Do i need anything apart from the jars in the blank 
app?



I don't know, but I doubt it. Dojo is contained inside
S2 (at least for 2.0.6; which version are you using
again?)

d.



 

TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.

http://tv.yahoo.com/

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



  




Re: unable to capture events with

2007-04-02 Thread Manu Mahajan

Here's my code.




   function treeNodeSelected(){
   alert('Temporary like Achilles')
   }
   dojo.event.topic.subscribe("/treeSelected", this, "treeNodeSelected");










I have a feeling that I'm missing some dependancy. Do i need anything 
apart from the jars in the blank app?


Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:
  

I'm using Tomcat 5.5



The code I posted is working for me; can you post your
current code? (Personally I won't have access to my
code until this evening, but maybe somebody else can
help.)

d.



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

http://tools.search.yahoo.com/toolbar/features/mail/

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



  




Re: unable to capture events with

2007-04-02 Thread Manu Mahajan
For your information. The tree examples in the struts2 showcase app are 
also not working. I have tried on a fresh install of Tomcat. The trees 
render properly but nothing happens on clicking the nodes. As of now I 
don't have access to any other container so can only test on Tomcat.


Manu Mahajan wrote:

I'm using Tomcat 5.5

Tapio Holopainen wrote:

Hi,

Which web container you are using? I have found problems when using 
dojo with Websphere.


Regards,

- Tapio


On Mon, 02 Apr 2007 13:34:25 +0300, Manu Mahajan 
<[EMAIL PROTECTED]> wrote:



Thanks for the reply Dave, but this is not working for me. I have tried
enabling debugging in dojo. Also tried the following method that I 
found
in the dojo documentation, apart from trying to assign event 
handlers to

individual tree nodes.


var handlerNode = dojo.widget.byId("contentTree");
dojo.event.connect(handlerNode, "onClick", "treeNodeSelected");


I don't get any errors but it just doesn't work.

Do I have to include a jar or some other files for enabling dojo 
related
stuff in my web app? Right now I only have the jars that are 
included in

struts2-blank.war

Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:


Do I have to use some dojo specific code here?



I've been using the Dojo binding stuff; my sample is
from a pretty long time ago now but here it is in case
it helps. It might just make things worse ;)

The Javascript:

function treeNodeSelected(nodeId) {
  alert("nodeId = " + nodeId);
  /* Normally I'm doing some Ajax on a select; I left
   * it here so you could see one way if you want.
  dojo.io.bind({
  url: "",
  load: function(type, data, evt) {
  var displayDiv = dojo.byId("displayId");
  displayDiv.innerHTML = data;
  },
  mimeType: "text/html"
  });
  */
};

// arg1: topic named in 
// arg2: not sure; don't remember
// arg3: name of JavaScript handler.
dojo.event.topic.subscribe("treeSelected", this,
"treeNodeSelected");

The JSP:



I'll add this or something similar to the Wiki at some
point, and I fixed the snippets that were giving an
error.

Question about snippets: is there a way to make them
render properly?

d.




 


It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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










--Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
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]







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



Re: unable to capture events with

2007-04-02 Thread Manu Mahajan

I'm using Tomcat 5.5

Tapio Holopainen wrote:

Hi,

Which web container you are using? I have found problems when using 
dojo with Websphere.


Regards,

- Tapio


On Mon, 02 Apr 2007 13:34:25 +0300, Manu Mahajan 
<[EMAIL PROTECTED]> wrote:



Thanks for the reply Dave, but this is not working for me. I have tried
enabling debugging in dojo. Also tried the following method that I found
in the dojo documentation, apart from trying to assign event handlers to
individual tree nodes.


var handlerNode = dojo.widget.byId("contentTree");
dojo.event.connect(handlerNode, "onClick", "treeNodeSelected");


I don't get any errors but it just doesn't work.

Do I have to include a jar or some other files for enabling dojo related
stuff in my web app? Right now I only have the jars that are included in
struts2-blank.war

Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:


Do I have to use some dojo specific code here?



I've been using the Dojo binding stuff; my sample is
from a pretty long time ago now but here it is in case
it helps. It might just make things worse ;)

The Javascript:

function treeNodeSelected(nodeId) {
  alert("nodeId = " + nodeId);
  /* Normally I'm doing some Ajax on a select; I left
   * it here so you could see one way if you want.
  dojo.io.bind({
  url: "",
  load: function(type, data, evt) {
  var displayDiv = dojo.byId("displayId");
  displayDiv.innerHTML = data;
  },
  mimeType: "text/html"
  });
  */
};

// arg1: topic named in 
// arg2: not sure; don't remember
// arg3: name of JavaScript handler.
dojo.event.topic.subscribe("treeSelected", this,
"treeNodeSelected");

The JSP:



I'll add this or something similar to the Wiki at some
point, and I fixed the snippets that were giving an
error.

Question about snippets: is there a way to make them
render properly?

d.




 


It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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










--Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
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: unable to capture events with

2007-04-02 Thread Manu Mahajan
Thanks for the reply Dave, but this is not working for me. I have tried 
enabling debugging in dojo. Also tried the following method that I found 
in the dojo documentation, apart from trying to assign event handlers to 
individual tree nodes.



   var handlerNode = dojo.widget.byId("contentTree");
   dojo.event.connect(handlerNode, "onClick", "treeNodeSelected");


I don't get any errors but it just doesn't work.

Do I have to include a jar or some other files for enabling dojo related 
stuff in my web app? Right now I only have the jars that are included in 
struts2-blank.war


Dave Newton wrote:

--- Manu Mahajan <[EMAIL PROTECTED]> wrote:
  

Do I have to use some dojo specific code here?



I've been using the Dojo binding stuff; my sample is
from a pretty long time ago now but here it is in case
it helps. It might just make things worse ;)

The Javascript:

function treeNodeSelected(nodeId) {
  alert("nodeId = " + nodeId);
  /* Normally I'm doing some Ajax on a select; I left
   * it here so you could see one way if you want.
  dojo.io.bind({
  url: "",
  load: function(type, data, evt) {
  var displayDiv = dojo.byId("displayId");
  displayDiv.innerHTML = data;
  },
  mimeType: "text/html"
  });
  */
};

// arg1: topic named in 
// arg2: not sure; don't remember
// arg3: name of JavaScript handler.
dojo.event.topic.subscribe("treeSelected", this,
"treeNodeSelected");

The JSP:



I'll add this or something similar to the Wiki at some
point, and I fixed the snippets that were giving an
error.

Question about snippets: is there a way to make them
render properly?

d.



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

http://tools.search.yahoo.com/toolbar/features/mail/

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



  




unable to capture events with

2007-04-02 Thread Manu Mahajan

I am unable to capture any events with a dynamically created tree.

My jsp code is pasted below. The tree renders correctly. I have tried 
using tags like onclick, onchange etc but it doesnt seem to be working. 
Do I have to use some dojo specific code here?



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




function nodeClicked(nodeID){
   alert('foo')
}









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



Re: struts.xml - change default location

2007-03-28 Thread Manu Mahajan

I second this.

And thanks for the replies.

doktora wrote:

I think the fact that you cannot change the location of struts.xml should be
put in here:

http://struts.apache.org/2.x/docs/struts-1-solutions.html

This will help out a lot of people who do not expect s2 to have this
different behaviour. I failed to find this documented anywhere which cost me
quite a bit of time and frustration with s2 because I couldn't even
jumpstart it.



Ted Husted-4 wrote:
  

Struts 2 uses a different approach to loading the configuration. The
initial struts.xml is loaded from the root of the classpath. The
easiest way to set that up is to put the struts.xml under the classes
folder. The "boostrap" struts.xml can then load whatever other
struts.xml's you would like using the include element.

HTH, Ted
 


On 3/27/07, doktora <[EMAIL PROTECTED]> wrote:


Why is it that putting this in the FilterDispatcher  section in
web.xml breaks Sturts2:


  config
  /WEB-INF/struts.xml


It looks to me as if this makes S2 confused about the whereabouts of its
other struts-default.xml, etc. files.


doktora


Ted Husted-4 wrote:
  

Put a stub struts.xml on the classpath that loads your working
configuration from another location. If the stub is under classes and
the one you want is under WEB-INF, try





-HTH, Ted
 

On 3/19/07, Bartek <[EMAIL PROTECTED]> wrote:


Hi

I have to face up the following issue. My location of struts.xml
  

shoudl
  

be
WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different
config
locations (e.g. WEB-INF/struts.xml) for
  

StrutsXmlConfigurationProvider,
  

none
of them worked. Creating custom configuration provider might help, but
  

it
  

is
pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case.

Cheers
bartek
  

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






  


Re: Changing location of struts.xml

2007-03-28 Thread Manu Mahajan
Yes, that seems to work fine but I would have liked to keep it in a 
separate conf/struts folder inside the jar.


Adam Ruggles wrote:
I put mine in the root of my jar file and it works fine.  I don't even 
have a classes folder.


Manu Mahajan wrote:

Hello

I want to know if it is possible to change the location of the 
struts.xml file. I don't want to keep it in the WEB-INF\classes 
directory. Ideally I would like to create a jar file with all my 
configuration files(including configurations of 
hibernate/spring/sitemesh etc) and place it in the lib folder. I will 
be using Tomcat for deployment.


Thanks
Manu


-
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]






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



Changing location of struts.xml

2007-03-28 Thread Manu Mahajan

Hello

I want to know if it is possible to change the location of the 
struts.xml file. I don't want to keep it in the WEB-INF\classes 
directory. Ideally I would like to create a jar file with all my 
configuration files(including configurations of 
hibernate/spring/sitemesh etc) and place it in the lib folder. I will be 
using Tomcat for deployment.


Thanks
Manu


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