Tiles help

2003-02-04 Thread usha
Hi

can i write the code for tiles like this

the code in the tiles-config.xml is

 !-- tabs page --
 definition name=examples.tabs.page extends=examples.masterPage
 put name=title  value=Tiles 1.1 Tabs layout example /
 put name=body   value=examples.tabs.body /
 /definition

 !-- body using tabs --
 definition name=examples.tabs.body path=/inventory/tabsLayout.jsp 
   put name=selectedIndex  value=0 /
   put name=parameterName  value=selected /
   putList name=tabList 
 item value=Quick overviewlink=/action/ivtranslist /
   /putList
 /definition


code in the struts-config.xml

actionpath=/ivtranslist
parameter=/inventory/inventory_trans_list.jsp
type=org.apache.struts.actions.ForwardAction
name=ivtranshdrbean
scope=request
validate=false
 /action

i am getting the following error

javax.servlet.ServletException: Cannot forward after response has been 
committed
   at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:507)
   at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:448)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
   at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
   at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
   at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
   at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
   at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:865)
   at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
   at 
org.apache.jsp.tabsLayout$jsp._jspService(tabsLayout$jsp.java:284)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
   at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
   at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
   at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
   at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:865)
   at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
   at 
org.apache.jsp.classicLayout$jsp._jspService(classicLayout$jsp.java:125)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
   at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
   at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
   at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
   at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:865)
   at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
   at org.apache.jsp.tabs$jsp._jspService(tabs$jsp.java:72)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
   at 

Re: Responses without Requests

2003-02-04 Thread Nicolas De Loof
I think what you're looking for is request whithout response, aren't you ?

If you want to use HTTP using an URLConnection you have to use HTTP syntax
in the string you send to the server :

open a connection on http://www.otherserver.com; (this will be like a
telnet session on this server on port 80)

send this message :
GET /dowacka.do?key=value HTTP/1.0


(dont forget the empty line)

You should get the server response on inputStream :
HTTP/1.1 200 OK
...

You can close the connexion without reading the response.

You should look for a Java HTTP client. I don't know if jakarat ones is what
you need (I never used it), but you can look at it:
http://jakarta.apache.org/commons/httpclient/index.html


If you don't know HTTP and speak french, you could read
http://christian.caleca.free.fr/http/le_protocole.htm. I don't know english
speaking page about simple HTTP explanation.

Nico.


 Is there any reason why I could not send a response to another server
 without a request by having an automated background servlet do something
 akin to the following when something happened?  Could this be part of the
 business logic of a action in Struts, so that more than one response could
 be sent to a request?

  String str = key=value;
  URL url = new URL(http://www.otherserver.com/dowacka.do;);
  URLConnection conn = url.openConnection();
  conn.setDoOutput(true);

conn.setRequestProperty(Content-Type,application/x-www-form-urlencoded);
  PrintWriter pw = new PrintWriter(conn.getOutputStream());
  pw.println(str);
  pw.close();

 I take it, also, if I am not mistaken, that I could do this securely with
 https?  And, lastly, I assume that I could then get a confirmation of
 receipt, or whatever, with something like:

  BufferedReader in = new BufferedReader(
  new InputStreamReader(conn.getInputStream()));
  String results = in.readLine();
  in.close();

 That right?  Please correct anything, make any suggestions, etc.

 Micae



 LEGAL NOTICE

 This electronic mail  transmission and any accompanying documents contain
 information belonging to the sender which may be confidential and legally
 privileged.  This information is intended only for the use of the
 individual or entity to whom this electronic mail transmission was sent as
 indicated above. If you are not the intended recipient, any disclosure,
 copying, distribution, or action taken in reliance on the contents of the
 information contained in this transmission is strictly prohibited.  If you
 have received this transmission in error, please delete the message.
Thank you



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




HTML entities

2003-02-04 Thread Mark Lowe
Has anyone any information on preventing  and  being translated 
into lt; and gt; when using the tag libs..

I have a bunch of data in my sql... there are a few presentation tags 
strored in the db (e.g. br, b etc)..

I've parsed the results to replace any entities to  etc but they're 
being coverted in the jsp when iterating through the result...

My results set contains

br etc

i read this into map which i then put into an array (array of maps)

put the array in the request...

It seems to me that

the encoding is happening
1. during the iteration
2. when being set in the request
3. when being added to the map

I'm working my way through these possibilties now but if anyone knows 
anything then please don't be shy..

Any suggestions?

Thanks mark




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



RE: Design question: Model component using Business logic beans

2003-02-04 Thread mech
Thanks for all that help. Anyway I guess I'll opt for using custom
exception, like mentioned in an early post, in my business logic
components. Seems easier to do in the interim and I wonder why i didn't
think of that solution myself in the beginning... light...light...

throw new MyBusinessLogicException(error.something.wrong) 
then I'll catch it in the calling execute() and generate an ActionError
with an ActionMessage that I get from the Exceptions getMessage().

At least this works for me as long as I only have one exception message
per problem because business logic won't be processed any further after
that exception, of course. But why should I bother a user with a list of
a 10 issues he did wrong at one time ;-) Let him try again and again
until he got it... Should have read the usage notes in the view before
clicking like mad. ;-)

The simple input validation stuff can still be done in the form's
validate() to notify about all those hundreds of dumb mistakes with
ActionErros.add(). 
So the business logic usually shouldn't throw so many different problems
at one time after validate(). I guess if my database connection is dead
or the transaction had to rollback there's not much more to say than
bad luck, try again and further processing makes no sense anyway.

Michael

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 04:49
 To: Struts Users Mailing List
 Cc: [EMAIL PROTECTED]
 Subject: Re: Design question: Model component using Business 
 logic beans
 
 
 
 
 On Mon, 3 Feb 2003, BaTien Duong wrote:
 
  Date: Mon, 3 Feb 2003 20:02:41 -0700
  From: BaTien Duong [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  Subject: Re: Design question: Model component using Business logic 
  beans
 
  We use chained exception from jdk1.4, commons.logging, and 
 factoring 
  out 4 components that are independent on Struts [MessageResources, 
  MessageResourcesFactory, PropertyMessageResources, and 
  PropertyMessageResourcesFactory]. I heard somewhere that these 4 
  components will eventually be in commons. ActionErrors and 
 ActionError 
  are used at the web layer. With many TilesAction(s) in 1 page, we 
  coordinate the error handling of the page via the ERROR_KEY 
 attribute 
  of the request.
 
 
 The refactoring of the resources code to make it independent 
 of Struts has been completed:
 
 
http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-resourc
es

However, it was too late in the 1.1 release cycle to make Struts use
this new code itself.  That will happen in a future version, but you can
use commons-resources for your business tier message resource needs in
the interim.

 Hope this may help.
 BaTien

Craig


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




AW: HTML entities

2003-02-04 Thread Hirschmann, Bernhard

Mark,

I guess this is one of the mostly asked questions... Have you ever searched
the mailing list about that topic?

The solution is: 
You just have to set the filter=false in the bean:write tag.

Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: Mark Lowe [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 11:16
An: Struts List
Betreff: HTML entities


Has anyone any information on preventing  and  being translated 
into lt; and gt; when using the tag libs..

I have a bunch of data in my sql... there are a few presentation tags 
strored in the db (e.g. br, b etc)..

I've parsed the results to replace any entities to  etc but they're 
being coverted in the jsp when iterating through the result...

My results set contains

br etc

i read this into map which i then put into an array (array of maps)

put the array in the request...

It seems to me that

the encoding is happening
1. during the iteration
2. when being set in the request
3. when being added to the map

I'm working my way through these possibilties now but if anyone knows 
anything then please don't be shy..

Any suggestions?

Thanks mark




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

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




RE:HTML entities

2003-02-04 Thread Mark Lowe
Dooh..

ignore my last question.. for anyone who also may be suffering a stupid 
attack, you need to set filter=false in the bean:write


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



Problem with i18n

2003-02-04 Thread Mouratidis, Georg
Hi at all,

i have a problem with my Resourcebundles.

When the user logged in he/she should see the login page with his/her appropriate 
language values.
the problem is, i can change the language into a language other than german 
(Locale=de) but struts is still
displaying the values from the german ressource bundle. when i try to login a second 
time withe the same approach than it works. this means struts is displaying the 
appropriate language-values. why struts is using not the default 
ApplicationResources.properties and is using the _NON_default 
ApplicationResources_de.properties? 

How can i fix this problem?

thx at all


in the Login.jsp

tr
  tdnbsp;/td
  td class=labelnobrbean:message key=login.username/: */nobr/td
  td class=output
html:text property=username styleId=username value='PCX' /
  /td
  tdnbsp;/td
/tr

struts-config.xml:

controller locale=true 
processorClass=com.heiler.pcx.framework.PcxRequestProcessor/

in my PcxRequestProcessor:

// Are we confugured to select the Locale automatically?
moduleConfig.getControllerConfig().getLocale() );

if (!moduleConfig.getControllerConfig().getLocale())
{
  // The locale is configured NOT to be stored, so just return
  return;
}

// Get the Locale (if any) that is stored in the user's session
HttpSession session = request.getSession();
Locale sessionLocale = (Locale)session.getAttribute(Globals.LOCALE_KEY);

//Get the user's preffered locale from the request
Locale requestLocale = request.getLocale();
//If the Locale was never added to the session or it has changed, set it
if ( (sessionLocale == null) || (sessionLocale!= requestLocale) )
{
  if (log.isDebugEnabled())
  {
log.debug(Setting user locale ' + requestLocale + ');
  }
  //Set the new locale into the users session
  session.setAttribute(Globals.LOCALE_KEY, requestLocale);
}


in the ApplicationResources.properties

login.username=User Name
login.password=Password
login.organization=Organization

in the ApplicationResources_de.properties

login.username=Benutzername
login.password=Passwort
login.organization=Organisation



mit freundlichen Grüßen 

Georg XL. Mouratidis 
Web Application Developer 

Heiler|Software AG 
Mittlerer Pfad 9 
D-70499 Stuttgart 

Tel: 0711-139 84-265
Fax: 0711-866 63 01 
Email: [EMAIL PROTECTED] 

Connecting Buyer and Supplier
http://www.heiler.com 

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




RE: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread mech
You can usually use the attribute (e.g. with bean:write):
filter=true if you want special characters converted into html
substitutions or filter=false if you like to format your view with
br tags.

Unfortunatally, i hate converting all my German language Umlaute into
auml; uuml; etc. in my database. 

If I say filter=true my German special letters won't get filtered and
I get stupid output if my Solaris server runs on English language
instead like my development server in German language.

If I say filter=true an use auml; etc. coming from my db fields, I
get  filtered to amp; which doesn't help much either...
In the html output I would get amp;uuml; instead of uuml; 

So I have to always filter=false and use auml; etc. for all German
characters in my db. :-( At least than I can also use html tags for
formating stored in the db.

So on question for the future development.
Could the tag filter be enhanced to filter not only brackets etc. but
also language characters? 

Otherwise you'll have a problems if you use filter=true and
filter=false aswell. Either you have to convert all your database
field's not to use any language specific characters. 
Or you can't use filter=true because your language specific html
entities get converted twice because one character in the escape
sequence (the  character) gets filtered again...

What would be needed would be an filter=true logic that doesn't filter
the  of escape sequences or to filter also language specific html
entities. The last thing would be the cleaner way.

Michael


 -Original Message-
 From: Mark Lowe [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 11:16
 To: Struts List
 Subject: HTML entities
 
 
 Has anyone any information on preventing  and  being translated 
 into lt; and gt; when using the tag libs..
 
 I have a bunch of data in my sql... there are a few presentation tags 
 strored in the db (e.g. br, b etc)..
 
 I've parsed the results to replace any entities to  etc 
 but they're 
 being coverted in the jsp when iterating through the result...
 
 My results set contains
 
 br etc
 
 i read this into map which i then put into an array (array of maps)
 
 put the array in the request...
 
 It seems to me that
 
 the encoding is happening
 1. during the iteration
 2. when being set in the request
 3. when being added to the map
 
 I'm working my way through these possibilties now but if anyone knows 
 anything then please don't be shy..
 
 Any suggestions?
 
 Thanks mark
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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




AW: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread Hirschmann, Bernhard

Jesus! So much work for that purpose? :-)

Have you tried to use UTF-8 for your JSPs? Then all that transforming to
HTML encoding is not necessary anymore. It works great at my project, and I
have to use more special characters than in German. (27 languages in fact)

See http://www.anassina.com/struts/i18n/i18n.html for a full how-to.

Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: mech [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 11:42
An: 'Struts Users Mailing List'
Betreff: RE: HTML entities (general Struts taglib problem with language
entities)


You can usually use the attribute (e.g. with bean:write):
filter=true if you want special characters converted into html
substitutions or filter=false if you like to format your view with
br tags.

Unfortunatally, i hate converting all my German language Umlaute into
auml; uuml; etc. in my database. 

If I say filter=true my German special letters won't get filtered and
I get stupid output if my Solaris server runs on English language
instead like my development server in German language.

If I say filter=true an use auml; etc. coming from my db fields, I
get  filtered to amp; which doesn't help much either...
In the html output I would get amp;uuml; instead of uuml; 

So I have to always filter=false and use auml; etc. for all German
characters in my db. :-( At least than I can also use html tags for
formating stored in the db.

So on question for the future development.
Could the tag filter be enhanced to filter not only brackets etc. but
also language characters? 

Otherwise you'll have a problems if you use filter=true and
filter=false aswell. Either you have to convert all your database
field's not to use any language specific characters. 
Or you can't use filter=true because your language specific html
entities get converted twice because one character in the escape
sequence (the  character) gets filtered again...

What would be needed would be an filter=true logic that doesn't filter
the  of escape sequences or to filter also language specific html
entities. The last thing would be the cleaner way.

Michael


 -Original Message-
 From: Mark Lowe [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 11:16
 To: Struts List
 Subject: HTML entities
 
 
 Has anyone any information on preventing  and  being translated 
 into lt; and gt; when using the tag libs..
 
 I have a bunch of data in my sql... there are a few presentation tags 
 strored in the db (e.g. br, b etc)..
 
 I've parsed the results to replace any entities to  etc 
 but they're 
 being coverted in the jsp when iterating through the result...
 
 My results set contains
 
 br etc
 
 i read this into map which i then put into an array (array of maps)
 
 put the array in the request...
 
 It seems to me that
 
 the encoding is happening
 1. during the iteration
 2. when being set in the request
 3. when being added to the map
 
 I'm working my way through these possibilties now but if anyone knows 
 anything then please don't be shy..
 
 Any suggestions?
 
 Thanks mark
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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

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




Re: Multiple struts-config files without Modules

2003-02-04 Thread Malik Recoing
Monday, February 03, 2003 8:19 PM , Craig R. McClanahan
[EMAIL PROTECTED] a écrit :
 On Mon, 3 Feb 2003, Susan Bradeen wrote:

  Date: Mon, 3 Feb 2003 13:24:10 -0500
  From: Susan Bradeen [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Multiple struts-config files without Modules
 
  Without using Modules, and given the following configuration:
 
  !-- Standard Action Servlet Configuration (with debugging) --
servlet
  servlet-nameaction/servlet-name
[snip]
  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param param-nameconfig/param-name param-value
  /WEB-INF/struts-config.xml, /WEB-INF/struts-config-SectionOne.xml,
  /WEB-INF/struts-config-SectionTwo.xml /param-value /init-param
  ... load-on-startup1/load-on-startup /servlet
 
  Is there a proper order for the list of config files? Is there any
  advantage to having the struts-config.xml listed first or last?
  Preliminary tests show that I can put global forwards,
  exceptions, and actions in any of the config files, and Struts
  seems to find it. Even having a DynaActionForm in one config file,
  and action mappings that reference it in another config file, seems
  to work fine. Does Struts somehow actually consider the three files
  to be one? I started using this for organizational purposes
  mainly, but I am curious if there are any pitfalls that I should be
  aware of.
 
  Any comments are appreciated.
 

 If the contentes of your three files are constructed correctly (i.e.
 you don't try to declare the same action path more than once, for
 example), then order does not matter at all -- Struts simply
 processes all of the files at initialization time.  The ability to
 split is simply for the convenience of the application developer
 (particularly when you might have different subteams responsible for
 different parts of a single large single-module app).

And may we use a list of struts-config in combination with a multi-modules
config ?
Like that :

servlet
 servlet-nameaction/servlet-name
  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config-common.xml,
/WEB-INF/struts-config-global.xml/param-value
  /init-param
  init-param
param-nameconfig/market/param-name
param-value/WEB-INF/struts-config-common.xml,
/WEB-INF/struts-config-market.xml/param-value
  /init-param
  load-on-startup1/load-on-startup
/servlet

Is it dumb ? Or may it be an advance of the feature promised in 1.2 that
will allow inheritence of configs ?



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




Struts,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
Hi,
My application is working with Websphere 4 and Struts. 
I'v tried to install Tiles to use the definitions possibilities but it
doesn't
work, I've always an XmlParserError (he doesn't recognize forward to a
definition). 
Maybe my explainations don't clear butsomebody can help me to configure
Websphere 4 with Tiles  :-) 
Thanx a lot !!


--
Ce message est confidentiel. Son contenu ne represente en aucun cas un
engagement de la part de Softcomputing sous reserve de tout accord conclu
par ecrit entre vous et Softcomputing. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes
pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.

This message is confidential. Its content does not constitute a commitment
by Softcomputing except where provided for in a written agreement between
you and Softcomputing. Any unauthorised disclosure, use or dissemination,
either whole or partial, is prohibited. If you are not the intended
recipient of this message, please notify the sender immediately.
--





RE: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread mech
I tried to set %@ page contentType=text/html; charset=UTF-8 % but
now even my German development server displays all german characters as
? only.

I guess I would have to use ALL text coming from resource bundles that
are converted to UTF8. And I would have to set my db also to utf8, i
guess.

But since I don't need i18n, just german language, I saw no sense to
start using resource bundles for only one language.
Or does it help to save all jsps in UTF8. Guess my Eclipse won't let me
do that, too.

Any other or more ideas? 
Thx.
Michael

 -Original Message-
 From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 11:51
 To: 'Struts Users Mailing List'
 Subject: AW: HTML entities (general Struts taglib problem 
 with language entities)
 
 
 
 Jesus! So much work for that purpose? :-)
 
 Have you tried to use UTF-8 for your JSPs? Then all that 
 transforming to HTML encoding is not necessary anymore. It 
 works great at my project, and I have to use more special 
 characters than in German. (27 languages in fact)
 
 See http://www.anassina.com/struts/i18n/i18n.html for a full how-to.
 
 Regards,
 Bernhard
 
 
 -Ursprüngliche Nachricht-
 Von: mech [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Februar 2003 11:42
 An: 'Struts Users Mailing List'
 Betreff: RE: HTML entities (general Struts taglib problem 
 with language
 entities)
 
 
 You can usually use the attribute (e.g. with bean:write): 
 filter=true if you want special characters converted into 
 html substitutions or filter=false if you like to format 
 your view with br tags.
 
 Unfortunatally, i hate converting all my German language 
 Umlaute into auml; uuml; etc. in my database. 
 
 If I say filter=true my German special letters won't get 
 filtered and I get stupid output if my Solaris server runs on 
 English language instead like my development server in German 
 language.
 
 If I say filter=true an use auml; etc. coming from my db 
 fields, I get  filtered to amp; which doesn't help much 
 either... In the html output I would get amp;uuml; instead of uuml; 
 
 So I have to always filter=false and use auml; etc. for 
 all German characters in my db. :-( At least than I can also 
 use html tags for formating stored in the db.
 
 So on question for the future development.
 Could the tag filter be enhanced to filter not only brackets 
 etc. but also language characters? 
 
 Otherwise you'll have a problems if you use filter=true and 
 filter=false aswell. Either you have to convert all your 
 database field's not to use any language specific characters. 
 Or you can't use filter=true because your language specific 
 html entities get converted twice because one character in 
 the escape sequence (the  character) gets filtered again...
 
 What would be needed would be an filter=true logic that 
 doesn't filter the  of escape sequences or to filter also 
 language specific html entities. The last thing would be the 
 cleaner way.
 
 Michael
 
 
  -Original Message-
  From: Mark Lowe [mailto:[EMAIL PROTECTED]]
  Sent: Dienstag, 4. Februar 2003 11:16
  To: Struts List
  Subject: HTML entities
  
  
  Has anyone any information on preventing  and  being 
 translated
  into lt; and gt; when using the tag libs..
  
  I have a bunch of data in my sql... there are a few 
 presentation tags
  strored in the db (e.g. br, b etc)..
  
  I've parsed the results to replace any entities to  etc
  but they're 
  being coverted in the jsp when iterating through the result...
  
  My results set contains
  
  br etc
  
  i read this into map which i then put into an array (array of maps)
  
  put the array in the request...
  
  It seems to me that
  
  the encoding is happening
  1. during the iteration
  2. when being set in the request
  3. when being added to the map
  
  I'm working my way through these possibilties now but if 
 anyone knows
  anything then please don't be shy..
  
  Any suggestions?
  
  Thanks mark
  
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 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]




bean:cookie tag question

2003-02-04 Thread Konstantina Stamopoulou
Hello all,
I'm  wondering if any of U that have used the bean:cookie tag had any problems. 
I'm facing the following problem. I have created a cookie in one of my Action classes  
with the following code:

Cookie logged=null;
logged = new Cookie(username,username);
logged.setMaxAge(300);
logged.setPath(/);
response.addCookie(logged);

The cookie is created successfully - I can get its info from any place of the code- 
but when I tried to get its value from my jsp with the following code:

logic:present cookie=logged 
 %System.out.println(=Have found the 
cookie==);% 
  bean:cookie id=mycookie name=logged/
   Bean Name:  bean:write name=mycookie property=name/
   Bean Value:bean:write name=mycookie property=value/
 /logic:present 

I fail. The condition is never satisfied.
 Has anyone any idea of what I'm doing wrong?


Thank U in advance,
Konstantina




Re: Offline DTDs and Tiles - HELP appreciated

2003-02-04 Thread Eugeniusz Nowacki
[EMAIL PROTECTED] wrote:


Hi there

I have just started adding tiles to my struts application - and I can get
it working except...

The doctype at the top of tiles-defs.xml

!DOCTYPE tiles-definitions PUBLIC
  -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN
  http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;

is causing me problems. I get
http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd returned 407
error and the app crashes.
If I replace the system id with an absolute path on my disk it works.

How can I package up the DTD in to the web application in some way so that
it is self contained and does not need an external resource call or an
absolute path?

Any help appreciated. I found one thread from last July about this but it
seemed to be hanging.

Cheers

Luke






***
The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient (or responsible for delivery of the message to the intended recipient) please notify us immediately on 0141 306 2050 and delete the message from your computer. You may not copy or forward it or use or disclose its contents to any other person. As Internet communications are capable of data corruption Student Loans Company Limited does not accept any  responsibility for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice or opinions contained in an e-mail without obtaining written confirmation of it. Neither Student Loans Company Limited or the sender accepts any liability or responsibility for viruses as it is your responsibility to scan attachments (if any). Opinions and views expressed in this e-mail are those of the sender and may not reflect the opinions and views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for the presence of computer viruses.

**


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


 

I would download http://jakarta.apache.org/struts/dtds/tiles-config.dtd  
( not  tiles-config_1_1.dtd  )
( or unzip struts.jar - tiles-config.dtd is a part of the struts 
distribution ),
store it in  let's say c:\struts\dtds directory  and then replace

!DOCTYPE tiles-definitions PUBLIC
  -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN
  http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;

with

!DOCTYPE tiles-definitions PUBLIC
  -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN
  file://c:/struts/dtds/tiles-config.dtd


You can also copy tiles-config.dtd to any web server in your lan

( like local MS Internet Information Server ) i.e. 
c:\INetPub\WWWRoot\struts\dtds
and replace http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;
with http://localhost/struts/dtds/tiles-config.dtd;


I hope it helps.




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



DateTime,TimeStamp field validations in validation.xml

2003-02-04 Thread Arunachalam Jaisankar
Hi all,

I'm using struts validator for all dates and it works fine for simple dates.
The entry in validation.xml file is like this.

  fieldproperty=eventDate
  depends=required,date
   arg0 key=eventForm.eventDate.displayname/
 var
   var-namedatePatternStrict/var-name
   var-valuedd/MM/ /var-value
 /var
/field

How can i validate datetime field using the same procedure using  format
string dd/MM/ HH:SS ?
Help required.

thanks  regards
Jai


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




AW: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread Hirschmann, Bernhard

Hey Michael,

that's right, if you define your JSP content as utf-8, it will be
interpreted as utf-8. So your text comming from the DB *must* be utf-8 as
well.
If you use a different character set in you DB, you could use a transformer,
which transforms this character set into utf-8. Then you don't have to worry
about correct displaying in the browser.

I would always use a resource bundle for your texts, no matter if you use
only German. The special characters in the resource bundle could use HTML
encoding, so you don't have to care about saving the properties files in
utf-8. (We do it this way)

You dont't have to save your JSPs in utf-8, since you don't use special
characters in the JSP code. You surely don't do that, right? Because the
first 128 characters of ASCII or ANSI are identical to utf-8, you don't have
to care about that.

Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: mech [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 12:22
An: 'Struts Users Mailing List'
Betreff: RE: HTML entities (general Struts taglib problem with language
entities)


I tried to set %@ page contentType=text/html; charset=UTF-8 % but
now even my German development server displays all german characters as
? only.

I guess I would have to use ALL text coming from resource bundles that
are converted to UTF8. And I would have to set my db also to utf8, i
guess.

But since I don't need i18n, just german language, I saw no sense to
start using resource bundles for only one language.
Or does it help to save all jsps in UTF8. Guess my Eclipse won't let me
do that, too.

Any other or more ideas? 
Thx.
Michael

 -Original Message-
 From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 11:51
 To: 'Struts Users Mailing List'
 Subject: AW: HTML entities (general Struts taglib problem 
 with language entities)
 
 
 
 Jesus! So much work for that purpose? :-)
 
 Have you tried to use UTF-8 for your JSPs? Then all that 
 transforming to HTML encoding is not necessary anymore. It 
 works great at my project, and I have to use more special 
 characters than in German. (27 languages in fact)
 
 See http://www.anassina.com/struts/i18n/i18n.html for a full how-to.
 
 Regards,
 Bernhard
 
 
 -Ursprüngliche Nachricht-
 Von: mech [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Februar 2003 11:42
 An: 'Struts Users Mailing List'
 Betreff: RE: HTML entities (general Struts taglib problem 
 with language
 entities)
 
 
 You can usually use the attribute (e.g. with bean:write): 
 filter=true if you want special characters converted into 
 html substitutions or filter=false if you like to format 
 your view with br tags.
 
 Unfortunatally, i hate converting all my German language 
 Umlaute into auml; uuml; etc. in my database. 
 
 If I say filter=true my German special letters won't get 
 filtered and I get stupid output if my Solaris server runs on 
 English language instead like my development server in German 
 language.
 
 If I say filter=true an use auml; etc. coming from my db 
 fields, I get  filtered to amp; which doesn't help much 
 either... In the html output I would get amp;uuml; instead of uuml; 
 
 So I have to always filter=false and use auml; etc. for 
 all German characters in my db. :-( At least than I can also 
 use html tags for formating stored in the db.
 
 So on question for the future development.
 Could the tag filter be enhanced to filter not only brackets 
 etc. but also language characters? 
 
 Otherwise you'll have a problems if you use filter=true and 
 filter=false aswell. Either you have to convert all your 
 database field's not to use any language specific characters. 
 Or you can't use filter=true because your language specific 
 html entities get converted twice because one character in 
 the escape sequence (the  character) gets filtered again...
 
 What would be needed would be an filter=true logic that 
 doesn't filter the  of escape sequences or to filter also 
 language specific html entities. The last thing would be the 
 cleaner way.
 
 Michael
 
 
  -Original Message-
  From: Mark Lowe [mailto:[EMAIL PROTECTED]]
  Sent: Dienstag, 4. Februar 2003 11:16
  To: Struts List
  Subject: HTML entities
  
  
  Has anyone any information on preventing  and  being 
 translated
  into lt; and gt; when using the tag libs..
  
  I have a bunch of data in my sql... there are a few 
 presentation tags
  strored in the db (e.g. br, b etc)..
  
  I've parsed the results to replace any entities to  etc
  but they're 
  being coverted in the jsp when iterating through the result...
  
  My results set contains
  
  br etc
  
  i read this into map which i then put into an array (array of maps)
  
  put the array in the request...
  
  It seems to me that
  
  the encoding is happening
  1. during the iteration
  2. when being set in the request
  3. when being added to the map
  
  I'm working my way through these possibilties now but if 

AW: Struts,Tiles Websphere

2003-02-04 Thread Hirschmann, Bernhard

Hey Risika,

we also use WS4 with Tiles and we don't have any problem with it. 

I suppose you're having syntax problems... 
could you post some JSP snippet?

Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 12:10
An: 'Struts Users Mailing List'
Betreff: Struts,Tiles  Websphere


Hi,
My application is working with Websphere 4 and Struts. 
I'v tried to install Tiles to use the definitions possibilities but it
doesn't
work, I've always an XmlParserError (he doesn't recognize forward to a
definition). 
Maybe my explainations don't clear butsomebody can help me to configure
Websphere 4 with Tiles  :-) 
Thanx a lot !!



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




RE: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread mech
 
 Hey Michael,
 
 that's right, if you define your JSP content as utf-8, it 
 will be interpreted as utf-8. So your text comming from the 
 DB *must* be utf-8 as well. If you use a different character 
 set in you DB, you could use a transformer, which transforms 
 this character set into utf-8. Then you don't have to worry 
 about correct displaying in the browser.

It's a bit strange...
I just did the following in my main tiles jsp which is always loaded:
%@ page contentType=text/html; charset=ISO-8859-1 %
and even
meta http-equiv=content-type content=text/html; charset=ISO-8859-1

So my fellow English Solaris even does german characters correct

I tested normal html öüä and it's fine.
I tested
bean:define id=test value=üöä/
bean:write name=test filter=true/
bean:write name=test filter=false/

and both writes work correct, the html source code shows that no
filtering auf ü into uuml; has taken place at all. Anyway the german
character are displayed correctly.

But when I have text field originally coming from my MySQL database on
that Solaris machine that I want to display with bean:write I
encounter problems and receive only ? in my html source.

Only bean:write filter=false in combination with data fields
containing abcduuml;efgauml;test works fine.
With bean:write filter=true the  get's converted to amp;

If I have data fields with abcdefüöäsdfs it always get's garbled to
? in html code.

I have no idea if this is more a mysql problem than a Tomcat/Struts
issue since my above tests work fine as long as the data is not from db?
Maybe it gets garbled in my database DAO classes already while querying
the db... no idea...

 
 I would always use a resource bundle for your texts, no 
 matter if you use only German. The special characters in the 
 resource bundle could use HTML encoding, so you don't have to 
 care about saving the properties files in utf-8. (We do it this way)
I would do it, if i could rely on someone editing those resource bundles
later and using taglibs. But unfortunately I have to use plain html
saved as .jsp whereever possible for latter maintenance of html-only
folks.
 
 You dont't have to save your JSPs in utf-8, since you don't 
 use special characters in the JSP code. You surely don't do 
 that, right? Because the first 128 characters of ASCII or 
 ANSI are identical to utf-8, you don't have to care about that.
 
 Regards,
 Bernhard


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




brazil struts user group

2003-02-04 Thread Aislan Fernandes
Now there is a new struts user group in Brazil! 

http://groups.yahoo.com/group/brazil_struts/ 

Aislan 

_
Voce quer um iGMail protegido contra vírus e spams? 
Clique aqui: http://www.igmailseguro.ig.com.br


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




Pager tag troubles

2003-02-04 Thread Zoran Avtarovski
Hi,

I've got a struts application which displays lists of information from a
database.  I use a action class to retrieve and place the information into a
Collection which I then return to a display jsp. Pretty standard stuff.

In the jsp page I am using the iterate tag to display the collection.

Everything works well, except that the pages were getting a little on the
long side, so I though rather than writing pagination code from scratch I'd
use James Klicman's pager tag which offered a quick and easy solution.

I'm having problems getting the page to work with my page. I can get the
example to run without a hitch, but that uses a for-next loop with some code
on the page. Has anybody gotten the pager tag to work with an iterate tag
and if so can you please send me some sample code.

Or, am I better off writing some code into my action classes which pass an
offset value, and some display parameters with each request?

Any help would be greatly appreciated.

Zoran 


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




RE: HTML entities (general Struts taglib problem with language entities) - solved: DB driver issue

2003-02-04 Thread mech
Solved my problem. MySQL driver problem.

After putting this into my MySQL connection url it works! :-)
useUnicode=truecharacterEncoding=ISO-8859-1

The problem seems to be, that the MySQL JDBC driver tries to determine
the character encoding automatically if not specify. Because my Solaris
server has a English setup the driver speaks with the wrong character
set as the autodetect must return ISO-8859 encoding, I guess. If I set
to ISO-8859-1 all german characters coming from the MySQL DB are
received correctly in my DAO classes. 

The problem wasn't JSP/Tomcat/Struts whatever, it was the MySQL driver
and my lack of reading the documentation (well that's an answer for
nearly all question...)

Anyway thx
Michael

 -Original Message-
 From: mech [mailto:[EMAIL PROTECTED]] 
 Sent: Dienstag, 4. Februar 2003 13:08
 To: 'Struts Users Mailing List'
 Subject: RE: HTML entities (general Struts taglib problem 
 with language entities)
 
 
  
  Hey Michael,
  
  that's right, if you define your JSP content as utf-8, it
  will be interpreted as utf-8. So your text comming from the 
  DB *must* be utf-8 as well. If you use a different character 
  set in you DB, you could use a transformer, which transforms 
  this character set into utf-8. Then you don't have to worry 
  about correct displaying in the browser.
 
 It's a bit strange...
 I just did the following in my main tiles jsp which is always 
 loaded: %@ page contentType=text/html; charset=ISO-8859-1 
 % and even meta http-equiv=content-type 
 content=text/html; charset=ISO-8859-1
 
 So my fellow English Solaris even does german characters correct
 
 I tested normal html öüä and it's fine.
 I tested
 bean:define id=test value=üöä/
 bean:write name=test filter=true/
 bean:write name=test filter=false/
 
 and both writes work correct, the html source code shows that 
 no filtering auf ü into uuml; has taken place at all. Anyway 
 the german character are displayed correctly.
 
 But when I have text field originally coming from my MySQL 
 database on that Solaris machine that I want to display with 
 bean:write I encounter problems and receive only ? in my 
 html source.
 
 Only bean:write filter=false in combination with data 
 fields containing abcduuml;efgauml;test works fine. With 
 bean:write filter=true the  get's converted to amp;
 
 If I have data fields with abcdefüöäsdfs it always get's 
 garbled to ? in html code.
 
 I have no idea if this is more a mysql problem than a 
 Tomcat/Struts issue since my above tests work fine as long as 
 the data is not from db? Maybe it gets garbled in my database 
 DAO classes already while querying the db... no idea...
 
  
  I would always use a resource bundle for your texts, no
  matter if you use only German. The special characters in the 
  resource bundle could use HTML encoding, so you don't have to 
  care about saving the properties files in utf-8. (We do it this way)
 I would do it, if i could rely on someone editing those 
 resource bundles later and using taglibs. But unfortunately I 
 have to use plain html saved as .jsp whereever possible for 
 latter maintenance of html-only folks.
  
  You dont't have to save your JSPs in utf-8, since you don't
  use special characters in the JSP code. You surely don't do 
  that, right? Because the first 128 characters of ASCII or 
  ANSI are identical to utf-8, you don't have to care about that.
  
  Regards,
  Bernhard
 
 
 -
 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: xdoclet struts

2003-02-04 Thread Raible, Matt
I am - and it's awesome.  The only issue (IMO) in XDoclet's current codebase
is that you can only generate Struts' Forms from Entity Beans at this point.
I've submitted a patch for it (http://tinyurl.com/5bb9), but no one has
committed it yet. If you're interested in using this patch, you can find out
more about it on my site at http://tinyurl.com/5bbh (this also includes a
link to download the patched code).

This patch allows you to generate Struts' Forms from any POJO (Plain Old
Java Object).  I've published a sample app (struts-resume) that can be
checked out from CVS at http://sf.net/projects/struts.  This project
generates Struts Validator Forms from POJOs, the validation.xml, and the
struts-config.xml using XDoclet.  Pretty slick stuff IMHO.

The project also uses a strutsgen tool written by Erik Hatcher.  This tool
will generate a skeleton JSP and .properties file from a Form - really
speeding up development time.  I discovered this tool, as well as a very
slick label JSP Tag by investigating Erik's JavaDevWithAnt project at
http://www.ehatchersolutions.com/JavaDevWithAnt/.

HTH,

Matt

 -Original Message-
 From: Pat Quinn [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 8:06 AM
 To: [EMAIL PROTECTED]
 Subject: xdoclet  struts
 
 
 I was taking a quick read through the xdoclet documentation 
 and noted it 
 offers some support for struts. Is anyone out there using 
 xdoclet with 
 struts and if so what are the benefits and typical usages???
 
 Cheers
 
 Pat
 
 
 
 
 _
 The new MSN 8: advanced junk mail protection and 2 months FREE* 
 http://join.msn.com/?page=features/junkmail
 
 
 -
 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]




AW: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread Hirschmann, Bernhard


Firstly:
bean:write filter=true doesn't transform ü into uuml;
it only transforms , ,  and  into its HTML encoding.
You can see that in the source code of 
org.apache.struts.util.ResponseUtils

Secondly:
If you're using charset=ISO-8859-1 your German special characters are only
displayed correctly, if your're using a German locale, as far as I remember.
Try to use a user with a different locale (english) on the same machine and
the display will be messed up.

 But when I have text field originally coming from my MySQL database on
 that Solaris machine that I want to display with bean:write I
 encounter problems and receive only ? in my html source.

Yes, if this text is encoded in ISO-8859-1 and your JSPs are told to use
UTF-8 or vice versa. So you should use only one character encoding for your
browser.


 Only bean:write filter=false in combination with data fields
 containing abcduuml;efgauml;test works fine.

Yes, because this text is fully ASCII compatible. (there are no special
characters)


 With bean:write filter=true the  get's converted to amp;

Yes, because [see firstly]


 I have no idea if this is more a mysql problem than a Tomcat/Struts
 issue since my above tests work fine as long as the data is not from db?
 Maybe it gets garbled in my database DAO classes already while querying
 the db... no idea...

As I said: Make sure your text from the DB is encoded in UTF-8, then it will
be displayed correctly in a JSP which uses UTF-8.


 I would always use a resource bundle for your texts, no 
 matter if you use only German. The special characters in the 
 resource bundle could use HTML encoding, so you don't have to 
 care about saving the properties files in utf-8. (We do it this way)
 I would do it, if i could rely on someone editing those resource bundles
 later and using taglibs. But unfortunately I have to use plain html
 saved as .jsp whereever possible for latter maintenance of html-only
 folks.

I think we're talking about two different things, are we?
When I say resource bundle then I mean the use of the
ApplicationResources.properties file. You can't use any taglib in it. But
you can write schouml;n instead of schön. That's what I have meant.


Is it more clear now? :-)

Regards,
Bernhard

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




Pager tag trouble

2003-02-04 Thread Zoran Avtarovski
Apologies if this was sent twice, mail server issuesŠ

Hi,

I've got a struts application which displays lists of information from a
database.  I use a action class to retrieve and place the information into a
Collection which I then return to a display jsp. Pretty standard stuff.

In the jsp page I am using the iterate tag to display the collection.

Everything works well, except that the pages were getting a little on the
long side, so I though rather than writing pagination code from scratch I'd
use James Klicman's pager tag which offered a quick and easy solution.

I'm having problems getting the pager tag to work with my page. I can get
the example to run without a hitch, but that uses a for-next loop with some
code on the page. Has anybody gotten the pager tag to work with an iterate
tag and if so can you please send me some sample code.

Or, am I better off writing some code into my action classes which pass an
offset value, and some display parameters with each request, which I then
pass back to the page?

Any help would be greatly appreciated.

Zoran 


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




javax.servlet.jsp.JspException: Cannot retrieve mapping for action/submit

2003-02-04 Thread Jefferson Magno

Hello, 

I was following the Keld H. Hansen's Tutorial
(http://javaboutique.internet.com/tutorials/Struts/) when I got this
exception:

javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/submit
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:784)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
at _submit__jsp._jspService(/myproject/submit.jsp:14)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:497)
at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)

Can you help me?  
The container used was Resin 2.1.16 on a Red Hat Linux 8

Thanks a lot
Jefferson Magno




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




global-exception use

2003-02-04 Thread Tinsley, Scott S. (Strategic Technologies)
I am trying to catch role based security violations on struts actions. I
extended the RequestProcessor and configured its use in the struts config
file. I defined and threw a unique exception when role based security was
violated. The exception trace in the log verifies the setup.

[DEBUG] RequestProcessor - - User 'mbuUser' does not have any required role,
denying access
Feb 3, 2003 5:10:56 PM EST Error HTTP 101017
[ServletContext(id=5433128,name=avcm,context-path=/avcm)] Root cause of
ServletException
mil.deca.framework.exception.DecaRuntimeException: Unauthorized

at
mil.deca.framework.DecaRequestProcessor.processRoles(DecaRequestProcessor.ja
va:42)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:240)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
mil.deca.framework.DecaActionServlet.process(DecaActionServlet.java:132)
..

Now I want to have a global-exception defined to handle this unique
exception and provide a relevant error display. I have defined my global
exception as shown below.

global-exceptions
  exception type=mil.deca.framework.exception.DecaRuntimeExceptionn
 key=exception.error
 path=/avcm/err.jsp /
/global-exceptions

But the exception handling never seems to kick in. Any ideas? I am using
struts 1.1b2 on Weblogic 7.0.

Scott Tinsley
System Administrator
Defense Commissary Agency
804-734-8857


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




LazyList and DynaActionForm

2003-02-04 Thread Will Jaynes
I wonder if anyone can tell me if it is possible to use a LazyList in a 
DynaActionForm as declared in struts-config.xml. I've used ArrayLists 
and that seems to work fine. But a LazyList isn't actually it's own 
class, and I don't see how to declare it in the config file.

Is this possible?
Will


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



Collection manipulation and form validation

2003-02-04 Thread Anthony Newman
Hi there folks, 
 
I am writing a webapp which has dynamically changing form fields on any
given page.  They change both in number and display format etc etc   I
therefore want to use some kind of collection of beans which my JSP can
iterate through to display the form fields in order and format according to
properties in the beans.
 
My problem occurs when the form fields are edited, submitted and validated.
In the event of validation failure, the form is redisplayed with the
html:errors and the original values instead of the updated values because of
course the Collection used to render the page is now out of sync with the
values in the formBean itself.  Are there existing patterns to update the
beans in a collection upon submission/validation?   I am thinking I have to
overload the Validate method in my ValidatorForm to populate the Collection
from the form submissions?   I have noticed that BeanUtils may help here
 
Thanks for any help
Anthony



RE: HTML entities (general Struts taglib problem with language entities)

2003-02-04 Thread mech

 
 Firstly:
 bean:write filter=true doesn't transform ü into uuml;
 it only transforms , ,  and  into its HTML encoding.
 You can see that in the source code of 
 org.apache.struts.util.ResponseUtils
I almost thought that ;-)
 
 Secondly:
 If you're using charset=ISO-8859-1 your German special 
 characters are only displayed correctly, if your're using a 
 German locale, as far as I remember. Try to use a user with a 
 different locale (english) on the same machine and the 
 display will be messed up.
I tried it. But obviously no problem. My Mozilla is set to English
language by default. I guess it'll find the charset=ISO8859-1 tag in the
html-source and displays everything appropriately.
In my html:html locale=false because i don't use language bundles.
Tried with Netscape 4.7x and english. Also fine.
 
  But when I have text field originally coming from my MySQL 
 database on 
  that Solaris machine that I want to display with bean:write I 
  encounter problems and receive only ? in my html source.
 
 Yes, if this text is encoded in ISO-8859-1 and your JSPs are 
 told to use UTF-8 or vice versa. So you should use only one 
 character encoding for your browser.
 
 
Actually my MySQL driver on the Solaris machine autodetected a wrong
encoding. Something I didn't see on my german development server as the
autodetection delivered Latin1. So the root cause for my problem wasn't
the tag at all, but the MySQL J/Connector 2.0.14. After forcing it to
use Latin1, it's perfect. I'll throw out all html entities out of my db
fields soon... :-)


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




AW: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /submit

2003-02-04 Thread Hirschmann, Bernhard

Cannot retrieve mapping for action /submit means, 
that in your struts-config.xml you don't have a action configured 
for the URI /submit.

I hope this helps... 

Regards,
Bernhard

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




RE: Tiles help

2003-02-04 Thread Jackson, Stephen
There is a very good tutorial on tiles at the url below:

http://www.onjava.com/lpt/a/2834

This is a 4 part series.

-Original Message-
From: usha [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 3:10 AM
To: [EMAIL PROTECTED]
Subject: Tiles help


Hi

can i write the code for tiles like this

the code in the tiles-config.xml is

  !-- tabs page --
  definition name=examples.tabs.page extends=examples.masterPage
  put name=title  value=Tiles 1.1 Tabs layout example /
  put name=body   value=examples.tabs.body /
  /definition

  !-- body using tabs --
  definition name=examples.tabs.body path=/inventory/tabsLayout.jsp 
put name=selectedIndex  value=0 /
put name=parameterName  value=selected /
putList name=tabList 
  item value=Quick overviewlink=/action/ivtranslist /
/putList
  /definition


code in the struts-config.xml

actionpath=/ivtranslist
 parameter=/inventory/inventory_trans_list.jsp
 type=org.apache.struts.actions.ForwardAction
 name=ivtranshdrbean
 scope=request
 validate=false
  /action

i am getting the following error

javax.servlet.ServletException: Cannot forward after response has been 
committed
at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.
java:507)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:448)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:497)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
20)
at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:865)
at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
at 
org.apache.jsp.tabsLayout$jsp._jspService(tabsLayout$jsp.java:284)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:497)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
20)
at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:865)
at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
at 
org.apache.jsp.classicLayout$jsp._jspService(classicLayout$jsp.java:125)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:574)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:497)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
20)
at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:865)
at 

Re: Collection manipulation and form validation

2003-02-04 Thread Zoran Avtarovski
HI Anthony,

I'm not sure if this considered bad practice but I validate my forms in the
business logic code. This enables me to control more precisely the actions
on a validation error. Typically, on a validation error I return the
submitted bean as well as the error. This way site users don't lose their
entered data.

Zoran

 Hi there folks, 
 
 I am writing a webapp which has dynamically changing form fields on any
 given page.  They change both in number and display format etc etc   I
 therefore want to use some kind of collection of beans which my JSP can
 iterate through to display the form fields in order and format according to
 properties in the beans.
 
 My problem occurs when the form fields are edited, submitted and validated.
 In the event of validation failure, the form is redisplayed with the
 html:errors and the original values instead of the updated values because of
 course the Collection used to render the page is now out of sync with the
 values in the formBean itself.  Are there existing patterns to update the
 beans in a collection upon submission/validation?   I am thinking I have to
 overload the Validate method in my ValidatorForm to populate the Collection
 from the form submissions?   I have noticed that BeanUtils may help here
 
 Thanks for any help
 Anthony
 


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




RE: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping fora ction /submit

2003-02-04 Thread Jefferson Magno
Bernhard, I did exactly as described in the tutorial, my
struts-config.xml (placed inside WEB-INF dir) has:

  action-mappings

action   path=/submit
  type=hansen.playground.SubmitAction
  name=submitForm
  input=/submit.jsp
  scope=request
forward name=success path=/submit.jsp/  
forward name=failure path=/submit.jsp/  
/action

  /action-mappings

And I verified that the SubmitAction does exist.

Jefferson

Em Ter, 2003-02-04 às 11:07, Hirschmann, Bernhard escreveu:
 
 Cannot retrieve mapping for action /submit means, 
 that in your struts-config.xml you don't have a action configured 
 for the URI /submit.
 
 I hope this helps... 
 
 Regards,
 Bernhard
 
 -
 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,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions.
Here are my struts-config.xml and my web.xml...Did I forget some marker or
put some wrong parameters ? Or my websphere  doesn't have  the right
configuration ?
Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib id=TagLibRef_3
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib id=TagLibRef_4
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib
   /web-app

Definitions xml :

 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration//EN
   http://jakarta.apache.org/struts/dtds/tiles-config.dtd;
   
 tiles-definitions  
   
definition name=testForwardTiles path=/test_page.jsp
  put name=title  value=Tiles Test /
  put name=header value=/tiles_head.jsp /
  put name=footer value=/tiles_foot.jsp /
  put name=menu   value=/tiles_menu.jsp /
  put name=body   value=/tiles_body.jsp /
/definition
/tiles-definitions


And my jsp page :

%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert definition=testForwardTiles flush=true/


:-)

-Message d'origine-
De : Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 12:54
À : 'Struts Users Mailing List'
Objet : AW: Struts,Tiles  Websphere



Hey Risika,

we also use WS4 with Tiles and we don't have any problem with it. 

I 

RE : RE : Struts,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions.
Here are my struts-config.xml and my web.xml...Did I forget some marker or
put some wrong parameters ? Or my websphere  doesn't have  the right
configuration ?
Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib id=TagLibRef_3
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib id=TagLibRef_4
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib
   /web-app

Definitions xml :

 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration//EN
   http://jakarta.apache.org/struts/dtds/tiles-config.dtd;
   
 tiles-definitions  
   
definition name=testForwardTiles path=/test_page.jsp
  put name=title  value=Tiles Test /
  put name=header value=/tiles_head.jsp /
  put name=footer value=/tiles_foot.jsp /
  put name=menu   value=/tiles_menu.jsp /
  put name=body   value=/tiles_body.jsp /
/definition
/tiles-definitions


And my jsp page :

%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert definition=testForwardTiles flush=true/


:-)


socket write error when using tiles

2003-02-04 Thread Roy . Stephan


I have socket write error when using tiles.
I suppose it is because users click on other action before the last tile is
displayed. I have so many of these that I suspect this can cause performance
issues. Anyone can explain or knows how to correct this. The pages display
fine. I am using WSAD and WebSphere.

Thank you.
Stephan




-
[Servlet LOG] : Error Page Exception: :
com.ibm.servlet.engine.webapp.WebAppErrorReport: Connection reset by peer:
socket write error at
com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:651)
at com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:546)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:145)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:122)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)



AW: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping for a ction /submit

2003-02-04 Thread Hirschmann, Bernhard

Ok, another chance: 
Did you try the usual things, like resart the servlet engine after editing
the struts-config.xml? 
Or are you using a IDE like Eclipse? Then before restarting the servlet
engine you should refresh from local your properties... 
(I don't know how your skills are, so maybe you don't know that)

Regards,
Bernhard

-Ursprüngliche Nachricht-
Von: Jefferson Magno
Gesendet: Dienstag, 4. Februar 2003 13:27
An: Struts Users Mailing List
Betreff: RE: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping
for a ction /submit


Bernhard, I did exactly as described in the tutorial, my
struts-config.xml (placed inside WEB-INF dir) has:

  action-mappings

action   path=/submit
  type=hansen.playground.SubmitAction
  name=submitForm
  input=/submit.jsp
  scope=request
forward name=success path=/submit.jsp/  
forward name=failure path=/submit.jsp/  
/action

  /action-mappings

And I verified that the SubmitAction does exist.

Jefferson

Em Ter, 2003-02-04 às 11:07, Hirschmann, Bernhard escreveu:
 
 Cannot retrieve mapping for action /submit means, 
 that in your struts-config.xml you don't have a action configured 
 for the URI /submit.
 
 I hope this helps... 
 
 Regards,
 Bernhard
 
 -
 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: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping fora ction /submit

2003-02-04 Thread Nicolas De Loof
check your web.xml Deployment Descriptor for *.do mapping. It should map to
struts ActionServlet.

Nico.


- Original Message -
From: Jefferson Magno [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 1:27 PM
Subject: RE: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping
fora ction /submit


Bernhard, I did exactly as described in the tutorial, my
struts-config.xml (placed inside WEB-INF dir) has:

  action-mappings

action   path=/submit
  type=hansen.playground.SubmitAction
  name=submitForm
  input=/submit.jsp
  scope=request
forward name=success path=/submit.jsp/
forward name=failure path=/submit.jsp/
/action

  /action-mappings

And I verified that the SubmitAction does exist.

Jefferson

Em Ter, 2003-02-04 às 11:07, Hirschmann, Bernhard escreveu:

 Cannot retrieve mapping for action /submit means,
 that in your struts-config.xml you don't have a action configured
 for the URI /submit.

 I hope this helps...

 Regards,
 Bernhard

 -
 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: Design question: Model component using Business logic beans

2003-02-04 Thread BaTien Duong
Great. Thanks.
BaTien

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 8:49 PM
Subject: Re: Design question: Model component using Business logic beans




 On Mon, 3 Feb 2003, BaTien Duong wrote:

  Date: Mon, 3 Feb 2003 20:02:41 -0700
  From: BaTien Duong [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  Subject: Re: Design question: Model component using Business logic beans
 
  We use chained exception from jdk1.4, commons.logging, and factoring out
4
  components that are independent on Struts [MessageResources,
  MessageResourcesFactory, PropertyMessageResources, and
  PropertyMessageResourcesFactory]. I heard somewhere that these 4
components
  will eventually be in commons. ActionErrors and ActionError are used at
the
  web layer. With many TilesAction(s) in 1 page, we coordinate the error
  handling of the page via the ERROR_KEY attribute of the request.
 

 The refactoring of the resources code to make it independent of Struts has
 been completed:


http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-resources

 However, it was too late in the 1.1 release cycle to make Struts use this
 new code itself.  That will happen in a future version, but you can use
 commons-resources for your business tier message resource needs in the
 interim.

  Hope this may help.
  BaTien

 Craig

 -
 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: AW: AW: javax.servlet.jsp.JspException: Cannot retrieve mappingf or a ction /submit

2003-02-04 Thread Jefferson Magno
Bernard, 

yes, I restarted the servlet engine.
I'm using the Eclipse IDE but I don't use the Resin plugin ... I prefer
to control (start/stop) it manually.
The struts.jar is in the lib dir. 
All the *.tld are in WEB-INF dir.
I did the servlet mapping too (*.do -- ActionServlet)

Jefferson

Em Ter, 2003-02-04 às 11:52, Hirschmann, Bernhard escreveu:
 
 Ok, another chance: 
 Did you try the usual things, like resart the servlet engine after editing
 the struts-config.xml? 
 Or are you using a IDE like Eclipse? Then before restarting the servlet
 engine you should refresh from local your properties... 
 (I don't know how your skills are, so maybe you don't know that)
 
 Regards,
 Bernhard
 
 -Ursprüngliche Nachricht-
 Von: Jefferson Magno
 Gesendet: Dienstag, 4. Februar 2003 13:27
 An: Struts Users Mailing List
 Betreff: RE: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping
 for a ction /submit
 
 
 Bernhard, I did exactly as described in the tutorial, my
 struts-config.xml (placed inside WEB-INF dir) has:
 
   action-mappings
 
 action   path=/submit
   type=hansen.playground.SubmitAction
   name=submitForm
   input=/submit.jsp
   scope=request
 forward name=success path=/submit.jsp/  
 forward name=failure path=/submit.jsp/  
 /action
 
   /action-mappings
 
 And I verified that the SubmitAction does exist.
 
 Jefferson
 
 Em Ter, 2003-02-04 às 11:07, Hirschmann, Bernhard escreveu:
  
  Cannot retrieve mapping for action /submit means, 
  that in your struts-config.xml you don't have a action configured 
  for the URI /submit.
  
  I hope this helps... 
  
  Regards,
  Bernhard
  
  -
  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: AW: javax.servlet.jsp.JspException: Cannot retrieve mappingfora ction /submit

2003-02-04 Thread Jefferson Magno
Hi Nico, thanks.

I checked the web.xml and the mapping is OK. 
Is there anything else that I can try?

Jefferson

Em Ter, 2003-02-04 às 11:52, Nicolas De Loof escreveu:
 check your web.xml Deployment Descriptor for *.do mapping. It should map to
 struts ActionServlet.
 
 Nico.
 
 
 - Original Message -
 From: Jefferson Magno [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Tuesday, February 04, 2003 1:27 PM
 Subject: RE: AW: javax.servlet.jsp.JspException: Cannot retrieve mapping
 fora ction /submit
 
 
 Bernhard, I did exactly as described in the tutorial, my
 struts-config.xml (placed inside WEB-INF dir) has:
 
   action-mappings
 
 action   path=/submit
   type=hansen.playground.SubmitAction
   name=submitForm
   input=/submit.jsp
   scope=request
 forward name=success path=/submit.jsp/
 forward name=failure path=/submit.jsp/
 /action
 
   /action-mappings
 
 And I verified that the SubmitAction does exist.
 
 Jefferson
 
 Em Ter, 2003-02-04 às 11:07, Hirschmann, Bernhard escreveu:
 
  Cannot retrieve mapping for action /submit means,
  that in your struts-config.xml you don't have a action configured
  for the URI /submit.
 
  I hope this helps...
 
  Regards,
  Bernhard
 
  -
  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: LazyList and DynaActionForm

2003-02-04 Thread Kris Schneider
I'm guessing you could create your own List implementation that delegates to a
LazyList:

package ...;
import java.util.*;
import org.apache.commons.collections.*;

public class MyLazyList extends AbstractList implements Factory {

  private final List lazy;

  public MyLazyList() {
this.lazy = ListUtils.lazyList(new ArrayList(), this);
  }

  public Object create() {
// whatever you need
  }

  public Object get(int index) {
return this.lazy.get(index);
  }

  // size()
  // set(int index, Object element)
  // add(int index, Object element)
  // remove(int index)
}

Quoting Will Jaynes [EMAIL PROTECTED]:

 I wonder if anyone can tell me if it is possible to use a LazyList in a 
 DynaActionForm as declared in struts-config.xml. I've used ArrayLists 
 and that seems to work fine. But a LazyList isn't actually it's own 
 class, and I don't see how to declare it in the config file.
 
 Is this possible?
 Will
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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




RE : RE : RE : Struts,Tiles Websphere

2003-02-04 Thread pelletiere
You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have
the right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib id=TagLibRef_3
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib id=TagLibRef_4
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib
   /web-app

Definitions xml :

 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration//EN
   http://jakarta.apache.org/struts/dtds/tiles-config.dtd;
   
 tiles-definitions  
   
definition name=testForwardTiles path=/test_page.jsp
  put name=title  value=Tiles Test /
  put name=header value=/tiles_head.jsp /
  put name=footer value=/tiles_foot.jsp /
  

RE: Collection manipulation and form validation

2003-02-04 Thread Anthony Newman
Thanks for that, I have done this in the past but this time there are too
many form fields to do this way - particularly as struts-validator provides
such a neat way of doing basic validation.

I am thinking I will entend ValidatorForm to support Collections of string[]
which it seems there is already support for with ValidatorForm.  

Has anybody else got experience of using collections to generate pages which
are then validated using the struts-validator form validation method?


-Original Message-
From: Zoran Avtarovski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 1:18 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Collection manipulation and form validation 


HI Anthony,

I'm not sure if this considered bad practice but I validate my forms in the
business logic code. This enables me to control more precisely the actions
on a validation error. Typically, on a validation error I return the
submitted bean as well as the error. This way site users don't lose their
entered data.

Zoran

 Hi there folks, 
 
 I am writing a webapp which has dynamically changing form fields on any
 given page.  They change both in number and display format etc etc   I
 therefore want to use some kind of collection of beans which my JSP can
 iterate through to display the form fields in order and format according
to
 properties in the beans.
 
 My problem occurs when the form fields are edited, submitted and
validated.
 In the event of validation failure, the form is redisplayed with the
 html:errors and the original values instead of the updated values because
of
 course the Collection used to render the page is now out of sync with the
 values in the formBean itself.  Are there existing patterns to update the
 beans in a collection upon submission/validation?   I am thinking I have
to
 overload the Validate method in my ValidatorForm to populate the
Collection
 from the form submissions?   I have noticed that BeanUtils may help
here
 
 Thanks for any help
 Anthony
 

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




RE : RE : RE : RE : Struts,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why
-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have
the right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib id=TagLibRef_3
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib id=TagLibRef_4
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib
   /web-app

Definitions xml :

 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration//EN
   

Tiles and definition

2003-02-04 Thread pelletiere
Hi
I try to use tiles with websphere
In my web.xml file when I use the actionservlet
:servlet-classorg.apache.struts.action.ActionServlet/servlet-class
I receive this error : Can't get definitions factory from context

So I try this action servlet
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

Now it's work but I receive this warning action: Warning -
ActionComponentServlet class: This class is to be used with Struts1.0.x
only. Please modify web.xml to use regular ActionServlet class instead in
conjugaison with appropriate plugin declared in struts-config.xml

Here's my plugin in struts_config.xml
struts-config
  plug-in className=org.apache.struts.tiles.TilesPlugin 
set-property property=definitions-config
value=/WEB-INF/tiles-defs.xml /
set-property property=moduleAware value=true /
set-property property=definitions-parser-validate value=true /
  /plug-in
/struts-config

Any idea about this strange error?
Thanks



RE : RE : RE : RE : RE : Struts,Tiles Websphere

2003-02-04 Thread pelletiere
Here's my plugin in struts_config.xml
struts-config
  plug-in className=org.apache.struts.tiles.TilesPlugin 
set-property property=definitions-config
value=/WEB-INF/tiles-defs.xml /
set-property property=moduleAware value=true /
set-property property=definitions-parser-validate value=true /
  /plug-in
/struts-config

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:34
À : 'Struts Users Mailing List'
Objet : RE : RE : RE : RE : Struts,Tiles  Websphere


I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why -Message d'origine- De :
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have the
right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 

BeanUtils.copyProperties() vs. ActionForm-Value Object mapper

2003-02-04 Thread smart_runner23 [EMAIL PROTECTED]
I just found this mapper at:  
http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp

I am just starting to look into this.  I can see right away that the 
advantage to using the mapper is that it's not as ugly.  I think this 
mapper is a step in the right direction, but the fact that it doesn't 
handle Collection or ints, longs, etc is going to kill me.

Anyone know of a better tool out there?

Also, I am assuming that the BeanUtils.copyProperties() method will 
not handle nested beans.  So I will have to manually do that copy 
properties on the nested beans and then manually set those back to 
the parent bean?

Thanks,
Trevor


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




RE : RE : RE : RE : RE : Struts,Tiles Websphere

2003-02-04 Thread pelletiere
Which version of struts do you use.
Download the last one in the nighly build

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:34
À : 'Struts Users Mailing List'
Objet : RE : RE : RE : RE : Struts,Tiles  Websphere


I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why -Message d'origine- De :
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have the
right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib id=TagLibRef_2
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib id=TagLibRef_3
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib id=TagLibRef_4
 

RE: html:multibox and arrays in the ActionForm

2003-02-04 Thread Sri Sankaran
I don't understand why you say you can't use logic:iterate to populate cells in a 
table

logic:iterate id=item property=items
  tr
td
  html:multibox property=selectedItems
bean:write name=item/
  /html:multibox
  bean:write name=item/
/td
!-- Maybe more cells --
  /tr
/logic:iterate

What am I missing?

Sri

-Original Message-
From: Charles H. Baker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 03, 2003 6:35 PM
To: Struts Users Mailing List
Subject: html:multibox and arrays in the ActionForm


I have been using the most excellent ``Struts in Action'' by Ted Husted 
et. al., but I need a little clarification.

There is a code snippet from an ActionForm:

private String[] selectedItems = {};
private String[] items = {UPS,FedEx,Airborne};
public String[] getSelectedItems(){
return this.selectedItems;
}
public void setSelectedItems(String[] selectedItems){
this.selectedItems = selectedItems;
}

The JSP code snippet is this:

logic:iterate id=item property=items
html:multibox property=selectedItems
bean:write name=item/
/html:multibox
bean:write name=item/
/logic:iterate

The html code in my case was produced by DreamWeaver and the checkboxes 
must go in table cells which are of irregular size, so I cannot just 
iterate over the items array. Do I need the selectedItems and items 
arrays? What's an alternate way of addressing the items array if I don't 
use the logic:iterate tag that will still be palatable to Struts if not 
a ``best practice.'' If I don't use the JSP code above, will the proper 
array be populated by Struts?

BTW, I'm using Struts 1.02 on Tomcat 4.1.18. The people I'm working with 
are not ready to move to a Struts 1.1 beta.

-- 
Charles H. Baker
[EMAIL PROTECTED]
http://www.charleshbaker.com/ http://www.charleshbaker.com/~chb/
Perl is designed to give you several ways to do anything, so consider picking the most 
readable one.
  -- Larry Wall in the perl man page


-
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: socket write error when using tiles

2003-02-04 Thread Matthew Meyer
On Tue, 4 Feb 2003 08:32:30 -0500 
 [EMAIL PROTECTED] wrote:


I have socket write error when using tiles.
I suppose it is because users click on other action 
before the last tile is
displayed. I have so many of these that I suspect this 
can cause performance
issues. Anyone can explain or knows how to correct this. 
The pages display
fine. I am using WSAD and WebSphere.

Thank you.
Stephan


I am having this same problem. I'm running 1.1b2 in WTE. 
I'm sure that all of that exception handeling is causing 
some performance problems. Is this fixed in b3 or is this 
something we are doing wrong as developers?

Matt,


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



RE : Struts,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
In fact we have to use Struts 1.0.2 to our project with Websphere 4, we
can't use plugin.
With Tomcat the application works fine (Tiles and definitions) but with
websphere 4 it doesn't.
Any solutions ?? :-)

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:44
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : RE : RE : Struts,Tiles  Websphere


Which version of struts do you use.
Download the last one in the nighly build

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:34
À : 'Struts Users Mailing List'
Objet : RE : RE : RE : RE : Struts,Tiles  Websphere


I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why -Message d'origine- De :
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have the
right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7
param-namedefinitions-details/param-name
param-value0/param-value
 /init-param
 init-param id=InitParam_8
param-namedefinitions-parser-validate/param-name
param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
  /servlet
  servlet-mapping id=ServletMapping_1
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
  /servlet-mapping
  taglib id=TagLibRef_1
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 

RE: html:multibox and arrays in the ActionForm

2003-02-04 Thread Jörg Maurer
What i figured out is that multibox works only against an array, not a
collection - call it useful or not, i wished it works against a
collection.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 04. Februar 2003 15:56
To: Struts Users Mailing List
Subject: RE: html:multibox and arrays in the ActionForm


I don't understand why you say you can't use logic:iterate to populate
cells in a table

logic:iterate id=item property=items
  tr
td
  html:multibox property=selectedItems
bean:write name=item/
  /html:multibox
  bean:write name=item/
/td
!-- Maybe more cells --
  /tr
/logic:iterate

What am I missing?

Sri

-Original Message-
From: Charles H. Baker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 03, 2003 6:35 PM
To: Struts Users Mailing List
Subject: html:multibox and arrays in the ActionForm


I have been using the most excellent ``Struts in Action'' by Ted Husted 
et. al., but I need a little clarification.

There is a code snippet from an ActionForm:

private String[] selectedItems = {};
private String[] items = {UPS,FedEx,Airborne};
public String[] getSelectedItems(){
return this.selectedItems;
}
public void setSelectedItems(String[] selectedItems){
this.selectedItems = selectedItems;
}

The JSP code snippet is this:

logic:iterate id=item property=items
html:multibox property=selectedItems
bean:write name=item/
/html:multibox
bean:write name=item/
/logic:iterate

The html code in my case was produced by DreamWeaver and the checkboxes 
must go in table cells which are of irregular size, so I cannot just 
iterate over the items array. Do I need the selectedItems and items 
arrays? What's an alternate way of addressing the items array if I don't

use the logic:iterate tag that will still be palatable to Struts if not 
a ``best practice.'' If I don't use the JSP code above, will the proper 
array be populated by Struts?

BTW, I'm using Struts 1.02 on Tomcat 4.1.18. The people I'm working with

are not ready to move to a Struts 1.1 beta.

-- 
Charles H. Baker
[EMAIL PROTECTED]
http://www.charleshbaker.com/ http://www.charleshbaker.com/~chb/
Perl is designed to give you several ways to do anything, so consider
picking the most readable one.
  -- Larry Wall in the perl man page


-
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 : RE : Struts,Tiles Websphere

2003-02-04 Thread pelletiere
Maybe I have the same problem, I use websphere 5. How do you know you cannot
use plugins???
At the page http://www.lifl.fr/~dumoulin/tiles/ at the bottom of the page
you can download tiles.zip In the folder tiles\webapps
Theres a lot of exemple of blank configuration file to work with strut 1.0
and 1.1. It almost work for me. Maybe I have a plugins problem like you. 

Hope it will help you. 


-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:53
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


In fact we have to use Struts 1.0.2 to our project with Websphere 4, we
can't use plugin. With Tomcat the application works fine (Tiles and
definitions) but with websphere 4 it doesn't. Any solutions ?? :-)

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:44
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : RE : RE : Struts,Tiles  Websphere


Which version of struts do you use.
Download the last one in the nighly build

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:34
À : 'Struts Users Mailing List'
Objet : RE : RE : RE : RE : Struts,Tiles  Websphere


I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why -Message d'origine- De :
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have the
right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name
param-valuetrue/param-value
 /init-param
 init-param id=InitParam_5
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
 /init-param
 init-param id=InitParam_6
param-namedefinitions-debug/param-name
param-value1/param-value
 /init-param
 init-param id=InitParam_7

Re: Pager tag troubles

2003-02-04 Thread paul miller

http://jsptags.com/tags/navigation/pager/index.jsp
A wonderfull pager.

If you want the pager nav bar before your iterator you need to tell it the
size
(Its described in the pager docs) you could use the bean:size/ struts tag
I use a listInfo bean that hold the size and the name of the list.
My pager nav bar has
   %-- expost listInfo.name --%
   bean:define id=name name=listInfo property=name/
   Displaying %= name % %= firstItem %-%= lastItem % of %= totalItems %
Where name is something like USERS
But thats just eye candy

I'm cutting and pasting out of a working jsp, sorry if I miss something

%-- expose the listInfo.size --%
bean:define id=size name=listInfo property=size 
 type=java.lang.Integer / 

 pg:pager
items=%= size.intValue() %
index=center
maxPageItems=10
maxIndexPages=10
export=offset,currentPageNumber=pageNumber
url=/Foo.do
scope=request

  %-- keeps the pager on the correct page --%
  input type=hidden name=pager.offset value=%= offset %
  
  tr
td colspan=3 align=center
  jsp:include page=pagerNavBar.jsp flush=true/
/td
  /tr

   logic:iterate id=bar name=barList
 pg:item
   bean:write name=bar property=name /
 /pg:item
   /logic:iterate

  tr
td colspan=4 align=center
  jsp:include page=pagerNavBar.jsp flush=true/
/td
  /tr
/pg:pager

Nice and simple :)

I use links to go out of the pager, so I tack the pager.offset on the href url
and send the pager.offset back when returning to the pager.


--- Zoran Avtarovski [EMAIL PROTECTED] wrote:
 Hi,
 
 I've got a struts application which displays lists of information from a
 database.  I use a action class to retrieve and place the information into a
 Collection which I then return to a display jsp. Pretty standard stuff.
 
 In the jsp page I am using the iterate tag to display the collection.
 
 Everything works well, except that the pages were getting a little on the
 long side, so I though rather than writing pagination code from scratch I'd
 use James Klicman's pager tag which offered a quick and easy solution.
 
 I'm having problems getting the page to work with my page. I can get the
 example to run without a hitch, but that uses a for-next loop with some code
 on the page. Has anybody gotten the pager tag to work with an iterate tag
 and if so can you please send me some sample code.
 
 Or, am I better off writing some code into my action classes which pass an
 offset value, and some display parameters with each request?
 
 Any help would be greatly appreciated.
 
 Zoran 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE : RE : RE : Struts,Tiles Websphere

2003-02-04 Thread Risika RANDRIANASOLO
The documentation specifies it, anyway when I execute the application there
is an error message and the the log says that's plug-in can't be
recognize.
For me it's a configuration's problem with Websphere because with Tomcat
it's work

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 16:02
À : [EMAIL PROTECTED]
Objet : RE : RE : Struts,Tiles  Websphere


Maybe I have the same problem, I use websphere 5. How do you know you cannot
use plugins???
At the page http://www.lifl.fr/~dumoulin/tiles/ at the bottom of the page
you can download tiles.zip In the folder tiles\webapps
Theres a lot of exemple of blank configuration file to work with strut 1.0
and 1.1. It almost work for me. Maybe I have a plugins problem like you. 

Hope it will help you. 


-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:53
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


In fact we have to use Struts 1.0.2 to our project with Websphere 4, we
can't use plugin. With Tomcat the application works fine (Tiles and
definitions) but with websphere 4 it doesn't. Any solutions ?? :-)

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:44
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : RE : RE : Struts,Tiles  Websphere


Which version of struts do you use.
Download the last one in the nighly build

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 09:34
À : 'Struts Users Mailing List'
Objet : RE : RE : RE : RE : Struts,Tiles  Websphere


I've tried it but I have an xmlParserError : he doesn't recognize the marker
plug-in, I don't know why -Message d'origine- De :
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 15:23
À : [EMAIL PROTECTED]
Objet : RE : RE : RE : Struts,Tiles  Websphere


You need to declare a plugin in your struts-config.xml
See the documentation

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : 4 février, 2003 08:28
À : 'Struts Users Mailing List'
Objet : RE : RE : Struts,Tiles  Websphere


Struts and tiles work, but not the definitions (it's just for precision :-))

-Message d'origine-
De : Risika RANDRIANASOLO [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 14:26
À : 'Struts Users Mailing List'
Objet : RE : Struts,Tiles  Websphere


Hi,
In fact Struts works on my application, I can display pages using Struts
with a basic layout. But when I try to use definitions it doesn't work !! I
always  have  an error and I can't display any pages using Tiles
definitions. Here are my struts-config.xml and my web.xml...Did I forget
some marker or put some wrong parameters ? Or my websphere  doesn't have the
right configuration ? Thanks a lot for your answer :-)

Struts-config.xml :

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  form-beans
  
form-bean name=registerForm type=app.RegisterForm /
form-bean name=saisieForm type=appli.SaisieForm /

  /form-beans
  
  
  !-- == Global Forward Definitions  --
  !--
global-forwards type=org.apache.struts.action.ActionForward
forward   name=saisie path=defTest/
forward name=success  path=testForwardTiles/
/global-forwards
  --  
 
  action-mappings
  
actionpath=/saisie
   type=appli.SaisieAction
   name=saisieForm
   scope=request
  forward name=saisie path=/Welcome.jsp/
/action

actionpath=/confirm
   type=appli.ConfirmAction
   name=saisieForm
   scope=request
  
  forward name=saisie path=/enchainement_1.jsp/


action path=/forwardExampleAction
type=appli.ForwardTiles 
forward name=success  path=testForwardTiles/
/action
  
  /action-mappings


Web.xml :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app id=WebApp_1
  servlet id=Servlet_1
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class

 init-param id=InitParam_1
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param id=InitParam_2
param-namedebug/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_3
param-namedetail/param-name
param-value2/param-value
 /init-param
 init-param id=InitParam_4
param-namevalidate/param-name

[ANNOUNCE] Struts Console v3.2

2003-02-04 Thread James Holmes
Struts Console version 3.2 is now available.

http://www.jamesholmes.com/struts/

Download Now:
http://www.jamesholmes.com/struts/struts-console-3.2.zip
  -- OR --
http://www.jamesholmes.com/struts/struts-console-3.2.tar.gz

Struts Console is FREE software.

This release fixes some bugs and adds a few small
features.

Changes with Struts Console v3.2

  *) Fixed bug where Page and Forward Pattern were not
 being displayed on the Controller screen for
 Struts 1.1 config files.

  *) Fixed bug where Form Bean add dialog would throw
 exceptions if a type was not entered.

  *) Fixed bug where Resource checkbox was not being
 properly set for field elements in Validator
 config files.

  *) Fixed bug where Page Converter dialog was
 chopping off some of its tabs' contents.

  *) Fixed bug in Page Converter to properly convert
 img tags.

  *) Added support for new size attribute of
 form-property element.

  *) Added missing indexListProperty field for
 Validator config files.

  *) Added support for turning off config file
 validation in IDEA plugin.

  *) Removed Debug field from Controller screen for
 Struts 1.1 config files since it has been
 deprecated.

  *) Updated standalone version to preserve window
 size and location.


Thanks,

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Frameset parameters reused for frame src

2003-02-04 Thread Marc Guillemot
Hi,

I have a frameset and I want it to have a frame in it which URL has all
request parameters sent to the frameset (ie when the frameset is called with
?foo=25toto=48 these parameters should appear in the generated src
attribute of the frame tag).
My solution to do that is (with struts1.1b3):

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

html
frameset framespacing=0 border=0 rows=117,* frameborder=0
   html:frame page=/jsp/top.jsp frameName=Banner/
% pageContext.setAttribute(request, request); %
   html:frame action=displayMain frameName=Mainframe name=request
property=parameterMap/
/frameset
/html

This works fine but I wonder if there is a way to do it à la Struts
without the scriptlet.

Marc.




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




RE: sturts and tokens, avoid multiple submit example not working

2003-02-04 Thread Ashish Kulkarni
Hi,
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html
I just tried this example with struts1.1b2 , and it
did not work i got 4.0.4 error for saveRegistration.do

Has any one tested it with struts1.1b2


--- James Mitchell [EMAIL PROTECTED] wrote:
 

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html
 
 
 
 --
 James Mitchell
 Software Engineer/Struts Evangelist
 http://www.open-tools.org/
 
 The man who does not read good books has no
 advantage over the man who
 cannot read them.
   - Mark Twain (1835-1910)
 
 
 
 
 
 
 
  -Original Message-
  From: Ashish Kulkarni
 [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, February 03, 2003 6:21 PM
  To: [EMAIL PROTECTED]
  Subject: sturts and tokens, avoid multiple submit
  
  
  Hi,
  I want to avoid multiple submit of form, and i
  remmember i had long ago that some tokens can be
 used
  for it,
  I tried to search net but did not got much info,
  Does anyone has a code, or tutorial or some info
 about
  using tokens, and would like to shore would be
 highly
  appreicated,
  Also has anyone done like a Timer class in swing,
 to
  popup a window displaying work in progress message
  until process is over, and so avoid double
 submitting.
  
  
  
  =
  A$HI$H
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.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]
 


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




javax.servlet.ServletException

2003-02-04 Thread Eric Gignac
I try to run a simple example using struts and I have this error :  

javax.servlet.ServletException: Wrapper cannot find servlet class 
org.apache.struts.action.ActionServlet or a class it depends on

I think everything is right in my web.xml !   Please help !





RE: javax.servlet.ServletException

2003-02-04 Thread Pani, Gourav
Eric,

If you want help in this forum you will have to be a bit more specific.  For
example, you need to send us your web.xml, struts-config.xml and snippet of
code for anyone to help you out.



-Original Message-
From: Eric Gignac [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 11:58 AM
To: Struts Users Mailing List
Subject: javax.servlet.ServletException


I try to run a simple example using struts and I have this error :  

javax.servlet.ServletException: Wrapper cannot find servlet class
org.apache.struts.action.ActionServlet or a class it depends on

I think everything is right in my web.xml !   Please help !



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




Re: javax.servlet.ServletException

2003-02-04 Thread EG
Here the web.xml ane struts-config.xml

web-app

  !-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  /servlet

  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  !-- The Welcome File List --
  welcome-file-list
welcome-filelogin.jsp/welcome-file
  /welcome-file-list

/web-app

here the loginAction class

package com.javapro.struts;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public final class LoginAction extends Action {
  public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException {

String userName = request.getParameter(userName);
String password = request.getParameter(password);
if (userName!=null  password!=null 
  userName.equals(eric)  password.equals(eric)) {
  HttpSession session = request.getSession();
  session.setAttribute(loggedIn, 1);
  RequestDispatcher rd = request.getRequestDispatcher(/mainMenu.jsp);
  rd.forward(request, response);
}
else {
  RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
  rd.forward(request, response);
}
return null;
  }
}

struts-config
  action-mappings
action path=/login type=com.javapro.struts.LoginAction/
action path=/logout type=com.javapro.struts.LogoutAction/
action path=/viewSecret type=com.javapro.struts.ViewSecretAction/
  /action-mappings
/struts-config


Thanks


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




Can anyone help me out with this

2003-02-04 Thread jmattucci

This is driving me crazy. Originally in my index.jsp I had logic:forward
name=welcome/
and the page was never forwarded to welcome.do. I changed my tag to
logic:redirect name=welcome/
and the page was sent to welcome.do, but the page was blank. In my console
window I get
the message RequestProcessor-Processing a GET for path /welcome and no
other errors.
If I try the same web app in Netscape I get an error window with the
message The document contained no data What am I missing or doing wrong?


struts-config
!-- === Global Forward Definitions --

global-forwards
forward
name=welcome
path=/welcome.do/
/global-forwards

!-- === Action Mapping Definitions --

action-mappings
   action
path=/welcome
type=binary.solutions.BinaryAction/
/action-mappings

/struts-config
---




%@ taglib uri=/tags/struts-logic prefix=logic %
logic:forward name=welcome/

%--

Redirect default requests to Welcome action.

--%


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




*

This message is intended for the use of the individual or entity to which
it is addressed and may contain information that is confidential and
privileged and exempt from disclosure under applicable law.  If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please contact the sender immediately and delete it from your system.
Thank you
*



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




Can anyone help me out with this

2003-02-04 Thread jmattucci

This is driving me crazy. Originally in my index.jsp I had logic:forward
name=welcome/
and the page was never forwarded to welcome.do. I changed my tag to
logic:redirect name=welcome/
and the page was sent to welcome.do, but the page was blank. In my console
window I get
the message RequestProcessor-Processing a GET for path /welcome and no
other errors.
If I try the same web app in Netscape I get an error window with the
message The document contained no data What am I missing or doing wrong?


struts-config
!-- === Global Forward Definitions --

global-forwards
forward
name=welcome
path=/welcome.do/
/global-forwards

!-- === Action Mapping Definitions --

action-mappings
   action
path=/welcome
type=binary.solutions.BinaryAction/
/action-mappings

/struts-config
---




%@ taglib uri=/tags/struts-logic prefix=logic %
logic:forward name=welcome/

%--

Redirect default requests to Welcome action.

--%


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





*

This message is intended for the use of the individual or entity to which
it is addressed and may contain information that is confidential and
privileged and exempt from disclosure under applicable law.  If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please contact the sender immediately and delete it from your system.
Thank you
*



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




RE: Can anyone help me out with this

2003-02-04 Thread Jarnot Voytek Contr AU HQ/SC
what does binary.solutions.BinaryAction do?  post the code.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:08 AM
 To: Struts Users Mailing List
 Subject: Can anyone help me out with this
 
 
 
 This is driving me crazy. Originally in my index.jsp I had 
 logic:forward
 name=welcome/
 and the page was never forwarded to welcome.do. I changed my tag to
 logic:redirect name=welcome/
 and the page was sent to welcome.do, but the page was blank. 
 In my console
 window I get
 the message RequestProcessor-Processing a GET for path /welcome and no
 other errors.
 If I try the same web app in Netscape I get an error window with the
 message The document contained no data What am I missing or 
 doing wrong?
 
 
 struts-config
 !-- === Global Forward 
 Definitions --
 
 global-forwards
 forward
 name=welcome
 path=/welcome.do/
 /global-forwards
 
 !-- === Action Mapping 
 Definitions --
 
 action-mappings
action
 path=/welcome
 type=binary.solutions.BinaryAction/
 /action-mappings
 
 /struts-config
 --
 -
 
 
 
 
 %@ taglib uri=/tags/struts-logic prefix=logic %
 logic:forward name=welcome/
 
 %--
 
 Redirect default requests to Welcome action.
 
 --%
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 **
 **
 *
 
 This message is intended for the use of the individual or 
 entity to which
 it is addressed and may contain information that is confidential and
 privileged and exempt from disclosure under applicable law.  
 If the reader
 of this message is not the intended recipient, you are hereby 
 notified that
 any dissemination, distribution, or copying of this communication is
 strictly prohibited.  If you have received this communication 
 in error,
 please contact the sender immediately and delete it from your system.
 Thank you
 **
 **
 *
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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




struts-tiles-definitions wsad 5

2003-02-04 Thread pelletiere
Hi,
Did someone is able to use tiles definitions with websphere studio
application developper 5.0
 
Thank



RE : struts-tiles-definitions wsa4

2003-02-04 Thread Risika RANDRIANASOLO
Same question but with websphere server application 4 and struts 1.0.2 :-)
Thanks

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 4 février 2003 18:13
À : [EMAIL PROTECTED]
Objet : struts-tiles-definitions wsad 5


Hi,
Did someone is able to use tiles definitions with websphere studio
application developper 5.0
 
Thank


--
Ce message est confidentiel. Son contenu ne represente en aucun cas un
engagement de la part de Softcomputing sous reserve de tout accord conclu
par ecrit entre vous et Softcomputing. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes
pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.

This message is confidential. Its content does not constitute a commitment
by Softcomputing except where provided for in a written agreement between
you and Softcomputing. Any unauthorised disclosure, use or dissemination,
either whole or partial, is prohibited. If you are not the intended
recipient of this message, please notify the sender immediately.
--





Re: Multiple struts-config files without Modules

2003-02-04 Thread Craig R. McClanahan


On Tue, 4 Feb 2003, Malik Recoing wrote:


 And may we use a list of struts-config in combination with a multi-modules
 config ?
 Like that :

 servlet
  servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config-common.xml,
 /WEB-INF/struts-config-global.xml/param-value
   /init-param
   init-param
 param-nameconfig/market/param-name
 param-value/WEB-INF/struts-config-common.xml,
 /WEB-INF/struts-config-market.xml/param-value
   /init-param
   load-on-startup1/load-on-startup
 /servlet


Yes, you can do this, but what really happens is the set of files for each
module is merged only within that module.

 Is it dumb ? Or may it be an advance of the feature promised in 1.2 that
 will allow inheritence of configs ?

Multiple files per module is useful even without inheritance, and that's
what you get in 1.1.

Craig

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




RE: javax.servlet.ServletException

2003-02-04 Thread Ravi Kora
Your  action entries in struts-config do not have any form beans
associated with them. If that is the case, no form beans will be created
for those actions. This means that 'form' parameter in execute() method
is null. I am not very sure if this is the problem though!
Hope this works.

Regards,
Ravi Kora
[EMAIL PROTECTED]
301-869-3299(H)
337-739-3434(M)


-Original Message-
From: EG [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 04, 2003 12:06 PM
To: Struts Users Mailing List
Subject: Re: javax.servlet.ServletException


Here the web.xml ane struts-config.xml

web-app

  !-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  /servlet

  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  !-- The Welcome File List --
  welcome-file-list
welcome-filelogin.jsp/welcome-file
  /welcome-file-list

/web-app

here the loginAction class

package com.javapro.struts;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public final class LoginAction extends Action {
  public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException {

String userName = request.getParameter(userName);
String password = request.getParameter(password);
if (userName!=null  password!=null 
  userName.equals(eric)  password.equals(eric)) {
  HttpSession session = request.getSession();
  session.setAttribute(loggedIn, 1);
  RequestDispatcher rd =
request.getRequestDispatcher(/mainMenu.jsp);
  rd.forward(request, response);
}
else {
  RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
  rd.forward(request, response);
}
return null;
  }
}

struts-config
  action-mappings
action path=/login type=com.javapro.struts.LoginAction/
action path=/logout type=com.javapro.struts.LogoutAction/
action path=/viewSecret
type=com.javapro.struts.ViewSecretAction/
  /action-mappings
/struts-config


Thanks


-
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: Can anyone help me out with this

2003-02-04 Thread jmattucci

package binary.solutions;

import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;

public final class BinaryAction extends Action
{
  public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest
request, HttpServletResponse response) throws Exception
  {
 HitModel hm = new HitModel();
 hm.incrementHit();

 request.setAttribute(Constants.HIT_KEY, hm);
 //forward control to the specied URI
 return (mapping.findForward(Welcome));
  }
}


package binary.solutions;

import java.sql.*;

public final class HitModel
{
   private Connection conn;  public HitModel()
   {
try
{
  Class.forName(com.mysql.jdbc.Driver).newInstance();
  conn = DriverManager.getConnection
(jdbc:mysql://localhost/hittable);
}
catch(Exception exception)
  {

}
   }public synchronized void incrementHit()
{
  try
  {
Statement stmt = conn.createStatement();
  ResultSet rs = stmt.executeQuery(SELECT * FROM HITTABLE);

  rs.next();
  int hitCounter = rs.getInt(HIT);

  stmt.executeQuery(UPDATE HITTABLE SET HIT = +
String.valueOf(hitCounter));
  }
  catch(Exception e)
  {
e.printStackTrace();
  }

}

}


   
  
  Jarnot Voytek Contr  
  
  AU HQ/SC   To:   'Struts Users Mailing 
List' 
  Voytek.Jarnot@MAXW [EMAIL PROTECTED] 
  
  ELL.AF.MILcc:   
  
 Subject:  RE: Can anyone help me out 
with this  
  02/04/2003 12:15 PM  
  
  Please respond to
  
  Struts Users
  
  Mailing List
  
   
  
   
  




what does binary.solutions.BinaryAction do?  post the code.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:08 AM
 To: Struts Users Mailing List
 Subject: Can anyone help me out with this



 This is driving me crazy. Originally in my index.jsp I had
 logic:forward
 name=welcome/
 and the page was never forwarded to welcome.do. I changed my tag to
 logic:redirect name=welcome/
 and the page was sent to welcome.do, but the page was blank.
 In my console
 window I get
 the message RequestProcessor-Processing a GET for path /welcome and no
 other errors.
 If I try the same web app in Netscape I get an error window with the
 message The document contained no data What am I missing or
 doing wrong?


 struts-config
 !-- === Global Forward
 Definitions --

 global-forwards
 forward
 name=welcome
 path=/welcome.do/
 /global-forwards

 !-- === Action Mapping
 Definitions --

 action-mappings
action
 path=/welcome
 type=binary.solutions.BinaryAction/
 /action-mappings

 /struts-config
 --
 -




 %@ taglib uri=/tags/struts-logic prefix=logic %
 logic:forward name=welcome/

 %--

 Redirect default requests to Welcome action.

 --%


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




 **
 **
 *

 This message is intended for the use of the individual or
 entity to which
 it is addressed and may contain information that is confidential and
 privileged and exempt from disclosure under applicable law.
 If the reader
 of this message is not the intended recipient, you are hereby
 notified that
 any dissemination, distribution, or copying of this communication is
 strictly 

RE: Can anyone help me out with this

2003-02-04 Thread Jarnot Voytek Contr AU HQ/SC
you're returning mapping.findForward(Welcome) but there is no forward
named Welcome.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:33 AM
 To: Struts Users Mailing List
 Subject: RE: Can anyone help me out with this
 
 
 
 package binary.solutions;
 
 import javax.servlet.*;
 import javax.servlet.http.*;
 import org.apache.struts.action.*;
 
 public final class BinaryAction extends Action
 {
   public ActionForward execute(ActionMapping mapping, 
 ActionForm form,
 HttpServletRequest
 request, HttpServletResponse response) throws Exception
   {
  HitModel hm = new HitModel();
  hm.incrementHit();
 
  request.setAttribute(Constants.HIT_KEY, hm);
  //forward control to the specied URI
  return (mapping.findForward(Welcome));
   }
 }
 
 
 package binary.solutions;
 
 import java.sql.*;
 
 public final class HitModel
 {
private Connection conn;  public HitModel()
{
 try
 {
   Class.forName(com.mysql.jdbc.Driver).newInstance();
   conn = DriverManager.getConnection
 (jdbc:mysql://localhost/hittable);
 }
 catch(Exception exception)
   {
 
 }
}public synchronized void incrementHit()
 {
   try
   {
 Statement stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery(SELECT * FROM HITTABLE);
 
   rs.next();
   int hitCounter = rs.getInt(HIT);
 
   stmt.executeQuery(UPDATE HITTABLE SET HIT = +
 String.valueOf(hitCounter));
   }
   catch(Exception e)
   {
 e.printStackTrace();
   }
 
 }
 
 }
 
 
   

   Jarnot Voytek Contr 

   AU HQ/SC   To:   
 'Struts Users Mailing List' 
   Voytek.Jarnot@MAXW 
 [EMAIL PROTECTED]   
   ELL.AF.MILcc:  

  Subject:  
 RE: Can anyone help me out with this  
   02/04/2003 12:15 PM 

   Please respond to   

   Struts Users   

   Mailing List   

   

   

 
 
 
 
 what does binary.solutions.BinaryAction do?  post the code.
 
 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 04, 2003 11:08 AM
  To: Struts Users Mailing List
  Subject: Can anyone help me out with this
 
 
 
  This is driving me crazy. Originally in my index.jsp I had
  logic:forward
  name=welcome/
  and the page was never forwarded to welcome.do. I changed my tag to
  logic:redirect name=welcome/
  and the page was sent to welcome.do, but the page was blank.
  In my console
  window I get
  the message RequestProcessor-Processing a GET for path 
 /welcome and no
  other errors.
  If I try the same web app in Netscape I get an error window with the
  message The document contained no data What am I missing or
  doing wrong?
 
 
  struts-config
  !-- === Global Forward
  Definitions --
 
  global-forwards
  forward
  name=welcome
  path=/welcome.do/
  /global-forwards
 
  !-- === Action Mapping
  Definitions --
 
  action-mappings
 action
  path=/welcome
  type=binary.solutions.BinaryAction/
  /action-mappings
 
  /struts-config
  --
  -
 
 
 
 
  %@ taglib uri=/tags/struts-logic prefix=logic %
  logic:forward name=welcome/
 
  %--
 
  Redirect default requests to Welcome action.
 
  --%
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  

RE: javax.servlet.ServletException

2003-02-04 Thread Pani, Gourav
Eric, 

It doesn't appear as if you are utilizing some of the simple Struts
capabilities that would make things a lot easier.  

As far as the mapping goes, you should try the following in the
struts-config.xml.

struts-config
  action-mappings
action path=/login name=Login type=com.javapro.struts.LoginAction
scope=request validate=true input=login.jsp
  forward name=success path=/jsp/main/welcome.jsp /
/action
  /action-mappings
/struts-config


the input would be the path to the JSP that is being used to enter
information and posting to your Action class.  you should also have a form
object to hold the username and password instead of getting it from your
request.  

in the action class you can do the following:

 return mapping.findForward(success);

instead of using the request dispatcher.


you might want to consult sample applications available online.

-Original Message-
From: EG [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 12:06 PM
To: Struts Users Mailing List
Subject: Re: javax.servlet.ServletException


Here the web.xml ane struts-config.xml

web-app

  !-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  /servlet

  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  !-- The Welcome File List --
  welcome-file-list
welcome-filelogin.jsp/welcome-file
  /welcome-file-list

/web-app

here the loginAction class

package com.javapro.struts;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public final class LoginAction extends Action {
  public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException {

String userName = request.getParameter(userName);
String password = request.getParameter(password);
if (userName!=null  password!=null 
  userName.equals(eric)  password.equals(eric)) {
  HttpSession session = request.getSession();
  session.setAttribute(loggedIn, 1);
  RequestDispatcher rd = request.getRequestDispatcher(/mainMenu.jsp);
  rd.forward(request, response);
}
else {
  RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
  rd.forward(request, response);
}
return null;
  }
}

struts-config
  action-mappings
action path=/login type=com.javapro.struts.LoginAction/
action path=/logout type=com.javapro.struts.LogoutAction/
action path=/viewSecret type=com.javapro.struts.ViewSecretAction/
  /action-mappings
/struts-config


Thanks


-
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: Obtaining valid ModuleConfig.

2003-02-04 Thread Zheng, Gang
Hi,

I just subscribe to the mailing list and this is exactly what I got from the
example code.

The ModuleConfig is actually stored in the ServletContext (application
context) rather than request context. So you have to modify the code to:

ModuleConfig config = (ModuleConfig) pageContext.getServletContext()
.getAttribute(org.apache.struts.Globals.MODULE_KEY);

I tested it and it works.

Hope this is helpful.

-Gang


--
Hi,

I'm using the following snippet in taglib code but it fails as config==null.
(Stuts 1.1 b3)

public int doEndTag() throws JspException {
snip
ModuleConfig config = (ModuleConfig) pageContext.getRequest()
.getAttribute(org.apache.struts.Globals.MODULE_KEY);
if (config == null) {
System.out.println(config == null);
}
if (config.getPrefix() == null) {
System.out.println(config.getPrefix() == null);
}
try {
pageContext.forward(config.getPrefix() + page);
} catch (Exception e) {
throw new JspException(e.toString());
}
return (SKIP_PAGE);
}

The code is based on the example that comes with struts. I presume I'm
missing something obvious but I'm new to Struts and can't track it down.
Could someone give me some pointers before I tear all my hair out ;-)

Regards

/James




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




RE: Can anyone help me out with this

2003-02-04 Thread jmattucci

So if I changed my global forward name = welcome to name = Welcome
it should work? Sorry I think I tried that already



   
  
  Jarnot Voytek Contr  
  
  AU HQ/SC   To:   'Struts Users Mailing 
List' 
  Voytek.Jarnot@MAXW [EMAIL PROTECTED] 
  
  ELL.AF.MILcc:   
  
 Subject:  RE: Can anyone help me out 
with this  
  02/04/2003 12:36 PM  
  
  Please respond to
  
  Struts Users
  
  Mailing List
  
   
  
   
  




you're returning mapping.findForward(Welcome) but there is no forward
named Welcome.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:33 AM
 To: Struts Users Mailing List
 Subject: RE: Can anyone help me out with this



 package binary.solutions;

 import javax.servlet.*;
 import javax.servlet.http.*;
 import org.apache.struts.action.*;

 public final class BinaryAction extends Action
 {
   public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest
 request, HttpServletResponse response) throws Exception
   {
  HitModel hm = new HitModel();
  hm.incrementHit();

  request.setAttribute(Constants.HIT_KEY, hm);
  //forward control to the specied URI
  return (mapping.findForward(Welcome));
   }
 }


 package binary.solutions;

 import java.sql.*;

 public final class HitModel
 {
private Connection conn;  public HitModel()
{
 try
 {
   Class.forName(com.mysql.jdbc.Driver).newInstance();
   conn = DriverManager.getConnection
 (jdbc:mysql://localhost/hittable);
 }
 catch(Exception exception)
   {

 }
}public synchronized void incrementHit()
 {
   try
   {
 Statement stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery(SELECT * FROM HITTABLE);

   rs.next();
   int hitCounter = rs.getInt(HIT);

   stmt.executeQuery(UPDATE HITTABLE SET HIT = +
 String.valueOf(hitCounter));
   }
   catch(Exception e)
   {
 e.printStackTrace();
   }

 }

 }




   Jarnot Voytek Contr

   AU HQ/SC   To:
 'Struts Users Mailing List'
   Voytek.Jarnot@MAXW
 [EMAIL PROTECTED]
   ELL.AF.MILcc:

  Subject:
 RE: Can anyone help me out with this
   02/04/2003 12:15 PM

   Please respond to

   Struts Users

   Mailing List









 what does binary.solutions.BinaryAction do?  post the code.

 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 04, 2003 11:08 AM
  To: Struts Users Mailing List
  Subject: Can anyone help me out with this
 
 
 
  This is driving me crazy. Originally in my index.jsp I had
  logic:forward
  name=welcome/
  and the page was never forwarded to welcome.do. I changed my tag to
  logic:redirect name=welcome/
  and the page was sent to welcome.do, but the page was blank.
  In my console
  window I get
  the message RequestProcessor-Processing a GET for path
 /welcome and no
  other errors.
  If I try the same web app in Netscape I get an error window with the
  message The document contained no data What am I missing or
  doing wrong?
 
 
  struts-config
  !-- === Global Forward
  Definitions --
 
  global-forwards
  forward
  name=welcome
  path=/welcome.do/
  /global-forwards
 
  !-- === Action Mapping
  Definitions --
 
  action-mappings
 action
  path=/welcome
  

RE: Can anyone help me out with this

2003-02-04 Thread Jarnot Voytek Contr AU HQ/SC
I think you're missing the point of how this all works.  Here's what I
understand to be the theory behind what you're trying to achieve:

index.jsp [forwards to] BinaryAction [forwards to] 

the question marks are where you're getting lost.  Typically your action
definition would look like this:

action path=/welcome type=binary.solutions.BinaryAction
forward name= path=/hello.jsp/
/action

So from your action you would return a findForward(...) which points to a
jsp which is a forward local to that particular action (in most cases, and I
assume this is what you're after).

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:46 AM
 To: Struts Users Mailing List
 Subject: RE: Can anyone help me out with this
 
 
 
 So if I changed my global forward name = welcome to name = Welcome
 it should work? Sorry I think I tried that already
 
 
 
   

   Jarnot Voytek Contr 

   AU HQ/SC   To:   
 'Struts Users Mailing List' 
   Voytek.Jarnot@MAXW 
 [EMAIL PROTECTED]   
   ELL.AF.MILcc:  

  Subject:  
 RE: Can anyone help me out with this  
   02/04/2003 12:36 PM 

   Please respond to   

   Struts Users   

   Mailing List   

   

   

 
 
 
 
 you're returning mapping.findForward(Welcome) but there is 
 no forward
 named Welcome.
 
 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 04, 2003 11:33 AM
  To: Struts Users Mailing List
  Subject: RE: Can anyone help me out with this
 
 
 
  package binary.solutions;
 
  import javax.servlet.*;
  import javax.servlet.http.*;
  import org.apache.struts.action.*;
 
  public final class BinaryAction extends Action
  {
public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest
  request, HttpServletResponse response) throws Exception
{
   HitModel hm = new HitModel();
   hm.incrementHit();
 
   request.setAttribute(Constants.HIT_KEY, hm);
   //forward control to the specied URI
   return (mapping.findForward(Welcome));
}
  }
 
 
  package binary.solutions;
 
  import java.sql.*;
 
  public final class HitModel
  {
 private Connection conn;  public HitModel()
 {
  try
  {
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection
  (jdbc:mysql://localhost/hittable);
  }
  catch(Exception exception)
{
 
  }
 }public synchronized void incrementHit()
  {
try
{
  Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(SELECT * FROM 
 HITTABLE);
 
rs.next();
int hitCounter = rs.getInt(HIT);
 
stmt.executeQuery(UPDATE HITTABLE SET HIT = +
  String.valueOf(hitCounter));
}
catch(Exception e)
{
  e.printStackTrace();
}
 
  }
 
  }
 
 
 
 
Jarnot Voytek Contr
 
AU HQ/SC   To:
  'Struts Users Mailing List'
Voytek.Jarnot@MAXW
  [EMAIL PROTECTED]
ELL.AF.MILcc:
 
   Subject:
  RE: Can anyone help me out with this
02/04/2003 12:15 PM
 
Please respond to
 
Struts Users
 
Mailing List
 
 
 
 
 
 
 
 
 
  what does binary.solutions.BinaryAction do?  post the code.
 
  --
  Voytek Jarnot
  Quidquid latine dictum sit, altum viditur.
 
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 

RE: Can anyone help me out with this

2003-02-04 Thread jmattucci

thank you so much. You have cleared things up.



   
  
  Jarnot Voytek Contr  
  
  AU HQ/SC   To:   'Struts Users Mailing 
List' 
  Voytek.Jarnot@MAXW [EMAIL PROTECTED] 
  
  ELL.AF.MILcc:   
  
 Subject:  RE: Can anyone help me out 
with this  
  02/04/2003 12:51 PM  
  
  Please respond to
  
  Struts Users
  
  Mailing List
  
   
  
   
  




I think you're missing the point of how this all works.  Here's what I
understand to be the theory behind what you're trying to achieve:

 index.jsp [forwards to] BinaryAction [forwards to] 

the question marks are where you're getting lost.  Typically your action
definition would look like this:

action path=/welcome type=binary.solutions.BinaryAction
 forward name= path=/hello.jsp/
/action

So from your action you would return a findForward(...) which points to a
jsp which is a forward local to that particular action (in most cases, and
I
assume this is what you're after).

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 11:46 AM
 To: Struts Users Mailing List
 Subject: RE: Can anyone help me out with this



 So if I changed my global forward name = welcome to name = Welcome
 it should work? Sorry I think I tried that already





   Jarnot Voytek Contr

   AU HQ/SC   To:
 'Struts Users Mailing List'
   Voytek.Jarnot@MAXW
 [EMAIL PROTECTED]
   ELL.AF.MILcc:

  Subject:
 RE: Can anyone help me out with this
   02/04/2003 12:36 PM

   Please respond to

   Struts Users

   Mailing List









 you're returning mapping.findForward(Welcome) but there is
 no forward
 named Welcome.

 --
 Voytek Jarnot
 Quidquid latine dictum sit, altum viditur.


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 04, 2003 11:33 AM
  To: Struts Users Mailing List
  Subject: RE: Can anyone help me out with this
 
 
 
  package binary.solutions;
 
  import javax.servlet.*;
  import javax.servlet.http.*;
  import org.apache.struts.action.*;
 
  public final class BinaryAction extends Action
  {
public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest
  request, HttpServletResponse response) throws Exception
{
   HitModel hm = new HitModel();
   hm.incrementHit();
 
   request.setAttribute(Constants.HIT_KEY, hm);
   //forward control to the specied URI
   return (mapping.findForward(Welcome));
}
  }
 
 
  package binary.solutions;
 
  import java.sql.*;
 
  public final class HitModel
  {
 private Connection conn;  public HitModel()
 {
  try
  {
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection
  (jdbc:mysql://localhost/hittable);
  }
  catch(Exception exception)
{
 
  }
 }public synchronized void incrementHit()
  {
try
{
  Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(SELECT * FROM
 HITTABLE);
 
rs.next();
int hitCounter = rs.getInt(HIT);
 
stmt.executeQuery(UPDATE HITTABLE SET HIT = +
  String.valueOf(hitCounter));
}
catch(Exception e)
{
  e.printStackTrace();
}
 
  }
 
  }
 
 
 
 
Jarnot Voytek Contr
 
AU HQ/SC   To:
  'Struts Users Mailing List'
Voytek.Jarnot@MAXW
  [EMAIL PROTECTED]
ELL.AF.MIL

module-specific validation?

2003-02-04 Thread Thomas L Roche
Can each module in a 1.1 app have its own validator configuration
(validation.xml and validator-rules.xml)? Or can those only be
specified in the default module?


Re: javax.servlet.ServletException

2003-02-04 Thread EG
Thank for the advices !


- Original Message -
From: Pani, Gourav [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 12:39 PM
Subject: RE: javax.servlet.ServletException


 Eric,

 It doesn't appear as if you are utilizing some of the simple Struts
 capabilities that would make things a lot easier.

 As far as the mapping goes, you should try the following in the
 struts-config.xml.

 struts-config
   action-mappings
 action path=/login name=Login
type=com.javapro.struts.LoginAction
 scope=request validate=true input=login.jsp
   forward name=success path=/jsp/main/welcome.jsp /
 /action
   /action-mappings
 /struts-config


 the input would be the path to the JSP that is being used to enter
 information and posting to your Action class.  you should also have a form
 object to hold the username and password instead of getting it from your
 request.

 in the action class you can do the following:

  return mapping.findForward(success);

 instead of using the request dispatcher.


 you might want to consult sample applications available online.

 -Original Message-
 From: EG [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 12:06 PM
 To: Struts Users Mailing List
 Subject: Re: javax.servlet.ServletException


 Here the web.xml ane struts-config.xml

 web-app

   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   /servlet

   !-- Action Servlet Mapping --
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping

   !-- The Welcome File List --
   welcome-file-list
 welcome-filelogin.jsp/welcome-file
   /welcome-file-list

 /web-app

 here the loginAction class

 package com.javapro.struts;

 import java.io.IOException;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;

 public final class LoginAction extends Action {
   public ActionForward execute(ActionMapping mapping,
 ActionForm form, HttpServletRequest request, HttpServletResponse
 response)
 throws IOException, ServletException {

 String userName = request.getParameter(userName);
 String password = request.getParameter(password);
 if (userName!=null  password!=null 
   userName.equals(eric)  password.equals(eric)) {
   HttpSession session = request.getSession();
   session.setAttribute(loggedIn, 1);
   RequestDispatcher rd =
request.getRequestDispatcher(/mainMenu.jsp);
   rd.forward(request, response);
 }
 else {
   RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
   rd.forward(request, response);
 }
 return null;
   }
 }

 struts-config
   action-mappings
 action path=/login type=com.javapro.struts.LoginAction/
 action path=/logout type=com.javapro.struts.LogoutAction/
 action path=/viewSecret
type=com.javapro.struts.ViewSecretAction/
   /action-mappings
 /struts-config


 Thanks


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




Where should database select go for select dropdown

2003-02-04 Thread Huw Jones
Sorry if this is trivial - but I'm new to the framework and I'm finding the
documentation confusing.
Just want to create an html select object with options set to the contents
of a database table - i.e. visualise
a  lookup table. So when the form is first displayed the dropdown appears
with data from a database table.
I'm confused where the database access should go - in the JSP or the
FormBean. Is there an example which
someone could point me to

Thanks




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




Input form performance / scalability

2003-02-04 Thread Rick Lively
I'm having a problem with performance of a JSP page. It iterates over a 
class of beans and has several
form fields for each row. The submit action updates the beans. After having 
had some substantial
degradation of performance, I did some preliminary investigation and found 
that the hang-up seems
to be after the form submission but before the execute method of the Action 
class is called. I'm
wondering if I'm running into some limitations, as referenced in 
Programming Jakarta Struts, for
example, on the number of custom tags on a form, or memory problems due to 
session scoping.
The performance is definitely a function of the number of rows.

Just interested if anyone else has had similar experiences...and if the 
solution is to just limit the number
of elements / page.

Rick


Rick Lively
ProductSoft, Inc.
Wexford, PA
[EMAIL PROTECTED] 


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



Re: strange error (beanutils? config?)

2003-02-04 Thread Ivar Vasara

Yes, everything has been recompiled. I just did another clean and build to quadruple 
check and the problem still exists, and I'm still stumped. :(

Did you recompile all your app classes against the new struts.jar files?
It is not good enough to just replace the JARs.

We've recently moved from Struts 1.01 to 1.1b3 and it seems things were working 
well, but some form submissions result in the following error:
500 Servlet Exception 
java.lang.IllegalArgumentException: No bean specified 
at 
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837)
 
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:849) 
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) 
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) 
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779) 
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) 

I'm not sure what to make of this.. none of my code actually gets touched, and as 
far as I can tell the parts of my app that work correctly are configured the 
same as the part that breaks. Any ideas/hints/suggestions ?


___
Ivar Vasara
Java Developer
http://zed.cbc.ca
(604) 662-6631
Canadian Broadcasting Corporation
(604) 662-6631


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




RE: Where should database select go for select dropdown

2003-02-04 Thread shirishchandra . sakhare
I think what u need is a good primer on MVC architecture...
Search on google..U will find plenty..Or more specifically go to suns site and 
u will find the information...

Then struts doc will be easy to follow..

-Original Message-
From: jadestone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:22 PM
To: struts-user
Cc: jadestone
Subject: Where should database select go for select dropdown


Sorry if this is trivial - but I'm new to the framework and I'm finding the
documentation confusing.
Just want to create an html select object with options set to the contents
of a database table - i.e. visualise
a  lookup table. So when the form is first displayed the dropdown appears
with data from a database table.
I'm confused where the database access should go - in the JSP or the
FormBean. Is there an example which
someone could point me to

Thanks




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




Tiles setup help!

2003-02-04 Thread Jackson, Stephen
I am trying to get tiles set up and having lots of issues trying to do so.
(Struts 1.1b3  tomcat 4.1.12)

My tiles-defs.xml file looks like the following ***
tiles-definitions
!-- The default layout for the web interface -- 
definition name=rpcinterface.default
path=/layouts/RpcInterfaceLayout.jsp
put name=header value=/html/header.html/
put name=leftnav value=/jsp/LeftNav.jsp/
put name=footer value=/html/footer.html/
/definition

!-- The wait page layout for requests --
definition name=wait.default path=/layouts/WaitPageLayout.jsp
put name=linktag value=/html/indexlinkref.html /
put name=header value=/html/header.html/
put name=footer value=/html/footer.html/
/definition

/tiles-definitions

Tiles info in struts.config.xml **
!-- Tiles PlugIn definition--
plug-in className=org.apache.struts.tiles.TilesPlugin
set-property property=definitions-config
value=/WEB-INF/conf/tiles-defs.xml/
set-property property=definitions-parser-validate
value=true/
set-property property=definitions-parser-details
value=2/
set-property property=definitions-debug value=2/
/plug-in

I have a log4j.properties in WEB-INF/classes and it has the following info
log4j.category.org.apache.struts.tiles=DEBUG

I am not getting any output from log4j.  
What would the file be called and where would it reside if it was there?


* jsp error
java.lang.NullPointerException
at
org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java:528)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:487
)
at
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:445)
at
org.apache.jsp.index_jsp._jspx_meth_tiles_insert_0(index_jsp.java:78)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain

I was trying to get log4j to tell me something but I don't know what I am
doing wrong to get it set up.

Any assistance would be great.

Thanks in advance,

Stephen Jackson







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




Re: Where should database select go for select dropdown

2003-02-04 Thread Eric C. Hein
In yourAction class.

- Original Message -
From: Huw Jones [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 10:22 AM
Subject: Where should database select go for select dropdown


 Sorry if this is trivial - but I'm new to the framework and I'm finding
the
 documentation confusing.
 Just want to create an html select object with options set to the contents
 of a database table - i.e. visualise
 a  lookup table. So when the form is first displayed the dropdown appears
 with data from a database table.
 I'm confused where the database access should go - in the JSP or the
 FormBean. Is there an example which
 someone could point me to

 Thanks




 -
 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: javax.servlet.ServletException

2003-02-04 Thread EG
Do you have any link where  sample applications are available ?

Thank



From: Pani, Gourav [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 12:39 PM
Subject: RE: javax.servlet.ServletException


 Eric,

 It doesn't appear as if you are utilizing some of the simple Struts
 capabilities that would make things a lot easier.

 As far as the mapping goes, you should try the following in the
 struts-config.xml.

 struts-config
   action-mappings
 action path=/login name=Login
type=com.javapro.struts.LoginAction
 scope=request validate=true input=login.jsp
   forward name=success path=/jsp/main/welcome.jsp /
 /action
   /action-mappings
 /struts-config


 the input would be the path to the JSP that is being used to enter
 information and posting to your Action class.  you should also have a form
 object to hold the username and password instead of getting it from your
 request.

 in the action class you can do the following:

  return mapping.findForward(success);

 instead of using the request dispatcher.


 you might want to consult sample applications available online.

 -Original Message-
 From: EG [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 12:06 PM
 To: Struts Users Mailing List
 Subject: Re: javax.servlet.ServletException


 Here the web.xml ane struts-config.xml

 web-app

   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   /servlet

   !-- Action Servlet Mapping --
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping

   !-- The Welcome File List --
   welcome-file-list
 welcome-filelogin.jsp/welcome-file
   /welcome-file-list

 /web-app

 here the loginAction class

 package com.javapro.struts;

 import java.io.IOException;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;

 public final class LoginAction extends Action {
   public ActionForward execute(ActionMapping mapping,
 ActionForm form, HttpServletRequest request, HttpServletResponse
 response)
 throws IOException, ServletException {

 String userName = request.getParameter(userName);
 String password = request.getParameter(password);
 if (userName!=null  password!=null 
   userName.equals(eric)  password.equals(eric)) {
   HttpSession session = request.getSession();
   session.setAttribute(loggedIn, 1);
   RequestDispatcher rd =
request.getRequestDispatcher(/mainMenu.jsp);
   rd.forward(request, response);
 }
 else {
   RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
   rd.forward(request, response);
 }
 return null;
   }
 }

 struts-config
   action-mappings
 action path=/login type=com.javapro.struts.LoginAction/
 action path=/logout type=com.javapro.struts.LogoutAction/
 action path=/viewSecret
type=com.javapro.struts.ViewSecretAction/
   /action-mappings
 /struts-config


 Thanks


 -
 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: javax.servlet.ServletException

2003-02-04 Thread Pani, Gourav
You might consider a tutorial in internet search.  Additionally, RTFM on
Struts.

-Original Message-
From: EG [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 1:44 PM
To: Struts Users Mailing List
Subject: Re: javax.servlet.ServletException


Do you have any link where  sample applications are available ?

Thank



From: Pani, Gourav [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 12:39 PM
Subject: RE: javax.servlet.ServletException


 Eric,

 It doesn't appear as if you are utilizing some of the simple Struts
 capabilities that would make things a lot easier.

 As far as the mapping goes, you should try the following in the
 struts-config.xml.

 struts-config
   action-mappings
 action path=/login name=Login
type=com.javapro.struts.LoginAction
 scope=request validate=true input=login.jsp
   forward name=success path=/jsp/main/welcome.jsp /
 /action
   /action-mappings
 /struts-config


 the input would be the path to the JSP that is being used to enter
 information and posting to your Action class.  you should also have a form
 object to hold the username and password instead of getting it from your
 request.

 in the action class you can do the following:

  return mapping.findForward(success);

 instead of using the request dispatcher.


 you might want to consult sample applications available online.

 -Original Message-
 From: EG [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 12:06 PM
 To: Struts Users Mailing List
 Subject: Re: javax.servlet.ServletException


 Here the web.xml ane struts-config.xml

 web-app

   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   /servlet

   !-- Action Servlet Mapping --
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping

   !-- The Welcome File List --
   welcome-file-list
 welcome-filelogin.jsp/welcome-file
   /welcome-file-list

 /web-app

 here the loginAction class

 package com.javapro.struts;

 import java.io.IOException;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;

 public final class LoginAction extends Action {
   public ActionForward execute(ActionMapping mapping,
 ActionForm form, HttpServletRequest request, HttpServletResponse
 response)
 throws IOException, ServletException {

 String userName = request.getParameter(userName);
 String password = request.getParameter(password);
 if (userName!=null  password!=null 
   userName.equals(eric)  password.equals(eric)) {
   HttpSession session = request.getSession();
   session.setAttribute(loggedIn, 1);
   RequestDispatcher rd =
request.getRequestDispatcher(/mainMenu.jsp);
   rd.forward(request, response);
 }
 else {
   RequestDispatcher rd = request.getRequestDispatcher(/login.jsp);
   rd.forward(request, response);
 }
 return null;
   }
 }

 struts-config
   action-mappings
 action path=/login type=com.javapro.struts.LoginAction/
 action path=/logout type=com.javapro.struts.LogoutAction/
 action path=/viewSecret
type=com.javapro.struts.ViewSecretAction/
   /action-mappings
 /struts-config


 Thanks


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




tomcat 4.1.18 - weblogic 5.1 problems with struts 1.0.2

2003-02-04 Thread vinsonizer
Hi everyone. 

  I am in the process of moving my jsp's and struts classes from tomcat 4.1.18 to 
weblogic 5.1 and I am having some issues.  I finally got weblogic's environment set up 
and have my app registered as well, but i am getting:

java.lang.NoSuchMethodError
at spgLoginForm.validate(Unknown Source)
at 
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2106)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)

when i try to use an action class.  spgLoginForm extends ActionForm, so I am under the 
impression that it may be a versioning mismatch or something similar.  It works in 
tomcat, but my employer wants it in weblogic 5.1 if possible.  Can anyone help me out?

TIA,
Jason

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




logic - dynamic - equal, lessThan, ...

2003-02-04 Thread Juraj . Lenharcik
Hi,

I have an iteration with an object which has two values. I want to compare these 
values and create an output on their depedency. That means if the value1 is equal 
value2 then write it yellow. If value1 greater than value2 write it red and so on.

I tried the logic tags, but I am not sure if they can process it.

logic:lessThan name=id property=value1 value=value2
LESS
/logic...
logic:moreThan name=id property=value1 value=value2
MORE
/logic...

Can I put a dynamic value to the value attribute? If no how to do?

Juraj

 

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




RE: Where should database select go for select dropdown

2003-02-04 Thread Alvarado, Juan (c)
Be careful about putting database access code right in your action. This
would not constitute a proper design of an application. If you are new to
struts and are in the process of learning, then you should get in the habit
of doing things right from the get go.

A more correct approach is to have your action call a business delegate
object which will then make calls to your data store.


-Original Message-
From: Eric C. Hein [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 1:46 PM
To: Struts Users Mailing List
Subject: Re: Where should database select go for select dropdown


In yourAction class.

- Original Message -
From: Huw Jones [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 10:22 AM
Subject: Where should database select go for select dropdown


 Sorry if this is trivial - but I'm new to the framework and I'm finding
the
 documentation confusing.
 Just want to create an html select object with options set to the contents
 of a database table - i.e. visualise
 a  lookup table. So when the form is first displayed the dropdown appears
 with data from a database table.
 I'm confused where the database access should go - in the JSP or the
 FormBean. Is there an example which
 someone could point me to

 Thanks




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




using tokens in struts,

2003-02-04 Thread Ashish Kulkarni
Hi,
I was trying to get a example which shows how to use
tokens in struts, yesterday i got a previous post from
this forum, so i tried it and it did not work for me
I am using struts1.1b2
Does any one has used token to avoid multiple
submits??
if so can u post some example or some article where i
can get the info
the ose which i got was 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html

need help


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: tomcat 4.1.18 - weblogic 5.1 problems with struts 1.0.2

2003-02-04 Thread vinsonizer
It is also giving me a:

Error 400--Bad Request
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.1 400 Bad Request

The request could not be understood by the server due to malformed syntax. The client 
SHOULD NOT repeat the request without modifications.


any suggestions?

Jason
---Original Message---
From: [EMAIL PROTECTED]
Sent: 02/04/03 01:52 PM
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: tomcat 4.1.18 - weblogic 5.1 problems with struts 1.0.2

 
 Hi everyone. 

  I am in the process of moving my jsp's and struts classes from tomcat
4.1.18 to weblogic 5.1 and I am having some issues.  I finally got weblogic's 
environment set up and have my app registered as well, but i am getting:

java.lang.NoSuchMethodError
at spgLoginForm.validate(Unknown Source)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2106)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)

when i try to use an action class.  spgLoginForm extends ActionForm, so I
am under the impression that it may be a versioning mismatch or something
similar.  It works in tomcat, but my employer wants it in weblogic 5.1 if
possible.  Can anyone help me out?

TIA,
Jason

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




AW: logic - dynamic - equal, lessThan, ...

2003-02-04 Thread Juraj . Lenharcik
Ok I have it; bean:define has to be used to set up the value. after this it has to be 
done like this:

bean:define id=val2 name=beanname property=propertyname/
logic:lessThan name=id property=value1 value=%= (String)val2 %
LESS
/logic...

juraj

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 19:53
An: [EMAIL PROTECTED]
Betreff: logic - dynamic - equal, lessThan, ...


Hi,

I have an iteration with an object which has two values. I want to compare these 
values and create an output on their depedency. That means if the value1 is equal 
value2 then write it yellow. If value1 greater than value2 write it red and so on.

I tried the logic tags, but I am not sure if they can process it.

logic:lessThan name=id property=value1 value=value2
LESS
/logic...
logic:moreThan name=id property=value1 value=value2
MORE
/logic...

Can I put a dynamic value to the value attribute? If no how to do?

Juraj

 

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

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




Re: Multiple struts-config files without Modules

2003-02-04 Thread Ted Husted
 Is it dumb ? Or may it be an advance of the feature promised in 1.2
 that will allow inheritence of configs ?

Just to be precise, no one is able to make any promises about any
features for any possible future release. At this point, 1.2 may just be
the patches for minor enhancements that came in while 1.1 was in
never-ending beta, along with the Commons Resources migration.

I'd like to see the same type of element inheritance in all the configs
that we have in the tiles-config, but someone will have to create and
commit the patches for this before it gets slated for a release.

AFAIK, inheritance between modules is still a whiteboard concept, and no
one has even tried coding a design for that yet. Once we have tiles-like
element inheritance, it may be unnecessary anyway.

-Ted.



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




RE: using tokens in struts,

2003-02-04 Thread pqin
Token works perfect for my app.

In my load action, I set token by saveToken(request).

In my submit action, I check token by isTokenValid(request); if invalid, I
forwards request to an error page.

Very simple.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] 
Sent: February 4, 2003 1:57 PM
To: [EMAIL PROTECTED]
Subject: using tokens in struts, 

Hi,
I was trying to get a example which shows how to use
tokens in struts, yesterday i got a previous post from
this forum, so i tried it and it did not work for me
I am using struts1.1b2
Does any one has used token to avoid multiple
submits??
if so can u post some example or some article where i
can get the info
the ose which i got was 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html

need help


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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



Re: using tokens in struts,

2003-02-04 Thread David Graham
The struts-example app that's included with the distro uses tokens.

David




From: Ashish Kulkarni [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: using tokens in struts, Date: Tue, 4 Feb 2003 10:57:00 -0800 (PST)

Hi,
I was trying to get a example which shows how to use
tokens in struts, yesterday i got a previous post from
this forum, so i tried it and it did not work for me
I am using struts1.1b2
Does any one has used token to avoid multiple
submits??
if so can u post some example or some article where i
can get the info
the ose which i got was
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html

need help


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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



_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Re: Tiles setup help!

2003-02-04 Thread Max Kremer
How are you doing your tiles:insert ?

- Original Message -
From: Jackson, Stephen [EMAIL PROTECTED]
To: Struts Users Mailing List (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 1:42 PM
Subject: Tiles setup help!


 I am trying to get tiles set up and having lots of issues trying to do so.
 (Struts 1.1b3  tomcat 4.1.12)

 My tiles-defs.xml file looks like the following
***
 tiles-definitions
 !-- The default layout for the web interface --
 definition name=rpcinterface.default
 path=/layouts/RpcInterfaceLayout.jsp
 put name=header value=/html/header.html/
 put name=leftnav value=/jsp/LeftNav.jsp/
 put name=footer value=/html/footer.html/
 /definition

 !-- The wait page layout for requests --
 definition name=wait.default path=/layouts/WaitPageLayout.jsp
 put name=linktag value=/html/indexlinkref.html /
 put name=header value=/html/header.html/
 put name=footer value=/html/footer.html/
 /definition

 /tiles-definitions

 Tiles info in struts.config.xml **
 !-- Tiles PlugIn definition--
 plug-in className=org.apache.struts.tiles.TilesPlugin
 set-property property=definitions-config
 value=/WEB-INF/conf/tiles-defs.xml/
   set-property property=definitions-parser-validate
 value=true/
   set-property property=definitions-parser-details
 value=2/
   set-property property=definitions-debug value=2/
 /plug-in

 I have a log4j.properties in WEB-INF/classes and it has the following info
 log4j.category.org.apache.struts.tiles=DEBUG

 I am not getting any output from log4j.
 What would the file be called and where would it reside if it was there?


 * jsp error
 java.lang.NullPointerException
 at
 org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java:528)
 at

org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:487
 )
 at
 org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:445)
 at
 org.apache.jsp.index_jsp._jspx_meth_tiles_insert_0(index_jsp.java:78)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 04)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain

 I was trying to get log4j to tell me something but I don't know what I am
 doing wrong to get it set up.

 Any assistance would be great.

 Thanks in advance,

 Stephen Jackson







 -
 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 I have to set a classpath? If so, how?

2003-02-04 Thread David Haynes
Newbie developer here:
 
I have a bean (fooManager) that is sitting in the /WEB-INF/classes
space.
I am referencing it in a jsp as jsp:useBean id=foo class=fooManager
scope=session/
 
When I access the jsp, I get a Cannot resolve symbol for fooManager.
 
I thought that the classpath was automatically populated with classes
from the /WEB-INF/classes directory.
Do I need to generate a jar? Set up something in the web.xml?
 
Details:
Tomcat 4.1, Java 1.4
 
Thanks!
-david-



en_US prefix for resource key? Why?

2003-02-04 Thread otisg
Hello,

This must be a simple one to answer to
experienced Struts / JSP / taglib users.  I
am using the latest Struts (CVS HEAD) with
Taglibs.

I am trying to make use of ActionError(s)
and messages defined in resource files, but
instead of an appropriate error message I
get something like
???en_US.amp.error.invalidLogin???
I know why I get the resource key instead of
, but I shouldn't be getting the resource
key - I want to get the resource value text.

My resources file is called
AMPResources.properties and is defined in
Struts config as:

message-resources null=false
   parameter=AMPResources/


My JSP file contains:

html:errors


My Action class contains this:

ActionErrors errors = new ActionErrors();
errors.add(username, new
ActionError(amp.error.invalidLogin));

if (!errors.isEmpty())
{
saveErrors(request, errors);
return mapping.getInputForward(); //
login.jsp
}


The AMPResources.properties file is in
/WEB-INF in the WAR.

Is the file named wrong?  Why the en_US prefix?

Thanks,
Otis
P.S.
My problem is similar to this one:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52074.html



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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




Re: Do I have to set a classpath? If so, how?

2003-02-04 Thread otisg
That fooManager is not in a package?  If so,
I'd imagine you need to specify it, no?
Just a guess...

Otis

 On Tue, 4 Feb 2003, David Haynes
([EMAIL PROTECTED]) wrote:

 Newbie developer here:
  
 I have a bean (fooManager) that is sitting
in the /WEB-INF/classes
 space.
 I am referencing it in a jsp as
jsp:useBean id=foo class=fooManager
 scope=session/
  
 When I access the jsp, I get a Cannot
resolve symbol for fooManager.
  
 I thought that the classpath was
automatically populated with classes
 from the /WEB-INF/classes directory.
 Do I need to generate a jar? Set up
something in the web.xml?
  
 Details:
 Tomcat 4.1, Java 1.4
  
 Thanks!
 -david-
 
 
 



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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




RE: using tokens in struts,

2003-02-04 Thread Ashish Kulkarni
Hi PQ,

Suppose this is my scenarion,
dispatchTest.do ---  update.jsp (on submit) ---
doAction.do (on success) --update.jsp 
dispatchTest.do populates the form bean and passes it
to update.jsp , which displays the data for the user
to change, and then press submit , which will call
doAction class which will update the database and
forward the request to update.jsp, 
So where should i put the saveToken(request) and where
should i test isValidToken(request)
Also is there some thing i need to define in
struts-config.xml for it

Ashish

--- [EMAIL PROTECTED] wrote:
 Token works perfect for my app.
 
 In my load action, I set token by
 saveToken(request).
 
 In my submit action, I check token by
 isTokenValid(request); if invalid, I
 forwards request to an error page.
 
 Very simple.
 
 Regards,
  
  
 PQ
  
 This Guy Thinks He Knows Everything
 This Guy Thinks He Knows What He Is Doing
 
 -Original Message-
 From: Ashish Kulkarni
 [mailto:[EMAIL PROTECTED]] 
 Sent: February 4, 2003 1:57 PM
 To: [EMAIL PROTECTED]
 Subject: using tokens in struts, 
 
 Hi,
 I was trying to get a example which shows how to use
 tokens in struts, yesterday i got a previous post
 from
 this forum, so i tried it and it did not work for me
 I am using struts1.1b2
 Does any one has used token to avoid multiple
 submits??
 if so can u post some example or some article where
 i
 can get the info
 the ose which i got was 

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52700.html
 
 need help
 
 
 =
 A$HI$H
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 

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


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




  1   2   >