RE: array property in ActionForm ???

2003-12-29 Thread Mohan Radhakrishnan
Hi
Seems that you have a List of player objects. If so then indexed bean
properties might help. Your form will contain something like the following.

public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}

public ArrayList getPlayerList(){
return playerList ;
}

public void setPlayer(int index, Player player){
playerList .add(index, player);
}

public Player getPlayer (int index){
return (Player)playerList .get(index);
}

Read the doc. for the JSP portion of the solution.

One more solution is the nested tag. I've used nested beans for multiple
levels of nesting. It is so cool.

Mohan
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:25 AM
To: Struts Users Mailing List
Subject: array property in ActionForm ???


Hello,











In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?

I tried,

public void setPlayer(int[] player) {
   this.player = player;
}

public int[] getPlayer() {
   return player;
}

But it seems not working !!!


Best regards,
Eric


==
If you know what you are doing,
it is not called RESEARCH!
==


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



JSF managed beans

2003-12-29 Thread Nadeem Bitar

Where and how do Managed Beans and JSF's navigation rules fit in a
struts/jsf application?



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



Re: Struts Validation + Frames

2003-12-29 Thread VENKATESH GANGAL
Hi Suresh,

I checked the name of the form in my validation.xml and varified that I am using the 
same name in my JSP also.

I am able to get the Error object from my form bean but I am unable to display it on 
my JSP.Is there anything else that I am missing ???

Thanks for  your help

Cheers...
Venkat


On Mon, 29 Dec 2004 Suresh Korvi wrote :
>hi venkatesh
>
>  You are saying that using lower frame
>
>  so see which to which form this page belongs to and put that form name in the 
> validate.xml
>  then it will display easily
>
>  i am think this is the problem of placing the form name correctly
>
>
>  suresh
>
>-Original Message-
> From: VENKATESH GANGAL [mailto:[EMAIL PROTECTED]
>Sent: Sunday, December 28, 2003 5:09 AM
>To: [EMAIL PROTECTED]
>Subject: Struts Validation + Frames
>
>
>Hi ,
>
>I have an application with two frames , one at the top and the other the bottom.
>
>I am working on the lower frame and has problems in displaying errors after 
>validating the form i.e when I submit only the lower part of the frame. I can see 
>that the validate method is returning an error object but I am not able to display 
>the errors in the same JSP but instead I get a blank page.
>
>Can anyone know how to go about handling Errors in multiple frames ???
>
>Thanks in advance..
>Cheers..
>
>Venkat
>
>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


array property in ActionForm ???

2003-12-29 Thread Eric Chow
Hello,











In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?

I tried,

public void setPlayer(int[] player) {
   this.player = player;
}

public int[] getPlayer() {
   return player;
}

But it seems not working !!!


Best regards,
Eric


==
If you know what you are doing,
it is not called RESEARCH!
==


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



Re: What is wrong with this upload filename (UTF-8) decoding?

2003-12-29 Thread Jason Lea
Yes, I think you are right, i didn't realise which class we were talking 
about there.  I have just read a bit more about the Struts FileUpload 
and how it wraps commons upload.  Assuming Commons Upload works 
correctly with the setHeaderEncoding, then I guess there might be work 
around.

Struts will use org.apache.struts.upload.CommonsMultipartRequestHandler 
by default to handle extracting the parameters out of the request and 
populating the form.  It uses the DiskFileUpload class from Commons 
FileUpload.  It is that handler that we need to modify, to do that we 
could create our own using the 
org.apache.struts.upload.CommonsMultipartRequestHandler source as the basis.

We need to tell Struts to use ours instead of the defualt by adding this 
to your struts-config.xml



Then to modify org.apache.struts.upload.CommonsMultipartRequestHandler 
by creating our my.own.MultiPartClassHandler class.
We need to modify  the handleRequest() method like so:

 // Create and configure a DIskFileUpload instance.
 DiskFileUpload upload = new DiskFileUpload();
 upload.setHeaderEncoding("UTF-8");

 // Set the maximum size before a FileUploadException will be thrown.
 upload.setSizeMax((int) getSizeMax(ac));
 ...
This is all untested and off the top of my head, so there is likely to 
be a mistake there somewhere, but I think it is possible.

Daniel Rabe wrote:

I see a similar problem with file upload. It doesn't look like
org.apache.strugs.upload.FormFile exposes a setHeaderEncoding method...
Daniel Rabe

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 26, 2003 1:33 PM
To: Struts Users Mailing List
Subject: Re: What is wrong with this upload filename (UTF-8) decoding?

I have not used the file upload yet, but I believe you need to set the 
encoding for the headers

formFile.setHeaderEncoding("UTF-8")

setHeaderEncoding does this:
"Specifies the character encoding to be used when reading the headers of 
individual parts. When not specified, or |null|, the platform default 
encoding is used."
If this was running on a English operating system it is probably 
defaulting to the Latin-1 encoding.

From this Java Doc:
http://jakarta.apache.org/commons/fileupload/apidocs/org/apache/commons/file
upload/FileUploadBase.html#setHeaderEncoding(java.lang.String)
Please post back to the forum if this works.  I would be interested in 
the result.

Zsolt Koppany wrote:

 

Hi,

my application has to support UTF-8 including when files are uploaded 
with UTF-8 characters in the filename (for example: 
??.txt).

I use a servlet filter that always call
request.setCharacterEncoding("UTF-8") and my jsp pages contain 
response.setContentType("text/html; charset=UTF-8");

Everything works fine except that I have problems with decoding of the 
name of uploaded filenames.

I use the code below to get the name of the uploaded filename:

String nm = formFile.getFileName();
String filename = new String(nm.getBytes(), "UTF-8");
The code above converts only the first couple of characters correctly
(result: ??.txt).
Any ideas how to fix the problem?

I use TC-4.1.29, Struts-1.1, jdk1.4.2_02 Windows-XP.

Zsolt



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


   

 



--
Jason Lea


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


File Upload Problems

2003-12-29 Thread Patrick Scheuerer
Hi,

I was just looking at the struts-upload application... why is the file uploaded 
to %TOMCAT_HOME%/bin ?

What i would like to do is to save the uploaded file in a subdirectory of the 
root of the application (%TOMCAT_HOME%/webapps/myapp/uploaddir). The saving 
location is determined on a the "file category" chosen in the file upload form.

Another thing I don't know is, how I can retrieve the base path of my web 
application.

I tried something like this:
String savingLocation = new String(
 request.getContextPath()
+ "/data/"
+ category.getPath() + "/"
+ fileName);
Then I create a File with this path as in:
File tempFile = new File(savePath);
If i read the absolute path of the tempFile:
String absPath = tempFile.getAbsolutePath();
i get the following:
C:\myapp\data\tests\uploadedFile.txt
where
- myapp is the name of the application
- tests is the path name for this category supplied in the form
- uploadedFile.txt is the uploaded file :-)
Any tips, suggestions and examples would be highly appreciated.

Thanks, Patrick

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


Re: How to perform validation and then call another javascript function?

2003-12-29 Thread James Mitchell

Not to be too off-subjectbut, why do you have the "Struts Users
Mailing List" named as "usergroup" in your mail client?  Is this the only
"usergroup" that you subscribe to?  I am on at least 15, so I almost
skipped right over your post.

Would you mind changing it to at least "strutsgroup" or something with
"struts" in the name?

Thanks





On Mon, 29 Dec 2003, Clark Kent wrote:

>
> I have a form in which upon submit, depending on whether a certain checkbox is 
> checked or not, it is directed to a certain action (if checked, then action 1, if 
> unchecked, then action 2). With the following code, I am trying to validate the 
> form.  Now I need to perform the validation and also depending upon the checkbox 
> condition (checked or not) I need to redirect it to one of 2 actions. 
> UpdateSubscription() is a javascript function which directs to a certain action and 
> then submits it.
>
> How can I do both the validation and also call this javascript function to redirect 
> to different actions. Can I use any condition within the onsubmit=" " ? Any help 
> would be appreciated?
>
>
>
> 
>
> 
>
> 
>
>
>
> 
> onclick="updateSubscription();"/>
>
>
>
> 
>
>
>
>
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Photos - Get your photo on the big screen in Times Square

-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: Is there a way to prevent urls from being entered from the br owser?

2003-12-29 Thread Mark Lowe
Yeah Right..

Thanks

On 30 Dec 2003, at 00:45, Dhaliwal, Pritpal (HQP) wrote:

Pick up something like mozilla as source,
Fix it up so it has no location bar.. ( maybe just a link to ur app )
Distribute it...
Now they can enter stuff in ur forms and all, but not in the location 
bar..

Hey its opensource, use it..

Pritpal Dhaliwal

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 11:59 AM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from the
browser?
So to "prevent urls from being entered from the browser" all you have
to do is take the keyboard and mouse out the equation.
Nice solution I can see how that would be useful for most folk's.

On 29 Dec 2003, at 19:48, Chappell, Simon P wrote:

Nope. There is no keyboard and no mouse. :-)

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:41 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from
the
browser?
Is like the one in virgin stores where you can ctrl+esc and get the
menu/desktop up?
On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:

Oh that's far too clever!

We just used thin-client terminals locked in kiosk mode with I.E.
running in full screen, using touch screens and taking away the
keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
Simon

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:09 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from
the browser?
In theory, you could write a filter for the forwards that would
check to see if a REFERER is set for the request. If not, the
request was likely
entered directly in a browser.
Jim Anderson wrote:

To clarify: I would like to be able to define
ActionForwards for use
within the app but which cannot be entered directly into
the browser
by the user. Is this possible?

Thanks.

jim



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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


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


RE: .NET: We are just like Struts... only better.

2003-12-29 Thread Steve Muench
Nick,

| I believe that various IDEs are beginning to allow this.
| I saw a demonstration of a Sun's Forte at a Java User Group,
| a while ago, and they were dropping and dragging JATO taglibs.
| WebLogic Workshop can apparently allow this using Struts.

Oracle JDeveloper 10g is one of these as well. 

It gives Struts developers integrated visual J2EE application building and databinding 
support, among many other cool things.

This include visual Struts page flow modeling, and other Struts-specific support.

You can take a product tour even before downloading a trial version at (various 
viewlets available to watch):

http://otn.oracle.com/products/jdev/collateral/prodtour10g.html

JDeveloper is a fully-featured Java IDE with a small pricetag (free to try it, $995 to 
own a dev license, no runtime fees for using
any of our J2EE productivity frameworks).

It has a slew of Java coding productivity features, the top ten of which Brian Duff 
points out on his weblog quite effectively:

http://radio.weblogs.com/0128037/stories/2003/08/11/topTenToysForJavaCodersIn905.html

We demoed our JSF support (visual editing and databinding) on stage at June 2003 
JavaOne, and will demo something that will blow JSF
users away for this year's JavaOne conference which is based on what we've done since 
that first sneak peek.

JDeveloper has a pluggable extension architecture built on the JSR 198 model for IDE 
extensions that is on its way to becoming a
Java platform standard. It ships with hundreds of pre-built and pre-tested extensions 
in the box, which you can configure to use as
your needs dictate. You can download more extensions from the Oracle Technet website 
or build your own using standard Swing and the
JDeveloper extension SDK.

For an idea of how to build a complete application using a maximal set of J2EE 
application-building productivity features, you might
check out our Struts/BC4J Toy Store Demo and whitepaper at:

http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/index.html

An overview of our JSR 227-based databinding support is at:

http://otn.oracle.com/products/jdev/htdocs/adfprimer/index.html


Steve Muench - Technical Evangelist, Product Mgr, Developer, Author - Oracle
http://radio.weblogs.com/0118231/

-Original Message-
From: Nick Faiz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 28, 2003 17:55
To: 'Struts Users Mailing List'
Subject: RE: .NET: We are just like Struts... only better.

but still, I'm not dragging and 

dropping html form controls (or struts-html.tld taglib controls) to a 

designer screen, linking code and compiling.

 

I believe that various IDEs are beginning to allow this. I saw a demonstration of a 
Sun's Forte at a Java User Group, a while ago,
and they were dropping and dragging JATO taglibs. WebLogic Workshop can apparently 
allow this using Struts.

 

I don't know if any of this qualifies as decent programming, however. 

 

Nick

 

-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]
Sent: Monday, 29 December 2003 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: .NET: We are just like Struts... only better.

 

It's kind of a catch .22, I use struts on projects that make money for me.  

If someone started taking my projects and replicating them for free, I would


probably have a problem with it :)  Although in this case, MS did not have a


Struts to begin with.  ASP.net is sweet, but only because the development 

environent makes it sweet.  If we can get the same RAD functionality out of 

Eclipse w/ JSF and perhaps Flex, then we'll really be cooking.

 

Although Struts is a wonderful thing, I still look at web development with 

J2EE as a bit of a tedious thing.  Well, actually now that I have a pretty 

robust taglib built, not so tedious, but still, I'm not dragging and 

dropping html form controls (or struts-html.tld taglib controls) to a 

designer screen, linking code and compiling.  I have to do it all by hand :(


  Let's hope Eclipse VE adopts a JSF designer!

 

Craig W. Tataryn

 

>From: "Frans Thamura, Intercitra" <[EMAIL PROTECTED]>

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

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

>Subject: Re: .NET: We are just like Struts... only better.

>Date: Sat, 27 Dec 2003 23:57:08 -0500

>

>I think this article will explain that Microsoft is not support Open 
>Source


>community, M$ only support people that want to support money, :)

>

>Our War Money Chest is bigger than all of you all the Java guys 
>(including

>the Open Source).

>

>[EMAIL PROTECTED] how can M$ have that money?

>

>So, this mean we all must wake up, :) to make our product more user

>friendly, and make everyone can learn it, update it, and make it perfect.

>

>ASP.net is a product based, Struts is a spiritual lovely project. They

>cannot compare it.

>

>But if ASP.net can be compare with MVC not with Struts. :) sad to hear 
>that


>if we port Struts to .NET, Microsoft wont suppor

Fw: annoying JSP runtime exception message

2003-12-29 Thread Martin Gainty
What does your
$TOMCAT_HOME/logs/.log say?
Regards
-Martin
- Original Message -
From: "" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 10:05 AM
Subject: Re: annoying JSP runtime exception message


> This comes up quite a bit for my Students.
> When using Tiles, the JSP full error does not get displayed, becuase
> tiles blocks it sometimes.
>
> I forward to the working JSP for the moment to see the error.
>
> .V
>
>
> Raphaël di Cicco wrote:
> > Hi,
> > I'm working with struts 1.1, Tiles and Tomcat.
> >
> > on my JSP pages where I did something wrong I often get this exception
message :
> >
> > [ServletException in:/foo.jsp] Define tag cannot set a null value'
> >
> > or simply :
> > [ServletException in:/foo.jsp] null
> >
> > Looking at the source of the HTML page don't give me more information,
neither the tomcat logs. I used to have a detailed message explaining me
where the define was wrong but now I have to carefully cut and paste parts
of my JSP page to find out where the error is.
> >
> > Is there any way to tell Tomcat to also output JSP exceptions to a log
file ? Or is is a struts problem ?
> >
> > Any ideas are welcomed !
> > 
> > Raphaël di Cicco
> >
>
>
>
> -
> 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: Is there a way to prevent urls from being entered from the br owser?

2003-12-29 Thread Dhaliwal, Pritpal (HQP)
Pick up something like mozilla as source,
Fix it up so it has no location bar.. ( maybe just a link to ur app )
Distribute it...
Now they can enter stuff in ur forms and all, but not in the location bar..

Hey its opensource, use it..

Pritpal Dhaliwal


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 11:59 AM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from the
browser?


So to "prevent urls from being entered from the browser" all you have 
to do is take the keyboard and mouse out the equation.

Nice solution I can see how that would be useful for most folk's.


On 29 Dec 2003, at 19:48, Chappell, Simon P wrote:

> Nope. There is no keyboard and no mouse. :-)
>
>> -Original Message-
>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 29, 2003 1:41 PM
>> To: Struts Users Mailing List
>> Subject: Re: Is there a way to prevent urls from being entered from
>> the
>> browser?
>>
>>
>> Is like the one in virgin stores where you can ctrl+esc and get the 
>> menu/desktop up?
>>
>>
>> On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:
>>
>>> Oh that's far too clever!
>>>
>>> We just used thin-client terminals locked in kiosk mode with I.E. 
>>> running in full screen, using touch screens and taking away the 
>>> keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
>>>
>>> Simon
>>>
 -Original Message-
 From: Brice Ruth [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 29, 2003 1:09 PM
 To: Struts Users Mailing List
 Subject: Re: Is there a way to prevent urls from being entered from 
 the browser?


 In theory, you could write a filter for the forwards that would 
 check to see if a REFERER is set for the request. If not, the 
 request was likely
 entered directly in a browser.

 Jim Anderson wrote:

> To clarify: I would like to be able to define
>> ActionForwards for use
> within the app but which cannot be entered directly into
>> the browser
> by the user. Is this possible?
>
> Thanks.
>
> jim
>
>
>
>> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>

 --
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.



>> -
 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: How to perform validation and then call another javascript function?

2003-12-29 Thread Saul Q Yuan
I think you can define a new Javascript function, and call the
validateSubscriptionForm(this) first in the new function, and inside
onsubmit call this new function instead. Something like the following:

newFunction(form) {
  validate = validateSubscriptionForm(form);

  if(!validate)
return false;

   // do other stuff you want;

// return true of false based on your logic

}

and

onsubmit="return newFunction(this)"


Saul



- Original Message - 
From: "Clark Kent" <[EMAIL PROTECTED]>
To: "usergroup" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 6:49 PM
Subject: How to perform validation and then call another javascript
function?


>
> I have a form in which upon submit, depending on whether a certain
checkbox is checked or not, it is directed to a certain action (if checked,
then action 1, if unchecked, then action 2). With the following code, I am
trying to validate the form.  Now I need to perform the validation and also
depending upon the checkbox condition (checked or not) I need to redirect it
to one of 2 actions. UpdateSubscription() is a javascript function which
directs to a certain action and then submits it.
>
> How can I do both the validation and also call this javascript function to
redirect to different actions. Can I use any condition within the onsubmit="
" ? Any help would be appreciated?
>
>
>
> 
>
> 
>
> 
>
>
>
> 
> onclick="updateSubscription();"/>
>
>
>
> 
>
>
>
>
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Photos - Get your photo on the big screen in Times Square


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



Re: EL tag libraries and MessageResources

2003-12-29 Thread Wolfgang Woger
That problem was discussed in the nbuser group a couple of weeks ago,
in conjunction with code completion.
Try to put
jstl.jar
struts-el.jar
struts.jar
servlet.jar
into NetBeanXX/lib/ext
and
standard.jarinto NetBeansXX/lib
Maybe you can put everything under /lib  or .../lib/ext.
Wolfgang



Jani Heinonen wrote:

Hi,

I searched the mailing list archives and the bugzilla database, but couldn't
find an answer, so please excuse me if this is a FAQ.
I am unable to compile any JSP that uses any of the html-el tags under the
embedded Tomcat in Netbeans 3.5.1. The stacktrace follows:
bean-cookie.jsp [-1:-1] java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanInfo.j
ava:88)
   at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors(ELH
tmlTagBeanInfo.java:88)
   at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
   at java.beans.Introspector.getBeanInfo(Introspector.java:372)
   at java.beans.Introspector.getBeanInfo(Introspector.java:144)
   at
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
   at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146
)
   at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(A
nalyzerParseEventListener.java:154)
   at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin
(AnalyzerParseEventListener.java:962)
   at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:221)
   at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:216)
   at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
   at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
   at
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserI
mpl.java:126)
   at
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.j
ava:93)
   at
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspData
Object.java:297)
   at
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompi
lerSupport.java:62)
   at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
n.java:361)
   at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
n.java:329)
   at
org.openide.actions.AbstractCompileAction.compileNodes2(AbstractCompileActio
n.java:132)
   at
org.openide.actions.AbstractCompileAction.performAction(AbstractCompileActio
n.java:45)
   at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeActio
n.java:431)
   at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97)
   at org.openide.util.Task.run(Task.java:136)
   at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
   at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)
Caused by: java.lang.NullPointerException
   at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:577)
   at org.apache.struts.taglib.html.HtmlTag.(HtmlTag.java:96)
   ... 31 more
Errors compiling bean-cookie.
What could be wrong? I get this with my own application, as well as the
strutsel-exercise-taglib webapp where this example is from. We're also
having the same problem deploying the application under WLS 7.0 and 8.1.
###
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/
 



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


How to perform validation and then call another javascript function?

2003-12-29 Thread Clark Kent

I have a form in which upon submit, depending on whether a certain checkbox is checked 
or not, it is directed to a certain action (if checked, then action 1, if unchecked, 
then action 2). With the following code, I am trying to validate the form.  Now I need 
to perform the validation and also depending upon the checkbox condition (checked or 
not) I need to redirect it to one of 2 actions. UpdateSubscription() is a javascript 
function which directs to a certain action and then submits it.  

How can I do both the validation and also call this javascript function to redirect to 
different actions. Can I use any condition within the onsubmit=" " ? Any help would be 
appreciated?

 







 



 



 

 



-
Do you Yahoo!?
Yahoo! Photos - Get your photo on the big screen in Times Square

Re: Still having problems with File upload (multipart-formdata)

2003-12-29 Thread Martin Cooper

"Brice Ruth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm refactoring (so to speak) my currently working form, which accepts
> an image to be uploaded, to use a DynaValidator(Action?)Form and I'm
> again running into an exception being thrown:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/FileUploadBase$SizeLimitExceededException

This usually happens when your container has another copy of (a different
version of) the Commons FileUpload jar file, and you are not putting all of
your application's jar files in your WEB-INF/lib directory, so that the
wrong jar file is being loaded. Just make sure that your web app is
self-contained and you should be fine.

>
> What's going on here?! Also, to get more mileage out of this post, what
> exactly is the difference between a DynaValidatorForm and a
> DynaValidatorActionForm?!

I believe the only difference is in the key passed to the Validator. The
former uses the value of the 'name' attribute from struts-config.xml, while
the latter uses the value of the 'path' attribute. (But no, I don't know
when you would choose one over the other. ;)

--
Martin Cooper


>
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.




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



Still having problems with File upload (multipart-formdata)

2003-12-29 Thread Brice Ruth
I'm refactoring (so to speak) my currently working form, which accepts 
an image to be uploaded, to use a DynaValidator(Action?)Form and I'm 
again running into an exception being thrown:

java.lang.NoClassDefFoundError: 
org/apache/commons/fileupload/FileUploadBase$SizeLimitExceededException

What's going on here?! Also, to get more mileage out of this post, what 
exactly is the difference between a DynaValidatorForm and a 
DynaValidatorActionForm?!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Best place to initialize resources in an action class

2003-12-29 Thread Nimmons, Buster
I recently started using strutsin lie of straight servlets and jsps. I was
wondering where is the most logical place to perform initialization process
in an Action class. In a servlet I normally use the init method to perform
these tasks. The closest I have found in the Action class is the Setservlet
Method. Is this the correct place?

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



RE: Boolean checkbox in session form

2003-12-29 Thread Craig R. McClanahan
Quoting Tim Lucia <[EMAIL PROTECTED]>:

> Care to share?  This would be a very, very useful extension.
> 
> Is there any plan(s) for future Struts release(s) to support some
> attribute of this sort?  Something like "forceFalse='true'" or
> "forceValue='true'".
> 
> Tim
> 

Guillermo is trying work too hard.

The standard approach to dealing with boolean form bean properties (presented by
a checkbox) is to set the boolean property to false in the reset method of your
form bean, which is called every time the form is submitted.  If the user
checked the box, then the property will be set to true in processPopulate().

Now, if you want to reset the property again before forwarding back to the same
page again (so that it's always rendered as unchecked when the page is
displayed), just have your Action set the boolean property to false.  That is
what controls how the checkbox is rendered -- in EXACTLY the same way that an
Action can preconfigure any other form field by setting the corresponding form
bean property before fowarding to the page.

Craig McClanahan


> > -Original Message-
> > From: Guillermo Meyer [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, December 29, 2003 4:40 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Boolean checkbox in session form
> > 
> > 
> > To solve this problem, i created a new taglib for checkbox 
> > (extending BaseFieldTag), that creates a hidden input with a 
> > value of true|false and an auxiliary checkbox (named as 
> >  + _chk) with a javascript handler that checks 
> > on checkbox value to set true or false to the hidden field, 
> > so always is posted a true or a false value from UI and set 
> > to the appropiate form attribute, and this way you can avoid 
> > reseting value in reset form.
> > 
> > -Original Message-
> > From: Franck [mailto:[EMAIL PROTECTED] 
> > Sent: Lunes, 29 de Diciembre de 2003 06:13 p.m.
> > To: 'Struts Users Mailing List'
> > Subject: Boolean checkbox in session form
> > 
> > 
> > Hi,
> > 
> > I'm becoming mad ...
> > 
> > Explain : to handle ActionForm boolean properties with HTML 
> > checkbox, we "need" To initialize the property as "false" in 
> > the reset() method of the ActionForm .. Ok
> > 
> > Now, if the Action form is defined in the session scope in 
> > the struts-config file The first time the action is called, 
> > the bean is put in session scope.
> > 
> > The next time (eg submit of another form on the same page), 
> > the bean is readed from session scope 
> > (RequestProcessor.processActionForm) ... ok After that, the 
> > reset() method is called
> > (RequestProcessor.processPopulate)
> > 
> > So it's impossible to keep the boolean property as "true" 
> > 
> > How can I store the form bean in the session scope with a 
> > "true" boolean property ? Or maybe is there a way to not 
> > initialize the boolean properties as "false" (and update them 
> > with checkboxes )
> > 
> > Is my problem understandable ??
> > 
> > Thanks ...
> > 
> > Franck Lefebure
> > equipe web http://www.orangecaraibe.com
> > collaborateur http://www.synaxis-partner.com 
> mailto:[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: Boolean checkbox in session form

2003-12-29 Thread Tim Lucia
Care to share?  This would be a very, very useful extension.

Is there any plan(s) for future Struts release(s) to support some
attribute of this sort?  Something like "forceFalse='true'" or
"forceValue='true'".

Tim

> -Original Message-
> From: Guillermo Meyer [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 29, 2003 4:40 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Boolean checkbox in session form
> 
> 
> To solve this problem, i created a new taglib for checkbox 
> (extending BaseFieldTag), that creates a hidden input with a 
> value of true|false and an auxiliary checkbox (named as 
>  + _chk) with a javascript handler that checks 
> on checkbox value to set true or false to the hidden field, 
> so always is posted a true or a false value from UI and set 
> to the appropiate form attribute, and this way you can avoid 
> reseting value in reset form.
> 
> -Original Message-
> From: Franck [mailto:[EMAIL PROTECTED] 
> Sent: Lunes, 29 de Diciembre de 2003 06:13 p.m.
> To: 'Struts Users Mailing List'
> Subject: Boolean checkbox in session form
> 
> 
> Hi,
> 
> I'm becoming mad ...
> 
> Explain : to handle ActionForm boolean properties with HTML 
> checkbox, we "need" To initialize the property as "false" in 
> the reset() method of the ActionForm .. Ok
> 
> Now, if the Action form is defined in the session scope in 
> the struts-config file The first time the action is called, 
> the bean is put in session scope.
> 
> The next time (eg submit of another form on the same page), 
> the bean is readed from session scope 
> (RequestProcessor.processActionForm) ... ok After that, the 
> reset() method is called
> (RequestProcessor.processPopulate)
> 
> So it's impossible to keep the boolean property as "true" 
> 
> How can I store the form bean in the session scope with a 
> "true" boolean property ? Or maybe is there a way to not 
> initialize the boolean properties as "false" (and update them 
> with checkboxes )
> 
> Is my problem understandable ??
> 
> Thanks ...
> 
> Franck Lefebure
> equipe web http://www.orangecaraibe.com
> collaborateur http://www.synaxis-partner.com 
mailto:[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: What is wrong with this upload filename (UTF-8) decoding?

2003-12-29 Thread Daniel Rabe
I see a similar problem with file upload. It doesn't look like
org.apache.strugs.upload.FormFile exposes a setHeaderEncoding method...

Daniel Rabe

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 26, 2003 1:33 PM
To: Struts Users Mailing List
Subject: Re: What is wrong with this upload filename (UTF-8) decoding?


I have not used the file upload yet, but I believe you need to set the 
encoding for the headers

formFile.setHeaderEncoding("UTF-8")

setHeaderEncoding does this:
"Specifies the character encoding to be used when reading the headers of 
individual parts. When not specified, or |null|, the platform default 
encoding is used."
If this was running on a English operating system it is probably 
defaulting to the Latin-1 encoding.

 From this Java Doc:
http://jakarta.apache.org/commons/fileupload/apidocs/org/apache/commons/file
upload/FileUploadBase.html#setHeaderEncoding(java.lang.String)

Please post back to the forum if this works.  I would be interested in 
the result.

Zsolt Koppany wrote:

>Hi,
>
>my application has to support UTF-8 including when files are uploaded 
>with UTF-8 characters in the filename (for example: 
>??.txt).
>
>I use a servlet filter that always call
>request.setCharacterEncoding("UTF-8") and my jsp pages contain 
>response.setContentType("text/html; charset=UTF-8");
>
>Everything works fine except that I have problems with decoding of the 
>name of uploaded filenames.
>
>I use the code below to get the name of the uploaded filename:
>
>String nm = formFile.getFileName();
>String filename = new String(nm.getBytes(), "UTF-8");
>
>The code above converts only the first couple of characters correctly
>(result: ??.txt).
>
>Any ideas how to fix the problem?
>
>I use TC-4.1.29, Struts-1.1, jdk1.4.2_02 Windows-XP.
>
>Zsolt
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

-- 
Jason Lea



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


Multiple localization (resource) files for one application

2003-12-29 Thread Daniel Rabe
I understand the mechanics of how to use the "bundle" attribute with some of
the HTML tags to specify which resource bundle will be used to look up the
translation keys. I'd like to use several resource files for my strings so
that each subset of functionality can have its own resource file. So far so
good. However, I just realized that the html:errors tag uses a single bundle
for all of its ActionMessages. I was hoping to have all my "standard"
validator error messages in a "common.properties". But some of my Action
classes also add ActionMessages where the key refers to an entry in their
own properties files. It looks like this won't work quite the way I wanted
it to.

How do other development teams manage to split up their resource files in a
useful way? Any hints or advice would be appreciated.

Thanks,
Daniel Rabe



RE: Boolean checkbox in session form

2003-12-29 Thread Guillermo Meyer
To solve this problem, i created a new taglib for checkbox (extending
BaseFieldTag), that creates a hidden input with a value of true|false
and an auxiliary checkbox (named as  + _chk) with a
javascript handler that checks on checkbox value to set true or false to
the hidden field, so always is posted a true or a false value from UI
and set to the appropiate form attribute, and this way you can avoid
reseting value in reset form.

-Original Message-
From: Franck [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 29 de Diciembre de 2003 06:13 p.m.
To: 'Struts Users Mailing List'
Subject: Boolean checkbox in session form


Hi,

I'm becoming mad ...

Explain : to handle ActionForm boolean properties with HTML checkbox, we
"need" To initialize the property as "false" in the reset() method of
the ActionForm .. Ok

Now, if the Action form is defined in the session scope in the
struts-config file The first time the action is called, the bean is put
in session scope.

The next time (eg submit of another form on the same page), the bean is
readed from session scope (RequestProcessor.processActionForm) ... ok
After that, the reset() method is called
(RequestProcessor.processPopulate)

So it's impossible to keep the boolean property as "true" 

How can I store the form bean in the session scope with a "true" boolean
property ? Or maybe is there a way to not initialize the boolean
properties as "false" (and update them with checkboxes )

Is my problem understandable ??

Thanks ...

Franck Lefebure
equipe web http://www.orangecaraibe.com
collaborateur http://www.synaxis-partner.com
mailto:[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]



Boolean checkbox in session form

2003-12-29 Thread Franck
Hi,

I'm becoming mad ...

Explain : to handle ActionForm boolean properties with HTML checkbox, we
"need"
To initialize the property as "false" in the reset() method of the
ActionForm .. Ok

Now, if the Action form is defined in the session scope in the
struts-config file
The first time the action is called, the bean is put in session scope.

The next time (eg submit of another form on the same page), the bean is
readed from session scope (RequestProcessor.processActionForm) ... ok
After that, the reset() method is called
(RequestProcessor.processPopulate)

So it's impossible to keep the boolean property as "true" 

How can I store the form bean in the session scope with a "true" boolean
property ?
Or maybe is there a way to not initialize the boolean properties as
"false" (and update them with checkboxes )

Is my problem understandable ??

Thanks ...

Franck Lefebure
equipe web http://www.orangecaraibe.com
collaborateur http://www.synaxis-partner.com
mailto:[EMAIL PROTECTED]
 


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



Re: Oracle DataSource configuration

2003-12-29 Thread Kris Schneider
What you're thinking of as a connection pool, Oracle refers to as a connection
cache. Their pool/cache implementation is provided by
oracle.jdbc.pool.OracleConnectionCacheImpl. I don't recall if I've gotten that
to work with TC before. Have you read:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Quoting Ed Dowgiallo <[EMAIL PROTECTED]>:

> OK.
> 
> I have moved the Oracle JDBC library from shared/lib to common/lib.  Same
> error message.  SQLException: Cannot create JDBC driver of class '' for
> connect URL 'null'
> 
> Restarted Tomcat service.  Same error message.
> 
> Removed all the javax.sql... classes from classes12.jar and
> classes12dms.jar.  Same error message.
> 
> Logged a few sanity checks.  All look OK.
> Value of servlet init parameter data-source is Library
> InitialContext is not null
> Context for java:/comp/env is not null
> dataSource is not null: [EMAIL PROTECTED]
> 
> Any other ideas?
> 
> Has anyone successfully configured oracle.jdbc.pool.OracleDataSourceFactory
> or oracle.jdbc.pool.OracleConnectionPoolDataSource instead of or in
> addition
> to org.apache.commons.dbcp.BasicDataSourceFactory and
> oracle.jdbc.driver.OracleDriver?
> 
> Thank you,
> Ed
> 
> - Original Message - 
> From: "Kris Schneider" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, December 29, 2003 12:13 PM
> Subject: RE: Oracle DataSource configuration
> 
> 
> > The following:
> >
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
> >
> > explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
> > $CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then
> all web
> > apps can "see" them but catalina can't, IIRC.
> >
> > Quoting Ben Anderson <[EMAIL PROTECTED]>:
> >
> > > not sure if this matters, but my oracle jar is in common/lib instead of
> > > shared/lib.  I'm not familiar with the differences/uses of common and
> > > shared, but that's how mine works.
> > > -Ben
> > >
> > >
> > > >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: Oracle DataSource configuration
> > > >Date: Mon, 29 Dec 2003 11:12:11 -0500
> > > >
> > > >I'm running into the following exception when issuing a getConnection
> to an
> > >
> > > >Oracle DataSource.
> > > >
> > > >SQLException: Cannot create JDBC driver of class '' for connect URL
> 'null'
> > > >
> > > >It has the following definition in a Tomcat 4.1.29 server.xml file.
> > > >
> > > > > > >type="javax.sql.DataSource"/>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >factory
> > > >
> > > >org.apache.commons.dbcp.BasicDataSourceFactory
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >driverClassName
> > > >
> > > >oracle.jdbc.driver.OracleDriver
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >url
> > > >
> > > >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >username
> > > >
> > > >abc
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >password
> > > >
> > > >xyz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxActive
> > > >
> > > >25
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxIdle
> > > >
> > > >10
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxWait
> > > >
> > > >-1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >I have setup the following resource-ref in the applications web.xml
> file.
> > > >
> > > >   
> > > > Oracle DataSource
> > > > Library
> > > > javax.sql.DataSource
> > > > Container
> > > >   
> > > >
> > > >The JDBC library is a class12.jar file in the Tomcat shared/lib
> directory.
> > > >
> > > >Comments and suggestions are most welcome.
> > > >
> > > >Thank you,
> > > >
> > > >Ed
> >
> > -- 
> > Kris Schneider 
> > D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



RE: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Chappell, Simon P
It wouldn't be useful for most people, but for an intranet application where a regular 
PC would be overkill, it made sense to use thin clients, and even more sense to use 
touchscreens and toss the keyboard and mouse (we have space constraints in the packing 
stations as it is, there was no way that the engineers would give us room for 
luxuries! :-)

Simon

>-Original Message-
>From: Mark Lowe [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 29, 2003 1:59 PM
>To: Struts Users Mailing List
>Subject: Re: Is there a way to prevent urls from being entered from the
>browser?
>
>
>So to "prevent urls from being entered from the browser" all you have 
>to do is take the keyboard and mouse out the equation.
>
>Nice solution I can see how that would be useful for most folk's.
>
>
>On 29 Dec 2003, at 19:48, Chappell, Simon P wrote:
>
>> Nope. There is no keyboard and no mouse. :-)
>>
>>> -Original Message-
>>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, December 29, 2003 1:41 PM
>>> To: Struts Users Mailing List
>>> Subject: Re: Is there a way to prevent urls from being entered from 
>>> the
>>> browser?
>>>
>>>
>>> Is like the one in virgin stores where you can ctrl+esc and get the
>>> menu/desktop up?
>>>
>>>
>>> On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:
>>>
 Oh that's far too clever!

 We just used thin-client terminals locked in kiosk mode with I.E.
 running in full screen, using touch screens and taking away the
 keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)

 Simon

> -Original Message-
> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 29, 2003 1:09 PM
> To: Struts Users Mailing List
> Subject: Re: Is there a way to prevent urls from being 
>entered from
> the
> browser?
>
>
> In theory, you could write a filter for the forwards that
> would check to
> see if a REFERER is set for the request. If not, the request
> was likely
> entered directly in a browser.
>
> Jim Anderson wrote:
>
>> To clarify: I would like to be able to define
>>> ActionForwards for use
>> within the app but which cannot be entered directly into
>>> the browser
>> by the user. Is this possible?
>>
>> Thanks.
>>
>> jim
>>
>>
>>
>>> 
>-
>> To unsubscribe, e-mail: 
>[EMAIL PROTECTED]
>> For additional commands, e-mail:
>>> [EMAIL PROTECTED]
>>
>
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
>
>
>
>>> 
>-
> 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]
>
>

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



Forwarding to Global Error page from ActionForm

2003-12-29 Thread Srinivas Kusunam

Hi,

  Is it possible to forward to Global Error page from ActionForm? If yes then how??
 
  I appreciate any help.

Thanks,
Srini



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



Re: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Paul-J Woodward

I modified the ActionServlet (might not be necessary - need to investigate the dynamic 
module config stuff further), created a new TilesDefinitionFactory and changed a few 
other bits and made tiles extract all of its definitions from a database. I also 
implemented a cache mechanism as a Java servlet so that database access was minimal.

This was all because I need a site that was truly dynamic, whilst running on a cluster 
of servers.

Paul

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



   
   
 
  Brice Ruth   
   
 
  <[EMAIL PROTECTED]To:   Struts Users Mailing List 
<[EMAIL PROTECTED]>

  m>   cc: 
   
 
   Subject:  Re: [Tiles] Populating Tiles 
definition attribute at runtime
  
  29/12/2003 19:20 
   
 
  Please respond to
   
 
  "Struts Users
   
 
  Mailing List"
   
 
   
   
 
   
   
 




Wow, that's pretty cool ... I'll have to check out the controllerClass
stuff sometime :)

Domingo A. Rodriguez S. wrote:

>Hi Robert..
>
>I guess you could achieve the same using the controllerClass attribute and
>building your class.. For instance, I have this definition in the
>tiles-defs.xml file:
>---
>  path="/common/layout.jsp"
>controllerClass='com.dars.XTileAction'>
> 
> 
> 
> 
> 
> 
>   
>---
>  And I have this controllerClass
>---
>package com.dars;
>import org.apache.struts.tiles.actions.TilesAction;
>import org.apache.struts.tiles.ComponentContext;
>import org.apache.struts.tiles.Controller;
>import javax.servlet.http.HttpServletRequest;
>import javax.servlet.http.HttpServletResponse;
>import javax.servlet.ServletContext;
>import javax.servlet.ServletException;
>import java.io.IOException;
>
>public class XTileAction extends TilesAction implements Controller{>public void 
>perform(ComponentContext tilesctx,
>HttpServletRequest request,
>HttpServletResponse response,
>ServletContext servctx)
>throws ServletException, IOException{> /* GetAttributes */
> String titulo= (String)tilesctx.getAttribute("title");
> String derecha= (String)tilesctx.getAttribute("rightside");
> /* GetAttributes */
> System.out.println("  Titulo: "+titulo);
> System.out.println(" Derecha: "+derecha);
> /* SetAttributes */
>   tilesctx.putAttribute("title", "Titulo nuevo de esta vaina..");
>   tilesctx.putAttribute("rightside", "/common/footer.jsp");
> /* SetAttributes */
>}
>}
>---
>You can change the values of those attributes at runtime. I prefer to do
>it using this method.
>
>Atte.
>Domingo A. Rodriguez S.
>
>
> --- Robert Taylor <[EMAIL PROTECTED]> escribió: > Greetings, I have a
>tiles definition in my tiles-defs.xml similar to
>
>
>>below:
>>
>> 
>>  

Re: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Mark Lowe
So to "prevent urls from being entered from the browser" all you have 
to do is take the keyboard and mouse out the equation.

Nice solution I can see how that would be useful for most folk's.

On 29 Dec 2003, at 19:48, Chappell, Simon P wrote:

Nope. There is no keyboard and no mouse. :-)

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:41 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from 
the
browser?

Is like the one in virgin stores where you can ctrl+esc and get the
menu/desktop up?
On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:

Oh that's far too clever!

We just used thin-client terminals locked in kiosk mode with I.E.
running in full screen, using touch screens and taking away the
keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
Simon

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:09 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from
the
browser?
In theory, you could write a filter for the forwards that
would check to
see if a REFERER is set for the request. If not, the request
was likely
entered directly in a browser.
Jim Anderson wrote:

To clarify: I would like to be able to define
ActionForwards for use
within the app but which cannot be entered directly into
the browser
by the user. Is this possible?

Thanks.

jim



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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Domingo A. Rodriguez S.

Hmmm.. I would use a 'state machine' because: 

1. You just can't disable the URL bar in your browser without rendering it
useless (..).
2. Use javascript and your users will disable it.
3. Hack your browser to disallow entering URLs in the URL bar and then
hack everyone else's who need to use your application.

Definitively I would use a State Machine where I could control what URLs
(and their parameters) are supposed to be allowed anytime. I could control
their flow from inside the servlet without having to buy expensive
hardware or hacking everyone's pcs just to keep the users behaving
properly.

Atte.
Domingo A. Rodriguez S.

 --- Andy Schmidgall <[EMAIL PROTECTED]> escribió: > That
would require a keyboard, would it not? :)
> 
> Could you not have a flag var in the session or something that is only
> set by a certain piece of code? If the user typed in the URL directly,
> the flag wouldn't be set, and you could filter requests based on that.
> 
> -Andy
> 
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 29, 2003 1:41 PM
> To: Struts Users Mailing List
> Subject: Re: Is there a way to prevent urls from being entered from the
> browser?
> 
> 
> Is like the one in virgin stores where you can ctrl+esc and get the 
> menu/desktop up?
> 
> 
> On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:
> 
> > Oh that's far too clever!
> >
> > We just used thin-client terminals locked in kiosk mode with I.E.
> > running in full screen, using touch screens and taking away the 
> > keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
> >
> > Simon
> >
> >> -Original Message-
> >> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> >> Sent: Monday, December 29, 2003 1:09 PM
> >> To: Struts Users Mailing List
> >> Subject: Re: Is there a way to prevent urls from being entered from
> >> the
> >> browser?
> >>
> >>
> >> In theory, you could write a filter for the forwards that would check
> 
> >> to see if a REFERER is set for the request. If not, the request
> >> was likely
> >> entered directly in a browser.
> >>
> >> Jim Anderson wrote:
> >>
> >>> To clarify: I would like to be able to define ActionForwards for use
> 
> >>> within the app but which cannot be entered directly into the browser
> 
> >>> by the user. Is this possible?
> >>>
> >>> Thanks.
> >>>
> >>> jim
> >>>
> >>>
> >>> 
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>
> >> --
> >> Brice D. Ruth
> >> Sr. IT Analyst
> >> Fiskars Brands, Inc.
> >>
> >>
> >> -
> >> 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]
>  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: Oracle DataSource configuration

2003-12-29 Thread Ed Dowgiallo
OK.

I have moved the Oracle JDBC library from shared/lib to common/lib.  Same
error message.  SQLException: Cannot create JDBC driver of class '' for
connect URL 'null'

Restarted Tomcat service.  Same error message.

Removed all the javax.sql... classes from classes12.jar and
classes12dms.jar.  Same error message.

Logged a few sanity checks.  All look OK.
Value of servlet init parameter data-source is Library
InitialContext is not null
Context for java:/comp/env is not null
dataSource is not null: [EMAIL PROTECTED]

Any other ideas?

Has anyone successfully configured oracle.jdbc.pool.OracleDataSourceFactory
or oracle.jdbc.pool.OracleConnectionPoolDataSource instead of or in addition
to org.apache.commons.dbcp.BasicDataSourceFactory and
oracle.jdbc.driver.OracleDriver?

Thank you,
Ed

- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 12:13 PM
Subject: RE: Oracle DataSource configuration


> The following:
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
>
> explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
> $CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then
all web
> apps can "see" them but catalina can't, IIRC.
>
> Quoting Ben Anderson <[EMAIL PROTECTED]>:
>
> > not sure if this matters, but my oracle jar is in common/lib instead of
> > shared/lib.  I'm not familiar with the differences/uses of common and
> > shared, but that's how mine works.
> > -Ben
> >
> >
> > >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: Oracle DataSource configuration
> > >Date: Mon, 29 Dec 2003 11:12:11 -0500
> > >
> > >I'm running into the following exception when issuing a getConnection
to an
> >
> > >Oracle DataSource.
> > >
> > >SQLException: Cannot create JDBC driver of class '' for connect URL
'null'
> > >
> > >It has the following definition in a Tomcat 4.1.29 server.xml file.
> > >
> > > > >type="javax.sql.DataSource"/>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >factory
> > >
> > >org.apache.commons.dbcp.BasicDataSourceFactory
> > >
> > >
> > >
> > >
> > >
> > >driverClassName
> > >
> > >oracle.jdbc.driver.OracleDriver
> > >
> > >
> > >
> > >
> > >
> > >url
> > >
> > >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> > >
> > >
> > >
> > >
> > >
> > >username
> > >
> > >abc
> > >
> > >
> > >
> > >
> > >
> > >password
> > >
> > >xyz
> > >
> > >
> > >
> > >
> > >
> > >maxActive
> > >
> > >25
> > >
> > >
> > >
> > >
> > >
> > >maxIdle
> > >
> > >10
> > >
> > >
> > >
> > >
> > >
> > >maxWait
> > >
> > >-1
> > >
> > >
> > >
> > >
> > >
> > >I have setup the following resource-ref in the applications web.xml
file.
> > >
> > >   
> > > Oracle DataSource
> > > Library
> > > javax.sql.DataSource
> > > Container
> > >   
> > >
> > >The JDBC library is a class12.jar file in the Tomcat shared/lib
directory.
> > >
> > >Comments and suggestions are most welcome.
> > >
> > >Thank you,
> > >
> > >Ed
>
> -- 
> Kris Schneider 
> D.O.Tech   
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: struts and JDeveloper 9.03

2003-12-29 Thread Steve Muench
JDeveloper 9.0.3 ships with Struts 1.1 Beta 2

JDeveloper 9.0.4 and JDeveloper 10g ship with Struts 1.1 Final

This article explains the steps of running a Struts-based demo (like our BC4J/Struts 
Toy Store Demo) under 9.0.3 using Struts 1.1
Final. It should contain the steps that you need to run your application with Struts 
1.1 Final if you don't want to yet move up to
JDeveloper 9.0.4.

http://radio.weblogs.com/0118231/stories/2003/07/07/configuringTheBc4jToyStoreApplicationToUseTheStruts11FinalRelease.html


Steve Muench - Technical Evangelist, Product Mgr, Developer, Author - Oracle
http://radio.weblogs.com/0118231/

-Original Message-
From: Patrick Schilling [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 08:46
To: [EMAIL PROTECTED]
Subject: Re: struts and JDeveloper 9.03

Kalra, Ashwani wrote:
> hi,
> I am working with Jdeveloper and Struts 1.1 When I try to run any page 
> ,  its not able to find the core action class.
> struts.jar is lying in lib dir
> 
> Error is
> java.lang.NoClassDefFoundError: org/apache/struts/action/Action 
> java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[],
> int, int, java.security.ProtectionDomain) native code
> 
> Thanks
> Ashwani Kalra
> http://www.geocities.com/ashwani_kalra
> 
> 
> 
> This message contains information that may be privileged or 
> confidential and is the property of the Cap Gemini Ernst & Young 
> Group. It is intended only for the person to whom it is addressed. If 
> you are not the intended recipient, you are not authorised to read, 
> print, retain, copy, disseminate, distribute, or use this message or 
> any part thereof. If you receive this message in error, please notify 
> the sender immediately and delete all copies of this message.

Hello,

JDeveloper 9.0.3 puts it's own version of struts.jar in the lib directory, which is 
older than Struts 1.1.  This causes the error
when you try to run the pages.  Try making an empty jar file, setting it to read only, 
and replace the struts.jar in the lib
directory with it. 
This will prevent JDeveloper from overwriting it with it's version again.

This is a kind of annoying hack, and if anyone has a better suggestion, I wouldn't 
mind hearing about it.

Hope this helps,

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]



Dynamic form property names

2003-12-29 Thread Paul-J Woodward
Dear All,

I have been struggling with this all day, It'll take a bit of background to explain 
what I am trying to do:

I am creating an online wizard to populate templatised web pages, and hence create a 
dynamic struts/tiles-based site.

Each template has various containers for content, each container can be filled by a 
set of different tiles. The templates are defined in a database. The definition for a 
template associates each container with the category of tile that it can hold, for 
instance a template may have containers for navigation and menu tiles. The database 
also contains a list of tiles that fit into each category of container.

I would like to create a single form that lists the categories, that has radio button 
for every tile in each category.
My code looks like this:

  
  


Compatible elements in this category:



  

  
  
  


  
  


The issue is this:
I need to make the action form map-backed (I think) because the number of radio 
buttons is only know at runtime, but I can't find any way to name the radio buttons by 
the name of the category that is being selected. What I would like to use is value(<%= 
elementCategory.getName() %>) where my action form has a map and a setValue(String 
key, Object object) function.

Thanks in advance, Paul


--

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]



RE: Oracle DataSource configuration

2003-12-29 Thread Steve Muench
Ed,
 
The setup instructions for the "BC4J/Struts Toy Store Demo" at:
 
  http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/index.html
 
 
go over the specifics of setting up Oracle DataSource for Tomcat.
 
The direct URL to the 80-page whitepaper that explains the demo's implementation and 
setup is at:
 
  http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/readme.html
 
Hope this helps.
 

Steve Muench - Technical Evangelist, Product Mgr, Developer, Author
http://radio.weblogs.com/0118231/


 


  _  

From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 08:12
To: Struts Users Mailing List
Subject: Oracle DataSource configuration


I'm running into the following exception when issuing a getConnection to an Oracle 
DataSource.
 
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
 
It has the following definition in a Tomcat 4.1.29 server.xml file.
 








factory

org.apache.commons.dbcp.BasicDataSourceFactory

 



driverClassName

oracle.jdbc.driver.OracleDriver





url

jdbc:oracle:thin:@192.168.0.202:1521:tpeds002





username

abc





password

xyz





maxActive

25





maxIdle

10





maxWait

-1





I have setup the following resource-ref in the applications web.xml file.

  
Oracle DataSource
Library
javax.sql.DataSource
Container
  

The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed



RE: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Chappell, Simon P
Nope. There is no keyboard and no mouse. :-)

>-Original Message-
>From: Mark Lowe [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 29, 2003 1:41 PM
>To: Struts Users Mailing List
>Subject: Re: Is there a way to prevent urls from being entered from the
>browser?
>
>
>Is like the one in virgin stores where you can ctrl+esc and get the 
>menu/desktop up?
>
>
>On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:
>
>> Oh that's far too clever!
>>
>> We just used thin-client terminals locked in kiosk mode with I.E. 
>> running in full screen, using touch screens and taking away the 
>> keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
>>
>> Simon
>>
>>> -Original Message-
>>> From: Brice Ruth [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, December 29, 2003 1:09 PM
>>> To: Struts Users Mailing List
>>> Subject: Re: Is there a way to prevent urls from being entered from 
>>> the
>>> browser?
>>>
>>>
>>> In theory, you could write a filter for the forwards that
>>> would check to
>>> see if a REFERER is set for the request. If not, the request
>>> was likely
>>> entered directly in a browser.
>>>
>>> Jim Anderson wrote:
>>>
 To clarify: I would like to be able to define 
>ActionForwards for use
 within the app but which cannot be entered directly into 
>the browser
 by the user. Is this possible?

 Thanks.

 jim


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

>>>
>>> -- 
>>> Brice D. Ruth
>>> Sr. IT Analyst
>>> Fiskars Brands, Inc.
>>>
>>>
>>> 
>-
>>> 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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Mike Jasnowski
ctrl+esc w/o a keyboard? That would be a neat trick.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 2:41 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from the
browser?


Is like the one in virgin stores where you can ctrl+esc and get the 
menu/desktop up?


On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:

> Oh that's far too clever!
>
> We just used thin-client terminals locked in kiosk mode with I.E. 
> running in full screen, using touch screens and taking away the 
> keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
>
> Simon
>
>> -Original Message-
>> From: Brice Ruth [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 29, 2003 1:09 PM
>> To: Struts Users Mailing List
>> Subject: Re: Is there a way to prevent urls from being entered from 
>> the
>> browser?
>>
>>
>> In theory, you could write a filter for the forwards that
>> would check to
>> see if a REFERER is set for the request. If not, the request
>> was likely
>> entered directly in a browser.
>>
>> Jim Anderson wrote:
>>
>>> To clarify: I would like to be able to define ActionForwards for use
>>> within the app but which cannot be entered directly into the browser
>>> by the user. Is this possible?
>>>
>>> Thanks.
>>>
>>> jim
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>> -- 
>> Brice D. Ruth
>> Sr. IT Analyst
>> Fiskars Brands, Inc.
>>
>>
>> -
>> 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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Andy Schmidgall
That would require a keyboard, would it not? :)

Could you not have a flag var in the session or something that is only
set by a certain piece of code? If the user typed in the URL directly,
the flag wouldn't be set, and you could filter requests based on that.

-Andy

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 1:41 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from the
browser?


Is like the one in virgin stores where you can ctrl+esc and get the 
menu/desktop up?


On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:

> Oh that's far too clever!
>
> We just used thin-client terminals locked in kiosk mode with I.E.
> running in full screen, using touch screens and taking away the 
> keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)
>
> Simon
>
>> -Original Message-
>> From: Brice Ruth [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 29, 2003 1:09 PM
>> To: Struts Users Mailing List
>> Subject: Re: Is there a way to prevent urls from being entered from
>> the
>> browser?
>>
>>
>> In theory, you could write a filter for the forwards that would check

>> to see if a REFERER is set for the request. If not, the request
>> was likely
>> entered directly in a browser.
>>
>> Jim Anderson wrote:
>>
>>> To clarify: I would like to be able to define ActionForwards for use

>>> within the app but which cannot be entered directly into the browser

>>> by the user. Is this possible?
>>>
>>> Thanks.
>>>
>>> jim
>>>
>>>
>>> 
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>> --
>> Brice D. Ruth
>> Sr. IT Analyst
>> Fiskars Brands, Inc.
>>
>>
>> -
>> 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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Mark Lowe
Is like the one in virgin stores where you can ctrl+esc and get the 
menu/desktop up?

On 29 Dec 2003, at 19:30, Chappell, Simon P wrote:

Oh that's far too clever!

We just used thin-client terminals locked in kiosk mode with I.E. 
running in full screen, using touch screens and taking away the 
keyboard and mouse. Ha ha ... now try typing in a URL!!! :-)

Simon

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:09 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to prevent urls from being entered from 
the
browser?

In theory, you could write a filter for the forwards that
would check to
see if a REFERER is set for the request. If not, the request
was likely
entered directly in a browser.
Jim Anderson wrote:

To clarify: I would like to be able to define ActionForwards for use
within the app but which cannot be entered directly into the browser
by the user. Is this possible?
Thanks.

jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Chappell, Simon P
Oh that's far too clever!

We just used thin-client terminals locked in kiosk mode with I.E. running in full 
screen, using touch screens and taking away the keyboard and mouse. Ha ha ... now try 
typing in a URL!!! :-)

Simon

>-Original Message-
>From: Brice Ruth [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 29, 2003 1:09 PM
>To: Struts Users Mailing List
>Subject: Re: Is there a way to prevent urls from being entered from the
>browser?
>
>
>In theory, you could write a filter for the forwards that 
>would check to 
>see if a REFERER is set for the request. If not, the request 
>was likely 
>entered directly in a browser.
>
>Jim Anderson wrote:
>
>> To clarify: I would like to be able to define ActionForwards for use 
>> within the app but which cannot be entered directly into the browser 
>> by the user. Is this possible?
>>
>> Thanks.
>>
>> jim
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>-- 
>Brice D. Ruth
>Sr. IT Analyst
>Fiskars Brands, Inc.
>
>
>-
>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: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Brice Ruth
Wow, that's pretty cool ... I'll have to check out the controllerClass 
stuff sometime :)

Domingo A. Rodriguez S. wrote:

Hi Robert..

I guess you could achieve the same using the controllerClass attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
  
   controllerClass='com.dars.XTileAction'>






  
---
 And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;

public class XTileAction extends TilesAction implements Controller{
   public void perform(ComponentContext tilesctx,
   HttpServletRequest request,
   HttpServletResponse response,
   ServletContext servctx) 
   throws ServletException, IOException{
/* GetAttributes */
String titulo= (String)tilesctx.getAttribute("title");
String derecha= (String)tilesctx.getAttribute("rightside");
/* GetAttributes */ 
System.out.println("  Titulo: "+titulo);
System.out.println(" Derecha: "+derecha);
/* SetAttributes */
  tilesctx.putAttribute("title", "Titulo nuevo de esta vaina..");
  tilesctx.putAttribute("rightside", "/common/footer.jsp");
/* SetAttributes */
   }
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.

Atte.
Domingo A. Rodriguez S.
--- Robert Taylor <[EMAIL PROTECTED]> escribió: > Greetings, I have a
tiles definition in my tiles-defs.xml similar to
 

below:


   
   
 
which I would like to be able to modify the "heading" value such that
at runtime I could substitute a value for {0}. 

For example, it would be ideal to use a JSTL type of syntax such as:


   
   
 
but this does not work.



robert

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

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Domingo A. Rodriguez S.

Hi Robert..

I guess you could achieve the same using the controllerClass attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
   
 
 
 
 
 
 
   
---
  And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;

public class XTileAction extends TilesAction implements Controller{
public void perform(ComponentContext tilesctx,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servctx) 
throws ServletException, IOException{
 /* GetAttributes */
 String titulo= (String)tilesctx.getAttribute("title");
 String derecha= (String)tilesctx.getAttribute("rightside");
 /* GetAttributes */ 
 System.out.println("  Titulo: "+titulo);
 System.out.println(" Derecha: "+derecha);
 /* SetAttributes */
   tilesctx.putAttribute("title", "Titulo nuevo de esta vaina..");
   tilesctx.putAttribute("rightside", "/common/footer.jsp");
 /* SetAttributes */
}
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.

Atte.
Domingo A. Rodriguez S.


 --- Robert Taylor <[EMAIL PROTECTED]> escribió: > Greetings, I have a
tiles definition in my tiles-defs.xml similar to
> below:
> 
>  
> 
> 
>   
> 
> which I would like to be able to modify the "heading" value such that
> at runtime I could substitute a value for {0}. 
> 
> For example, it would be ideal to use a JSTL type of syntax such as:
> 
> 
> 
> 
>   
> 
> but this does not work.
> 
> 
> 
> robert
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Brice Ruth
The cleanest thing to do here, likely, would be to have your 'content' 
attribute have a value that maps to an Action (/search.do would work, I 
think - Vic might be able to confirm this) and in the Action class, 
define an attribute "heading" stored in request context, that pulls from 
request parameters. The tiles-defs.xml isn't really a "dynamic" 
mechanism in any way - its a config file that is loaded - it isn't 
treated as a JSP that gets compiled into a .java and then compiled to a 
.class servlet.

Alternately, just set your heading attribute in tiles-defs.xml to be 
"Search" or whatever you want, and in the /search.jsp file, use JSTL to 
prepend param.myValue. This would be pretty clean for simple scenarios.

Robert Taylor wrote:

Greetings, I have a tiles definition in my tiles-defs.xml similar to below:


   
   
 
which I would like to be able to modify the "heading" value such that
at runtime I could substitute a value for {0}. 

For example, it would be ideal to use a JSTL type of syntax such as:


   
   
 
but this does not work.



robert

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Robert Taylor
Thanks for the reply Pedro, but I was looking for a cleaner solution.

robert

> -Original Message-
> From: Pedro Salgado [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 29, 2003 12:51 PM
> To: Struts Users Mailing List
> Subject: Re: [Tiles] Populating Tiles definition attribute at runtime
>
>
>
>   I don¹t know if it is possible to change a tiles definition at
> runtime but
> a solution to your problem could be solved by specifying a definition that
> uses a jsp file that does a conditional include according to a given
> parameter?
>
> 
>   
>  <-
>
> 
>
> > choose.jsp
>
> 
>
>
> Pedro Salgado
>
>
> On 29/12/2003 17:46, "Robert Taylor" <[EMAIL PROTECTED]> wrote:
>
> > Greetings, I have a tiles definition in my tiles-defs.xml
> similar to below:
> >
> > 
> >   
> >   
> > 
> >
> > which I would like to be able to modify the "heading" value such that
> > at runtime I could substitute a value for {0}.
> >
> > For example, it would be ideal to use a JSTL type of syntax such as:
> >
> > 
> >   
> >   
> > 
> >
> > but this does not work.
> >
> >
> >
> > robert
> >
> > -
> > 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: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Brice Ruth
In theory, you could write a filter for the forwards that would check to 
see if a REFERER is set for the request. If not, the request was likely 
entered directly in a browser.

Jim Anderson wrote:

To clarify: I would like to be able to define ActionForwards for use 
within the app but which cannot be entered directly into the browser 
by the user. Is this possible?

Thanks.

jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Jim Anderson
To clarify: I would like to be able to define ActionForwards for use 
within the app but which cannot be entered directly into the browser by 
the user. Is this possible?

Thanks.

jim

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


help with action roles

2003-12-29 Thread Kelly Goedert
Hello,

Could anybody point me an example on how to use action roles?
Or any explanation?
I read Ted Husted Struts in Action but I can't get this feature to work 
properly.

Thank you

Kelly.

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


Re: [Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Pedro Salgado

  I don¹t know if it is possible to change a tiles definition at runtime but
a solution to your problem could be solved by specifying a definition that
uses a jsp file that does a conditional include according to a given
parameter?


  
 <-
   


> choose.jsp




Pedro Salgado


On 29/12/2003 17:46, "Robert Taylor" <[EMAIL PROTECTED]> wrote:

> Greetings, I have a tiles definition in my tiles-defs.xml similar to below:
> 
> 
>   
>   
> 
> 
> which I would like to be able to modify the "heading" value such that
> at runtime I could substitute a value for {0}.
> 
> For example, it would be ideal to use a JSTL type of syntax such as:
> 
> 
>   
>   
> 
> 
> but this does not work.
> 
> 
> 
> robert
> 
> -
> 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: question about form handling

2003-12-29 Thread Mark Lowe
Yeah.. I tend to do things on the server and layer the client-side 
stuff on when i get time. In fact i'm a bit obsessive about not having 
js dependent apps. :o)

On 29 Dec 2003, at 16:53, Cory Wright wrote:

Hi Dirk:

Sounds like you're talking about client-side issues here.  If you're 
just trying to populate form-fields with values from a child window 
(i.e. popup), use javascript to try something like this in the popup:

function updateParent(){
   popUpValue = 
document.getElementById("whateverThePopupFormFieldIdIs").value;
   parentField = 
opener.document.getElementById("whateverTheParentFormFieldIdIs");
   parentField.value = popUpValue;
   close();

Then set the form tag's onSubmit="updateParent()" or set the submit 
button's onclick="updateParent()" in the popup window.  Make sure you 
set the required fields' id properties.

Now if what you require is some processing of the popup's data by the 
server, then a subsequent update of the parent...

Submit the popup form to whatever Action you require, then map the 
successful completion of the Action to a simple html  page or jsp, 
which need only contain the following script:

function updateParent(){
  opener.location.reload(true)
  close();
}
and set the body tag's onLoad="updateParent()".

If you're talking about all server-side manipulation, Mark Lowe's 
answer was just fine.  Hope that helps.

Cheers,

Cory


Hello,
anybody know how to handle one action, but two forms (one base form +
one popup ). When the popup gets closed the base form should be
updated with the data from the popup. Anybody has a working example ?
Thanks


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


[Tiles] Populating Tiles definition attribute at runtime

2003-12-29 Thread Robert Taylor
Greetings, I have a tiles definition in my tiles-defs.xml similar to below:

 


  

which I would like to be able to modify the "heading" value such that
at runtime I could substitute a value for {0}. 

For example, it would be ideal to use a JSTL type of syntax such as:




  

but this does not work.



robert

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



Re: dynamic arg0 in bean:message?

2003-12-29 Thread Frank Maritato
Thanks everyone! Since I had a jsp:useBean in the page already, I was able to do 
the following:

<%=\"\"+globals.getMinChars()%>

Nicolas De Loof wrote:
Your first example is invalid :

" />
A JSP tag cannot be used as attribute value of another tag (XML syntax)

This should work :



Nico.

- Original Message - 
From: "Domingo A. Rodriguez S." <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 1:48 PM
Subject: Re: dynamic arg0 in bean:message?



Either escape the double quotes ("" ) or use single quotes ("" ).
--- Frank Maritato <[EMAIL PROTECTED]> escribió: > Hi,

What I want to do is something like this:

" />
or


Where arg0 is the result of a bean property, but I can't seem to get it
to work. If I hard-code the value


It works, but it kinda defeats the purpose.

What am I doing wrong, or is there a better way to accomplish this?

Thanks
--
Frank
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.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]
--
Frank Maritato
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Oracle DataSource configuration

2003-12-29 Thread Kris Schneider
The following:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
$CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then all web
apps can "see" them but catalina can't, IIRC.

Quoting Ben Anderson <[EMAIL PROTECTED]>:

> not sure if this matters, but my oracle jar is in common/lib instead of 
> shared/lib.  I'm not familiar with the differences/uses of common and 
> shared, but that's how mine works.
> -Ben
> 
> 
> >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Oracle DataSource configuration
> >Date: Mon, 29 Dec 2003 11:12:11 -0500
> >
> >I'm running into the following exception when issuing a getConnection to an
> 
> >Oracle DataSource.
> >
> >SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
> >
> >It has the following definition in a Tomcat 4.1.29 server.xml file.
> >
> > >type="javax.sql.DataSource"/>
> >
> >
> >
> >
> >
> >
> >
> >factory
> >
> >org.apache.commons.dbcp.BasicDataSourceFactory
> >
> >
> >
> >
> >
> >driverClassName
> >
> >oracle.jdbc.driver.OracleDriver
> >
> >
> >
> >
> >
> >url
> >
> >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> >
> >
> >
> >
> >
> >username
> >
> >abc
> >
> >
> >
> >
> >
> >password
> >
> >xyz
> >
> >
> >
> >
> >
> >maxActive
> >
> >25
> >
> >
> >
> >
> >
> >maxIdle
> >
> >10
> >
> >
> >
> >
> >
> >maxWait
> >
> >-1
> >
> >
> >
> >
> >
> >I have setup the following resource-ref in the applications web.xml file.
> >
> >   
> > Oracle DataSource
> > Library
> > javax.sql.DataSource
> > Container
> >   
> >
> >The JDBC library is a class12.jar file in the Tomcat shared/lib directory.
> >
> >Comments and suggestions are most welcome.
> >
> >Thank you,
> >
> >Ed

-- 
Kris Schneider 
D.O.Tech   

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



Re: Design question regarding struts security features

2003-12-29 Thread Patrick Scheuerer
Mohan Radhakrishnan wrote:

  I think you can also use the role attribute in struts-config.xml and
restrict access actions. Tiles has a role attribute too ? though we are not
using that.
 

I came across the role tag of tiles as well, but I guess it's suitable 
only if you want to restrict some area of the user interface (let's say 
a special panel for administrators).
Where can I find more information about the role attribute in 
struts-config.xml? I couldn't find anything in the Struts User's Guide...

Thanks, Patrick

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


Re: question about form handling

2003-12-29 Thread Cory Wright
Hi Dirk:

Sounds like you're talking about client-side issues here.  If you're just trying to 
populate form-fields with values from a child window (i.e. popup), use javascript to 
try something like this in the popup:

function updateParent(){
   popUpValue = document.getElementById("whateverThePopupFormFieldIdIs").value;
   parentField = opener.document.getElementById("whateverTheParentFormFieldIdIs");
   parentField.value = popUpValue;
   close();

Then set the form tag's onSubmit="updateParent()" or set the submit button's 
onclick="updateParent()" in the popup window.  Make sure you set the required fields' 
id properties. 


Now if what you require is some processing of the popup's data by the server, then a 
subsequent update of the parent...

Submit the popup form to whatever Action you require, then map the successful 
completion of the Action to a simple html  page or jsp, which need only contain the 
following script:

function updateParent(){
  opener.location.reload(true)
  close();
}

and set the body tag's onLoad="updateParent()".

If you're talking about all server-side manipulation, Mark Lowe's answer was just 
fine.  Hope that helps.

Cheers,

Cory


> Hello,
> anybody know how to handle one action, but two forms (one base form + 
> one popup ). When the popup gets closed the base form should be 
> updated with the data from the popup. Anybody has a working example ?
> Thanks


RE: Oracle DataSource configuration

2003-12-29 Thread Ben Anderson
not sure if this matters, but my oracle jar is in common/lib instead of 
shared/lib.  I'm not familiar with the differences/uses of common and 
shared, but that's how mine works.
-Ben


From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Oracle DataSource configuration
Date: Mon, 29 Dec 2003 11:12:11 -0500
I'm running into the following exception when issuing a getConnection to an 
Oracle DataSource.

SQLException: Cannot create JDBC driver of class '' for connect URL 'null'

It has the following definition in a Tomcat 4.1.29 server.xml file.









factory

org.apache.commons.dbcp.BasicDataSourceFactory





driverClassName

oracle.jdbc.driver.OracleDriver





url

jdbc:oracle:thin:@192.168.0.202:1521:tpeds002





username

abc





password

xyz





maxActive

25





maxIdle

10





maxWait

-1





I have setup the following resource-ref in the applications web.xml file.

  
Oracle DataSource
Library
javax.sql.DataSource
Container
  
The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Check your PC for viruses with the FREE McAfee online computer scan.  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: File Upload Validator

2003-12-29 Thread Matthias Wessendorf
hi,

use 

set this in struts-config for maxFileSize.

look at file-upload-sample in your struts-distribution
There cames an error, if the file is bigger.

greetings

matthias


-Original Message-
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 5:34 PM
To: Struts Users List
Subject: File Upload Validator


Hi,

I have to validate a form which collects all the data connected with a 
document. Allong with discriptive information there's also a 

element to upload the file itself. So far use a DynaValidatorForm to do 
validation. Everything works fine for the text based form elements. I 
would also like to validate the file (FormFile) for size (it shouldn't 
be bigger than e.g. 1 MB)  and MIME type (pdf, doc, exe, zip, etc.). Is 
there any extension for the Validator framework that can accomplish
this? Of course I could write my own validator class, I'm just curious
if 
something like this has been done already and is a readily available.

Thanks, 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: struts and JDeveloper 9.03

2003-12-29 Thread Patrick Schilling
Kalra, Ashwani wrote:
hi,
I am working with Jdeveloper and Struts 1.1
When I try to run any page ,  its not able to find the core action class.
struts.jar is lying in lib dir
Error is 
java.lang.NoClassDefFoundError: org/apache/struts/action/Action
java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[],
int, int, java.security.ProtectionDomain) 		native code

Thanks
Ashwani Kalra
http://www.geocities.com/ashwani_kalra

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

JDeveloper 9.0.3 puts it's own version of struts.jar in the lib 
directory, which is older than Struts 1.1.  This causes the error when 
you try to run the pages.  Try making an empty jar file, setting it to 
read only, and replace the struts.jar in the lib directory with it. 
This will prevent JDeveloper from overwriting it with it's version again.

This is a kind of annoying hack, and if anyone has a better suggestion, 
I wouldn't mind hearing about it.

Hope this helps,

Patrick

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


File Upload Validator

2003-12-29 Thread Patrick Scheuerer
Hi,

I have to validate a form which collects all the data connected with a 
document. Allong with discriptive information there's also a  
element to upload the file itself. So far use a DynaValidatorForm to do 
validation. Everything works fine for the text based form elements. I 
would also like to validate the file (FormFile) for size (it shouldn't 
be bigger than e.g. 1 MB)  and MIME type (pdf, doc, exe, zip, etc.). Is 
there any extension for the Validator framework that can accomplish this?
Of course I could write my own validator class, I'm just curious if 
something like this has been done already and is a readily available.

Thanks, Patrick

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


Oracle DataSource configuration

2003-12-29 Thread Ed Dowgiallo



I'm running into the following exception when 
issuing a getConnection to an Oracle DataSource.
 
SQLException: Cannot create JDBC driver of class '' for connect URL 
'null'
 
It has the following definition in a Tomcat 4.1.29 
server.xml file.
 





factory
org.apache.commons.dbcp.BasicDataSourceFactory
 

driverClassName
oracle.jdbc.driver.OracleDriver


url
jdbc:oracle:thin:@192.168.0.202:1521:tpeds002


username
abc


password
xyz


maxActive
25


maxIdle
10


maxWait
-1


I have setup the following resource-ref in the applications web.xml file.
      
Oracle DataSource    
Library    
javax.sql.DataSource    
Container  

The JDBC library is a class12.jar file in the 
Tomcat shared/lib directory.
Comments and suggestions are most welcome.
Thank you,
Ed
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: application.properties

2003-12-29 Thread Brice Ruth
the last entry overrides any previous entries. I'm not sure how 
MessageProperties is implemented, but I always think of a hashmap, where 
identical entries will override previous ones.

Otávio Augusto wrote:

Hi all

The application.properties file, from which i retrieve my resouce messages, has given me a doubt: is it scanned from the top to the botton or from the botton to the top? the thing is I made a mistake and added three identical messages there (errors.login.ivalid), and it always reads the last message. Maybe it loads the las message that matches the pattern, and overrides the previous ones. Is that right ?

thanks a lot

Otávio Augusto

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


EL tag libraries and MessageResources

2003-12-29 Thread Jani Heinonen
Hi,

I searched the mailing list archives and the bugzilla database, but couldn't
find an answer, so please excuse me if this is a FAQ.

I am unable to compile any JSP that uses any of the html-el tags under the
embedded Tomcat in Netbeans 3.5.1. The stacktrace follows:

bean-cookie.jsp [-1:-1] java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanInfo.j
ava:88)
at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors(ELH
tmlTagBeanInfo.java:88)
at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
at java.beans.Introspector.getBeanInfo(Introspector.java:372)
at java.beans.Introspector.getBeanInfo(Introspector.java:144)
at
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146
)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(A
nalyzerParseEventListener.java:154)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin
(AnalyzerParseEventListener.java:962)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:221)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:216)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
at
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserI
mpl.java:126)
at
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.j
ava:93)
at
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspData
Object.java:297)
at
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompi
lerSupport.java:62)
at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
n.java:361)
at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
n.java:329)
at
org.openide.actions.AbstractCompileAction.compileNodes2(AbstractCompileActio
n.java:132)
at
org.openide.actions.AbstractCompileAction.performAction(AbstractCompileActio
n.java:45)
at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeActio
n.java:431)
at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97)
at org.openide.util.Task.run(Task.java:136)
at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)
Caused by: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:577)
at org.apache.struts.taglib.html.HtmlTag.(HtmlTag.java:96)
... 31 more
Errors compiling bean-cookie.

What could be wrong? I get this with my own application, as well as the
strutsel-exercise-taglib webapp where this example is from. We're also
having the same problem deploying the application under WLS 7.0 and 8.1.
###

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


RE: application.properties

2003-12-29 Thread Peng, Meimin
I think you need to iterate the message out or pass the argument to get the
error out. 
you might need to post more details about how you do the key in your
resource and how you try to get the key.

-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 9:32 AM
To: [EMAIL PROTECTED]
Subject: application.properties



Hi all

The application.properties file, from which i retrieve my resouce messages,
has given me a doubt: is it scanned from the top to the botton or from the
botton to the top? the thing is I made a mistake and added three identical
messages there (errors.login.ivalid), and it always reads the last message.
Maybe it loads the las message that matches the pattern, and overrides the
previous ones. Is that right ?


thanks a lot

Otávio Augusto

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

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

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



application.properties

2003-12-29 Thread Otávio Augusto

Hi all

The application.properties file, from which i retrieve my resouce messages, has given 
me a doubt: is it scanned from the top to the botton or from the botton to the top? 
the thing is I made a mistake and added three identical messages there 
(errors.login.ivalid), and it always reads the last message. Maybe it loads the las 
message that matches the pattern, and overrides the previous ones. Is that right ?


thanks a lot

Otávio Augusto

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



Re: newbie struts/ant build questions

2003-12-29 Thread Brice Ruth
What are you using as your base build.xml file?

Lawrence Cryderman wrote:

Hi,

I'm having a heck of a time getting ant to build my simple struts
app.
Right now I'm getting:
BUILD FAILED
java.lang.ExceptionInInitializerError
With the ant -v option I get
java.lang.ExceptionInInitializerError
   at org.apache.tools.ant.Project.executeTarget(Project.java:1246)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
   at org.apache.tools.ant.Main.runBuild(Main.java:669)
   at org.apache.tools.ant.Main.startAnt(Main.java:220)
   at org.apache.tools.ant.Main.start(Main.java:184)
   at org.apache.tools.ant.Main.main(Main.java:267)
	I'm using ant 1.6

	Any help would be very appreciated

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


newbie struts/ant build questions

2003-12-29 Thread Lawrence Cryderman
Hi,

I'm having a heck of a time getting ant to build my simple struts
app.
Right now I'm getting:
BUILD FAILED
java.lang.ExceptionInInitializerError

With the ant -v option I get
java.lang.ExceptionInInitializerError
at org.apache.tools.ant.Project.executeTarget(Project.java:1246)
at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
at org.apache.tools.ant.Main.runBuild(Main.java:669)
at org.apache.tools.ant.Main.startAnt(Main.java:220)
at org.apache.tools.ant.Main.start(Main.java:184)
at org.apache.tools.ant.Main.main(Main.java:267)


I'm using ant 1.6

Any help would be very appreciated

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



Re: annoying JSP runtime exception message

2003-12-29 Thread ....
This comes up quite a bit for my Students.
When using Tiles, the JSP full error does not get displayed, becuase 
tiles blocks it sometimes.

I forward to the working JSP for the moment to see the error.

.V

Raphaël di Cicco wrote:
Hi,
I'm working with struts 1.1, Tiles and Tomcat.
on my JSP pages where I did something wrong I often get this exception message :

[ServletException in:/foo.jsp] Define tag cannot set a null value' 

or simply :
[ServletException in:/foo.jsp] null
Looking at the source of the HTML page don't give me more information, neither the tomcat logs. I used to have a detailed message explaining me where the define was wrong but now I have to carefully cut and paste parts of my JSP page to find out where the error is. 

Is there any way to tell Tomcat to also output JSP exceptions to a log file ? Or is is a struts problem ?

Any ideas are welcomed !

Raphaël di Cicco


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


Re: tiles, conditional choice of

2003-12-29 Thread Brice Ruth
No sweat, Vic :)

 wrote:

Brice Ruth wrote:

One recommendation I've received from this list is to have your 
'variable' tile be an Action, so that you would have an order of 
magnitude less tile defs to create ... at least, that's how I 
understood it :)

Sorry about that;-}It's not easy to explain on the list. Now there is 
tiles EL, so even more tricks are possible. And.. one day the 
signature for tile action may be same as action, so even more tricks.

.V



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Who owns Eclipse

2003-12-29 Thread Brice Ruth
Eclipse contributors, committers, etc. don't need to be IBM employees, 
but they need to be active in the project and recognized by existing 
contributors, committers, etc. Its structured similarly to the Mozilla 
project, which revolved around a core group of Netscape (now former) 
employees.

Most importantly, the Eclipse plug-in framework is absolutely available 
for anyone or anygroup to take and do with as they please. The plug-in 
architecture itself is almost entirely a community effort. Obviously, 
the 500 odd plugins that make up WSAD are developed by IBM, but there 
are a great number of various plugins out there for Eclipse, free and 
commercial.

As for "if IBM goes bankrupt" ... keep holding your breath, friend :) 
Having a corporate sponsor for an Open Source project is a *good* thing 
... purely open, free, and informal open source projects are great, but 
have a difficult time with systems as complex as an IDE, a browser, a 
database, etc. Even Apache has a formal group that guides what direction 
development takes, to some degree, and provides organization and 
structure (in this case, a non-profit, I think).

Brice

Frans Thamura, Intercitra wrote:

I think Eclipse is own by commynity, but with IBM money, they put all 
the contributor, commiter, and the decision for next version by their 
empolyee.

This is not a product from home ground dude. :)

So, in my head, Eclipse is still IBM. like it or not. Event if IBM go 
bancrupt, Eclipse still there. but when?

What do you think?

Brice Ruth wrote:

Eclipse is an Open Source Project, bottom line. WSAD is built on the 
Eclipse framework ... you see, Eclipse isn't just an IDE, that's just 
one particular incarnation of Eclipse plugins. Eclipse is simply an 
extensible plugin framework that can be used for any type of 
application, by anyone out there ... WSAD is such an application. The 
fact that it resembles many of the IDE functions that Eclipse has, is 
purely coincidental, at this point :)

Ramadoss Chinnakuzhandai wrote:

meaning eclipse own by===>OTI===>own by IBM==> Eclipse own by IBM?

-Original Message-
From: Ingo Adler [mailto:[EMAIL PROTECTED]
Sent: Friday, December 26, 2003 3:49 PM
To: Struts Users Mailing List
Subject: Re: [OT] Who owns Eclipse
Eclipse developement is driven by OTI (www.oti.com), an IBM company. 
They developed Visual Age before.
IBM (and maybe some of the OTI employees) builds WebSphere Studio 
Application Developer on top of it and sells it.

Ingo

Ramadoss Chinnakuzhandai wrote:

 

Hi,
 Is Eclipse owned by IBM or bought by IBM?
Any idea?

-Ram

  




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



--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


checkbox validation required

2003-12-29 Thread LAUFERON Caroline
Hello! 
I'm trying to validate a form in which there are two checkboxes. the validation must 
succeed if at least one of them is checked (i.e. fails if none of them is checked). I 
know validwhen would be the solution, but I have to use Struts 1.2's requiredif. 


  field[0]field2
  fieldTest[0]EQUAL
  fieldValue[0]false
 


  field[0]field1
  fieldTest[0]EQUAL 
  fieldValue[0]false

field1 and field2 are two checkboxes. (two booleans in the validatorForm)

I suppose that what I really need is a "maskif" rule ;-)
has anyone an idea?

Thanks, and happy New Year !

Caroline


Re: annoying JSP runtime exception message

2003-12-29 Thread Raphaël di Cicco
Sure.  i know I should do a , eventually I solved my problem
but it's really annoying to have such a poor description of the exception.

- Original Message - 
From: "Parthasarathy Kesavaraj" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 3:33 PM
Subject: RE: annoying JSP runtime exception message


> I think actually u r doing a bean:define for which the value of the
> corresponding
> property is null..
> whenever b4 doing a bean:define check whether actually the proprty is not
> null using logic:present
>
> > --
> > From: Raphaël di Cicco[SMTP:[EMAIL PROTECTED]
> > Reply To: Struts Users Mailing List
> > Sent: Monday, December 29, 2003 7:56 PM
> > To: Struts Mailing List
> > Subject: annoying JSP runtime exception message
> >
> > Hi,
> > I'm working with struts 1.1, Tiles and Tomcat.
> >
> > on my JSP pages where I did something wrong I often get this exception
> > message :
> >
> > [ServletException in:/foo.jsp] Define tag cannot set a null value'
> >
> > or simply :
> > [ServletException in:/foo.jsp] null
> >
> > Looking at the source of the HTML page don't give me more information,
> > neither the tomcat logs. I used to have a detailed message explaining me
> > where the define was wrong but now I have to carefully cut and paste
parts
> > of my JSP page to find out where the error is.
> >
> > Is there any way to tell Tomcat to also output JSP exceptions to a log
> > file ? Or is is a struts problem ?
> >
> > Any ideas are welcomed !
> > 
> > Raphaël di Cicco
> >
>
> -
> 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: annoying JSP runtime exception message

2003-12-29 Thread Parthasarathy Kesavaraj
I think actually u r doing a bean:define for which the value of the
corresponding
property is null.. 
whenever b4 doing a bean:define check whether actually the proprty is not
null using logic:present

> --
> From: Raphaël di Cicco[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Monday, December 29, 2003 7:56 PM
> To:   Struts Mailing List
> Subject:  annoying JSP runtime exception message
> 
> Hi,
> I'm working with struts 1.1, Tiles and Tomcat.
> 
> on my JSP pages where I did something wrong I often get this exception
> message :
> 
> [ServletException in:/foo.jsp] Define tag cannot set a null value' 
> 
> or simply :
> [ServletException in:/foo.jsp] null
> 
> Looking at the source of the HTML page don't give me more information,
> neither the tomcat logs. I used to have a detailed message explaining me
> where the define was wrong but now I have to carefully cut and paste parts
> of my JSP page to find out where the error is. 
> 
> Is there any way to tell Tomcat to also output JSP exceptions to a log
> file ? Or is is a struts problem ?
> 
> Any ideas are welcomed !
> 
> Raphaël di Cicco
> 

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



annoying JSP runtime exception message

2003-12-29 Thread Raphaël di Cicco
Hi,
I'm working with struts 1.1, Tiles and Tomcat.

on my JSP pages where I did something wrong I often get this exception message :

[ServletException in:/foo.jsp] Define tag cannot set a null value' 

or simply :
[ServletException in:/foo.jsp] null

Looking at the source of the HTML page don't give me more information, neither the 
tomcat logs. I used to have a detailed message explaining me where the define was 
wrong but now I have to carefully cut and paste parts of my JSP page to find out where 
the error is. 

Is there any way to tell Tomcat to also output JSP exceptions to a log file ? Or is is 
a struts problem ?

Any ideas are welcomed !

Raphaël di Cicco


RE: Struts Validation + Frames

2003-12-29 Thread Suresh Korvi
hi venkatesh

 You are saying that using lower frame 

 so see which to which form this page belongs to and put that form name in the 
validate.xml
 then it will display easily

 i am think this is the problem of placing the form name correctly


 suresh

-Original Message-
From: VENKATESH GANGAL [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 28, 2003 5:09 AM
To: [EMAIL PROTECTED]
Subject: Struts Validation + Frames


Hi ,

I have an application with two frames , one at the top and the other the bottom.

I am working on the lower frame and has problems in displaying errors after validating 
the form i.e when I submit only the lower part of the frame. I can see that the 
validate method is returning an error object but I am not able to display the errors 
in the same JSP but instead I get a blank page.

Can anyone know how to go about handling Errors in multiple frames ???

Thanks in advance..
Cheers..

Venkat






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



Re: question about form handling

2003-12-29 Thread Mark Lowe
I'd approach the problem by thinking about having a child form that 
popluates a parent form. When you close the window or submit (have a 
button in noscript tags) the child it fires up an action which copies 
the values of the child form into the parent.

If the parent is scoped to session

ChlidForm theChildForm = (ChildForm) form;
ParentForm theForm = (ParentForm) session.getAttribute("parentForm");
String foo = theChlidForm.getFoo();
theForm.setFoo(foo);


On 29 Dec 2003, at 10:48, dirk wrote:

Hello,
anybody know how to handle one action, but two forms (one base form + 
one popup ). When the popup gets closed the base form should be 
updated with the data from the popup. Anybody has a working example ?
Thanks


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


Re: dynamic arg0 in bean:message?

2003-12-29 Thread Nicolas De Loof
Your first example is invalid :

" />

A JSP tag cannot be used as attribute value of another tag (XML syntax)

This should work :




Nico.


- Original Message - 
From: "Domingo A. Rodriguez S." <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 1:48 PM
Subject: Re: dynamic arg0 in bean:message?


>
> Either escape the double quotes (" property=\"minChars\" />" ) or use single quotes (" name='globals' property='minChars' />" ).
>
>  --- Frank Maritato <[EMAIL PROTECTED]> escribió: > Hi,
> >
> > What I want to do is something like this:
> >
> >  >   arg0="" />
> >
> > or
> >
> >  >   arg0="<%=minChars%>" />
> >
> > Where arg0 is the result of a bean property, but I can't seem to get it
> > to work. If I hard-code the value
> >
> > 
> >
> > It works, but it kinda defeats the purpose.
> >
> > What am I doing wrong, or is there a better way to accomplish this?
> >
> > Thanks
> > --
> > Frank
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Do You Yahoo!?
> Información de Estados Unidos y América Latina, en Yahoo! Noticias.
> Visítanos en http://noticias.espanol.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Design question regarding struts security features

2003-12-29 Thread Mohan Radhakrishnan
Hi
   Are you only filtering data based on role ?

   If you are talking about role-based access of views then we are doing
something like that

   1. You can use Container Manager Authentication and restrict access to
URL patterns to only valid users.
   2. You can use the vendor-specify XML file to specify roles and groups.
(e.g) principals.xml in OC4J
   3. You can use a vendor-specific API like the 'DataSourceUserManager' in
OC4J to write custom code that can access your tables and do away with
hard-coded principals.xml
   I think you can also use the role attribute in struts-config.xml and
restrict access actions. Tiles has a role attribute too ? though we are not
using that.

Mohan

-Original Message-
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 5:07 AM
To: Struts Users List
Subject: Design question regarding struts security features


Hello everybody,

I'm in the process of developing my first Struts application, so forgive
me if this question is insulting everybody's intellect.

The application I'm working on is a support portal where you can
download technical document, drivers etc. The tricky part is, that
certain documents should be only accessible to users with a certain role.

My idea so far is to put a user object in the session and to evaluate
the role (and therefore the access level) of the user for all views that
are displaying  data which might be restricted.
I guess the easiest way would be using a jsp tag like
 which would retrieve the user object from
the session (if it exists) and the then filter the data accordingly. Is
there such "security taglib" around?

Has anybody worked on a similar scenario? What is the best approach to
solve this problem? Is there a best practice for it? Any tips, hints,
code snippets are welcome.

Thank you very much.

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: dynamic arg0 in bean:message?

2003-12-29 Thread Domingo A. Rodriguez S.

Either escape the double quotes ("" ) or use single quotes ("" ). 

 --- Frank Maritato <[EMAIL PROTECTED]> escribió: > Hi,
> 
> What I want to do is something like this:
> 
>arg0="" />
> 
> or
> 
>arg0="<%=minChars%>" />
> 
> Where arg0 is the result of a bean property, but I can't seem to get it 
> to work. If I hard-code the value
> 
> 
> 
> It works, but it kinda defeats the purpose.
> 
> What am I doing wrong, or is there a better way to accomplish this?
> 
> Thanks
> --
> Frank
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



RE: Testing iterator quantity

2003-12-29 Thread Robert Taylor
Using JSTL tags and assuming you have a collection of elements named
"elements" in some scope:









robert

> -Original Message-
> From: Otávio Augusto [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 28, 2003 10:58 PM
> To: [EMAIL PROTECTED]
> Subject: Testing iterator quantity
>
>
> Is there a way to know how many times i've iterated over a
> collection, using struts tags ? for instance: i have an iterator
> with 100 elements. I want to put each 10 elements in a different
> row of a table. Does anybody have an idea?
>
> thanks
>
> Otávio Augusto
>
> -
> 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: Design question regarding struts security features

2003-12-29 Thread Robert Taylor
You should be able to do this with standard J2EE security provided
by your web container.

If you store your user credentials in a database, then you may want
to look at SecurityFilter:

http://sourceforge.net/projects/securityfilter/

It allows you to leverage standard J2EE security features but provides
more flexible authentication. 

robert

> -Original Message-
> From: Patrick Scheuerer [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 28, 2003 6:37 PM
> To: Struts Users List
> Subject: Design question regarding struts security features
> 
> 
> Hello everybody,
> 
> I'm in the process of developing my first Struts application, so forgive 
> me if this question is insulting everybody's intellect.
> 
> The application I'm working on is a support portal where you can 
> download technical document, drivers etc. The tricky part is, that 
> certain documents should be only accessible to users with a certain role.
> 
> My idea so far is to put a user object in the session and to evaluate 
> the role (and therefore the access level) of the user for all views that 
> are displaying  data which might be restricted.
> I guess the easiest way would be using a jsp tag like 
>  which would retrieve the user object from 
> the session (if it exists) and the then filter the data accordingly. Is 
> there such "security taglib" around?
> 
> Has anybody worked on a similar scenario? What is the best approach to 
> solve this problem? Is there a best practice for it? Any tips, hints, 
> code snippets are welcome.
> 
> Thank you very much.
> 
> 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: struts and JDeveloper 9.03

2003-12-29 Thread Kalra, Ashwani
Yeah, they are already there. Without this I will not be able to compile my
files. and IMO ie for development. 

>-Original Message-
>From: Adrien GEYMOND [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 29, 2003 4:30 PM
>To: Struts Users Mailing List
>Subject: Re: struts and JDeveloper 9.03
>
>
>Hello,
>
>have you also put the struts.jar library in the 
>Configurations/Libraries of
>your project settings ?
>You can access the project settings by double-clicking on you 
>'project.jpr'
>in Jdev
>
>I hope, it helps you ...
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


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

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



Re: struts and JDeveloper 9.03

2003-12-29 Thread Adrien GEYMOND
Hello,

have you also put the struts.jar library in the Configurations/Libraries of
your project settings ?
You can access the project settings by double-clicking on you 'project.jpr'
in Jdev

I hope, it helps you ...


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



question about form handling

2003-12-29 Thread dirk
Hello,
anybody know how to handle one action, but two forms (one base form + one popup ). 
When the popup gets closed the base form should be updated with the data from the 
popup. Anybody has a working example ?
Thanks

struts and JDeveloper 9.03

2003-12-29 Thread Kalra, Ashwani
hi,
I am working with Jdeveloper and Struts 1.1
When I try to run any page ,  its not able to find the core action class.
struts.jar is lying in lib dir

Error is 
java.lang.NoClassDefFoundError: org/apache/struts/action/Action
java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[],
int, int, java.security.ProtectionDomain)   native code

Thanks
Ashwani Kalra
http://www.geocities.com/ashwani_kalra



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

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



RE: PDF file in browser

2003-12-29 Thread shirishchandra.sakhare
Your first point of using xxx to make it open in 
a new browser is valid..

But the second point i did not get it.

Exactly for those situations where the user is prompted for save dialogue box,I have 
suggested to add the response.addHeader("Content-Disposition", "attachment; filename=" 
+ saveAsFileName );
This makes it to give the proper file name in save as dialogue box.

And it works with netscape as well...Thas what we are using here..

HTH.
regards,
Shirish.

-Original Message-
From: hernux [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 24, 2003 2:33 PM
To: Struts Users Mailing List
Subject: Re: PDF file in browser


You 're forgetting two things...

1- He wants to show a pdf  file in a new browser
to do that, you must set the apropiate target into de A tag...

xxx

target="_blank" will open the link in a new window.

2- This, will only work if the users uses Internet Explorer...cause it's an
activeX container, unless the
user changed it, by default pdf files and other documents, will be opened
inside explorer...but other
browsers such as netscape, mozilla and opera, are not activeX container, so,
pdf files will prompt the user
to download them, or open directly.

regards,
Hernux

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 24, 2003 7:17 AM
Subject: RE: PDF file in browser


Hi,
Also do not forget to set the header so that the save as dialogue box is
displayed in IE...For that you have to set the content-disposition header ..
following is the  code from our project..


Class  FileOpenAction{

protected final void returnBinaryFile(
HttpServletResponse response,
String filename
String saveAsName)
throws FileNotFoundException, IOException {
response.setContentType(mimeType);
String fileExt = WebUtil.getFileExtensionFromMIMEType("application/pdf");
setSaveAsHeader(response,saveAsName,fileExt);
File file = new File(filename);
response.setContentLength((int) file.length());

FileInputStream in = new FileInputStream(file);
OutputStream out = response.getOutputStream();
byte[] buf = new byte[4096];
int count = 0;

while ((count = in.read(buf)) >= 0) {
out.write(buf, 0, count);
}

in.close();
out.close();
}

public static void setSaveAsHeader(HttpServletResponse response,String
saveAsFileName,String fileExt){
if(saveAsFileName == null){
return;
}
//to get over a problem in browsers due to which the file name must have
proper extension
if((fileExt != null)|| (fileExt.length() !=0)){
int index1 = saveAsFileName.indexOf(fileExt.toUpperCase());
int index2 = saveAsFileName.indexOf(fileExt.toLowerCase());
if((index1 == -1) &&(index2 == -1)){
saveAsFileName = saveAsFileName + "." + fileExt;
}
}
response.addHeader("Content-Disposition", "attachment; filename=" +
saveAsFileName );
}
}

Also another thought..Why use another servlet..Just use another action like
we do..This way you can use all the existing framwroek..Like authorisation
etc

-Original Message-
From: Surachai Locharoen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 24, 2003 10:41 PM
To: Struts Users Mailing List
Subject: Re: PDF file in browser


Additionally, In struts framework you have to reset request header before by
call


request.reset();
request.setContentType("application/pdf");
request.setContentLength(byte.length);



- Original Message -
From: "Navjot Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 9:53 PM
Subject: RE: PDF file in browser


> if you can reveal the location of the PDFs on your web server.
> Simply put your pdfs under a www/app.com/pdfs/*.pdf and give them links as
> you want.
>
> if you wish to maintain some security.
> 1. send a request to a servlet wit some pdf code or file name
> 2. open the given file from the file system whereever it is.
> 3. convert it into stream.
> 4. push the stream back to browser.
>
> note - must set the appropraite mime/type before you push the stream back.
> may be application/pdf or application/x-pdf
>
> HTH
> Navjot Singh
>
> >-Original Message-
> >From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, December 24, 2003 10:50 AM
> >To: 'Struts Users Mailing List'
> >Subject: PDF file in browser
> >
> >
> >
> >
> >Hi All,
> >
> > I am using Struts frame work for our application with Web sphere
> >app server.
> >We have a some PDF files on the app server .When the user clicks on a
> >particular link on
> >the JSP page, we have show a pdf  file to the user in a new browser
> >window.
> >Can any one pls tell me the easier procedure to do this??
> >
> >Regards
> >VasudevRaoGupta
> >
> >
> >Confidentiality Notice
> >
> >The information contained in this electronic message and any
> >attachments to this message are intended
> >for the exclusive use of the addressee(s) and may contain
> >confidential or privileged information. If
> >you are not the intended recipient, please notify the

Tutorial for struts-html.tld

2003-12-29 Thread sajith









Hi

 

Any idea where I can find
some tutorials with code snippets on using the tags contained in struts-html.tld

 

Best regards,

Sajith