Re: Generate Java class from xml?

2003-12-17 Thread Mark Lowe
Dont know about using digester but html parser is a handy library.

http://htmlparser.sourceforge.net/

Might help you do what you want.

On 17 Dec 2003, at 22:45, Adam Hardy wrote:

Hi Christopher,
just a quick question about Digester, perhaps you can save me the  
effort of reading up on it to find out myself, but will Digester be  
able to parse HTML?

I am dealing with the Internet Explorer bookmarks export file. I have  
already tried JAXB but JAXB chokes on it, saying that the XML is not  
well-formed.

The bookmarks file has quite a few unpaired p and dt elements,  
which is obviously bad XML.

Thanks
Adam
On 12/17/2003 09:38 PMnbsp;Christopher Milton wrote:
I use Digester which is used by Struts itself.
http://jakarta.apache.org/commons/digester/
http://www.google.com/search?q=jakarta+digester
http://www.javaranch.com/newsletter/August2003/ 
TouringTheCommonsPart2.html
--- John Smart [EMAIL PROTECTED] wrote:
There's also XMLBeans (http://xml.apache.org/xmlbeans/) , which,  
unlike Castor, works with JDK 1.4...

Martin Gainty wrote:


Castor (http://www.castor.org) which generate the java classes with  
marshall
and unmarshall methods, but it is not finished, doesn't care to  
namespaces,
owns severals bugs ...

The second one is Xml Spy 5.0, it generate classes from an xsd file  
which
wrap on the Dom Tree, but all facets are not implemented as  
enumeration ...
but I think that a better version will come soon. Generates JAXP  
compliant
Java Beans
http://www.altova.com/features_java.html

-Martin

- Original Message - From: Vicky  
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 2:01 PM
Subject: Generate Java class from xml?




Does anyone have an idea of how i can generate .java file from xml  
file?

Tools like jakrata digester, JOX are there but both of them are  
useful in
populating java beans from xml. My requirement is to generate .java  
file

from .xml with getters and setters methods for xml  
elements/attributes. I

also tried JAXB. But JAXB generates bunch of files and most of them  
are
interfaces, which is not going to work for me.


For e.g. i have following xml file and i want to generate  
Address.java

file with getters/setters. Any ideas?


?xml version='1.0' encoding='UTF-8' ?
Address
  FirstName type=String/
  PoBox type=int/
..
/Address
Thanks,
Vicky


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
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]


missing bean:message weblogic8.1 Workshop

2003-12-17 Thread Michael Bay
I have deployed successfully the struts-example on Tomcat  Weblogic8.1 (war file in 
.../user_projects/domains/mydomain/applications).  Its trying to get it via 
Weblogic8.1 WORKSHOP...

The problem: javax.servlet.jsp.JspException: Missing message for key index.title (in 
the ApplicationResources.properties).

The structure of my files (used Workshop wizard) are under 
../user_projects/myproject/myprojectWeb

(0)index.jsp (myprojectWeb):
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %...
titlebean:message key=index.title//title

(1)web.xml (testerWeb/WEB-INF):
servlet-nameaction/servlet-name
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-registration.xml/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

(2)struts-config.xml (testerWeb/WEB-INF):
message-resources
parameter=org.apache.struts.webapp.example.ApplicationResources/
(3) ApplicationResources.properties (testerWeb/WEB-INF/src/org/apache/struts/ 
webapp/example/):
index.title=MailReader Demonstration Application (Struts 1.1-dev)

2nd question, besides the 'missing' propoerty:
(4)What do I need to do (controller.jpf,etc.) to get the struts-example to work with 
Workshop?  I would have thought the controller.jpf would have automatically generate 
the GUI, given the struts-example files.

Any help would be appreciated.

Here's the full message:
javax.servlet.jsp.JspException: Missing message for key index.title
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
at jsp_servlet.__index._jspService(index.jsp:8)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)



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



Re: Please Help With This Error Message

2003-12-17 Thread Caroline Jen
Hi, I tried and tried.  I cannot figure out the error.
 I need your sharp eyes and experience.  I keep
getting this error message in the browser:

ServletException in:/article/content/postForm.jsp]
/article/content/postForm.jsp(32,67) equal symbol
expected' 

This postForm.jsp had worked find before I inserted:

bean:define id=author name=cr scope=session
type=java.lang.String/
html:text property=creator value=bean:write
name=author/ size=82 maxlength=25
tabindex=1/

And the error message points at the bean:define ...
tag.  The statements are in ONE line (they do not
wrapped around) in my file.

cr is passed to the postForm.jsp in a session object
this way:

c:set var=cr value=${articleForm.creator}
scope=session/ 

Thanks a lot.

-C 
--- Firat TIRYAKI [EMAIL PROTECTED] wrote:
 maybe you don't have a space character between
 creator and scope... try to
 write the tag in one line, not multiple lines.
 
 F.
 
 - Original Message - 
 From: fredatwork [EMAIL PROTECTED]
 To: 'Struts Users Mailing List'
 [EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:53 AM
 Subject: RE: Please Help With This Error Message
 
 
 Your statement is OK. It comes from the surrounding
 quote.
 
 The only idea I have is to check double-quotes
 correctly.
 
 Fred
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: mercredi 17 décembre 2003 07:41
 To: [EMAIL PROTECTED]
 Subject: Please Help With This Error Message
 
 Please help me to figure out this error message that
 I
 got in the browser: equal symbol expected.
 
 The error complains about this statement in my JSP:
 bean:define id=author name=creator
 scope=session type=java.lang.String/
 
 and the above statement is intended to retrieve the
 string creator from a session object.
 
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/
 

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

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

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


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



RE: Please Help With This Error Message

2003-12-17 Thread Barett McGavock
C,

You can't nest tags as you did in the value attribute.
bean:define ... value=bean:write name=author/ /

The rest of the list will croak when I recommend that you use
%= author %
instead of
bean:write name=author/

Maybe they can tell you a fancy -el/JSTL way to do it. :)

B

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 4:46 PM
To: Struts Users Mailing List
Subject: Re: Please Help With This Error Message


Hi, I tried and tried.  I cannot figure out the error.
 I need your sharp eyes and experience.  I keep
getting this error message in the browser:

ServletException in:/article/content/postForm.jsp]
/article/content/postForm.jsp(32,67) equal symbol
expected' 

This postForm.jsp had worked find before I inserted:

bean:define id=author name=cr scope=session type=java.lang.String/
html:text property=creator value=bean:write name=author/ size=82
maxlength=25 tabindex=1/

And the error message points at the bean:define ...
tag.  The statements are in ONE line (they do not
wrapped around) in my file.

cr is passed to the postForm.jsp in a session object
this way:

c:set var=cr value=${articleForm.creator} scope=session/ 

Thanks a lot.

-C 
--- Firat TIRYAKI [EMAIL PROTECTED] wrote:
 maybe you don't have a space character between
 creator and scope... try to
 write the tag in one line, not multiple lines.
 
 F.
 
 - Original Message -
 From: fredatwork [EMAIL PROTECTED]
 To: 'Struts Users Mailing List'
 [EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:53 AM
 Subject: RE: Please Help With This Error Message
 
 
 Your statement is OK. It comes from the surrounding
 quote.
 
 The only idea I have is to check double-quotes
 correctly.
 
 Fred
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: mercredi 17 décembre 2003 07:41
 To: [EMAIL PROTECTED]
 Subject: Please Help With This Error Message
 
 Please help me to figure out this error message that
 I
 got in the browser: equal symbol expected.
 
 The error complains about this statement in my JSP: bean:define 
 id=author name=creator scope=session type=java.lang.String/
 
 and the above statement is intended to retrieve the
 string creator from a session object.
 
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing. 
 http://photos.yahoo.com/
 

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

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

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


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



Fwd: missing bean:message weblogic8.1 Workshop

2003-12-17 Thread Michael Bay
my bad.. i meant myprojectWeb instead of testerWeb, for the directories.

Thanks ahead for the help.
---BeginMessage---
I have deployed successfully the struts-example on Tomcat  Weblogic8.1 (war file in 
.../user_projects/domains/mydomain/applications).  Its trying to get it via 
Weblogic8.1 WORKSHOP...

The problem: javax.servlet.jsp.JspException: Missing message for key index.title (in 
the ApplicationResources.properties).

The structure of my files (used Workshop wizard) are under 
../user_projects/myproject/myprojectWeb

(0)index.jsp (myprojectWeb):
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %...
titlebean:message key=index.title//title

(1)web.xml (testerWeb/WEB-INF):
servlet-nameaction/servlet-name
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-registration.xml/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

(2)struts-config.xml (testerWeb/WEB-INF):
message-resources
parameter=org.apache.struts.webapp.example.ApplicationResources/
(3) ApplicationResources.properties (testerWeb/WEB-INF/src/org/apache/struts/ 
webapp/example/):
index.title=MailReader Demonstration Application (Struts 1.1-dev)

2nd question, besides the 'missing' propoerty:
(4)What do I need to do (controller.jpf,etc.) to get the struts-example to work with 
Workshop?  I would have thought the controller.jpf would have automatically generate 
the GUI, given the struts-example files.

Any help would be appreciated.

Here's the full message:
javax.servlet.jsp.JspException: Missing message for key index.title
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
at jsp_servlet.__index._jspService(index.jsp:8)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)



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

Best way to parse a String and replace line feeds with br for html?

2003-12-17 Thread David Erickson
Situation:
using the html:textarea element tag to enter notes on an object, thats
getting persisted as a blob in our database.  I would like to be able to
output this to html with the same formatting.. ie the line feeds work.
Whats the best way to do this?  I tried the jstl:core c:out tag and it didnt
work (did not goto the next line), tried the struts bean:write tag same
problem.  Is there another struts tag library I can use?
Thanks,
David


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



RE: Best way to parse a String and replace line feeds with br f or html?

2003-12-17 Thread Barett McGavock
Thoughts:
1) Assuming that you have a separate value object to carry this 
item to the view, try replacing any \n with br in the action.
2) Have you also considered using the pre HTML tag?

B

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 5:05 PM
To: Struts Mailing List
Subject: Best way to parse a String and replace line feeds with br for
html?


Situation:
using the html:textarea element tag to enter notes on an object, thats
getting persisted as a blob in our database.  I would like to be able to
output this to html with the same formatting.. ie the line feeds work. Whats
the best way to do this?  I tried the jstl:core c:out tag and it didnt work
(did not goto the next line), tried the struts bean:write tag same problem.
Is there another struts tag library I can use? Thanks, David

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



Re: Best way to parse a String and replace line feeds with br for html?

2003-12-17 Thread David Erickson
Barett:
Thanks for the tips.. I completely forgot about #1, and I think I will
implement #2 as it doesn't require me modifying my object at all.
Thanks!
-David
- Original Message - 
From: Barett McGavock [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Cc: 'David Erickson'
[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 5:18 PM
Subject: RE: Best way to parse a String and replace line feeds with br for
html?


 Thoughts:
 1) Assuming that you have a separate value object to carry this
 item to the view, try replacing any \n with br in the action.
 2) Have you also considered using the pre HTML tag?

 B

 -Original Message-
 From: David Erickson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 5:05 PM
 To: Struts Mailing List
 Subject: Best way to parse a String and replace line feeds with br for
 html?


 Situation:
 using the html:textarea element tag to enter notes on an object, thats
 getting persisted as a blob in our database.  I would like to be able to
 output this to html with the same formatting.. ie the line feeds work.
Whats
 the best way to do this?  I tried the jstl:core c:out tag and it didnt
work
 (did not goto the next line), tried the struts bean:write tag same
problem.
 Is there another struts tag library I can use? Thanks, David

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



DOTs, wild cards, and action mapping

2003-12-17 Thread Thomas E Enebo
I started using the wild-card support in action mappings (from a CVS 
build).  It works, but I noticed something strange (until I realized 
what it was doing).  So, I have a action mapping like:

action
path=/areas/*
type=apackage.AreaAction
forward name=success path=.area/
/action
Then in some jsp I have:

	html:link title=${area.name} action=/areas/${area.address}

Where area.address expands to '10.0.0.1'.  Struts will look for the last 
dot in an action and chop it off.  So I keep getting a string like:

 a href=/managearea/do/areas/10.0.0 title=area1area1/a

So I am not using extensions in my struts configuration and I would 
intuitively think that I would get '10.0.0.1' back.  Is this an 
ambiguity that appeared with the new wildcard support that cannot be 
resolved (meaning I should never use '.' in any names) or is there some 
way to resolve this?  Perhaps I must always use extensions to combat 
this (i.e. action=/areas/${area.address}.bogus_extension - which is 
fine by me as a workaround)?

-Tom



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


Enhancement Request or Possible Alternative?

2003-12-17 Thread Hookom, Jacob
We are doing a lot of module switching or multistep workflows (which we
handle fine through session beans) but at the same time, users are allowed
to jump to different pages and we would like to capture a leave event when
they aren't within a set of mapping(s).

I'm wondering if anyone has solved this problem because it would also allow
for constraints on workflows at the action level (if you leave pages X,Y,Z
then fire Action 'CheckSession').


Jacob Hookom
Senior Programmer/Analyst
McKesson Medical-Surgical
Golden Valley, MN



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



Re: problem with adding ActionMessage to ActionErrors

2003-12-17 Thread Adam Hardy
On 12/17/2003 09:36 PMnbsp;Bradford M. Ayers wrote:
I noticed in the documentation that ActionError is deprecated, so I
was trying to be a good doobie and use ActionMessage like the docs
say to.  So in my code, when I go from this: errors.add(
ActionErrors.GLOBAL_ERROR, new ActionMessage(
error.password.mismatch )); to this: errors.add(
ActionErrors.GLOBAL_ERROR, new ActionError( error.password.mismatch
)); when my page tries to resolve html:errors/ I get: 
java.lang.ClassCastException at
org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:215)...

Has anyone seen this?  I'm using JBoss 3.2.2 (which uses Tomcat 4.1).

Hi Bradford,

I think the ErrorsTag is expecting an ActionErrors collection and you 
are giving it an ActionMessages. Is that so?

I could be wrong but this is an area that I only managed to understand 
for about 30 minutes while I implemented it, and then I forgot it 
immediately. :O

Adam

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


Error When Trying to Pass A String From One JSP To Another JSP

2003-12-17 Thread Caroline Jen
Please help me.  I have tried to do it for days.  I
just could not get it right.  I got this error
message:

[ServletException in:/article/content/postForm.jsp]
Cannot find bean cr in scope session' 

In my view.jsp, I put a String in a session object:

   html:form action=/list/Message
   c:set var=cr value=${articleForm.creator}
scope=session/
   html:submitView/Send Messages/html:submit
   /html:form

And in postForm.jsp, I tried to retrieve that String
and write it out in a text field:

  bean:define id=author name=cr
scope=session type=java.lang.String/
  html:text property=creator
value=%=author% size=82 maxlength=25
tabindex=1/




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

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



RE: ActionMapping - regexp pattern matching for path

2003-12-17 Thread David Friedman
Can't you use a module and set the action mapping to 'unknown=true' so
that one particular action is used for everything?  If so, you'd need to be
mapping actions as 'do/*' instead of '*.do', theoretically.  I've been
meaning to try this now that I'm using /do/* as my Struts v1.1 mapping but I
haven't got around to using any modules yet.  (I'm sooo slow on ths project,
like I don't want to do it).

Regards,
David

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 3:27 PM
To: Struts Users Mailing List
Subject: Re: ActionMapping - regexp pattern matching for path


No, I don't believe this is possible currently. Wildcards of any kind
(extending to regexps) are not support for ActionMapping paths.

Sergey Proskurnya wrote:

Hello to all,

In Struts-1.1 it is possible to bind Actions to static URL path,
but is it possible to bind Actions to the set of the paths,
described by Java regular expression?
For example:
action-mappings
actionpath=/users/.*
   type=com.mysite.UserPageAction
   scope=session
   validate=false
   /action
/action-mappings

I mean that in this case the requests for /users/John/,
/users/Mary/ and etc. will be handled by com.mysite.UserPageAction.

Thanks for attention,
  Sergey Proskurnya.

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




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


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


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



RE: DOTs, wild cards, and action mapping

2003-12-17 Thread David Friedman
Thomas,

(Probably a) Dumb question 

From the ${area.name} it looks like you're using Velocity Templates.  I
thought Velocity couldn't mix with JSP's like that (My impression from ch 17
of 'Struts in Action'.  How are you mixing the two?  (Or is there a Velocity
update which allows it?)

Regards,
David

-Original Message-
From: Thomas E Enebo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 7:16 PM
To: [EMAIL PROTECTED]
Subject: DOTs, wild cards, and action mapping


I started using the wild-card support in action mappings (from a CVS
build).  It works, but I noticed something strange (until I realized
what it was doing).  So, I have a action mapping like:

 action
 path=/areas/*
 type=apackage.AreaAction
 forward name=success path=.area/
 /action

Then in some jsp I have:

html:link title=${area.name} action=/areas/${area.address}

Where area.address expands to '10.0.0.1'.  Struts will look for the last
dot in an action and chop it off.  So I keep getting a string like:

  a href=/managearea/do/areas/10.0.0 title=area1area1/a

So I am not using extensions in my struts configuration and I would
intuitively think that I would get '10.0.0.1' back.  Is this an
ambiguity that appeared with the new wildcard support that cannot be
resolved (meaning I should never use '.' in any names) or is there some
way to resolve this?  Perhaps I must always use extensions to combat
this (i.e. action=/areas/${area.address}.bogus_extension - which is
fine by me as a workaround)?

-Tom



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


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



RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Caroline Jen
Hi, my JSP#1 and JSP#2 use different forms.  However,
property name in JSP#1 is the same as that in JSP#2. 
I tried to pass this Sring and write it out in a text
field in JSP#2 and just could not get it right.  I got
this error
message:

[ServletException in:/article/content/postForm.jsp]
Cannot find bean cr in scope session' 

In my view.jsp, I put a String in a session object:

   html:form action=/list/Message
   c:set var=cr value=${articleForm.creator}
scope=session/
   html:submitView/Send Messages/html:submit
   /html:form

And in postForm.jsp, I tried to retrieve that String
and write it out in a text field this way:

  bean:define id=author name=cr
scope=session type=java.lang.String/
  html:text property=creator
value=%=author% size=82 maxlength=25
tabindex=1/

-Caroline
 
--- Robert Taylor [EMAIL PROTECTED] wrote:
 There are a couple (3) ways to do it.
 
 1. Have both JSP#1 and 2 use the same form then have
 the action that
 processes JSP#1 simply
 forward to JSP#2 and Struts will auto-populate the
 field.
 
 2. Have the action that processes JSP#1 forward or
 redirect to
JSP#2 whose form has the same property name.
 Place the create property
value in the query string and Struts will
 auto-populate the form
in JSP#2.
 
 3. Have the action that processes JSP#1 access and
 populate the form used
in JSP#2 with the property then forward to JSP#2.
 
 robert
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 16, 2003 8:33 PM
  To: [EMAIL PROTECTED]
  Subject: How To Output the Value Of a Hidden
 Field?
 
 
  My JSP #2 receives a hidden field passed from JSP
 #1:
  html:hidden property=creator/
 
  In the JSP #2, I have a text field:
  html:text property=creator size=82
 maxlength=25
  tabindex=1/
 
  and I want the value of the hidden field to be the
  text in the text field of the JSP #2.  Please
 advise
  how to do it?
 
  __
  Do you Yahoo!?
  New Yahoo! Photos - easier uploading and sharing.
  http://photos.yahoo.com/
 
 

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

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


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

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



RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread David Friedman
Caroline,

How do you save the form cr in session scope?
Does your action use 'scope=session' or are you
doing a 'request.getSession().setAttribute(cr,cr);'
in the first action?

Regards,
David

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 8:25 PM
To: Struts Users Mailing List
Subject: RE: How To Output the Value of a String That Is Passed From
Another JSP?


Hi, my JSP#1 and JSP#2 use different forms.  However,
property name in JSP#1 is the same as that in JSP#2. 
I tried to pass this Sring and write it out in a text
field in JSP#2 and just could not get it right.  I got
this error
message:

[ServletException in:/article/content/postForm.jsp]
Cannot find bean cr in scope session' 

In my view.jsp, I put a String in a session object:

   html:form action=/list/Message
   c:set var=cr value=${articleForm.creator}
scope=session/
   html:submitView/Send Messages/html:submit
   /html:form

And in postForm.jsp, I tried to retrieve that String
and write it out in a text field this way:

  bean:define id=author name=cr
scope=session type=java.lang.String/
  html:text property=creator
value=%=author% size=82 maxlength=25
tabindex=1/

-Caroline
 
--- Robert Taylor [EMAIL PROTECTED] wrote:
 There are a couple (3) ways to do it.
 
 1. Have both JSP#1 and 2 use the same form then have
 the action that
 processes JSP#1 simply
 forward to JSP#2 and Struts will auto-populate the
 field.
 
 2. Have the action that processes JSP#1 forward or
 redirect to
JSP#2 whose form has the same property name.
 Place the create property
value in the query string and Struts will
 auto-populate the form
in JSP#2.
 
 3. Have the action that processes JSP#1 access and
 populate the form used
in JSP#2 with the property then forward to JSP#2.
 
 robert
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 16, 2003 8:33 PM
  To: [EMAIL PROTECTED]
  Subject: How To Output the Value Of a Hidden
 Field?
 
 
  My JSP #2 receives a hidden field passed from JSP
 #1:
  html:hidden property=creator/
 
  In the JSP #2, I have a text field:
  html:text property=creator size=82
 maxlength=25
  tabindex=1/
 
  and I want the value of the hidden field to be the
  text in the text field of the JSP #2.  Please
 advise
  how to do it?
 
  __
  Do you Yahoo!?
  New Yahoo! Photos - easier uploading and sharing.
  http://photos.yahoo.com/
 
 

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

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


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

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


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



Re: Generate Java class from xml?

2003-12-17 Thread Adam Hardy
Hmm, looks pretty good but it doesn't seem to do what I need. Thanks 
though.

On 12/17/2003 11:54 PMnbsp;Mark Lowe wrote:
Dont know about using digester but html parser is a handy library.

http://htmlparser.sourceforge.net/

Might help you do what you want.

On 17 Dec 2003, at 22:45, Adam Hardy wrote:

Hi Christopher,
just a quick question about Digester, perhaps you can save me the  
effort of reading up on it to find out myself, but will Digester be  
able to parse HTML?

I am dealing with the Internet Explorer bookmarks export file. I have  
already tried JAXB but JAXB chokes on it, saying that the XML is not  
well-formed.

The bookmarks file has quite a few unpaired p and dt elements,  
which is obviously bad XML.

Thanks
Adam
On 12/17/2003 09:38 PMnbsp;Christopher Milton wrote:

I use Digester which is used by Struts itself.
http://jakarta.apache.org/commons/digester/
http://www.google.com/search?q=jakarta+digester
http://www.javaranch.com/newsletter/August2003/ 
TouringTheCommonsPart2.html
--- John Smart [EMAIL PROTECTED] wrote:

There's also XMLBeans (http://xml.apache.org/xmlbeans/) , which,  
unlike Castor, works with JDK 1.4...

Martin Gainty wrote:


Castor (http://www.castor.org) which generate the java classes 
with  marshall
and unmarshall methods, but it is not finished, doesn't care to  
namespaces,
owns severals bugs ...

The second one is Xml Spy 5.0, it generate classes from an xsd 
file  which
wrap on the Dom Tree, but all facets are not implemented as  
enumeration ...
but I think that a better version will come soon. Generates JAXP  
compliant
Java Beans
http://www.altova.com/features_java.html

-Martin

- Original Message - From: Vicky  [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 2:01 PM
Subject: Generate Java class from xml?



Does anyone have an idea of how i can generate .java file from 
xml  file?

Tools like jakrata digester, JOX are there but both of them are  
useful in
populating java beans from xml. My requirement is to generate 
.java  file


from .xml with getters and setters methods for xml  
elements/attributes. I


also tried JAXB. But JAXB generates bunch of files and most of 
them  are
interfaces, which is not going to work for me.


For e.g. i have following xml file and i want to generate  
Address.java

file with getters/setters. Any ideas?


?xml version='1.0' encoding='UTF-8' ?
Address
  FirstName type=String/
  PoBox type=int/
..
/Address
Thanks,
Vicky


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
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 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Caroline Jen
cr is not a form and there is no action involved. 
There are two JSPs; view.jsp and postForm.jsp and each
is with its own form (different forms).

In my view.jsp, I am able to write out String creator
this way:
bean:write name=articleForm property=creator/
and I put the String creator in a session object: 

   html:form action=/list/Message
   c:set var=cr value=${articleForm.creator}
scope=session/
   html:submitView/Send Messages/html:submit
   /html:form

and in the postForm.jsp, I retrieve the String and try
to write it out in a text field:

  bean:define id=author name=cr
scope=session type=java.lang.String/
  html:text property=creator
value=%=author% size=82 maxlength=25
tabindex=1/

I got this error message:
ServletException in:/article/content/postForm.jsp]
 Cannot find bean cr in scope session' 

-Caroline
--- David Friedman [EMAIL PROTECTED] wrote:
 Caroline,
 
 How do you save the form cr in session scope?
 Does your action use 'scope=session' or are you
 doing a
 'request.getSession().setAttribute(cr,cr);'
 in the first action?
 
 Regards,
 David
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:25 PM
 To: Struts Users Mailing List
 Subject: RE: How To Output the Value of a String
 That Is Passed From
 Another JSP?
 
 
 Hi, my JSP#1 and JSP#2 use different forms. 
 However,
 property name in JSP#1 is the same as that in JSP#2.
 
 I tried to pass this Sring and write it out in a
 text
 field in JSP#2 and just could not get it right.  I
 got
 this error
 message:
 
 [ServletException in:/article/content/postForm.jsp]
 Cannot find bean cr in scope session' 
 
 In my view.jsp, I put a String in a session object:
 
html:form action=/list/Message
c:set var=cr value=${articleForm.creator}
 scope=session/
html:submitView/Send Messages/html:submit
/html:form
 
 And in postForm.jsp, I tried to retrieve that String
 and write it out in a text field this way:
 
   bean:define id=author name=cr
 scope=session type=java.lang.String/
   html:text property=creator
 value=%=author% size=82 maxlength=25
 tabindex=1/
 
 -Caroline
  
 --- Robert Taylor [EMAIL PROTECTED] wrote:
  There are a couple (3) ways to do it.
  
  1. Have both JSP#1 and 2 use the same form then
 have
  the action that
  processes JSP#1 simply
  forward to JSP#2 and Struts will auto-populate the
  field.
  
  2. Have the action that processes JSP#1 forward or
  redirect to
 JSP#2 whose form has the same property name.
  Place the create property
 value in the query string and Struts will
  auto-populate the form
 in JSP#2.
  
  3. Have the action that processes JSP#1 access and
  populate the form used
 in JSP#2 with the property then forward to
 JSP#2.
  
  robert
  
   -Original Message-
   From: Caroline Jen [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 16, 2003 8:33 PM
   To: [EMAIL PROTECTED]
   Subject: How To Output the Value Of a Hidden
  Field?
  
  
   My JSP #2 receives a hidden field passed from
 JSP
  #1:
   html:hidden property=creator/
  
   In the JSP #2, I have a text field:
   html:text property=creator size=82
  maxlength=25
   tabindex=1/
  
   and I want the value of the hidden field to be
 the
   text in the text field of the JSP #2.  Please
  advise
   how to do it?
  
   __
   Do you Yahoo!?
   New Yahoo! Photos - easier uploading and
 sharing.
   http://photos.yahoo.com/
  
  
 

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

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/
 

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

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


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

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



RE: Please Help With This Error Message

2003-12-17 Thread hgosper
 Maybe they can tell you a fancy -el/JSTL way to do it. :)

yes, if you use html-el:text instead then you should be able to use an el 
expression a'la:

html-el:text property=creator value=${author}/ size=82 
maxlength=25 tabindex=1/

you'll need something like this at the top of your jsp

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

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.






Barett McGavock [EMAIL PROTECTED]
18/12/2003 10:58 AM
Please respond to Struts Users Mailing List

 
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
cc: 'Caroline Jen' [EMAIL PROTECTED]
Subject:RE: Please Help With This Error Message


C,

You can't nest tags as you did in the value attribute.
bean:define ... value=bean:write name=author/ /

The rest of the list will croak when I recommend that you use
%= author %
instead of
bean:write name=author/

Maybe they can tell you a fancy -el/JSTL way to do it. :)

B

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 4:46 PM
To: Struts Users Mailing List
Subject: Re: Please Help With This Error Message


Hi, I tried and tried.  I cannot figure out the error.
 I need your sharp eyes and experience.  I keep
getting this error message in the browser:

ServletException in:/article/content/postForm.jsp]
/article/content/postForm.jsp(32,67) equal symbol
expected' 

This postForm.jsp had worked find before I inserted:

bean:define id=author name=cr scope=session 
type=java.lang.String/
html:text property=creator value=bean:write name=author/ 
size=82
maxlength=25 tabindex=1/

And the error message points at the bean:define ...
tag.  The statements are in ONE line (they do not
wrapped around) in my file.

cr is passed to the postForm.jsp in a session object
this way:

c:set var=cr value=${articleForm.creator} scope=session/ 

Thanks a lot.

-C 
--- Firat TIRYAKI [EMAIL PROTECTED] wrote:
 maybe you don't have a space character between
 creator and scope... try to
 write the tag in one line, not multiple lines.
 
 F.
 
 - Original Message -
 From: fredatwork [EMAIL PROTECTED]
 To: 'Struts Users Mailing List'
 [EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:53 AM
 Subject: RE: Please Help With This Error Message
 
 
 Your statement is OK. It comes from the surrounding
 quote.
 
 The only idea I have is to check double-quotes
 correctly.
 
 Fred
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: mercredi 17 décembre 2003 07:41
 To: [EMAIL PROTECTED]
 Subject: Please Help With This Error Message
 
 Please help me to figure out this error message that
 I
 got in the browser: equal symbol expected.
 
 The error complains about this statement in my JSP: bean:define 
 id=author name=creator scope=session type=java.lang.String/
 
 and the above statement is intended to retrieve the
 string creator from a session object.
 
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing. 
 http://photos.yahoo.com/
 

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

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

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


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-
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: ActionMapping - regexp pattern matching for path

2003-12-17 Thread Ted Husted
Not in 1.1, but you can use wildcards in the nightly build.

http://jakarta.apache.org/struts/userGuide/building_controller.html#action_mapping_wildcards

Sergey Proskurnya wrote:

Hello to all,

In Struts-1.1 it is possible to bind Actions to static URL path,
but is it possible to bind Actions to the set of the paths,
described by Java regular expression?
For example:
action-mappings
action  path=/users/.*
type=com.mysite.UserPageAction
scope=session
validate=false
/action
/action-mappings
I mean that in this case the requests for /users/John/,
/users/Mary/ and etc. will be handled by com.mysite.UserPageAction.
Thanks for attention,
  Sergey Proskurnya.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


RE: Please Help With This Error Message

2003-12-17 Thread hgosper
Sorry, shouldn't have copy/pasted. I meant

html-el:text property=creator value=${author} size=82 
maxlength=25 tabindex=1/

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.






[EMAIL PROTECTED]
18/12/2003 01:05 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:RE: Please Help With This Error Message


 Maybe they can tell you a fancy -el/JSTL way to do it. :)

yes, if you use html-el:text instead then you should be able to use an el 
expression a'la:

html-el:text property=creator value=${author}/ size=82 
maxlength=25 tabindex=1/

you'll need something like this at the top of your jsp

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

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 

e-mail for such purpose.






Barett McGavock [EMAIL PROTECTED]
18/12/2003 10:58 AM
Please respond to Struts Users Mailing List

 
To: 'Struts Users Mailing List' 
[EMAIL PROTECTED]
cc: 'Caroline Jen' [EMAIL PROTECTED]
Subject:RE: Please Help With This Error Message


C,

You can't nest tags as you did in the value attribute.
bean:define ... value=bean:write name=author/ /

The rest of the list will croak when I recommend that you use
%= author %
instead of
bean:write name=author/

Maybe they can tell you a fancy -el/JSTL way to do it. :)

B

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 4:46 PM
To: Struts Users Mailing List
Subject: Re: Please Help With This Error Message


Hi, I tried and tried.  I cannot figure out the error.
 I need your sharp eyes and experience.  I keep
getting this error message in the browser:

ServletException in:/article/content/postForm.jsp]
/article/content/postForm.jsp(32,67) equal symbol
expected' 

This postForm.jsp had worked find before I inserted:

bean:define id=author name=cr scope=session 
type=java.lang.String/
html:text property=creator value=bean:write name=author/ 
size=82
maxlength=25 tabindex=1/

And the error message points at the bean:define ...
tag.  The statements are in ONE line (they do not
wrapped around) in my file.

cr is passed to the postForm.jsp in a session object
this way:

c:set var=cr value=${articleForm.creator} scope=session/ 

Thanks a lot.

-C 
--- Firat TIRYAKI [EMAIL PROTECTED] wrote:
 maybe you don't have a space character between
 creator and scope... try to
 write the tag in one line, not multiple lines.
 
 F.
 
 - Original Message -
 From: fredatwork [EMAIL PROTECTED]
 To: 'Struts Users Mailing List'
 [EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:53 AM
 Subject: RE: Please Help With This Error Message
 
 
 Your statement is OK. It comes from the surrounding
 quote.
 
 The only idea I have is to check double-quotes
 correctly.
 
 Fred
 
 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: mercredi 17 décembre 2003 07:41
 To: [EMAIL PROTECTED]
 Subject: Please Help With This Error Message
 
 Please help me to figure out this error message that
 I
 got in the browser: equal symbol expected.
 
 The error complains about this statement in my JSP: bean:define 
 id=author name=creator scope=session type=java.lang.String/
 
 and the above statement is intended to retrieve the
 string creator from a session object.
 
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing. 
 http://photos.yahoo.com/
 

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


RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Robert Taylor
What exactly are you trying to accomplish? What's the
high level view?

If you can explain your intent, maybe we can suggest an easier
way to accomplish your goal.

Is articleForm associated with action mapping /list/Message?
If so, then you could do something like:

html:form action=/list/Message
html:hidden property=creator/
html:submitView/Send Messages/html:submit
/html:form

This of course, assumes you have already populated creator in
articleForm in some other action using the same form.


The action with mapping /list/Message, which processes articleForm could
do something like:

MyForm articleForm = (MyForm) form;
String creator = articleForm.getCreator();
request.getSession().setAttribute(creator, creator);
return mapping.findForward(success);


In JSP#2 you could do something like this:
c:out value=${creator}/

robert


 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:25 PM
 To: Struts Users Mailing List
 Subject: RE: How To Output the Value of a String That Is Passed From
 Another JSP?


 Hi, my JSP#1 and JSP#2 use different forms.  However,
 property name in JSP#1 is the same as that in JSP#2.
 I tried to pass this Sring and write it out in a text
 field in JSP#2 and just could not get it right.  I got
 this error
 message:

 [ServletException in:/article/content/postForm.jsp]
 Cannot find bean cr in scope session'

 In my view.jsp, I put a String in a session object:

html:form action=/list/Message
c:set var=cr value=${articleForm.creator}
 scope=session/
html:submitView/Send Messages/html:submit
/html:form

 And in postForm.jsp, I tried to retrieve that String
 and write it out in a text field this way:

   bean:define id=author name=cr
 scope=session type=java.lang.String/
   html:text property=creator
 value=%=author% size=82 maxlength=25
 tabindex=1/

 -Caroline

 --- Robert Taylor [EMAIL PROTECTED] wrote:
  There are a couple (3) ways to do it.
 
  1. Have both JSP#1 and 2 use the same form then have
  the action that
  processes JSP#1 simply
  forward to JSP#2 and Struts will auto-populate the
  field.
 
  2. Have the action that processes JSP#1 forward or
  redirect to
 JSP#2 whose form has the same property name.
  Place the create property
 value in the query string and Struts will
  auto-populate the form
 in JSP#2.
 
  3. Have the action that processes JSP#1 access and
  populate the form used
 in JSP#2 with the property then forward to JSP#2.
 
  robert
 
   -Original Message-
   From: Caroline Jen [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 16, 2003 8:33 PM
   To: [EMAIL PROTECTED]
   Subject: How To Output the Value Of a Hidden
  Field?
  
  
   My JSP #2 receives a hidden field passed from JSP
  #1:
   html:hidden property=creator/
  
   In the JSP #2, I have a text field:
   html:text property=creator size=82
  maxlength=25
   tabindex=1/
  
   and I want the value of the hidden field to be the
   text in the text field of the JSP #2.  Please
  advise
   how to do it?
  
   __
   Do you Yahoo!?
   New Yahoo! Photos - easier uploading and sharing.
   http://photos.yahoo.com/
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


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

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



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



Re: Best way to parse a String and replace line feeds with br for html?

2003-12-17 Thread Brice Ruth
You'll either need to write a custom taglib, or use a scriptlet as follows:

% myString = myString.replaceAll(\n,br); %

David Erickson wrote:

Situation:
using the html:textarea element tag to enter notes on an object, thats
getting persisted as a blob in our database.  I would like to be able to
output this to html with the same formatting.. ie the line feeds work.
Whats the best way to do this?  I tried the jstl:core c:out tag and it didnt
work (did not goto the next line), tried the struts bean:write tag same
problem.  Is there another struts tag library I can use?
Thanks,
David
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Robert Taylor
Are you sure that c:set var=cr value=${articleForm.creator}
scope=session/
is placing the value in the intended scope?

Try doing this:

html:form action=/list/Message
c:set var=cr value=${articleForm.creator}scope=session/
c:out value=${cr}/
html:submitView/Send Messages/html:submit
/html:form

To make sure it is actually putting the value in session scope.

If so, then on postForm.jsp try using scriplets to make sure that
the value can be accessed. If it can, then do you have all of your
tag library directives in your pages?

robert

 -Original Message-
 From: Caroline Jen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 8:40 PM
 To: Struts Users Mailing List
 Subject: RE: How To Output the Value of a String That Is Passed From
 Another JSP?


 cr is not a form and there is no action involved.
 There are two JSPs; view.jsp and postForm.jsp and each
 is with its own form (different forms).

 In my view.jsp, I am able to write out String creator
 this way:
 bean:write name=articleForm property=creator/
 and I put the String creator in a session object:

html:form action=/list/Message
c:set var=cr value=${articleForm.creator}
 scope=session/
html:submitView/Send Messages/html:submit
/html:form

 and in the postForm.jsp, I retrieve the String and try
 to write it out in a text field:

   bean:define id=author name=cr
 scope=session type=java.lang.String/
   html:text property=creator
 value=%=author% size=82 maxlength=25
 tabindex=1/

 I got this error message:
 ServletException in:/article/content/postForm.jsp]
  Cannot find bean cr in scope session'

 -Caroline
 --- David Friedman [EMAIL PROTECTED] wrote:
  Caroline,
 
  How do you save the form cr in session scope?
  Does your action use 'scope=session' or are you
  doing a
  'request.getSession().setAttribute(cr,cr);'
  in the first action?
 
  Regards,
  David
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 17, 2003 8:25 PM
  To: Struts Users Mailing List
  Subject: RE: How To Output the Value of a String
  That Is Passed From
  Another JSP?
 
 
  Hi, my JSP#1 and JSP#2 use different forms.
  However,
  property name in JSP#1 is the same as that in JSP#2.
 
  I tried to pass this Sring and write it out in a
  text
  field in JSP#2 and just could not get it right.  I
  got
  this error
  message:
 
  [ServletException in:/article/content/postForm.jsp]
  Cannot find bean cr in scope session'
 
  In my view.jsp, I put a String in a session object:
 
 html:form action=/list/Message
 c:set var=cr value=${articleForm.creator}
  scope=session/
 html:submitView/Send Messages/html:submit
 /html:form
 
  And in postForm.jsp, I tried to retrieve that String
  and write it out in a text field this way:
 
bean:define id=author name=cr
  scope=session type=java.lang.String/
html:text property=creator
  value=%=author% size=82 maxlength=25
  tabindex=1/
 
  -Caroline
 
  --- Robert Taylor [EMAIL PROTECTED] wrote:
   There are a couple (3) ways to do it.
  
   1. Have both JSP#1 and 2 use the same form then
  have
   the action that
   processes JSP#1 simply
   forward to JSP#2 and Struts will auto-populate the
   field.
  
   2. Have the action that processes JSP#1 forward or
   redirect to
  JSP#2 whose form has the same property name.
   Place the create property
  value in the query string and Struts will
   auto-populate the form
  in JSP#2.
  
   3. Have the action that processes JSP#1 access and
   populate the form used
  in JSP#2 with the property then forward to
  JSP#2.
  
   robert
  
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 8:33 PM
To: [EMAIL PROTECTED]
Subject: How To Output the Value Of a Hidden
   Field?
   
   
My JSP #2 receives a hidden field passed from
  JSP
   #1:
html:hidden property=creator/
   
In the JSP #2, I have a text field:
html:text property=creator size=82
   maxlength=25
tabindex=1/
   
and I want the value of the hidden field to be
  the
text in the text field of the JSP #2.  Please
   advise
how to do it?
   
__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and
  sharing.
http://photos.yahoo.com/
   
   
  
 
 -
To unsubscribe, e-mail:
   [EMAIL PROTECTED]
For additional commands, e-mail:
   [EMAIL PROTECTED]
   
  
  
  
 
 -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
 
 
  __
  Do you Yahoo!?
  New Yahoo! Photos - easier uploading and sharing.
  http://photos.yahoo.com/
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL 

Re: Best way to parse a String and replace line feeds with br f or html?

2003-12-17 Thread Jason Lea
That does mean you are adding some html formatting to the action which 
isn't so nice.  Another option that I have used while waiting for the 
next version of JSTL is the jakarta string taglib:  
http://jakarta.apache.org/taglibs/doc/string-doc/intro.html

eg

|str:replace replace=NL with=lt;brgt;NL newlineToken=NL
A sentence.
Another sentence.
Some more to test. And insert Br's into.
Hopefully./str:replace|
So you can leave the object/form as is, and use this taglib to change 
newlines to br's on the JSP page

Barett McGavock wrote:

Thoughts:
1) Assuming that you have a separate value object to carry this 
item to the view, try replacing any \n with br in the action.
2) Have you also considered using the pre HTML tag?

B

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 5:05 PM
To: Struts Mailing List
Subject: Best way to parse a String and replace line feeds with br for
html?

Situation:
using the html:textarea element tag to enter notes on an object, thats
getting persisted as a blob in our database.  I would like to be able to
output this to html with the same formatting.. ie the line feeds work. Whats
the best way to do this?  I tried the jstl:core c:out tag and it didnt work
(did not goto the next line), tried the struts bean:write tag same problem.
Is there another struts tag library I can use? Thanks, David
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
Jason Lea


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


RE: Commons validation framework and struts

2003-12-17 Thread Robert Taylor
The attachment didn't come through.

robert

 -Original Message-
 From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 12:31 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Commons validation framework and struts


 Hello Robert,

 Yes. I have also defined the validator plugin in my
 struts-config.xml file.
 I am attaching my example code here. Please tell me why it is not working.

 Thanks for your help and patience.

 Regards,
 Abhishek.

 -Original Message-
 From: Robert Taylor [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 12, 2003 8:21 PM
 To: Struts Users Mailing List
 Subject: RE: Commons validation framework and struts

 Your field names aren't the same.

 operator1 != operand1
 operator2 != operand2

 They must be the same or validation on those fields won't occur.

 robert

  -Original Message-
  From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 12, 2003 9:35 AM
  To: [EMAIL PROTECTED]
  Subject: Commons validation framework and struts
 
 
  Hello All,
 
  I am trying to learn the new validation framework provided with struts
  1.1 and am facing a few problems.
 
  I have a form object which I have derived from ValidatorForm class. In
  this form I have fields like operator1, operator2. I have created a
  file called validation.xml where I have made entries like
 
  form-validation
  formset
  form name='calcForm'
  field name='operand1' depends='required'
  /field
  field name='operand2' depends='required'
  /field
  /form
  /formset
  /form-validation
 
  The entry for action in my struts config is
 
  action path='/calc'
  type='com.abhi.CalcAction'
  scope='request'
  name='calcForm'
  parameter='action'
  input='/calc.jsp'
  validate='true'
  forward name='success2' path='/calc.jsp' /
  /action
 
  form-bean
  name=calcForm
  type=com.abhi.CalcForm
  /
 
  The application is working fine. Except that when I leave the fields
  operator1 or operator2 empty then no error is reported.
 
  Is there some step which I have missed out? Please help me out.
 
  Regards,
  Abhishek.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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





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



RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Caroline Jen
Thanks for your advice.  I did this in my view.jsp:

html:form action=/list/Message
c:set var=cr value=${articleForm.creator}
scope=session/
c:out value=${cr}/
html:submitView/Send Messages/html:submit
/html:form
bean:write name=articleForm property=creator/

I was able to see the View/Send Messages button
displayed.  And the bean:write name=articleForm
property=creator/ also wrote out the value of the
property creator.

Now, the question is 

1. why the c:set var=cr
value=${articleForm.creator} scope=session/ did
not put the value in the session scope?  

2. What is wrong with the c:set   tag?  

3. What should I do if I want to put the value of
creator in a session scope?

-C


--- Robert Taylor [EMAIL PROTECTED] wrote:
 Are you sure that c:set var=cr
 value=${articleForm.creator}
 scope=session/
 is placing the value in the intended scope?
 
 Try doing this:
 
 html:form action=/list/Message
 c:set var=cr
 value=${articleForm.creator}scope=session/
 c:out value=${cr}/
 html:submitView/Send Messages/html:submit
 /html:form
 
 To make sure it is actually putting the value in
 session scope.
 
 If so, then on postForm.jsp try using scriplets to
 make sure that
 the value can be accessed. If it can, then do you
 have all of your
 tag library directives in your pages?
 
 robert
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 17, 2003 8:40 PM
  To: Struts Users Mailing List
  Subject: RE: How To Output the Value of a String
 That Is Passed From
  Another JSP?
 
 
  cr is not a form and there is no action
 involved.
  There are two JSPs; view.jsp and postForm.jsp and
 each
  is with its own form (different forms).
 
  In my view.jsp, I am able to write out String
 creator
  this way:
  bean:write name=articleForm
 property=creator/
  and I put the String creator in a session object:
 
 html:form action=/list/Message
 c:set var=cr value=${articleForm.creator}
  scope=session/
 html:submitView/Send Messages/html:submit
 /html:form
 
  and in the postForm.jsp, I retrieve the String and
 try
  to write it out in a text field:
 
bean:define id=author name=cr
  scope=session type=java.lang.String/
html:text property=creator
  value=%=author% size=82 maxlength=25
  tabindex=1/
 
  I got this error message:
  ServletException in:/article/content/postForm.jsp]
   Cannot find bean cr in scope session'
 
  -Caroline
  --- David Friedman [EMAIL PROTECTED] wrote:
   Caroline,
  
   How do you save the form cr in session scope?
   Does your action use 'scope=session' or are
 you
   doing a
   'request.getSession().setAttribute(cr,cr);'
   in the first action?
  
   Regards,
   David
  
   -Original Message-
   From: Caroline Jen [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, December 17, 2003 8:25 PM
   To: Struts Users Mailing List
   Subject: RE: How To Output the Value of a String
   That Is Passed From
   Another JSP?
  
  
   Hi, my JSP#1 and JSP#2 use different forms.
   However,
   property name in JSP#1 is the same as that in
 JSP#2.
  
   I tried to pass this Sring and write it out in a
   text
   field in JSP#2 and just could not get it right. 
 I
   got
   this error
   message:
  
   [ServletException
 in:/article/content/postForm.jsp]
   Cannot find bean cr in scope session'
  
   In my view.jsp, I put a String in a session
 object:
  
  html:form action=/list/Message
  c:set var=cr
 value=${articleForm.creator}
   scope=session/
  html:submitView/Send Messages/html:submit
  /html:form
  
   And in postForm.jsp, I tried to retrieve that
 String
   and write it out in a text field this way:
  
 bean:define id=author name=cr
   scope=session type=java.lang.String/
 html:text property=creator
   value=%=author% size=82 maxlength=25
   tabindex=1/
  
   -Caroline
  
   --- Robert Taylor [EMAIL PROTECTED] wrote:
There are a couple (3) ways to do it.
   
1. Have both JSP#1 and 2 use the same form
 then
   have
the action that
processes JSP#1 simply
forward to JSP#2 and Struts will auto-populate
 the
field.
   
2. Have the action that processes JSP#1
 forward or
redirect to
   JSP#2 whose form has the same property
 name.
Place the create property
   value in the query string and Struts will
auto-populate the form
   in JSP#2.
   
3. Have the action that processes JSP#1 access
 and
populate the form used
   in JSP#2 with the property then forward to
   JSP#2.
   
robert
   
 -Original Message-
 From: Caroline Jen
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 8:33 PM
 To: [EMAIL PROTECTED]
 Subject: How To Output the Value Of a Hidden
Field?


 My JSP #2 receives a hidden field passed
 from
   JSP
#1:
 html:hidden property=creator/

 In the JSP #2, I have a text field:
 html:text property=creator size=82
maxlength=25
 tabindex=1/

 

Unexpected output ????

2003-12-17 Thread Eric Chow
Hello,

I have used Struts(Tiles) since 1.0.
Recently, I found some problem in using Struts+Tomcat4/5.


In one of the JSP, there is a line as following.
html:link page=/index.jsp?tab=4id=1Eric Chow/html:link



In my home page, that is consist with different JSP and defined in Tiles.

One of the page is dynamic generated by JSP Customer Tag, it just select
some data from the database and output.
The problem is that,


Problem:
   - If there isn't any matching data in the database (select nothing) at
the very first time loading.
   - Load again or reload a thousand times . NO PROBLEM.

   - Add some records to the database, it will automatic load those data in
the page, CORRECT.
   *** DELETE all the records,  the problem APPEAR !,In the original
data display area, it should be display nothing but it always display Eric
Chow  Strange !!?

Un-clever solution:
   - Finally, I changed html:link page=/index.jsp?tab=4id=1Eric
Chow/html:link
   to a href=index.jsptab=4id=1Eric Chow/a
    NO PROBLEM NOW 


-- And also, not only this,  if I did the same steps in other similar
functions. It also will display some strange and unexpected output text.
Those strange output text are always be the BODY TAG contents !!

I am not sure if it is the Struts problem or Tomcat problem.

Eric







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


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



Re: Unexpected output ????

2003-12-17 Thread hgosper
Why are you using a page parameter in the html:link tag instead of a href 
attribute?

try 
html:link href=/index.jsp?tab=4id=1Eric Chow/html:link


Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.






Eric Chow [EMAIL PROTECTED]
18/12/2003 01:56 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Unexpected output 


Hello,

I have used Struts(Tiles) since 1.0.
Recently, I found some problem in using Struts+Tomcat4/5.


In one of the JSP, there is a line as following.
html:link page=/index.jsp?tab=4id=1Eric Chow/html:link



In my home page, that is consist with different JSP and defined in Tiles.

One of the page is dynamic generated by JSP Customer Tag, it just select
some data from the database and output.
The problem is that,


Problem:
   - If there isn't any matching data in the database (select nothing) at
the very first time loading.
   - Load again or reload a thousand times . NO PROBLEM.

   - Add some records to the database, it will automatic load those data 
in
the page, CORRECT.
   *** DELETE all the records,  the problem APPEAR !,In the 
original
data display area, it should be display nothing but it always display 
Eric
Chow  Strange !!?

Un-clever solution:
   - Finally, I changed html:link page=/index.jsp?tab=4id=1Eric
Chow/html:link
   to a href=index.jsptab=4id=1Eric Chow/a
    NO PROBLEM NOW 


-- And also, not only this,  if I did the same steps in other similar
functions. It also will display some strange and unexpected output text.
Those strange output text are always be the BODY TAG contents !!

I am not sure if it is the Struts problem or Tomcat problem.

Eric







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


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





RE: validation and DynaActionForm / concrete question

2003-12-17 Thread Yves Sy
Hi Marco!

I think using only one jsp wherein the number of form elements vary
according to what you are doing can be considered as anti-pattern and
is more of a JSP Model 1 design. The best way to make things work is to
use a separate JSP for each form so that you can properly associate a
separate ActionForm with each ActionMapping.

If you wish to continue with the single jsp solution and still wish to
use DynaValidatorForm, you can write your own Validator class and
declare it in the validator-rules.xml. That way you can control how it
will behave and validate the parameters...

-Yves a.k.a. the witness to your long debates with Chad regarding
morality and politcs :o)


-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 18, 2003 1:30 AM
To: 'Struts Users Mailing List'
Subject: RE: validation and DynaActionForm / concrete question

Hi Wendy,
Only a little problem.. I haven't written any class for my
DynaActionForm. Instead, I declare all the properties in the
struts-config.xml

Struts does all the rest

But, anyway, can u give more details on ur solution to my problem?

Regards
marco

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: 17 December 2003 17:06
To: Struts Users Mailing List
Subject: RE: validation and DynaActionForm / concrete question

 well i think the problem your having is because you're using 
 a dispatch action
 so the form is mapped to the action and its set to validate. You can 
 either separte yu dispatch actions into standard actions or 
 hack it by having a single action that calls your dispatch action much
like you 
 were suggesting doing with jsp.

What about LookupDispatchAction?  It uses a request parameter to figure
out which method to call.  I use it with hidden form fields and a bit of
JavaScript.

In Marco's case, overriding the validate method might work.  Only call
super.validate() if all of the parameters are present.

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

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


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




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



Re: Unexpected output ????

2003-12-17 Thread Eric Chow
Hi,

I corrected it to html:link page=/index.jsp?tab=4id=1Eric
Chow/html:link

But still have the same problem.


Eric



- Original Message - 
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:01 AM
Subject: Re: Unexpected output 


 Why are you using a page parameter in the html:link tag instead of a href
 attribute?

 try
 html:link href=/index.jsp?tab=4id=1Eric Chow/html:link


 Heya Gosper
 CSC Australia
 212 Northbourne Ave, Braddon ACT 2612
 Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
 MOB: 0401 611779
 --
--
 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery. NOTE: Regardless of content, this e-mail shall not operate to
 bind CSC to any order or other contract unless pursuant to explicit
 written agreement or government initiative expressly permitting the use of
 e-mail for such purpose.
 --
--





 Eric Chow [EMAIL PROTECTED]
 18/12/2003 01:56 PM
 Please respond to Struts Users Mailing List


 To: Struts Users Mailing List
[EMAIL PROTECTED]
 cc:
 Subject:Unexpected output 


 Hello,

 I have used Struts(Tiles) since 1.0.
 Recently, I found some problem in using Struts+Tomcat4/5.


 In one of the JSP, there is a line as following.
 html:link page=/index.jsp?tab=4id=1Eric Chow/html:link



 In my home page, that is consist with different JSP and defined in Tiles.

 One of the page is dynamic generated by JSP Customer Tag, it just select
 some data from the database and output.
 The problem is that,


 Problem:
- If there isn't any matching data in the database (select nothing) at
 the very first time loading.
- Load again or reload a thousand times . NO PROBLEM.

- Add some records to the database, it will automatic load those data
 in
 the page, CORRECT.
*** DELETE all the records,  the problem APPEAR !,In the
 original
 data display area, it should be display nothing but it always display
 Eric
 Chow  Strange !!?

 Un-clever solution:
- Finally, I changed html:link page=/index.jsp?tab=4id=1Eric
 Chow/html:link
to a href=index.jsptab=4id=1Eric Chow/a
 NO PROBLEM NOW 


 -- And also, not only this,  if I did the same steps in other similar
 functions. It also will display some strange and unexpected output text.
 Those strange output text are always be the BODY TAG contents !!

 I am not sure if it is the Struts problem or Tomcat problem.

 Eric







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


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






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



Re: Unexpected output ????

2003-12-17 Thread Eric Chow
Hi all,

This also happen on using

html:submit styleClass=btn
bean:message key=msg.add/
/html:submit



Those BODY TAGS 


Eric




- Original Message - 
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:01 AM
Subject: Re: Unexpected output 


 Why are you using a page parameter in the html:link tag instead of a href
 attribute?

 try
 html:link href=/index.jsp?tab=4id=1Eric Chow/html:link


 Heya Gosper
 CSC Australia
 212 Northbourne Ave, Braddon ACT 2612
 Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
 MOB: 0401 611779
 --
--
 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery. NOTE: Regardless of content, this e-mail shall not operate to
 bind CSC to any order or other contract unless pursuant to explicit
 written agreement or government initiative expressly permitting the use of
 e-mail for such purpose.
 --
--





 Eric Chow [EMAIL PROTECTED]
 18/12/2003 01:56 PM
 Please respond to Struts Users Mailing List


 To: Struts Users Mailing List
[EMAIL PROTECTED]
 cc:
 Subject:Unexpected output 


 Hello,

 I have used Struts(Tiles) since 1.0.
 Recently, I found some problem in using Struts+Tomcat4/5.


 In one of the JSP, there is a line as following.
 html:link page=/index.jsp?tab=4id=1Eric Chow/html:link



 In my home page, that is consist with different JSP and defined in Tiles.

 One of the page is dynamic generated by JSP Customer Tag, it just select
 some data from the database and output.
 The problem is that,


 Problem:
- If there isn't any matching data in the database (select nothing) at
 the very first time loading.
- Load again or reload a thousand times . NO PROBLEM.

- Add some records to the database, it will automatic load those data
 in
 the page, CORRECT.
*** DELETE all the records,  the problem APPEAR !,In the
 original
 data display area, it should be display nothing but it always display
 Eric
 Chow  Strange !!?

 Un-clever solution:
- Finally, I changed html:link page=/index.jsp?tab=4id=1Eric
 Chow/html:link
to a href=index.jsptab=4id=1Eric Chow/a
 NO PROBLEM NOW 


 -- And also, not only this,  if I did the same steps in other similar
 functions. It also will display some strange and unexpected output text.
 Those strange output text are always be the BODY TAG contents !!

 I am not sure if it is the Struts problem or Tomcat problem.

 Eric







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


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






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



Check-boxes and formbeans

2003-12-17 Thread vasudevrao gupta

Hi All, 
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean? 

Regards
Vasudevrao gupta


Confidentiality Notice 

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

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



RE: Check-boxes and formbeans

2003-12-17 Thread Jitesh Sinha
you will be able to access fields with same name as an array...

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:31 AM
To: 'Struts Users Mailing List'
Subject: Check-boxes and formbeans



Hi All,
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean?

Regards
Vasudevrao gupta


Confidentiality Notice

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

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



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



RE: Check-boxes and formbeans

2003-12-17 Thread Amit Kumar Sharma
I had the same problemwhen we do
request.getParameterValues(ARRAY_OF_CHECKBOX) the unchecked checkboxes didnt
appeared in the new array...only the checked ones were there.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:47 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


you will be able to access fields with same name as an array...

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:31 AM
To: 'Struts Users Mailing List'
Subject: Check-boxes and formbeans



Hi All,
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean?

Regards
Vasudevrao gupta


Confidentiality Notice

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

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



-
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: Unexpected output ????

2003-12-17 Thread hgosper
hmm ... not sure why that is... I rememeber reading something by Ted 
Husted where he recommended using 
html:link forward=
instead of
html:link page=

but I didn't follow it up, you could do a google search for this thread 
and might get some help there.
you could also try using html-el:link instead and see if you get the same 
error

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

html-el:link href=yourURL Your Link Text /html-el:link

other than that... don't know.

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.






Eric Chow [EMAIL PROTECTED]
18/12/2003 04:01 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Re: Unexpected output 


Hi all,

This also happen on using

html:submit styleClass=btn
bean:message key=msg.add/
/html:submit



Those BODY TAGS 


Eric




- Original Message - 
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:01 AM
Subject: Re: Unexpected output 


 Why are you using a page parameter in the html:link tag instead of a 
href
 attribute?

 try
 html:link href=/index.jsp?tab=4id=1Eric Chow/html:link


 Heya Gosper
 CSC Australia
 212 Northbourne Ave, Braddon ACT 2612
 Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
 MOB: 0401 611779
 
--
--
 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery. NOTE: Regardless of content, this e-mail shall not operate to
 bind CSC to any order or other contract unless pursuant to explicit
 written agreement or government initiative expressly permitting the use 
of
 e-mail for such purpose.
 
--
--





 Eric Chow [EMAIL PROTECTED]
 18/12/2003 01:56 PM
 Please respond to Struts Users Mailing List


 To: Struts Users Mailing List
[EMAIL PROTECTED]
 cc:
 Subject:Unexpected output 


 Hello,

 I have used Struts(Tiles) since 1.0.
 Recently, I found some problem in using Struts+Tomcat4/5.


 In one of the JSP, there is a line as following.
 html:link page=/index.jsp?tab=4id=1Eric Chow/html:link



 In my home page, that is consist with different JSP and defined in 
Tiles.

 One of the page is dynamic generated by JSP Customer Tag, it just select
 some data from the database and output.
 The problem is that,


 Problem:
- If there isn't any matching data in the database (select nothing) 
at
 the very first time loading.
- Load again or reload a thousand times . NO PROBLEM.

- Add some records to the database, it will automatic load those data
 in
 the page, CORRECT.
*** DELETE all the records,  the problem APPEAR !,In the
 original
 data display area, it should be display nothing but it always display
 Eric
 Chow  Strange !!?

 Un-clever solution:
- Finally, I changed html:link page=/index.jsp?tab=4id=1Eric
 Chow/html:link
to a href=index.jsptab=4id=1Eric Chow/a
 NO PROBLEM NOW 


 -- And also, not only this,  if I did the same steps in other similar
 functions. It also will display some strange and unexpected output text.
 Those strange output text are always be the BODY TAG contents !!

 I am not sure if it is the Struts problem or Tomcat problem.

 Eric







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


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






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





RE: How To Output the Value of a String That Is Passed From Another JSP?

2003-12-17 Thread Caroline Jen
Hi, thank you for your attention to my problem.  First
all, I think that I am missing someting.  In order to
use the c:set  and c:out ...  tags, I think
that I have to import a taglib into my JSP and assign
it with a prefix c.  Which taglib should I import? 
Right now, I have these:

%@ taglib uri=/tags/struts-html prefix=html %
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-logic prefix=logic %
%@ taglib uri=/tags/tiles prefix=tiles %
%@ taglib uri=/tags/request prefix=req %

Second, 

html:form action=/list/Message
c:set var=cr value=${articleForm.creator}
scope=session/
c:out value=${cr}/
html:submitView/Send Messages/html:submit
/html:form
%-- The statement below has no problem to write on
the value --%
bean:write name=articleForm property=creator/

Third, the mapping to the next JSP is:

action
roles=administrator,editor,contributor
path=/list/Message
forward=.message.Form
name=postForm
scope=session
validate=false/

Fourth, in the postForm.jsp, I try to retrieve the
value of the String that is passed in a session object
and print it out in a text field:

bean:define id=author name=cr scope=session
type=java.lang.String/
html:text property=creator value=%=author%
size=82 maxlength=25 tabindex=1/

Fifth, the error message is that cr cannot be found
in the session scope.

-Caroline

--- Robert Taylor [EMAIL PROTECTED] wrote:
 What exactly are you trying to accomplish? What's
 the
 high level view?
 
 If you can explain your intent, maybe we can suggest
 an easier
 way to accomplish your goal.
 
 Is articleForm associated with action mapping
 /list/Message?
 If so, then you could do something like:
 
 html:form action=/list/Message
 html:hidden property=creator/
 html:submitView/Send Messages/html:submit
 /html:form
 
 This of course, assumes you have already populated
 creator in
 articleForm in some other action using the same
 form.
 
 
 The action with mapping /list/Message, which
 processes articleForm could
 do something like:
 
 MyForm articleForm = (MyForm) form;
 String creator = articleForm.getCreator();
 request.getSession().setAttribute(creator,
 creator);
 return mapping.findForward(success);
 
 
 In JSP#2 you could do something like this:
 c:out value=${creator}/
 
 robert
 
 
  -Original Message-
  From: Caroline Jen [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 17, 2003 8:25 PM
  To: Struts Users Mailing List
  Subject: RE: How To Output the Value of a String
 That Is Passed From
  Another JSP?
 
 
  Hi, my JSP#1 and JSP#2 use different forms. 
 However,
  property name in JSP#1 is the same as that in
 JSP#2.
  I tried to pass this Sring and write it out in a
 text
  field in JSP#2 and just could not get it right.  I
 got
  this error
  message:
 
  [ServletException
 in:/article/content/postForm.jsp]
  Cannot find bean cr in scope session'
 
  In my view.jsp, I put a String in a session
 object:
 
 html:form action=/list/Message
 c:set var=cr value=${articleForm.creator}
  scope=session/
 html:submitView/Send Messages/html:submit
 /html:form
 
  And in postForm.jsp, I tried to retrieve that
 String
  and write it out in a text field this way:
 
bean:define id=author name=cr
  scope=session type=java.lang.String/
html:text property=creator
  value=%=author% size=82 maxlength=25
  tabindex=1/
 
  -Caroline
 
  --- Robert Taylor [EMAIL PROTECTED] wrote:
   There are a couple (3) ways to do it.
  
   1. Have both JSP#1 and 2 use the same form then
 have
   the action that
   processes JSP#1 simply
   forward to JSP#2 and Struts will auto-populate
 the
   field.
  
   2. Have the action that processes JSP#1 forward
 or
   redirect to
  JSP#2 whose form has the same property name.
   Place the create property
  value in the query string and Struts will
   auto-populate the form
  in JSP#2.
  
   3. Have the action that processes JSP#1 access
 and
   populate the form used
  in JSP#2 with the property then forward to
 JSP#2.
  
   robert
  
-Original Message-
From: Caroline Jen
 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 8:33 PM
To: [EMAIL PROTECTED]
Subject: How To Output the Value Of a Hidden
   Field?
   
   
My JSP #2 receives a hidden field passed from
 JSP
   #1:
html:hidden property=creator/
   
In the JSP #2, I have a text field:
html:text property=creator size=82
   maxlength=25
tabindex=1/
   
and I want the value of the hidden field to be
 the
text in the text field of the JSP #2.  Please
   advise
how to do it?
   
__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and
 sharing.
http://photos.yahoo.com/
   
   
  
 

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


Help needed in form beans

2003-12-17 Thread vasudevrao gupta

Hi All,

I have a same form bean for 5 JSP's(JSP1,JSP2,JSP3,JSP4,JSP5)

All the JSP's use the same form bean.I am keeping the form bean in the
session scope.

When ever I use JSP1, JSP3, I want to see the blank screen even if there
are some values in the formbean.
But, in other JSP's, I want to see the screen with prepopulated values.
I tried using reset() for this and I have set all the values in formbean
to null.But reset is getting called 
for all the action.I want reset to be called only for JSP1,JSP3.

Please provide any direction on this

Regards
VasudevRaoGupta


Confidentiality Notice 

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

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



RE: Check-boxes and formbeans

2003-12-17 Thread Jitesh Sinha
that's correct...you won't be able to get unchecked checkboxes

-Original Message-
From: Amit Kumar Sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:57 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


I had the same problemwhen we do
request.getParameterValues(ARRAY_OF_CHECKBOX) the unchecked checkboxes didnt
appeared in the new array...only the checked ones were there.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:47 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


you will be able to access fields with same name as an array...

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:31 AM
To: 'Struts Users Mailing List'
Subject: Check-boxes and formbeans



Hi All,
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean?

Regards
Vasudevrao gupta


Confidentiality Notice

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

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



-
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: Check-boxes and formbeans

2003-12-17 Thread Amit Kumar Sharma
what is the solution for that than ?we can't keep two array to maintain the
values attachedbecause of this limitation I had to change the complete
logic of the page...
If anybody also has encountered the same problem please do share and the
solution too.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:27 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Check-boxes and formbeans


that's correct...you won't be able to get unchecked checkboxes

-Original Message-
From: Amit Kumar Sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:57 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


I had the same problemwhen we do
request.getParameterValues(ARRAY_OF_CHECKBOX) the unchecked checkboxes didnt
appeared in the new array...only the checked ones were there.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:47 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


you will be able to access fields with same name as an array...

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:31 AM
To: 'Struts Users Mailing List'
Subject: Check-boxes and formbeans



Hi All,
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean?

Regards
Vasudevrao gupta


Confidentiality Notice

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

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



-
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: Check-boxes and formbeans

2003-12-17 Thread hgosper
The trick is to have a hidden field with the same property as the 
checkboxes... then you have an array of checkbox ids that you can iterate 
through.

I had a form where I wanted to delete a bunch of rows from a table... the 
user has to select which row to delete by checking a checkbox and then 
when they click submit I iterate through the checkbox array and remove any 
values I find there from the IDs array... this gives me an array (well, a 
Collection in this case, an ArrayList to be precise) of unchecked 
checkboxes.

Understand what I mean? Hope so. Something like:

 // get the rows that have not been selected for deletion

   // first get all of the ids on the form
   Collection allRows = new ArrayList();
   for(int i = 0; i  form.getRowIds.length; i++)
   {
allRows.add(form.getRowIds()[i]);
   }
 
   // next remove the selected ids
   for (int i = 0; i  form.getCheckedIds().length; i++)
   {
   allRows.remove(form.getCheckedIds()[i]);
   }


Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.






Amit Kumar Sharma [EMAIL PROTECTED]
18/12/2003 05:07 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:RE: Check-boxes and formbeans


what is the solution for that than ?we can't keep two array to maintain 
the
values attachedbecause of this limitation I had to change the complete
logic of the page...
If anybody also has encountered the same problem please do share and the
solution too.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:27 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Check-boxes and formbeans


that's correct...you won't be able to get unchecked checkboxes

-Original Message-
From: Amit Kumar Sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:57 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


I had the same problemwhen we do
request.getParameterValues(ARRAY_OF_CHECKBOX) the unchecked checkboxes 
didnt
appeared in the new array...only the checked ones were there.

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:47 AM
To: Struts Users Mailing List
Subject: RE: Check-boxes and formbeans


you will be able to access fields with same name as an array...

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:31 AM
To: 'Struts Users Mailing List'
Subject: Check-boxes and formbeans



Hi All,
I have many checkboxes with the same name in my html form. I use struts
framework. When i submit the form, will i be able to access the
checkboxes as an array in the form bean? Or should i have a seperate
field for each checkbox in the formbean?

Regards
Vasudevrao gupta


Confidentiality Notice

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

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



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





Connection Pooling

2003-12-17 Thread hernux
Hi all,

I'm having problems with db pooling, in my sistem, there is a process that creates 
lot's of subsystems, and it opens lots of connections in the pool... I have to create 
380 subsystems, but I can't create more than 4 at once.at number 5, pool dies .. 
out of conexions it sais..

So, I got two cuestions... 

1- what am I doing wrong?...
2- is it posible to clean the pool by code, avoiding to restart tomcat every time pool 
dies?

I'm using struts dbpooling .. here's my config:

data-source
set-property property=autoCommit value=false /
set-property property=description value=Conexión a la base de datos /
set-property property=driverClass value=org.postgresql.Driver /
set-property property=maxCount value=256 /
set-property property=minCount value=20 /
set-property property=user value=xxx /
set-property property=password value=xxx /
set-property property=url value=jdbc:postgresql://xxx/xxx /
/data-source

Thanx...



Tiles in Struts 1.1 - TilesRequestProcessor

2003-12-17 Thread Jan Dirksen
Hi
i am using Tiles with the Plugin.tag in
the struts-config.xml
now i saw in the source, that TilesPlugin
uses the TilesRequestProcessor.

okay, however - but i saw in one config-file, that
i could add the TilesRequestProcessor in the config of
struts.

since now i only used the plugin in the config.

is it better to use the TilesRequestProcessor instead?

-in sources i didn´t found anything like deprecated in
the TilesPlugin.

Thanks Jan

__

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

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



<    1   2