i18n a submit button

2001-06-15 Thread Mark Schenk

Can anyone tell me how I can internationalize the text on a submit button?
i tried the obvious:





But this always result in 'Submit' being the text, and not the value from
my message bean...

----
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: i18n a submit button

2001-06-15 Thread Mark Schenk

Exactly!

Thanks,
Mark

>
> I think you should remove the "value" attribute.
>
> 
> 
> 
>
> Jean-Noël
>
> ----- Original Message -
> From: Mark Schenk <[EMAIL PROTECTED]>
> To: Struts-User <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 12:56 PM
> Subject: i18n a submit button
>
>
> > Can anyone tell me how I can internationalize the text on a
> submit button?
> > i tried the obvious:
> >
> > 
> > 
> > 
> >
> > But this always result in 'Submit' being the text, and not the
> value from
> > my message bean...
> >
> >
> --
> --
> > Mark Schenk | Ceci n'est pas une signature
> > Blackboard Project Manager  |
> > Delft University of Technology  |E-mail: [EMAIL PROTECTED]
> > Dept.: DTO  |Phone:  +31 152785448 (85448)
> > Room: LB00.680  |Fax: +31 152786359
> >
> --
> --
> > -
> >
> >
>


Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: Template Question

2001-06-21 Thread Mark Schenk

> Hi,
>
> is there a chance, to set the  via a 
> within a template?
>
> 
>   direct='true'/>
>[...]
> 
>
> thanks a lot
>   klaus

Hi Klaus,

I had exactly this question once. Here's how to do it:






So basically, leave out the content par. and put the content in the
body of your put tag.

--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: Problem with tag?

2001-07-20 Thread Mark Schenk

> When I try to use
> 
> I get the message
> "According to TLD attribute key is mandatory for tag message"
>
> The message is incorrect, at least if I am to believe the documentation of
the BEAN TLD!
>
> Does anyone has any experience using "name" & "property" instead of "key"?

Are you sure you're not confusing  and  ? What
would
you expect as output from your above tag?




----
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359





RE: Debugging

2001-07-24 Thread Mark Schenk

> -Original Message-
> From: Gerald Hanks [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 9:32 AM
> To: [EMAIL PROTECTED]
> Subject: Debugging
>
>
> Is there anyway to output simple debugging info to a console or
> something?  I need something that is consistant between my struts
> components and the beans and stuff that contain all of my business
> logic.
>
> -gerald
>

Hi Gerald,
what you want, is log4j. Find it at http://jakarta.apache.org/log4j. I
use this for both development debugging and production logging, and it works
great!

Mark

--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-






RE: Missing type on declaration - any poniters 1 error left

2001-07-25 Thread Mark Schenk

> Hi i have got it done to 1 error as below
>
>
> webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
> [9:1] 'class' or 'interface' keyword expected.
> public ActionForward  perform (ActionMapping mapping,
>^
> 1 error
> Errors compiling ActionForward.
>

Hi Chuck,

this list is meant for struts-related topics. What you have here is a
java-problem: I recommend one of the java-tutorial trails on java.sun.com.

Mark

--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: Multiple checkboxes, same name...

2001-07-25 Thread Mark Schenk

> Hi all.  Very new to this list and struts, but using it pretty
> successfully
> for
> a project at work.  Good looking framework.  Now the question:
>
[snip]
>
> The above sounds pretty reasonable, but I'm unsure how
> to get it to work.  Specifically, how to get the proper value=
> attribute in the multibox tag:
>
> 
> 
>   ** how to get the key property of 'entry' into value attrib? **
>   
> 
>   
> 
>

Hello Carmine,

you've almost answered your own question: if you want the value to be
calculated during the iteration, leave the value parameter off! In this case
struts will use the body of the html:multibox tag as the value. So:

 
   
 
   
 

does what you want.

Cheers,
Mark

--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: struts and log4J

2001-07-31 Thread Mark Schenk

>
> Hi all,
>
> I'm a newbie in struts.
> I'd like to use log4J with struts.
> I don't know where  i must do the log4J configuration.
> In another servlet, i would do it in init method but i would like to use
> ActionServlet.
> Where can i put code like :
> BasicConfigurator.configure()  . ?
>

Hello Alexandre,

I don't know if this is THE way of doing it, but what I did is create
a servlet (which I name 'Initializer') that does all these thing (calling
configure and stuff). I my web.xml I have:


  initializer
MyApp.Initializer
Initializer
1


  action
  org.apache.struts.action.ActionServlet
  Action
  2


(lots of administration left out of these...)

The 1 on the first servlet makes sure this one is loaded before the second
one. All initialization is done in the 'init' method of Initializer.

As I said, I don't know if this is the preferred way, but it works!

--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




RE: ApplicationResources.properties

2001-08-31 Thread Mark Schenk

> Subject: AW: ApplicationResources.properties
>
>
> I dont't want save the file under the web-inf/classes directory. I want to
> save it for example in this directory web-inf/config .
> Is that possible
>
> Regards,
> Stefan
>

As far as I understand it your Resources.properties are looked up in your
classpath, so no you can't put it in web-inf/config!

----
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-






RE: problem in showing PDF, Doc, xls etc

2001-09-03 Thread Mark Schenk
Title: SV: Including Actions via jsp:include



I 
never actually did it, but it would seem that setting the contentType to 
something other than text/html
should 
allow you to return any type of data!
 
Mark 
Schenk 
|   Ceci n'est pas une signatureBlackboard 
Project Manager  
|Delft 
University of Technology  |E-mail: [EMAIL PROTECTED]Dept.: 
DTO  
|Phone:  +31 152785448 (85448)Room: 
LB00.680  
|Fax:    +31 
152786359-

  -Original Message-From: Mikkel Bruun 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, September 03, 2001 
  12:39 PMTo: '[EMAIL PROTECTED]'Subject: SV: 
  problem in showing PDF, Doc, xls etc
  you 
  have to use a servlet for this...print to the 
  servletOutPutStream
   
  Jsp's cant display binary files
   
  ::   Mikkel Bruun   Senior IT Developer   [EMAIL PROTECTED]   Direct: +45 32 88 22 73 
    Valtech A/S   Kanonbaadsvej 10   DK-1437 Copenhagen   Tel  +45 32 88 20 00   Fax +45 32 88 20 20 
  
-Oprindelig meddelelse-Fra: Anwar Sadat 
[mailto:[EMAIL PROTECTED]]Sendt: 03 September 2001 
12:28Til: '[EMAIL PROTECTED]'Emne: 
problem in showing PDF, Doc, xls etc
Hi,
   I have one jsp which shows some 
links.. This link contains the filename (HTML file).
If 
i click on this link, i will execute one more jsp. This jsp has some methods 
which will get the file and show the content.
 
This works fine if i have only html files to be 
shown..  If i have other document types (like pdf, doc, xls etc), how 
can i show these things on the browser thro my second JSP 

 
Thanx in Advance
Regards
Anwar


RE: How to perform if statement in an iterator?

2001-10-18 Thread Mark Schenk

> Hi! I have a collection of ProductItemSummary from
> stored in a user bean which is in turn stored in an
> HTTP session. I want to perform an iteration and
> inside it, I have to perform an IF statement.
> Basically, I have this:
>
>  property="productItemsSummaryCollection">
> 
>property="reorder"
>   scope="session" value="0">

Hmmm. This looks strange, logic:equal doesn't have an 'id' parameter.
Something like

might do the trick. Note the absence of the scope parameter. I think the
bean
created from the logic:iterate tag is always request-scope.

>   
>   
>property="reorder"
>   scope="session" value="1">
>   
>   
> 

Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-


>




Weblogic pains...

2001-11-22 Thread Mark Schenk

I am trying to get a simple application up and running under Weblogic 5.1
(sp 8) and getting stuck on about the first step :-(. It looks as though
struts has problems translating mappings. This is my jsp:

<%@page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>






And the corresponding entry in struts-config.xml is OK, 'cause this displays
a fine form tag under Tomcat. Is there some known limitation on Weblogic? I
am using prefix matching in my app, could this be the problem?

Thanks for any input.

PS Upgrading Weblogic is not an option for me: this is part of a larger app.
--------
Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-


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




RE: Weblogic pains...

2001-11-22 Thread Mark Schenk

> Subject: Re: Weblogic pains...
>
>
> Tag attributes need to be double-quoted, but I'd start by describing the
> problem you are having! I have used Struts with WLS 5.1 and WLS
> 6.0 and have
> had no trouble.
>
> <%@page contentType="text/html"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> 
> 
> 
> 

Oops. Staring at the problem so long I forgot to mention what it is. I get
an
error 500 in the browser and something like this in my log:

Thu Nov 22 12:16:31 CET 2001:  Root
cause of ServletException
javax.servlet.ServletException: runtime failure in custom tag 'form'
at jsp_servlet._devinfo._jspService(_devinfo.java:111)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:106)

I tried both quotes and double-quotes: no difference whatsoever.

Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-



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




RE: Weblogic pains...

2001-11-22 Thread Mark Schenk

>
> Do you not have to give the form a name?
>

Nope, struts uses the default bean defined in struts-config:

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




RE: Does struts provide a function to escape special characters received from a form?

2001-11-30 Thread Mark Schenk

> Hi Ladies and Gentlemen
>
> I want to insert data into a database.  I have the database connection
> set up and in the case of data without special characters the insert
> works fine.
> However, the data is coming from a form on a html page and the user can
> insert special characters,  in particualar characters like
>
> \
> '
>
> cause a problem when I try and insert into the database since they are not
> escaped when I construct the query which is put into the database.  Does
> Struts provide function/s which can help with inserting text from a html
> form into a database.
>   How do other people handle this situtation?
>
> Cheers
>
> Tony
>

Hello Tony,

to my knowledge struts-doesn't provide anything. However, the java-api does
!
Using PreparedStatements, placeholders and 'set' functions automatically
does the escaping for you. Your code then looks like this:

PreparedStatement stmt = con.prepareStatement(
"INSERT INTO TABLE(FIELD) VALUES(?)" ) ;

stmt.setString(1, SomeUnquotedString ) ;
stmt.executeUpdate() ;

The nice thing about using this is that escaping is performed by the
database-specific driver and therefore is always appropriate for your
connection.

Hope this helps,
    Mark

Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-


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