Re: Unicode text in Property files

2003-12-03 Thread Debashish Chakrabarty
Thanks Jason,

Problem is My app server (WAS) uses JDK1.3.

The problems are many fold. If I can take up some more time of yours here
are the steps I envisage:
1. I will use struts for my translation API
2. An outside application servlet will send a request for translating an
English word into any Indian language, a servlet in my Transaltion API will
take this request search for the translated word from Hashtables (prepared
from Property files containing transaltion, beacuse we have no database) and
return the transtaed Unicode texst to the caller servlet. I am worried
whether this unicode text would be read properly by my application servlet
and whether it can sent back to caller servlet as response without any
distortion.
3. I will have various Property files containing transaltions of English
words say state_hi.properties that has hindi transaltions of Idnian state
names as following:
English_key = Hindi_transaltion_for_this_key
4. In above the key would be in english but the value would be some Unicode
text (in various Indican languages)
5. My application would use JDK1.3 so I would not be able to use the
native2ascii tool perhaps

Thanks,

Debashish Chakrabarty
http://www.jroller.com/page/debashish


- Original Message -
From: "Jason Lea" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 04, 2003 1:53 AM
Subject: Re: Unicode text in Property files


> You can create and edit the property files saving them in UTF-8.  Then
> you convert the UTF-8 into the format java expects eg \u using the
> native2ascii program that comes with Java.
>
> It will create a new file so the created files are what go into your
> application, leaving your source files in UTF-8.  I use an ANT task to
> do this for me automatically:
>
>  dest="${project.build.output}">
> 
> 
> 
>
> Here are the Java Docs for native2ascii:
> http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/native2ascii.html
>
> So this should work
> native2ascii -encoding UTF-8 file1.source file1.properties
>
>
> Debashish Chakrabarty wrote:
>
> >Hi,
> >
> >I have a query and request you to kindly spare some time to enlighten me.
> >
> >I am making a web application that would translate words from English to
various Indian languages using Struts. The application would not use any
database so I must use some flat file to store the translation in form of
English_word = Hindi_meaning (name value pair or some other form). There
would be 11 Indian languages apart from Hindi. Since Java Property files are
used in application localization I was of the opinion that they could easily
be used to store this data (for eg. a property file State.propeties might
store the names of Indian states in Hindi ex: Delhi= ??). The value is
written in Hindi unicode here, a Hindi Unicode font is available here for
free download.
> >
> >Important point is: My language data (the value for english keys) would
be in Unicode,  as above.  I understand that the default encoding of the
property file is not Unicode.  So while saving the property file I will have
to save it with UTF-8 encoding. Since struts heavily uses the Property files
for internationalization, will it be possible for me to use the files with
Unicode text in them.
> >
> >I request your advice on how to use the Property file in such a case (or
should I use the normal tab-separated text option as above, with the
file,being read using Java I/O API).
> >
> >Thanks,
> >Debashish Chakrabarty
> >http://www.jroller.com/page/debashish
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Jason Lea
>
>
>
>
> -
> 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: Positional problem?

2003-12-03 Thread Bjørn T Johansen
Does anyone have any examples? My javascript knowledge isn't where it
should be yet


BTJ

On Wed, 2003-12-03 at 14:49, John Smart wrote:
> We did something like that using an extra field (focus) to know where 
> you are and some javascript to place the focus at the right place when 
> the page is redisplayed.
> 
> Bjørn T Johansen wrote:
> 
> >I have a number of jsp pages that are longer than one page and if I am
> >at the bottom of a page and submit the page, I get back at the top of
> >the page. Is there a way to get back, after the submit, to the place you
> >were before the submit?
> >
> >
> >Regards,
> >
> >BTJ
> >
> >
> >-
> >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: Nested tags always break

2003-12-03 Thread Rick Mann
On Dec 3, 2003, at 21:05, [EMAIL PROTECTED] 
wrote:

Rick,

You still having this problem?... can I see the tag markup that's 
causing the
problems?...
I still am. I sent you the markup directly under separate cover.

If the root tag is picking up the name of a valid bean, and the 
iterate tag
has it's property attribute properly set, then I assure you that you 
don't
need the name attribute in the write tag.

I'm hoping that there's more to the iterate tag than just the Id. to 
get
"foo[i].bar" you'd need...


  
Heh. Not sure if you really love that or not ;-). What I meant to say 
is "I have a reproducible case", and "it happens on a regular basis (as 
I create new JSP code that uses the nested tags, sometimes they work 
and sometimes they don't)".

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


from sathish

2003-12-03 Thread Sathish Babu K R
hi david

when i used ur signature

i m not able to get session from ur request.thatz
creating probs.tell me any other sugg

regards
sathish

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



from sathish

2003-12-03 Thread Sathish Babu K R
hi david

i m using the same method signature for all action
classes.all files works fine except this.that is i m
using HttpServletRequest and HttpServletResponse in
all files but u have asked me to put ServletRequest
and ServletResponse.is it right?

sathish

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: from sathish

2003-12-03 Thread David Friedman
Sathish,

Your method signature seems incorrect.  According to the javadocs (v1.0),
perform (which is deprecated) requires the following argument types:

public ActionForward perform(ActionMapping mapping,
 ActionForm form,
 javax.servlet.ServletRequest request,
 javax.servlet.ServletResponse response)
  throws java.io.IOException,
 javax.servlet.ServletException

-David

-Original Message-
From: Sathish Babu K R [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 12:05 AM
To: [EMAIL PROTECTED]
Subject: from sathish


hi all

while access to the action class,i m getting the error
as

java.lang.NoSuchMethodError at
com.pronto.web.ModifyGWQueuesAction.perform(Unknown
Source) at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
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.j
ava:602)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patcher.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(ReleasableResourceP
ooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:479)

the action class is

package com.pronto.web ;

import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import javax.ejb.Handle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import
com.pronto.gateway.IPGConfigurationManagerRemote;
import com.pronto.gateway.PGQueueVO;
import com.pronto.util.Debug;

public final class ModifyGWQueuesAction extends Action
{

public ActionForward perform(ActionMapping
mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws IOException, ServletException {

HttpSession session = request.getSession();
ModifyGWQueuesForm theForm =
(ModifyGWQueuesForm)form;

long x=1,y=2,z=3;
String b1="N",b2="N",b3="N";
float abw1=1,abw2=1,abw3=1;
boolean msg=true;

String button=request.getParameter("Management");
Debug.print("ModifyGWQueuesAction : perform() --
Button Clicked: " + button);

if("Save".equals(button))
{
String queuename = theForm.getqueuename();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name1 : " + queuename);

String queuename1 = theForm.getqueuename1();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name2 : " + queuename1);

String queuename2 = theForm.getqueuename2();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name3 : " + queuename2);

String queuebandwidth =
theForm.getqueuebandwidth();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth1 : " + queuebandwidth);
abw1=(new Float(queuebandwidth)).floatValue();

String queuebandwidth1 =
theForm.getqueuebandwidth1();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth2 : " + queuebandwidth1);
abw2=(new Float(queuebandwidth1)).floatValue();

String queuebandwidth2 =
theForm.getqueuebandwidth2();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Band

from sathish

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

while access to the action class,i m getting the error
as 

java.lang.NoSuchMethodError at
com.pronto.web.ModifyGWQueuesAction.perform(Unknown
Source) at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
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:479) 

the action class is

package com.pronto.web ;

import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import javax.ejb.Handle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import
com.pronto.gateway.IPGConfigurationManagerRemote;
import com.pronto.gateway.PGQueueVO;
import com.pronto.util.Debug;

public final class ModifyGWQueuesAction extends Action
{

public ActionForward perform(ActionMapping
mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws IOException, ServletException {

HttpSession session = request.getSession();
ModifyGWQueuesForm theForm =
(ModifyGWQueuesForm)form;

long x=1,y=2,z=3;
String b1="N",b2="N",b3="N";
float abw1=1,abw2=1,abw3=1;
boolean msg=true;

String button=request.getParameter("Management");
Debug.print("ModifyGWQueuesAction : perform() --
Button Clicked: " + button);

if("Save".equals(button))
{
String queuename = theForm.getqueuename();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name1 : " + queuename);

String queuename1 = theForm.getqueuename1();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name2 : " + queuename1);

String queuename2 = theForm.getqueuename2();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Name3 : " + queuename2);

String queuebandwidth =
theForm.getqueuebandwidth();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth1 : " + queuebandwidth);
abw1=(new Float(queuebandwidth)).floatValue();

String queuebandwidth1 =
theForm.getqueuebandwidth1();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth2 : " + queuebandwidth1);
abw2=(new Float(queuebandwidth1)).floatValue();

String queuebandwidth2 =
theForm.getqueuebandwidth2();
Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth3 : " + queuebandwidth2);
abw3=(new Float(queuebandwidth2)).floatValue();

String queue = theForm.getqueue();
Debug.print("ModifyGWQueuesAction : perform() --
isolated 1 : " + queue);

String queue1 = theForm.getqueue1();
Debug.print("ModifyGWQueuesAction : perform() --
isolated 2 : " + queue1);

String queue2 = theForm.getqueue2();
Debug.print("ModifyGWQueuesAction : perform() -

Re: Nested tags always break

2003-12-03 Thread Arron Bates
Rick,

You still having this problem?... can I see the tag markup that's causing the
problems?...

If the root tag is picking up the name of a valid bean, and the iterate tag
has it's property attribute properly set, then I assure you that you don't
need the name attribute in the write tag.

I'm hoping that there's more to the iterate tag than just the Id. to get
"foo[i].bar" you'd need...


  
 I have a situation where I can use , 
> , and then *must* use  name="foo" property="bar">, rather than omitting the name attribute. 
> If I do, I get an exception "No getter method for property 
> foo[0].bar of bean ac".
> 
> Now, this code was working fine, but I made some changes to the bean 
> (I'm using torque). I know it's not (or at least, it shouldn't be) a 
> problem in the beans, becuase of the fact that it works fine if I 
> include the name attribute pointing to the id of the enclosing 
> iterate tag.
> 
> Also, why is it that I can get the struts-digest posting but can't 
> post to the struts list?
> 
> -- 
> Rick



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



RE: [OT] Re: Printing PDF Files in java

2003-12-03 Thread Andrew Hill
Have the server fax it to the logged in users fax number ;-)

-Original Message-
From: Prashanth.S [mailto:[EMAIL PROTECTED]
Sent: Thursday, 4 December 2003 11:45
To: Struts Users Mailing List
Subject: Re: [OT] Re: Printing PDF Files in java


Hi kirk,
Thanks for the replyActually i planned to use signed applets with RMI
for remote printing but since i couldnt able to accomplish printing the PDF
file even if u get the original file[through applets saving in local
machine] i couldnt go ahead...
Any ideas other than using JavaScript
Thanks
Prashanth

Kirk Wylie <[EMAIL PROTECTED]> wrote:
Prashanth.S wrote:

> Hi all,
> Is there any way in java tp print PDF files by getting stream out of PDF
> files and giving the same to printer
>
> I did lot of R&D on the above topic using javax.print package avilable
> in jdk1.4,third party libraries like PJX,itree and JFreeReport but
> nothing provided me the solution.My requirement is to print user
> selected files in his local printer.

The javax.print stuff is local to the JVM being executed. Assuming that
you're dealing with a server-side application (i.e. your question is
marginally relevant to the struts-user list), you can potentially
accomplish this using JavaScript.

But since essentially you'd have to (on the client using JavaScript):
1) Grab the file
2) Launch Acrobat Reader and instruct IT to print the file

This might be easier said than done.

But someone else might have experience with doing this using JavaScript.
The important thing I wanted to express is that you won't be able to do
it using Java raw because in a server-side application you don't
actually have any Java running on the client's machine: the java is
entirely executing on the server.

Kirk Wylie
M7 Corporation


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


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now


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



Re: [OT] Re: Printing PDF Files in java

2003-12-03 Thread Prashanth.S
Hi kirk,
Thanks for the replyActually i planned to use signed applets with RMI for remote 
printing but since i couldnt able to accomplish printing the PDF file even if u get 
the original file[through applets saving in local machine] i couldnt go ahead...
Any ideas other than using JavaScript
Thanks
Prashanth

Kirk Wylie <[EMAIL PROTECTED]> wrote:
Prashanth.S wrote:

> Hi all,
> Is there any way in java tp print PDF files by getting stream out of PDF 
> files and giving the same to printer
> 
> I did lot of R&D on the above topic using javax.print package avilable 
> in jdk1.4,third party libraries like PJX,itree and JFreeReport but 
> nothing provided me the solution.My requirement is to print user 
> selected files in his local printer.

The javax.print stuff is local to the JVM being executed. Assuming that 
you're dealing with a server-side application (i.e. your question is 
marginally relevant to the struts-user list), you can potentially 
accomplish this using JavaScript.

But since essentially you'd have to (on the client using JavaScript):
1) Grab the file
2) Launch Acrobat Reader and instruct IT to print the file

This might be easier said than done.

But someone else might have experience with doing this using JavaScript. 
The important thing I wanted to express is that you won't be able to do 
it using Java raw because in a server-side application you don't 
actually have any Java running on the client's machine: the java is 
entirely executing on the server.

Kirk Wylie
M7 Corporation


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


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

[OT] Re: Printing PDF Files in java

2003-12-03 Thread Kirk Wylie
Prashanth.S wrote:

Hi all,
Is there any way in java tp print PDF files by getting stream out of PDF 
files and giving the same to printer
 
I did lot of R&D on the above topic using javax.print package avilable 
in jdk1.4,third party libraries like PJX,itree and JFreeReport but 
nothing provided me the solution.My requirement is to print user 
selected files in his local printer.
The javax.print stuff is local to the JVM being executed. Assuming that 
you're dealing with a server-side application (i.e. your question is 
marginally relevant to the struts-user list), you can potentially 
accomplish this using JavaScript.

But since essentially you'd have to (on the client using JavaScript):
1) Grab the file
2) Launch Acrobat Reader and instruct IT to print the file
This might be easier said than done.

But someone else might have experience with doing this using JavaScript. 
The important thing I wanted to express is that you won't be able to do 
it using Java raw because in a server-side application you don't 
actually have any Java running on the client's machine: the java is 
entirely executing on the server.

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


Re: how to disabled submit button from action class

2003-12-03 Thread Max Cooper
The submit button exists on the client. The Action code executes on the
server. Action code cannot reach out and disable a submit button on the
client.

However, you can have the Action decide in advance that the page the browser
will render has its submit button disabled. Consider an ActionForm with a
"submitButtonDisabled" property. The Action could set it to true, and then
the JSP could render the button accordingly. When the browser renders the
plain old HTML produced when the server executes the JSP, it will render the
button as disabled.

If you want this to work more dynamically, perhaps disabling the button
after the user clicks it once, you will need to use something that executes
on the client. JavaScript, for instance. Tokens can also be used to handle
the "user double-clicked the submit button" problem. Struts has token
support built-in. Sometimes, a number of techniques (JavaScript and tokens)
need to be combined to produce the exact behavior desired (or as close as
you can get to it).

This general topic is discussed quite frequently on this list, so it might
be worth searching the mail archive.

-Max

- Original Message - 
From: "hari_s" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 5:26 PM
Subject: how to disabled submit button from action class


> Hi all.
> Is there a way to disabled submit button from action?
> Any examples will be considered.
> Thank you,
>



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



Re: how to disabled submit button from action class

2003-12-03 Thread Kevin Hagel
http://jakarta.apache.org/struts/userGuide/struts-html.html#submit

disabled="true"

or
disabled="${disabledSetting}"

something like that.

- Original Message - 
From: "hari_s" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 5:26 PM
Subject: how to disabled submit button from action class


> Hi all.
> Is there a way to disabled submit button from action? 
> Any examples will be considered.
> Thank you, 
> 

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



Printing PDF Files in java

2003-12-03 Thread Prashanth.S
Hi all,
Is there any way in java tp print PDF files by getting stream out of PDF files and 
giving the same to printer
 
I did lot of R&D on the above topic using javax.print package avilable in jdk1.4,third 
party libraries like PJX,itree and JFreeReport but nothing provided me the solution.My 
requirement is to print user selected files in his local printer.
 
Hope someone helps.
Thanks
Prashanth
 


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Deploying a struts application (WAR) under ColdFusionMX

2003-12-03 Thread Tim Lucia
Hello all,

I am looking to build an add-on web application to a legacy coldfusion
application.  I have got a prototype working under tomcat and now I want
to "deploy" it to the cf server.  It appears that I cannot simply load a
war file, nor can I unpack it under cfusionmx\wwwroot.  Both apps need
to be in the same application server so I can share session data (for
single sign-on, database resources, etc.)

Has anyone done this?  Are there any resources available?  The
MacroMedia web site suggests (which I also discovered on my own) that
you include the struts action servlet definition in the
cfusionmx\wwwroot\WEB-INF\web.xml file, but I am concerned about
install/uninstall-ability of this web app (there will eventually be as
many as 8 of them, and we want to add/remove/upgrade them at will).
Eventually, the legacy app may move away from cf in which case we can
easily use any app server that suits us.

The choices I think I have so far are:

1. Do what a reasonable container would do and manually "merge" the
add-on to the main (cf) application, adding the ActionServlet mapping to
the cf web.xml.
2. Drop cf as the web application server and use tomcat, moving the cf
servlet pieces into their own web.xml (putting the cf part in its own
context/web app).  This is effectively the reverse of #1.
3. Figure out a way to make cfusionmx accept the .war or some archive or
hierarchy like tomcat would.
4. Figure out a way to make a .car (coldfusion archive) out of my .war

I'm looking for help with option #3 (preferred) or #4.

Thanks for any pointers, tips, or help,
Tim Lucia

Ref:
http://www.macromedia.com/devnet/mx/coldfusion/articles/struts05.html



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



how to disabled submit button from action class

2003-12-03 Thread hari_s
Hi all.
Is there a way to disabled submit button from action? 
Any examples will be considered.
Thank you, 


Message Resource bundle frustration

2003-12-03 Thread Derek Clarkson
Hi all,
I've just subscribed to this list and would appreciate any help you can give. 
I've been trying to get resources bundles to work. I have a jar file which is 
used on several projects and contains some core business beans. It also 
contains aproperty file with a basic set of messages for various errors.

In the project I am currently working on I have another properties file which 
contains more project specific messages. The problems is that I cannot find 
out how to access these messages in an Action.

I've read a lot on the web, but most of the docouments talk about how you do 
it using jsp tags. In actions I can access messages using the ActionMessage 
class which are stored in the default properties file. In my 
struts-config.xml though, I can only have one properties file as default and 
the other I have to provide a key for. 

I can't find any way to tell ActionMessage what key to use to access the 
messages I want to use. I can do it using a MessageResources class, but it 
only provides the completed message Strings, and ActionMessage only accepts 
property keys.

I must be missing something, or there is a gap between these two ways of 
handle messages. All I want to do is (in an Action) retrieve a message from a 
specific properties file and display it in a document using . 
This shouldn't be this hard, any ideas 


-- 
Regards,
Derek Clarkson
Analyst/Programmer
Waterwerks Pty Ltd
Melbourne
Australia

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



Re: Database

2003-12-03 Thread Martin Cooper

"Dynamic Systems" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Another problem. I've setup a database connection in the
struts-config.xml.
> Is the  position correct?

No.

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd

--
Martin Cooper


> I'm getting the following error:
>
> Cannot find ActionMappings or ActionFormBeans collection
>
> Take a look at the file:
>
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
> 
>
> 
> 
>type="org.struts.example.StrutsInputForm" />
>type="org.struts.example.StrutsDisplayForm" />
> 
>
> 
>   
> 
>
> 
>
> 
>   type="org.struts.example.StrutsInputAction"
>  name="StrutsInputFormBean"
>  scope="request" input="/PgInput.jsp">
>   
> 
>
>   type="org.struts.example.StrutsDisplayAction"
>  name="StrutsDisplayFormBean"
>  scope="request" input="/PgDisplay.jsp" >
> 
>
> 
>
> 
> 
> 
>  />
>property="key"
>   value="databasename" />
>property="url"
>   value="jdbc:mysql://localhost/databasename" />
>property="username"
>   value="userxxx" />
>property="password"
>   value="passxxx" />
>property="maxActive"
>   value="10" />
>property="maxWait"
>   value="5000" />
>property="defaultAutoCommit"
>   value="false" />
>property="defaultReadOnly"
>   value="false" />
>property="validationQuery"
>   value="SELECT COUNT(*) FROM TEST" />
> 
> 
>
> 




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



Database

2003-12-03 Thread Dynamic Systems
Another problem. I've setup a database connection in the struts-config.xml.
Is the  position correct? I'm getting the following error:

Cannot find ActionMappings or ActionFormBeans collection

Take a look at the file:


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





  
  



  






  


























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



RE: Disadvantages of Struts?

2003-12-03 Thread Hookom, Jacob
What I have for the foundation of our Struts app:

---

SmoAction
+-void setSource(SmoActionMapping, HttpServletRequest, String key)
+-ActionForward getSource(SmoActionMapping, String key)

SmoActionMapping
+-String getSource()

---
Step 1: Setting the Source

On SmoAction, I lazy load a Map into the user's session if:
+-Request has a "source" parameter
+-else SmoActionMapping.getSource() != null

Then I use the passed String "key" to set the String "value" from either the
request or the mapping.  End Method.

---
Step 2: Getting the Source

On SmoAction, I call getSource() with the SmoActionMapping for reference and
the String "key" for lookup.  The reason for not storing the ActionForward
itself is that I would rather have the ActionForward relative to the current
Action being executed, instead of the one that originally set the source
(this is debatable, but it meets our needs). 
+- If there is a map in the session to look against
+- use the passed key to find a forward name
+- if not null, then use the passed ActionMapping to findForward

---
Notes:

Variations on this could include allowing a stack to be created for each
key.  So when I call getSource() I get the last value that was set for that
key.

Some of the issues we ran into were storing parameters and resubmitting
forms.  Because we use SessionBeans to preserve state on our crutial areas,
re-requesting an Action would be able to restore the view based on a session
bean and not on parameters.

Jacob Hookom
Senior Analyst/Programmer
McKesson Medical-Surgical
Golden Valley, Minnesota
http://www.mckesson.com

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 4:49 PM
To: Struts Users Mailing List
Subject: RE: Disadvantages of Struts?

> I had to do something similar where I keep a Map in the 
> session and allow
> the actionmappings/request specify a source, it's then up to 
> the action code
> to specify what key to store it under.  Then I can later look 
> up the source as a forward.

Care to elaborate?  Do you have a Map of String-String name/value pairs,
or are you putting ActionForwards in the Map?  What do you mean by
'allow the actionmappings/request specify a source'?

I'm not happy with the way I'm doing the and am looking for something
better.  However I tend to get lost in the details and can't step back
and design the whole solution.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
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: Disadvantages of Struts?

2003-12-03 Thread Dynamic Systems
Hello all!

That's my first "intercourse" on the list

Does anyone use different languages? I've setup all the JSP with  and created the bla.properties, bla_en.properties and
bla_pt.properties. So, when I access in my browser, independent of the
selected language and order, I always see just one language. Can anyone help
me?

Thanks,

Renan Viegas
Dynamic Systems


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



Re: Disadvantages of Struts?

2003-12-03 Thread Manish Singla
Wendy Smoak wrote:
[Originally posted on struts-dev, answering on struts-user]

I just wonder if Struts comes with any significant drawback. 


The main problem I'm always running up against is the lack of a "go back
where you came from" mechanism in the framework.  Everything goes
forward, with the exception of Validation, but in that case, you never
really left the page you were on.
Just a thought: In case you are ok with Validation than you can as well 
use "mapping.getInputForward" in Action to go back ...in case you are in 
same action mapping. But, I agree you actually mean some other problem.
There is request-header "referrer-to" which will tell you the original 
source of page from where request came BUT this request-header is not 
implemented by all browsers.


An example is the sort of lookup I have to do to populate fields on my
form.  The user puts in a free-form name.  I have to display a list of
possible matches (a separate form with a bunch of radio buttons) the
user picks one, and he must then be taken back to the original form he
was working on, with the name he picked inserted into the form and
another blank text box now available for his next name choice.  Think of
a database of people, and you're adding [keys to] "children" to a
"parent" record.
I've resorted to putting a 'returnTo' attribute in the session, and
using that to construct an ActionForward, but it's not very pretty.
Several people have posted extensions and workarounds, I think there was
one that keeps a page stack, and is able to push and pop "pages" so that
the user can always be sent back one step (or more).


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Disadvantages of Struts?

2003-12-03 Thread Wendy Smoak
> I had to do something similar where I keep a Map in the 
> session and allow
> the actionmappings/request specify a source, it's then up to 
> the action code
> to specify what key to store it under.  Then I can later look 
> up the source as a forward.

Care to elaborate?  Do you have a Map of String-String name/value pairs,
or are you putting ActionForwards in the Map?  What do you mean by
'allow the actionmappings/request specify a source'?

I'm not happy with the way I'm doing the and am looking for something
better.  However I tend to get lost in the details and can't step back
and design the whole solution.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: Disadvantages of Struts?

2003-12-03 Thread Hookom, Jacob
I had to do something similar where I keep a Map in the session and allow
the actionmappings/request specify a source, it's then up to the action code
to specify what key to store it under.  Then I can later look up the source
as a forward.

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 4:21 PM
To: Struts Users Mailing List
Cc: Robert H. Tran
Subject: RE: Disadvantages of Struts?

[Originally posted on struts-dev, answering on struts-user]
> I just wonder if Struts comes with any significant drawback. 

The main problem I'm always running up against is the lack of a "go back
where you came from" mechanism in the framework.  Everything goes
forward, with the exception of Validation, but in that case, you never
really left the page you were on.

An example is the sort of lookup I have to do to populate fields on my
form.  The user puts in a free-form name.  I have to display a list of
possible matches (a separate form with a bunch of radio buttons) the
user picks one, and he must then be taken back to the original form he
was working on, with the name he picked inserted into the form and
another blank text box now available for his next name choice.  Think of
a database of people, and you're adding [keys to] "children" to a
"parent" record.

I've resorted to putting a 'returnTo' attribute in the session, and
using that to construct an ActionForward, but it's not very pretty.

Several people have posted extensions and workarounds, I think there was
one that keeps a page stack, and is able to push and pop "pages" so that
the user can always be sent back one step (or more).

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
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: Disadvantages of Struts?

2003-12-03 Thread Wendy Smoak
[Originally posted on struts-dev, answering on struts-user]
> I just wonder if Struts comes with any significant drawback. 

The main problem I'm always running up against is the lack of a "go back
where you came from" mechanism in the framework.  Everything goes
forward, with the exception of Validation, but in that case, you never
really left the page you were on.

An example is the sort of lookup I have to do to populate fields on my
form.  The user puts in a free-form name.  I have to display a list of
possible matches (a separate form with a bunch of radio buttons) the
user picks one, and he must then be taken back to the original form he
was working on, with the name he picked inserted into the form and
another blank text box now available for his next name choice.  Think of
a database of people, and you're adding [keys to] "children" to a
"parent" record.

I've resorted to putting a 'returnTo' attribute in the session, and
using that to construct an ActionForward, but it's not very pretty.

Several people have posted extensions and workarounds, I think there was
one that keeps a page stack, and is able to push and pop "pages" so that
the user can always be sent back one step (or more).

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



Re: How extensively can/is Struts used ?

2003-12-03 Thread Manish Singla
> Then I have lots of "display information only"-pages. Most of these are
> tables that are based on some sort of DB table.
> Although this approach appeals to me in some ways (nice separation of
> concerns DB / Business-layer / Display for instance) it also seems a bit
> over the top at times. I could easily accomplish the same display by 
letting
> the .jsp do the talking with the DB. Or perhaps let a servlet do it 
all for
> me.

I agree with you that MVC solution for every problem seems a bit over 
the top.
Although, it is written everywhere that MVC is cl,..:-) but even I 
see FEW cases like yours.

Linus Nikander wrote:
I was wondering how far it is recommended to "keep" using struts when
displaying information. Two examples might make it clearer about where I'm
having trouble deciding.
For instance, I've got lots of forms on my site, I use Struts for all of
them, love the extra functionality and the "one way of doing things" that
Struts gives me.
Then I have lots of "display information only"-pages. Most of these are
tables that are based on some sort of DB table. Right now I:
Call a struts Action.
The Action retrieves the data, populates a boatload of Beans.
The Beans are stuffed into a List, which in turn is put into a List which
resides in my Form.
The jsp retrieves the Form.
The jsp performs a 
The information is output with a lot of bean:write's
Although this approach appeals to me in some ways (nice separation of
concerns DB / Business-layer / Display for instance) it also seems a bit
over the top at times. I could easily accomplish the same display by letting
the .jsp do the talking with the DB. Or perhaps let a servlet do it all for
me.
My question is, do you guys use the above described method when only
displaying information too ? Could this eventually become a performace
bottleneck (maybe due the large amount of Beans being created) ? Is there
perhaps a better variation of the above that I've missed ?
All points of view welcome.

//Linus Nikander - [EMAIL PROTECTED]



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


Re: Integration with Reporting Systems (was: How extensively can/is Struts used ?)

2003-12-03 Thread Manish Singla
Because of following problem and other primary factors, I know a team 
which is using .NET for frontend and J2EE for backend. .NET has some 
components to meet these kind of needs.:-(.
May be JSF can handle this issue. Thus, somebody wrote a component to 
show reports and one can configure renderer..

Manish Singla

Kirk Wylie wrote:
See below.

Linus Nikander wrote:

Then I have lots of "display information only"-pages. Most of these are
tables that are based on some sort of DB table. Right now I:
Call a struts Action.
The Action retrieves the data, populates a boatload of Beans.
The Beans are stuffed into a List, which in turn is put into a List which
resides in my Form.
The jsp retrieves the Form.
The jsp performs a 
indexId="i">
The information is output with a lot of bean:write's

Although this approach appeals to me in some ways (nice separation of
concerns DB / Business-layer / Display for instance) it also seems a bit
over the top at times. I could easily accomplish the same display by 
letting
the .jsp do the talking with the DB. Or perhaps let a servlet do it 
all for
me.


This raises an interesting point, which I've not run into yet.

This is often solved in a non-Struts application by having a "reporting" 
facility which is used to do the analysis/pure-display pages (i.e. ones 
which have minimal interaction with the rest of hte application, but 
which create a lot of heavy-lifting reports). That facility is often 
provided by a third-party package such as Crystal Reports.

Does anybody have any experience integrating a Struts application with a 
third-party package like that? Any tips? I'm curious because some of the 
stuff I work on may have that type of requirement (big report pages) in 
the future, and we've got people that are experienced with Crystal 
Reports, so if I can easily integrate that into the technology stack I'd 
love to.

Kirk Wylie
M7 Corporation
-
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]


Re: Unicode text in Property files

2003-12-03 Thread Jason Lea
You can create and edit the property files saving them in UTF-8.  Then 
you convert the UTF-8 into the format java expects eg \u using the 
native2ascii program that comes with Java.

It will create a new file so the created files are what go into your 
application, leaving your source files in UTF-8.  I use an ANT task to 
do this for me automatically:

   
   
   
   

Here are the Java Docs for native2ascii:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/native2ascii.html
So this should work
native2ascii -encoding UTF-8 file1.source file1.properties
Debashish Chakrabarty wrote:

Hi,

I have a query and request you to kindly spare some time to enlighten me.

I am making a web application that would translate words from English to various Indian languages using Struts. The application would not use any database so I must use some flat file to store the translation in form of English_word = Hindi_meaning (name value pair or some other form). There would be 11 Indian languages apart from Hindi. Since Java Property files are used in application localization I was of the opinion that they could easily be used to store this data (for eg. a property file State.propeties might store the names of Indian states in Hindi ex: Delhi= ??). The value is written in Hindi unicode here, a Hindi Unicode font is available here for free download.

Important point is: My language data (the value for english keys) would be in Unicode,  as above.  I understand that the default encoding of the property file is not Unicode.  So while saving the property file I will have to save it with UTF-8 encoding. Since struts heavily uses the Property files for internationalization, will it be possible for me to use the files with Unicode text in them. 

I request your advice on how to use the Property file in such a case (or should I use the normal tab-separated text option as above, with the file,being read using Java I/O API).

Thanks,
Debashish Chakrabarty
http://www.jroller.com/page/debashish




 



--
Jason Lea


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


Re: User defined error messages

2003-12-03 Thread Manish Singla
You can  connect to database by extending "PropertyMessageResources" of 
struts.

PropertyMessageResources has "loadLocale" method wherein struts use 
"getResourceAsStream(proprtyFileName)"... Thus, instead of that you have 
to connect to database to load it.

Manish Singla

>and we don't have to rely on them backing their disk files up.
Property file can also be stored at remote location like database. But, 
you have to again extend PropertyMessageResources..





Greg Dunn wrote:
Sorry I wasn't clear.  I've got my ApplicationResources.properties file set
up and in use for most messages.  However, it's packed into a .war file
inside an .ear file for deployment, so I can't let them access it directly
and edit the messages in it to their taste.  What I'm looking for is another
source to collect a message bundle from, preferably the database.  Though I
could use another .properties file they CAN access I would prefer to go the
database route because they'll be editing it through their web based admin
pages and my life will be easier if I can use DAO's I already have, and we
don't have to rely on them backing their disk files up.
Greg

-Original Message-
From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:53 AM
To: Struts Users Mailing List
Subject: RE: User defined error messages
I'm not sure if you are asking more than what this answer implies but ... I
use Properties stored in a properties file for my error messages.
Mike

-Original Message-
From: Greg Dunn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:40 AM
To: Struts Users Mailing List
Subject: User defined error messages
My PTB want to let our clients edit the content of certain error messages
after deployment.Any suggestions on how to accomplish this?  Thanks.
Greg

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


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts printing debug mesg regardless what I did

2003-12-03 Thread Manish Singla
Since you are setting
log4j.rootLogger=warn, rolling
log4j.category.org.apache=warn, rolling
Thus, you should not see DEBUG messages of "commons".

Problem is somewhere else.

HTH
Manish Singla
PS:: Setting debug level in web.xml i.e.   is deprecated.
Thus, I will configure logging detail by using config file of underlying 
 logging implementation as above.



david chan wrote:
Tried both, not working.

David

--- Richard Yee <[EMAIL PROTECTED]> wrote:

David,
Set
   
 debug
 0
   
in the web.xml for your action servlet.

-Richard

--- Kevin Hagel <[EMAIL PROTECTED]> wrote:

log4j.category.org.apache.common=WARN

- Original Message - 
From: "david chan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:39 AM
Subject: struts printing debug mesg regardless
what

I did



Hi,
I am using Struts 1.1 and log4j 1.2.4, and in

my

log4j.properties, I have this to turn off Struts
debug

mesg, but it always printing debug mesg for
package

org.apache.common. How can I turn it off?
Thanks.
David
===my log config ===
log4j.rootLogger=warn, rolling
log4j.category.org.apache=warn, rolling

log4j.appender.rolling=org.apache.log4j.RollingFileAppender

log4j.appender.rolling.File=c:\\temp\\temp.log

log4j.appender.rolling.MaxFileSize=5000KB
log4j.appender.rolling.MaxBackupIndex=5


log4j.appender.rolling.layout=org.apache.log4j.PatternLayout

log4j.appender.rolling.layout.ConversionPattern=%d

%5p

[%t] %c{2} - %m%n
== end log config 
 debug mesg output 

DEBUG
org.apache.commons.beanutils.ConvertUtils 

DEBUG org.apache.commons.digester.Digester

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

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


-

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


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-

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


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
-
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]


Re: Extending DTD and consequences

2003-12-03 Thread Manish Singla
You may have to extend ActionConfig also.

You wrote:
> I wrote an ActionServlet sub-class to define the public id of my dtd 
for the digester.

DO you mean  "protected String registrations[]".
And this worked for you.
Thanks
Manish.




[EMAIL PROTECTED] wrote:
Hello all,

I want to ask you for help concerning an extension of the struts config dtd
and how to make these extension available in the javabeans, respectively. In
my case the "roles" tag isn't enough why I added a "security-constraint" tag.
Within a sub-class of RequestProcessor I would like to check if the user in
role satifies the security-constraint to call the corresponding action. A
security-constraint is composed of a module name and a function access
permission. To do checking I need to be able access the securityConstraint-property of
my SessionActionMapping sub-class if I'm right. But I don't now how to tell
the Digester with the right rules how to add the SecurityConstraint bean to
my SessionActionMapping sub-class. There's where I need help.
So first this is how my DTD looks like:

...






	module-name CDATA #REQUIRED
	function-name CDATA #REQUIRED>
























I wrote an ActionServlet sub-class to define the public id of my dtd for the
digester and activated my ActionServer sub-class threw the web deployment
descriptor. Starting my sample application the action servlet gets correctly
initialized. 

Then I added JavaBeans SecurityConstraint and AuthConstraint.
SecurityConstraint contains a property authConstraints type Collection, getter- and
setter-methods and a addAuthConstraint-method. AuthConstraint is a simple JavaBean
with properties moduleName and functionName and getter/setter-methods. 

SampleActionMapping extends SessionActionMapping and contains a property of
type SecurityConstraint. Within the struts-config I defined my sample action
mapping globaly for all action mappings.
All this describes works fine. But now the problem raises. Following an
excerpt from my SampleRuleSet:
public class SampleRuleSet extends RuleSetBase {

public void addRuleInstances(Digester digester) {

digester.addObjectCreate(
"struts-config/action-mappings/action/security-constraint", 
"sample.struts.config.SecurityConstraint");
			
digester.addObjectCreate(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"sample.struts.config.AuthConstraint");
digester.addSetProperties(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"function-name",
"functionName");
digester.addSetProperties(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"module-name",
"moduleName");
digester.addSetNext( 
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"addAuthConstraint");			
			
I added my sample rule set using the init parameter within the web
deployment descriptor. But I didn't find the way how to tell the digester to add the
SecurityConstraint bean to my sample action mapping.

Impatiently waiting for your answers

regards

Sebastian





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


Re: Changing SessionId at every request

2003-12-03 Thread Kirk Wylie
Gary, to be really honest, what you're trying to do is implement an 
SSL-like mechanism without using SSL. This is exactly the situation that 
SSL is designed to guarantee from a Server perspective (that a single 
connection is actually with a single client and hasn't been "hijacked" 
in any way). It might just be faster (from a development perspective) to 
just go with SSL in production.

Any particular reason you're reluctant to go with an SSL-based solution?

Kirk Wylie
M7 Corporation
Gurpreet Dhanoa wrote:

Hi Andrew

You are right . I can implement SSL but there must be a solution for this
trouble
right
Thanks
Gary
- Original Message -
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:14 PM
Subject: RE: Changing SessionId at every request
 > ahhh... ok I think I see what you mean
 >
 > So by 'hand rolled' sessionId what you mean is some kind of token that
must
 > be submitted with each request to verify that it came from the real
client?
 > (Rather like the token mechanism used to detect double submissions)
 >
 > If he is after real security though, I would think using SSL might be a
 > safer option - though the performance is lower.
 >
 >
 > -Original Message-
 > From: Adam Hardy [mailto:[EMAIL PROTECTED]
 > Sent: Wednesday, 3 December 2003 17:33
 > To: Struts Users Mailing List
 > Subject: Re: Changing SessionId at every request
 >
 >
 > I assume that Gurpreet wants to do it for security reasons and it's not
 > a bad idea. It certainly means that nobody would be able to share a
 > session, and so therefor a session-hijack would become obviously
 > immediately.
 >
 > I think expiring the session is overkill - I would just leave the
 > session as it is and use the filter to check and change my own
 > hand-rolled session id.
 >
 > Adam
 >
 > On 12/03/2003 08:20 AM Navjot Singh wrote:
 > > don't know why do you wish to do so?
 > > but it an be done. Write a filter. pass every request thru that.
 > >
 > > 1. Fetch the session, expire it. Server will assign new.
 > > 2. Fetch the session, don't expire the session, just append a 
timestamp
to
 > > it. set a cookie and use that to maintain session.
 > >
 > > HTH
 > > navjot singh
 > >
 > >
 > >>-Original Message-
 > >>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
 > >>Sent: Wednesday, December 03, 2003 11:44 AM
 > >>To: Struts Users Mailing List
 > >>Subject: Changing SessionId at every request
 > >>
 > >>
 > >>HI,
 > >>
 > >>IS it possible to change the Session Id generated by the Web
 > >>Server at every request for the  same client. I wil make it much
 > >>more clear.
 > >>
 > >>Say i have a Servlet running on Tomcat. what i want is when ever
 > >>any User lets assume USER A ask for a request i want to change the
 > >>sessionId server variable which has been gerenrated by the Web
 > >>Server to uniquely identify the client.
 > >>
 > >>Purpose behind doing this is to make every request safe.
 > >>
 > >>
 > >>Any suggections will be higly appreciated.
 > >>
 > >>
 > >>Thanks in Advance
 > >>Gary
 > >>
 > >
 > >
 > >
 > > -
 > > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > > For additional commands, e-mail: [EMAIL PROTECTED]
 > >
 > >
 >
 >
 > --
 > struts 1.1 + tomcat 5.0.14 + java 1.4.2
 > Linux 2.4.20 RH9
 >
 > -
 > 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: Data Access Optmizing

2003-12-03 Thread Kirk Wylie
Zoran Avtarovski wrote:

 > Had you thought about using a single SQL statement to populate
 > everything? In other words, if your cycle is:
 > - Get a bunch of user response objects
 > - For each user response object, get its user feedback objects
 > This is something which is very easy to do with two SQL statements,
 > rather than one plus one per user response object. Since there's
 > overhead in each SQL Statement you issue, a good place to start might be
 > in doing this.
It's actually a little more complex than that. What happens is that I
perform a number of calculations, which use variables stored in the 
database
and depending on the result more information is retrieved from the database
and added to the response. It's not a standard 1-n or n-n relationship, but
more extracting data on the fly.
Well, if the calculation is purely based on database information, you 
could use a stored procedure (which Milind Kulkarni recommended in 
another email) or you could also create a virtual column in the database 
schema (such as through a View or a direct calculated column in some 
databases like DB/2) and do a query on that, which would then allow the 
calculation to go into one database call.

Have you tried pushing the calculation logic into the database (as with 
a Stored Procedure or a View) yet? That might allow you to again get 
into a single-query model, but without knowing the type of calculations 
you're making I can't make a definite recommendation.

One option is to store the calculation variables in a hash table stored in
application scope and only change them when they have been updated.
This would help, but the next logical extension would be to do 
additional caching in the database level, and control your cache updates 
programmatically when the rest of the system changes, which could again 
reduce the number of calls that you're making.

Will using something like iBatis or even Hibernate improve the situation?
It could. Depending on the transactional requirements, OR-Mapping 
systems can often do some pretty intensive between-transactional caching 
in the application level which can help out. Without knowing the 
particulars of your application and its transactional requirements it's 
difficult to know for sure, but it's possible.

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


RE: User defined error messages

2003-12-03 Thread Susan Bradeen

Greg,
Have you looked into James Mitchell's OJBMessageResources?

http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsMessageResourcesFromDatabase.


I haven't used it, but if I remember correctly it is message resources in a
database.

HTH,
Susan

On 12/03/2003 12:12:09 PM "Greg Dunn" wrote:

> Sorry I wasn't clear.  I've got my ApplicationResources.properties file
set
> up and in use for most messages.  However, it's packed into a .war file
> inside an .ear file for deployment, so I can't let them access it
directly
> and edit the messages in it to their taste.  What I'm looking for is
another
> source to collect a message bundle from, preferably the database.  Though
I
> could use another .properties file they CAN access I would prefer to go
the
> database route because they'll be editing it through their web based
admin
> pages and my life will be easier if I can use DAO's I already have, and
we
> don't have to rely on them backing their disk files up.
>
> Greg
>
> -Original Message-
> From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 03, 2003 10:53 AM
> To: Struts Users Mailing List
> Subject: RE: User defined error messages
>
>
> I'm not sure if you are asking more than what this answer implies but ...
I
> use Properties stored in a properties file for my error messages.
>
> Mike
>
> -Original Message-
> From: Greg Dunn [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 03, 2003 11:40 AM
> To: Struts Users Mailing List
> Subject: User defined error messages
>
>
> My PTB want to let our clients edit the content of certain error messages
> after deployment.Any suggestions on how to accomplish this?  Thanks.
>
>
> Greg
>
>
> -
> 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]



Integration with Reporting Systems (was: How extensively can/is Struts used ?)

2003-12-03 Thread Kirk Wylie
See below.

Linus Nikander wrote:

Then I have lots of "display information only"-pages. Most of these are
tables that are based on some sort of DB table. Right now I:
Call a struts Action.
The Action retrieves the data, populates a boatload of Beans.
The Beans are stuffed into a List, which in turn is put into a List which
resides in my Form.
The jsp retrieves the Form.
The jsp performs a 
The information is output with a lot of bean:write's
Although this approach appeals to me in some ways (nice separation of
concerns DB / Business-layer / Display for instance) it also seems a bit
over the top at times. I could easily accomplish the same display by 
letting
the .jsp do the talking with the DB. Or perhaps let a servlet do it all for
me.
This raises an interesting point, which I've not run into yet.

This is often solved in a non-Struts application by having a "reporting" 
facility which is used to do the analysis/pure-display pages (i.e. ones 
which have minimal interaction with the rest of hte application, but 
which create a lot of heavy-lifting reports). That facility is often 
provided by a third-party package such as Crystal Reports.

Does anybody have any experience integrating a Struts application with a 
third-party package like that? Any tips? I'm curious because some of the 
stuff I work on may have that type of requirement (big report pages) in 
the future, and we've got people that are experienced with Crystal 
Reports, so if I can easily integrate that into the technology stack I'd 
love to.

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


RE: How extensively can/is Struts used ?

2003-12-03 Thread Wendy Smoak
> Then I have lots of "display information only"-pages. Most of 
> these are tables that are based on some sort of DB table. Right now I:
> Call a struts Action.
> The Action retrieves the data, populates a boatload of Beans.
> The Beans are stuffed into a List, which in turn is put into 
> a List which
> resides in my Form.
> The jsp retrieves the Form.
> The jsp performs a  property="myList"
> indexId="i">
> The information is output with a lot of bean:write's

If it's display-only, I have an Action which uses my DAO layer to talk
to the database and puts beans in some scope.  Then the JSP uses JSTL
tags to display the data (or bean:write in your case-- IIRC bean:write
will work with beans other than Form beans, you just have to tell it
where to get the data).  I agree, you're making it more complex than it
needs to be.

No matter how simple your webapp is now, it's a REALLY REALLY bad idea
to talk to the database from the JSP.  Resist the temptation, it will
make your life easier in the future.  IMO even the Actions shouldn't
talk directly to the database-- my Actions get a Data Access Object and
call 'read' or 'update', remaining blissfully ignorant about what's
happening behind the scenes.

So Struts only gets involved with the ".do" mapping and figuring out
which action to call.  I don't bother with a Form bean if it's display
only.  Similarly, if a plain old HTML tag will do the job, I don't use a
Struts tag-- it the output isn't dynamic, why bother?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



[struts-nested] BeanUtils.populate exception

2003-12-03 Thread Daniel Blázquez
I have done rigth now a few more things but I still have the problem:

- I have set the scope of the action to "session"

- I have implemented the reset() method, instantiating collectiong using a
LazyList

Maybe its recommendable to switch to Indexed properties? i only wanted to do
in the same way as Arron's monkey tree -so simple, and cute-...

but nothing works! :(

Any ideas please?

- Original Message -
From: "Daniel Blázquez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 5:55 PM
Subject: [struts-nested] BeanUtils.populate exception


> Hi,
>
> I have been dealing with struts-nested taglibs for a few days (with the
> unestimable help from Arron Bates in http://www.keyboardmonkey.com) and
with
> the great amount of messages of this topic in the mailing list. But I
still
> have the next problem:
>
> javax.servlet.ServletException: BeanUtils.populate
>   at org.apache.struts.util.RequestUtils.populate RequestUtils.java:1254)
>
> (no extra info about ArrayIndexOutOfBounds or a more detailed exception)
>
> when submitting a form that uses a nested collection of objects. Each
object
> is showing in the form a  and a  box (as a form
showing
> monkeys, each monkey with a box for age and a  for size).
>
> 
>
>   
>
> 
> 
> 
>   
> 
>
>   
>
> 
>
> The form also has many more properties (including checkboxes and simple
> selects) but these ones work correctly.
>
> Things I have already done:
>
> -- Initialize involved property according to thread
>
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
> pache.org&by=thread&from=240019
> (thanks Arron again and Brandon)
>
> -- provide setter in the form for the nested property with the signature:
> public void setMonkeys(Object[] newMonkeys)
>
> -- provide setter in nested monkey object for the size
> public void setSize(String newSize)
>
> I am really frustated because 'cant see what I am doing wrong!, any help
> will be very appreciated
>
> TIA,
> Daniel
>


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



Re: struts printing debug mesg regardless what I did

2003-12-03 Thread Kevin Hagel
Is your log4j.properties being loaded?
Log4jConfigurer.initLogging("C:/somedir/src/test/log4j.properties");

- Original Message - 
From: "david chan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 10:00 AM
Subject: Re: struts printing debug mesg regardless what I did


> Tried both, not working.
> 
> David
> 
> --- Richard Yee <[EMAIL PROTECTED]> wrote:
> > David,
> > Set
> > 
> >   debug
> >   0
> > 
> > 
> > in the web.xml for your action servlet.
> > 
> > -Richard
> > 
> > --- Kevin Hagel <[EMAIL PROTECTED]> wrote:
> > > log4j.category.org.apache.common=WARN
> > > 
> > > - Original Message - 
> > > From: "david chan" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Wednesday, December 03, 2003 9:39 AM
> > > Subject: struts printing debug mesg regardless
> > what
> > > I did
> > > 
> > > 
> > > > Hi,
> > > >  I am using Struts 1.1 and log4j 1.2.4, and in
> > my
> > > > log4j.properties, I have this to turn off Struts
> > > debug
> > > > mesg, but it always printing debug mesg for
> > > package
> > > > org.apache.common. How can I turn it off?
> > > > Thanks.
> > > > David
> > > > 
> > > > ===my log config ===
> > > > log4j.rootLogger=warn, rolling
> > > > log4j.category.org.apache=warn, rolling
> > > >
> > >
> >
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > > > 
> > > > log4j.appender.rolling.File=c:\\temp\\temp.log
> > > > 
> > > > log4j.appender.rolling.MaxFileSize=5000KB
> > > > log4j.appender.rolling.MaxBackupIndex=5
> > > > 
> > > >
> > >
> >
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > > >
> > log4j.appender.rolling.layout.ConversionPattern=%d
> > > %5p
> > > > [%t] %c{2} - %m%n
> > > > == end log config 
> > > > 
> > > > 
> > > >  debug mesg output 
> > > > 
> > > > DEBUG
> > > org.apache.commons.beanutils.ConvertUtils 
> > > > DEBUG org.apache.commons.digester.Digester
> > > > 
> > > > 
> > > > __
> > > > Do you Yahoo!?
> > > > Free Pop-Up Blocker - Get it now
> > > > http://companion.yahoo.com/
> > > > 
> > > >
> > >
> >
> -
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > 
> > > 
> > >
> >
> -
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



Extending DTD and consequences

2003-12-03 Thread sebastian_linz
Hello all,

I want to ask you for help concerning an extension of the struts config dtd
and how to make these extension available in the javabeans, respectively. In
my case the "roles" tag isn't enough why I added a "security-constraint" tag.
Within a sub-class of RequestProcessor I would like to check if the user in
role satifies the security-constraint to call the corresponding action. A
security-constraint is composed of a module name and a function access
permission. To do checking I need to be able access the securityConstraint-property of
my SessionActionMapping sub-class if I'm right. But I don't now how to tell
the Digester with the right rules how to add the SecurityConstraint bean to
my SessionActionMapping sub-class. There's where I need help.

So first this is how my DTD looks like:

...







































I wrote an ActionServlet sub-class to define the public id of my dtd for the
digester and activated my ActionServer sub-class threw the web deployment
descriptor. Starting my sample application the action servlet gets correctly
initialized. 

Then I added JavaBeans SecurityConstraint and AuthConstraint.
SecurityConstraint contains a property authConstraints type Collection, getter- and
setter-methods and a addAuthConstraint-method. AuthConstraint is a simple JavaBean
with properties moduleName and functionName and getter/setter-methods. 

SampleActionMapping extends SessionActionMapping and contains a property of
type SecurityConstraint. Within the struts-config I defined my sample action
mapping globaly for all action mappings.

All this describes works fine. But now the problem raises. Following an
excerpt from my SampleRuleSet:

public class SampleRuleSet extends RuleSetBase {

public void addRuleInstances(Digester digester) {

digester.addObjectCreate(
"struts-config/action-mappings/action/security-constraint", 
"sample.struts.config.SecurityConstraint");

digester.addObjectCreate(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"sample.struts.config.AuthConstraint");
digester.addSetProperties(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"function-name",
"functionName");
digester.addSetProperties(
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"module-name",
"moduleName");
digester.addSetNext( 
   
"struts-config/action-mappings/action/security-constraint/auth-constraint",
"addAuthConstraint");   

I added my sample rule set using the init parameter within the web
deployment descriptor. But I didn't find the way how to tell the digester to add the
SecurityConstraint bean to my sample action mapping.

Impatiently waiting for your answers

regards

Sebastian





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



Re: struts printing debug mesg regardless what I did

2003-12-03 Thread david chan
Tried both, not working.

David

--- Richard Yee <[EMAIL PROTECTED]> wrote:
> David,
> Set
> 
>   debug
>   0
> 
> 
> in the web.xml for your action servlet.
> 
> -Richard
> 
> --- Kevin Hagel <[EMAIL PROTECTED]> wrote:
> > log4j.category.org.apache.common=WARN
> > 
> > - Original Message - 
> > From: "david chan" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, December 03, 2003 9:39 AM
> > Subject: struts printing debug mesg regardless
> what
> > I did
> > 
> > 
> > > Hi,
> > >  I am using Struts 1.1 and log4j 1.2.4, and in
> my
> > > log4j.properties, I have this to turn off Struts
> > debug
> > > mesg, but it always printing debug mesg for
> > package
> > > org.apache.common. How can I turn it off?
> > > Thanks.
> > > David
> > > 
> > > ===my log config ===
> > > log4j.rootLogger=warn, rolling
> > > log4j.category.org.apache=warn, rolling
> > >
> >
>
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > > 
> > > log4j.appender.rolling.File=c:\\temp\\temp.log
> > > 
> > > log4j.appender.rolling.MaxFileSize=5000KB
> > > log4j.appender.rolling.MaxBackupIndex=5
> > > 
> > >
> >
>
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > >
> log4j.appender.rolling.layout.ConversionPattern=%d
> > %5p
> > > [%t] %c{2} - %m%n
> > > == end log config 
> > > 
> > > 
> > >  debug mesg output 
> > > 
> > > DEBUG
> > org.apache.commons.beanutils.ConvertUtils 
> > > DEBUG org.apache.commons.digester.Digester
> > > 
> > > 
> > > __
> > > Do you Yahoo!?
> > > Free Pop-Up Blocker - Get it now
> > > http://companion.yahoo.com/
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



How extensively can/is Struts used ?

2003-12-03 Thread Linus Nikander
I was wondering how far it is recommended to "keep" using struts when
displaying information. Two examples might make it clearer about where I'm
having trouble deciding.

For instance, I've got lots of forms on my site, I use Struts for all of
them, love the extra functionality and the "one way of doing things" that
Struts gives me.

Then I have lots of "display information only"-pages. Most of these are
tables that are based on some sort of DB table. Right now I:
Call a struts Action.
The Action retrieves the data, populates a boatload of Beans.
The Beans are stuffed into a List, which in turn is put into a List which
resides in my Form.
The jsp retrieves the Form.
The jsp performs a 
The information is output with a lot of bean:write's

Although this approach appeals to me in some ways (nice separation of
concerns DB / Business-layer / Display for instance) it also seems a bit
over the top at times. I could easily accomplish the same display by letting
the .jsp do the talking with the DB. Or perhaps let a servlet do it all for
me.

My question is, do you guys use the above described method when only
displaying information too ? Could this eventually become a performace
bottleneck (maybe due the large amount of Beans being created) ? Is there
perhaps a better variation of the above that I've missed ?

All points of view welcome.

//Linus Nikander - [EMAIL PROTECTED]




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



Re: struts printing debug mesg regardless what I did

2003-12-03 Thread Richard Yee
David,
Set

  debug
  0


in the web.xml for your action servlet.

-Richard

--- Kevin Hagel <[EMAIL PROTECTED]> wrote:
> log4j.category.org.apache.common=WARN
> 
> - Original Message - 
> From: "david chan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, December 03, 2003 9:39 AM
> Subject: struts printing debug mesg regardless what
> I did
> 
> 
> > Hi,
> >  I am using Struts 1.1 and log4j 1.2.4, and in my
> > log4j.properties, I have this to turn off Struts
> debug
> > mesg, but it always printing debug mesg for
> package
> > org.apache.common. How can I turn it off?
> > Thanks.
> > David
> > 
> > ===my log config ===
> > log4j.rootLogger=warn, rolling
> > log4j.category.org.apache=warn, rolling
> >
>
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> > 
> > log4j.appender.rolling.File=c:\\temp\\temp.log
> > 
> > log4j.appender.rolling.MaxFileSize=5000KB
> > log4j.appender.rolling.MaxBackupIndex=5
> > 
> >
>
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> > log4j.appender.rolling.layout.ConversionPattern=%d
> %5p
> > [%t] %c{2} - %m%n
> > == end log config 
> > 
> > 
> >  debug mesg output 
> > 
> > DEBUG
> org.apache.commons.beanutils.ConvertUtils 
> > DEBUG org.apache.commons.digester.Digester
> > 
> > 
> > __
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: struts printing debug mesg regardless what I did

2003-12-03 Thread Kevin Hagel
log4j.category.org.apache.common=WARN

- Original Message - 
From: "david chan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:39 AM
Subject: struts printing debug mesg regardless what I did


> Hi,
>  I am using Struts 1.1 and log4j 1.2.4, and in my
> log4j.properties, I have this to turn off Struts debug
> mesg, but it always printing debug mesg for package
> org.apache.common. How can I turn it off?
> Thanks.
> David
> 
> ===my log config ===
> log4j.rootLogger=warn, rolling
> log4j.category.org.apache=warn, rolling
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> 
> log4j.appender.rolling.File=c:\\temp\\temp.log
> 
> log4j.appender.rolling.MaxFileSize=5000KB
> log4j.appender.rolling.MaxBackupIndex=5
> 
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> log4j.appender.rolling.layout.ConversionPattern=%d %5p
> [%t] %c{2} - %m%n
> == end log config 
> 
> 
>  debug mesg output 
> 
> DEBUG org.apache.commons.beanutils.ConvertUtils 
> DEBUG org.apache.commons.digester.Digester
> 
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



struts printing debug mesg regardless what I did

2003-12-03 Thread david chan
Hi,
 I am using Struts 1.1 and log4j 1.2.4, and in my
log4j.properties, I have this to turn off Struts debug
mesg, but it always printing debug mesg for package
org.apache.common. How can I turn it off?
Thanks.
David

===my log config ===
log4j.rootLogger=warn, rolling
log4j.category.org.apache=warn, rolling
log4j.appender.rolling=org.apache.log4j.RollingFileAppender

log4j.appender.rolling.File=c:\\temp\\temp.log

log4j.appender.rolling.MaxFileSize=5000KB
log4j.appender.rolling.MaxBackupIndex=5

log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d %5p
[%t] %c{2} - %m%n
== end log config 


 debug mesg output 

DEBUG org.apache.commons.beanutils.ConvertUtils 
DEBUG org.apache.commons.digester.Digester


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: User defined error messages

2003-12-03 Thread Greg Dunn
Sorry I wasn't clear.  I've got my ApplicationResources.properties file set
up and in use for most messages.  However, it's packed into a .war file
inside an .ear file for deployment, so I can't let them access it directly
and edit the messages in it to their taste.  What I'm looking for is another
source to collect a message bundle from, preferably the database.  Though I
could use another .properties file they CAN access I would prefer to go the
database route because they'll be editing it through their web based admin
pages and my life will be easier if I can use DAO's I already have, and we
don't have to rely on them backing their disk files up.

Greg

-Original Message-
From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:53 AM
To: Struts Users Mailing List
Subject: RE: User defined error messages


I'm not sure if you are asking more than what this answer implies but ... I
use Properties stored in a properties file for my error messages.

Mike

-Original Message-
From: Greg Dunn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:40 AM
To: Struts Users Mailing List
Subject: User defined error messages


My PTB want to let our clients edit the content of certain error messages
after deployment.Any suggestions on how to accomplish this?  Thanks.


Greg


-
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: Variable value in logic:equal tag Help Req [SOLVED]

2003-12-03 Thread Fullam, Jonathan
told ya so...  ;-)

-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:35 AM
To: Struts Users Mailing List; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Variable value in logic:equal tag Help Req [SOLVED]


Hey that <% refVar.toString %> worked man .. :-) ... at last. . now i won't
have to sit for the whole nite .. :-) ..
chao ..
Shakti

- Original Message -
From: "Shakti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:52 PM
Subject: Re: Variable value in logic:equal tag Help Req


> Hi ,
> I am still not able to make out as how can i compare values from two
> arraylists using logic iterate and logic equal , as none of them is a
> constant and i am still getting the same error.
> 1) I want to know how do i get the value of the variable created using
> bean:define ??? I am using <%= var %> but i am not getting it .. plz help
.
>
> Plz help me out of this .
> Thanks
> Shakti
> - Original Message -
> From: "Fullam, Jonathan" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, December 03, 2003 9:30 PM
> Subject: RE: Variable value in logic:equal tag Help Req
>
>
> > You can use a variable for the value attribute just as you did:  <%=
> > refValue %> as long as refValue is a variable in some scope on your
page.
> > Note that refValue must point to a String object because the equal tag
> > requires this (it converts the value of the bean pointed to by the name
> > attribute to a String for comparisons).  If refValue is not a String you
> can
> > try the following <%= refValue.toString() %>.
> >
> > -Jonathan
> >
> > -Original Message-
> > From: Shakti [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 03, 2003 10:27 AM
> > To: Struts Developers List; Struts Users Mailing List
> > Subject: Variable value in logic:equal tag Help Req
> >
> >
> > With reference this mail :
> > I trid this code but i am getting the error :can not resolve symbol
> refValue
> >
> :\bea\user_projects\mydomain\myserver\.wlnotdelete\mcc_mcc_4346456\jsp_ser
vl
> > et\__reassignta.java:376: cannot resolve symbol
> > probably occurred due to an error in /reassignta.jsp line 118:
> > 
> >
> > I want to compare values from one arraylist with another using logic
equal
> > tag but in the value="" tag how i can give a variable ??
> > Plz Help !!!
> > Thanks & Regards,
> > Shakti
> >
> >
> >
> > - Original Message -
> > From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 24, 2003 4:38 PM
> > Subject: Re: variable value in logic notEqual tag
> >
> >
> > > Use this :
> > >
> > > 
> > >  >
> > > ...
> > > 
> > >
> > >
> > > Nico.
> > >
> > > - Original Message -
> > > From: "Baljinder Singh" <[EMAIL PROTECTED]>
> > > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 24, 2003 12:03 PM
> > > Subject: variable value in logic notEqual tag
> > >
> > >
> > > > Hi All,
> > > >
> > > > I want to compare the variable in notEqual tag to value of another
> > variable
> > > > instead of comparing it to a fixed value. How can I do that ?
> > > >
> > > > Thanks
> > > > BS
> > > >
> > > >
> > >
> -
> > > > 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]
>
>

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


RE: Select Property !

2003-12-03 Thread Fullam, Jonathan
You are referencing modelYear as the property but your baseVO appears to
have a property called strModelYear.

-Original Message-
From: Rama, Shreekantha (K.) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:04 AM
To: Struts Users Mailing List
Subject: Select Property !
Importance: High


Hi All, 

I have the following piece of code in a .jsp


  
  

I am getting the error as : 

[No getter method available for property modelYear for bean under
name 2002]: javax.servlet.jsp.JspException: No getter method available for
property modelYear for bean under name 2002
at
org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollect
ionTag.java:273)


My baseVO class has these methods

/**
 * Gets the fieldNo
 * @return Returns a String
 */
public String getModelYear() {
return strModelYear;
}

/**
 * Sets the strModelYear
 * @param strMdlYr The strModelYear to set
 */
public void setModelYear(String strMdlYr) {
this.strModelYear = strMdlYr;
}



/**
 * Gets the ModelYearList
 * @return Returns an arraylist
 */
public ArrayList getModelYearList() {
return ModelYearList;
}

/**
 * Sets the ModelYearList
 * @param ModelYearList The ModelYearList to set
 */
public void setModelYearList(ArrayList listArray) {
this.ModelYearList = listArray;
}


What is the mistake I have done. 


Thanks & Regards
Shree


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


RE: User defined error messages

2003-12-03 Thread Witt, Mike (OH35)
I'm not sure if you are asking more than what this answer implies but ... I
use Properties stored in a properties file for my error messages.

Mike

-Original Message-
From: Greg Dunn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:40 AM
To: Struts Users Mailing List
Subject: User defined error messages


My PTB want to let our clients edit the content of certain error messages
after deployment.Any suggestions on how to accomplish this?  Thanks.


Greg


-
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: Solved super.init() dies silently after migration from struts 1.0 to struts 1.1

2003-12-03 Thread Steve Raeburn
You should really take a look at the Ant  task.
http://ant.apache.org/manual/index.html - look under Ant Tasks/Optional
tasks. It's free and it will allow you to validate your XML files as
part of the build process.

Alternatively, use an editor that will validate the files for you as you
go. I'm sure if you take a look around there are options for IDEs and
standalone editors.

Steve

> -Original Message-
> From: Ralf Hauser [mailto:[EMAIL PROTECTED]
> Sent: December 2, 2003 11:20 PM
> To: [EMAIL PROTECTED]
> Subject: Solved super.init() dies silently after migration from struts
> 1.0 to struts 1.1
>
>
> Hi,
>
> Just for that others do not waste time on this.
>
> Eventually, I found that some error is posted, but not to
> catalina.out.
>
> Unfortunately, the error message was not very telling so I
> posted an RFE to
> make it more helpful
> (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25155).
>
> Essentially, the problem was that I had both,
> 
> and
> 
> in struts-config.xml after migrating.
>
> Rgds
>
>Ralf
>
>
> -
> 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]



User defined error messages

2003-12-03 Thread Greg Dunn
My PTB want to let our clients edit the content of certain error messages
after deployment.Any suggestions on how to accomplish this?  Thanks.


Greg


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



Re: Variable value in logic:equal tag Help Req [SOLVED]

2003-12-03 Thread Shakti
Hey that <% refVar.toString %> worked man .. :-) ... at last. . now i won't
have to sit for the whole nite .. :-) ..
chao ..
Shakti

- Original Message -
From: "Shakti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:52 PM
Subject: Re: Variable value in logic:equal tag Help Req


> Hi ,
> I am still not able to make out as how can i compare values from two
> arraylists using logic iterate and logic equal , as none of them is a
> constant and i am still getting the same error.
> 1) I want to know how do i get the value of the variable created using
> bean:define ??? I am using <%= var %> but i am not getting it .. plz help
.
>
> Plz help me out of this .
> Thanks
> Shakti
> - Original Message -
> From: "Fullam, Jonathan" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, December 03, 2003 9:30 PM
> Subject: RE: Variable value in logic:equal tag Help Req
>
>
> > You can use a variable for the value attribute just as you did:  <%=
> > refValue %> as long as refValue is a variable in some scope on your
page.
> > Note that refValue must point to a String object because the equal tag
> > requires this (it converts the value of the bean pointed to by the name
> > attribute to a String for comparisons).  If refValue is not a String you
> can
> > try the following <%= refValue.toString() %>.
> >
> > -Jonathan
> >
> > -Original Message-
> > From: Shakti [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 03, 2003 10:27 AM
> > To: Struts Developers List; Struts Users Mailing List
> > Subject: Variable value in logic:equal tag Help Req
> >
> >
> > With reference this mail :
> > I trid this code but i am getting the error :can not resolve symbol
> refValue
> >
> :\bea\user_projects\mydomain\myserver\.wlnotdelete\mcc_mcc_4346456\jsp_ser
vl
> > et\__reassignta.java:376: cannot resolve symbol
> > probably occurred due to an error in /reassignta.jsp line 118:
> > 
> >
> > I want to compare values from one arraylist with another using logic
equal
> > tag but in the value="" tag how i can give a variable ??
> > Plz Help !!!
> > Thanks & Regards,
> > Shakti
> >
> >
> >
> > - Original Message -
> > From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 24, 2003 4:38 PM
> > Subject: Re: variable value in logic notEqual tag
> >
> >
> > > Use this :
> > >
> > > 
> > >  >
> > > ...
> > > 
> > >
> > >
> > > Nico.
> > >
> > > - Original Message -
> > > From: "Baljinder Singh" <[EMAIL PROTECTED]>
> > > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 24, 2003 12:03 PM
> > > Subject: variable value in logic notEqual tag
> > >
> > >
> > > > Hi All,
> > > >
> > > > I want to compare the variable in notEqual tag to value of another
> > variable
> > > > instead of comparing it to a fixed value. How can I do that ?
> > > >
> > > > Thanks
> > > > BS
> > > >
> > > >
> > >
> -
> > > > 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]
>
>

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



Re: Variable value in logic:equal tag Help Req

2003-12-03 Thread Shakti
Hi ,
I am still not able to make out as how can i compare values from two
arraylists using logic iterate and logic equal , as none of them is a
constant and i am still getting the same error.
1) I want to know how do i get the value of the variable created using
bean:define ??? I am using <%= var %> but i am not getting it .. plz help ..

Plz help me out of this .
Thanks
Shakti
- Original Message -
From: "Fullam, Jonathan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:30 PM
Subject: RE: Variable value in logic:equal tag Help Req


> You can use a variable for the value attribute just as you did:  <%=
> refValue %> as long as refValue is a variable in some scope on your page.
> Note that refValue must point to a String object because the equal tag
> requires this (it converts the value of the bean pointed to by the name
> attribute to a String for comparisons).  If refValue is not a String you
can
> try the following <%= refValue.toString() %>.
>
> -Jonathan
>
> -Original Message-
> From: Shakti [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 03, 2003 10:27 AM
> To: Struts Developers List; Struts Users Mailing List
> Subject: Variable value in logic:equal tag Help Req
>
>
> With reference this mail :
> I trid this code but i am getting the error :can not resolve symbol
refValue
>
:\bea\user_projects\mydomain\myserver\.wlnotdelete\mcc_mcc_4346456\jsp_servl
> et\__reassignta.java:376: cannot resolve symbol
> probably occurred due to an error in /reassignta.jsp line 118:
> 
>
> I want to compare values from one arraylist with another using logic equal
> tag but in the value="" tag how i can give a variable ??
> Plz Help !!!
> Thanks & Regards,
> Shakti
>
>
>
> - Original Message -
> From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]>
> Sent: Monday, November 24, 2003 4:38 PM
> Subject: Re: variable value in logic notEqual tag
>
>
> > Use this :
> >
> > 
> > 
> > ...
> > 
> >
> >
> > Nico.
> >
> > - Original Message -
> > From: "Baljinder Singh" <[EMAIL PROTECTED]>
> > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 24, 2003 12:03 PM
> > Subject: variable value in logic notEqual tag
> >
> >
> > > Hi All,
> > >
> > > I want to compare the variable in notEqual tag to value of another
> variable
> > > instead of comparing it to a fixed value. How can I do that ?
> > >
> > > Thanks
> > > BS
> > >
> > >
> > > -
> > > 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: Why isn't an ActionForm just a Map?

2003-12-03 Thread Hookom, Jacob
I'm kinda confused on this too.

It seems there's a migration towards DynaActionForms and if you read Craig's
previous post:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg34344.html

Defining a property as anything but a String seems taboo.  Let validator
assert that a property is an integer, but leave the type definition as
String in all cases on your ActionForm.

-Jake

-Original Message-
From: Philip Seay [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 9:02 AM
To: 'Struts Users Mailing List'
Subject: RE: Why isn't an ActionForm just a Map? 

According to Craig McClanahan at
http://www.theserverside.com/events/library.jsp#mcclanahan,
You would lose type safety and risk getting a ClassCastException in the
JSP.  Also, you would
not know which field names are legal.

Regards,
Phil Seay


-Original Message-
From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 5:58 AM
To: 'Struts Users Mailing List'
Subject: RE: Why isn't an ActionForm just a Map? 


One guess would be because then you would lose some of the methods which
provide more functionality than just a TransferObject provides. Such
methods
are validate and reset.

-Jonathan

-Original Message-
From: Antony Paul [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 8:39 AM
To: struts
Subject: Why isn't an ActionForm just a Map? 


This question is from the table of contents of a text book. I dont have
this
book in hand.
I have other questions also.
Why ActionForm is made Struts dependent ?.
Why not use just plain JavaBean whch can be used as TransferObject. ?

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]

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



RE: Variable value in logic:equal tag Help Req

2003-12-03 Thread Fullam, Jonathan
You can use a variable for the value attribute just as you did:  <%=
refValue %> as long as refValue is a variable in some scope on your page.
Note that refValue must point to a String object because the equal tag
requires this (it converts the value of the bean pointed to by the name
attribute to a String for comparisons).  If refValue is not a String you can
try the following <%= refValue.toString() %>.

-Jonathan

-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:27 AM
To: Struts Developers List; Struts Users Mailing List
Subject: Variable value in logic:equal tag Help Req


With reference this mail :
I trid this code but i am getting the error :can not resolve symbol refValue
:\bea\user_projects\mydomain\myserver\.wlnotdelete\mcc_mcc_4346456\jsp_servl
et\__reassignta.java:376: cannot resolve symbol
probably occurred due to an error in /reassignta.jsp line 118:


I want to compare values from one arraylist with another using logic equal
tag but in the value="" tag how i can give a variable ??
Plz Help !!!
Thanks & Regards,
Shakti



- Original Message -
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Monday, November 24, 2003 4:38 PM
Subject: Re: variable value in logic notEqual tag


> Use this :
>
> 
> 
> ...
> 
>
>
> Nico.
>
> - Original Message -
> From: "Baljinder Singh" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]>
> Sent: Monday, November 24, 2003 12:03 PM
> Subject: variable value in logic notEqual tag
>
>
> > Hi All,
> >
> > I want to compare the variable in notEqual tag to value of another
variable
> > instead of comparing it to a fixed value. How can I do that ?
> >
> > Thanks
> > BS
> >
> >
> > -
> > 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]


Select Property !

2003-12-03 Thread Rama, Shreekantha (K.)
Hi All, 

I have the following piece of code in a .jsp


  
  

I am getting the error as : 

[No getter method available for property modelYear for bean under name 2002]: 
javax.servlet.jsp.JspException: No getter method available for property modelYear for 
bean under name 2002
at 
org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:273)
 


My baseVO class has these methods

/**
 * Gets the fieldNo
 * @return Returns a String
 */
public String getModelYear() {
return strModelYear;
}

/**
 * Sets the strModelYear
 * @param strMdlYr The strModelYear to set
 */
public void setModelYear(String strMdlYr) {
this.strModelYear = strMdlYr;
}



/**
 * Gets the ModelYearList
 * @return Returns an arraylist
 */
public ArrayList getModelYearList() {
return ModelYearList;
}

/**
 * Sets the ModelYearList
 * @param ModelYearList The ModelYearList to set
 */
public void setModelYearList(ArrayList listArray) {
this.ModelYearList = listArray;
}


What is the mistake I have done. 


Thanks & Regards
Shree


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



Re: Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread Rouven Gehm
Well i have to set validate false of the action in the struts-config.xml,
then i only have client side validation without submitting,
but then i have to call the .validate Method in the action to do the 
server-side validation, if i disable JavaScript.

Any more ideas to this problem ?


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 12:49 PM
Subject: Validator: Unwanted Client side AND Server side validation


> Hi,
> 
> When using client side validation the form is submitted regardless of Javascript
> validation check occuring (After clicking OK on the Javascript popup warning
> following an error the form get submitted anyway). 
> 
> I used validation already without this behaviour to occur ... I must be
> misconfiguring something but cannot find out what it is. Validation works as
> expected Server side.
> 
> I am using Struts 1.1 with the bundled Validator together with Scaffold 1_0.
> 
> Any idea welcome, Patrick
> 
> 
> -
> 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: Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread Andy Schmidgall
Make sure you you have the return statement in the onsubmit handler.
Otherwise it will always submit the form.

It needs to look like this: onsubmit="return validateFooForm(this)"

If that's not the problem, you may be trying to validate using an
incorrect field name. That's happened to me a few times.

-Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 5:50 AM
To: [EMAIL PROTECTED]
Subject: Validator: Unwanted Client side AND Server side validation


Hi,

When using client side validation the form is submitted regardless of
Javascript validation check occuring (After clicking OK on the
Javascript popup warning following an error the form get submitted
anyway). 

I used validation already without this behaviour to occur ... I must be
misconfiguring something but cannot find out what it is. Validation
works as expected Server side.

I am using Struts 1.1 with the bundled Validator together with Scaffold
1_0.

Any idea welcome, Patrick


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



Variable value in logic:equal tag Help Req

2003-12-03 Thread Shakti
With reference this mail :
I trid this code but i am getting the error :can not resolve symbol refValue
:\bea\user_projects\mydomain\myserver\.wlnotdelete\mcc_mcc_4346456\jsp_servl
et\__reassignta.java:376: cannot resolve symbol
probably occurred due to an error in /reassignta.jsp line 118:


I want to compare values from one arraylist with another using logic equal
tag but in the value="" tag how i can give a variable ??
Plz Help !!!
Thanks & Regards,
Shakti



- Original Message -
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Monday, November 24, 2003 4:38 PM
Subject: Re: variable value in logic notEqual tag


> Use this :
>
> 
> 
> ...
> 
>
>
> Nico.
>
> - Original Message -
> From: "Baljinder Singh" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]>
> Sent: Monday, November 24, 2003 12:03 PM
> Subject: variable value in logic notEqual tag
>
>
> > Hi All,
> >
> > I want to compare the variable in notEqual tag to value of another
variable
> > instead of comparing it to a fixed value. How can I do that ?
> >
> > Thanks
> > BS
> >
> >
> > -
> > 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] image file to byte array

2003-12-03 Thread Kris Schneider
This seems like a problem waiting to happen:

byte [] loader = new byte [ (int) raf.length() ];
while ( (raf.read( loader )) > 0 )
{
  out.write( loader );
  out.flush();
  out.close();
}

RandomAccessFile.read(byte[]) is *not* guaranteed to completely fill the buffer
you provide. It will read *at most* loader.length bytes. Obviously, if your loop
executes more than once you're in trouble. If you really want to do this sort of
thing instead of the typical "copy bytes" approach, you could use:

raf.readFully(loader);

Quoting Adam L <[EMAIL PROTECTED]>:

> It might be your output stream.. here's my code, which does work:
> 
> File imagedata = new File(img.getImageLocation(),
> img.getImageId() );
> 
> resp.setContentType( img.getImageType() );
> 
> RandomAccessFile raf = new RandomAccessFile( imagedata, "r" );
> 
> resp.setContentLength( (int) raf.length() );
> ServletOutputStream out = resp.getOutputStream();
> 
> byte [] loader = new byte [ (int) raf.length() ];
> while ( (raf.read( loader )) > 0 )
> {
>   out.write( loader );
>   out.flush();
>   out.close();
> }
> 
> 
> 
> - Original Message -
> From: "Mark Lowe" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, December 03, 2003 3:32 AM
> Subject: [ot] image file to byte array
> 
> 
> >
> > Although its not a struts problem as such I do happen to be using
> > struts in my app..
> >
> > Here some code as it will say more in less words that it will take to
> > explain
> >
> > In my action servlet I have something like this..
> >
> > 
> > response.setContentType("image/jpeg");
> > response.setHeader("Cache-Control", "no-cache");
> > OutputStream ou = response.getOutputStream();
> >
> > String imageStr = "file:///foo/test.jpg";
> > java.net.URI imgUri = new java.net.URI(imageStr);
> > File imageFile = new File(imgUri);
> > FileInputStream imageFileStream = new FileInputStream(imageFile);
> > byte[] image = new byte[(int)
> > imageFile.length()];System.out.println("imageFile.length()"+
> > imageFile.length());
> > ou.write(image);
> >
> > 
> >
> > Now the system out returns the correct amount of bytes so its seeing
> > the image and not getting file not found exception. but it just wont
> > stream back to my jsp when i run the action.
> >
> > This code is basically a else clause when no results are returned from
> > the database.. The results from the db (via hibernate works just fine)
> > but this bit doesn't..
> >
> > Can anyone who's done this cast their eye over it for anything
> > obviously wrong. Could it be a permissions issue?
> >
> > Cheers Mark

-- 
Kris Schneider 
D.O.Tech   

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



RE: Why isn't an ActionForm just a Map?

2003-12-03 Thread Philip Seay
According to Craig McClanahan at
http://www.theserverside.com/events/library.jsp#mcclanahan,
You would lose type safety and risk getting a ClassCastException in the
JSP.  Also, you would
not know which field names are legal.

Regards,
Phil Seay


-Original Message-
From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 5:58 AM
To: 'Struts Users Mailing List'
Subject: RE: Why isn't an ActionForm just a Map? 


One guess would be because then you would lose some of the methods which
provide more functionality than just a TransferObject provides. Such
methods
are validate and reset.

-Jonathan

-Original Message-
From: Antony Paul [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 8:39 AM
To: struts
Subject: Why isn't an ActionForm just a Map? 


This question is from the table of contents of a text book. I dont have
this
book in hand.
I have other questions also.
Why ActionForm is made Struts dependent ?.
Why not use just plain JavaBean whch can be used as TransferObject. ?

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]



Re: Dynamic assignment of tiles

2003-12-03 Thread Ted Husted
The XMLs files are just used to generate an object graph. If you want to 
  change definitions dynamically, you'd want to look at changing the 
object graph rather than the XML script.

Though, dynamic content is not usually dependant on the Tiles definition 
itself. Typically, dynamic content is passed through the request and 
then merged into the server page.

If you are talking about adding additional tiles to a list at runtime, I 
believe Cedric describes some techniques for that in his advanced Tiles 
document.

http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf

Essentially, you might be talking about creating a profile and then 
using that profile to create the list of tiles to render.

Meanwhile, no this isn't a DEV topic, and yes, you should be posting 
items like this to the USER list. DEV is for features that don't exist 
yet :)

-Ted.

Paul-J Woodward wrote:
Dear All,

I am working on an intranet website using struts/tiles. Due to server 
restrictions write access is not allowed to the disk from which content is 

served. In order to update/add to the content of the website dynamically I 

need to change the tileDefinitions.xml file, which is obviously not 
possible.

My only solution so far is to write my own version of the 
org.apache.struts.tiles.xmlDefinition package to access a database instead 

- essentially create a TilesDefinitionFactory which reads the definitions 
from a database.

I was wondering if anyone had any suggestions or alternatives?

Paul

PS Apologies for the repost - on 2nd thoughts this seems far more 
dev-oriented than most posts on users list.


Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752

-
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 validator with Date property ???

2003-12-03 Thread Ramachandiran, Karuna
Change the type of date type to java.sql.Date you won't get that
exception. This is because the Beanutils which they use to copy the data
form request to form is not having a corresponding converter to convert
to java.util.Date but it has a converter to convert to sql date

Thanks

Karuna

-Original Message-
From: Mauricio T. Ferraz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 02, 2003 1:10 PM
To: Struts Users Mailing List
Subject: Struts validator with Date property ???


In my Form a hava a property java.util.Date, I can use the validator
Struts? Or I just can have properties "Strings" ??? in my textfiels on
form??? In the Struts' webapps has a example, the use only String to
input of data...

I got

 java.lang.IllegalArgumentException: argument type mismatch


Thanks, for help.


-
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: Debug/Breakpoint Problem with Sysdeo Tomcat Plugin in Eclipse

2003-12-03 Thread Colin Foulkes
Yes, that was the problem.

Thanks a lot..

Colin

-Original Message-
From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]
Sent: December 2, 2003 12:54 PM
To: Struts Users Mailing List
Subject: RE: Debug/Breakpoint Problem with Sysdeo Tomcat Plugin in
Eclipse


If I recall ... You bring up preferences, expand Tomcat, choose the "Source
Path", and choose the projects you wish the source to be found for.

HTH, Mike

-Original Message-
From: Colin Foulkes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 11:21 AM
To: Struts Users Mailing List
Subject: Debug/Breakpoint Problem with Sysdeo Tomcat Plugin in Eclipse


Hi,

I have a strange problem with the Sysdeo Tomcat plugin.
I set a breakpoint in a java class (struts action), launch Tomcat and
navigate to my struts application..

The IDE breaks at the correct place in the application (the debug
information .. variables, location, stack etc. are all shown fine, but there
is no highlighted line in the relevant java code window. I can perform debug
stepping OK, but there is no viual confirmation in the code window.

Has anyone else noticed this? Can someone suggest a solution?

Thanks in advance..

Colin


-
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] initialization of application-wide drop-down settings

2003-12-03 Thread Haroon Rafique
On Yesterday at 4:32pm, KW=>Kirk Wylie <[EMAIL PROTECTED]> wrote:

KW> 
KW> Okay, another real brute-force approach which is taken by old-skool
KW> Java systems (i.e. it's a real idiom, and is used in such places as
KW> the security.policy file amongst other places) is to use property
KW> files, but in a specific way for ordered, multi-value properties like
KW> this:
KW> - Create a "key", such as "m7.my.listbox"
KW> - Add a property which is a count, like "m7.my.listbox.count"
KW> - Add individual properties which are numbered, from 0 to (count - 1): 
KW> "m7.my.listbox.0", "m7.my.listbox.1", etc.
KW> In your case, you might then have a property file which would look like:
KW> desc.phone.types.count=3
KW> desc.phone.types.0.mnemonic=B
KW> desc.phone.types.0.value=Business Tel.
KW> desc.phone.types.1.mnemonic=C
KW> desc.phone.types.1.value=Cell Phone
KW> desc.phone.types.2.mnemonic=D
KW> desc.phone.types.2.value=Pager
KW> 

Kirk,

I definitely like this idea. Thanks for keeping the creative juices 
flowing.

KW> 
KW> [..snip..]
KW> 
KW> Just an option. You'll probably hear soon enough about the more elegant 
KW> approaches that you've not discarded. But in my experience, when all 
KW> else fails, Java Property files tend to solve a lot of problems.

I'll leave the esoteric ideas for later and try the simple approach first.

KW> 
KW> Kirk Wylie
KW> M7 Corporation
KW> 

--
Haroon Rafique
<[EMAIL PROTECTED]>


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



Re: [ot] image file to byte array

2003-12-03 Thread Adam L
It might be your output stream.. here's my code, which does work:

File imagedata = new File(img.getImageLocation(),
img.getImageId() );

resp.setContentType( img.getImageType() );

RandomAccessFile raf = new RandomAccessFile( imagedata, "r" );

resp.setContentLength( (int) raf.length() );
ServletOutputStream out = resp.getOutputStream();

byte [] loader = new byte [ (int) raf.length() ];
while ( (raf.read( loader )) > 0 )
{
  out.write( loader );
  out.flush();
  out.close();
}



- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:32 AM
Subject: [ot] image file to byte array


>
> Although its not a struts problem as such I do happen to be using
> struts in my app..
>
> Here some code as it will say more in less words that it will take to
> explain
>
> In my action servlet I have something like this..
>
> 
> response.setContentType("image/jpeg");
> response.setHeader("Cache-Control", "no-cache");
> OutputStream ou = response.getOutputStream();
>
> String imageStr = "file:///foo/test.jpg";
> java.net.URI imgUri = new java.net.URI(imageStr);
> File imageFile = new File(imgUri);
> FileInputStream imageFileStream = new FileInputStream(imageFile);
> byte[] image = new byte[(int)
> imageFile.length()];System.out.println("imageFile.length()"+
> imageFile.length());
> ou.write(image);
>
> 
>
> Now the system out returns the correct amount of bytes so its seeing
> the image and not getting file not found exception. but it just wont
> stream back to my jsp when i run the action.
>
> This code is basically a else clause when no results are returned from
> the database.. The results from the db (via hibernate works just fine)
> but this bit doesn't..
>
> Can anyone who's done this cast their eye over it for anything
> obviously wrong. Could it be a permissions issue?
>
> Cheers Mark
>
>
> -
> 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: Wht does tag in web.xml means ??

2003-12-03 Thread John . Pitchko


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

RE: Why isn't an ActionForm just a Map?

2003-12-03 Thread Fullam, Jonathan
One guess would be because then you would lose some of the methods which
provide more functionality than just a TransferObject provides. Such methods
are validate and reset.

-Jonathan

-Original Message-
From: Antony Paul [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 8:39 AM
To: struts
Subject: Why isn't an ActionForm just a Map? 


This question is from the table of contents of a text book. I dont have this
book in hand.
I have other questions also.
Why ActionForm is made Struts dependent ?.
Why not use just plain JavaBean whch can be used as TransferObject. ?

rgds
Antony Paul

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


Re: Positional problem?

2003-12-03 Thread John Smart
We did something like that using an extra field (focus) to know where 
you are and some javascript to place the focus at the right place when 
the page is redisplayed.

Bjørn T Johansen wrote:

I have a number of jsp pages that are longer than one page and if I am
at the bottom of a page and submit the page, I get back at the top of
the page. Is there a way to get back, after the submit, to the place you
were before the submit?
Regards,

BTJ

-
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: Positional problem?

2003-12-03 Thread Paul-J Woodward

I once had the same problem. I overcame it using embedded links in the page, 
submitting the name of the link to be scrolled to as a hidden form element and placing 
a redirect in the onload property of the body tag. It worked, but it wasn't fantastic.

You may be able to use javascript to get the scroll position from the window object 
and pass that in the form, although that may introduce cross-browser compatibility 
issues.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



   
   
 
  Bjørn T Johansen 
   
 
  <[EMAIL PROTECTED]> To:   Struts Users Mailing List 
<[EMAIL PROTECTED]>

   cc: 
   
 
  03/12/2003 13:13 Subject:  Positional problem?   
   
 
  Please respond to
   
 
  "Struts Users
   
 
  Mailing List"
   
 
   
   
 
   
   
 




I have a number of jsp pages that are longer than one page and if I am
at the bottom of a page and submit the page, I get back at the top of
the page. Is there a way to get back, after the submit, to the place you
were before the submit?


Regards,

BTJ


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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



Why isn't an ActionForm just a Map?

2003-12-03 Thread Antony Paul
This question is from the table of contents of a text book. I dont have this
book in hand.
I have other questions also.
Why ActionForm is made Struts dependent ?.
Why not use just plain JavaBean whch can be used as TransferObject. ?

rgds
Antony Paul

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



Unicode text in Property files

2003-12-03 Thread Debashish Chakrabarty
Hi,

I have a query and request you to kindly spare some time to enlighten me.

I am making a web application that would translate words from English to various 
Indian languages using Struts. The application would not use any database so I must 
use some flat file to store the translation in form of English_word = Hindi_meaning 
(name value pair or some other form). There would be 11 Indian languages apart from 
Hindi. Since Java Property files are used in application localization I was of the 
opinion that they could easily be used to store this data (for eg. a property file 
State.propeties might store the names of Indian states in Hindi ex: Delhi= ??). 
The value is written in Hindi unicode here, a Hindi Unicode font is available here for 
free download.

Important point is: My language data (the value for english keys) would be in Unicode, 
 as above.  I understand that the default encoding of the property file is not 
Unicode.  So while saving the property file I will have to save it with UTF-8 
encoding. Since struts heavily uses the Property files for internationalization, will 
it be possible for me to use the files with Unicode text in them. 

I request your advice on how to use the Property file in such a case (or should I use 
the normal tab-separated text option as above, with the file,being read using Java I/O 
API).

Thanks,
Debashish Chakrabarty
http://www.jroller.com/page/debashish






Positional problem?

2003-12-03 Thread Bjørn T Johansen
I have a number of jsp pages that are longer than one page and if I am
at the bottom of a page and submit the page, I get back at the top of
the page. Is there a way to get back, after the submit, to the place you
were before the submit?


Regards,

BTJ


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



SV: Validation of a property java.util.Date is possible?

2003-12-03 Thread Håkan Fransson
You can only have String and boolean types on the form. Use Struts validator
to validate.
Take a look here
http://developer.java.sun.com/developer/Books/javaprogramming/struts/struts_
chptr_12.pdf

/Hakan

-Ursprungligt meddelande-
Från: Mauricio T. Ferraz [mailto:[EMAIL PROTECTED]
Skickat: den 3 december 2003 12:25
Till: Struts Users Mailing List
Ämne: Validation of a property java.util.Date is possible?


In my Form a have a property java.util.Date, I can validate it ?
Or I just can have properties "Strings" ??? in my textfiels on form???

I can map a textfield of a Form HTML to a property java.util.Date of a
JavaBean ???

How can I do it?



I got

 java.lang.IllegalArgumentException: argument type mismatch


Thanks, for help.
Mauricio






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



[OT] Re: Changing SessionId at every request

2003-12-03 Thread Adam Hardy
Will Hartung is asking the same questions just hours ago in the thread 
"cross-site single sign on" on the tomcat user list - so you are not 
alone. However I don't have any experience with this (& it's getting 
OT). Sorry. Following is an interesting bit from his message:

Now, if you have sitea.com and siteb.com, then the cookie technique can't
work (as neither can set a cookie for the other). So, I'm thinking that you
can do something similiar, a signed token, in a hidden field and then having
to submit a form to get to the new site.
Of course, you can always stick the token on the URL as well.
On 12/03/2003 10:42 AM Gurpreet Dhanoa wrote:
hi Adam

You are on the right track in understanding my concern. Anyway i  have
madeit possible. But now there is a small new issue.
it is
I want to access the sessionId of another Web Server into some other web
server.
I meant say i have a domain A on Server A, I want to access the sessionId of
Domain A onto the Domain B on Server B.
I think this is a very strange question but i have been asked the same.

ANy help of you guys
Thanks
Gary


- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:03 PM
Subject: Re: Changing SessionId at every request


I assume that Gurpreet wants to do it for security reasons and it's not
a bad idea. It certainly means that nobody would be able to share a
session, and so therefor a session-hijack would become obviously
immediately.
I think expiring the session is overkill - I would just leave the
session as it is and use the filter to check and change my own
hand-rolled session id.
Adam

On 12/03/2003 08:20 AM Navjot Singh wrote:

don't know why do you wish to do so?
but it an be done. Write a filter. pass every request thru that.
1. Fetch the session, expire it. Server will assign new.
2. Fetch the session, don't expire the session, just append a timestamp
to

it. set a cookie and use that to maintain session.

HTH
navjot singh


-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:44 AM
To: Struts Users Mailing List
Subject: Changing SessionId at every request
HI,

IS it possible to change the Session Id generated by the Web
Server at every request for the  same client. I wil make it much
more clear.
Say i have a Servlet running on Tomcat. what i want is when ever
any User lets assume USER A ask for a request i want to change the
sessionId server variable which has been gerenrated by the Web
Server to uniquely identify the client.
Purpose behind doing this is to make every request safe.

Any suggections will be higly appreciated.

Thanks in Advance
Gary


--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread inaminute
Hi,

When using client side validation the form is submitted regardless of Javascript
validation check occuring (After clicking OK on the Javascript popup warning
following an error the form get submitted anyway). 

I used validation already without this behaviour to occur ... I must be
misconfiguring something but cannot find out what it is. Validation works as
expected Server side.

I am using Struts 1.1 with the bundled Validator together with Scaffold 1_0.

Any idea welcome, Patrick


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



Validation of a property java.util.Date is possible?

2003-12-03 Thread Mauricio T. Ferraz
In my Form a have a property java.util.Date, I can validate it ?
Or I just can have properties "Strings" ??? in my textfiels on form???

I can map a textfield of a Form HTML to a property java.util.Date of a JavaBean ???

How can I do it?



I got

 java.lang.IllegalArgumentException: argument type mismatch


Thanks, for help.
Mauricio






Re: Dynamic assignment of tiles

2003-12-03 Thread Paul-J Woodward

Andreas,

Thanks for the ideas - I see your point about the dangers of a proprietary solution.

When it comes to changing the site in such a way that new actions are required (more a 
framework change than a content change), this really has to go through a test and 
user-acceptance process, hence access would be required to the development servers, 
whereas static content (i.e. news updates) is a far less serious change which I want 
to happen quickly and easily by piviledged users (i.e. via an online wizard).

I've made some progress to writing a tiles definition factory which uses a database - 
it has been (so far) easier than I expected. I'm going to give it a go and see if it 
works. One further issue I have to contend with is that the production servers are 11 
completely independent machines.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



   
   
   
  "Dr. Andreas 
   
   
  Krüger"To:   Struts Users Mailing List 
<[EMAIL PROTECTED]>

  <[EMAIL PROTECTED]cc:
   
  
  -ratio.com>Subject:  Re: Dynamic assignment of 
tiles  
 
   
   
   
  03/12/2003 10:23 
   
   
  Please respond to
   
   
  "Struts Users
   
   
  Mailing List"
   
   
   
   
   
   
   
   




Paul-J Woodward anticipates

> the need to store the contents of uploaded pages  in a database as a blob,

"War story" / food for thought:

Almost ten years ago and totally unrelated to Struts or even Java, I did
something similar.  At that time, I had very good success with a home brew
object oriented concept on top of a relational database.

I thought of my individual database row as an "object". There would be a
relationship to a "class".  If I wanted to do anything particular with the
object, I would think of it as, "I want to call a method".  Given the class
and the name of the method I wanted to call, a database lookup would tell me
which particular implementation would do the trick.

In this way, I had, in fact, implemented object orientation.  The
architecture would easily accommodate various implementations for special
ways of performing common tasks.  In my own (biased) opinion, the net result
was an stable, flexible and successful architecture.  The customer loved it,
too (the stability in particular).  The major drawback was that, for a
couple of years or so, I was the only one who dared to touch the code.

In this age of Java, of course, you could simply use EJBs.  I recommend you
evaluate whether they fit your needs (I you haven't done that already).

Regards,

Andreas

Dr. Andreas Krüger, [EMAIL PROTECTED]
DV-RATIO Nordwest GmbH, Tel.: +49 211 577 9

Validator a property java.util.Date is possible??

2003-12-03 Thread Mauricio T. Ferraz
In my Form a hava a property java.util.Date, I can use the validator Struts?
Or I just can have properties "Strings" ??? in my textfiels on form???
In the Struts' webapps has a example, the use only String to input of
data...

I got

 java.lang.IllegalArgumentException: argument type mismatch


Thanks, for help.





Re: Wht does tag in web.xml means ??

2003-12-03 Thread Claire Wall
The  tag determines the order in which the specified
classes are run when the application first starts. so for example, say i had
two servlets which i wanted to start up immediately when the application
starts, i would do the following:


  myServlet1
  package1.myServlet1
  ...
  1



  myServlet2
  package1.myServlet2
  ...
  2


this means that myServlet1 would start up (run) first and then myServlet2
would start up after myServlet1. Often the ordering does not matter but if
you had a class which depended upon another to be up and running first, you
would need to order them correctly otherwise your application may not run as
expected and may well throw exceptions.

HTH
Claire


- Original Message -
From: "Shakti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:13 AM
Subject: Wht does  tag in web.xml means ??


Hi,
Wht does  tag in web.xml means ?? I am using struts
framework with weblogic and i am not able to find out wht is does this tag
implies ? Is this the cause due to which my weblogic is not picking up new
compiled classes without restarting ..???
waiting for a reply 
Thanks & Regards,
Shakti.





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



RE: Wht does tag in web.xml means ??

2003-12-03 Thread Tapan Nanawati
Hi Shakti,
  means you want call your servlet class at the time of
server startup.
A typical use will be for loading context/application level parameters in
the memory.
The value indicates the order in which servlets are loaded.
For eg:- 1 indicates this servlet will be loaded first. 
Also, You want action servlet to be loaded before calling your personal
servlet.
Tapan


-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 6:13 PM
To: Struts Users Mailing List
Subject: Wht does  tag in web.xml means ??


Hi,
Wht does  tag in web.xml means ?? I am using struts
framework with weblogic and i am not able to find out wht is does this tag
implies ? Is this the cause due to which my weblogic is not picking up new
compiled classes without restarting ..???
waiting for a reply 
Thanks & Regards,
Shakti.


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



Re: Dynamic assignment of tiles

2003-12-03 Thread "Dr. Andreas Krüger"
Paul-J Woodward anticipates

the need to store the contents of uploaded pages  in a database as a blob,
"War story" / food for thought:

Almost ten years ago and totally unrelated to Struts or even Java, I did 
something similar.  At that time, I had very good success with a home brew 
object oriented concept on top of a relational database.

I thought of my individual database row as an "object". There would be a 
relationship to a "class".  If I wanted to do anything particular with the 
object, I would think of it as, "I want to call a method".  Given the class 
and the name of the method I wanted to call, a database lookup would tell me 
which particular implementation would do the trick.

In this way, I had, in fact, implemented object orientation.  The 
architecture would easily accommodate various implementations for special 
ways of performing common tasks.  In my own (biased) opinion, the net result 
was an stable, flexible and successful architecture.  The customer loved it, 
too (the stability in particular).  The major drawback was that, for a 
couple of years or so, I was the only one who dared to touch the code.

In this age of Java, of course, you could simply use EJBs.  I recommend you 
evaluate whether they fit your needs (I you haven't done that already).

Regards,

Andreas

Dr. Andreas Krüger, [EMAIL PROTECTED]
DV-RATIO Nordwest GmbH, Tel.: +49 211 577 996-0, Fax:  +49 211 559 1617
Leostraße 31, 40545 Düsseldorf, Germany


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


Struts validator with Date property ???

2003-12-03 Thread Mauricio T. Ferraz
In my Form a hava a property java.util.Date, I can use the validator Struts?
Or I just can have properties "Strings" ??? in my textfiels on form???
In the Struts' webapps has a example, the use only String to input of
data...

I got

 java.lang.IllegalArgumentException: argument type mismatch


Thanks, for help.


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



validator java.util.Date object ???

2003-12-03 Thread Mauricio T. Ferraz
In my Form a hava a property java.util.Date, I can use the validator Struts?
Or I just can have properties "Strings" ??? in my textfiels on form???
In the Struts' webapps has a example, the use only String to input of data...


Thanks, for help.


Validator with a property java.util.Date ???

2003-12-03 Thread Mauricio T. Ferraz



In my Form a 
hava a property java.util.Date, I can use the validator Struts?Or I just can 
have properties "Strings" ??? in my textfiels on form???In the Struts' 
webapps has a example, the use only String to input ofdata...I 
got java.lang.IllegalArgumentException: argument type 
mismatchThanks, for help.

 
 

  
  

  Mauricio 
  Tavares FerrazDesenvolvedor Java/J2EE

  
  

  
Av. Ibirapuera, 2120 
  Sala 205 Indianópolis - SPCEP 04028-001 - Brasil

  www.cilix.com.brTel. (+55 11) 5054 
  6505Fax. (+55 11) 5054 
6505


ActionMapping - dependency - question

2003-12-03 Thread Zimmek, Jan
Hi,

I have started to develop several reusable struts-enhancements like
(conditional-execution of actions, workflow, ...).
All of them have been realized using the nested  element of
the  element which is working very nice ;)

What I do not understand is, why the ConfigRuleSet.java defines the
following rule:

digester.addSetProperty("struts-config/action-mappings/action/set-property",
"property", "value");

instead of something similar to the datasource/plugin - rule:

digester.addRule("struts-config/plug-in/set-property", new
PlugInSetPropertyRule());

which invokes a method E.g. :

addProperty(String key, String value)

and not a "setter"-method like (when property="test") :

setTest(String value)


Due to this fact I am running into problem because I am not able to use
multiple enhancements at the same time, unless the defined
"ActionMapping"-class of the action implements "setter"-methods for all
required properties.

E.g:

class MyMapping
{
  setPermissionName()
  setNextFlow()
  setXXX
  ...
}

In my opinion this is a dependency which contradicts the independency of the
struts-framework as a whole.

It would be great if one of you could give me a hint on how to solve my
problem without changing the struts.DTD or anything along those lines.

Any help is very appreciated.

Jan Zimmek

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



Re: MySQL Driver List

2003-12-03 Thread Kwok Peng Tuck
Uh, there's no installer for windows.
Just a tar.gz file.
If you have problem with the main link just pick a mirror. 
Just have some patience.

Gurpreet Dhanoa wrote:

Hey

I accesed the page the page is coming up but when u try to download the
installer for windows
it taked to FtP address andhangs on
Can u  look into it.

Thanks
Gary
- Original Message -
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:05 PM
Subject: Re: MySQL Driver List
 

It's working fine ...
check back in a while, maybe your internet access is acting up at the
moment.
Gurpreet Dhanoa wrote:

   

this URl is not working

Please advise

Thanks
Gary
- Original Message -
From: "Christian Burger" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 2:00 PM
Subject: RE: MySQL Driver List
Use this for Java!! Not the ODBC!

http://www.mysql.com/downloads/api-jdbc-stable.html



_
Please be advised that the information contained herein is confidential
 

and
 

intended only for use by the individual stated above. If you are not the
named recipient, you are hereby notified that any disclosure,
 

distribution,
 

dissemination, or copying is prohibited. If this information has been
directed to you in error, please contact the sender immediately at the
telephone number listed above.


-
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: Changing SessionId at every request

2003-12-03 Thread Gurpreet Dhanoa
Hi Andrew

You are right . I can implement SSL but there must be a solution for this
trouble

right
Thanks

Gary
- Original Message -
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:14 PM
Subject: RE: Changing SessionId at every request


> ahhh... ok I think I see what you mean
>
> So by 'hand rolled' sessionId what you mean is some kind of token that
must
> be submitted with each request to verify that it came from the real
client?
> (Rather like the token mechanism used to detect double submissions)
>
> If he is after real security though, I would think using SSL might be a
> safer option - though the performance is lower.
>
>
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 3 December 2003 17:33
> To: Struts Users Mailing List
> Subject: Re: Changing SessionId at every request
>
>
> I assume that Gurpreet wants to do it for security reasons and it's not
> a bad idea. It certainly means that nobody would be able to share a
> session, and so therefor a session-hijack would become obviously
> immediately.
>
> I think expiring the session is overkill - I would just leave the
> session as it is and use the filter to check and change my own
> hand-rolled session id.
>
> Adam
>
> On 12/03/2003 08:20 AM Navjot Singh wrote:
> > don't know why do you wish to do so?
> > but it an be done. Write a filter. pass every request thru that.
> >
> > 1. Fetch the session, expire it. Server will assign new.
> > 2. Fetch the session, don't expire the session, just append a timestamp
to
> > it. set a cookie and use that to maintain session.
> >
> > HTH
> > navjot singh
> >
> >
> >>-Original Message-
> >>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, December 03, 2003 11:44 AM
> >>To: Struts Users Mailing List
> >>Subject: Changing SessionId at every request
> >>
> >>
> >>HI,
> >>
> >>IS it possible to change the Session Id generated by the Web
> >>Server at every request for the  same client. I wil make it much
> >>more clear.
> >>
> >>Say i have a Servlet running on Tomcat. what i want is when ever
> >>any User lets assume USER A ask for a request i want to change the
> >>sessionId server variable which has been gerenrated by the Web
> >>Server to uniquely identify the client.
> >>
> >>Purpose behind doing this is to make every request safe.
> >>
> >>
> >>Any suggections will be higly appreciated.
> >>
> >>
> >>Thanks in Advance
> >>Gary
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> struts 1.1 + tomcat 5.0.14 + java 1.4.2
> Linux 2.4.20 RH9
>
> -
> 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: Changing SessionId at every request

2003-12-03 Thread Andrew Hill
ahhh... ok I think I see what you mean

So by 'hand rolled' sessionId what you mean is some kind of token that must
be submitted with each request to verify that it came from the real client?
(Rather like the token mechanism used to detect double submissions)

If he is after real security though, I would think using SSL might be a
safer option - though the performance is lower.


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 3 December 2003 17:33
To: Struts Users Mailing List
Subject: Re: Changing SessionId at every request


I assume that Gurpreet wants to do it for security reasons and it's not
a bad idea. It certainly means that nobody would be able to share a
session, and so therefor a session-hijack would become obviously
immediately.

I think expiring the session is overkill - I would just leave the
session as it is and use the filter to check and change my own
hand-rolled session id.

Adam

On 12/03/2003 08:20 AM Navjot Singh wrote:
> don't know why do you wish to do so?
> but it an be done. Write a filter. pass every request thru that.
>
> 1. Fetch the session, expire it. Server will assign new.
> 2. Fetch the session, don't expire the session, just append a timestamp to
> it. set a cookie and use that to maintain session.
>
> HTH
> navjot singh
>
>
>>-Original Message-
>>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, December 03, 2003 11:44 AM
>>To: Struts Users Mailing List
>>Subject: Changing SessionId at every request
>>
>>
>>HI,
>>
>>IS it possible to change the Session Id generated by the Web
>>Server at every request for the  same client. I wil make it much
>>more clear.
>>
>>Say i have a Servlet running on Tomcat. what i want is when ever
>>any User lets assume USER A ask for a request i want to change the
>>sessionId server variable which has been gerenrated by the Web
>>Server to uniquely identify the client.
>>
>>Purpose behind doing this is to make every request safe.
>>
>>
>>Any suggections will be higly appreciated.
>>
>>
>>Thanks in Advance
>>Gary
>>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9

-
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: Data Access Optmizing

2003-12-03 Thread Srivastava, Ravi Prakash
Hi Milind 

I am sorry to all of you.

I am ravi.

Ravi

-Original Message-
From: Milind Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:12 PM
To: 'Struts Users Mailing List'
Subject: RE: Data Access Optmizing


If you can use a stored procedure instead of a multiple SQL statements then
it would improve your performance significantly. The advantages are obvious
but then if you plan to develop a solution that works on the different types
of databases then this solution may not work. We did this in many situations
and have seen a significant improvement.

Thanks,
Milind

-Original Message-
From: Zoran Avtarovski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:41 AM
To: Struts User Group
Subject: Data Access Optmizing


I have a small struts web app which stores user entered information in a DB
and then it performs some calculations on the data and spits out a results
page.

The app is working fine but I'm seeing some performance issues with regards
to data access. I'm using simple data access objects which connect to a
container managed JNDI pool. I can retrieve large amounts of data quite
quickly but when I use nested connection performance really suffers.

By nested calls I mean that say I retrieve a Collection of a couple of
thousand user response objects (which are retrieved quite quickly) and then
I process the responses by iterating through them to produce a Collection of
user feedback objects. During each cycle I make a number of database calls
to get information related to processing the individual user response. This
is where things get really slw.

What I'm after is some pointers on what the best practise in dealing with
this situation is. How do others get around this issue?

My thinking is that it's not the data access method (simple DAO's) but more
the fact that I'm opening and closing so many connections during the
processing phase.

Any help would be really appreciated.

Zoran


-
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]
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

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



Re: Changing SessionId at every request

2003-12-03 Thread Gurpreet Dhanoa
hi Adam

You are on the right track in understanding my concern. Anyway i  have
madeit possible. But now there is a small new issue.
it is

I want to access the sessionId of another Web Server into some other web
server.
I meant say i have a domain A on Server A, I want to access the sessionId of
Domain A onto the Domain B on Server B.

I think this is a very strange question but i have been asked the same.

ANy help of you guys
Thanks
Gary



- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:03 PM
Subject: Re: Changing SessionId at every request


> I assume that Gurpreet wants to do it for security reasons and it's not
> a bad idea. It certainly means that nobody would be able to share a
> session, and so therefor a session-hijack would become obviously
> immediately.
>
> I think expiring the session is overkill - I would just leave the
> session as it is and use the filter to check and change my own
> hand-rolled session id.
>
> Adam
>
> On 12/03/2003 08:20 AM Navjot Singh wrote:
> > don't know why do you wish to do so?
> > but it an be done. Write a filter. pass every request thru that.
> >
> > 1. Fetch the session, expire it. Server will assign new.
> > 2. Fetch the session, don't expire the session, just append a timestamp
to
> > it. set a cookie and use that to maintain session.
> >
> > HTH
> > navjot singh
> >
> >
> >>-Original Message-
> >>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, December 03, 2003 11:44 AM
> >>To: Struts Users Mailing List
> >>Subject: Changing SessionId at every request
> >>
> >>
> >>HI,
> >>
> >>IS it possible to change the Session Id generated by the Web
> >>Server at every request for the  same client. I wil make it much
> >>more clear.
> >>
> >>Say i have a Servlet running on Tomcat. what i want is when ever
> >>any User lets assume USER A ask for a request i want to change the
> >>sessionId server variable which has been gerenrated by the Web
> >>Server to uniquely identify the client.
> >>
> >>Purpose behind doing this is to make every request safe.
> >>
> >>
> >>Any suggections will be higly appreciated.
> >>
> >>
> >>Thanks in Advance
> >>Gary
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> struts 1.1 + tomcat 5.0.14 + java 1.4.2
> Linux 2.4.20 RH9
>
> -
> 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: Data Access Optmizing

2003-12-03 Thread Milind Kulkarni
If you can use a stored procedure instead of a multiple SQL statements then
it would improve your performance significantly. The advantages are obvious
but then if you plan to develop a solution that works on the different types
of databases then this solution may not work. We did this in many situations
and have seen a significant improvement.

Thanks,
Milind

-Original Message-
From: Zoran Avtarovski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:41 AM
To: Struts User Group
Subject: Data Access Optmizing


I have a small struts web app which stores user entered information in a DB
and then it performs some calculations on the data and spits out a results
page.

The app is working fine but I'm seeing some performance issues with regards
to data access. I'm using simple data access objects which connect to a
container managed JNDI pool. I can retrieve large amounts of data quite
quickly but when I use nested connection performance really suffers.

By nested calls I mean that say I retrieve a Collection of a couple of
thousand user response objects (which are retrieved quite quickly) and then
I process the responses by iterating through them to produce a Collection of
user feedback objects. During each cycle I make a number of database calls
to get information related to processing the individual user response. This
is where things get really slw.

What I'm after is some pointers on what the best practise in dealing with
this situation is. How do others get around this issue?

My thinking is that it's not the data access method (simple DAO's) but more
the fact that I'm opening and closing so many connections during the
processing phase.

Any help would be really appreciated.

Zoran


-
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: MySQL Driver List

2003-12-03 Thread Gurpreet Dhanoa
Hey

I accesed the page the page is coming up but when u try to download the
installer for windows
it taked to FtP address andhangs on

Can u  look into it.

Thanks
Gary


- Original Message -
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:05 PM
Subject: Re: MySQL Driver List


> It's working fine ...
> check back in a while, maybe your internet access is acting up at the
> moment.
>
> Gurpreet Dhanoa wrote:
>
> >this URl is not working
> >
> >Please advise
> >
> >Thanks
> >Gary
> >- Original Message -
> >From: "Christian Burger" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Wednesday, December 03, 2003 2:00 PM
> >Subject: RE: MySQL Driver List
> >
> >
> >Use this for Java!! Not the ODBC!
> >
> >http://www.mysql.com/downloads/api-jdbc-stable.html
> >
> >
> >
> >_
> >Please be advised that the information contained herein is confidential
and
> >intended only for use by the individual stated above. If you are not the
> >named recipient, you are hereby notified that any disclosure,
distribution,
> >dissemination, or copying is prohibited. If this information has been
> >directed to you in error, please contact the sender immediately at the
> >telephone number listed above.
> >
> >
> >
> >-
> >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: MySQL Driver List

2003-12-03 Thread Gurpreet Dhanoa
ok
Thanks
Gary
- Original Message -
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 3:05 PM
Subject: Re: MySQL Driver List


> It's working fine ...
> check back in a while, maybe your internet access is acting up at the
> moment.
>
> Gurpreet Dhanoa wrote:
>
> >this URl is not working
> >
> >Please advise
> >
> >Thanks
> >Gary
> >- Original Message -
> >From: "Christian Burger" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Wednesday, December 03, 2003 2:00 PM
> >Subject: RE: MySQL Driver List
> >
> >
> >Use this for Java!! Not the ODBC!
> >
> >http://www.mysql.com/downloads/api-jdbc-stable.html
> >
> >
> >
> >_
> >Please be advised that the information contained herein is confidential
and
> >intended only for use by the individual stated above. If you are not the
> >named recipient, you are hereby notified that any disclosure,
distribution,
> >dissemination, or copying is prohibited. If this information has been
> >directed to you in error, please contact the sender immediately at the
> >telephone number listed above.
> >
> >
> >
> >-
> >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: Changing SessionId at every request

2003-12-03 Thread Adam Hardy
I assume that Gurpreet wants to do it for security reasons and it's not 
a bad idea. It certainly means that nobody would be able to share a 
session, and so therefor a session-hijack would become obviously 
immediately.

I think expiring the session is overkill - I would just leave the 
session as it is and use the filter to check and change my own 
hand-rolled session id.

Adam

On 12/03/2003 08:20 AM Navjot Singh wrote:
don't know why do you wish to do so?
but it an be done. Write a filter. pass every request thru that.
1. Fetch the session, expire it. Server will assign new.
2. Fetch the session, don't expire the session, just append a timestamp to
it. set a cookie and use that to maintain session.
HTH
navjot singh

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:44 AM
To: Struts Users Mailing List
Subject: Changing SessionId at every request
HI,

IS it possible to change the Session Id generated by the Web
Server at every request for the  same client. I wil make it much
more clear.
Say i have a Servlet running on Tomcat. what i want is when ever
any User lets assume USER A ask for a request i want to change the
sessionId server variable which has been gerenrated by the Web
Server to uniquely identify the client.
Purpose behind doing this is to make every request safe.

Any suggections will be higly appreciated.

Thanks in Advance
Gary


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



--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: MySQL Driver List

2003-12-03 Thread Kwok Peng Tuck
It's working fine ...
check back in a while, maybe your internet access is acting up at the 
moment.

Gurpreet Dhanoa wrote:

this URl is not working

Please advise

Thanks
Gary
- Original Message -
From: "Christian Burger" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 2:00 PM
Subject: RE: MySQL Driver List
Use this for Java!! Not the ODBC!

http://www.mysql.com/downloads/api-jdbc-stable.html



_
Please be advised that the information contained herein is confidential and
intended only for use by the individual stated above. If you are not the
named recipient, you are hereby notified that any disclosure, distribution,
dissemination, or copying is prohibited. If this information has been
directed to you in error, please contact the sender immediately at the
telephone number listed above.


-
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] image file to byte array

2003-12-03 Thread Mark Lowe
Although its not a struts problem as such I do happen to be using 
struts in my app..

Here some code as it will say more in less words that it will take to 
explain

In my action servlet I have something like this..


response.setContentType("image/jpeg");
response.setHeader("Cache-Control", "no-cache");
OutputStream ou = response.getOutputStream();
String imageStr = "file:///foo/test.jpg";
java.net.URI imgUri = new java.net.URI(imageStr);
File imageFile = new File(imgUri);
FileInputStream imageFileStream = new FileInputStream(imageFile);
byte[] image = new byte[(int) 
imageFile.length()];System.out.println("imageFile.length()"+ 
imageFile.length());
ou.write(image);



Now the system out returns the correct amount of bytes so its seeing 
the image and not getting file not found exception. but it just wont 
stream back to my jsp when i run the action.

This code is basically a else clause when no results are returned from 
the database.. The results from the db (via hibernate works just fine) 
but this bit doesn't..

Can anyone who's done this cast their eye over it for anything 
obviously wrong. Could it be a permissions issue?

Cheers Mark

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


Re: MySQL Driver List

2003-12-03 Thread Gurpreet Dhanoa
this URl is not working

Please advise

Thanks
Gary
- Original Message -
From: "Christian Burger" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 2:00 PM
Subject: RE: MySQL Driver List


Use this for Java!! Not the ODBC!

http://www.mysql.com/downloads/api-jdbc-stable.html



_
Please be advised that the information contained herein is confidential and
intended only for use by the individual stated above. If you are not the
named recipient, you are hereby notified that any disclosure, distribution,
dissemination, or copying is prohibited. If this information has been
directed to you in error, please contact the sender immediately at the
telephone number listed above.



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



Re: MySQL Driver List

2003-12-03 Thread Gurpreet Dhanoa
Thanks alot


- Original Message -
From: "Christian Burger" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 2:00 PM
Subject: RE: MySQL Driver List


Use this for Java!! Not the ODBC!

http://www.mysql.com/downloads/api-jdbc-stable.html



_
Please be advised that the information contained herein is confidential and
intended only for use by the individual stated above. If you are not the
named recipient, you are hereby notified that any disclosure, distribution,
dissemination, or copying is prohibited. If this information has been
directed to you in error, please contact the sender immediately at the
telephone number listed above.



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



Wht does tag in web.xml means ??

2003-12-03 Thread Shakti
Hi,
Wht does  tag in web.xml means ?? I am using struts framework 
with weblogic and i am not able to find out wht is does this tag implies ? Is this the 
cause due to which my weblogic is not picking up new compiled classes without 
restarting ..???
waiting for a reply 
Thanks & Regards,
Shakti.



Re: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-03 Thread Shakti
RE: Is it required to restart weblogic everytime after compiling ?? ? Need help 
Desperately .. :-(Nick i checked well my process is somewht differnt from yours..
1) I am not copying a new WAR file .. instead i am just recompiling my java files and 
the the app dir ( which i think is one and the same thing . )
2 ) but in the web.xml I have 2 it is 2 intead of 
three i dont' know wht it means is it something related to this 

waiting for ur reply ..
Shakti

  - Original Message - 
  From: Nick Faiz 
  To: 'Shakti' ; Struts Users Mailing List ; [EMAIL PROTECTED] 
  Sent: Wednesday, December 03, 2003 1:12 PM
  Subject: RE: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(


  Shakti,

  Ok. Find, in attachment, a log of my starting WebLogic 7.2 up with a 
cepts.war file present within my applications directory. A servlet called 
ProjectStartUp runs and queries a database, following the directions of my web.xml:

  

  projectStartUp

  au.com.ce.cepts.project.ProjectStartUp

  3

  

  Glance at the log, look for bold, and see the statement:

  :
: 

  <3/12/2003 18:35:37>   <149033> 

  <3/12/2003 18:35:37>   <149074> 

  <3/12/2003 18:35:38>   <149404> 

  The above can is because I set the server in dev. mode.

  What problems are you having? Are you not seeing a new activation take place 
when you drop the new .war in?

  Nick

  P.S. Ignore the error relating to the Action servlet. It doesn't like being included 
in a .war, under my test configuration, and I've not had time to work out why yet. 
<> 




  -Original Message-
  From: Shakti [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 3 December 2003 4:39 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(

  Hey Nick,

  I read thru all the docs and all the links that u gave me ..

  i cudn't find anything more that changing the boolean param , while i start

  the weblogic i am getting

  "-Dweblogic.ProductionModeEnabled=false" it means it is in development mode

  . wht are the other changes that i will have to make so that my java file

  changes are reflelected in the application after recompiling , without

  restarting the weblogic server .

  waiting for ur reply boss ...

  Thanks in advance ..

  shakti

  - Original Message -

  From: "Nick Faiz" <[EMAIL PROTECTED]>

  To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>

  Sent: Wednesday, December 03, 2003 4:02 AM

  Subject: RE: Is it required to restart weblogic everytime after compiling ??

  ? Need help Desperately .. :-(



  > Sure, but that isn't the same as redeploying a war or ear without

  > restarting.

  >

  > Nick

  >

  > -Original Message-

  > From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]

  > Sent: Tuesday, 2 December 2003 6:14 PM

  > To: Struts Users Mailing List

  > Subject: RE: Is it required to restart weblogic everytime after compiling

  ??

  > ? Need help Desperately .. :-(

  >

  > IMO Reloading is not possible for the classes in server classpath. eg

  beans

  > and other utility classes used by servlets or ejbs.

  >

  >

  >

  >

  > >-Original Message-

  > >From: Nick Faiz [mailto:[EMAIL PROTECTED]

  > >Sent: Tuesday, December 02, 2003 12:31 PM

  > >To: 'Struts Users Mailing List'

  > >Subject: RE: Is it required to restart weblogic everytime after

  > >compiling ?? ? Need help Desperately .. :-(

  > >

  > >

  > >Check this out:

  > >http://e-docs.bea.com/wls/docs70/programming/deploying.html#1125125

  > >

  > >Also see,

  > >http://e-docs.bea.com/wls/docs70/faq/deploy.html#740987

  > >

  > >Hunt down the mode var. in your startWebLogic.cmd script that specifies

  > >production mode and set it to false.

  > >

  > >Regards,

  > >Nick Faiz

  > >B2B e-Commerce Developer

  > >Corporate Express Australia Ltd.

  > >

  > >Phone: +61-2-9335-0495, Fax: 9335-0753, Email: [EMAIL PROTECTED]

  > >

  > >

  > >-Original Message-

  > >From: Shakti [mailto:[EMAIL PROTECTED]

  > >Sent: Tuesday, 2 December 2003 4:00 PM

  > >To: Struts Users Mailing List

  > >Subject: Is it required to restart weblogic everytime after

  > >compiling ???

  > >Need help Desperately .. :-(

  > >

  > >

  > >Hi,

  > > I am using Struts & weblogic , My Question is each time i do some

  > >changes in my .java files the changes dont' get reflected

  > >immediately. Each

  > >time after compiling i have to restart weblogic :-( .. which

  > >is taking a

  > >hell lot of my time .. Can anyone suggest some weblogic

  > >setting thru which i

  > >dont' have to restart the sever again & again to reflect my

  > >changes made on

  > >an already deployed application on weblogic .

  > >

  > >Thanks & Regards,

  > >Shakti.

  > >P.S : I am getting frustrated while

  1   2   >