Radio Button

2006-08-24 Thread sheetal

Hi,

To prepopulate, list box , I had attached  LabelValueBean, with the 
select's collection ,attribute



  property="value" labelProperty="label" /> 
  



But Does anybody knows how to associate labelvaluebean with radio button }
(As per my knowledge we do not have a collection attrib. for radio).

Regards,
Sheetal



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



Re: [OT] request.getServletPath() val not same in Filter & Servlet

2006-08-24 Thread Scott Van Wart

pantichd wrote:

Hello,

Sorry for posting this in Struts mailing list but I can't seem to get an
answer on any other discussion groups. I've always had great results getting
good answers here so here goes...

I have a Filter in my app that uses the request.getServletPath() method to
get the name of the page being invoked without the context path.

This worked fine until I try to invoke a servlet. For example, if I invoke a
url like http://localhost/app1/servlet/package.ServletName the result of
calling request.getServletPath() is '/servlet'.

However, if I make the same call when I'm in the servlet the result is
'/servlet/package.ServletName'

Why does it give a different result in the filter and the servlet?

Thanks!

  

AHH! http://tomcat.apache.org/faq/misc.html#invoker

Use a different prefix or path for your servlets than "servlet", no 
matter how tempting it is.


- Scott

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



[1.3] Session ActionMessages won't go away

2006-08-24 Thread Scott Van Wart
Hi, I have something very close to the following in each of my pages 
(actually, just in the layout page for tiles, but whatever).  Worked 
fine in Struts 1.2.9 (even though I'm not so sure it's the best way to 
print messages and errors, but oh well...)


   
   
   
   
   
   
   
   
   
   

   
   
   
   
   
   
   

I store my messages in the session so they'll persist even after a 
redirect.  Unfortunately, in 1.3, when I call saveMessages( 
request.getSession(), messages ), the message appears properly, but 
continues to appear on subsequent page requests.  Any ideas?


- Scott


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



Re: Problem with JSTL and Struts tag But Not with

2006-08-24 Thread Mississippi John Hurt

Yes, thanks, I tried , with  but still couldn't get
it to work. Anyway I just used the Map feature of  and its
working fine.  Thanks all.

On 8/24/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:


On 8/24/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote:
> Hi thanks for the help.  I tried using the pageContext, but it seems for
> some reason, the render engine is not interpreting the scriptlet ie (
<%=
> ..%>)  Its taking it literally (ie link has <%= chars in it after
rendered
> in html), weird. BTW, the above code is enclosed by a 
and
> column tags.  Anyone know why?  I'll try the map if I can't get this to
work
> soon.

Since you're using  I'm going to assume that you're writing to
version 2.3 of the Servlet Spec.

If that's true, then in general you should be using Struts EL so that
you have the ability to use expressions in the attributes of the
Struts tags, just as you can with the JSTL tags.

* http://struts.apache.org/1.x/struts-el/index.html
* http://wiki.apache.org/struts/StrutsAndJSTL

--
Wendy

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




RE: [OT] request.getServletPath() val not same in Filter & Servlet

2006-08-24 Thread David Friedman
First, is '/servlet' the name of your webapp?  If so then this might just
make sense.  Why?

The HttpServletRequest.getServletPath() object is described to:
> Returns the part of this request's URL that calls the servlet.

In a filter, that is the mapping '/*' which as you wrote resulted
in '/servlet'.  Well, assuming '/servlet' is the name of your webapp
and not your servlet.

In a servlet, how did you do your web.xml mapping for the servlet
which resulted in this result '/servlet/package.ServletName' ?

Regards,
David


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



Re: Question: Successive use of a taglib by the container (i.e.: tagpool), what function reset the tag between usage????

2006-08-24 Thread David Gagnon

Thanks for the great answer!
Best Regards
/David

Niall Pemberton wrote:

My understanding is that servlet containers are free to use whatever
pooling strategy they like and AFAIK Tomcat pools tags with the same
attribute values which is why it doesn't call release() or the setters
for the attributes. Its up to the container to decide the pooling
strategy and when to call release() and the tags attribute setters.
AFAIK the only thing you can be sure of is that the lifecycle methods
are always called (i.e. doStartTag(), doEndTag() etc).

Where Struts tags have had issues in the past with pooling is when
some sort of state was determined and cached in an instance variable
and reset in the release() method. These type of issues were resolved
by always resetting the cached value in the doStartTag() method
(rather than in the release() method).

  http://svn.apache.org/viewvc?view=rev&revision=165158

At the end of the day when release() and the property/attribute
setters are called is down to the servlet container and its the
containers job to ensure that the tag has the right attribute values
when the lifecycle methods are called.

Niall

On 8/24/06, David Gagnon <[EMAIL PROTECTED]> wrote:

Hi all,

  I'm upgrading my old struts right now and several years ago I ran into
the problem that since Tomcat has a TagPool and reuse tags, the state of
the tag wasn't reseted beetween usage.  I looked into the new version of
struts and I cannot find how the tag is resetted between usage.

I looked into tomcat in the TagHandlerPool.reuse() and the release()
function is not called at the end of each utilization but only when the
tag is not used anymore (to be garbage collected).  So how Struts reset
is tag between utilisation to avoid using the properties setted in the
previous utilisation.

Thanks for your help on this!
Best Regards
/David

/**
 * Adds the given tag handler to this tag handler pool, unless 
this tag
 * handler pool has already reached its capacity, in which case 
the tag

 * handler's release() method is called.
 *
 * @param handler Tag handler to add to this tag handler pool
 */
public void reuse(Tag handler) {
synchronized( this ) {
if (current < (handlers.length - 1)) {
handlers[++current] = handler;
return;
}
}
// There is no need for other threads to wait for us to release
handler.release();
}




-
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: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread Scott Van Wart

Caroline Jen wrote:

Context ctx = new InitialContect();
DataSource ds =
(DataSource)ctx.lookup("java:com/env/jdbc/DBName");
Connection con = ds.getConnection();
  
Right, but that's assuming it's already bound, which is the hard part, 
and unless he's running it under OC4J, no such luck...


- Scott

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



Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread Scott Van Wart

temp temp wrote:
My java standalone application wants connection to database with lookup  to datasource name which is configured in the oc4j app server. 
  Please guide me with some ideas to achieve this.
  
You need to bind it yourself, to some provider.  I use the DBCP provided 
with Tomcat (naming-factory-dbcp.jar); the context factory is 
"org.apache.naming.java.javaURLContextFactory" (that's not a typo, the 
class name begins with a lowercase letter). Then you create your 
InitialContext, create sub contexts for each component and bind your 
object to the last context.  DBCP is an in-memory one that seems to beat 
the beta fscontext reference that Sun released.


Oracle has a class 'com.oracle.naming.J2EEContext'.  I suspect that's 
what OC4J uses.  It also seems to have 
com.evermind.server.rmi.RMIInitialContextFactory.  See if you can find 
javadocs for those.  If you're grabbing a DataSource remotely from a 
running OC4J instance, I did a quick google search and found 
http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/cachsyn007.htm 
.. it's for TopLink, but it uses JNDI and follows the same conventions 
that your standalone OC4J (or app server) is going to use--JMS or RMI 
(corba).


HTH,
 Scott


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



[ANNOUNCE] JSControlsTags taglib for manage javascript controls

2006-08-24 Thread Angelo zerr

Hello,

I mail you to announce that JSControlsTags project is created on
sourceforge.
JSControlsTags is a taglib to easily manage javascript controls on client
side (without AJAX)
in your JSP.
It is based on Prototype.js and Scriptaculous.js.
It looks like AjaxTags, but it manages only controls on client side.

Today controls available are Autocomplete TextBox.
You can see demo at
http://jscontrolstags.sourceforge.net/demo/autocomplete/autocomplete-test1.html

I'm planning to develop taglib to manage slider.

You can find JSControlsTags Web Site at
http://jscontrolstags.sourceforge.net/
and download JAR at http://sourceforge.net/projects/jscontrolstags.

I hope that you will be interested by JSControlsTags project.

See you later.
Angelo ZERR


Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread Caroline Jen
Context ctx = new InitialContect();
DataSource ds =
(DataSource)ctx.lookup("java:com/env/jdbc/DBName");
Connection con = ds.getConnection();

--- Scott Van Wart <[EMAIL PROTECTED]> wrote:

> temp temp wrote:
> > My java standalone application wants connection to
> database with lookup  to datasource name which is
> configured in the oc4j app server. 
> >   Please guide me with some ideas to achieve this.
> >   
> You need to bind it yourself, to some provider.  I
> use the DBCP provided 
> with Tomcat (naming-factory-dbcp.jar); the context
> factory is 
> "org.apache.naming.java.javaURLContextFactory"
> (that's not a typo, the 
> class name begins with a lowercase letter). Then you
> create your 
> InitialContext, create sub contexts for each
> component and bind your 
> object to the last context.  DBCP is an in-memory
> one that seems to beat 
> the beta fscontext reference that Sun released.
> 
> Oracle has a class 'com.oracle.naming.J2EEContext'. 
> I suspect that's 
> what OC4J uses.  It also seems to have 
> com.evermind.server.rmi.RMIInitialContextFactory. 
> See if you can find 
> javadocs for those.  If you're grabbing a DataSource
> remotely from a 
> running OC4J instance, I did a quick google search
> and found 
>
http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/cachsyn007.htm
> 
> .. it's for TopLink, but it uses JNDI and follows
> the same conventions 
> that your standalone OC4J (or app server) is going
> to use--JMS or RMI 
> (corba).
> 
> HTH,
>   Scott
> 
> 
>
-
> 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: Question: Successive use of a taglib by the container (i.e.: tagpool), what function reset the tag between usage????

2006-08-24 Thread Niall Pemberton

My understanding is that servlet containers are free to use whatever
pooling strategy they like and AFAIK Tomcat pools tags with the same
attribute values which is why it doesn't call release() or the setters
for the attributes. Its up to the container to decide the pooling
strategy and when to call release() and the tags attribute setters.
AFAIK the only thing you can be sure of is that the lifecycle methods
are always called (i.e. doStartTag(), doEndTag() etc).

Where Struts tags have had issues in the past with pooling is when
some sort of state was determined and cached in an instance variable
and reset in the release() method. These type of issues were resolved
by always resetting the cached value in the doStartTag() method
(rather than in the release() method).

  http://svn.apache.org/viewvc?view=rev&revision=165158

At the end of the day when release() and the property/attribute
setters are called is down to the servlet container and its the
containers job to ensure that the tag has the right attribute values
when the lifecycle methods are called.

Niall

On 8/24/06, David Gagnon <[EMAIL PROTECTED]> wrote:

Hi all,

  I'm upgrading my old struts right now and several years ago I ran into
the problem that since Tomcat has a TagPool and reuse tags, the state of
the tag wasn't reseted beetween usage.  I looked into the new version of
struts and I cannot find how the tag is resetted between usage.

I looked into tomcat in the TagHandlerPool.reuse() and the release()
function is not called at the end of each utilization but only when the
tag is not used anymore (to be garbage collected).  So how Struts reset
is tag between utilisation to avoid using the properties setted in the
previous utilisation.

Thanks for your help on this!
Best Regards
/David

/**
 * Adds the given tag handler to this tag handler pool, unless this tag
 * handler pool has already reached its capacity, in which case the tag
 * handler's release() method is called.
 *
 * @param handler Tag handler to add to this tag handler pool
 */
public void reuse(Tag handler) {
synchronized( this ) {
if (current < (handlers.length - 1)) {
handlers[++current] = handler;
return;
}
}
// There is no need for other threads to wait for us to release
handler.release();
}




-
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: Problem with JSTL and Struts tag But Not with

2006-08-24 Thread Wendy Smoak

On 8/24/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote:

Hi thanks for the help.  I tried using the pageContext, but it seems for
some reason, the render engine is not interpreting the scriptlet ie ( <%=
..%>)  Its taking it literally (ie link has <%= chars in it after rendered
in html), weird. BTW, the above code is enclosed by a  and
column tags.  Anyone know why?  I'll try the map if I can't get this to work
soon.


Since you're using  I'm going to assume that you're writing to
version 2.3 of the Servlet Spec.

If that's true, then in general you should be using Struts EL so that
you have the ability to use expressions in the attributes of the
Struts tags, just as you can with the JSTL tags.

* http://struts.apache.org/1.x/struts-el/index.html
* http://wiki.apache.org/struts/StrutsAndJSTL

--
Wendy

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



[HELP] html-el causing jrunx.compiler.DefaultCFE: Compiler errors

2006-08-24 Thread Garner Shawn


*** Error: No match was found for method "setIndexed(java.lang.String)".


  459. _tag18.setIndexed(__constantTable.getString(9));
   <->
*** Error: No match was found for method "setIndexed(java.lang.String)".


  535. _tag21.setIndexed(__constantTable.getString(9));
   <->
*** Error: No match was found for method "setIndexed(java.lang.String)".

   at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:138)
   at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:97)
   at jrun.jsp.Translator.compilePage(Translator.java:176)
   at jrun.jsp.Translator.translate(Translator.java:254)
   at jrun.jsp.Translator.translate(Translator.java:101)
   at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:693)
   at jrun.jsp.JSPServlet.translate(JSPServlet.java:116)
   at jrun.jsp.JSPServlet.service(JSPServlet.java:104)
   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
   at 
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:408)
   at 
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:378)
   at 
jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:157)
   at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
   at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
   at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
   at 
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:408)
   at 
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:378)
   at 
jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:157)
   at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
   at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
   at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
   at 
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:226)
   at 
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
   at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
   at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Any help?

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



Question: Successive use of a taglib by the container (i.e.: tagpool), what function reset the tag between usage????

2006-08-24 Thread David Gagnon

Hi all,

 I'm upgrading my old struts right now and several years ago I ran into 
the problem that since Tomcat has a TagPool and reuse tags, the state of 
the tag wasn't reseted beetween usage.  I looked into the new version of 
struts and I cannot find how the tag is resetted between usage. 

I looked into tomcat in the TagHandlerPool.reuse() and the release() 
function is not called at the end of each utilization but only when the 
tag is not used anymore (to be garbage collected).  So how Struts reset 
is tag between utilisation to avoid using the properties setted in the 
previous utilisation.


Thanks for your help on this!
Best Regards
/David

/**
* Adds the given tag handler to this tag handler pool, unless this tag
* handler pool has already reached its capacity, in which case the tag
* handler's release() method is called.
*
* @param handler Tag handler to add to this tag handler pool
*/
   public void reuse(Tag handler) {
   synchronized( this ) {
   if (current < (handlers.length - 1)) {
   handlers[++current] = handler;
   return;
   }
   }
   // There is no need for other threads to wait for us to release
   handler.release();
   }




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



Forward to the same page

2006-08-24 Thread Thomas Hamacher
Hello everyone,

I´m returning to a problem I already had, but after googling for a while I 
could not find a good solution to that. So I´d like to ask you again, hoping 
that someone has a solution and I simply overlooked something.

How do I forward to the same page I was coming from? The typical example for 
this is the "change-language-problem". Someone is on one page and simply 
wants to change the language and expects to see the same page in a different 
language.
Another case could be, that I put a login-form on every page and no matter 
when the login is performed, the user will be returned to the same page he 
has been before.
Unfortunately I could not get this thing to work. As I´m using tiles most of 
the common forwards do not really work, as I can´t simply redirect to a 
JSP-Page on my server. I found another solution where people stored their 
last ActionForward into the session and recall this ActionForward. But this 
is only working if a user has only one browser-tab or one browser-window. If 
he works with more than one, he won´t get the page he expects, but the page 
where he has been with the other browser-window. So this could not be "the" 
solution as well.
Using the mapping.getInput() doesn´t work either as 1. I hava a dynamic input 
value and 2. it might be that a ForwardAction has been used, so the 
getInput() is null.

I can´t believe that this is such an uncommon problem. Could someone please 
help me out and point me to a place where to find a solution?

Thank you very much

Thomas

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



[JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread temp temp
My java standalone application wants connection to database with lookup  to 
datasource name which is configured in the oc4j app server. 
  Please guide me with some ideas to achieve this.
  
  


-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

Re: When ActionDispatcher to be used ?

2006-08-24 Thread Michael Jouravlev

On 8/23/06, Raghuveer <[EMAIL PROTECTED]> wrote:


When does ActionDispatcher action to be used?
org.apache.struts.actions.ActionDispatcher


http://struts.apache.org/1.x/struts-extras/apidocs/org/apache/struts/actions/ActionDispatcher.html

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



Re: Problem with JSTL and Struts tag But Not with

2006-08-24 Thread Mississippi John Hurt

Hi thanks for the help.  I tried using the pageContext, but it seems for
some reason, the render engine is not interpreting the scriptlet ie ( <%=
..%>)  Its taking it literally (ie link has <%= chars in it after rendered
in html), weird. BTW, the above code is enclosed by a  and
column tags.  Anyone know why?  I'll try the map if I can't get this to work
soon.


 
 ">text
 
...


On 8/24/06, Vishal Seth <[EMAIL PROTECTED]> wrote:


Yeah or other way..but with usage of scriplet is ..
<%=pageContext.getAttribute(key name)%>


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 3:41 PM
To: Struts Users Mailing List
Subject: Re: Problem with JSTL and Struts  tag But Not with


You are correct.  Nesting tags do *not* work.

Try this...






   
   text
   




--
James Mitchell
678.910.8017




On Aug 24, 2006, at 1:19 AM, Vishal Seth wrote:

> Nested tags...i guess does not work..
>
> -Original Message-
> From: Mississippi John Hurt [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 24, 2006 10:48 AM
> To: Struts Users Mailing List
> Subject: Problem with JSTL and Struts  tag But Not with 
>
> Why is it that when I do the below with struts  tag I
> get an
> error "Unterminated 
> 
>   
>}"/>">text
>   
> ...
>
> but when I use a regular HTML tag, its able to handle the JSTL 
> fine?
>
> 
>   
>   ">text
>   
> ...
>
> Any ideas? I very much want to use the Struts tag and JSTL so I dont
> have to
> hardcode the appname in the href.
>
>
>
> MASTEK
> "Making a valuable difference"
> Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
> In the US, we're called MAJESCOMASTEK
>
> ~~

> 
> Opinions expressed in this e-mail are those of the individual and
> not that of Mastek Limited, unless specifically indicated to that
> effect. Mastek Limited does not accept any responsibility or
> liability for it. This e-mail and attachments (if any) transmitted
> with it are confidential and/or privileged and solely for the use
> of the intended person or entity to which it is addressed. Any
> review, re-transmission, dissemination or other use of or taking of
> any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited. This e-mail and
> its attachments have been scanned for the presence of computer
> viruses. It is the responsibility of the recipient to run the virus
> check on e-mails and attachments before opening them. If you have
> received this e-mail in error, kindly delete this e-mail from all
> computers.
> ~~

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





MASTEK
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK


~~
Opinions expressed in this e-mail are those of the individual and not that
of Mastek Limited, unless specifically indicated to that effect. Mastek
Limited does not accept any responsibility or liability for it. This e-mail
and attachments (if any) transmitted with it are confidential and/or
privileged and solely for the use of the intended person or entity to which
it is addressed. Any review, re-transmission, dissemination or other use of
or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. This e-mail and
its attachments have been scanned for the presence of computer viruses. It
is the responsibility of the recipient to run the virus check on e-mails and
attachments before opening them. If you have received this e-mail in error,
kindly delete this e-mail from all computers.

~~


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




RE: [OT] request.getServletPath() val not same in Filter & Servlet

2006-08-24 Thread pantichd

David,

Maybe I'm missing something in your reply but I don't think I'm doing either
a forward or a dispatch. Here's the scenario...
- Simple app has (let's say) 10 pages
- A couple of pages are jsps using Struts forms. These are considered
'secure' pages and require a person to be logged in
- Some pages are straight html. These are 'unsecure' pages
- One page is a servlet. This is an 'unsecure' page
- App uses a Filter with a url-pattern of '/*'
- Filter interrogates the requested url to determine if requested page is a
'secure' page. 
- If request is for a secure page, and user is not logged in, the request is
redirected to a login page
- If request is not for a secure page then the doFilter method just does the
following:
 chain.doFilter(request, response);
 return;

My problem is that if the user requests the below address, the following
lines of code in the doFilter method get one result and the same lines of
code in the servlet give a different result.

requested address:
http://localhost/app1/servlet/package.ServletName 

doFilter code snippet:
HttpServletRequest hreq = (HttpServletRequest)request;
HttpServletResponse hres = (HttpServletResponse)response;
// This results in '/servlet'
String requestedUrl = hreq.getServletPath();
  
servlet code snippet:
// This results in '/servlet/package.ServletName'
String requestedUrl = hreq.getServletPath();



David Friedman-2 wrote:
> 
> Are you doing a "forward" or a "dispatch".   One of them handles mappings
> differently because you are inside the application already and won't use
> the
> filters a second time.   That is why the latest version of the servlet
> spec
> allows you to specify which one in your web.xml mappings.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5964193
Sent from the Struts - User forum at Nabble.com.


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



RE: Re: select tag and value issue

2006-08-24 Thread Jonathan Drnek
It figures I was making it too complicated.

Thanks for your help

Jon

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, August 23, 2006 4:14 PM
To: user@struts.apache.org
Subject: Re: select tag and value issue

If you hardcode value="42", the option with value '42' will always be 
selected. If you hardcode value="license", as you have below, the option

with value 'license' will always be selected -- and you don't have an 
option with that value, so nothing is selected.

You need to *remove* the value=... attribute from the html:select tag. 
Struts will then use the value of the property, as you want; specifying 
the value attribute overrides it.

L.

Jonathan Drnek wrote:
> I think I am.  I changed the JSP to also display the license id as a
> text field.  The JSP is 
> 
> 
>   
>   Name
>   Location
>   Approved value="true"/>
>   License ID: 
>   License 
>   
>value="-1"> 
>property="id" labelProperty="name" />
>   
>   Notes   
>   
> 
> 
> The HTML that is outputted is 
> 
>  action="/SoftwareTracker2/updateSoftware.do">
>   
>   Name
>   Location
>   Approved
> 
>   License ID: 
>   License 
> 
>    
>   Apache Software License
>   asd
> 
>   Notes 
> 
> 
> 
> As you can see, the license id has a value of 42.  There is an option
> with a value of 42 that is not selected.  If I hard code the 42 so I
> have JSP that looks like
> 
> 
>  
>  labelProperty="name" />
> 
> 
> I get what I expect
> 
> 
>    
>   Apache Software License
>   asd
> 
> 
> Jon
> 
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> Sent: Tuesday, August 22, 2006 4:53 PM
> To: user@struts.apache.org
> Subject: Re: select tag and value issue
> 
> Your JSP code looks OK (except obviously you want to remove the 
> value="22" from the html:select tag). Are you sure the value you're 
> setting in form.license is correct?
> 
> L.
> 
> Jonathan Drnek wrote:
>> I'm fairly new to struts and am having a problem with the
> 
>> tag. I can't get the value property to work correctly.  I have a list
> of
>> licenses that I want displayed in the drop down box.  I want the
> license
>> that is used by the current software to be selected. 
>>
>> If I hard code the value property to be 22 for example, the license
> that
>> has 22 for its key is selected.  It seems like I should be able to
use
>> the license property in my SoftwareForm bean for the value but that
> does
>> not work.  When I do that, nothing ends up being selected.
>>
>>  My JSP page looks like 
>>
>> 
>>   
>>   Name 
>>   Location 
>>   Approved 
>>   License 
>> 
>>  
>> > labelProperty="name" />
>> 
>>   Notes 
>> 
>> 
>>
>> My action mapping looks like.
>>
>>  > scope="request"
>> type="org.springframework.web.struts.DelegatingActionProxy"
>> input="/EditSoftware.jsp">
>>  > path="/loadAllSoftware.do">
>>  
>>  > path="/EditSoftware.jsp">
>>  
>>  
>>
>> As you can see I am using spring.  
>>
>> My SoftwareForm bean contains the String properties you would expect.
> 
>> In the action that forwards to the above form I have the following
> code
>> Software s = softwareDAO.get(Long.decode(id));
>> Iterator i = licenseDAO.getAllLicenses();
>> 
>> SoftwareForm sForm = new SoftwareForm();
>> sForm.setApproved(Boolean.toString(s.isApproved()));
>> sForm.setId(s.getId().toString());
>> sForm.setLicense(s.getLicense().getId().toString());
>> sForm.setLocation(s.getLocation());
>> sForm.setName(s.getName());
>> sForm.setNotes(s.getNotes());
>> 
>> request.setAttribute("SoftwareForm",sForm);
>> request.setAttribute("allLicenses",i);
>>
>> This seems like it should be a fairly simple thing to do.  What am I
>> missing?
>>
>> Jon
> 
> 
> -
> 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]



Validating Collections in Struts

2006-08-24 Thread contest\.vix
Hi,
Please, could somebody help me?
Does anyone knows how can I validate a collection with Validator?
My Form is declared as de folowing:
begin form class
EmailForm extends ValidatorForm{
   /** selected responsables' email. */
private String [] selectedEmails = null;

/** List of the responsables' email. */
private List emails = new ArrayList();
}
end form class
In the Jsp I have:
begin jsp



end jsp

I have to validate each email included in the List (emails) and its required. 
Does anyone knows how to setup validator for validating this?
I´ve tried the folowing with no success:
-begin validator file




-end validator file

Thanks a lot,
Roger



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



RE: Validation in Struts DisptachAction

2006-08-24 Thread Sherwood, Reg
Hi Vaneet
 
I'm no expert on this to be sure; but I ran into a similiar issue.  What I did 
was provided the check for the Read only mode in the forms validate method; if 
read only mode the validate method returned null; otherwise it invoked the 
super.validate method which performs the normal validation checks on the form.
 
Hope this helps.
 
Reg



From: Vaneet Sharma [mailto:[EMAIL PROTECTED]
Sent: Thu 24/08/2006 8:08 AM
To: struts-user@jakarta.apache.org
Subject: Validation in Struts DisptachAction



Hii

I am using Struts  DispatchAction and i am facing  a peculiar problem
while validating .
Now i want to validate ,my action form only in insert or update mode.
For read mode i want to prevent validation.
To achive this is am writing validation="false" in the action mapping ,
and i am manually calling validation in insert and update methods of my
action class.


 DynaActionForm frm=(DynaActionForm)form;
  ActionErrors  errors=frm.validate(mapping,request);
 if ( errors != null && !errors.isEmpty() ) {
   saveErrors(request, errors);
  return (mapping.findForward("validationfailure"));
}


But when i am doing validation in this way.
It is always trying to validate the action , even in read mode also.
Can anybody tell me why is this happening.

Thanx in advance


Disclaimer :
This message and any attachments (hereinafter referred to as the Said 
Information) are  intended solely for the addressee. The Said Information is 
confidential and may be privileged and is also prohibited from disclosure. 
Access, use, copying, distribution or e-use of the Said Information by anyone 
except the addressee is unauthorized. If you are not the intended addressee, 
please destroy all copies of  the Said Information in your possession and also 
delete the same from your computer. Any views expressed in the Said Information 
are those of the individual sender except where the sender, with due authority 
of CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd. 
specifically states them to be the views of CRISIL Ltd./CRISIL MarketWire 
Ltd./Global Data Services of India Ltd. Nothing contained in the Said 
Information is capable or intended to create any legally binding obligations on 
the sender  CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India L
 td. who accept no responsibility, whatsoever, for loss or damage from the use 
of  the Said Information including damage from viruses.



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

RE: Validation in Struts DisptachAction

2006-08-24 Thread Saeed, Rada
Sharma,
 If insert, update and read modes, are represented by 3 different
submits that trigger the actions,
make them 3 different action mappings, then put validate="false" in the
read action mapping, and true in the rest.















-Original Message-
From: Vaneet Sharma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 24, 2006 2:09 PM
To: struts-user@jakarta.apache.org
Subject: Validation in Struts DisptachAction

Hii

I am using Struts  DispatchAction and i am facing  a peculiar problem
while validating .
Now i want to validate ,my action form only in insert or update mode.
For read mode i want to prevent validation.
To achive this is am writing validation="false" in the action mapping ,
and i am manually calling validation in insert and update methods of my
action class.


 DynaActionForm frm=(DynaActionForm)form;
  ActionErrors  errors=frm.validate(mapping,request);
 if ( errors != null && !errors.isEmpty() ) {
   saveErrors(request, errors);
  return (mapping.findForward("validationfailure"));
}


But when i am doing validation in this way.
It is always trying to validate the action , even in read mode also.
Can anybody tell me why is this happening.

Thanx in advance


Disclaimer : 
This message and any attachments (hereinafter referred to as the Said
Information) are  intended solely for the addressee. The Said
Information is confidential and may be privileged and is also prohibited
from disclosure. Access, use, copying, distribution or e-use of the Said
Information by anyone except the addressee is unauthorized. If you are
not the intended addressee, please destroy all copies of  the Said
Information in your possession and also delete the same from your
computer. Any views expressed in the Said Information are those of the
individual sender except where the sender, with due authority of CRISIL
Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd.
specifically states them to be the views of CRISIL Ltd./CRISIL
MarketWire Ltd./Global Data Services of India Ltd. Nothing contained in
the Said Information is capable or intended to create any legally
binding obligations on the sender  CRISIL Ltd./CRISIL MarketWire
Ltd./Global Data Services of India L  td. who accept no responsibility,
whatsoever, for loss or damage from the use of  the Said Information
including damage from viruses.

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



RE: When Tiles definations in tiles-def.xml loaded?

2006-08-24 Thread Vishal Seth
Yes ..these definitions are loaded duing plugin load time...
But for you own action you can modify the the tiles definition by
writing a controller class for the respective tile definition.

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 24, 2006 4:37 PM
To: Struts Users Mailing List
Subject: Re: When Tiles definations in tiles-def.xml loaded?

Raghuveer ha scritto:
> In my web application i have 10 definations for 10 jsp's.
>
> When does all this definations are loaded ?
> Does this happens when ActionServlet is initialised for config
elements from
> struts-config.xml
>   

If you are talking about Struts-Tiles, well, yes, exactly they are 
loaded when plugins are loaded (because Struts Tiles is integrated as a 
plugin).
Tiles 2 will load definitionsusing a separate Servlet (and probably also

a filter or a listener, correct me if I am wrong).
But why do you ask such a question? Can't you see a Tiles definition 
somewhere?

Ciao
Antonio

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





MASTEK 
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~


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



Re: When Tiles definations in tiles-def.xml loaded?

2006-08-24 Thread Antonio Petrelli

Raghuveer ha scritto:

In my web application i have 10 definations for 10 jsp's.

When does all this definations are loaded ?
Does this happens when ActionServlet is initialised for config elements from
struts-config.xml
  


If you are talking about Struts-Tiles, well, yes, exactly they are 
loaded when plugins are loaded (because Struts Tiles is integrated as a 
plugin).
Tiles 2 will load definitionsusing a separate Servlet (and probably also 
a filter or a listener, correct me if I am wrong).
But why do you ask such a question? Can't you see a Tiles definition 
somewhere?


Ciao
Antonio

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



RE: Problem with JSTL and Struts tag But Not with

2006-08-24 Thread Vishal Seth
Yeah or other way..but with usage of scriplet is ..
<%=pageContext.getAttribute(key name)%>


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 24, 2006 3:41 PM
To: Struts Users Mailing List
Subject: Re: Problem with JSTL and Struts  tag But Not with


You are correct.  Nesting tags do *not* work.

Try this...






   
   text
   




--
James Mitchell
678.910.8017




On Aug 24, 2006, at 1:19 AM, Vishal Seth wrote:

> Nested tags...i guess does not work..
>
> -Original Message-
> From: Mississippi John Hurt [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 24, 2006 10:48 AM
> To: Struts Users Mailing List
> Subject: Problem with JSTL and Struts  tag But Not with 
>
> Why is it that when I do the below with struts  tag I  
> get an
> error "Unterminated 
> 
>   
>}"/>">text
>   
> ...
>
> but when I use a regular HTML tag, its able to handle the JSTL 
> fine?
>
> 
>   
>   ">text
>   
> ...
>
> Any ideas? I very much want to use the Struts tag and JSTL so I dont
> have to
> hardcode the appname in the href.
>
>
>
> MASTEK
> "Making a valuable difference"
> Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
> In the US, we're called MAJESCOMASTEK
>
> ~~

> 
> Opinions expressed in this e-mail are those of the individual and  
> not that of Mastek Limited, unless specifically indicated to that  
> effect. Mastek Limited does not accept any responsibility or  
> liability for it. This e-mail and attachments (if any) transmitted  
> with it are confidential and/or privileged and solely for the use  
> of the intended person or entity to which it is addressed. Any  
> review, re-transmission, dissemination or other use of or taking of  
> any action in reliance upon this information by persons or entities  
> other than the intended recipient is prohibited. This e-mail and  
> its attachments have been scanned for the presence of computer  
> viruses. It is the responsibility of the recipient to run the virus  
> check on e-mails and attachments before opening them. If you have  
> received this e-mail in error, kindly delete this e-mail from all  
> computers.
> ~~

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





MASTEK 
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~


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



Validation in Struts DisptachAction

2006-08-24 Thread Vaneet Sharma
Hii

I am using Struts  DispatchAction and i am facing  a peculiar problem 
while validating .
Now i want to validate ,my action form only in insert or update mode.
For read mode i want to prevent validation.
To achive this is am writing validation="false" in the action mapping , 
and i am manually calling validation in insert and update methods of my 
action class.


 DynaActionForm frm=(DynaActionForm)form;
  ActionErrors  errors=frm.validate(mapping,request);
 if ( errors != null && !errors.isEmpty() ) {
   saveErrors(request, errors);
  return (mapping.findForward("validationfailure"));
}


But when i am doing validation in this way.
It is always trying to validate the action , even in read mode also.
Can anybody tell me why is this happening.

Thanx in advance


Disclaimer : 
This message and any attachments (hereinafter referred to as the Said 
Information) are  intended solely for the addressee. The Said Information is 
confidential and may be privileged and is also prohibited from disclosure. 
Access, use, copying, distribution or e-use of the Said Information by anyone 
except the addressee is unauthorized. If you are not the intended addressee, 
please destroy all copies of  the Said Information in your possession and also 
delete the same from your computer. Any views expressed in the Said Information 
are those of the individual sender except where the sender, with due authority 
of CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd. 
specifically states them to be the views of CRISIL Ltd./CRISIL MarketWire 
Ltd./Global Data Services of India Ltd. Nothing contained in the Said 
Information is capable or intended to create any legally binding obligations on 
the sender  CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India L
 td. who accept no responsibility, whatsoever, for loss or damage from the use 
of  the Said Information including damage from viruses.


When Tiles definations in tiles-def.xml loaded?

2006-08-24 Thread Raghuveer

In my web application i have 10 definations for 10 jsp's.

When does all this definations are loaded ?
Does this happens when ActionServlet is initialised for config elements from
struts-config.xml




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



Re: Problem with JSTL and Struts tag But Not with

2006-08-24 Thread James Mitchell

You are correct.  Nesting tags do *not* work.

Try this...






  
  texthtml:link>

  




--
James Mitchell
678.910.8017




On Aug 24, 2006, at 1:19 AM, Vishal Seth wrote:


Nested tags...i guess does not work..

-Original Message-
From: Mississippi John Hurt [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 10:48 AM
To: Struts Users Mailing List
Subject: Problem with JSTL and Struts  tag But Not with 

Why is it that when I do the below with struts  tag I  
get an

error "Unterminated text
  
...

but when I use a regular HTML tag, its able to handle the JSTL 
fine?


  
  ">text
  
...

Any ideas? I very much want to use the Struts tag and JSTL so I dont
have to
hardcode the appname in the href.



MASTEK
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~ 

Opinions expressed in this e-mail are those of the individual and  
not that of Mastek Limited, unless specifically indicated to that  
effect. Mastek Limited does not accept any responsibility or  
liability for it. This e-mail and attachments (if any) transmitted  
with it are confidential and/or privileged and solely for the use  
of the intended person or entity to which it is addressed. Any  
review, re-transmission, dissemination or other use of or taking of  
any action in reliance upon this information by persons or entities  
other than the intended recipient is prohibited. This e-mail and  
its attachments have been scanned for the presence of computer  
viruses. It is the responsibility of the recipient to run the virus  
check on e-mails and attachments before opening them. If you have  
received this e-mail in error, kindly delete this e-mail from all  
computers.
~~ 




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