how to use message resource key for href

2006-04-04 Thread Vinit Sharma
Hi,

My requirement is to use a message resource key for html:link href attribute
instead of passing a hardcoded value.

Below:

Some text

I want to replace, ${item.link} with a key from resource file, btw my ${
item.link} returns a key only.

Can some one give an insight.

Thanks,


--
Vinit Sharma


NullPointerException in while initializing message resource

2006-04-04 Thread Ramkumar Krishnan
Hi All,
  I am getting Null PointerException when i tried to view my login page.
Struts is not able to find the message resources.

This is configuration in my struts-config.xml


i am getting
java.lang.NullPointerException at
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1174)
atorg.apache.struts.taglib.TagUtils.message(
TagUtils.java:1037) at org.apache.struts.taglib.bean.MessageTag.doStartTag(
MessageTag.java:224) at
jsp_servlet._content._jsp.__login._jspService(__login.java:161) at
weblogic.servlet.jsp.JspBase.service(JspBase.java:33)


I have attached the struts source i and i found it is happening in the
following line of TagUtils class

if (resources == null) {
ModuleConfig moduleConfig = getModuleConfig(pageContext);  //
Returns Null !!
resources =
(MessageResources) pageContext.getAttribute(
bundle + moduleConfig.getPrefix(),
PageContext.APPLICATION_SCOPE);
}


While debugging, it  is returning the ModuleConfig as null. I dont' know why
it is trying to get the module config even though i haven't configured any
struts module.


This is my web.xml
http://java.sun.com/dtd/web-app_2_3.dtd";>

AdminWar

contextConfigLocation
/WEB-INF/classes/spring/*.xml




locatorFactorySelector
beanRefContext.xml


parentContextKey
application-context



org.springframework.web.context.ContextLoaderListener


action
org.apache.struts.action.ActionServlet


config
/WEB-INF/struts-config.xml


debug
0



action
*.do


/WEB-INF/struts-html.tld
/WEB-INF/tlds/struts-html.tld


/WEB-INF/struts-logic.tld
/WEB-INF/tlds/struts-logic.tld


/WEB-INF/struts-bean.tld
/WEB-INF/tlds/struts-bean.tld


/WEB-INF/c.tld
/WEB-INF/tlds/c.tld


/WEB-INF/struts-html-extn.tld
/WEB-INF/tlds/struts-html-extn.tld




/WEB-INF/fmt.tld
/WEB-INF/tlds/fmt.tld


/WEB-INF/struts-html-el.tld
/WEB-INF/tlds/struts-html-el.tld


/WEB-INF/struts-bean-el.tld
/WEB-INF/tlds/struts-bean-el.tld



/WEB-INF/struts-nested.tld
/WEB-INF/tlds/struts-nested.tld


/WEB-INF/tavant_taglib.tld
/WEB-INF/tlds/tavant_taglib.tld


/WEB-INF/homer.tld
/WEB-INF/tlds/homer.tld


/WEB-INF/struts-tiles.tld
/WEB-INF/tlds/struts-tiles.tld


/WEB-INF/PermissionTags.tld
/WEB-INF/tlds/PermissionTags.tld


/WEB-INF/oscache.tld
/WEB-INF/tlds/oscache.tld



SecurePages
Security constraint /secure
/content/jsp/*
POST
GET


These are the roles who have access
users



FORM
myrealm

/content/jsp/login.jsp
/content/jsp/loginError.jsp



An Employee
users



thanks in advance,
--
Ramkumar K,

http://www.spreadfirefox.com/?q=affiliates&id=0&t=65";>http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>


Re: how to use message resource key for href

2006-04-04 Thread Nicolas De Loof


Perhaps somethig like this may work :



Some text


Nico.

Vinit Sharma a écrit :

Hi,

My requirement is to use a message resource key for html:link href attribute
instead of passing a hardcoded value.

Below:

Some text

I want to replace, ${item.link} with a key from resource file, btw my ${
item.link} returns a key only.

Can some one give an insight.

Thanks,


--
Vinit Sharma

  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: how to use message resource key for href

2006-04-04 Thread Vinit Sharma
Thanks,

I used a  in combination with . But fmt tag looks
neat.

:)

On 4/4/06, Nicolas De Loof <[EMAIL PROTECTED]> wrote:
>
>
> Perhaps somethig like this may work :
>
> 
>
> Some text
>
>
> Nico.
>
> Vinit Sharma a écrit :
> > Hi,
> >
> > My requirement is to use a message resource key for html:link href
> attribute
> > instead of passing a hardcoded value.
> >
> > Below:
> >
> > Some text
> >
> > I want to replace, ${item.link} with a key from resource file, btw my ${
> > item.link} returns a key only.
> >
> > Can some one give an insight.
> >
> > Thanks,
> >
> >
> > --
> > Vinit Sharma
> >
> >
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient,  you
> are not authorized to read, print, retain, copy, disseminate,  distribute,
> or use this message or any part thereof. If you receive this  message in
> error, please notify the sender immediately and delete all  copies of this
> message.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Vinit Sharma


Re: Some questions

2006-04-04 Thread Manfred Wolff


On 4/4/06, Mário Lopes <[EMAIL PROTECTED]> wrote:

>>Hi.
>>
>>1) I tried using Eclipse, as I've always did, for developing. What IDE
>>do you suggest?
>>
>>
Eclipse is a good choice.


>>2) I noticed that each time I did a simple change I had to build with
>>ant to package a .war and then restart Tomcat to recognize it. Tomcat
>>takes 20 secs to load which is absolutely unbearable. Is there a more
>>agile way of doing things?
>>
>>
You can create a xml file and put it under
${TOMCAT_HOME}/conf/Catalina/localhost. In this file you point to your
exclipse target directory (my target directory is the src directory, so
I don't have to build the war. If I save a file in the eclipse IDE the
tomcat will restart). So the tomcat will start, if you change a
ressource in the classpath and do not restart, if you change only a jsp.

For example:





>>3) Is MyEclipse worth it?
>>
>>
>>
I think, MyEclipse is a good but not a nessacary extension.

Manfred

---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: how to use message resource key for href

2006-04-04 Thread Vinit Sharma
But I faced a problem with the fmt tag, the variable link contains the key
instead of the text value.

Any clue??

On 4/4/06, Vinit Sharma <[EMAIL PROTECTED]> wrote:
>
> Thanks,
>
> I used a  in combination with . But fmt tag looks
> neat.
>
> :)
>
>
> On 4/4/06, Nicolas De Loof < [EMAIL PROTECTED]> wrote:
> >
> >
> > Perhaps somethig like this may work :
> >
> > 
> >
> > Some text
> >
> >
> > Nico.
> >
> > Vinit Sharma a écrit :
> > > Hi,
> > >
> > > My requirement is to use a message resource key for html:link href
> > attribute
> > > instead of passing a hardcoded value.
> > >
> > > Below:
> > >
> > > Some text
> > >
> > > I want to replace, ${item.link} with a key from resource file, btw my
> > ${
> > > item.link} returns a key only.
> > >
> > > Can some one give an insight.
> > >
> > > Thanks,
> > >
> > >
> > > --
> > > Vinit Sharma
> > >
> > >
> >
> > This message contains information that may be privileged or confidential
> > and is the property of the Capgemini Group. It is intended only for the
> > person to whom it is addressed. If you are not the intended recipient,  you
> > are not authorized to read, print, retain, copy, disseminate,  distribute,
> > or use this message or any part thereof. If you receive this  message in
> > error, please notify the sender immediately and delete all  copies of this
> > message.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Vinit Sharma
>



--
Vinit Sharma


Re: Some questions

2006-04-04 Thread Bart Busschots

Mário Lopes wrote:

Hi.

First off, a little bit of my background. I've been developing with
Java for a long time now. None of it was web based development. On
this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
etc..

Now that I'm encharged of developing a Java/JSP/Servlets application I
had to decide about a framework to ease my life. It had to have a
strong MVC pattern to enforce organization. So I picked Struts :-)

Now that I've given it a test drive, some questions arose:

1) I tried using Eclipse, as I've always did, for developing. What IDE
do you suggest?
  
I've never used Eclipse. I like using jEdit with the various Java 
Extensions installed. I very much doubt it's better than eclipse though. 
I just like it because I use it a lot and have done for a long time.

2) I noticed that each time I did a simple change I had to build with
ant to package a .war and then restart Tomcat to recognize it. Tomcat
takes 20 secs to load which is absolutely unbearable. Is there a more
agile way of doing things?
  
On my development server I set up a context for my project that is 
re-loadable and rather than getting my build script to create a war file 
I just get it to compile the lot and then copy it all to the context's 
folder. Tomcat then notices that the files in that context have changed 
and just re-loads them. I find it a lot quicker than having to start and 
stop Tomcat.


To do this just create a folder with the name if the web app in 
$CATALINA_HOME/webapps (for this example lets use test_app) and then 
create an XML file in $CATALINA_HOME/conf/Catalina/localhost/ with the 
same name as the folder you just made but with a .xml extension and then 
add contents like this:


privileged="true" reloadable="true">


Remembering of course to repalce test_app with the name of the folder 
you created.


Hope that's of some help,

Bart.

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



[ANN] JAVAWUG BOF XVII / Thursday 20th April 2006 @ 19:00 / Oracl e City of London

2006-04-04 Thread Pilgrim, Peter

Dear All

I would like to formally announce that JAVAWUG (Java Web User Group) 
is holding the seventeenth Birds-of-Feather (Meet up XVII) at the 
Oracle City of London offices on Thursday, 20th April 2006.

The meeting will take place in a room with Audio/Visual facilities
between 7-9:30 pm. There will be a series of presentations, Quickies,
inspired by the JavaPolis short presentation format.

The confirmed speakers are:

Prashanth, S.
``J2EE: Security on Websphere''

Peter Pilgrim
``Experiences With WebWork''



Afterwards members can retire to the nearby the ``All Bar One'' 
pub/restaurant for more in depth discussion dinner, 
food and drink ...

The address is:
Oracle City Of London
One South Place
London,
England
EC2M 2RB.


If you would like to attend, please REGISTER so that you can
be added to the SECURITY DETAIL

Join the http://groups.google.com/group/javawug JAVAWUG at Google Groups
and ``Send an Email to the list you are attending'' 

Alternatively send mail to myself at peter dot pilgrim at credit-suisse.com 
and duncan dot mills at oracle.com

Here is some relevant travel information: 

By Underground: -
Moorgate: Take the Moorgate East exit, turn right, one block to South 
Place.
Bank: Take the Northern line to Moorgate.
Liverpool Street: Take the Broadgate exit, turn right onto South Place


Map: http://www.oracle.com/global/uk/corporate/locations/citymap.html 

The venue has graciously been organised by Duncan Mills of Oracle Corp. 
We all appreciate this generous gift. 

http://www.javawug.com/

http://jroller.com/page/peter_pilgrim

PS: The presentations will be recorded and I hope to upload them all
Google Video Site. search against JAVAWUG for the last video uploads.



--
Peter Pilgrim :: J2EE Software Development & Architecture
Operations/IT - Credit Suisse Group - "One Bank",
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497
 peter dot pilgrim at credit-suisse.com 

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==


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



Re: Some questions

2006-04-04 Thread Mário Lopes
Thank you for your suggestions, I hope they'll increase my productivity! :-)

Regards,

Mário Lopes

On 4/4/06, Bart Busschots <[EMAIL PROTECTED]> wrote:
> Mário Lopes wrote:
> > Hi.
> >
> > First off, a little bit of my background. I've been developing with
> > Java for a long time now. None of it was web based development. On
> > this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
> > etc..
> >
> > Now that I'm encharged of developing a Java/JSP/Servlets application I
> > had to decide about a framework to ease my life. It had to have a
> > strong MVC pattern to enforce organization. So I picked Struts :-)
> >
> > Now that I've given it a test drive, some questions arose:
> >
> > 1) I tried using Eclipse, as I've always did, for developing. What IDE
> > do you suggest?
> >
> I've never used Eclipse. I like using jEdit with the various Java
> Extensions installed. I very much doubt it's better than eclipse though.
> I just like it because I use it a lot and have done for a long time.
> > 2) I noticed that each time I did a simple change I had to build with
> > ant to package a .war and then restart Tomcat to recognize it. Tomcat
> > takes 20 secs to load which is absolutely unbearable. Is there a more
> > agile way of doing things?
> >
> On my development server I set up a context for my project that is
> re-loadable and rather than getting my build script to create a war file
> I just get it to compile the lot and then copy it all to the context's
> folder. Tomcat then notices that the files in that context have changed
> and just re-loads them. I find it a lot quicker than having to start and
> stop Tomcat.
>
> To do this just create a folder with the name if the web app in
> $CATALINA_HOME/webapps (for this example lets use test_app) and then
> create an XML file in $CATALINA_HOME/conf/Catalina/localhost/ with the
> same name as the folder you just made but with a .xml extension and then
> add contents like this:
>
>  privileged="true" reloadable="true">
>
> Remembering of course to repalce test_app with the name of the folder
> you created.
>
> Hope that's of some help,
>
> Bart.
>
> -
> 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: Switch Action

2006-04-04 Thread Ted Husted
On 4/4/06, Sahil Gupta <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can anyone tell me how to use Switch Action in my project. My project
> consists of more than one module and I need to forward from one to
> another file in different modules.
>
> Are there any good links available to get more information about it.

Aside from

* 
http://struts.apache.org/struts-action/userGuide/configuration.html#dd_config_modules

There's also

Advanced Action Classes
* http://javaadvisor.com/doc/13372

Jakarta Struts: Seven Lessons from the Trenches
* http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html?page=2

Developing Struts with Easy Struts for Eclipse
* http://www-128.ibm.com/developerworks/library/os-ecstruts/

HTH, Ted.

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



Error Message on Tomcat when classes are put in shared-Folder

2006-04-04 Thread starki78
Hello!


I've classes within a web-application and everything works fine.

Then I put these classes to the shared folder, I get this error:


java.lang.NullPointerException

org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1161)
org.apache.struts.taglib.TagUtils.message(TagUtils.java:1024)
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224)

org.apache.jsp.jsp.index_jsp._jspx_meth_bean_message_0(index_jsp.java:180)
org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


When I copy the package to the standard shared-Folder and I get this exception
These are the lines of the struts-framework where the error occurs:

 MessageResources resources =
retrieveMessageResources(pageContext, bundle, false);



Can someone give me a hint if I can do something against this error?

Nice greetings


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



Re: Error Message on Tomcat when classes are put in shared-Folder

2006-04-04 Thread Wendy Smoak
On 4/4/06, starki78 <[EMAIL PROTECTED]> wrote:

> I've classes within a web-application and everything works fine.
>
> Then I put these classes to the shared folder, I get this error:
>
> java.lang.NullPointerException
> 
> org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1161)

Putting the Struts jars in a shared location is not a supported configuration

 * 
http://struts.apache.org/struts-action/userGuide/configuration.html#config_add

There has been some discussion about supporting it, but no changes
AFAIK and I don't see an enhancement ticket open.

 * 


--
Wendy

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



RE: Issue while migrating from 1.0 to 1.1

2006-04-04 Thread Slattery, Tim - BLS
>   Now here is my issue.
>   In the form, if the user forgets a mandatory field, I do 
> something like :
> errors.add (...
> ...
> return errors

If I'm following correctly, this returns an ActionErrors collection to
your Action.

>   I do not use saveErrors(), because I use it only in the action.

If you don't use saveErrors, then the ActionErrors collection doesn't
get saved, and you don't get any error messages.

>   With WSAD/ Struts 1.0 it works fine : stay on same page and 
> display errors.
>   With RSA/Struts 1.1 it stay on same page and display nothing.

I have no idea what WSAD or RSA are. But the ActionErrors has to be
saved someplace in order for the  tag to find it. Maybe
WSAD did that  for you and RSA doesn't?

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: NullPointerException in while initializing message resource

2006-04-04 Thread RathinaGanesh MeenakshiSundaram
Hi,

You should specify the full package location of the message-resource file..
The parameter should be like this..

Hope this helps..!

Thanks,
Ganesh.


On 4/4/06, Ramkumar Krishnan <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>   I am getting Null PointerException when i tried to view my login page.
> Struts is not able to find the message resources.
>
> This is configuration in my struts-config.xml
> 
>
> i am getting
> java.lang.NullPointerException at
> org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java
> :1174)
> atorg.apache.struts.taglib.TagUtils.message(
> TagUtils.java:1037) at org.apache.struts.taglib.bean.MessageTag.doStartTag
> (
> MessageTag.java:224) at
> jsp_servlet._content._jsp.__login._jspService(__login.java:161) at
> weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>
>
> I have attached the struts source i and i found it is happening in the
> following line of TagUtils class
> 
> if (resources == null) {
> ModuleConfig moduleConfig = getModuleConfig(pageContext);  //
> Returns Null !!
> resources =
> (MessageResources) pageContext.getAttribute(
> bundle + moduleConfig.getPrefix(),
> PageContext.APPLICATION_SCOPE);
> }
>
>
> While debugging, it  is returning the ModuleConfig as null. I dont' know
> why
> it is trying to get the module config even though i haven't configured any
> struts module.
>
>
> This is my web.xml
>  Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> AdminWar
> 
> contextConfigLocation
> /WEB-INF/classes/spring/*.xml
> 
>
> 
> 
> locatorFactorySelector
> beanRefContext.xml
> 
> 
> parentContextKey
> application-context
> 
> 
> 
> org.springframework.web.context.ContextLoaderListener
> 
> 
> action
> org.apache.struts.action.ActionServlet
> 
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> debug
> 0
> 
> 
> 
> action
> *.do
> 
> 
> /WEB-INF/struts-html.tld
> /WEB-INF/tlds/struts-html.tld
> 
> 
> /WEB-INF/struts-logic.tld
> /WEB-INF/tlds/struts-logic.tld
> 
> 
> /WEB-INF/struts-bean.tld
> /WEB-INF/tlds/struts-bean.tld
> 
> 
> /WEB-INF/c.tld
> /WEB-INF/tlds/c.tld
> 
> 
> /WEB-INF/struts-html-extn.tld
> /WEB-INF/tlds/struts-html-extn.tld
> 
> 
>
> 
> /WEB-INF/fmt.tld
> /WEB-INF/tlds/fmt.tld
> 
> 
> /WEB-INF/struts-html-el.tld
> /WEB-INF/tlds/struts-html-el.tld
> 
> 
> 
> /WEB-INF/struts-bean-el.tld
> /WEB-INF/tlds/struts-bean-el.tld
> 
> 
>
> 
> /WEB-INF/struts-nested.tld
> /WEB-INF/tlds/struts-nested.tld
> 
> 
> /WEB-INF/tavant_taglib.tld
> /WEB-INF/tlds/tavant_taglib.tld
> 
> 
> /WEB-INF/homer.tld
> /WEB-INF/tlds/homer.tld
> 
> 
> /WEB-INF/struts-tiles.tld
> /WEB-INF/tlds/struts-tiles.tld
> 
> 
> /WEB-INF/PermissionTags.tld
>
> /WEB-INF/tlds/PermissionTags.tld
> 
> 
> /WEB-INF/oscache.tld
> /WEB-INF/tlds/oscache.tld
> 
> 
> 
> SecurePages
> Security constraint /secure
> /content/jsp/*
> POST
> GET
> 
> 
> These are the roles who have access
> users
> 
> 
> 
> FORM
> myrealm
> 
> /content/jsp/login.jsp
> /content/jsp/loginError.jsp
> 
> 
> 
> An Employee
> users
> 
> 
>
> thanks in advance,
> --
> Ramkumar K,
>
> http://www.spreadfirefox.com/?q=affiliates&id=0&t=65
> "> border="0" alt="Get Firefox!" title="Get Firefox!" src="
> http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>
>
>


DynaValidator* examples?

2006-04-04 Thread Brian Long

Hello All.

I'm using Struts 1.2.9 and Tiles.

Can anyone point me at a decent example of using multi-page forms with
one of the DynaValidator* classes?

Thanks in advance,
-Brian

-- 
Brian M. Long
Middleware Services, Virginia Tech
"Ancora Imparo (I am still learning)" - Michaelangelo, age 87



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



Re: action not work

2006-04-04 Thread Antonio Petrelli

red phoenix ha scritto:

I have a submit button in A.jsp,and I want to submit to B.do from A.jsp,but
when I click this submit button,it should submit to B.do and show some
information on screen,but in fact it doesn't work,


What do you mean by "it doesn't work"? It is a 404, a 500, what?


when I use http://localhost:8080/B.do, it can work.


Uh? Are you sure? It should be http://localhost:8080/webappName/B.do


/*A.jsp*/
<%@ taglib uri="/WEB-INF/taglib/struts-html" prefix="html"%>

  
correct with: action="/B", that's for sure... maybe... I don't know if 
Struts (Action Framework) automatically adds ".do" if it is not present, 
or always...

Ciao
Antonio

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



Re: Error while configure struts Datasource

2006-04-04 Thread Antonio Petrelli

red phoenix ha scritto:

java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
  


Google is your friend. Search:

org.apache.commons.dbcp.BasicDataSource
The first result is a javadoc page, the second if the homepage of Jakarta 
Commons DBCP:
http://jakarta.apache.org/commons/dbcp/

At this point, what can you do you may guess... Well, probably you have to 
download Jakarta Commons DBCP and put it in your WEB-INF/lib directory.
Oh boy!
Ciao
Antonio


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



RE: Issue while migrating from 1.0 to 1.1

2006-04-04 Thread Olivier Citeau
Hi Tim,
   
  In fact no action is involved, only a form and a jsp.
  In struts-config.xml I have validate=true
   
  So Struts calls from.validate() which returns a non empty ActionErrors object.
  Since ActionErrors object is non empty, both version of Struts redirect to 
the same jsp page and do not call the action.
   
  So I should use saveErrors in form.validate() too ?
   
  It seems to me that the different behaviour is due too change of struts 
version, not websphere version.

  A strange thing is that when I add the following to thh jsp of my working web 
application (aka old struts), there is no error object :
  <%
  for (java.util.Enumeration e = request.getParameterNames() ; 
e.hasMoreElements() ;) {
  System.out.println(e.nextElement());
  }
  %>
   
  
"Slattery, Tim - BLS" <[EMAIL PROTECTED]> a écrit :
  > Now here is my issue.
> In the form, if the user forgets a mandatory field, I do 
> something like :
> errors.add (...
> ...
> return errors

If I'm following correctly, this returns an ActionErrors collection to
your Action.

> I do not use saveErrors(), because I use it only in the action.

If you don't use saveErrors, then the ActionErrors collection doesn't
get saved, and you don't get any error messages.

> With WSAD/ Struts 1.0 it works fine : stay on same page and 
> display errors.
> With RSA/Struts 1.1 it stay on same page and display nothing.

I have no idea what WSAD or RSA are. But the ActionErrors has to be
saved someplace in order for the tag to find it. Maybe
WSAD did that for you and RSA doesn't?

--
Tim Slattery
[EMAIL PROTECTED]




-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

Re: action not work

2006-04-04 Thread Dave Newton
Antonio Petrelli wrote:
> red phoenix ha scritto:
>> when I use http://localhost:8080/B.do, it can work.
> Uh? Are you sure? It should be http://localhost:8080/webappName/B.do

Not if you're deploying to the root webapp.

Dave



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



Re: action not work

2006-04-04 Thread Antonio Petrelli

Dave Newton ha scritto:

Antonio Petrelli wrote:
  

red phoenix ha scritto:


when I use http://localhost:8080/B.do, it can work.
  

Uh? Are you sure? It should be http://localhost:8080/webappName/B.do



Not if you're deploying to the root webapp.
  


Uh right... Too few hours spent sleeping this night :-)

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



how to get the version of struts during runtime

2006-04-04 Thread Günther Wieser
hi,

i would need to check the version of struts running during runtime, to be
more specific when my derived action servlet runs through its init method
(derived from ActionServlet of course).
reason is, if the minor version has changed, a warning should be written to
the logs; if a major change of the version happened, my action servlet will
refuse to start until somebody checked the code of the servlet and made sure
that it's running with the new version.

any ideas?

kr,
guenther

--
Günther Wieser

creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com

"2 Dinge sind unendlich: Das Universum und die 
Dummheit der Menschheit, aber beim Universum 
bin ich mir nicht so ganz sicher."
Albert Einstein 





RE: Issue while migrating from 1.0 to 1.1

2006-04-04 Thread Olivier Citeau
In fact there is always an actionError object.
  When trying to debug I used request.getParameterNames instead of 
request.getAttributeNames
   
  So using 
  <%
  org.apache.struts.action.ActionErrors ae = 
(org.apache.struts.action.ActionErrors)request.getAttribute(org.apache.struts.Globals.ERROR_KEY);
  System.out.println("ae.size()="+ae.size());
  for (java.util.Iterator e = ae.get ("login.password") ; e.hasNext() ;) {
  org.apache.struts.action.ActionError aerr = 
(org.apache.struts.action.ActionError)e.next();
  System.out.println(aerr.getKey());
  }
  %>
  Wich outputs 
ae.size()=1
error.mandatory.login.password
   
  So, the issue is with the  tag itself
  

Olivier Citeau <[EMAIL PROTECTED]> a écrit :
  Hi Tim,

In fact no action is involved, only a form and a jsp.
In struts-config.xml I have validate=true

So Struts calls from.validate() which returns a non empty ActionErrors object.
Since ActionErrors object is non empty, both version of Struts redirect to the 
same jsp page and do not call the action.

So I should use saveErrors in form.validate() too ?

It seems to me that the different behaviour is due too change of struts 
version, not websphere version.

A strange thing is that when I add the following to thh jsp of my working web 
application (aka old struts), there is no error object :
  for (java.util.Enumeration e = request.getParameterNames() ; 
e.hasMoreElements() ;) {
  System.out.println(e.nextElement());
  }
  %>


"Slattery, Tim - BLS" a écrit :
> Now here is my issue.
> In the form, if the user forgets a mandatory field, I do 
> something like :
> errors.add (...
> ...
> return errors

If I'm following correctly, this returns an ActionErrors collection to
your Action.

> I do not use saveErrors(), because I use it only in the action.

If you don't use saveErrors, then the ActionErrors collection doesn't
get saved, and you don't get any error messages.

> With WSAD/ Struts 1.0 it works fine : stay on same page and 
> display errors.
> With RSA/Struts 1.1 it stay on same page and display nothing.



-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Ashish Kulkarni
Hi
I am trying to do a test application using struts, DWR
I am having problem with document.getElementById
method in javascript, this works fine in IE 6.0 and
opera
I am using struts tag


and then in my javascript doing the following
 document.getElementById('last').value= data;

Firefox gives me javascript error, element with name
last not found,
but if i define this field as 


It works in firefox, so how can i define struts tag to
get the id attribute , or is there a work around

Ashish

__
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: issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Slattery, Tim - BLS
> I am trying to do a test application using struts, DWR
> I am having problem with document.getElementById
> method in javascript, this works fine in IE 6.0 and
> opera
> I am using struts tag
> 
> 
> and then in my javascript doing the following  
> document.getElementById('last').value= data;
> 
> Firefox gives me javascript error, element with name
> last not found,
> but if i define this field as 
>  maxlength="50" value="" readonly="readonly">
> 
> It works in firefox, so how can i define struts tag to
> get the id attribute , or is there a work around

You've hit the nail on the head, you need to tell the  tag to
output an "id" attribute. You do that by using the styleId attribute of
the tag:

 


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Issue while migrating from 1.0 to 1.1

2006-04-04 Thread Slattery, Tim - BLS


>   Which outputs 
> ae.size()=1
> error.mandatory.login.password
>
>   So, the issue is with the  tag itself

So the errors collection is getting stored in the right place. I think
we have to look at your properties file. Apparently the 
tag is finding *some* properties file, since it doesn't compain about
not being able to find it. Could there be more than one in your WAR
file? Could  be finding one that doesn't define
"error.mandatory.login.password"? Could you have misspelled that string
in the properties file?

I'm shooting in the dark here, I don't have a good idea what could be
wrong.


--
Tim Slattery
[EMAIL PROTECTED]


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



get info error

2006-04-04 Thread Angel Navarro
Hi,
in my struts web application have (web.xml):


java.lang.Throwable
/templates/error/error.jsp


and i want to get the description error in error.jsp.

in logging file have:

java.lang.Throwable: Could not complete parsing, unmatched tags: html
at weblogic.servlet.jsp.JspLexer.parse()V(JspLexer.java:980)
.

In error.jsp have:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" isErrorPage="true" %>







Error Grave.
<%exception.printStackTrace(); %>



but not found

can anybody help me?
Thanks

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



RE: issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Ashish Kulkarni
Hi
Thanx for the answer, where in documenation is it
written that styleId is id??

Ashish

--- "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
wrote:

> > I am trying to do a test application using struts,
> DWR
> > I am having problem with document.getElementById
> > method in javascript, this works fine in IE 6.0
> and
> > opera
> > I am using struts tag
> >  readonly="true" />
> > 
> > and then in my javascript doing the following  
> > document.getElementById('last').value= data;
> > 
> > Firefox gives me javascript error, element with
> name
> > last not found,
> > but if i define this field as 
> >  
> > maxlength="50" value="" readonly="readonly">
> > 
> > It works in firefox, so how can i define struts
> tag to
> > get the id attribute , or is there a work around
> 
> You've hit the nail on the head, you need to tell
> the  tag to
> output an "id" attribute. You do that by using the
> styleId attribute of
> the tag:
> 
>  readonly="true"
> styleId="last"/> 
> 
> 
> --
> Tim Slattery
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


A$HI$H

__
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: issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Slattery, Tim - BLS
> Thanx for the answer, where in documenation is it
> written that styleId is id??

http://struts.apache.org/struts-taglib/tagreference-struts-html.html#htm
l:text


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Dave Newton
Ashish Kulkarni wrote:
> where in documenation is it written that styleId is id??
>   

http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#text

"Identifier to be assigned to this HTML element (renders an "id"
attribute)."

Dave



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



Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Ashish Kulkarni
hi
I have a website which is developed using struts, I am
looking to convert some of it to AJAX and working on
different approaches, 
In my current application, i have a common Action
class which has all the common functions like getting
the information stored in ServletContext, or Session
or getting the connection from JNDI
I am using Ibatis SQL mapping to run SQL querries,
with SqlMapClient stored in ServletContext.
What would be the best way to start converting to DWR,
in DWR i can just define simple java beans (POJO).
I can get access to servlet request, etc using 
WebContext ctx = WebContextFactory.get();
req = ctx.getHttpServletRequest();

This is what i am planning, using Action class and
ActionForm to load initial data on jsp, and then use
DWR to update information on this screen jsp after
user does some funtions.

Is this the right approach?
Can i access this form bean (in request scope in java
bean class)

What are other possible ways to do so

Ashish

__
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: Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Greg Ludington
You may want to ask this on the DWR users list; in version 1.1 there
is some support for accessing form beans directly from DWR.  The base
documentation page for DWR/Struts is here:

http://getahead.ltd.uk/dwr/server/struts

On 4/4/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> hi
> I have a website which is developed using struts, I am
> looking to convert some of it to AJAX and working on
> different approaches,
> In my current application, i have a common Action
> class which has all the common functions like getting
> the information stored in ServletContext, or Session
> or getting the connection from JNDI
> I am using Ibatis SQL mapping to run SQL querries,
> with SqlMapClient stored in ServletContext.
> What would be the best way to start converting to DWR,
> in DWR i can just define simple java beans (POJO).
> I can get access to servlet request, etc using
> WebContext ctx = WebContextFactory.get();
> req = ctx.getHttpServletRequest();
>
> This is what i am planning, using Action class and
> ActionForm to load initial data on jsp, and then use
> DWR to update information on this screen jsp after
> user does some funtions.
>
> Is this the right approach?
> Can i access this form bean (in request scope in java
> bean class)
>
> What are other possible ways to do so
>
> Ashish
>
> __
> 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]
>
>

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



Re: Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Joe Germuska

At 11:31 AM -0700 4/4/06, Ashish Kulkarni wrote:

hi
I have a website which is developed using struts, I am
looking to convert some of it to AJAX and working on
different approaches,
In my current application, i have a common Action
class which has all the common functions like getting
the information stored in ServletContext, or Session
or getting the connection from JNDI
I am using Ibatis SQL mapping to run SQL querries,
with SqlMapClient stored in ServletContext.
What would be the best way to start converting to DWR,
in DWR i can just define simple java beans (POJO).
I can get access to servlet request, etc using
WebContext ctx = WebContextFactory.get();
req = ctx.getHttpServletRequest();

This is what i am planning, using Action class and
ActionForm to load initial data on jsp, and then use
DWR to update information on this screen jsp after
user does some funtions.

Is this the right approach?
Can i access this form bean (in request scope in java
bean class)


see http://getahead.ltd.uk/dwr/server/struts

Personally, I don't think there's much point to trying to use Struts 
objects in your DWR code.  As noted on that page, you may be just as 
well off refactoring your code to a more general model which can be 
used both by the action and by the object you expose remotely via DWR.


Joe

--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com


"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
-- Robert Moog

Re: issue with Struts , DWR, javascript in Firefox browser

2006-04-04 Thread Michael Jouravlev
On 4/4/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> Hi
> Thanx for the answer, where in documenation is it
> written that styleId is id??


Current Struts website is too busy and font in the left menu is too
small, which is especially striking comparing to gigantic wiki font.

"JSP Taglib" is listed under extensions, but not under "Frameworks ->
Action Framework". Despite that many power users do not use JSP
taglibs, I think that taglibs should be part of standard distro, not
an extension. After all, most (all?) currently available books treat
Struts taglib as part of standard distro and JSP as standard view
technology.


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



I get exception : Path http://www.mywebsite.com/ does not start with a "/" character

2006-04-04 Thread Legolas Woodland

Hi
Thank you for reading my post
when i click on some of my links in the web application
The server return an exception like :


java.lang.IllegalArgumentException: Path http://www.mysite.com/ does not
start with a "/" character

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) 



org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) 



org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 


  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) 



com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) 




For example the above exception come from clicking a link that change 
the language.

which produce a url like :

http://www.mysite.com/ChangeLocale.do;jsessionid=2B7855F5F585B96C83B68FBC6B4E78D4?Lang=en 



when the browser shows the exception if i click GO button of
browser again it will works fine.


The source code for changeLocale action is as follow :


public class ChangeLocaleAction
  extends Action
{

 
  public ActionForward execute( ActionMapping mapping, ActionForm form,

HttpServletRequest request,
HttpServletResponse response )
  {
 ChangeLocaleForm theForm  = (ChangeLocaleForm)form;
 String   forward  = Constants.FORWARD_SUCCESS;
 String s=request.getParameter("Lang");   
 String   localeString = 
s;//request.getAttribute("Lang").toString();
 
 //theForm.getLocaleString();

 HttpSession  session  = request.getSession( true );
 int  headLen  = localeString.length();
 String   language = Constants.LANGUAGE_EN;
 String   country  = Constants.COUNTRY_US;

 if( headLen == 2 )
 {
language = localeString;
 }

 if( headLen == 5 )
 {
language = localeString.substring( 0, 2 );
country  = localeString.substring( 3 );
 }
//  System.out.println("This is the language : 
>"+language+"**This is the country : >"+ country);

 Locale newLocale = new Locale( language, country );
 session.setAttribute("Language",language);

 session.setAttribute( Globals.LOCALE_KEY, newLocale );

 ActionForward myForward = null;
 String myPath="/welcome.jsp";
 if 
((request.getHeader("Referer")!=null)&&(request.getHeader("Referer")!=""))

 try{
   
 myPath=request.getHeader("Referer");

myPath=StringUtils.substringAfter(myPath,request.getContextPath());
 if 
((request.getHeader("Referer")!=null)&&(request.getHeader("Referer")!="")){
 if(myPath=="/" || StringUtils.contains(myPath,"Locale")) 
myPath="/welcome.jsp?la="+language;
 myForward= new 
ActionForward("lastPath",myPath,false,false);

 return myForward;
 }
 }
 catch(Exception npe){
npe.printStackTrace();
  }

   //  [End]path redirection end here
   
   



 if (language=="hr"){  
session.setAttribute("LastPageInclude","/ContentPages/welcome.hr.jsp");

  }
 if (language=="en") { 
session.setAttribute("LastPageInclude","/ContentPages/welcome.en.jsp");

 }
 forward="forwarder";
 return mapping.findForward( forward );
 

  }

}



How i can fix this problem , it was working fine before i migrate to new 
server.

Thank you for looking at my code.





Re: [OT] Filter Help!

2006-04-04 Thread Matthew Vincent

Hello everyone,

If this is not the right place to post this could you please let me know 
where.  I have searched the forums and Google and cannot find an answer.


I have a Servlet filter that checks to see the content length of the 
request.


long contentLength = request.getContentLength();

If contentLength is greater than some configurable size, I would like to 
stop the request and send back a response saying that the request is to 
large.


This is being used for a file upload   Everything is working, except it 
seems like the ENTIRE request (or file) is sent BEFORE my redirect is 
happening.


My logs are showing the correct information at the appropriate times, 
but the entire request is being processed before I can send a request back.
Is there a way to immediately cut off the request and return a 
response?  Is there a better way to do this?


Request Size Filter: REQUEST LENGTH=401458785
Request Size Filter: CONTENT TYPE=multipart/form-data; 
boundary=---85421569618919

Request Size Filter: REQUEST = /jaxpathwi/imageAction.do
Request Size Filter: REFERER = 
http://deva2231:8080/jaxpathwi/imageAction.do?dispatch=setup&mouseKey=1&diagnosisKey=1 


Request Size Filter: Request is to be filtered and checked for size
Request Size Filter: REQUEST LENGTH [401458785] >= ALLOWABLE CONTENT 
LENGTH [500]

Request Size Filter: NOT Allowing request
Request Size Filter: Redirecting to -> 
http://deva2231.8080/jaxpathwi/imageAction.do?dispatch=setup&mouseKey=1&diagnosisKey=1 



I have posted a modified version of my code to show you.

Thanks!

Matt


package filters;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

package filters;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class RequestSizeFilter implements Filter {
 public static final String REDIRECT = "redirect";
  public static final String LENGTH = "length";
 private FilterConfig filterConfig = null;
  private static boolean bInitialized = false;
  private String strRedirectURL = null;
  private long lContentLength = -1l;
  private boolean bRedirect = false;

  public void init(FilterConfig config)
  throws ServletException {
  this.filterConfig = config;
  ServletContext servletContext = filterConfig.getServletContext();
 String strRedirect = filterConfig.getInitParameter(REDIRECT);
  String strLength = filterConfig.getInitParameter(LENGTH);
 if ((strLength != null) && (strLength.length() > 0)) {
  bInitialized = true;
  }

  // configure the redirect URL
  if ((strRedirect != null) && (strRedirect.length() > 0)) {
  strRedirectURL = new String(strRedirect);

  // configure redirect or forward
  bRedirect = strRedirect.startsWith("HTTP://") ||
  strRedirect.startsWith("HTTPS://") ||
  strRedirect.startsWith("http://";) ||
  strRedirect.startsWith("https://";);
  } else {
  bRedirect = true;
  }
 // configure the content length
  try {
  lContentLength = Long.parseLong(strLength);
  } catch (NumberFormatException nfe) {
  bInitialized = false;
  nfe.printStackTrace();
  }
  }

  public void destroy() {
  this.filterConfig = null;
  }
 public void doFilter(ServletRequest request, ServletResponse 
response,

   FilterChain chain)
  throws IOException, ServletException {
 long lRequestLength = request.getContentLength();
 String strRequestURI = 
((HttpServletRequest)request).getRequestURI();
  String strReferer = 
((HttpServletRequest)request).getHeader("Referer");

 log("REQUEST = " + strRequestURI);
  log("REFERER = " + strReferer);
 String strURL = strReferer;
  if ((strRedirectURL != null) && (strRedirectURL.length() > 0)) {
  strURL = strRedirectURL;
  }
 if (lRequestLength >= lContentLength) {
  if(bRedirect) {
  HttpServletResponse httpResponse = 
(HttpServletResponse)response;

  httpResponse.sendRedirect(strURL);
  } else {
  RequestDispatcher dispatcher =
  
filterConfig.getServletContext().getRequestDispatcher(strURL);

  dispatcher.forward(request, response);
  }
  } else {
  chain.doFilter(request, response);   }
  }
 private void log(String strMessage) {
  if (strMessage != null) {
  StringBuffer sb = new StringBuffer("Request Size Filter: ");
  sb.append(strMessage);
  this.filterConfig.getServletContext().log(sb.toString());
  System.out.println(sb.toString());
  sb = null;
  }
  }
}






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

Re: how to get the version of struts during runtime

2006-04-04 Thread Leon Rosenberg
On 4/4/06, Günther Wieser <[EMAIL PROTECTED]> wrote:
> hi,
>
> i would need to check the version of struts running during runtime, to be
> more specific when my derived action servlet runs through its init method
> (derived from ActionServlet of course).
> reason is, if the minor version has changed, a warning should be written to
> the logs; if a major change of the version happened, my action servlet will
> refuse to start until somebody checked the code of the servlet and made sure
> that it's running with the new version.

Now _this_ is called backward compatibility :-)
Leon


>
> any ideas?
>
> kr,
> guenther
>
> --
> Günther Wieser
>
> creative-it
> Guglgasse 6/1/11/1
> A-1110 Wien
> Austria
> http://www.creative-it.com
>
> "2 Dinge sind unendlich: Das Universum und die
> Dummheit der Menschheit, aber beim Universum
> bin ich mir nicht so ganz sicher."
> Albert Einstein
>
>
>
>
>

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



[OT] Best way to serve PDF with iText

2006-04-04 Thread Garner Shawn
I was wondering if anyone could give me any pros or cons of serving a
dynamically generated PDF file via a servlet or a struts action.

Only think I can think of is that as a servlet the it wouldn't have
access to the struts user session data and would have to post
necessary information for it to serve the pdf.

Does anyone have any pros or cons for an approach?

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



Re: [OT] Best way to serve PDF with iText

2006-04-04 Thread Dave Newton
Garner Shawn wrote:
> Only think I can think of is that as a servlet the it wouldn't have
> access to the struts user session data 

Why not? Is there more than one session?

Dave



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



Re: how to get the version of struts during runtime

2006-04-04 Thread Ted Husted
For the minor version number (1.1, 1.2, 1.3), you could check the DTD,
but I don't know of a reliable way to check for milestones (1.2.8
versus 1.2.9).

-Ted.

On 4/4/06, Günther Wieser <[EMAIL PROTECTED]> wrote:
> hi,
>
> i would need to check the version of struts running during runtime, to be
> more specific when my derived action servlet runs through its init method
> (derived from ActionServlet of course).
> reason is, if the minor version has changed, a warning should be written to
> the logs; if a major change of the version happened, my action servlet will
> refuse to start until somebody checked the code of the servlet and made sure
> that it's running with the new version.
>
> any ideas?
>
> kr,
> guenther
>
> --
> Günther Wieser
>
> creative-it
> Guglgasse 6/1/11/1
> A-1110 Wien
> Austria
> http://www.creative-it.com
>
> "2 Dinge sind unendlich: Das Universum und die
> Dummheit der Menschheit, aber beim Universum
> bin ich mir nicht so ganz sicher."
> Albert Einstein
>
>
>
>
>


--
HTH, Ted.
** http://www.husted.com/ted/blog/

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



Re: how to get the version of struts during runtime

2006-04-04 Thread Ted Husted
On 4/4/06, Ted Husted <[EMAIL PROTECTED]> wrote:
> For the minor version number (1.1, 1.2, 1.3), you could check the DTD,
> but I don't know of a reliable way to check for milestones (1.2.8
> versus 1.2.9).
>
> -Ted.

Actually, I take that back. You could check the manifest.mf file in
the JAR and examine the Implementation-Version.

-Ted.

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



Re: Some questions

2006-04-04 Thread Jonathan Revusky

Mário Lopes wrote:

Hi.

First off, a little bit of my background. I've been developing with
Java for a long time now. None of it was web based development. On
this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
etc..

Now that I'm encharged of developing a Java/JSP/Servlets application I
had to decide about a framework to ease my life. It had to have a
strong MVC pattern to enforce organization. So I picked Struts :-)


Mário,

It is normal that someone in your position would pick Struts, since, at
first blush, it appears to be a kind of "standard". Also, it does have
the clear advantage that there are third-party tools based on Struts and
various books and so on. However, even taking these factors into
account, I think you should really think twice about starting new
development on top of Struts 1.x.

For starters, development on Struts 1.x, a.k.a. Struts Classic, has been
more or less stagnant since about 2002. In the meantime, other web
application frameworks have been actively developed and are much more
advanced in what they offer. At this point, Struts 1.x is significantly
behind the state of the art in its application space. There is no
prospect of this changing. In fact, it will only become increasingly
technically obsolete over time.

All new development that is taking place under the so-called "Struts
umbrella" is either going to be on Struts Action 2 or Struts Shale.
Struts Action 2 is a completely different product, which is really the
rebranding of a competing framework, called Webwork. Shale, OTOH, is
based on a completely different component-based paradigm, since it is
built on the Java Server Faces spec from Sun. The only thing it has in
common with Struts Classic (besides the name) is that the original
author is the same, Craig McClanahan.

I think all of the above is objective information that is not in
dispute. Also, the implications are clear, which is that, starting new
projects with Struts 1.x is a very questionable decision at this stage
of history. It might well make sense for people who already have a
significant intellectual investment in the tool and, for whom, it is a
very comfortable thing they know. However, that does not seem to be your
case.

Well, in closing, my advice would be to spend a bit more time to get
familiar with what is cooking in this java web application space before
settling on your tool set. Have a look at Webwork, and Spring MVC and
maybe other new frameworks such as Stripes. (The case of Webwork is kind
of special, since Struts Action 2, the next generation Struts action
framework, actually *is* Webwork!) In any case, I put it to you that the
extra time invested in researching your toolset will be made up many
times over down the road.

Best Regards,

Jonathan Revusky
--
lead developer, FreeMarker project, http://freemarker.org/



Now that I've given it a test drive, some questions arose:

1) I tried using Eclipse, as I've always did, for developing. What IDE
do you suggest?
2) I noticed that each time I did a simple change I had to build with
ant to package a .war and then restart Tomcat to recognize it. Tomcat
takes 20 secs to load which is absolutely unbearable. Is there a more
agile way of doing things?
3) Is MyEclipse worth it?

I think this is it.. for now :-) I'll be forever in debt for your kind replies.

Regards,

Mário Lopes






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



Re: Some questions

2006-04-04 Thread Frank W. Zammetti

Jonathan Revusky wrote:

For starters, development on Struts 1.x, a.k.a. Struts Classic, has been
more or less stagnant since about 2002. 


Umm, since we all like dealing with "facts that are not in dispute"...

Struts 1.0, released June 2001
Struts 1.0.1, released January 2002
Struts 1.02, released February 2002
Struts 1.1, released June 2003
Struts 1.21 (Beta), released July 2004
Struts 1.2.2, released August 2004
Struts 1.2.4, released September 2004
Struts 1.2.6 (Beta), released December, 2004
Struts 1.2.7, released (as near as I can tell) May 2005
Struts 1.2.8, released (again, as near as I can tell) November 2005
Struts 1.2.9, released March 2006

So, since 2002, when you claim Struts has been "more or less stagnant" 
since, there have been 10 releases, so on average, a new release every 
4.5 months, give or take.


I'm not sure what dictionary your looking in, but for a project as 
important to so many people as Struts, that seems like a more than 
reasonable release record.  I'll grant you that not all those releases 
came with a bunch of new features, but that seems a bit unfair to me.


And let's not forget, 1.3 is coming, and it looks like pretty soon.  1.3 
brings one of the biggest changes so far in terms of what opportunities 
it should open up.  Whether that winds up being true or not is 
irrelevant, the fact is a lot of work went into it, and it *does* 
certainly represent a pretty big change.


> In the meantime, other web

application frameworks have been actively developed and are much more
advanced in what they offer. At this point, Struts 1.x is significantly
behind the state of the art in its application space. 


That may be true, but let me ask this question: so what?  Does Struts as 
it exists today serve a great many people very well?  Yes.  Does 
everyone need every single new feature available out there?  No.  You 
know, I've had my complaints as well, but ultimately, if the offering is 
doing the job for so many, how does how far behind the state of the art 
it is really matter?


> There is no

prospect of this changing. In fact, it will only become increasingly
technically obsolete over time.


Well, yes, as virtually every technology does over time.  Even if Struts 
had done everything right, added every technical advantage, kept pace 
with everyone else to the best of everyones' efforts, would there still 
have been other ideas out there that people wanted to try?  Would there 
still have been alternatives developed that, at least in some ways, may 
have been better?  Of course!  This is how innovation happens.



All new development that is taking place under the so-called "Struts
umbrella" is either going to be on Struts Action 2 or Struts Shale.
Struts Action 2 is a completely different product, which is really the
rebranding of a competing framework, called Webwork. 


True, but as always been the case in the past, compatibility is being 
taken very seriously.  You are clearly trying to insinuate that using 
Struts 1.x now will in some way hamper you in the future, and that's not 
the plan.  I'm not involved in Struts development directly, but I do 
know how seriously these guys (and gal!) take backwards compatibility, 
so an investment in Struts 1.x now is not a dead end because migrating a 
1.x app to Action2 will be feasible.  That's the plan.



I think all of the above is objective information that is not in
dispute. Also, the implications are clear, which is that, starting new
projects with Struts 1.x is a very questionable decision at this stage
of history. 


I absolutely disagree.  Starting a project with Struts 1.x now is a 
decision that has to be weighed against the other options.  Struts 1.x 
is very stable, quite mature, and frankly more than sufficient for a 
great many projects being undertaken today.  There is a large base of 
expertise from which to hire.  There is plenty of free help on the web.


I would agree you need to try and think ahead and see if the project 
might require any of the things that Struts lacks, or is likely to be 
lacking later.  But to flat out say starting a new project with 1.x is a 
very questionable decision seems a thoroughly baseless conclusion.  It 
is based on the preposition that Struts development has stagnated.  If 
you had said it hadn't moved as fast or as much as some would have 
liked, I believe I would have agreed.  But stagnated?  No, I don't 
believe that is a fair conclusion.



Well, in closing, my advice would be to spend a bit more time to get
familiar with what is cooking in this java web application space before
settling on your tool set. Have a look at Webwork, and Spring MVC and
maybe other new frameworks such as Stripes. (The case of Webwork is kind
of special, since Struts Action 2, the next generation Struts action
framework, actually *is* Webwork!) In any case, I put it to you that the
extra time invested in researching your toolset will be made up many
times over down the road.


I would agree wi

Is there a struts Taglib document?

2006-04-04 Thread red phoenix
Is there a struts taglib document about ,,,the
chm file form is better. If you have it,please give it to me.

Thanks!


Re: Is there a struts Taglib document?

2006-04-04 Thread Frank W. Zammetti

http://struts.apache.org/struts-taglib/index.html

red phoenix wrote:

Is there a struts taglib document about ,,,the
chm file form is better. If you have it,please give it to me.

Thanks!



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
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: Some questions

2006-04-04 Thread Kimani Darisha
u should ignore this guy, he has never wrote a single web application.

On 4/4/06, Jonathan Revusky <[EMAIL PROTECTED]> wrote:
> Mário Lopes wrote:
> > Hi.
> >
> > First off, a little bit of my background. I've been developing with
> > Java for a long time now. None of it was web based development. On
> > this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
> > etc..
> >
> > Now that I'm encharged of developing a Java/JSP/Servlets application I
> > had to decide about a framework to ease my life. It had to have a
> > strong MVC pattern to enforce organization. So I picked Struts :-)
>
> Mário,
>
> It is normal that someone in your position would pick Struts, since, at
> first blush, it appears to be a kind of "standard". Also, it does have
> the clear advantage that there are third-party tools based on Struts and
> various books and so on. However, even taking these factors into
> account, I think you should really think twice about starting new
> development on top of Struts 1.x.
>
> For starters, development on Struts 1.x, a.k.a. Struts Classic, has been
> more or less stagnant since about 2002. In the meantime, other web
> application frameworks have been actively developed and are much more
> advanced in what they offer. At this point, Struts 1.x is significantly
> behind the state of the art in its application space. There is no
> prospect of this changing. In fact, it will only become increasingly
> technically obsolete over time.
>
> All new development that is taking place under the so-called "Struts
> umbrella" is either going to be on Struts Action 2 or Struts Shale.
> Struts Action 2 is a completely different product, which is really the
> rebranding of a competing framework, called Webwork. Shale, OTOH, is
> based on a completely different component-based paradigm, since it is
> built on the Java Server Faces spec from Sun. The only thing it has in
> common with Struts Classic (besides the name) is that the original
> author is the same, Craig McClanahan.
>
> I think all of the above is objective information that is not in
> dispute. Also, the implications are clear, which is that, starting new
> projects with Struts 1.x is a very questionable decision at this stage
> of history. It might well make sense for people who already have a
> significant intellectual investment in the tool and, for whom, it is a
> very comfortable thing they know. However, that does not seem to be your
> case.
>
> Well, in closing, my advice would be to spend a bit more time to get
> familiar with what is cooking in this java web application space before
> settling on your tool set. Have a look at Webwork, and Spring MVC and
> maybe other new frameworks such as Stripes. (The case of Webwork is kind
> of special, since Struts Action 2, the next generation Struts action
> framework, actually *is* Webwork!) In any case, I put it to you that the
> extra time invested in researching your toolset will be made up many
> times over down the road.
>
> Best Regards,
>
> Jonathan Revusky
> --
> lead developer, FreeMarker project, http://freemarker.org/
>
> >
> > Now that I've given it a test drive, some questions arose:
> >
> > 1) I tried using Eclipse, as I've always did, for developing. What IDE
> > do you suggest?
> > 2) I noticed that each time I did a simple change I had to build with
> > ant to package a .war and then restart Tomcat to recognize it. Tomcat
> > takes 20 secs to load which is absolutely unbearable. Is there a more
> > agile way of doing things?
> > 3) Is MyEclipse worth it?
> >
> > I think this is it.. for now :-) I'll be forever in debt for your kind 
> > replies.
> >
> > Regards,
> >
> > Mário Lopes
>
>
>
>
>
> -
> 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: Some questions

2006-04-04 Thread Frank W. Zammetti

Sorry, I didn't see these questions initially...


1) I tried using Eclipse, as I've always did, for developing. What IDE
do you suggest?


It's a matter of opinion.  Certainly Eclipse is very popular.  IDEA is 
also pretty popular around these parts.  NetBeans has a bit of a 
following.  The only one my experience makes me recommend never touching 
is IBM's RAD.  I actually think these were the specs for RAD:


* Take Eclipse
* Bloat the hell out of it
* Add features that do little for the developer
* Make sure it puts all sorts of proprietary things in the project 
directories so that switching IDEs will be a painful task

* Sprinkle in a liberal helping of random bugs throughout

And you have RAD!

I think most good IDEs these days have Struts-specific hooks, so I'd say 
find one you like and go with it.  Sounds like you already know and like 
Eclipse, so might as well stick with it.


FYI, I personally don't use an IDE at all 98% of the time.  I'm a big 
fan of UltraEdit, Ant and a command prompt :)  Directory Opus is the 
other indispensable tool in my arsenal.  I do keep IDEA installed 
because sometimes something comes up that an IDE truly is helpful for, 
but a majority of the time it slows me down more than it helps, that has 
been my experience.


jEdit is a fantastic free alternative to UltraEdit by the way, and in 
fact has more IDE-like features via plug-ins that UltraEdit does.  If 
you want something between full-blown IDE and text editor, jEdit is a 
great option.



2) I noticed that each time I did a simple change I had to build with
ant to package a .war and then restart Tomcat to recognize it. Tomcat
takes 20 secs to load which is absolutely unbearable. Is there a more
agile way of doing things?


The way I develop is that I have the webapp in exploded format right in 
Tomcat's webapp directory.  I don't create and deploy WARs unless its to 
our remote WebSphere servers (and in that case it's actually an EAR).  I 
edit the app directly in Tomcat's directory structure.  My build scripts 
have tasks to start and stop Tomcat.  And I have the build mapped to a 
hotkey in UltraEdit.  So, for me,  I hit a single key and the app 
rebuilds, Tomcat is started, and I even pop open a browser window 
pointed at the starting page (and I have another hotkey to attach JSwat 
to Tomcat for when I need a debugger).


However, this still incurs the startup time as you mentioned, and also 
it isn't an incremental build (one of the things I miss out on by not 
using an IDE).  But it *is* still better IMO.  Of course, this is only 
for classes, JSPs and such recognized immediately as you would expect.


Tomcat does offer some configuration options to auto-reload a context. 
Some exploration of the user's manual should point you in the right 
direction.  I've personally never had a big problem with waiting 20 
seconds or so per build, but those options might help if it does bother you.



3) Is MyEclipse worth it?


I can't speak from experience, although I have checked it out and 
thought it looked useful (just because I don't now use an IDE doesn't 
mean I'm not constantly checking out what is available).  But I have 
heard good things about it from a number of people.



I think this is it.. for now :-) I'll be forever in debt for your kind replies.


Fire away if anything else comes up... I think you'll find the Struts 
community has a great many good people who are eager to help :)


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
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]



Struts and AJAX

2006-04-04 Thread thamizh arasu
Hi,

I have developed application with struts. now i want to use ajax in my struts 
application. using ajax we can avoid refreshing the whole page. instead of that 
it enough to refresh the part of the page.

I like this functionality. if any one know the way to start struts with ajax 
please let me know.

i need some basic steps document for "struts with Ajax"

By
Thamizh


-
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

RE: Struts and AJAX

2006-04-04 Thread Rakesh.Bhat

This http://www.omnytex.com/articles/xhrstruts/ might help u.


 
Kind regards,
 
Rakesh Bhat 
PrimeSourcing(tm) 
The Global IT Services  business from i-flex - "Add Value Reduce Risk"
www.iflexsolutions.com/services/services.asp
i-flex solutions limited - Bangalore
Phone : +91(080) 5759-6873
Email :  Rakesh.Bhat@ iflexsolutions.com
 
-Original Message-
From: thamizh arasu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 05, 2006 10:27 AM
To: user@struts.apache.org
Subject: Struts and AJAX

Hi,

I have developed application with struts. now i want to use ajax in my
struts application. using ajax we can avoid refreshing the whole page.
instead of that it enough to refresh the part of the page.

I like this functionality. if any one know the way to start struts with
ajax please let me know.

i need some basic steps document for "struts with Ajax"

By
Thamizh


-
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low
rates.



DISCLAIMER:
This message contains privileged and confidential information and is intended 
only for the individual named.If you are not the intended recipient you should 
not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be 
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain 
viruses.The sender therefore does not accept liability for any errors or 
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

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



Re: Struts and AJAX

2006-04-04 Thread Frank W. Zammetti

Struts Wiki page:

http://wiki.apache.org/struts/AjaxStruts

See especially the article referenced on this page for a decent 
introduction as well as example Struts app.  Probably the best starting 
point.


After that, have a look at AjaxTags here:

http://javawebparts.sourceforge.net

(Click javadocs and navigate to the AjaxTags package)

And also:

http://getahead.ltd.uk/dwr/

And also:

http://dojotoolkit.org/

There are TONS more libraries out there, so feel free to explore, but 
these three are the ones I would personally suggest.  If you are not too 
comfortable with Javascript, I would suggest AjaxTags might be your best 
bet.  If you want something that makes it all look like remote procedure 
calls, DWR is the way to go, and if you want a general-purpose library, 
and especially if widgets are something you are interested in, Dojo is 
worth a close look.


If you want a real-world example of a Struts apps with AJAX (just plain 
AJAX, no library at all), there is one here:


http://struts.sourceforge.net/ajaxchat/index.html

HTH,
Frank

thamizh arasu wrote:

Hi,

I have developed application with struts. now i want to use ajax in my struts 
application. using ajax we can avoid refreshing the whole page. instead of that 
it enough to refresh the part of the page.

I like this functionality. if any one know the way to start struts with ajax 
please let me know.

i need some basic steps document for "struts with Ajax"

By
Thamizh


-
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
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]



Displaying messages from multiple resource bundles

2006-04-04 Thread Anuradha S.Athreya
I am displaying messages in JSP using resource bundle. 

I have 2 separate bundles. Depending on the message I would like it to be
picked up from the particular bundle to which that message belongs to. How
do I specify the multiple bundles?

this doesnt seem to work:
 


 







I have defined both these bundles in struts-config.xml






Regards,
Anuradha S.Athreya 




RE: Displaying messages from multiple resource bundles

2006-04-04 Thread Rakesh.Bhat

Hi

Using the struts-config.xml file to configure your message resources is
preferred as it gives you quite a bit of additional flexibility: 
You can list multiple message-resources tags to load messages from
multiple files. If you do this, use the key attribute to give a unique
name to each bundle. e.g.: 



You would then have to give the key name when using the bean:message
tag: 


 
Kind regards,
 
Rakesh Bhat 
PrimeSourcing(tm) 
The Global IT Services  business from i-flex - "Add Value Reduce Risk"
www.iflexsolutions.com/services/services.asp
i-flex solutions limited - Bangalore
Phone : +91(080) 5759-6873
Email :  Rakesh.Bhat@ iflexsolutions.com
 

-Original Message-
From: Anuradha S.Athreya [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 05, 2006 11:10 AM
To: 'Struts Users Mailing List'
Subject: Displaying messages from multiple resource bundles 
Importance: Low

I am displaying messages in JSP using resource bundle. 

I have 2 separate bundles. Depending on the message I would like it to
be
picked up from the particular bundle to which that message belongs to.
How
do I specify the multiple bundles?

this doesnt seem to work:
 


 







I have defined both these bundles in struts-config.xml






Regards,
Anuradha S.Athreya 





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



RE: Displaying messages from multiple resource bundles

2006-04-04 Thread Anuradha S.Athreya
 As I mentioned earlier, I do have entries for difference bundles in the
struts-config.xml, 

I have a common Message.jsp which displays a message(s) created during
request processing. This message should be picked up from the bundle it
belongs to. 

I don't want to specify the key value here since I want to message to be
picked based on the request processed.


Regards
Anuradha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, April 05, 2006 11:12 AM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: Displaying messages from multiple resource bundles 


Hi

Using the struts-config.xml file to configure your message resources is
preferred as it gives you quite a bit of additional flexibility: 
You can list multiple message-resources tags to load messages from multiple
files. If you do this, use the key attribute to give a unique name to each
bundle. e.g.: 



You would then have to give the key name when using the bean:message
tag: 


 
Kind regards,
 
Rakesh Bhat
PrimeSourcing(tm)
The Global IT Services  business from i-flex - "Add Value Reduce Risk"
www.iflexsolutions.com/services/services.asp
i-flex solutions limited - Bangalore
Phone : +91(080) 5759-6873
Email :  Rakesh.Bhat@ iflexsolutions.com
 

-Original Message-
From: Anuradha S.Athreya [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 05, 2006 11:10 AM
To: 'Struts Users Mailing List'
Subject: Displaying messages from multiple resource bundles
Importance: Low

I am displaying messages in JSP using resource bundle. 

I have 2 separate bundles. Depending on the message I would like it to be
picked up from the particular bundle to which that message belongs to.
How
do I specify the multiple bundles?

this doesnt seem to work:
 


 







I have defined both these bundles in struts-config.xml






Regards,
Anuradha S.Athreya 





-
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: I get exception : Path http://www.mywebsite.com/ does not start with a "/" character

2006-04-04 Thread Antonio Petrelli

Legolas Woodland ha scritto:

The server return an exception like :


java.lang.IllegalArgumentException: Path http://www.mysite.com/ does not
start with a "/" character
...
 forward="forwarder";
 return mapping.findForward( forward );
   }
}


Please post your action mapping, in particular the mapping for 
"forwarder" forward.

Ciao
Antonio

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