losing parameters when jsessionid appended

2003-10-27 Thread Loren Hall

I'm trying to redirect index.jsp to a page determined by a runtime
expression.  I'm using html's meta refresh tag as shown below.  This
solution works, but, only when the jsessionid is not appended to the url,
i.e. it doesn't work at the beginning of a session (affecting a significant
portion of index.jsp loads)

I've never had a problem losing parameter info when jsessionid was appended,
but i've only recently begun using , and this tag, in this situation,
seems to be affected by the jsessionid parameter.  oh wise ones, how can I
forward to the correct page?



-here's the index.jsp code-block--











-end of code-block--


This .jsp block creates two different html pages, depending on whether the
jsessionid is appended

1) the resulting html page when jsessionid isn't appended - this works -
2) the resulting html page with jsessionid appended - doesn't work -


1) 
1a)  reloads page
http://localhost:8080/insite/display.do?action=cat&ID=cat*Home25&;

2)


2a) reloads page http://localhost:8080/insite/display.do  (loses action and
ID data)

What can i do to ensure i will not lose the parameters 'action' and 'ID'

thanks,
Loren



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



RE: Combining struts and JSTL tags...

2003-09-08 Thread Loren Hall

i don't think that's it because it works fine when i import just the bean
taglib

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

or just the c taglib

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

but not both

thanks for the lead though,

Loren

-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 1:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...


This can happen if you have included the bean taglib twice.

Is the page with which you get an error included via an <%@ include
statement?

Paul

-Original Message-
From: Loren Hall [mailto:[EMAIL PROTECTED]
Sent: 06 September 2003 00:13
To: Struts Users Mailing List
Subject: RE: Combining struts and JSTL tags...


i haven't found a resolution to a problem previously posted under another
subject, since it fits this topic I thought
i'd put it out there again.

I started my app using struts tags, and recently incorporated jstl.

Unfortunately I get an error when I import both struts-bean.tld and c.tld

c.tld:   http://java.sun.com/jstl/core)
struts-bean.tld:
http://jakarta.apache.org/struts/tags-bean-1.0.2)

i.e. when these 2 taglib directives appear on a single .jsp

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

i get the following exception:  jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".



FULL ERROR MESSAGE
```

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException:

jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".

at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
at
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
at
org.apache.jasper.compiler.Validator.validate(Validator.java:613)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.

RE: Combining struts and JSTL tags...

2003-09-05 Thread Loren Hall
i haven't found a resolution to a problem previously posted under another
subject, since it fits this topic I thought
i'd put it out there again.

I started my app using struts tags, and recently incorporated jstl.

Unfortunately I get an error when I import both struts-bean.tld and c.tld

c.tld:   http://java.sun.com/jstl/core)
struts-bean.tld:
http://jakarta.apache.org/struts/tags-bean-1.0.2)

i.e. when these 2 taglib directives appear on a single .jsp

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

i get the following exception:  jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".



FULL ERROR MESSAGE
```

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException:

jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".

at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
at
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
at
org.apache.jasper.compiler.Validator.validate(Validator.java:613)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
 

RE: "xmlns:bean" was already specified for element "jsp:root".

2003-09-04 Thread Loren Hall

i have, yes, both taglibs work independent, it's only when i import both


<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>


that i get the 'xmlns:bean" was already specified for element "jsp:root".'
error below

FYI:

c.tld:   http://java.sun.com/jstl/core

struts-bean.tld: http://jakarta.apache.org/struts/tags-bean-1.0.2


Loren


-Original Message-
From: hari_s [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 11:51 PM
To: 'Struts Users Mailing List'
Subject: RE: "xmlns:bean" was already specified for element "jsp:root".



Do You already put this taglib on your web.xml


/WEB-INF/c.tld
/WEB-INF/c.tld
  


/WEB-INF/struts-bean.tld
/WEB-INF/struts-bean.tld
  




-Original Message-
From: Loren Hall [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 11:35 AM
To: Struts Users Mailing List
Subject: "xmlns:bean" was already specified for element "jsp:root".


I just started using jstl's core tags on top of the struts tag my app
was
built on.  But I get a conflict when I import struts-bean.tld and c.tld
on
the same .jsp page . . . help appreciated . . . maybe there's a
particular
parser that will overcome this?

[Versions: tomcat 4.1.24, Struts 1.0.2, jakarta taglibs standard-1.0.3]

e.g.

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

```
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it
from fulfilling this request.
exception

org.apache.jasper.JasperException:

jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".

at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.
java:105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:430
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:112
)
at
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
at
org.apache.jasper.compiler.Validator.validate(Validator.java:613)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:1
90)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
or

"xmlns:bean" was already specified for element "jsp:root".

2003-09-03 Thread Loren Hall

I just started using jstl's core tags on top of the struts tag my app was
built on.  But I get a conflict when I import struts-bean.tld and c.tld on
the same .jsp page . . . help appreciated . . . maybe there's a particular
parser that will overcome this?

[Versions: tomcat 4.1.24, Struts 1.0.2, jakarta taglibs standard-1.0.3]

e.g.

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

```
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception

org.apache.jasper.JasperException:

jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".

at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
at org.apache.jasper.compiler.Validator.validate(Validator.java:613)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)


thanks,

Loren Hall



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



RE: Why is the reset method called when I submit the form?

2003-01-25 Thread Loren Hall
no, i'm not chaining my actions . . .  I like to do my actions one at a
time.

If nobody knows right off, then this is a non-issue for me, i've worked
around it.  and my next step is 1.1, not solving it.  It is however
perplexing, the code executing doesn't even appear to be mine.

Loren


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 5:44 AM
To: Struts Users Mailing List
Subject: RE: Why is the reset method called when I submit the form?


Are you trying to chain your actions?

-Original Message-----
From: Loren Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 23 January 2003 21:40
To: Struts Users Mailing List
Subject: RE: Why is the reset method called when I submit the form?




I had similar behavior that I found odd with 1.0.2, the actionform would be
populated, reset was then called, and then validate was called.

Jeremy, my *solution* was to overwrite reset() to do nothing at all. By
creating another method to mimic the reset, I now call reset when it's more
advantageous.


>I guess struts calls reset in order to save all
> your input and then does the validation

I don't get that on two assumptions, (clarification appreciated.)

1) Isn't reset() to clear out old data from a bean being recycled, as
opposed to a method for saving that old data?
2) Isn't the very role of validating to prevent unruly, non-conforming data
from being saved?

Loren



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject: RE: Why is the reset method called when I submit the form?


I guess struts calls reset in order to save all your input and then does the
validation

Regards,


PQ

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Jeremy Cavagnolo [mailto:[EMAIL PROTECTED]]
Sent: January 22, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject: Why is the reset method called when I submit the form?

It seems that when I submit my form, the reset method is called before
the validate method.  I am using struts 1.0.2.

Any insight?

-Jeremy




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



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


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




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




RE: Why is the reset method called when I submit the form?

2003-01-23 Thread Loren Hall


I had similar behavior that I found odd with 1.0.2, the actionform would be
populated, reset was then called, and then validate was called.

Jeremy, my *solution* was to overwrite reset() to do nothing at all. By
creating another method to mimic the reset, I now call reset when it's more
advantageous.


>I guess struts calls reset in order to save all
> your input and then does the validation

I don't get that on two assumptions, (clarification appreciated.)

1) Isn't reset() to clear out old data from a bean being recycled, as
opposed to a method for saving that old data?
2) Isn't the very role of validating to prevent unruly, non-conforming data
from being saved?

Loren



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject: RE: Why is the reset method called when I submit the form?


I guess struts calls reset in order to save all your input and then does the
validation

Regards,


PQ

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Jeremy Cavagnolo [mailto:[EMAIL PROTECTED]]
Sent: January 22, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject: Why is the reset method called when I submit the form?

It seems that when I submit my form, the reset method is called before
the validate method.  I am using struts 1.0.2.

Any insight?

-Jeremy




--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Cannot use ActionBeans - Error "cannot find ActionMappings or ActionFormBeans"

2003-01-14 Thread Loren Hall
hello Jaime,

The described error I've seen twice, each resulting from failed parsing of
struts-config.xml, i saw it when i tried to initialize a data source.  The
failed initiation prevented the ActionMappings or ActionFormBeans from being
properly initialized (or recognized) later in the file.

Think of the few changes you've made to the example's config, or otherwise
focus on your struts-config.xml (check for ).  Perhaps
somebody else knows a xml tool that can analyze the file and point out the
error for you.

soon you'll be strutting around,

Loren



-Original Message-
From: Jaime Marcondes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 4:12 AM
To: [EMAIL PROTECTED]
Subject: Cannot use ActionBeans - Error "cannot find ActionMappings or
ActionFormBeans"


Hello, All.

I'm a new in the struts framework and i tried to make a little project
using this framework, but when i try to use a actionbean, it says:

"org.apache.jasper.JasperException: Cannot find ActionMappings or
ActionFormBeans collection ..."

The web.xml:
===


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>





  Book
  teste.struts.Book



  BookAction
  teste.struts.BookAction




  action
  org.apache.struts.action.ActionServlet
  
  application

org.apache.struts.webapp.example.ApplicationResources
  
  
  config
  /WEB-INF/struts-config.xml
  
  
  debug
  2
  
  
  detail
  2
  
  
  validate
  true
  
  2



  action
  *.do



  Book
  /Book



  BookAction
  /BookAction



  index.jsp




  /WEB-INF/struts-bean.tld
  /WEB-INF/struts-bean.tld



  /WEB-INF/struts-html.tld
  /WEB-INF/struts-html.tld



  /WEB-INF/struts-logic.tld
  /WEB-INF/struts-logic.tld





The struts-config.xml
===

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


 
   
 

 
   
 

 
   
 type="teste.struts.BookAction"
 name="bookForm"
 scope="request"
 input="/CreateBook.jsp">
   
 




The BookView.jsp
=
<%@ page language="java" %>
<%@ 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" %>


 
   
   Teste
 

 
   BookView

   
 Title: 
 
   
 




I don't know what is wrong, since this is a test from the faq of struts,
which i modified to
learn.

Thanks for help,

Jaime



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How should I pass an exposed bean variable as custom tag parameter?

2003-01-08 Thread Loren Hall
Arg, i can't see how to pass bean variables as parameters to my own custom
tag.  It seems like this should be easy, but it appears to be a common
problem, previous posts have led to my attempting various methods . . .
without success, perhaps since i'm trying to pass an array.

Please help!

I'm trying to pass a variable, exposed by the  tag, to a custom tag.

'Submission' is the bean, and 'attributes' is a Object[] in 'Submission', to
demonstrate, this prints from the array:


 






 


What I'd like to do is pass submission.attributes into my tag as the
variable data . . . I've tried many ways, this is the "phonetic" code, which
doesn't work.









thanks in advance,
Loren




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tracking sessions (newbie)

2003-01-06 Thread Loren Hall

I seem to have colliding sessions, I figure as a result of improperly using
jsessionids. Was I wrong to think that struts and tomcat handled this
transparently?

Current Situation:

The appearance of jsessionid= in urls is erratic, appending the jsessionid
to the inital login url one minute, but not the next.

It's appended to both the page url and to a mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




Repeating SessionID (newbie)

2003-01-01 Thread Loren Hall

My project login procedures are recycled from the struts-example code.

I'm finding that the same sessionID e.g. BFDDDC81ECBFC3720ACB48FED74B970A is
being assigned to every session when I have simultaneous logins with
different users.

End result, the session-scope bean retrieval grabs the wrong UserView, (or
perhaps the only one remaining)


Any thoughts as to what could cause the sessionID to repeat like this are
greatly appreciated?

thanks in advance,
Loren

[American Airlines saved $40,000 in 1987 by eliminating one olive from each
salad served in first-class.]



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to connect a database in SQL Server ? (NEWBIE)

2002-12-30 Thread Loren Hall

Hi, trying to help my webhost get this working for mySQL.  Previously posted

> The datasource must be registered with the application server you are
using.

I've got tomcat and apache involved, what files do I need to make changes
to?  Is registering simply copy-pasting the data-source element from
struts-config to server.xml?


thanks,
Loren

-Original Message-
From: Jitendra Singh [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 29, 2002 1:01 AM
To: Struts Users Mailing List
Subject: Re: How to connect a database in SQL Server ?


The datasource must be registered with the application server you are using.
First check if its done.

Jitendra
- Original Message -
From: "Tanmaya" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 5:44 PM
Subject: How to connect a database in SQL Server ?


Hi All,

I am new to Struts.Kindly anyone let me know, what I should do, to connect a
database in SQL Server.I have the struts-config.xml file where I defined the
datasource parameters...



  
   
  
  
  
  
  
  

  

In the Action class,I tried to access the database in perform method as
follows...

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

Connection connection = null;
DataSource dataSource = null;
Statement statement = null;
ResultSet resultSet = null;
try {
dataSource = servlet.findDataSource(null);
connection = dataSource.getConnection();
statement = connection.createStatement();
resultSet = statement.executeQuery("select * from team_shift");
System.out.println("\n\n AFTER EXEcuting the query.");
while (resultSet.next())
{

System.out.println("Shift:"+resultSet.getString("shift_code"));
}
resultSet.close(); // just a test
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {

try {
connection.close();
} catch (SQLException e) {
getServlet().log("Connection.close", e);
}
}


In this way I am able to connect to the default database of SQL Server(i.e.
master) database successfully.I wanna access to my own database.How can I
achive it ??Where should I mention my database name ?? I tried by mentioning
my database name in the url property as follow :
set-property property="url"
value="jdbc:microsoft:sqlserver://tanmaya:1433/TAProd"/>

But in this way I am getting error (org.apache.jasper.JasperException:
Cannot find ActionMappings or ActionFormBeans collection) while tried to
access the jsp itself.

Please help me to knock this problem down.

Thanks in advance,
Tanmaya


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




logon servlet through html forms "resource not available"

2002-12-28 Thread Loren Hall
New to this and can't access /logon action through a standard html form

I'm integrating some struts functionality with a pre-existing, html based
site.  At index.html I'd like a login form, but don't want to force a change
to index.jsp.  However, i've tried action="logon",
action="/summershow/logon" and it says The requested resource (/logon) is
not available. I figure it's a path issue vs. an access issue, but for all I
know an html form just won't work.


First, any thoughts why the following html form tag won't work, and second,
what is the standard solution for this situation, .jsp or .html?








responds with

type: Status report
message: /logon
description: The requested resource (/logon) is not available.


The servlet is under catalina/webapps/summershow/WEB-INF/ . . .  The working
code looks like this.



  User Name:   
Password:
  
  






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: reset doesn't work well

2002-12-20 Thread Loren Hall
> " public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
> Reset all bean properties to their default state. This method is called
before the properties are repopulated by the > >
> controller servlet.

My log indicates that the controller is populating a recycled form bean AND
THEN resetting it ?!?

LOG DATA {

Processing a POST for /customize
2002-12-20 15:36:32 action:  Looking for ActionForm bean under attribute
'ModelForm'
2002-12-20 15:36:32 action:  Recycling existing ActionForm bean instance of
class 'Insites.theSystem.ModelForm'
2002-12-20 15:36:32 action:  Populating bean properties from this request
2002-12-20 15:36:32 action:
reset called

}

( "reset called" printed from my reset() override)


I initial avoided the problem by overriding reset() to do nothing except set
the checkbox variable to address the issue with unchecking, and to print the
"reset called" message above.  I also have validate=false

But, complications with that "solution" appear unavoidable.  Anybody seen
this behavior before?

I'm Using stable struts version 1.0.2 . . . and I'm also new to Struts,


thanks

Loren









-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 1:17 PM
To: Struts Users Mailing List
Subject: RE: reset doesn't work well



Hi, Bill:
Thank you for reply.
The ActionForm api says:

   " public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)

   Reset all bean properties to their default state. This method is called
before the properties are repopulated by the controller servlet.
The default implementation does nothing. Subclasses should override this
method to reset all bean properties to default values. "





I have overitten the reset method to reset both amount and password to null.
>From my understanding, whenever user clicks reset button, it will call the
reset method, therefore, all the fields should be cleared.


Please correct me if I am wrong.


Thanks

 "Siggelkow, Bill" <[EMAIL PROTECTED]> wrote:The really has nothing
to do with the reset method of your form ... instead this renders an
[input]  button that will reset the form fields to their "default" state as
known by the browser. Therefore, in the case when you have returned to the
form after a validation failure the default values are the values in the
form bean returned to the input page. I see a couple of options ..

1) You could have your validate() method clear out the fields that erroneous
(or clear them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the
pre-populated values you could do this with an onclick event calling
JavaScript.

Personally, I would go with option 1 as it will not confuse the user about
what the Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have . In my form
class, I have:

public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
}

in the struts-config.xml file, it has:

type="yyy"
name="myForm"
scope="request"

input="/zzz.jsp">



I filled out the fields, if I click reset button before submit the form, the
fields are cleared. But if I submit the form first, and it detects some
error(for example: the password is not correct), the form is showed with
error message. In this case, when I click reset button, the fields are not
cleared. What is wrong with this. I really want the fields can be cleared if
errors are detected. Could someone help me out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

--
To unsubscribe, e-mail:
For additional commands, e-mail:



-
Post your free ad now! Yahoo! Canada Personals



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: form action doubt

2002-12-18 Thread Loren Hall
I'm pretty new to this, but it's possible your struts-config isn't being
read fully because of an error.  I received the similar error:

javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection

after adding a data source element to the struts-config.xml which tomcat
couldn't successfully initialize : (  Without that element the .jsp page
worked just fine.

hope that helps,

Loren

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 9:50 PM
To: [EMAIL PROTECTED]
Subject: form action doubt


hi  all,

 i've usedin my jsp when i try to
execute  the jsp i get the exception

"org.apache.jasper.JasperException: Cannot find ActionMappings or
ActionFormBeans collection"

-[Mohammed_Rafeeq]

**
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**



--
To unsubscribe, e-mail:   
For additional commands, e-mail: