Populating DyanActionForm from databse for view.

2003-12-09 Thread Antony Paul
Hi,
I like to use DynaActionForm for getting the user input to Action. I
want to use the same DynaActionForm to get the data from database and
display it (For editing and viewing only). Application dont use any EJB or
other components and my plan is to put business logic and database access in
Action class itself(DispatchAction) which is now in servlets. About 20% of
the application is developed using JSP and Servlets and  we are migrating it
to Struts for the control flow offered by it. The already written part uses
RowSetDynaClass of beanutils package to get data from database and display
it. We dont want to put extra effort writing DTO objects and ActionForms. I
need the functionality of redisplaying newly entered data if validation
fails. How to do it ?. I need explanation becuase I just started using
Struts.

rgds
Antony Paul.

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



Strange problem with session timeout

2003-12-09 Thread ganesh venkat
hi all, 

I am using weblogic 4.5 and servlet version 2.1.  I
have a logic to check if the session is timed out in a
common file which is included in all jsps.  If session
is timed out i redirect users to the login page with a
message "Session timed out login again"

The problem is when the session is timed out it takes
to the login page but the page from where they get
redirected is also appended to the login page in the
bottom.  I am totally clueless why this happens and
what i should do to avoid this problem

Since i cant use filters and all latest stuffs i am
quite confused 

Please Advice me 

Thanks in anticipation

Regards,
Ganesh

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Struts User Roles

2003-12-09 Thread Sebastian Linz
Hello Tiago,

I can't tell you where you can find documentation
concerning "roles". But I have taken a look on struts
roles on my own. So I'll write down what I know and
maybe you get a hint.

The struts config dtd defines an attribute "roles" for
the "action" element. The "roles" attribute is
optional and may contain a comma-delimited list of
security role names. These role names are loaded to
the ActionMapping of the related action class during
initialization of the ActionServlet and Actions (if
you want to know exactly what is done when take a look
at the init method of the ActionServlet's source).
When an Action's execute method is called an
ActionMapping object is passed. ActionMapping inherits
the property roles from ActionConfig which is
populated with the role names from the
struts-config.xml during initialization. Within your
action you may access your security role names from
the mapping. For convenience there is a method
getRoleNames so you get the role names within an
array. 

Hope that helps.

I posted a thread last week regarding this issue. But
I didn't get a helpful answer. I wanted to define a
custom struts config dtd to extend the struts config
with an element "security constraint". My problem is
still that I don't know how to configure the digester
using custom rule sets so my sub-class of action
mapping gets populated with my custom tag. Maybe you
have an idea or anyone who reads this thread.

Sincerely yours

Sebastian


 --- Tiago Henrique Costa Rodrigues Alves
<[EMAIL PROTECTED]> schrieb: > Where can
I find Struts Roles documentation?
> 
> Tiago Henrique C. R. Alves
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  


__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

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



Struts and commons DBCP

2003-12-09 Thread AMIR-TAHMASSEB Marc



Hi,
I'm using struts 1.02 and the commons DBCP to connect 
my Oracle 8i database and i have some problems because sometimes my tomcat 3 
fall down without any reasons and we have to restart it.
 
I wonder to know how work the connection with commons 
DBCP, more specialy what happen wen i do a getConnection at my BasicDataSource 
?
 
My second question is : do i have to close the 
connection when may request is finished ? Does this really close the connection 
or just free the object i used, but save the oracle connection open 
?
 
thank for your responses,
 
Marc
 
--
Marc 
AMIR-TAHMASSEB
[EMAIL PROTECTED]
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts and commons DBCP

2003-12-09 Thread Kwok Peng Tuck
Hi Amir,

   If you are really using a connection pool, then calling the 
close method just returns it to the pool for other use. Yes, you do have 
to return any connection you 'borrowed' from the pool, otherwise if you 
don't eventually you will run out of connections that the pool can give 
out to other requests.

AMIR-TAHMASSEB Marc wrote:

Hi,
I'm using struts 1.02 and the commons DBCP to connect my Oracle 8i 
database and i have some problems because sometimes my tomcat 3 fall 
down without any reasons and we have to restart it.
 
I wonder to know how work the connection with commons DBCP, more 
specialy what happen wen i do a getConnection at my BasicDataSource ?
 
My second question is : do i have to close the connection when may 
request is finished ? Does this really close the connection or just 
free the object i used, but save the oracle connection open ?
 
thank for your responses,
 
Marc
 
--
Marc AMIR-TAHMASSEB
[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: Struts and commons DBCP

2003-12-09 Thread Navjot Singh
tomcat 3? guess that was a stone age :-)

My second question is : do i have to close the connection when may request
is finished ? Does this really close the connection or just free the object
i used, but save the oracle connection open ?

Yes, please close the connection. Actually, this method gets trapped by
PooledConnection interface and the connection will be returned back to the
db pool and it WONT get closed.

HTH
Navjot Singh


RE: Struts and commons DBCP

2003-12-09 Thread AMIR-TAHMASSEB Marc
tomcat 3 is not my choice, unfortunatly :-(

For the connections, i already close all of them but we have some problems (tomcat 
server falls down and requests take time to be executed !) so i just want to be sure 
about this.

One more question : 
I use the commons-dbcp, commons-pool and commons-collections. Does it means that the 
connection-pool is autmoatically managed by commons-pool ? (i think so)

Thank you and Kwok Peng Tuck for your fast answers,

best regards,
Marc


> -Message d'origine-
> De : Navjot Singh [mailto:[EMAIL PROTECTED]
> Envoyé : mardi 9 décembre 2003 09:38
> À : Struts Users Mailing List
> Objet : RE: Struts and commons DBCP
> 
> 
> tomcat 3? guess that was a stone age :-)
> 
> My second question is : do i have to close the connection 
> when may request
> is finished ? Does this really close the connection or just 
> free the object
> i used, but save the oracle connection open ?
> 
> Yes, please close the connection. Actually, this method gets 
> trapped by
> PooledConnection interface and the connection will be 
> returned back to the
> db pool and it WONT get closed.
> 
> HTH
> Navjot Singh
> 

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



Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-09 Thread Adam Hardy
Hi Caroline,
have you checked the source of the HTML page in the browser to see what 
the value of username is, client-side? I expect the value is being sent 
to the browser as null.

If that is the case, it is because request.getRemoteUser() is returning 
null and that would be because you don't have or are losing your login 
session.

Adam

On 12/08/2003 10:32 PM Caroline Jen wrote:
I did not mess up lowercase and uppercase of the
hidden field I want to pass from my JSP to the
scaffold.ProcessAction.  If it had been the
lowercase/uppercase problem, I would have gotten a
message saying that the variable could not be
recognized.  

I pass two hidden fields at the same time.  One of
them is successfully passed with correct value.  The
other is passed but its value shows a 'null' in the
scaffold.ProcessAction.  What could go wrong?  Let me
show my code again:
Two hidden fields: username and keyName are passed 
from a JSP via a SUBMIT button:



<% String username = request.getRemoteUser();%>


View Articles


and an action mapping:


roles="editor"
path="/find/Category"
   
type="org.apache.struts.scaffold.ProcessAction"
   
parameter="org.apache.artimus.article.FindEditorData"
name="articleForm"
scope="request"
validate="false">
   
name="success"
path=".article.Result"/>


The value of the 'username' is found to be a 'null' in
the FindEditorData.java while the value of keyName is
successfully retrieved.  In the browser, I got:
name=null; kn=journal_category; kv=null 

The code of my FindEditorData is shown below:

public final class FindEditorData extends Bean
{
   public Object execute() throws Exception
   {
   // Obtain username 
   String username = getUsername();
  
   EditorService service = new EditorService();
   String value = service.findEditorData( username );

   String property = getKeyName();

if (( null==property ) || ( null==value )) 
{
StringBuffer sb = new StringBuffer();
sb.append( "name=" );
sb.append( username );
sb.append( "; kn=" );
sb.append( property );
sb.append( "; kv=" );
sb.append( value );
throw new ParameterException(
sb.toString() );
}

ResultList list = new ResultListBase
(
Access.findByProperty( this,property,value
)
);
list.setLegend( property,value );
return new ProcessResultBase( list );

   } // end execute

} // End FindEditorData
  

--- Caroline Jen <[EMAIL PROTECTED]> wrote:

I want to pass two hidden fields; username and
keyName
from a JSP via a SUBMIT button:


<% String username = request.getRemoteUser();%>


View Articles


and an action mapping:

   
   roles="editor"
   path="/find/Category"
  
type="org.apache.struts.scaffold.ProcessAction"
  

parameter="org.apache.artimus.article.FindEditorData"

   name="articleForm"
   scope="request"
   validate="false">
  
   
How come the username is not passed to the
FindEditorData.java while the keyName is
successfully
passed.  In the browser, I got:
name=null; kn=journal_category; kv=null 

The code of my FindEditorData is shown below:

public final class FindEditorData extends Bean
{
  public Object execute() throws Exception
  {
  // Obtain username 
  String username = getUsername();
 
  EditorService service = new EditorService();
  String value = service.findEditorData( username
);

  String property = getKeyName();
   
   if (( null==property ) || ( null==value )) 
   {
   StringBuffer sb = new StringBuffer();
   sb.append( "name=" );
   sb.append( username );
   sb.append( "; kn=" );
   sb.append( property );
   sb.append( "; kv=" );
   sb.append( value );
   throw new ParameterException(
sb.toString() );
   }

   ResultList list = new ResultListBase
   (
   Access.findByProperty(
this,property,value
)
   );
   list.setLegend( property,value );
   return new ProcessResultBase( list );

  } // end execute

} // End FindEditorData



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


Action Mapping - without formbean

2003-12-09 Thread Ravi Kulkarni

Hi All,

I have a form with yes/no buttons. I want to use 

Re: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Adam Hardy
Rats, the thread broke, hence my other reply. Like everyone says, you 
need to check the return value of getRemoteUser() - try looking at the 
value of the hidden field in the HTML via IE's 'Show page source'.

On 12/08/2003 11:55 PM Caroline Jen wrote:
I pass two hidden fields: username and keyName at the
same time.  The keyName is passed and with the correct
value in it.  The username is passed but its value
turns out to be a null.
It is impossible for request.getRemoteUser(); in my
JSP returning a null.  (see code below) Before it
reaches request.getRemoteUser(); the user has already
been successfully logged in with a valid name.




<% String username = request.getRemoteUser();%>


View Articles




--- "Yee, Richard K,,DMDCWEST"
<[EMAIL PROTECTED]> wrote:
Caroline,
Are you having problems with the username or the
keyName hidden variable? If
it is the username, then I'd suspect that
request.getRemoteUser() in your
JSP is returning null.
Regards,

Richard

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2003 1:32 PM
To: Struts Users Mailing List
Subject: Re: Please Help! Unable to Pass A Hidden
Field To
scaffold.ProcessAction

I did not mess up lowercase and uppercase of the
hidden field I want to pass from my JSP to the
scaffold.ProcessAction.  If
it had been the lowercase/uppercase problem, I would
have gotten a message
saying that the variable could not be recognized.  

I pass two hidden fields at the same time.  One of
them is successfully passed with correct value.  The
other is passed but its value shows a 'null' in the
scaffold.ProcessAction.
What could go wrong?  Let me show my code again:
Two hidden fields: username and keyName are passed 
from a JSP via a SUBMIT button:



<% String username = request.getRemoteUser();%>


View Articles


and an action mapping:

   
   roles="editor"
   path="/find/Category"
  
type="org.apache.struts.scaffold.ProcessAction"
  

parameter="org.apache.artimus.article.FindEditorData"

   name="articleForm"
   scope="request"
   validate="false">
  
   
The value of the 'username' is found to be a 'null'
in
the FindEditorData.java while the value of keyName
is successfully
retrieved.  In the browser, I got:
name=null; kn=journal_category; kv=null 

The code of my FindEditorData is shown below:

public final class FindEditorData extends Bean
{
  public Object execute() throws Exception
  {
  // Obtain username 
  String username = getUsername();
 
  EditorService service = new EditorService();
  String value = service.findEditorData( username
);

  String property = getKeyName();
   
   if (( null==property ) || ( null==value )) 
   {
   StringBuffer sb = new StringBuffer();
   sb.append( "name=" );
   sb.append( username );
   sb.append( "; kn=" );
   sb.append( property );
   sb.append( "; kv=" );
   sb.append( value );
   throw new ParameterException(
sb.toString() );
   }

   ResultList list = new ResultListBase
   (
   Access.findByProperty(
this,property,value
)
   );
   list.setLegend( property,value );
   return new ProcessResultBase( list );

  } // end execute

} // End FindEditorData
 

--- Caroline Jen <[EMAIL PROTECTED]> wrote:

I want to pass two hidden fields; username and
keyName
from a JSP via a SUBMIT button:


<% String username = request.getRemoteUser();%>


View Articles


and an action mapping:

   
   roles="editor"
   path="/find/Category"
  
type="org.apache.struts.scaffold.ProcessAction"
  


parameter="org.apache.artimus.article.FindEditorData"

   name="articleForm"
   scope="request"
   validate="false">
  
   
How come the username is not passed to the
FindEditorData.java while 

the keyName is successfully
passed.  In the browser, I got:
name=null; kn=journal_category; kv=null

The code of my FindEditorData is shown below:

public final class FindEditorData extends Bean
{
  public Object execute() throws Exception
  {
  // Obtain username 
  String username = getUsername();
 
  EditorService service = new EditorService();
  String value = service.findEditorData( username
);

  String property = getKeyName();
   
   if (( null==property ) || ( null==value ))

   {
   StringBuffer sb = new StringBuffer();
   sb.append( "name=" );
   sb.append( username );
   sb.append( "; kn=" );
   sb.append( property );
   sb.append( "; kv=" );
   sb.append( value );
   throw new ParameterException(
sb.toString() );
   }
   ResultList list = new ResultListBase
   (
   Access.findByProperty(
this,property,value
)
   );
   list.setLegend( property,value );
   return new ProcessResultBase( list );

=== message truncated ===

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and shari

I18N, Tiles definition

2003-12-09 Thread Oliver Wulff




I've defined a tile called "title" in a tile definition which is a language
dependend string. Therefore, I though I could set the key (webapp.title) of
the resource bundle as a value:






  

I tried to read it in the classicLayout.jsp like this:
"/>

but it doesn't work.
Can't I easily use the keys of a resource bundle for language dependend
strings in the tile definition?
I have no solution to solve my problem.


Regards
Oliver






*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.


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



Re: Action Mapping - without formbean

2003-12-09 Thread HG
Hi Ravi

The action attribute of your form tag points to the path for your action.

By using this action path, Struts finds the action and then the form bean
(subclass of ActionForm) (if any) associated with this action (through name
attribute in struts-config.xml).

So you can invoke your action without having a form bean. You could "sniff"
the request object in your action to get the parameters and attributes
passed along with the request.

But why don't you just use a form bean for intercepting the results of
pressing either the Yes or No button. IMO it is "cleaner" and done the
"Struts way".

Sorry if I misunderstood your quuestion..

Regards

Henrik


- Original Message - 
From: "Ravi Kulkarni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 10:37 AM
Subject: Action Mapping - without formbean


>
> Hi All,
>
> I have a form with yes/no buttons. I want to use  want to map to any Formbean. How can I do that?
>
>
> Thanks in advance.
>
> Kulkarni.
>
>
> -
> 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: Action Mapping - without formbean

2003-12-09 Thread Ravi Kulkarni
Thanks Henrik, that answers my question.

-Original Message-
From: HG [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 3:30 PM
To: Struts Users Mailing List
Subject: Re: Action Mapping - without formbean


Hi Ravi

The action attribute of your form tag points to the path for your action.

By using this action path, Struts finds the action and then the form bean
(subclass of ActionForm) (if any) associated with this action (through name
attribute in struts-config.xml).

So you can invoke your action without having a form bean. You could "sniff"
the request object in your action to get the parameters and attributes
passed along with the request.

But why don't you just use a form bean for intercepting the results of
pressing either the Yes or No button. IMO it is "cleaner" and done the
"Struts way".

Sorry if I misunderstood your quuestion..

Regards

Henrik


- Original Message -
From: "Ravi Kulkarni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 10:37 AM
Subject: Action Mapping - without formbean


>
> Hi All,
>
> I have a form with yes/no buttons. I want to use  want to map to any Formbean. How can I do that?
>
>
> Thanks in advance.
>
> Kulkarni.
>
>
> -
> 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]



Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
I am facing this problem that I couldn't figure out the cause.

 

 

 

 

 

We have an web based application  (built using struts 1.0).

 

After login to the application for the first time, if you relogin again
OR the session times out and you try to re login again

 

I have the following exception thrown to the client:

 

 

 

java.lang.ClassCastException

at
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j

ava:1674)

at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)

at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica

tionFilterChain.java:247)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt

erChain.java:193)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv

e.java:260)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4

80)

at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv

e.java:191)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4

80)

at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241

5)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java

:180)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa

lve.java:170)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:641)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java

:172)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:641)

at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509

)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:641)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4

80)

at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.

java:174)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

nvokeNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4

80)

at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at

org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at

org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)

at

org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)

at

org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)

at

org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:

590)

at

org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool

.java:530)

at java.lang.Thread.run(Thread.java:536)

 

 

 

 

 

 

 

So the user is forced to close and re open the browser inorder to login
again to the system successfully.

 

 

 

Any ideas??

 

 

Amjad Shahrour

Application Developer

Tel: +966.2.653.3334 ext 213

[EMAIL PROTECTED]

www.labbaik.com

 

 

 

 



RES: Struts User Roles

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
Thanks... This helps a lot..

Tiago Henrique C. R. Alves
Analista de Sistemas
Politec - CSS
Tel: 3038-6952


-Mensagem original-
De: Sebastian Linz [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 9 de dezembro de 2003 05:25
Para: Struts Users Mailing List
Assunto: Re: Struts User Roles


Hello Tiago,

I can't tell you where you can find documentation
concerning "roles". But I have taken a look on struts
roles on my own. So I'll write down what I know and
maybe you get a hint.

The struts config dtd defines an attribute "roles" for
the "action" element. The "roles" attribute is
optional and may contain a comma-delimited list of
security role names. These role names are loaded to
the ActionMapping of the related action class during
initialization of the ActionServlet and Actions (if
you want to know exactly what is done when take a look
at the init method of the ActionServlet's source).
When an Action's execute method is called an
ActionMapping object is passed. ActionMapping inherits
the property roles from ActionConfig which is
populated with the role names from the
struts-config.xml during initialization. Within your
action you may access your security role names from
the mapping. For convenience there is a method
getRoleNames so you get the role names within an
array. 

Hope that helps.

I posted a thread last week regarding this issue. But
I didn't get a helpful answer. I wanted to define a
custom struts config dtd to extend the struts config
with an element "security constraint". My problem is
still that I don't know how to configure the digester
using custom rule sets so my sub-class of action
mapping gets populated with my custom tag. Maybe you
have an idea or anyone who reads this thread.

Sincerely yours

Sebastian


 --- Tiago Henrique Costa Rodrigues Alves
<[EMAIL PROTECTED]> schrieb: > Where can
I find Struts Roles documentation?
> 
> Tiago Henrique C. R. Alves
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  


__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

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



Error message!

2003-12-09 Thread Zakaria khabot
Hi,
I received this error message and don't understand the soiurce of error :

javax.servlet.jsp.JspException: No getter method for property action of bean 
org.apache.struts.taglib.html.BEAN

java.lang.Object 
org.apache.struts.util.RequestUtils.lookup(javax.servlet.jsp.PageContext, 
java.lang.String, java.lang.String, java.lang.String)

RequestUtils.java:968

int org.apache.struts.taglib.html.BaseFieldTag.doStartTag()

BaseFieldTag.java:176

int org.apache.struts.taglib.html.HiddenTag.doStartTag()

HiddenTag.java:123

void _detail._jspService(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)

[/detail.jsp]

detail.jsp:29

My detail.jsp file is the following :
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/app.tld"prefix="app" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>





Consultation et modification des données.




Les données sur le DVD.



 

function go(action) {
document.forms["myform"].action.value=action;
 }
 


 






  

  :



  

 

  

  

  :


  

  

  

  :


  

  

  

  :


  

  

  




  




 

 

 

 

 

 

 


  







Thanks.
Zakaria

  


RE: Error message!

2003-12-09 Thread Jitesh Sinha
Do you have getAction() method in your actionForm?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 08, 2002 9:25 PM
To: struts-user-help; struts-user
Subject: Error message!


Hi,
I received this error message and don't understand the soiurce of error :

javax.servlet.jsp.JspException: No getter method for property action of bean
org.apache.struts.taglib.html.BEAN

java.lang.Object
org.apache.struts.util.RequestUtils.lookup(javax.servlet.jsp.PageContext,
java.lang.String, java.lang.String, java.lang.String)

RequestUtils.java:968

int org.apache.struts.taglib.html.BaseFieldTag.doStartTag()

BaseFieldTag.java:176

int org.apache.struts.taglib.html.HiddenTag.doStartTag()

HiddenTag.java:123

void _detail._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

[/detail.jsp]

detail.jsp:29

My detail.jsp file is the following :
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/app.tld"prefix="app" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>





Consultation et modification des données.




Les données sur le DVD.





function go(action) {
document.forms["myform"].action.value=action;
 }










  

  :







  

  

  :


  

  

  

  :


  

  

  

  :


  

  

  




  




 

 

 

 

 

 

 


  







Thanks.
Zakaria




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



Re: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Paul Thomas
On 09/12/2003 01:29 Caroline Jen wrote:
I use container-managed authentication.
In which case, why don't you get the user name using 
request.getUserPrincipal().getName() ?

--
Paul Thomas
+--+-+
| Thomas Micro Systems Limited | Software Solutions for the Smaller 
Business |
| Computer Consultants | 
http://www.thomas-micro-systems-ltd.co.uk   |
+--+-+

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


Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
You need to put struts-legacy.jar in the lib of tomcat

Try with it
- Original Message - 
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 4:34 PM
Subject: Have to re open browser each time


> I am facing this problem that I couldn't figure out the cause.
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> We have an web based application  (built using struts 1.0).
> 
>  
> 
> After login to the application for the first time, if you relogin again
> OR the session times out and you try to re login again
> 
>  
> 
> I have the following exception thrown to the client:
> 
>  
> 
>  
> 
>  
> 
> java.lang.ClassCastException
> 
> at
> org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> 
> ava:1674)
> 
> at
> 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> 
> at
> 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> 
> tionFilterChain.java:247)
> 
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> 
> erChain.java:193)
> 
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> 
> e.java:260)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> 
> e.java:191)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> 
> 5)
> 
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> 
> :180)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> 
> lve.java:170)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> 
> :172)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
> 
> )
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> 
> java:174)
> 
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
> 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 
> at
> 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
> 
> at
> 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
> 
> at
> 
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
> 
> at
> 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
> 
> 590)
> 
> at
> 
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
> 
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> 
> .java:530)
> 
> at java.lang.Thread.run(Thread.java:536)
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> So the user is forced to close and re open the browser inorder to login
> again to the system successfully.
> 
>  
> 
>  
> 
>  
> 
> Any ideas??
> 
>  
> 
>  
> 
> Amjad Shahrour
> 
> Application Developer
> 
> Tel: +966.2.653.3334 ext 213
> 
> [EMAIL PROTECTED]
> 
> www.labbaik.com
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 


-

Re: Error message!

2003-12-09 Thread Gurpreet Dhanoa
hi
It seems your tld file for HTML is not right. Try to open the tld file and
check it
- Original Message -
From: "Zakaria khabot" <[EMAIL PROTECTED]>
To: "struts-user-help" <[EMAIL PROTECTED]>; "struts-user"
<[EMAIL PROTECTED]>
Sent: Sunday, December 08, 2002 9:24 PM
Subject: Error message!


Hi,
I received this error message and don't understand the soiurce of error :

javax.servlet.jsp.JspException: No getter method for property action of bean
org.apache.struts.taglib.html.BEAN

java.lang.Object
org.apache.struts.util.RequestUtils.lookup(javax.servlet.jsp.PageContext,
java.lang.String, java.lang.String, java.lang.String)

RequestUtils.java:968

int org.apache.struts.taglib.html.BaseFieldTag.doStartTag()

BaseFieldTag.java:176

int org.apache.struts.taglib.html.HiddenTag.doStartTag()

HiddenTag.java:123

void _detail._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

[/detail.jsp]

detail.jsp:29

My detail.jsp file is the following :
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/app.tld"prefix="app" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>





Consultation et modification des données.




Les données sur le DVD.





function go(action) {
document.forms["myform"].action.value=action;
 }










  

  :







  

  

  :


  

  

  

  :


  

  

  

  :


  

  

  




  




 

 

 

 

 

 

 


  







Thanks.
Zakaria



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



Multiple Config files

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
Hi,

I am working in a project with many developers,
sometimes the developers need to change the struts-config.xml file at the
same time (one developer needs to add a action-form and other developer
needs to add a form-bean or even make some changes...)

How can I add multiple config file support for struts??
OFF-TOPIC : Does anyone know a cvs mailing list ?

Thanks,
Tiago Henrique C. R. Alves


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



Refresh -submit relation

2003-12-09 Thread Viral_Thakkar
I have a page for upload functionality which uploads the files to a
folder.

Here I am referring the struts example for uploading of files and I am
inserting the record in table at the same time.

This upload is working fine but problem is when I refresh the browser
page, the page is getting submitted again. Due to this duplicate records
are inserted in the database.

Is there any way, to stop the page to submit on refresh?





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



RE: Multiple Config files

2003-12-09 Thread vasudevrao gupta

Yes ..u can have multiple config files in your application for each
module ..
you need to define them in web.xml file where you give the
initialization paramter for "config" of your action servlet
seperated by comma.
 
  config
 
/WEB-INF/struts-config1.xml,/WEB-INF/struts-config2.xml


Cheers
gupta

-Original Message-
From: Tiago Henrique Costa Rodrigues Alves
[mailto:[EMAIL PROTECTED] 
Sent: 09 December 2003 18:18
To: Struts Users Mailing List (E-mail)
Subject: Multiple Config files


Hi,

I am working in a project with many developers,
sometimes the developers need to change the struts-config.xml file at
the
same time (one developer needs to add a action-form and other developer
needs to add a form-bean or even make some changes...)

How can I add multiple config file support for struts??
OFF-TOPIC : Does anyone know a cvs mailing list ?

Thanks,
Tiago Henrique C. R. Alves


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


Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



RES: Refresh -submit relation

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
You can "turn off" the cache of your pages, so the page will expires before
submiting...

<% 
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", -1); 
%>

Tiago Henrique C. R. Alves



-Mensagem original-
De: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 9 de dezembro de 2003 08:47
Para: Struts Users Mailing List
Assunto: Refresh -submit relation


I have a page for upload functionality which uploads the files to a
folder.

Here I am referring the struts example for uploading of files and I am
inserting the record in table at the same time.

This upload is working fine but problem is when I refresh the browser
page, the page is getting submitted again. Due to this duplicate records
are inserted in the database.

Is there any way, to stop the page to submit on refresh?





-
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: Multiple Config files

2003-12-09 Thread Jeff Kyser
Sounds like you should investigate modules.

Also, check here for all things cvs-related, including
a mailing list:
	http://www.cvshome.org/

-jeff

On Tuesday, December 9, 2003, at 06:48  AM, Tiago Henrique Costa 
Rodrigues Alves wrote:

Hi,

I am working in a project with many developers,
sometimes the developers need to change the struts-config.xml file at 
the
same time (one developer needs to add a action-form and other developer
needs to add a form-bean or even make some changes...)

How can I add multiple config file support for struts??
OFF-TOPIC : Does anyone know a cvs mailing list ?
Thanks,
Tiago Henrique C. R. Alves
-
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: Refresh -submit relation

2003-12-09 Thread Jeff Kyser
Investigate the use of tokens, also search the archives,
as this is a commonly discussed problem.
-jeff

On Tuesday, December 9, 2003, at 05:47  AM, Viral_Thakkar wrote:

I have a page for upload functionality which uploads the files to a
folder.
Here I am referring the struts example for uploading of files and I am
inserting the record in table at the same time.
This upload is working fine but problem is when I refresh the browser
page, the page is getting submitted again. Due to this duplicate 
records
are inserted in the database.

Is there any way, to stop the page to submit on refresh?





-
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: Multiple Config files

2003-12-09 Thread Navjot Singh
>How can I add multiple config file support for struts??


  config
  /WEB-INF/struts-default.xml


  config/ab
  /WEB-INF/struts-ab.xml


>OFF-TOPIC : Does anyone know a cvs mailing list ?
www.cvshome.org

HTH
Navjot Singh

>-Original Message-
>From: Tiago Henrique Costa Rodrigues Alves
>[mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 09, 2003 6:18 PM
>To: Struts Users Mailing List (E-mail)
>Subject: Multiple Config files
>
>
>Hi,
>
>I am working in a project with many developers,
>sometimes the developers need to change the struts-config.xml file at the
>same time (one developer needs to add a action-form and other developer
>needs to add a form-bean or even make some changes...)
>
>
>Thanks,
>Tiago Henrique C. R. Alves
>
>
>-
>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: I18N, Tiles definition

2003-12-09 Thread List Mailbox
Try this.




Not sure of the JSTL way maybe:


 


Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Oliver Wulff
Sent: Tuesday, December 09, 2003 4:46 AM
To: [EMAIL PROTECTED]
Subject: I18N, Tiles definition




I've defined a tile called "title" in a tile definition which is a language
dependend string. Therefore, I though I could set the key (webapp.title) of
the resource bundle as a value:






  

I tried to read it in the classicLayout.jsp like this:
"/>

but it doesn't work.
Can't I easily use the keys of a resource bundle for language dependend
strings in the tile definition?
I have no solution to solve my problem.


Regards
Oliver






*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.


-
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: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
I have tried and put " struts-legacy.jar" at WEB-INF\lib\
Also I have thrown a copy of it in many other places wher tomcat can see
it.

But the problem still exist.


Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 2:36 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Have to re open browser each time

You need to put struts-legacy.jar in the lib of tomcat

Try with it
- Original Message - 
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 4:34 PM
Subject: Have to re open browser each time


> I am facing this problem that I couldn't figure out the cause.
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> We have an web based application  (built using struts 1.0).
> 
>  
> 
> After login to the application for the first time, if you relogin
again
> OR the session times out and you try to re login again
> 
>  
> 
> I have the following exception thrown to the client:
> 
>  
> 
>  
> 
>  
> 
> java.lang.ClassCastException
> 
> at
>
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> 
> ava:1674)
> 
> at
> 
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> 
> at
> 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> 
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> 
> tionFilterChain.java:247)
> 
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> 
> erChain.java:193)
> 
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> 
> e.java:260)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> 
> e.java:191)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> 
> 5)
> 
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> 
> :180)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> 
> lve.java:170)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> 
> :172)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
> 
> )
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> 
> java:174)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> 
> nvokeNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 
> 80)
> 
> at
> 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
> 
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 
> at
> 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
> 
> at
> 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
> 
> at
> 
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
> 
> at
> 
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
> 
> 590)
> 
> at
> 
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
> 
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnab

Re: how to Remove the cached JSP's?

2003-12-09 Thread Martin Gainty
I think next time I debug a situation such as this I would want to see the
Ant build output with the relevant configuration files..
Regards,
Martin
- Original Message - 
From: "Julia Weaver" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2003 11:15 PM
Subject: Re: how to Remove the cached JSP's?


> Martin, thank you very much for the informaion.
> I found one of errors about my menu is I have 2
> menu.jsp in different directory. I still need work on
> other problems...
>
>
> --- Martin Gainty <[EMAIL PROTECTED]> wrote:
> > for caching properties on IBM http server:
> >
>
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/040502.html
> >
> > Specifically look  at httpd.conf in the IBM Http
> > Server:
> > AfpaEnable
> > AfpaCache on
> > AfpaLogFile "c:/Program Files/IBM HTTP
> > Server/logs/afpalog" V-ECLF
> > AfpaDynaCacheMax 10
> > The above settings enable the Cache Accelerator and
> > limit the dynamic cache
> > size to 10 Meg. If you use these directive to
> > increase the cache size, do
> > not make the cache so large that all physical memory
> > is consumed. You can
> > determine how much memory is available, when all the
> > applications are
> > running, by using the Windows Task Manager.
> >
> > Assign no more than 50% of available physical memory
> > to the dynamic cache.
> > Specifying too large a cache not only decreases the
> > performance of other
> > applications, but also puts you at risk for
> > completely running out of
> > memory.
> >
> > The default configuration does not include the
> > AfpaDynaCacheMax directive
> > where the cache size is automatically calculated as
> > 1/8 of physical memory.
> >
> >
> > for configuraing cahcing thru WebSphere console try
> > and configure the
> > dynacache.xml
> >
> >
>
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/0606001601.html
> >
> > usually there is a websphere admin that can help you
> > with this..be mindful
> > the greater anount of storage allocated the greater
> > the capacity that the
> > program will cache
> >
> > let me know..
> >
> > Martin
> >
> > - Original Message - 
> > From: "Julia Weaver" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Monday, December 08, 2003 10:10 AM
> > Subject: Re: how to Remove the cached JSP's?
> >
> >
> > > Thanks.
> > >
> > > I did Stop Websphere, restart my computer, and
> > then
> > > Start Websphere again. But still not work. Maybe I
> > > should change something in configuration. Could
> > you
> > > please give me further instruction how to change
> > in
> > > configuration? or something wrong in the tile
> > > definition?
> > >
> > >  > > path="/basic/myLayout.jsp">
> > >> > />
> > >   
> > >   
> > >   
> > >   
> > > 
> > >
> > >
> > >
> > >
> > > --- Martin Gainty <[EMAIL PROTECTED]> wrote:
> > > > in that case you should Stop Websphere and then
> > > > Start Websphere
> > > > most appservers and webservers will load JSPs on
> > > > startup and will the
> > > > program will retain jsps after precompiling into
> > > > memory unless configured
> > > > NOT to do so..
> > > > Bouncing the server ALWAYS works
> > > > -Martin
> > > > - Original Message - 
> > > > From: "Julia Weaver" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List"
> > > > <[EMAIL PROTECTED]>
> > > > Sent: Monday, December 08, 2003 9:53 AM
> > > > Subject: RE: how to Remove the cached JSP's?
> > > >
> > > >
> > > > > Thanks.
> > > > > I deleted java n class from 'WORK' directory,
> > but
> > > > > still keep getting same/similar error:
> > > > > in the manu.jsp, I changed app.menu.profile to
> > > > > app.menu.po, but still show the value of
> > > > > app.menu.profile.
> > > > >
> > > > > 
> > > > > app.menu.po
> > > > >   
> > > > >   app.menu.po.browse
> > > > >   PoBrowse.do
> > > > >   
> > > > > 
> > > > >
> > > > > In application.properties, I have following:
> > > > > app.menu.po=PO
> > > > > app.menu.po.browse=Po browse
> > > > > app.menu.profile=Profile
> > > > > app.menu.profile.mbs=Default Region
> > > > >
> > > > > I am using IBM WebSphere Studio Application
> > > > Developer.
> > > > > Please give me more help, thanks.
> > > > >
> > > > >
> > > > >
> > > > > --- "Agashivala, Vishal"
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > Remove the .java and .class file for that
> > JSP
> > > > from
> > > > > >
> > > > >
> > > >
> > >
> >
> %Tomcat_home%\work\Standalone\localhost\%virtualdirectory%
> > > > > > Although path depends upon the version of
> > > > > > tomcat..you wont find exact path
> > > > > > as shown above but try to remove java n
> > class
> > > > from
> > > > > > 'WORK' directory under
> > > > > > your tomcat installation.
> > > > > >
> > > > > > Regards,
> > > > > > Vishal Agashivala
> > > > > > Atos Origin India
> > > > > > O: +91-22-5691 3870
> > > > > >
> > > > > >
> > > > > > -Original Message-
> > > > > > From: sh

Error message display in the case of redirect = true

2003-12-09 Thread alok . garg
Hello all,
I want to display the errors stack provided y Struts in the jsp page using
the  tag. I am able to display it but the moment I add the
redirect=true in the action mapping tag I am not able to see the error
messages.

Please help with it.

Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Re: Refresh -submit relation

2003-12-09 Thread Gurpreet Dhanoa

Hi

You need to use the concept of saveTokens Which prevent yoyr form from
getting submitted twice

Cheers
gary

- Original Message -
From: "Viral_Thakkar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 5:17 PM
Subject: Refresh -submit relation


> I have a page for upload functionality which uploads the files to a
> folder.
>
> Here I am referring the struts example for uploading of files and I am
> inserting the record in table at the same time.
>
> This upload is working fine but problem is when I refresh the browser
> page, the page is getting submitted again. Due to this duplicate records
> are inserted in the database.
>
> Is there any way, to stop the page to submit on refresh?
>
>
>
>
>
> -
> 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: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
Are you handling the sessions from Actions or from Views
- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 5:33 PM
Subject: RE: Have to re open browser each time


> I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> Also I have thrown a copy of it in many other places wher tomcat can see
> it.
>
> But the problem still exist.
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 2:36 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
> You need to put struts-legacy.jar in the lib of tomcat
>
> Try with it
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 4:34 PM
> Subject: Have to re open browser each time
>
>
> > I am facing this problem that I couldn't figure out the cause.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > We have an web based application  (built using struts 1.0).
> >
> >
> >
> > After login to the application for the first time, if you relogin
> again
> > OR the session times out and you try to re login again
> >
> >
> >
> > I have the following exception thrown to the client:
> >
> >
> >
> >
> >
> >
> >
> > java.lang.ClassCastException
> >
> > at
> >
> org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> >
> > ava:1674)
> >
> > at
> >
> >
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> >
> > at
> >
> > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> >
> > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >
> > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> >
> > tionFilterChain.java:247)
> >
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> >
> > erChain.java:193)
> >
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> >
> > e.java:260)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> >
> > e.java:191)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> >
> > 5)
> >
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> >
> > :180)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> >
> > lve.java:170)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> >
> > :172)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
> >
> > )
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> >
> > java:174)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> > org.apache.catalina.core.ContainerBase

RE: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
Sessions are handled from Actions.

Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 3:26 PM
To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
Subject: Re: Have to re open browser each time

Are you handling the sessions from Actions or from Views
- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 5:33 PM
Subject: RE: Have to re open browser each time


> I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> Also I have thrown a copy of it in many other places wher tomcat can
see
> it.
>
> But the problem still exist.
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 2:36 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
> You need to put struts-legacy.jar in the lib of tomcat
>
> Try with it
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 4:34 PM
> Subject: Have to re open browser each time
>
>
> > I am facing this problem that I couldn't figure out the cause.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > We have an web based application  (built using struts 1.0).
> >
> >
> >
> > After login to the application for the first time, if you relogin
> again
> > OR the session times out and you try to re login again
> >
> >
> >
> > I have the following exception thrown to the client:
> >
> >
> >
> >
> >
> >
> >
> > java.lang.ClassCastException
> >
> > at
> >
>
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> >
> > ava:1674)
> >
> > at
> >
> >
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> >
> > at
> >
> >
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> >
> > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >
> > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> >
> > tionFilterChain.java:247)
> >
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> >
> > erChain.java:193)
> >
> > at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> >
> > e.java:260)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> >
> > e.java:191)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> >
> > 5)
> >
> > at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> >
> > :180)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:643)
> >
> > at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> >
> > lve.java:170)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> >
> > :172)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
> >
> > )
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> >
> > nvokeNext(StandardPipeline.java:641)
> >
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> >
> > 80)
> >
> > at
> >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> > at
> >
>
org.apache.catalina.core.StandardEngineValve.invok

RE: Error message display in the case of redirect = true

2003-12-09 Thread Navjot Singh
not sure but the logic says that error messages are being stored in the
REQUEST SCOPE and when you set redirect=true, naturally that's a new request
so you won't get the errors set in earlier request.

anybody else?

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 09, 2003 5:53 PM
>To: Struts Users Mailing List
>Subject: Error message display in the case of redirect = true
>
>
>Hello all,
>I want to display the errors stack provided y Struts in the jsp page using
>the  tag. I am able to display it but the moment I add the
>redirect=true in the action mapping tag I am not able to see the error
>messages.
>
>Please help with it.
>
>Alok Garg
>Polaris Software Lab Ltd.
>( + 91 - 022 - 28290019 Ext. # 1308 )
>
>
>


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



Re: Error message!

2003-12-09 Thread Oron Gill Haus
It looks as though one of your tags in the 'app' include doesn't have a
getter/setter for an attribute you have specified in your TLD.

--- Zakaria khabot <[EMAIL PROTECTED]> wrote:
> Hi,
> I received this error message and don't understand the soiurce of
> error :
> 
> javax.servlet.jsp.JspException: No getter method for property action
> of bean org.apache.struts.taglib.html.BEAN
> 
>   java.lang.Object
>
org.apache.struts.util.RequestUtils.lookup(javax.servlet.jsp.PageContext,
> java.lang.String, java.lang.String, java.lang.String)
> 
>   RequestUtils.java:968
> 
>   int org.apache.struts.taglib.html.BaseFieldTag.doStartTag()
> 
>   BaseFieldTag.java:176
> 
>   int org.apache.struts.taglib.html.HiddenTag.doStartTag()
> 
>   HiddenTag.java:123
> 
>   void _detail._jspService(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> 
>   [/detail.jsp]
> 
>   detail.jsp:29
> 
> My detail.jsp file is the following :
> <%@ page contentType="text/html;charset=windows-1252"%>
> <%@ taglib uri="/WEB-INF/app.tld"prefix="app" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> 
> 
> 
> 
> Consultation et modification des données.
> 
> 
> 
> 
> Les données sur le DVD.
> 
> 
>  action="/process">
>  
> 
> function go(action) {
> document.forms["myform"].action.value=action;
>  }
>  
> 
> 
>  
> 
> 
> 
> 
> 
> 
>   
> 
>   :
> 
> 
> 
>   
> 
>  
> 
>   
> 
>   
> 
>   :
> 
> 
>   
> 
>   
> 
>   
> 
>   :
> 
> 
>   
> 
>   
> 
>   
> 
>   :
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 
> 
>   
> 
> 
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
>   
> 
> 
> 
> 
> 
> 
> 
> Thanks.
> Zakaria
> 
>   
> 


=
Oron Gill Haus
IBM CSE Content Manager 8 - Sun Certified Programmer Java 2 1.4
office: (410) 539-3733 x1348
fax:(410) 837-9535 c/o Oron
e-mail: [EMAIL PROTECTED]
web: http://www.electronicscene.com/oron_haus

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



Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
Amjad

I have not faced such a problem as even we are handling the sessions in the
same way as you are.
Which version of Tomcat you are using. Try to use it with 4.12
This may also be the reason
- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:04 PM
Subject: RE: Have to re open browser each time


> Sessions are handled from Actions.
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 3:26 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> Are you handling the sessions from Actions or from Views
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 5:33 PM
> Subject: RE: Have to re open browser each time
>
>
> > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > Also I have thrown a copy of it in many other places wher tomcat can
> see
> > it.
> >
> > But the problem still exist.
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 2:36 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> > You need to put struts-legacy.jar in the lib of tomcat
> >
> > Try with it
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 4:34 PM
> > Subject: Have to re open browser each time
> >
> >
> > > I am facing this problem that I couldn't figure out the cause.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > We have an web based application  (built using struts 1.0).
> > >
> > >
> > >
> > > After login to the application for the first time, if you relogin
> > again
> > > OR the session times out and you try to re login again
> > >
> > >
> > >
> > > I have the following exception thrown to the client:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > java.lang.ClassCastException
> > >
> > > at
> > >
> >
> org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> > >
> > > ava:1674)
> > >
> > > at
> > >
> > >
> >
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> > >
> > > at
> > >
> > >
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > >
> > > tionFilterChain.java:247)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > >
> > > erChain.java:193)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > >
> > > e.java:260)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >
> > > nvokeNext(StandardPipeline.java:643)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > >
> > > 80)
> > >
> > > at
> > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> > >
> > > e.java:191)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >
> > > nvokeNext(StandardPipeline.java:643)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > >
> > > 80)
> > >
> > > at
> > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> > >
> > > 5)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> > >
> > > :180)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >
> > > nvokeNext(StandardPipeline.java:643)
> > >
> > > at
> > >
> >
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> > >
> > > lve.java:170)
> > >
> > > at
> > >
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >

RE: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
I see.

I want to add one more thing,
After executing the login action, if the user is authenticated the user
is forwarded to an ASP page ( the main page is written uding ASP). 

Could this be the reason??? If yes, why is this happening?



( we have done integration between ASP and jsp coz we have modules
written in asp.)


anyhow, the application works greate with full functionality with no
problems except this one.



Thank you very much for your presouce time.

Regards,


Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 4:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Have to re open browser each time

Amjad

I have not faced such a problem as even we are handling the sessions in
the
same way as you are.
Which version of Tomcat you are using. Try to use it with 4.12
This may also be the reason
- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:04 PM
Subject: RE: Have to re open browser each time


> Sessions are handled from Actions.
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 3:26 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> Are you handling the sessions from Actions or from Views
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 5:33 PM
> Subject: RE: Have to re open browser each time
>
>
> > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > Also I have thrown a copy of it in many other places wher tomcat can
> see
> > it.
> >
> > But the problem still exist.
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 2:36 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> > You need to put struts-legacy.jar in the lib of tomcat
> >
> > Try with it
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 4:34 PM
> > Subject: Have to re open browser each time
> >
> >
> > > I am facing this problem that I couldn't figure out the cause.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > We have an web based application  (built using struts 1.0).
> > >
> > >
> > >
> > > After login to the application for the first time, if you relogin
> > again
> > > OR the session times out and you try to re login again
> > >
> > >
> > >
> > > I have the following exception thrown to the client:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > java.lang.ClassCastException
> > >
> > > at
> > >
> >
>
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> > >
> > > ava:1674)
> > >
> > > at
> > >
> > >
> >
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> > >
> > > at
> > >
> > >
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > >
> > > tionFilterChain.java:247)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > >
> > > erChain.java:193)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > >
> > > e.java:260)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >
> > > nvokeNext(StandardPipeline.java:643)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > >
> > > 80)
> > >
> > > at
> > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> > >
> > > e.java:191)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> > >
> > > nvokeNext(StandardPipeline.java:643)
> > >
> > > at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke

Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
hmm
AMjad are the JSp and ASP part of the same application or they are using
different we servers

- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:42 PM
Subject: RE: Have to re open browser each time


> I see.
>
> I want to add one more thing,
> After executing the login action, if the user is authenticated the user
> is forwarded to an ASP page ( the main page is written uding ASP).
>
> Could this be the reason??? If yes, why is this happening?
>
>
>
> ( we have done integration between ASP and jsp coz we have modules
> written in asp.)
>
>
> anyhow, the application works greate with full functionality with no
> problems except this one.
>
>
>
> Thank you very much for your presouce time.
>
> Regards,
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:02 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
> Amjad
>
> I have not faced such a problem as even we are handling the sessions in
> the
> same way as you are.
> Which version of Tomcat you are using. Try to use it with 4.12
> This may also be the reason
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:04 PM
> Subject: RE: Have to re open browser each time
>
>
> > Sessions are handled from Actions.
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 3:26 PM
> > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > Subject: Re: Have to re open browser each time
> >
> > Are you handling the sessions from Actions or from Views
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > Mailing
> > List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 5:33 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > Also I have thrown a copy of it in many other places wher tomcat can
> > see
> > > it.
> > >
> > > But the problem still exist.
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 2:36 PM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: Re: Have to re open browser each time
> > >
> > > You need to put struts-legacy.jar in the lib of tomcat
> > >
> > > Try with it
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 4:34 PM
> > > Subject: Have to re open browser each time
> > >
> > >
> > > > I am facing this problem that I couldn't figure out the cause.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > We have an web based application  (built using struts 1.0).
> > > >
> > > >
> > > >
> > > > After login to the application for the first time, if you relogin
> > > again
> > > > OR the session times out and you try to re login again
> > > >
> > > >
> > > >
> > > > I have the following exception thrown to the client:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > java.lang.ClassCastException
> > > >
> > > > at
> > > >
> > >
> >
> org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> > > >
> > > > ava:1674)
> > > >
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> > > >
> > > > at
> > > >
> > > >
> > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > > >
> > > > at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > > >
> > > > at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > >
> > > > at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > > >
> > > > tionFilterChain.java:247)
> > > >
> > > > at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > > >
> > > > erChain.java:193)
> > > >
> > > > at
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > > >
> > > > e.java:260)
> > > >
> > > > at
> > > >
> >

RE: Refresh -submit relation

2003-12-09 Thread Viral_Thakkar
Could you please provide some more details about this?

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 5:54 PM
To: Struts Users Mailing List
Subject: Re: Refresh -submit relation


Hi

You need to use the concept of saveTokens Which prevent yoyr form from
getting submitted twice

Cheers
gary

- Original Message -
From: "Viral_Thakkar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 5:17 PM
Subject: Refresh -submit relation


> I have a page for upload functionality which uploads the files to a
> folder.
>
> Here I am referring the struts example for uploading of files and I am
> inserting the record in table at the same time.
>
> This upload is working fine but problem is when I refresh the browser
> page, the page is getting submitted again. Due to this duplicate
records
> are inserted in the database.
>
> Is there any way, to stop the page to submit on refresh?
>
>
>
>
>
> -
> 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: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
Both are using the SAME IIS server. ( ofcource jsp requests will be
forwarded to be handled by tomcat)



Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 4:12 PM
To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
Subject: Re: Have to re open browser each time

hmm
AMjad are the JSp and ASP part of the same application or they are using
different we servers

- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:42 PM
Subject: RE: Have to re open browser each time


> I see.
>
> I want to add one more thing,
> After executing the login action, if the user is authenticated the
user
> is forwarded to an ASP page ( the main page is written uding ASP).
>
> Could this be the reason??? If yes, why is this happening?
>
>
>
> ( we have done integration between ASP and jsp coz we have modules
> written in asp.)
>
>
> anyhow, the application works greate with full functionality with no
> problems except this one.
>
>
>
> Thank you very much for your presouce time.
>
> Regards,
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:02 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
> Amjad
>
> I have not faced such a problem as even we are handling the sessions
in
> the
> same way as you are.
> Which version of Tomcat you are using. Try to use it with 4.12
> This may also be the reason
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:04 PM
> Subject: RE: Have to re open browser each time
>
>
> > Sessions are handled from Actions.
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 3:26 PM
> > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > Subject: Re: Have to re open browser each time
> >
> > Are you handling the sessions from Actions or from Views
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > Mailing
> > List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 5:33 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > Also I have thrown a copy of it in many other places wher tomcat
can
> > see
> > > it.
> > >
> > > But the problem still exist.
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 2:36 PM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: Re: Have to re open browser each time
> > >
> > > You need to put struts-legacy.jar in the lib of tomcat
> > >
> > > Try with it
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 4:34 PM
> > > Subject: Have to re open browser each time
> > >
> > >
> > > > I am facing this problem that I couldn't figure out the cause.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > We have an web based application  (built using struts 1.0).
> > > >
> > > >
> > > >
> > > > After login to the application for the first time, if you
relogin
> > > again
> > > > OR the session times out and you try to re login again
> > > >
> > > >
> > > >
> > > > I have the following exception thrown to the client:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > java.lang.ClassCastException
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
> > > >
> > > > ava:1674)
> > > >
> > > > at
> > > >
> > > >
> > >
> >
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> > > >
> > > > at
> > > >
> > > >
> >
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > > >
> > > > at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > > >
> > > > at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.A

Re: Refresh -submit relation

2003-12-09 Thread Gurpreet Dhanoa
SUre
In struts we have concept of savetokens()
SaveToken is a method which you have to set to false/ture before the form
get loaded and get submitted

Follwoing is the snapshot for the same.




 public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response) throws
Exception {
// Extract attributes and/or parameters we will need

 // When "navigating" to this action, ActionForm is null, so
// user's info is copied into the form and then saved in request
scope
if (form == null) {
// Set a transactional control token to prevent double posting
saveToken(request);
   }

//IF this Action has been called of by Submit Form
 // Validate the transactional control token
if (!isTokenValid(request))//This is an inbuild method of ACtion
class to check the Token
{

request.setAttribute(DOUBLE_POST_ATTEMPT_KEY, "trapped");
return new ActionForward(mapping.getInput());
}



HOpe this may help

Cheers
Gary

- Original Message -
From: "Viral_Thakkar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:42 PM
Subject: RE: Refresh -submit relation


> Could you please provide some more details about this?
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 5:54 PM
> To: Struts Users Mailing List
> Subject: Re: Refresh -submit relation
>
>
> Hi
>
> You need to use the concept of saveTokens Which prevent yoyr form from
> getting submitted twice
>
> Cheers
> gary
>
> - Original Message -
> From: "Viral_Thakkar" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 5:17 PM
> Subject: Refresh -submit relation
>
>
> > I have a page for upload functionality which uploads the files to a
> > folder.
> >
> > Here I am referring the struts example for uploading of files and I am
> > inserting the record in table at the same time.
> >
> > This upload is working fine but problem is when I refresh the browser
> > page, the page is getting submitted again. Due to this duplicate
> records
> > are inserted in the database.
> >
> > Is there any way, to stop the page to submit on refresh?
> >
> >
> >
> >
> >
> > -
> > 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]
>


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



Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa

Got it.


This may be the reason. AS ypur actions are running on Tomcat Server and
when you declare the session variable it will be declared inthe memory of
Tomcat . When you forward the request to ASP (IIS server) there you cannot
access the server variables of TOmcat. This is due to the Security of Web
servers.





- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:56 PM
Subject: RE: Have to re open browser each time


> Both are using the SAME IIS server. ( ofcource jsp requests will be
> forwarded to be handled by tomcat)
>
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:12 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> hmm
> AMjad are the JSp and ASP part of the same application or they are using
> different we servers
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:42 PM
> Subject: RE: Have to re open browser each time
>
>
> > I see.
> >
> > I want to add one more thing,
> > After executing the login action, if the user is authenticated the
> user
> > is forwarded to an ASP page ( the main page is written uding ASP).
> >
> > Could this be the reason??? If yes, why is this happening?
> >
> >
> >
> > ( we have done integration between ASP and jsp coz we have modules
> > written in asp.)
> >
> >
> > anyhow, the application works greate with full functionality with no
> > problems except this one.
> >
> >
> >
> > Thank you very much for your presouce time.
> >
> > Regards,
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:02 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> > Amjad
> >
> > I have not faced such a problem as even we are handling the sessions
> in
> > the
> > same way as you are.
> > Which version of Tomcat you are using. Try to use it with 4.12
> > This may also be the reason
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:04 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Sessions are handled from Actions.
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 3:26 PM
> > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > Subject: Re: Have to re open browser each time
> > >
> > > Are you handling the sessions from Actions or from Views
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > > Mailing
> > > List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 5:33 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > > Also I have thrown a copy of it in many other places wher tomcat
> can
> > > see
> > > > it.
> > > >
> > > > But the problem still exist.
> > > >
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 09, 2003 2:36 PM
> > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > Subject: Re: Have to re open browser each time
> > > >
> > > > You need to put struts-legacy.jar in the lib of tomcat
> > > >
> > > > Try with it
> > > > - Original Message -
> > > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, December 09, 2003 4:34 PM
> > > > Subject: Have to re open browser each time
> > > >
> > > >
> > > > > I am facing this problem that I couldn't figure out the cause.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > We have an web based application  (built using struts 1.0).
> > > > >
> > > > >
> > > > >
> > > > > After login to the application for the first time, if you
> relogin
> > > > again
> > > > > OR the session times out

RE: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
Who said that I am trying to access session variables?


Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 4:28 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Have to re open browser each time


Got it.


This may be the reason. AS ypur actions are running on Tomcat Server and
when you declare the session variable it will be declared inthe memory
of
Tomcat . When you forward the request to ASP (IIS server) there you
cannot
access the server variables of TOmcat. This is due to the Security of
Web
servers.





- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:56 PM
Subject: RE: Have to re open browser each time


> Both are using the SAME IIS server. ( ofcource jsp requests will be
> forwarded to be handled by tomcat)
>
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:12 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> hmm
> AMjad are the JSp and ASP part of the same application or they are
using
> different we servers
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:42 PM
> Subject: RE: Have to re open browser each time
>
>
> > I see.
> >
> > I want to add one more thing,
> > After executing the login action, if the user is authenticated the
> user
> > is forwarded to an ASP page ( the main page is written uding ASP).
> >
> > Could this be the reason??? If yes, why is this happening?
> >
> >
> >
> > ( we have done integration between ASP and jsp coz we have modules
> > written in asp.)
> >
> >
> > anyhow, the application works greate with full functionality with no
> > problems except this one.
> >
> >
> >
> > Thank you very much for your presouce time.
> >
> > Regards,
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:02 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> > Amjad
> >
> > I have not faced such a problem as even we are handling the sessions
> in
> > the
> > same way as you are.
> > Which version of Tomcat you are using. Try to use it with 4.12
> > This may also be the reason
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:04 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Sessions are handled from Actions.
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 3:26 PM
> > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > Subject: Re: Have to re open browser each time
> > >
> > > Are you handling the sessions from Actions or from Views
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts
Users
> > > Mailing
> > > List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 5:33 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > > Also I have thrown a copy of it in many other places wher tomcat
> can
> > > see
> > > > it.
> > > >
> > > > But the problem still exist.
> > > >
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 09, 2003 2:36 PM
> > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > Subject: Re: Have to re open browser each time
> > > >
> > > > You need to put struts-legacy.jar in the lib of tomcat
> > > >
> > > > Try with it
> > > > - Original Message -
> > > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, December 09, 2003 4:34 PM
> > > > Subject: Have to re open browser each time
> > > >
> > > >
> > > > > I am facing this prob

RES: Have to re open browser each time

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
You should set a session for your user in both web servers (TOMCAT and
IIS)...

Anyway,

Why are you doing the login module using Java, and the rest of your
application using Java?
Why dont you just do everything using ASP? or Java?


-Mensagem original-
De: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 9 de dezembro de 2003 10:28
Para: Struts Users Mailing List; [EMAIL PROTECTED]
Assunto: Re: Have to re open browser each time



Got it.


This may be the reason. AS ypur actions are running on Tomcat Server and
when you declare the session variable it will be declared inthe memory of
Tomcat . When you forward the request to ASP (IIS server) there you cannot
access the server variables of TOmcat. This is due to the Security of Web
servers.





- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 6:56 PM
Subject: RE: Have to re open browser each time


> Both are using the SAME IIS server. ( ofcource jsp requests will be
> forwarded to be handled by tomcat)
>
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:12 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> hmm
> AMjad are the JSp and ASP part of the same application or they are using
> different we servers
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:42 PM
> Subject: RE: Have to re open browser each time
>
>
> > I see.
> >
> > I want to add one more thing,
> > After executing the login action, if the user is authenticated the
> user
> > is forwarded to an ASP page ( the main page is written uding ASP).
> >
> > Could this be the reason??? If yes, why is this happening?
> >
> >
> >
> > ( we have done integration between ASP and jsp coz we have modules
> > written in asp.)
> >
> >
> > anyhow, the application works greate with full functionality with no
> > problems except this one.
> >
> >
> >
> > Thank you very much for your presouce time.
> >
> > Regards,
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:02 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> > Amjad
> >
> > I have not faced such a problem as even we are handling the sessions
> in
> > the
> > same way as you are.
> > Which version of Tomcat you are using. Try to use it with 4.12
> > This may also be the reason
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:04 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Sessions are handled from Actions.
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 3:26 PM
> > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > Subject: Re: Have to re open browser each time
> > >
> > > Are you handling the sessions from Actions or from Views
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > > Mailing
> > > List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 5:33 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > > Also I have thrown a copy of it in many other places wher tomcat
> can
> > > see
> > > > it.
> > > >
> > > > But the problem still exist.
> > > >
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 09, 2003 2:36 PM
> > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > Subject: Re: Have to re open browser each time
> > > >
> > > > You need to put struts-legacy.jar in the lib of tomcat
> > > >
> > > > Try with it
> > > > - Original Message -
> > > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, December 09, 2003 4:34 PM
> > > > Subjec

Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
i am not able to get the problem.
Please explain me in breif when you are getting this type of error .
Are you getting it when you are coming back from ASP to the Action

Please exlapin it


- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 7:07 PM
Subject: RE: Have to re open browser each time


> Who said that I am trying to access session variables?
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:28 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
>
> Got it.
>
>
> This may be the reason. AS ypur actions are running on Tomcat Server and
> when you declare the session variable it will be declared inthe memory
> of
> Tomcat . When you forward the request to ASP (IIS server) there you
> cannot
> access the server variables of TOmcat. This is due to the Security of
> Web
> servers.
>
>
>
>
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:56 PM
> Subject: RE: Have to re open browser each time
>
>
> > Both are using the SAME IIS server. ( ofcource jsp requests will be
> > forwarded to be handled by tomcat)
> >
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:12 PM
> > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > Subject: Re: Have to re open browser each time
> >
> > hmm
> > AMjad are the JSp and ASP part of the same application or they are
> using
> > different we servers
> >
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > Mailing
> > List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:42 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > I see.
> > >
> > > I want to add one more thing,
> > > After executing the login action, if the user is authenticated the
> > user
> > > is forwarded to an ASP page ( the main page is written uding ASP).
> > >
> > > Could this be the reason??? If yes, why is this happening?
> > >
> > >
> > >
> > > ( we have done integration between ASP and jsp coz we have modules
> > > written in asp.)
> > >
> > >
> > > anyhow, the application works greate with full functionality with no
> > > problems except this one.
> > >
> > >
> > >
> > > Thank you very much for your presouce time.
> > >
> > > Regards,
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 4:02 PM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: Re: Have to re open browser each time
> > >
> > > Amjad
> > >
> > > I have not faced such a problem as even we are handling the sessions
> > in
> > > the
> > > same way as you are.
> > > Which version of Tomcat you are using. Try to use it with 4.12
> > > This may also be the reason
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 6:04 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > Sessions are handled from Actions.
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 09, 2003 3:26 PM
> > > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > > Subject: Re: Have to re open browser each time
> > > >
> > > > Are you handling the sessions from Actions or from Views
> > > > - Original Message -
> > > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts
> Users
> > > > Mailing
> > > > List'" <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, December 09, 2003 5:33 PM
> > > > Subject: RE: Have to re open browser each time
> > > >
> > > >
> > > > > I have tried and put " struts-legacy.jar" at WEB-INF\lib\
> > > > > Also I have thrown a copy of it in many other places wher tomcat
> > can
> > > > see
> > > > > it.
> > > > >
> > > > > But the problem still exist.
> > > > >
> > > > >
> > > > > Amjad Shahrour
> 

RE: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
Ok , lets consider the following use senario:


1. user opens the system login screen ( JSP ).

2. user submits login pair to an authentication Action. ( struts).

3. the authentication action authenticate the user from the back end, 
and set a cookie that contains the login info that we need to share it
with the ASP part. Then forward to the system main page ( ASP)

4. the main page (ASP) reads the cookie and get the needed information
then destroy the cookie immediately.


By now we have our user authenticaed on both ASP and JSP parts ( we have
two sessions)


5.  if the session times out, or explicitly invalidated or even still
alive [ not timed out] and the user tries to re login again ( starting
again from step1) that exception is thrown. And the only work around is
to close the browser and start again.












Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 4:44 PM
To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
Subject: Re: Have to re open browser each time

i am not able to get the problem.
Please explain me in breif when you are getting this type of error .
Are you getting it when you are coming back from ASP to the Action

Please exlapin it


- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 7:07 PM
Subject: RE: Have to re open browser each time


> Who said that I am trying to access session variables?
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:28 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
>
> Got it.
>
>
> This may be the reason. AS ypur actions are running on Tomcat Server
and
> when you declare the session variable it will be declared inthe memory
> of
> Tomcat . When you forward the request to ASP (IIS server) there you
> cannot
> access the server variables of TOmcat. This is due to the Security of
> Web
> servers.
>
>
>
>
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 6:56 PM
> Subject: RE: Have to re open browser each time
>
>
> > Both are using the SAME IIS server. ( ofcource jsp requests will be
> > forwarded to be handled by tomcat)
> >
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:12 PM
> > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > Subject: Re: Have to re open browser each time
> >
> > hmm
> > AMjad are the JSp and ASP part of the same application or they are
> using
> > different we servers
> >
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > Mailing
> > List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:42 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > I see.
> > >
> > > I want to add one more thing,
> > > After executing the login action, if the user is authenticated the
> > user
> > > is forwarded to an ASP page ( the main page is written uding ASP).
> > >
> > > Could this be the reason??? If yes, why is this happening?
> > >
> > >
> > >
> > > ( we have done integration between ASP and jsp coz we have modules
> > > written in asp.)
> > >
> > >
> > > anyhow, the application works greate with full functionality with
no
> > > problems except this one.
> > >
> > >
> > >
> > > Thank you very much for your presouce time.
> > >
> > > Regards,
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 4:02 PM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: Re: Have to re open browser each time
> > >
> > > Amjad
> > >
> > > I have not faced such a problem as even we are handling the
sessions
> > in
> > > the
> > > same way as you are.
> > > Which version of Tomcat you are using. Try to use it with 4.12
> > > This may also be the reason
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 6:04 PM
> > > Subject: RE: Have to re open browser each time
> > >
> >

Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
Accoring to me nothing going wrong in this process..
Amjad please give me few moments I want to test and run the same senario out
here on my end and will get back to you ASAP

- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 7:30 PM
Subject: RE: Have to re open browser each time


> Ok , lets consider the following use senario:
>
>
> 1. user opens the system login screen ( JSP ).
>
> 2. user submits login pair to an authentication Action. ( struts).
>
> 3. the authentication action authenticate the user from the back end,
> and set a cookie that contains the login info that we need to share it
> with the ASP part. Then forward to the system main page ( ASP)
>
> 4. the main page (ASP) reads the cookie and get the needed information
> then destroy the cookie immediately.
>
>
> By now we have our user authenticaed on both ASP and JSP parts ( we have
> two sessions)
>
>
> 5.  if the session times out, or explicitly invalidated or even still
> alive [ not timed out] and the user tries to re login again ( starting
> again from step1) that exception is thrown. And the only work around is
> to close the browser and start again.
>
>
>
>
>
>
>
>
>
>
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:44 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> i am not able to get the problem.
> Please explain me in breif when you are getting this type of error .
> Are you getting it when you are coming back from ASP to the Action
>
> Please exlapin it
>
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 7:07 PM
> Subject: RE: Have to re open browser each time
>
>
> > Who said that I am trying to access session variables?
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:28 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> >
> > Got it.
> >
> >
> > This may be the reason. AS ypur actions are running on Tomcat Server
> and
> > when you declare the session variable it will be declared inthe memory
> > of
> > Tomcat . When you forward the request to ASP (IIS server) there you
> > cannot
> > access the server variables of TOmcat. This is due to the Security of
> > Web
> > servers.
> >
> >
> >
> >
> >
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:56 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Both are using the SAME IIS server. ( ofcource jsp requests will be
> > > forwarded to be handled by tomcat)
> > >
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 4:12 PM
> > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > Subject: Re: Have to re open browser each time
> > >
> > > hmm
> > > AMjad are the JSp and ASP part of the same application or they are
> > using
> > > different we servers
> > >
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > > Mailing
> > > List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 6:42 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > I see.
> > > >
> > > > I want to add one more thing,
> > > > After executing the login action, if the user is authenticated the
> > > user
> > > > is forwarded to an ASP page ( the main page is written uding ASP).
> > > >
> > > > Could this be the reason??? If yes, why is this happening?
> > > >
> > > >
> > > >
> > > > ( we have done integration between ASP and jsp coz we have modules
> > > > written in asp.)
> > > >
> > > >
> > > > anyhow, the application works greate with full functionality with
> no
> > > > problems except this one.
> > > >
> > > >
> > > >
> > > > Thank you very much for your presouce time.
> > > >
> > > > Regards,
> > > >
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > 

RE: Have to re open browser each time

2003-12-09 Thread Amjad Shahrour
Thanks. But the problem has been solved.


And (as useual) there was a stupid reason for this.
( simply the login action is associated with an actionForm in the struts
config at the session scope, given that we are not using actionForm for
this action)


thnx


Amjad Shahrour
Application Developer
Tel: +966.2.653.3334 ext 213
[EMAIL PROTECTED]
www.labbaik.com
 
 
 

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 5:21 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Have to re open browser each time

Accoring to me nothing going wrong in this process..
Amjad please give me few moments I want to test and run the same senario
out
here on my end and will get back to you ASAP

- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
Mailing
List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 7:30 PM
Subject: RE: Have to re open browser each time


> Ok , lets consider the following use senario:
>
>
> 1. user opens the system login screen ( JSP ).
>
> 2. user submits login pair to an authentication Action. ( struts).
>
> 3. the authentication action authenticate the user from the back end,
> and set a cookie that contains the login info that we need to share it
> with the ASP part. Then forward to the system main page ( ASP)
>
> 4. the main page (ASP) reads the cookie and get the needed information
> then destroy the cookie immediately.
>
>
> By now we have our user authenticaed on both ASP and JSP parts ( we
have
> two sessions)
>
>
> 5.  if the session times out, or explicitly invalidated or even still
> alive [ not timed out] and the user tries to re login again ( starting
> again from step1) that exception is thrown. And the only work around
is
> to close the browser and start again.
>
>
>
>
>
>
>
>
>
>
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 4:44 PM
> To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> Subject: Re: Have to re open browser each time
>
> i am not able to get the problem.
> Please explain me in breif when you are getting this type of error .
> Are you getting it when you are coming back from ASP to the Action
>
> Please exlapin it
>
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 7:07 PM
> Subject: RE: Have to re open browser each time
>
>
> > Who said that I am trying to access session variables?
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:28 PM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Re: Have to re open browser each time
> >
> >
> > Got it.
> >
> >
> > This may be the reason. AS ypur actions are running on Tomcat Server
> and
> > when you declare the session variable it will be declared inthe
memory
> > of
> > Tomcat . When you forward the request to ASP (IIS server) there you
> > cannot
> > access the server variables of TOmcat. This is due to the Security
of
> > Web
> > servers.
> >
> >
> >
> >
> >
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 6:56 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Both are using the SAME IIS server. ( ofcource jsp requests will
be
> > > forwarded to be handled by tomcat)
> > >
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 4:12 PM
> > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > Subject: Re: Have to re open browser each time
> > >
> > > hmm
> > > AMjad are the JSp and ASP part of the same application or they are
> > using
> > > different we servers
> > >
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts
Users
> > > Mailing
> > > List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 6:42 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > I see.
> > > >
> > > > I want to add one more thing,
> > > > After executing the login action, if the user is authenticated
the
> > > user
> > > > is forwarded to an ASP page ( the main page is written uding
ASP).
> > > >
> > > > Could 

How to set action path from Action.

2003-12-09 Thread Antony Paul
Hi,
After user login based on the dept of user user has to forwarded to
pages in different directories. How to do it ?. There are 5 departments.
This directory and page to be used in other parts to identify the home page
and directory of user so at other times user can be redirected. Putting a
ForwardAction in struts-config.xml which accepts and checks a single
parameter(Home) is possible ? Or set the path of a global forward at
runtime. I am new to Struts. Other options are
1. Write another action class which takes this parameter and based on the
user dept got from session invoke corresponding ForwardAction. This action
is reached through a global forward.
2. Use modules. I dont know what is it. Is it possible to have same named
ForwardAction in different modules ?.

rgds
Antony Paul.

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



Re: Have to re open browser each time

2003-12-09 Thread Gurpreet Dhanoa
ohhh


ANyway that is great,but Amjad i dont know the purpose behing this but what
if someone has disabled the Cookies.

How will you track it

- Original Message -
From: "Amjad Shahrour" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 7:58 PM
Subject: RE: Have to re open browser each time


> Thanks. But the problem has been solved.
>
>
> And (as useual) there was a stupid reason for this.
> ( simply the login action is associated with an actionForm in the struts
> config at the session scope, given that we are not using actionForm for
> this action)
>
>
> thnx
>
>
> Amjad Shahrour
> Application Developer
> Tel: +966.2.653.3334 ext 213
> [EMAIL PROTECTED]
> www.labbaik.com
>
>
>
>
> -Original Message-
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 5:21 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Have to re open browser each time
>
> Accoring to me nothing going wrong in this process..
> Amjad please give me few moments I want to test and run the same senario
> out
> here on my end and will get back to you ASAP
>
> - Original Message -
> From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> Mailing
> List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 7:30 PM
> Subject: RE: Have to re open browser each time
>
>
> > Ok , lets consider the following use senario:
> >
> >
> > 1. user opens the system login screen ( JSP ).
> >
> > 2. user submits login pair to an authentication Action. ( struts).
> >
> > 3. the authentication action authenticate the user from the back end,
> > and set a cookie that contains the login info that we need to share it
> > with the ASP part. Then forward to the system main page ( ASP)
> >
> > 4. the main page (ASP) reads the cookie and get the needed information
> > then destroy the cookie immediately.
> >
> >
> > By now we have our user authenticaed on both ASP and JSP parts ( we
> have
> > two sessions)
> >
> >
> > 5.  if the session times out, or explicitly invalidated or even still
> > alive [ not timed out] and the user tries to re login again ( starting
> > again from step1) that exception is thrown. And the only work around
> is
> > to close the browser and start again.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Amjad Shahrour
> > Application Developer
> > Tel: +966.2.653.3334 ext 213
> > [EMAIL PROTECTED]
> > www.labbaik.com
> >
> >
> >
> >
> > -Original Message-
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 09, 2003 4:44 PM
> > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > Subject: Re: Have to re open browser each time
> >
> > i am not able to get the problem.
> > Please explain me in breif when you are getting this type of error .
> > Are you getting it when you are coming back from ASP to the Action
> >
> > Please exlapin it
> >
> >
> > - Original Message -
> > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > To: "'Gurpreet Dhanoa'" <[EMAIL PROTECTED]>; "'Struts Users
> > Mailing
> > List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 09, 2003 7:07 PM
> > Subject: RE: Have to re open browser each time
> >
> >
> > > Who said that I am trying to access session variables?
> > >
> > >
> > > Amjad Shahrour
> > > Application Developer
> > > Tel: +966.2.653.3334 ext 213
> > > [EMAIL PROTECTED]
> > > www.labbaik.com
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 09, 2003 4:28 PM
> > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > Subject: Re: Have to re open browser each time
> > >
> > >
> > > Got it.
> > >
> > >
> > > This may be the reason. AS ypur actions are running on Tomcat Server
> > and
> > > when you declare the session variable it will be declared inthe
> memory
> > > of
> > > Tomcat . When you forward the request to ASP (IIS server) there you
> > > cannot
> > > access the server variables of TOmcat. This is due to the Security
> of
> > > Web
> > > servers.
> > >
> > >
> > >
> > >
> > >
> > > - Original Message -
> > > From: "Amjad Shahrour" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 09, 2003 6:56 PM
> > > Subject: RE: Have to re open browser each time
> > >
> > >
> > > > Both are using the SAME IIS server. ( ofcource jsp requests will
> be
> > > > forwarded to be handled by tomcat)
> > > >
> > > >
> > > >
> > > > Amjad Shahrour
> > > > Application Developer
> > > > Tel: +966.2.653.3334 ext 213
> > > > [EMAIL PROTECTED]
> > > > www.labbaik.com
> > > >
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 09, 2003 4:12 PM
> > > > To: [EMAIL PROTECTED]; 'Struts Users Mailing List'
> > > > Subject: Re: Have to re open browser each time

Re: How to set action path from Action.

2003-12-09 Thread Ashish Kulkarni
Hi
have you tried using DispatchAction, may be it can
help you, i use to forward action to different jsp
depending on what button on clicked by the user.

Ashish
--- Antony Paul <[EMAIL PROTECTED]> wrote:
> Hi,
> After user login based on the dept of user user
> has to forwarded to
> pages in different directories. How to do it ?.
> There are 5 departments.
> This directory and page to be used in other parts to
> identify the home page
> and directory of user so at other times user can be
> redirected. Putting a
> ForwardAction in struts-config.xml which accepts and
> checks a single
> parameter(Home) is possible ? Or set the path of a
> global forward at
> runtime. I am new to Struts. Other options are
> 1. Write another action class which takes this
> parameter and based on the
> user dept got from session invoke corresponding
> ForwardAction. This action
> is reached through a global forward.
> 2. Use modules. I dont know what is it. Is it
> possible to have same named
> ForwardAction in different modules ?.
> 
> rgds
> Antony Paul.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=
A$HI$H

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Struts & Slide?

2003-12-09 Thread John . Pitchko


BDY.RTF
Description: RTF file
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Struts and XSLT

2003-12-09 Thread Peng, Meimin
Manish,
haha. I see. It looks simple enough now. :) Thanks. 
--Zoe

-Original Message-
From: Manish Singla [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 6:04 PM
To: Struts Users Mailing List
Subject: Re: Struts and XSLT


 > how can I load different resource bundles(if I have many message 
resources)
 > from struts in stylesheet?

Using XSLT makes no difference. You may use same struts custom tags in 
XSLT as you may use without XSLT. It works in our implementation.

Manish Singla



Peng, Meimin wrote:
> Hi,
> I got a question with working structs and xslt together. 
> If I have a xml document which needs a stylesheet(xslt) to transform into
> different format,
> how can I load different resource bundles(if I have many message
resources)
> from struts in stylesheet? 
> if someone knows how to implement the view level in struts, please help.
> Thanks.
> --Zoe
> 
> CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
> confidential.  Any use, copying or dissemination of any portion of this
> e-mail by or to anyone other than the intended recipient(s) is
unauthorized.
> If you have received this e-mail in error, please reply to sender and
delete
> it from your system immediately.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Thanks
Manish Singla
x73166


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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



Property Declaration Annoyances

2003-12-09 Thread Joe Hertz
As of JSP 1.1 (and apparently 1.2 as I'm experiencing this with Tomcat
4.x) the following does not work:



One has to declare the entire String and implement it like this:



Anyone know if this has changed since 1.2? Is there a better approach?
Can EL help me get around this more gracefully?

-Joe



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



Re: Multiple ApplicationResources.properties files

2003-12-09 Thread Clark Kent
Many Thanks Manish

Manish Singla <[EMAIL PROTECTED]> wrote:There can be only one default 
message-resources.
Second message-resources should have "key" attribute.
You have to use this "key" attribute in jsp custom tags or... to locate 
second message-resources..

HTH
Manish Singla

Clark Kent wrote:
> All,
> 
> I am trying to have 2 ApplicationResources.properties file each dealing with 
> different sub-applications. I have created the 2 separate resource bundles along 
> with different entries into the struts-config.xml as follows : 
> 
> 
> 
> 
> 
> It seems to work fine for subapplication 2 but seems like the key-value pairs cannot 
> be accessed in subapplication 1. Am I missing something? 
> 
> Thanks,
> 
> CK
> 
> 
> 
> 
> 
> 
> 
> -
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing


-- 
Thanks
Manish Singla
x73166


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



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: Property Declaration Annoyances

2003-12-09 Thread Ben Anderson




From: "Joe Hertz" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: Property Declaration Annoyances
Date: Tue, 9 Dec 2003 10:43:22 -0500
As of JSP 1.1 (and apparently 1.2 as I'm experiencing this with Tomcat
4.x) the following does not work:


One has to declare the entire String and implement it like this:



Anyone know if this has changed since 1.2? Is there a better approach?
Can EL help me get around this more gracefully?
-Joe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Our best dial-up offer is back.  Get MSN Dial-up Internet Service for 6 
months @ $9.95/month now! http://join.msn.com/?page=dept/dialup

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


Re: How to set action path from Action.

2003-12-09 Thread Ted Husted
The different entry points should each be represented by their own 
ActionForwards. The Action class decides to forward the user to 
"science" or "biology". The ActionForward supplies the page and directory.

Generally, it is helpful to think of the ActionForwards as boxes on a 
flowchart. The Action class encapsulates the logic that decides it is 
time to forward to this box or that box. The directory and pages are 
implmentation details. The focal point is the *logical* names of the 
ActionForward, not the paths they encapsulate.

HTH, Ted.

Antony Paul wrote:
Hi,
After user login based on the dept of user user has to forwarded to
pages in different directories. How to do it ?. There are 5 departments.
This directory and page to be used in other parts to identify the home page
and directory of user so at other times user can be redirected. Putting a
ForwardAction in struts-config.xml which accepts and checks a single
parameter(Home) is possible ? Or set the path of a global forward at
runtime. I am new to Struts. Other options are
1. Write another action class which takes this parameter and based on the
user dept got from session invoke corresponding ForwardAction. This action
is reached through a global forward.
2. Use modules. I dont know what is it. Is it possible to have same named
ForwardAction in different modules ?.
rgds
Antony Paul.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


[OT] - Login Application

2003-12-09 Thread Jonathan Hawkins
Howdy All,
I am writing a custom login application.
Our organization has several web applications (Struts of course!)
one of which is a shopping cart.
The current login application adds two cookies to the users browser - 
one that stores a number representing a price index and the other an id.
(Meaning different users pay different amounts for products depending 
on their level of membership).

The issue:
I am adding a 30 day persistence feature to the login if the user 
selects a check box at login time.
It is possible that a users price index will change within a 30 day 
period due to advancement in their membership.

Should the shopping cart (or any other app that needs to calculate 
price) be responsible for getting the price index vs. the login getting 
it?

Has anyone had a similar situation and if so, how did you solve it?

Thanks in advance,
Jonathan Hawkins
Web Programmer
American College of Chest Physicians
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RES: Multiple ApplicationResources.properties files

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
Can you copy and paste the solution for your question?


-Mensagem original-
De: Clark Kent [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 9 de dezembro de 2003 12:40
Para: Struts Users Mailing List; [EMAIL PROTECTED]
Assunto: Re: Multiple ApplicationResources.properties files


Many Thanks Manish

Manish Singla <[EMAIL PROTECTED]> wrote:There can be only one default
message-resources.
Second message-resources should have "key" attribute.
You have to use this "key" attribute in jsp custom tags or... to locate 
second message-resources..

HTH
Manish Singla

Clark Kent wrote:
> All,
> 
> I am trying to have 2 ApplicationResources.properties file each dealing
with different sub-applications. I have created the 2 separate resource
bundles along with different entries into the struts-config.xml as follows :

> 
> 
> 
> 
> 
> It seems to work fine for subapplication 2 but seems like the key-value
pairs cannot be accessed in subapplication 1. Am I missing something? 
> 
> Thanks,
> 
> CK
> 
> 
> 
> 
> 
> 
> 
> -
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing


-- 
Thanks
Manish Singla
x73166


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



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



Tomcat 5

2003-12-09 Thread [EMAIL PROTECTED]
Hi friends,

Anybody using Tomcat 5?

Everything allright with it? Specially when using it with struts.


Paulo

RE: Tomcat 5

2003-12-09 Thread Hookom, Jacob
No problems here.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 11:26 AM
To: Struts Users Mailing List
Subject: Tomcat 5

Hi friends,

Anybody using Tomcat 5?

Everything allright with it? Specially when using it with struts.


Paulo

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



Re: Multiple Config files

2003-12-09 Thread Marino A. Jonsson
be aware, if you go down this road, that if you specify a tiles-plugin in
both configs - only the plugin in the first config will be initialized.

cheers,
Marinó

"vasudevrao gupta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Yes ..u can have multiple config files in your application for each
> module ..
> you need to define them in web.xml file where you give the
> initialization paramter for "config" of your action servlet
> seperated by comma.
>  
>   config
>
> /WEB-INF/struts-config1.xml,/WEB-INF/struts-config2.xml ram-value>
> 
>
> Cheers
> gupta
>
> -Original Message-
> From: Tiago Henrique Costa Rodrigues Alves
> [mailto:[EMAIL PROTECTED]
> Sent: 09 December 2003 18:18
> To: Struts Users Mailing List (E-mail)
> Subject: Multiple Config files
>
>
> Hi,
>
> I am working in a project with many developers,
> sometimes the developers need to change the struts-config.xml file at
> the
> same time (one developer needs to add a action-form and other developer
> needs to add a form-bean or even make some changes...)
>
> How can I add multiple config file support for struts??
> OFF-TOPIC : Does anyone know a cvs mailing list ?
>
> Thanks,
> Tiago Henrique C. R. Alves
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.




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



RE: Tomcat 5

2003-12-09 Thread List Mailbox
5.0.16 now and all the betas before with no issue.

Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 12:26 PM
To: Struts Users Mailing List
Subject: Tomcat 5

Hi friends,

Anybody using Tomcat 5?

Everything allright with it? Specially when using it with struts.


Paulo



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



Re: Multiple Config files

2003-12-09 Thread Adolfo Miguelez
Interesting apart from the Tiles-Plugin issue, is there any issue more 
to take in mind?

AFAIK, this is as configuring subapplications, i.e. files for a 
subapplication are found under a subdirectory, is this true?.. Or they 
just hang from the same documents root for any struts-config.xml file.

TIA,

Adolfo.




From: "Marino A. Jonsson" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Multiple Config files
Date: Tue, 9 Dec 2003 17:29:16 -
be aware, if you go down this road, that if you specify a tiles-plugin in
both configs - only the plugin in the first config will be initialized.
cheers,
Marinó
"vasudevrao gupta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Yes ..u can have multiple config files in your application for each
> module ..
> you need to define them in web.xml file where you give the
> initialization paramter for "config" of your action servlet
> seperated by comma.
>  
>   config
>
> /WEB-INF/struts-config1.xml,/WEB-INF/struts-config2.xml
> ram-value>
> 
>
> Cheers
> gupta
>
> -Original Message-
> From: Tiago Henrique Costa Rodrigues Alves
> [mailto:[EMAIL PROTECTED]
> Sent: 09 December 2003 18:18
> To: Struts Users Mailing List (E-mail)
> Subject: Multiple Config files
>
>
> Hi,
>
> I am working in a project with many developers,
> sometimes the developers need to change the struts-config.xml file at
> the
> same time (one developer needs to add a action-form and other developer
> needs to add a form-bean or even make some changes...)
>
> How can I add multiple config file support for struts??
> OFF-TOPIC : Does anyone know a cvs mailing list ?
>
> Thanks,
> Tiago Henrique C. R. Alves
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential 
or
privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

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


Re: [OT] - Login Application

2003-12-09 Thread Martin Gainty
Jonathan-
The peristence or even existence of any data entity can be ascertained from
the DB schema
what constraints have you placed on the creation of the Price Index?
what relationship does the Price Index have to the username/password ?
If the Price Index is constrained (or dependent on ) the existence of a
username/password then yes tie the PriceIndex into the Login
If the Price Index is not dependent on username/password then the PriceIndex
information cookies et al) should exist indepedently..
~my 2 cents~
-Martin
- Original Message - 
From: "Jonathan Hawkins" <[EMAIL PROTECTED]>
To: "Struts List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 2:18 PM
Subject: [OT] - Login Application


> Howdy All,
> I am writing a custom login application.
> Our organization has several web applications (Struts of course!)
> one of which is a shopping cart.
>
>
> The current login application adds two cookies to the users browser -
> one that stores a number representing a price index and the other an id.
> (Meaning different users pay different amounts for products depending
> on their level of membership).
>
> The issue:
> I am adding a 30 day persistence feature to the login if the user
> selects a check box at login time.
> It is possible that a users price index will change within a 30 day
> period due to advancement in their membership.
>
> Should the shopping cart (or any other app that needs to calculate
> price) be responsible for getting the price index vs. the login getting
> it?
>
> Has anyone had a similar situation and if so, how did you solve it?
>
>
> Thanks in advance,
> Jonathan Hawkins
> Web Programmer
> American College of Chest Physicians
>
>
> -
> 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: Have your Book: UserInRole question

2003-12-09 Thread Ted Husted
You said it. The database returns the user's various roles ... to the 
container, which also supplies the request from whence isUserInRole comes.

HTH, Ted.

Dave Yutzy wrote:

I’ve been wracking the web to try and find out how to use the 
“request.isUserInRole()” functionality.

I understand how to setup the web.xml as well as the  tag in 
the struts config, but where would I actually “assign” the value of 
the user’s role?

So, if I have a custom login page and I auth. against a DB that 
returns the user’s various roles, how to I get those values into 
“” so that they can be read by the request.isUserInRole() call?

Anything you can do to point me in the right direction is greatly 
appreciated!




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


Re: Tiles, fixed height, scrollbar

2003-12-09 Thread Christian Bollmeyer
Am Montag, 8. Dezember 2003 22:23 schrieb Oliver Wulff:

You can specify a minimum height for tables as well, but
AFAIK that's basically all you can do - specifying minimum 
dimensions. As soon as the contents doesn't fit, things
get stretched automatically. I don't know of any means
to forbid that, but I'm no HTML designer. One thing I
recall is that there are min-width and max-width
attributes in CSS 2.0 (look up SelfHTML for the
details), but none of the common browsers
support these anyway. Furthermore, the only
elements that may have scrollbars attached if
necessary are textarea and iframe. The latter
is what we use in situations like yours. 

HTH,
-- Chris

NB.: Considering the Java Studio Creator question:
well, I applied for the preview release, but it doesn't
fit my needs, as Sun told me in a politely set,
computer-generated reply without giving further
details. Just wonder why - I had specified that
we are less than 100 developers, with Java as
our main language, doing WebServices/EJB,
HTML clients plus the first option, i.e. everything
except Swing and that I'm a member of the 'staff'
(CEO, CTO, 'staff', should have warned me)
among whose tasks is evaluating development
tools. Well then, if Sun tells me it doesn't fit my
needs, I have no reason to disbelieve them, so
I won't bother about it anymore until the final
release is out.

> Do you have a small example?
> I tried it in this way  but it didn't work. Should
> a scrollbar be shown?
>
> I also tried the following  and the definition in
> the css file
> div.list {
> height: 100px;
> }
> But it doesn't work either.
>
> Oliver
>
> *
>*
>
> I use divs to create a tabbed interface, with a tile per tab for the
> content.  The divs can have a fixed height.
>
> --
> Voytek Jarnot
> Quantum materiae materietur marmota monax si marmota monax materiam
> possit materiari?
>
> > -Original Message-
> > From: Oliver Wulff [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, November 25, 2003 9:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: Tiles, fixed height, scrollbar
> >
> >
> >
> >
> >
> >
> > Hi all
> >
> > Currently, I'm using frames to split my web page. Some frames have
> > a dynamic content with a scrollbar to scroll through the content of
> > the frame.
> >
> > Can I achieve the same with tiles? Can I fix the height of a
> > tile? If there
> > is more data to display will a scrollbar be shown?
> >
> > Regards
> > Oliver Wulff
>
> *** BITTE BEACHTEN ***
> Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
> möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
> Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
> genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
> irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
> Ausschluss jeder Reproduktion zu zerstören und die absendende Person
> umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
>
>
> -
> 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]



Error: Object expected

2003-12-09 Thread Ciaran Hanley
Hi, 
 
I'm trying to get use struts validator with my application. I am
currently working with a very simple example, only checking that the
required field has been filled but keep getting an "Error: Object
expected error" I think the error is on the "
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 

  


  
  
  

  
   




   
   
   
  

  

 
 
Any help?
Thanks in advance,
Ciaran


RE: Error: Object expected

2003-12-09 Thread Saul Q Yuan
Assuming it's not a typo, inside your onsubmit it should be return
validateClientForm(this).

Saul

-Original Message-
From: Ciaran Hanley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Error: Object expected


Hi, 
 
I'm trying to get use struts validator with my application. I am
currently working with a very simple example, only checking that the
required field has been filled but keep getting an "Error: Object
expected error" I think the error is on the "
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 

  


  
  
  

  
   




   
   
   
  

  

 
 
Any help?
Thanks in advance,
Ciaran


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



RE: Error: Object expected

2003-12-09 Thread Ciaran Hanley
Silly me!

You're right, thanks

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED] 
Sent: 09 December 2003 20:22
To: 'Struts Users Mailing List'
Subject: RE: Error: Object expected

Assuming it's not a typo, inside your onsubmit it should be return
validateClientForm(this).

Saul

-Original Message-
From: Ciaran Hanley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Error: Object expected


Hi, 
 
I'm trying to get use struts validator with my application. I am
currently working with a very simple example, only checking that the
required field has been filled but keep getting an "Error: Object
expected error" I think the error is on the "
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 

  


  
  
  

  
   




   
   
   
  

  

 
 
Any help?
Thanks in advance,
Ciaran


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



Nested Properties and No Bean Specified Exception

2003-12-09 Thread Marcus Peixoto
Hi, 

I'm trying to use Nested Properties in a Form but when I try to submit,
I get a "No Bean specified Exception".

I supose everything is well configured:

struts-config.xml
--- 
..
   
..

  
  
  
  
--

CadastroForm.jsp
-
...

...



.

The Form Bean has a propety "Endereco" which is another bean that has a
property "pais", so I can do a CadastroForm.getEndereco().getPais().
This is working fine in the "execute" method of the CadastroEdit Action
(before the form is rendered). 

I don't have any clue about what I'm doing wrong. I've spent a whole
week before bother you guys with this problem, but now I'm giving up.
Could you please help me ?






[OT] Struts meets Swing

2003-12-09 Thread Shane Mingins
Just found these  Someone may find them of interest (or not)  :-)

http://javaboutique.internet.com/tutorials/Swing/
 

http://javaboutique.internet.com/tutorials/Swing2/
 

Shane

Shane Mingins
Analyst Programmer
Assure NZ Ltd
Ph 644 494 2522




Re: Tiles, fixed height, scrollbar

2003-12-09 Thread Skip Morehead
If you put a div in your tile you can force the div to scroll with

Am Montag, 8. Dezember 2003 22:23 schrieb Oliver Wulff:

You can specify a minimum height for tables as well, but
AFAIK that's basically all you can do - specifying minimum 
dimensions. As soon as the contents doesn't fit, things
get stretched automatically. I don't know of any means
to forbid that, but I'm no HTML designer. One thing I
recall is that there are min-width and max-width
attributes in CSS 2.0 (look up SelfHTML for the
details), but none of the common browsers
support these anyway. Furthermore, the only
elements that may have scrollbars attached if
necessary are textarea and iframe. The latter
is what we use in situations like yours. 

HTH,
-- Chris
NB.: Considering the Java Studio Creator question:
well, I applied for the preview release, but it doesn't
fit my needs, as Sun told me in a politely set,
computer-generated reply without giving further
details. Just wonder why - I had specified that
we are less than 100 developers, with Java as
our main language, doing WebServices/EJB,
HTML clients plus the first option, i.e. everything
except Swing and that I'm a member of the 'staff'
(CEO, CTO, 'staff', should have warned me)
among whose tasks is evaluating development
tools. Well then, if Sun tells me it doesn't fit my
needs, I have no reason to disbelieve them, so
I won't bother about it anymore until the final
release is out.
 

Do you have a small example?
I tried it in this way  but it didn't work. Should
a scrollbar be shown?
I also tried the following  and the definition in
the css file
div.list {
height: 100px;
}
But it doesn't work either.
Oliver

*
*
I use divs to create a tabbed interface, with a tile per tab for the
content.  The divs can have a fixed height.
--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam
possit materiari?
   

-Original Message-
From: Oliver Wulff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 9:15 AM
To: [EMAIL PROTECTED]
Subject: Tiles, fixed height, scrollbar




Hi all

Currently, I'm using frames to split my web page. Some frames have
a dynamic content with a scrollbar to scroll through the content of
the frame.
Can I achieve the same with tiles? Can I fix the height of a
tile? If there
is more data to display will a scrollbar be shown?
Regards
Oliver Wulff
 

*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
-
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]
 

Regards,
Skip


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


RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
Hi, I think that we are in different time zones.

As you have mentioned, I, too, suspected that the
statement in my JSP:

request.getRemoteUser(); 

returns nothing.  Therefore, I did a test in my JSP. 
In addition to request.getRemoteUser(); I created
another String manually:


<% 
   String username = request.getRemoteUser(); 
   String userrole = "author"; 
%>   
<% out.println("The user name is: " + username +".");
%>
<% out.println("The role is: " + userrole +"."); %>


And the browser shows:

The user name is: Gloria Jen.  The role is: author. 

Gloria Jen is the name that I provided while logging
on and authenticated by the container.  Therefore, the
request.getRemoteUser(); does not return a null.  And
I hope that it means I am not passing a null value
when I use the hidden field technique.

Then, I pass two hidden fields (with value in them)
from my JSP to a Java class (FindEditorData.java),
which is of scaffold.ProcessAction type.  One of the
field is passed with its value correctly retrieved. 
The other field is passed with its value found to be
null.

What could go wrong?  I have been thinking about it
for days and so do those who try to help me.  



<% 
   String username = request.getRemoteUser(); 
   String userrole = "author"; 
%>   
<%out.println("The user name is: " + username +".");%>
<%out.println("The role is: " + userrole +".");%>


View Articles

 

-Caroline
--- "Yee, Richard K,,DMDCWEST"
<[EMAIL PROTECTED]> wrote:
> Caroline,
> Imposible? Look at the HTML that is generated by the
> JSP page. I think you
> will see that it returns "null".
> Take a look at the JavaDoc for
> HttpServletRequest.getRemoteUser();
> 
> getRemoteUser
> public java.lang.String getRemoteUser()
> Returns the login of the user making this request,
> if the user has been
> authenticated, or null if the user has not been
> authenticated. Whether the
> user name is sent with each subsequent request
> depends on the browser and
> type of authentication. Same as the value of the CGI
> variable REMOTE_USER.
> 
> Returns: a String specifying the login of the user
> making this request, or
> null 
> 
> As the JavaDoc says: "Whether the user name is sent
> with each subsequent
> request depends on the browser and type of
> authentication."  Are you using
> basic authentication or are you authenticating the
> user yourself?
> If you are doing it yourself (ie. through a db
> lookup) then the server
> doesn't know about the user being authenticated and
> will return null.
> 
> Regards,
> 
> Richard
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 08, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: RE: Please Help! Unable to Pass A Hidden
> Field To scaffold.Proces
> sAction
> 
> 
> I pass two hidden fields: username and keyName at
> the
> same time.  The keyName is passed and with the
> correct
> value in it.  The username is passed but its value
> turns out to be a null.
> 
> It is impossible for request.getRemoteUser(); in my
> JSP returning a null.  (see code below) Before it
> reaches request.getRemoteUser(); the user has
> already
> been successfully logged in with a valid name.
> 
> 
> 
> 
> 
> <% String username = request.getRemoteUser();%>
>  value="journal_category"/>
>  value="<%=username%>"/>
> View Articles
> 
> 
> 
> 
> --- "Yee, Richard K,,DMDCWEST"
> <[EMAIL PROTECTED]> wrote:
> > Caroline,
> > Are you having problems with the username or the
> > keyName hidden variable? If
> > it is the username, then I'd suspect that
> > request.getRemoteUser() in your
> > JSP is returning null.
> > 
> > Regards,
> > 
> > Richard
> > 
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 08, 2003 1:32 PM
> > To: Struts Users Mailing List
> > Subject: Re: Please Help! Unable to Pass A Hidden
> > Field To
> > scaffold.ProcessAction
> > 
> > 
> > I did not mess up lowercase and uppercase of the
> > hidden field I want to pass from my JSP to the
> scaffold.ProcessAction.  
> > If it had been the lowercase/uppercase problem, I
> would
> > have gotten a message
> > saying that the variable could not be recognized. 
> 
> > 
> > I pass two hidden fields at the same time.  One of
> > them is successfully passed with correct value. 
> The
> > other is passed but its value shows a 'null' in
> the 
> > scaffold.ProcessAction. What could go wrong?  Let
> me show my code 
> > again:
> > 
> > Two hidden fields: username and keyName are passed
> > from a JSP via a SUBMIT button:
> > 
> > 
> > 
> > <% String username = request.getRemoteUser();%>
> >  > value="journal_category"/>
> >  > value="<%=username%>"/>
> > View Articles
> > 
> > 
> > 
> > and an action mapping:
> > 
> >  > roles="editor"
> > path="/find/Category"
> >
> > type="org.apache.struts.scaffold.ProcessAction"
> >
> >
>
parameter="org.apache.artimus.article.FindEditorData"
> > name="articleForm"
> > scope="req

RE: Tiles setup question

2003-12-09 Thread Richard Hill
Tim, 
I tried what suggested, but still get the "The requested resource
(/myapp/myapp.index) is not available." error. 

Somethings missing...the Factory gets initialized from file
'/WEB-INF/tiles-defs.xml' but it looks like the strut-config can't find or
map to the tiles definitions. 

Any other suggestions? Do I need to specify a controller, or am I missing
something in my config files?

Thanks,
Richard

-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 5:42 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles setup question


The global forwards work for struts taglib tags, generally as the value
of the name="" attribute.  They do not export to the web server (servlet
mapping, *.jsp, etc.) level.  Thus, to access the forward you defined:

   
   
   

You would say:

[Return to main menu]

However, the target of path cannot be a tile, it must be an action which
forwards to the tile. [Is this true?  I have never seen a tile as a
global forward target]

Here is an example:

Your.jsp:
<%@ taglib uri="/tags/struts-html" prefix="html" %>
[return to main menu]

Your-struts-config.xml:




Your-tiles-def.xml:
  


Tim Lucia

> -Original Message-
> From: Richard Hill [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 08, 2003 7:59 PM
> To: '[EMAIL PROTECTED]'
> Subject: Tiles setup question
> 
> 
> I'm setting up tiles with an example application and I'm 
> getting blocked when trying to use Tiles layout names instead 
> of the JSP filenames in the struts-config.xml. I'm hoping 
> that someone on this list can point out what I'm doing wrong.
> 
> I can access the application by explicitly typing in 
> "index.jsp" in the url, but when I try a page with a link 
> defined in my struts-config.xml global-forwards name="index" 
> I get an error message: The requested resource
> (/myapp/myapp.index) is not available.
> 
> My tomcat localhost.log file show that the Tiles definition 
> factory gets loaded...what am I missing?
> 
> Thanks,
> Richard
>

---
localhost.log
---
action: Tiles definition factory loaded for processor ''.
factory loaded : {myapp.default={name=myapp.default,
path=/layouts/myappLayout.jsp, role=null, controller=null,
controllerType=null, controllerInstance=null,
attributes={header=/tiles/common/header.jsp,
footer=/tiles/common/footer.jsp}}
, myapp.index={name=myapp.index, path=/layouts/myappLayout.jsp, role=null,
controller=null, controllerType=null, controllerInstance=null,
attributes={body=/introduction.jsp, navbar=/tiles/tempNavBar.jsp,
title=Myapp > Index, footer=/tiles/common/footer.jsp,
header=/tiles/common/header.jsp}}
}
Factory initialized from file '/WEB-INF/tiles-defs.xml'.


--
html source with link
--
[Return to main menu]


--
  Error message when link is used
--
type Status report

message /myapp/myapp.index

description The requested resource (/myapp/myapp.index) is not available.

--
index.jsp
--
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>



--
tiles-defs.xml
--


 http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
struts-config.xml
--


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



  




  
  
  
  

  
  


  

  
  

  
  




  





web.xml



http://java.sun.com/dtd/web-app_2_3.dtd";>



  
  
  action
  org.apache.struts.action.ActionServlet
  
  config
  /WEB-INF/struts-config.xml
  
  
  definitions-config
  /WEB-INF/tiles-defs.xml
  
  
  debug
  3
  
  
  detail
  3
  
  2
  

  
  
  action
  *.do
  

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





-
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: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Richard Yee
Caroline,
In your FindEditorData.java class, is the value for
your username variable null or "null"?  If it is null,
then you are reading the wrong request parameter since
request.getParameter() will return null if the
parameter doesn't exist. If the String value is
"null", then you have a problem with getRemoteUser()
Why don't you dump request parameters that you are
getting in your FindEditorData?

Hidden input tags work fine. 

Regards,

Richard
--- Caroline Jen <[EMAIL PROTECTED]> wrote:
> Hi, I think that we are in different time zones.
> 
> As you have mentioned, I, too, suspected that the
> statement in my JSP:
> 
> request.getRemoteUser(); 
> 
> returns nothing.  Therefore, I did a test in my JSP.
> 
> In addition to request.getRemoteUser(); I created
> another String manually:
> 
> 
> <% 
>String username = request.getRemoteUser(); 
>String userrole = "author"; 
> %>   
> <% out.println("The user name is: " + username
> +".");
> %>
> <% out.println("The role is: " + userrole +"."); %>
> 
> 
> And the browser shows:
> 
> The user name is: Gloria Jen.  The role is: author. 
> 
> Gloria Jen is the name that I provided while logging
> on and authenticated by the container.  Therefore,
> the
> request.getRemoteUser(); does not return a null. 
> And
> I hope that it means I am not passing a null value
> when I use the hidden field technique.
> 
> Then, I pass two hidden fields (with value in them)
> from my JSP to a Java class (FindEditorData.java),
> which is of scaffold.ProcessAction type.  One of the
> field is passed with its value correctly retrieved. 
> The other field is passed with its value found to be
> null.
> 
> What could go wrong?  I have been thinking about it
> for days and so do those who try to help me.  
> 
> 
> 
> <% 
>String username = request.getRemoteUser(); 
>String userrole = "author"; 
> %>   
> <%out.println("The user name is: " + username
> +".");%>
> <%out.println("The role is: " + userrole +".");%>
>  value="journal_category"/>
>  value="<%=username%>"/>
> View Articles
> 
>  
> 
> -Caroline
> --- "Yee, Richard K,,DMDCWEST"
> <[EMAIL PROTECTED]> wrote:
> > Caroline,
> > Imposible? Look at the HTML that is generated by
> the
> > JSP page. I think you
> > will see that it returns "null".
> > Take a look at the JavaDoc for
> > HttpServletRequest.getRemoteUser();
> > 
> > getRemoteUser
> > public java.lang.String getRemoteUser()
> > Returns the login of the user making this request,
> > if the user has been
> > authenticated, or null if the user has not been
> > authenticated. Whether the
> > user name is sent with each subsequent request
> > depends on the browser and
> > type of authentication. Same as the value of the
> CGI
> > variable REMOTE_USER.
> > 
> > Returns: a String specifying the login of the user
> > making this request, or
> > null 
> > 
> > As the JavaDoc says: "Whether the user name is
> sent
> > with each subsequent
> > request depends on the browser and type of
> > authentication."  Are you using
> > basic authentication or are you authenticating the
> > user yourself?
> > If you are doing it yourself (ie. through a db
> > lookup) then the server
> > doesn't know about the user being authenticated
> and
> > will return null.
> > 
> > Regards,
> > 
> > Richard
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, December 08, 2003 2:56 PM
> > To: Struts Users Mailing List
> > Subject: RE: Please Help! Unable to Pass A Hidden
> > Field To scaffold.Proces
> > sAction
> > 
> > 
> > I pass two hidden fields: username and keyName at
> > the
> > same time.  The keyName is passed and with the
> > correct
> > value in it.  The username is passed but its value
> > turns out to be a null.
> > 
> > It is impossible for request.getRemoteUser(); in
> my
> > JSP returning a null.  (see code below) Before it
> > reaches request.getRemoteUser(); the user has
> > already
> > been successfully logged in with a valid name.
> > 
> > 
> > 
> > 
> > 
> > <% String username = request.getRemoteUser();%>
> >  > value="journal_category"/>
> >  > value="<%=username%>"/>
> > View Articles
> > 
> > 
> > 
> > 
> > --- "Yee, Richard K,,DMDCWEST"
> > <[EMAIL PROTECTED]> wrote:
> > > Caroline,
> > > Are you having problems with the username or the
> > > keyName hidden variable? If
> > > it is the username, then I'd suspect that
> > > request.getRemoteUser() in your
> > > JSP is returning null.
> > > 
> > > Regards,
> > > 
> > > Richard
> > > 
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, December 08, 2003 1:32 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Please Help! Unable to Pass A
> Hidden
> > > Field To
> > > scaffold.ProcessAction
> > > 
> > > 
> > > I did not mess up lowercase and uppercase of the
> > > hidden field I want to pass from my JSP to the
> > scaffold.ProcessAction.  
> > > If it had been the lowercase/uppercase problem,
> I
> > would
> > > have

[OT] Log4J and Pre-Processor

2003-12-09 Thread Tolle Krez
Sorry for an off-topic post. I hope I will get an answer since this is a very active
mailing list.

I am using Log4J for logging in my current project with too many logging statements.  I
wrap every logging statements with the  isDebugEnabled(), isWarnEnabled(), etc.  During
production , the logging level will be set to very minimum, and only critical errors 
will
be logged.  But however,  the boolean comparison statements (whether or not to log) 
will
be executed, which we feel will have a performance impact.

I would like to know if  it is a good idea to pre-process the java code to remove all 
the
logging statements and then create the binary?? or to begin with, limit the number of
logging statements during the development process itself?? If pre-processing the source
code to find and remove logging statements.. is a better option, then can some one 
point
me to a good java pre processor?

Thanks in Advance.




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



RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I do not fully understand what you say about null or
"null".  Anyway, I did try to write out values in the
FindEditorData.java.  What is written out in the
browser is:

name=null; kn=journal_category; kv=null

And the way I try to write out those crucial fields is
shown below:

// package and import statements omitted
public final class FindEditorData extends Bean
{
   public Object execute() throws Exception
   {

   // Obtain username 
   String username = getUsername();
  
   EditorService service = new EditorService();
   String value = service.findEditorData( username );

String property = getKeyName();

if (( null==property ) || ( null==value )) 
{
StringBuffer sb = new StringBuffer();
sb.append( "name=" );
sb.append( username );
sb.append( "; kn=" );
sb.append( property );
sb.append( "; kv=" );
sb.append( value );
throw new ParameterException(
sb.toString() );
}

ResultList list = new ResultListBase
(

Access.findByProperty( this,property,value
)

);
list.setLegend( property,value );

return new ProcessResultBase( list );

   } // end execute

} // End FindEditorData

--- Richard Yee <[EMAIL PROTECTED]> wrote:
> Caroline,
> In your FindEditorData.java class, is the value for
> your username variable null or "null"?  If it is
> null,
> then you are reading the wrong request parameter
> since
> request.getParameter() will return null if the
> parameter doesn't exist. If the String value is
> "null", then you have a problem with getRemoteUser()
> Why don't you dump request parameters that you are
> getting in your FindEditorData?
> 
> Hidden input tags work fine. 
> 
> Regards,
> 
> Richard
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > Hi, I think that we are in different time zones.
> > 
> > As you have mentioned, I, too, suspected that the
> > statement in my JSP:
> > 
> > request.getRemoteUser(); 
> > 
> > returns nothing.  Therefore, I did a test in my
> JSP.
> > 
> > In addition to request.getRemoteUser(); I created
> > another String manually:
> > 
> > 
> > <% 
> >String username = request.getRemoteUser(); 
> >String userrole = "author"; 
> > %>   
> > <% out.println("The user name is: " + username
> > +".");
> > %>
> > <% out.println("The role is: " + userrole +".");
> %>
> > 
> > 
> > And the browser shows:
> > 
> > The user name is: Gloria Jen.  The role is:
> author. 
> > 
> > Gloria Jen is the name that I provided while
> logging
> > on and authenticated by the container.  Therefore,
> > the
> > request.getRemoteUser(); does not return a null. 
> > And
> > I hope that it means I am not passing a null value
> > when I use the hidden field technique.
> > 
> > Then, I pass two hidden fields (with value in
> them)
> > from my JSP to a Java class (FindEditorData.java),
> > which is of scaffold.ProcessAction type.  One of
> the
> > field is passed with its value correctly
> retrieved. 
> > The other field is passed with its value found to
> be
> > null.
> > 
> > What could go wrong?  I have been thinking about
> it
> > for days and so do those who try to help me.  
> > 
> > 
> > 
> > <% 
> >String username = request.getRemoteUser(); 
> >String userrole = "author"; 
> > %>   
> > <%out.println("The user name is: " + username
> > +".");%>
> > <%out.println("The role is: " + userrole +".");%>
> >  > value="journal_category"/>
> >  > value="<%=username%>"/>
> > View Articles
> > 
> >  
> > 
> > -Caroline
> > --- "Yee, Richard K,,DMDCWEST"
> > <[EMAIL PROTECTED]> wrote:
> > > Caroline,
> > > Imposible? Look at the HTML that is generated by
> > the
> > > JSP page. I think you
> > > will see that it returns "null".
> > > Take a look at the JavaDoc for
> > > HttpServletRequest.getRemoteUser();
> > > 
> > > getRemoteUser
> > > public java.lang.String getRemoteUser()
> > > Returns the login of the user making this
> request,
> > > if the user has been
> > > authenticated, or null if the user has not been
> > > authenticated. Whether the
> > > user name is sent with each subsequent request
> > > depends on the browser and
> > > type of authentication. Same as the value of the
> > CGI
> > > variable REMOTE_USER.
> > > 
> > > Returns: a String specifying the login of the
> user
> > > making this request, or
> > > null 
> > > 
> > > As the JavaDoc says: "Whether the user name is
> > sent
> > > with each subsequent
> > > request depends on the browser and type of
> > > authentication."  Are you using
> > > basic authentication or are you authenticating
> the
> > > user yourself?
> > > If you are doing it yourself (ie. through a db
> > > lookup) then the server
> > > doesn't know about the user being authenticated
> > and
> > > will return null.
> > > 
> > > Regards,
> > > 
> > > Richard
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> 
> > > Sent: Monday, December 08,

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Richard Yee
Caroline,
As a sanity check, in your bean, initialize the
username variable to something ie. "XX". and
re-run your app. This will show if your setUsername is
ever called.

-Richard

--- Caroline Jen <[EMAIL PROTECTED]> wrote:
> I do not fully understand what you say about null or
> "null".  Anyway, I did try to write out values in
> the
> FindEditorData.java.  What is written out in the
> browser is:
> 
> name=null; kn=journal_category; kv=null
> 
> And the way I try to write out those crucial fields
> is
> shown below:
> 
> // package and import statements omitted
> public final class FindEditorData extends Bean
> {
>public Object execute() throws Exception
>{
> 
>// Obtain username 
>String username = getUsername();
>   
>EditorService service = new EditorService();
>String value = service.findEditorData( username
> );
> 
> String property = getKeyName();
> 
> if (( null==property ) || ( null==value )) 
> {
> StringBuffer sb = new StringBuffer();
> sb.append( "name=" );
> sb.append( username );
> sb.append( "; kn=" );
> sb.append( property );
> sb.append( "; kv=" );
> sb.append( value );
> throw new ParameterException(
> sb.toString() );
> }
> 
> ResultList list = new ResultListBase
> (
> 
> Access.findByProperty(
> this,property,value
> )
> 
> );
> list.setLegend( property,value );
> 
> return new ProcessResultBase( list );
> 
>} // end execute
> 
> } // End FindEditorData
> 
> --- Richard Yee <[EMAIL PROTECTED]> wrote:
> > Caroline,
> > In your FindEditorData.java class, is the value
> for
> > your username variable null or "null"?  If it is
> > null,
> > then you are reading the wrong request parameter
> > since
> > request.getParameter() will return null if the
> > parameter doesn't exist. If the String value is
> > "null", then you have a problem with
> getRemoteUser()
> > Why don't you dump request parameters that you are
> > getting in your FindEditorData?
> > 
> > Hidden input tags work fine. 
> > 
> > Regards,
> > 
> > Richard
> > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > > Hi, I think that we are in different time zones.
> > > 
> > > As you have mentioned, I, too, suspected that
> the
> > > statement in my JSP:
> > > 
> > > request.getRemoteUser(); 
> > > 
> > > returns nothing.  Therefore, I did a test in my
> > JSP.
> > > 
> > > In addition to request.getRemoteUser(); I
> created
> > > another String manually:
> > > 
> > > 
> > > <% 
> > >String username = request.getRemoteUser(); 
> > >String userrole = "author"; 
> > > %>   
> > > <% out.println("The user name is: " + username
> > > +".");
> > > %>
> > > <% out.println("The role is: " + userrole +".");
> > %>
> > > 
> > > 
> > > And the browser shows:
> > > 
> > > The user name is: Gloria Jen.  The role is:
> > author. 
> > > 
> > > Gloria Jen is the name that I provided while
> > logging
> > > on and authenticated by the container. 
> Therefore,
> > > the
> > > request.getRemoteUser(); does not return a null.
> 
> > > And
> > > I hope that it means I am not passing a null
> value
> > > when I use the hidden field technique.
> > > 
> > > Then, I pass two hidden fields (with value in
> > them)
> > > from my JSP to a Java class
> (FindEditorData.java),
> > > which is of scaffold.ProcessAction type.  One of
> > the
> > > field is passed with its value correctly
> > retrieved. 
> > > The other field is passed with its value found
> to
> > be
> > > null.
> > > 
> > > What could go wrong?  I have been thinking about
> > it
> > > for days and so do those who try to help me.  
> > > 
> > > 
> > > 
> > > <% 
> > >String username = request.getRemoteUser(); 
> > >String userrole = "author"; 
> > > %>   
> > > <%out.println("The user name is: " + username
> > > +".");%>
> > > <%out.println("The role is: " + userrole
> +".");%>
> > >  > > value="journal_category"/>
> > >  > > value="<%=username%>"/>
> > > View Articles
> > > 
> > >  
> > > 
> > > -Caroline
> > > --- "Yee, Richard K,,DMDCWEST"
> > > <[EMAIL PROTECTED]> wrote:
> > > > Caroline,
> > > > Imposible? Look at the HTML that is generated
> by
> > > the
> > > > JSP page. I think you
> > > > will see that it returns "null".
> > > > Take a look at the JavaDoc for
> > > > HttpServletRequest.getRemoteUser();
> > > > 
> > > > getRemoteUser
> > > > public java.lang.String getRemoteUser()
> > > > Returns the login of the user making this
> > request,
> > > > if the user has been
> > > > authenticated, or null if the user has not
> been
> > > > authenticated. Whether the
> > > > user name is sent with each subsequent request
> > > > depends on the browser and
> > > > type of authentication. Same as the value of
> the
> > > CGI
> > > > variable REMOTE_USER.
> > > > 
> > > > Returns: a String specifying the login of the
> > user
> > > > making this request, or
> > 

Re: [OT] Log4J and Pre-Processor

2003-12-09 Thread Ted Husted
You might first run some load tests to see if the boolean statements do 
have a non-negligable performance impact. It's easy to loose something 
like this in the rounding, and there may be better places to spend your 
optimization dollars. As scientists, we should should more than "feel", 
we should know.

Tolle Krez wrote:
Sorry for an off-topic post. I hope I will get an answer since this is a very active
mailing list.
I am using Log4J for logging in my current project with too many logging statements.  I
wrap every logging statements with the  isDebugEnabled(), isWarnEnabled(), etc.  During
production , the logging level will be set to very minimum, and only critical errors 
will
be logged.  But however,  the boolean comparison statements (whether or not to log) 
will
be executed, which we feel will have a performance impact.
I would like to know if  it is a good idea to pre-process the java code to remove all 
the
logging statements and then create the binary?? or to begin with, limit the number of
logging statements during the development process itself?? If pre-processing the source
code to find and remove logging statements.. is a better option, then can some one 
point
me to a good java pre processor?
Thanks in Advance.



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



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


Re: [OT] Log4J and Pre-Processor

2003-12-09 Thread Derek Clarkson
Of course having any extra statements in a program is going to cost in terms 
of CPU time. The questions is how much. I have seen simple removeal of code, 
as well as addition of code make massive differences to the time it costs to 
run something. I have also seem it make no visible difference as well. The 
trick is to run it both before and after the code changes so that you can 
measure how big a change it is. 

I would suggest do a run with the logging code in, and then one without. If 
the difference is not great, then leave the code in as you never know when 
you will need it. If there is a large difference then you have to decide how 
important it really is.

cio
Derek.

On Wednesday 10 December 2003 10:17, Tolle Krez wrote:
> Sorry for an off-topic post. I hope I will get an answer since this is a
> very active mailing list.
>
> I am using Log4J for logging in my current project with too many logging
> statements.  I wrap every logging statements with the  isDebugEnabled(),
> isWarnEnabled(), etc.  During production , the logging level will be set to
> very minimum, and only critical errors will be logged.  But however,  the
> boolean comparison statements (whether or not to log) will be executed,
> which we feel will have a performance impact.
>
> I would like to know if  it is a good idea to pre-process the java code to
> remove all the logging statements and then create the binary?? or to begin
> with, limit the number of logging statements during the development process
> itself?? If pre-processing the source code to find and remove logging
> statements.. is a better option, then can some one point me to a good java
> pre processor?
>
> Thanks in Advance.
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Regards,
Derek Clarkson

.O. Analyst/Programmer
..O Waterwerks Pty Ltd
OOO Melbourne, Australia


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



Re: [OT] Log4J and Pre-Processor

2003-12-09 Thread Kirk Wylie
Tolle Krez wrote:

I am using Log4J for logging in my current project with too many logging 
statements.  I
wrap every logging statements with the  isDebugEnabled(), 
isWarnEnabled(), etc.  During
production , the logging level will be set to very minimum, and only 
critical errors will
be logged.  But however,  the boolean comparison statements (whether or 
not to log) will
be executed, which we feel will have a performance impact.
You're probably wrong.

http://jakarta.apache.org/log4j/docs/index.html

Their benchmark is 5nanoseconds to do that method call to determine if a 
particular logging level is enabled. If you're THAT concerned about 5ns, 
your program probably has such hard performance requirements that you 
designed first around performance to begin with, no?

I would like to know if  it is a good idea to pre-process the java code 
to remove all the
logging statements and then create the binary?? or to begin with, limit 
the number of
logging statements during the development process itself?? If 
pre-processing the source
code to find and remove logging statements.. is a better option, then 
can some one point
me to a good java pre processor?
Don't bother. For this, you can rely on public static final boolean 
member variables.

Basically, if you compile with any type of optimization on, any call 
that is like this:
if(false) {
}
will be optimized away entirely (i.e. the bytecodes won't even appear in 
the .class file at all). That also flows through variables:
public class Debug {
	public static final boolean DEBUG_LEVEL = false;
}
public class Foobar {
	public void doStuff() {
		if(Debug.DEBUG_LEVEL) {
			// This can never happen and won't
			// be in the bytecodes.
		}
	}
}
So if you care THAT much about 5ns per call, do it this way (through 
compilation) and let the java compiler do the work for you. For this, 
even if you decide to pre-process, you don't have to pre-process.

But do you really care that much about 5ns? Are you SURE you care that 
much about 5ns?

Kirk Wylie
M7 Corporation
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I followed your advice.  In the Bean.java, I did the
following:

private String username = "natalie";
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}

and I compiled all the relevant classes, re-run the
application, the FindEditorData.java writes out the
following in the browser:

The process did not complete. Details should follow. 
name=natalie; kn=journal_category; kv=null 

Now, the question is why the Bean.java does not pick
up the value of the hidden field 'username' from my
JSP while successfully picks up the value of the other
hidden field 'keyName'.

There is some data processing activities going on in
the FindEditorData.java:

   String username = getUsername();
   EditorService service = new EditorService();
   String value = service.findEditorData( username );

The above data accessing codes had been tested outside
the environment of the application (the codes did what
I expected them to do without problem) before they
were integrated into the application.

-Caroline
--- Richard Yee <[EMAIL PROTECTED]> wrote:
> Caroline,
> As a sanity check, in your bean, initialize the
> username variable to something ie. "XX". and
> re-run your app. This will show if your setUsername
> is
> ever called.
> 
> -Richard
> 
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > I do not fully understand what you say about null
> or
> > "null".  Anyway, I did try to write out values in
> > the
> > FindEditorData.java.  What is written out in the
> > browser is:
> > 
> > name=null; kn=journal_category; kv=null
> > 
> > And the way I try to write out those crucial
> fields
> > is
> > shown below:
> > 
> > // package and import statements omitted
> > public final class FindEditorData extends Bean
> > {
> >public Object execute() throws Exception
> >{
> > 
> >// Obtain username 
> >String username = getUsername();
> >   
> >EditorService service = new EditorService();
> >String value = service.findEditorData( username
> > );
> > 
> > String property = getKeyName();
> > 
> > if (( null==property ) || ( null==value ))
> 
> > {
> > StringBuffer sb = new StringBuffer();
> > sb.append( "name=" );
> > sb.append( username );
> > sb.append( "; kn=" );
> > sb.append( property );
> > sb.append( "; kv=" );
> > sb.append( value );
> > throw new ParameterException(
> > sb.toString() );
> > }
> > 
> > ResultList list = new ResultListBase
> > (
> > 
> > Access.findByProperty(
> > this,property,value
> > )
> > 
> > );
> > list.setLegend( property,value );
> > 
> > return new ProcessResultBase( list );
> > 
> >} // end execute
> > 
> > } // End FindEditorData
> > 
> > --- Richard Yee <[EMAIL PROTECTED]> wrote:
> > > Caroline,
> > > In your FindEditorData.java class, is the value
> > for
> > > your username variable null or "null"?  If it is
> > > null,
> > > then you are reading the wrong request parameter
> > > since
> > > request.getParameter() will return null if the
> > > parameter doesn't exist. If the String value is
> > > "null", then you have a problem with
> > getRemoteUser()
> > > Why don't you dump request parameters that you
> are
> > > getting in your FindEditorData?
> > > 
> > > Hidden input tags work fine. 
> > > 
> > > Regards,
> > > 
> > > Richard
> > > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > > > Hi, I think that we are in different time
> zones.
> > > > 
> > > > As you have mentioned, I, too, suspected that
> > the
> > > > statement in my JSP:
> > > > 
> > > > request.getRemoteUser(); 
> > > > 
> > > > returns nothing.  Therefore, I did a test in
> my
> > > JSP.
> > > > 
> > > > In addition to request.getRemoteUser(); I
> > created
> > > > another String manually:
> > > > 
> > > > 
> > > > <% 
> > > >String username = request.getRemoteUser(); 
> > > >String userrole = "author"; 
> > > > %>   
> > > > <% out.println("The user name is: " + username
> > > > +".");
> > > > %>
> > > > <% out.println("The role is: " + userrole
> +".");
> > > %>
> > > > 
> > > > 
> > > > And the browser shows:
> > > > 
> > > > The user name is: Gloria Jen.  The role is:
> > > author. 
> > > > 
> > > > Gloria Jen is the name that I provided while
> > > logging
> > > > on and authenticated by the container. 
> > Therefore,
> > > > the
> > > > request.getRemoteUser(); does not return a
> null.
> > 
> > > > And
> > > > I hope that it means I am not passing a null
> > value
> > > > when I use the hidden field technique.
> > > > 
> > > > Then, I pass two hidden fields (with value in
> > > them)
> > > > from my JSP to a Java class
> > (FindEditorData.java),
> > > > which is of scaffold.ProcessAction type.  One
> of
> > > the
> > > > field is passed with its value correctly
> > > retrieved. 
> > > > The oth

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I did another test.  I took out those data access
activities in the FindEditorData.java and ran the
application.  The conclusion is that those few lines
of data access activities have nothing to do with the
value of the 'username' becoming null in the
FindEditorData.java.

-Caroline
--- Richard Yee <[EMAIL PROTECTED]> wrote:
> Caroline,
> As a sanity check, in your bean, initialize the
> username variable to something ie. "XX". and
> re-run your app. This will show if your setUsername
> is
> ever called.
> 
> -Richard
> 
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > I do not fully understand what you say about null
> or
> > "null".  Anyway, I did try to write out values in
> > the
> > FindEditorData.java.  What is written out in the
> > browser is:
> > 
> > name=null; kn=journal_category; kv=null
> > 
> > And the way I try to write out those crucial
> fields
> > is
> > shown below:
> > 
> > // package and import statements omitted
> > public final class FindEditorData extends Bean
> > {
> >public Object execute() throws Exception
> >{
> > 
> >// Obtain username 
> >String username = getUsername();
> >   
> >EditorService service = new EditorService();
> >String value = service.findEditorData( username
> > );
> > 
> > String property = getKeyName();
> > 
> > if (( null==property ) || ( null==value ))
> 
> > {
> > StringBuffer sb = new StringBuffer();
> > sb.append( "name=" );
> > sb.append( username );
> > sb.append( "; kn=" );
> > sb.append( property );
> > sb.append( "; kv=" );
> > sb.append( value );
> > throw new ParameterException(
> > sb.toString() );
> > }
> > 
> > ResultList list = new ResultListBase
> > (
> > 
> > Access.findByProperty(
> > this,property,value
> > )
> > 
> > );
> > list.setLegend( property,value );
> > 
> > return new ProcessResultBase( list );
> > 
> >} // end execute
> > 
> > } // End FindEditorData
> > 
> > --- Richard Yee <[EMAIL PROTECTED]> wrote:
> > > Caroline,
> > > In your FindEditorData.java class, is the value
> > for
> > > your username variable null or "null"?  If it is
> > > null,
> > > then you are reading the wrong request parameter
> > > since
> > > request.getParameter() will return null if the
> > > parameter doesn't exist. If the String value is
> > > "null", then you have a problem with
> > getRemoteUser()
> > > Why don't you dump request parameters that you
> are
> > > getting in your FindEditorData?
> > > 
> > > Hidden input tags work fine. 
> > > 
> > > Regards,
> > > 
> > > Richard
> > > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > > > Hi, I think that we are in different time
> zones.
> > > > 
> > > > As you have mentioned, I, too, suspected that
> > the
> > > > statement in my JSP:
> > > > 
> > > > request.getRemoteUser(); 
> > > > 
> > > > returns nothing.  Therefore, I did a test in
> my
> > > JSP.
> > > > 
> > > > In addition to request.getRemoteUser(); I
> > created
> > > > another String manually:
> > > > 
> > > > 
> > > > <% 
> > > >String username = request.getRemoteUser(); 
> > > >String userrole = "author"; 
> > > > %>   
> > > > <% out.println("The user name is: " + username
> > > > +".");
> > > > %>
> > > > <% out.println("The role is: " + userrole
> +".");
> > > %>
> > > > 
> > > > 
> > > > And the browser shows:
> > > > 
> > > > The user name is: Gloria Jen.  The role is:
> > > author. 
> > > > 
> > > > Gloria Jen is the name that I provided while
> > > logging
> > > > on and authenticated by the container. 
> > Therefore,
> > > > the
> > > > request.getRemoteUser(); does not return a
> null.
> > 
> > > > And
> > > > I hope that it means I am not passing a null
> > value
> > > > when I use the hidden field technique.
> > > > 
> > > > Then, I pass two hidden fields (with value in
> > > them)
> > > > from my JSP to a Java class
> > (FindEditorData.java),
> > > > which is of scaffold.ProcessAction type.  One
> of
> > > the
> > > > field is passed with its value correctly
> > > retrieved. 
> > > > The other field is passed with its value found
> > to
> > > be
> > > > null.
> > > > 
> > > > What could go wrong?  I have been thinking
> about
> > > it
> > > > for days and so do those who try to help me.  
> > > > 
> > > > 
> > > > 
> > > > <% 
> > > >String username = request.getRemoteUser(); 
> > > >String userrole = "author"; 
> > > > %>   
> > > > <%out.println("The user name is: " + username
> > > > +".");%>
> > > > <%out.println("The role is: " + userrole
> > +".");%>
> > > >  > > > value="journal_category"/>
> > > >  > > > value="<%=username%>"/>
> > > > View Articles
> > > > 
> > > >  
> > > > 
> > > > -Caroline
> > > > --- "Yee, Richard K,,DMDCWEST"
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Caroline,
> > > > > Imposible? Look at the HTML that is
> generated
> > by
> > > > the
> > > > > JSP page. 

RE: Tiles setup question

2003-12-09 Thread Tim Lucia
What does /myapp.index map to?  Typically, a global forward maps to
/someaction.do.  The action does its controller thing and forwards to a
tile (or other) for the view (or next action).

The example lines (Your-*) below were snipped from my working struts
webapp, so I'm pretty certain they work.

Tim Lucia


> -Original Message-
> From: Richard Hill [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 09, 2003 5:41 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Tiles setup question
> 
> 
> Tim, 
> I tried what suggested, but still get the "The requested resource
> (/myapp/myapp.index) is not available." error. 
> 
> Somethings missing...the Factory gets initialized from file 
> '/WEB-INF/tiles-defs.xml' but it looks like the strut-config 
> can't find or map to the tiles definitions. 
> 
> Any other suggestions? Do I need to specify a controller, or 
> am I missing something in my config files?
> 
> Thanks,
> Richard
> 
> -Original Message-
> From: Tim Lucia [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 5:42 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Tiles setup question
> 
> 
> The global forwards work for struts taglib tags, generally as 
> the value of the name="" attribute.  They do not export to 
> the web server (servlet mapping, *.jsp, etc.) level.  Thus, 
> to access the forward you defined:
> 
>
>
>
> 
> You would say:
> 
> [Return to main menu]
> 
> However, the target of path cannot be a tile, it must be an 
> action which forwards to the tile. [Is this true?  I have 
> never seen a tile as a global forward target]
> 
> Here is an example:
> 
> Your.jsp:
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> [return to main menu]
> 
> Your-struts-config.xml:
>   
>   
>  type="org.apache.struts.actions.ForwardAction"
>   parameter=".tileTest"/>
> 
> Your-tiles-def.xml:
>   
> 
> 
> Tim Lucia
> 
> > -Original Message-
> > From: Richard Hill [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 08, 2003 7:59 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Tiles setup question
> > 
> > 
> > I'm setting up tiles with an example application and I'm
> > getting blocked when trying to use Tiles layout names instead 
> > of the JSP filenames in the struts-config.xml. I'm hoping 
> > that someone on this list can point out what I'm doing wrong.
> > 
> > I can access the application by explicitly typing in
> > "index.jsp" in the url, but when I try a page with a link 
> > defined in my struts-config.xml global-forwards name="index" 
> > I get an error message: The requested resource
> > (/myapp/myapp.index) is not available.
> > 
> > My tomcat localhost.log file show that the Tiles definition
> > factory gets loaded...what am I missing?
> > 
> > Thanks,
> > Richard
> >
> 
> ---
> localhost.log
> ---
> action: Tiles definition factory loaded for processor ''. 
> factory loaded : {myapp.default={name=myapp.default,
> path=/layouts/myappLayout.jsp, role=null, controller=null, 
> controllerType=null, controllerInstance=null, 
> attributes={header=/tiles/common/header.jsp,
> footer=/tiles/common/footer.jsp}}
> , myapp.index={name=myapp.index, 
> path=/layouts/myappLayout.jsp, role=null, controller=null, 
> controllerType=null, controllerInstance=null, 
> attributes={body=/introduction.jsp, 
> navbar=/tiles/tempNavBar.jsp, title=Myapp > Index, 
> footer=/tiles/common/footer.jsp, 
> header=/tiles/common/header.jsp}} } Factory initialized from 
> file '/WEB-INF/tiles-defs.xml'.
> 
> 
> --
> html source with link
> --
> [Return to main menu]
> 
> 
> --
>   Error message when link is used
> --
> type Status report
> 
> message /myapp/myapp.index
> 
> description The requested resource (/myapp/myapp.index) is 
> not available.
> 
> --
> index.jsp
> --
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
> 
> 
> 
> --
> tiles-defs.xml
> --
> 
> 
>  "-//Apache Software Foundation//DTD Tiles Configuration//EN"
>"http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> struts-config.xml
> --
> 
> 
>"-//Apache Software Foundation//DTD Struts 
> Configuration 1.1//EN"
>   
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
> 
>   
> 
> 
> 
> 
>   
>   
>   
>   
> 
>   
>   
>  type="org.apache.struts.actions.ForwardAction"
>   parame

RE: [OT] Log4J and Pre-Processor

2003-12-09 Thread Tim Lucia
Would you rather have that 5ns, or the ace-in-the-hole where you can
debug your app in an installed production environment by turning on
(assuming you don't use the final static boolean method) the appropriate
logger?  This has been extremely helpful in debugging.  It also catches
lots of things you wouldn't ordinarily see, like when you add this to an
ActionListener more then once and you see your actionPerformed() get
called more then once.  It's also useful for profiling.

The biggest savings with if (logger.isDebugEnabled()) { } comes when the
logger generates lots of StringBuffer objects, costing memory and
garbage collection, which will significantly impact performance more
then the if () to check whether to do it or not.

Tim Lucia

> -Original Message-
> From: Kirk Wylie [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 09, 2003 7:20 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Log4J and Pre-Processor
>
> [snip]
> But do you really care that much about 5ns? Are you SURE you 
> care that 
> much about 5ns?
> 



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



Re: How to detect that session has expired ?

2003-12-09 Thread Curtis Taylor
HttpSessionListener is your friend...;-)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html

Kirk Wylie wrote:

Ashish Kulkarni wrote:

HI
if u are using servelt 2.3 , then u can use servelt
filter, in this filter u can have logic to check
session before each request so u dont need to add any
code in jsp or action class


If he's using Servlet 2.3, then he can also use the 
ServletContextListener in conjunction, where is where the logic for 
whether the session has been restarted could likely belong.

Kirk Wylie
M7 Corporation
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
c dot tee at verizon dot net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: getting the form name

2003-12-09 Thread Daniel Lipofsky

There are 2 ways, and I did both, just to be anal
and because I didn't know which was best.

  FormTag form = (FormTag) pageContext.
  getAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE);
  if (form == null)
  form = (FormTag) findAncestorWithClass(this, FormTag.class);
  if (form == null)
  throw new JspException("...");
  String formName = form.getBeanName();

- Dan

> -Original Message-
> From: Jarnot Kari Contr HQ SSG/STN [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 5:57 AM
> To: Struts Users Mailing List
> Subject: RE: getting the form name
> 
> 
> You could do this:
> FormTag htmlForm = (FormTag) TagSupport.findAncestorWithClass(this,
> FormTag.class);
> String actionFormName = htmlForm.getBeanName();
> 
> -Original Message-
> From: Arne Brutschy [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 08, 2003 7:42 AM
> To: Struts Users Mailing List
> Subject: getting the form name
> 
> 
> Hello,
> 
> I'm trying to subclass the TextTag.java. I need to get the form name 
> assiciated with this input field. How can I retrieve this? As I 
> understand it right, the form field gets the name of the form 
> from the 
> associated actionmapping. But how can I get the form tag, the 
> text tag 
> is nested in?
> 
> Regards,
> Arne
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: [OT] Log4J and Pre-Processor

2003-12-09 Thread Edgar P Dollin
The difference between scientists and engineers

The funny part is they are both right.  The hard part is deciding
which you are and living with the decision.

Edgar

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED] 

> You might first run some load tests to see if the boolean statements do 
> have a non-negligable performance impact. It's easy to loose something 
> like this in the rounding, and there may be better places to spend your 
> optimization dollars. As scientists, we should should more than "feel", 
> we should know.


> -Original Message-
> From: Kirk Wylie [mailto:[EMAIL PROTECTED] 

> So if you care THAT much about 5ns per call, do it this way (through 
> compilation) and let the java compiler do the work for you. For this, 
> even if you decide to pre-process, you don't have to pre-process.
> 
> But do you really care that much about 5ns? Are you SURE you 
> care that 
> much about 5ns?
> 
> Kirk Wylie
> M7 Corporation
> 

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



Passing Parameters from Action to JSP's

2003-12-09 Thread Samanth Athrey
Hello All,

I have a issue here. Any help would be of great help.

I have an action class - Action_A which forwards the request to A.jsp. 
A.jsp has 2 query parameters that are displayed correctly. The two 
parameters are stored in hidden variables within the form tag. Now, when 
this page is submitted, it calls Action_B which again forwards the 
request back to A.jsp. But this time, the query parameters are lost! Is 
there a way to send these two parameters from the Action class back to 
JSP? Is it legal to do something like this? Or is there a better way to 
achive this.?

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


RE: Error message display in the case of redirect = true

2003-12-09 Thread alok . garg


You are right even I knew that it was the same problem. But then in that
case if I make redirect = false and if the user refreshes the page then the
request is again submitted.
So, can you throw some light on how to stop the user from re submitting the
same URL.

Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


   

  "Navjot Singh"   

  <[EMAIL PROTECTED] To:  "Struts Users Mailing List" 
<[EMAIL PROTECTED]>   
  dia.net> cc:  (bcc: alok.garg/Polaris)   

   Subject: RE: Error message display in 
the case of redirect = true   
  12/09/03 06:02   

  PM   

  Please respond   

  to "Struts Users 

  Mailing List"

   

   





not sure but the logic says that error messages are being stored in the
REQUEST SCOPE and when you set redirect=true, naturally that's a new
request
so you won't get the errors set in earlier request.

anybody else?

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 09, 2003 5:53 PM
>To: Struts Users Mailing List
>Subject: Error message display in the case of redirect = true
>
>
>Hello all,
>I want to display the errors stack provided y Struts in the jsp page using
>the  tag. I am able to display it but the moment I add the
>redirect=true in the action mapping tag I am not able to see the error
>messages.
>
>Please help with it.
>
>Alok Garg
>Polaris Software Lab Ltd.
>( + 91 - 022 - 28290019 Ext. # 1308 )
>
>
>


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






This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

PlugIn Scheduler

2003-12-09 Thread Gurpreet Dhanoa
hi 

I have created the following plug-in and using it into my  application. The problem 
which I am facing is when I am running tomcat. The plug -in is not starting. The basic 
idea behind this plugin is to start a thread and peform some logic after some interval 
of time.

ANy suggestions will be of great help.

Following is the code for Plugin Class and the struts-config.xml


PlugTest.java
package efit;

import java.io.PrintStream;

import javax.servlet.ServletException;

import org.apache.struts.action.ActionServlet;

import org.apache.struts.action.PlugIn;

import org.apache.struts.config.ApplicationConfig;

public class PluginTest

implements PlugIn, Runnable

{

public PluginTest()

{

t = null;

}

public void init(ActionServlet servlet, ApplicationConfig applicationConfig)

throws ServletException

{

System.out.println("The Plugin is starting");

t = new Thread(this);

t.start();

}

public void destroy()

{

System.err.println("\u2212\u2212\u2212\u2212>The Plugin is 
stopping<\u2212\u2212\u2212\u2212");

}

public void run()

{

do

{

System.out.println("Plugin is Running");

try

{

Thread.sleep(1000L);

}

catch(Exception t)

{

System.out.println("Exception in Thread" + t.getMessage());

}

} while(true);

}

Thread t;

}





in the Struts-config.xml I m using the plugin usiong the following tag





Thanks

Gary



Re: Error message display in the case of redirect = true

2003-12-09 Thread Gurpreet Dhanoa
hi ALok

You can stop the resubmitting of form with the help of Tokens in struts

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 11:00 AM
Subject: RE: Error message display in the case of redirect = true


>
>
> You are right even I knew that it was the same problem. But then in that
> case if I make redirect = false and if the user refreshes the page then
the
> request is again submitted.
> So, can you throw some light on how to stop the user from re submitting
the
> same URL.
>
> Alok Garg
> Polaris Software Lab Ltd.
> ( + 91 - 022 - 28290019 Ext. # 1308 )
>
>
>
>   "Navjot Singh"
>   <[EMAIL PROTECTED] To:  "Struts Users
Mailing List" <[EMAIL PROTECTED]>
>   dia.net> cc:  (bcc:
alok.garg/Polaris)
>Subject: RE: Error message
display in the case of redirect = true
>   12/09/03 06:02
>   PM
>   Please respond
>   to "Struts Users
>   Mailing List"

>
>
>
>
>
>
> not sure but the logic says that error messages are being stored in the
> REQUEST SCOPE and when you set redirect=true, naturally that's a new
> request
> so you won't get the errors set in earlier request.
>
> anybody else?
>
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, December 09, 2003 5:53 PM
> >To: Struts Users Mailing List
> >Subject: Error message display in the case of redirect = true
> >
> >
> >Hello all,
> >I want to display the errors stack provided y Struts in the jsp page
using
> >the  tag. I am able to display it but the moment I add the
> >redirect=true in the action mapping tag I am not able to see the error
> >messages.
> >
> >Please help with it.
> >
> >Alok Garg
> >Polaris Software Lab Ltd.
> >( + 91 - 022 - 28290019 Ext. # 1308 )
> >
> >
> >
>
>
> -
> 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: Passing Parameters from Action to JSP's

2003-12-09 Thread hgosper
You should use an ActionForm to store parameters. Your hidden fields can 
get the value from the request like this:

<%-- hidden field (mode is one of "create", "edit", or "view") --%>


Of course there are other ways to do it but once you have more than your 
two params you won't want to be juggling them around on the request

Struts even puts the form on the request for you so you don't have to do 
it yourself.

Hope that helps







Samanth Athrey <[EMAIL PROTECTED]>
10/12/2003 04:11 PM
Please respond to "Struts Users Mailing List"

 
To: [EMAIL PROTECTED]
cc: 
Subject:Passing Parameters from Action to JSP's


Hello All,

I have a issue here. Any help would be of great help.

I have an action class - Action_A which forwards the request to A.jsp. 
A.jsp has 2 query parameters that are displayed correctly. The two 
parameters are stored in hidden variables within the form tag. Now, when 
this page is submitted, it calls Action_B which again forwards the 
request back to A.jsp. But this time, the query parameters are lost! Is 
there a way to send these two parameters from the Action class back to 
JSP? Is it legal to do something like this? Or is there a better way to 
achive this.?

Regards
Sam


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





Re: Passing Parameters from Action to JSP's

2003-12-09 Thread Gurpreet Dhanoa
hi Sam

IS your form associated with both of the Actions.
- Original Message - 
From: "Samanth Athrey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 10:41 AM
Subject: Passing Parameters from Action to JSP's


> Hello All,
> 
> I have a issue here. Any help would be of great help.
> 
> I have an action class - Action_A which forwards the request to A.jsp. 
> A.jsp has 2 query parameters that are displayed correctly. The two 
> parameters are stored in hidden variables within the form tag. Now, when 
> this page is submitted, it calls Action_B which again forwards the 
> request back to A.jsp. But this time, the query parameters are lost! Is 
> there a way to send these two parameters from the Action class back to 
> JSP? Is it legal to do something like this? Or is there a better way to 
> achive this.?
> 
> Regards
> Sam
> 
> 
> -
> 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]



upgrade from 1.0 to 1.1 seems to break GenericDataSource

2003-12-09 Thread Mort Coleman
call to super.init() seems to have NullPointerException and cannot get a connection.

Did anyone have this issue and know a work around?

package com.cmp.servlet;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import javax.servlet.ServletException;

import org.apache.struts.action.ActionServlet;

import org.apache.struts.util.GenericDataSource;

import com.cmp.db.IdentifyDatabase;

/**
 * Make sure to identify the default database in use upon 
 * starting/initializing this context.
 *
 * @version 27 February 2002
 */
 public class MowerPartsActionServlet extends ActionServlet{
 
   public void init()
   throws ServletException{
  super.init();
  DataSource dataSource = this.findDataSource(null);
  try{
 Connection conn = dataSource.getConnection();
 IdentifyDatabase.setDB(conn);
 conn.close();
 
 System.out.println("Database detected: " + IdentifyDatabase.getDB());
  } catch (SQLException e){
 this.log("Error getting DB connection.", e);
  }
   }
}

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



Re: Have your Book: UserInRole question

2003-12-09 Thread Max Cooper
You have only two choices for making request.isUserInRole() work:

1. Use container-managed security.

2. Use or create a Filter-based security system where you wrap the the
request objects in order to implement the isUserInRole() method. You can't
do this without writing a filter.

The SecurityFilter (http://www.securityfilter.org) project I run is an
example of #2. Here's a link to the source code for our
SecurityRequestWrapper class that implements the isUserInRole() method:
http://tinyurl.com/yile -- the implementation just delegates to the realm.

-Max

- Original Message - 
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 11:47 AM
Subject: Re: Have your Book: UserInRole question


> You said it. The database returns the user's various roles ... to the
> container, which also supplies the request from whence isUserInRole comes.
>
> HTH, Ted.
>
> Dave Yutzy wrote:
>
> > I’ve been wracking the web to try and find out how to use the
> > “request.isUserInRole()” functionality.
> >
> > I understand how to setup the web.xml as well as the  tag in
> > the struts config, but where would I actually “assign” the value of
> > the user’s role?
> >
> > So, if I have a custom login page and I auth. against a DB that
> > returns the user’s various roles, how to I get those values into
> > “” so that they can be read by the request.isUserInRole() call?
> >
> > Anything you can do to point me in the right direction is greatly
> > appreciated!
> >
> >
>
>
>
> -
> 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: PlugIn Scheduler

2003-12-09 Thread Gurpreet Dhanoa
hi ALl

It worked perfectly fine. Soon i will be posting the code for all of the
buddies so that they can use it into there application.


- Original Message -
From: "Gurpreet Dhanoa" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 11:24 AM
Subject: PlugIn Scheduler


hi

I have created the following plug-in and using it into my  application. The
problem which I am facing is when I am running tomcat. The plug -in is not
starting. The basic idea behind this plugin is to start a thread and peform
some logic after some interval of time.

ANy suggestions will be of great help.

Following is the code for Plugin Class and the struts-config.xml


PlugTest.java
package efit;

import java.io.PrintStream;

import javax.servlet.ServletException;

import org.apache.struts.action.ActionServlet;

import org.apache.struts.action.PlugIn;

import org.apache.struts.config.ApplicationConfig;

public class PluginTest

implements PlugIn, Runnable

{

public PluginTest()

{

t = null;

}

public void init(ActionServlet servlet, ApplicationConfig applicationConfig)

throws ServletException

{

System.out.println("The Plugin is starting");

t = new Thread(this);

t.start();

}

public void destroy()

{

System.err.println("\u2212\u2212\u2212\u2212>The Plugin is
stopping<\u2212\u2212\u2212\u2212");

}

public void run()

{

do

{

System.out.println("Plugin is Running");

try

{

Thread.sleep(1000L);

}

catch(Exception t)

{

System.out.println("Exception in Thread" + t.getMessage());

}

} while(true);

}

Thread t;

}





in the Struts-config.xml I m using the plugin usiong the following tag





Thanks

Gary


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



Log4J

2003-12-09 Thread Sathish Babu K R
hi all

i m getting this error...

java.lang.NoClassDefFoundError:
org/apache/log4j/Category
at
com.pronto.web.AccessSummaryReportForm.validate(Unknown
Source)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2106)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:602)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:308)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:484)


pls tell me y?

sathish


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



  1   2   >