Re: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
ok i've manager to connect to the datasource! What I did was to move my jars
into common/lib.

Now I have another problem though. For some reason this driver does not like
my queries - more specifically it does not like table names used on their
own but only likes them when the database name and database user is inserted
before it like 'dbname.dbo.user_table'. Why is this? I cannot change all my
queries (and there are alot of them) so that they have this prefix as it
will cause many problems if the application has to be ported to another
database. Is this an SQL Server database setting, or something to do with
the driver itself?

I know I'm getting off the struts issue now but any help would be great! :)



- Original Message -
From: "Claire Wall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 3:19 PM
Subject: Re: microsoft sqlserver driver & struts


> Ian,
>
> This is the way I tried first as it seemed most logical to use the
> SQLServerDataSource type from the mssqlserver.jar but this doesnt work for
> me. The only one that made some progress was the
> com.microsoft.jdbcx.base.BaseDataSource but then this threw some strange
> error which said:
>
> java.lang.NoClassDefFoundError: com/merant/jdbcspy/SpyLogger
>  at com.microsoft.jdbcx.base.BaseDataSource.setLogWriter(Unknown Source)
>
> I've had a look into this but I don't see why this error should be
occuring.
> Maybe there's something wrong I have done with where I've put the jars.. I
> have three jars: mssqlserver.jar, msbase.jar and msutil.jar. the last two
> look to be pretty similiar with regards to what they contain. I was
> wondering whether this could be causing conflicts or something.
>
> As I said, i can connect fine to the datasource from a test class but
going
> via struts is causing this Invalid DataSource problem.
>
> Claire
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, February 27, 2004 3:02 PM
> Subject: Re: microsoft sqlserver driver & struts
>
>
> > Hi Claire,
> >
> > We are successfully connecting to a Microsoft SQL Server 2000 using the
> > type 4 JDBC drivers.  However, we do not use DBCP, but rather the
> > DataSource implementation provided by Microsoft.  Here is the
> configuration
> > we use (this is taken from an internal configuration file that we use to
> > create the DataSource's from an AXIS handler for our web services, not
> > struts-config.xml, but the same properties should work)
> >
> >  > ="com.microsoft.jdbcx.sqlserver.SQLServerDataSource">
> >  XXX
> >  Peregrine
> >  1433
> >  60
> >  XXX
> >  XXX
> > 
> >
> > Also, if you need to connect to the same database across multiple web
> apps,
> > you want to look into using JNDI instead of the struts-config.xml file.
> >
> >
> > HTH,
> > Ian
> >
> >
> >
> >
> > "Claire Wall"
> > <[EMAIL PROTECTED]   To: "Struts Users Mailing
> List" <[EMAIL PROTECTED]>
> > tosys.com> cc:
> >Subject: microsoft
> sqlserver driver & struts
> > 02/27/2004 05:34
> > AM
> > Please respond
> > to "Struts Users
> > Mailing List"
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > I am trying to use microsoft's jdbc driver with my struts application,
but
> > to no avail. Here is my datasource definition:
> >
> >   
> >
> > > ="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
> > > ="jdbc:microsoft:sqlserver://SERVERNAME:1433;DatabaseName=DBNAME"/>
> >
> >
> >
> >
> >
> >
> >
> >
> >   
> >
> > I have the required jars located in the WEB-INF/lib of my application
> which
> > is running on Tomcat 4.1.29. When i try to connect to the database using
> > this driver from a test class, it connects no problem so i know that the
> > url and driver class name are correct. So the problem must be the type
of
> > DataSource which I am to use. Does anybody know which datasource to use
> > with Microsoft's sqlserver driver? I tried using the DataSource that is
in
> > th

Re: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
Ian,

This is the way I tried first as it seemed most logical to use the
SQLServerDataSource type from the mssqlserver.jar but this doesnt work for
me. The only one that made some progress was the
com.microsoft.jdbcx.base.BaseDataSource but then this threw some strange
error which said:

java.lang.NoClassDefFoundError: com/merant/jdbcspy/SpyLogger
 at com.microsoft.jdbcx.base.BaseDataSource.setLogWriter(Unknown Source)

I've had a look into this but I don't see why this error should be occuring.
Maybe there's something wrong I have done with where I've put the jars.. I
have three jars: mssqlserver.jar, msbase.jar and msutil.jar. the last two
look to be pretty similiar with regards to what they contain. I was
wondering whether this could be causing conflicts or something.

As I said, i can connect fine to the datasource from a test class but going
via struts is causing this Invalid DataSource problem.

Claire

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 3:02 PM
Subject: Re: microsoft sqlserver driver & struts


> Hi Claire,
>
> We are successfully connecting to a Microsoft SQL Server 2000 using the
> type 4 JDBC drivers.  However, we do not use DBCP, but rather the
> DataSource implementation provided by Microsoft.  Here is the
configuration
> we use (this is taken from an internal configuration file that we use to
> create the DataSource's from an AXIS handler for our web services, not
> struts-config.xml, but the same properties should work)
>
>  ="com.microsoft.jdbcx.sqlserver.SQLServerDataSource">
>  XXX
>  Peregrine
>  1433
>  60
>  XXX
>  XXX
> 
>
> Also, if you need to connect to the same database across multiple web
apps,
> you want to look into using JNDI instead of the struts-config.xml file.
>
>
> HTH,
> Ian
>
>
>
>
> "Claire Wall"
> <[EMAIL PROTECTED]   To: "Struts Users Mailing
List" <[EMAIL PROTECTED]>
> tosys.com> cc:
>Subject: microsoft
sqlserver driver & struts
> 02/27/2004 05:34
> AM
> Please respond
> to "Struts Users
> Mailing List"
>
>
>
>
>
>
> Hi,
>
> I am trying to use microsoft's jdbc driver with my struts application, but
> to no avail. Here is my datasource definition:
>
>   
>
> ="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
> ="jdbc:microsoft:sqlserver://SERVERNAME:1433;DatabaseName=DBNAME"/>
>
>
>
>
>
>
>
>
>   
>
> I have the required jars located in the WEB-INF/lib of my application
which
> is running on Tomcat 4.1.29. When i try to connect to the database using
> this driver from a test class, it connects no problem so i know that the
> url and driver class name are correct. So the problem must be the type of
> DataSource which I am to use. Does anybody know which datasource to use
> with Microsoft's sqlserver driver? I tried using the DataSource that is in
> the mssqlserver jar but this didnt work either.
>
> The error that I get is an Invalid DataSource.
>
> Any help would be really appreciated!
>
> Thanks
> Claire
>
>
>
>
>
>
>
> This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Re: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
here's the error i'm getting:

javax.servlet.UnavailableException: Initializing application data source
DBNAME
 at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:1091)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3420)
 at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2567)
 at
org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:802)
 at
org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.ja
va:501)
 at
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.jav
a:151)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:551)
 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.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)

then from thereafter it says that i have an Invalid DataSource. Where do you
have your mssqlserver jars? i have mine in WEB-INF/lib. and there are three
of them - mssqlserver.jar, msbase.jar, msutil.jar.

claire

- Original Message -
From: "Srikanth Gubba" <[EMAIL PROTECTED]>
To: "'Claire Wall'" <[EMAIL PROTECTED]>; "Struts Users Mailing List"
<[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 1:18 PM
Subject: RE: microsoft sqlserver driver & struts


> Hi,
>
> I am using the same datasource configuration as you do:
> 
>value="com.microsoft.jdbc.sqlserver.SQLServerDriver" />
> 
>
value="jdbc:microsoft:sqlserver://**.***.***.***:1433;DatabaseName=tesstdb"
> />
>value="***" />
>value="***" />
>value="10" />
>value="5000" />
>value="true" />
>value="false" />
> 
>
> and in the code ,
> DataSource dataSource = (DataSource)

Re: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
nope, that didnt work either :(

Anybody else out there use SQL Server and connects to it via Microsoft's SQL
Server JDBC driver? there must be somebody

Thanks
Claire

- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 12:14 PM
Subject: Re: microsoft sqlserver driver & struts


> Ah okay.. If you've had the same stuff running with another database
> i'm tree-barking. No I've never used and hope never to use M$ sql
> server. Postgres, mysql and oracle so I'm signing off this thread.
>
> but before i go try this.
>
> jdbc:microsoft:sqlserver://SERVERNAME:1433;SelectMethod=cursor
>
>
>
> On 27 Feb 2004, at 12:56, Claire Wall wrote:
>
> > Mark,
> >
> > My problem is that I'm switching JDBC drivers - before I was using
> > weblogic's JDBC driver for SQL Server and I've been using that for a
> > long
> > time now and never had any problems. Now I'm trying to ditch the
> > weblogic
> > driver and in its place use Microsoft's JDBC driver for SQLServer.
> > Sorry,
> > should've mentioned that before. I'm not sure that showing the code for
> > getting the datasource is going to help because I'm assuming that this
> > is
> > not the problem - the problem is surely to do with the type of
> > datasource.
> >
> > I had a similiarish problem trying to use an Oracle database - in the
> > end
> > the type of datasource was the problem and not how I retrieved it in my
> > actions.
> >
> > Have you used Microsoft's SQL Server 2000 JDBC driver with struts
> > before,
> > and if so, what type of datasource do we use? Can't find anywhere that
> > says
> > anything about it. Cant be too difficult..
> >
> > Thanks
> > Claire
> >
> > - Original Message -
> > From: "Mark Lowe" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, February 27, 2004 11:43 AM
> > Subject: Re: microsoft sqlserver driver & struts
> >
> >
> >>
> >> Can i see the bits of code in the servlets (non action servlets) at
> >> start up that retrieve the datasource? And an example from any
> >> actions.
> >> Also see the load on start up order as i imagine that the struts
> >> servlet needs to load before your servlets to be able to access the
> >> datasource.
> >>
> >>
> >> On 27 Feb 2004, at 12:39, Claire Wall wrote:
> >>
> >>> It gets thrown when the application starts, but then more errors
> >>> occur
> >>> as
> >>> there are several servlets which load upon start-up - the data source
> >>> is
> >>> null at this point (NullPointerException's are being thrown) and so
> >>> the
> >>> errors are thrown when these classes try to access the database.
> >>>
> >>> - Original Message -
> >>> From: "Mark Lowe" <[EMAIL PROTECTED]>
> >>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >>> Sent: Friday, February 27, 2004 11:29 AM
> >>> Subject: Re: microsoft sqlserver driver & struts
> >>>
> >>>
> >>>> Does the error get thrown when you attempt to access the data source
> >>>> or
> >>>> at startup?
> >>>>
> >>>>
> >>>> On 27 Feb 2004, at 11:34, Claire Wall wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I am trying to use microsoft's jdbc driver with my struts
> >>>>> application,
> >>>>> but to no avail. Here is my datasource definition:
> >>>>>
> >>>>>>>>>> type="org.apache.commons.dbcp.BasicDataSource">
> >>>>>
> >>>>> >>>>> value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
> >>>>> >>>>> value="jdbc:microsoft:sqlserver://SERVERNAME:1433;
> >>>>> DatabaseName=DBNAME"/>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>   
> >>>>>
> >>>>> I

Re: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
Mark,

My problem is that I'm switching JDBC drivers - before I was using
weblogic's JDBC driver for SQL Server and I've been using that for a long
time now and never had any problems. Now I'm trying to ditch the weblogic
driver and in its place use Microsoft's JDBC driver for SQLServer. Sorry,
should've mentioned that before. I'm not sure that showing the code for
getting the datasource is going to help because I'm assuming that this is
not the problem - the problem is surely to do with the type of datasource.

I had a similiarish problem trying to use an Oracle database - in the end
the type of datasource was the problem and not how I retrieved it in my
actions.

Have you used Microsoft's SQL Server 2000 JDBC driver with struts before,
and if so, what type of datasource do we use? Can't find anywhere that says
anything about it. Cant be too difficult..

Thanks
Claire

- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 11:43 AM
Subject: Re: microsoft sqlserver driver & struts


>
> Can i see the bits of code in the servlets (non action servlets) at
> start up that retrieve the datasource? And an example from any actions.
> Also see the load on start up order as i imagine that the struts
> servlet needs to load before your servlets to be able to access the
> datasource.
>
>
> On 27 Feb 2004, at 12:39, Claire Wall wrote:
>
> > It gets thrown when the application starts, but then more errors occur
> > as
> > there are several servlets which load upon start-up - the data source
> > is
> > null at this point (NullPointerException's are being thrown) and so the
> > errors are thrown when these classes try to access the database.
> >
> > - Original Message -
> > From: "Mark Lowe" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, February 27, 2004 11:29 AM
> > Subject: Re: microsoft sqlserver driver & struts
> >
> >
> >> Does the error get thrown when you attempt to access the data source
> >> or
> >> at startup?
> >>
> >>
> >> On 27 Feb 2004, at 11:34, Claire Wall wrote:
> >>
> >>> Hi,
> >>>
> >>> I am trying to use microsoft's jdbc driver with my struts
> >>> application,
> >>> but to no avail. Here is my datasource definition:
> >>>
> >>>>>> type="org.apache.commons.dbcp.BasicDataSource">
> >>>
> >>> >>> value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
> >>> >>> value="jdbc:microsoft:sqlserver://SERVERNAME:1433;
> >>> DatabaseName=DBNAME"/>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>   
> >>>
> >>> I have the required jars located in the WEB-INF/lib of my application
> >>> which is running on Tomcat 4.1.29. When i try to connect to the
> >>> database using this driver from a test class, it connects no problem
> >>> so i know that the url and driver class name are correct. So the
> >>> problem must be the type of DataSource which I am to use. Does
> >>> anybody
> >>> know which datasource to use with Microsoft's sqlserver driver? I
> >>> tried using the DataSource that is in the mssqlserver jar but this
> >>> didnt work either.
> >>>
> >>> The error that I get is an Invalid DataSource.
> >>>
> >>> Any help would be really appreciated!
> >>>
> >>> Thanks
> >>> Claire
> >>>
> >>
> >>
> >> -
> >> 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: microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
It gets thrown when the application starts, but then more errors occur as
there are several servlets which load upon start-up - the data source is
null at this point (NullPointerException's are being thrown) and so the
errors are thrown when these classes try to access the database.

- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 11:29 AM
Subject: Re: microsoft sqlserver driver & struts


> Does the error get thrown when you attempt to access the data source or
> at startup?
>
>
> On 27 Feb 2004, at 11:34, Claire Wall wrote:
>
> > Hi,
> >
> > I am trying to use microsoft's jdbc driver with my struts application,
> > but to no avail. Here is my datasource definition:
> >
> >   
> >
> > > value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
> > > value="jdbc:microsoft:sqlserver://SERVERNAME:1433;
> > DatabaseName=DBNAME"/>
> >
> >
> >
> >
> >
> >
> >
> >
> >   
> >
> > I have the required jars located in the WEB-INF/lib of my application
> > which is running on Tomcat 4.1.29. When i try to connect to the
> > database using this driver from a test class, it connects no problem
> > so i know that the url and driver class name are correct. So the
> > problem must be the type of DataSource which I am to use. Does anybody
> > know which datasource to use with Microsoft's sqlserver driver? I
> > tried using the DataSource that is in the mssqlserver jar but this
> > didnt work either.
> >
> > The error that I get is an Invalid DataSource.
> >
> > Any help would be really appreciated!
> >
> > Thanks
> > Claire
> >
>
>
> -
> 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]



microsoft sqlserver driver & struts

2004-02-27 Thread Claire Wall
Hi,

I am trying to use microsoft's jdbc driver with my struts application, but to no 
avail. Here is my datasource definition:

  
   
   
   
   
   
   
   
   
   
   
   
  

I have the required jars located in the WEB-INF/lib of my application which is running 
on Tomcat 4.1.29. When i try to connect to the database using this driver from a test 
class, it connects no problem so i know that the url and driver class name are 
correct. So the problem must be the type of DataSource which I am to use. Does anybody 
know which datasource to use with Microsoft's sqlserver driver? I tried using the 
DataSource that is in the mssqlserver jar but this didnt work either.

The error that I get is an Invalid DataSource.

Any help would be really appreciated!

Thanks
Claire



Re: nested iterators and writing back to the form

2004-02-06 Thread Claire Wall
if you use the nested tags rather than the logic and html tags then this
should solve your problem.


- Original Message -
From: "Michael Wiles" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 06, 2004 12:32 PM
Subject: nested iterators and writing back to the form


>
> I have a nested list...
>
> something like:
>
>  id="element">
> ..
> ..
> ..
>  id="subElement">
> ..
> 
> ..
> 
> 
>
> How do I map the html:text tag back to the form?
>
> Without anything extra added to the form, it doesn't work.
>
>
>
>
> Read our disclaimer at: http://www.picknpay.co.za/email-disclaimer.htm
> If you don't have web access, the disclaimer can be mailed to you on
request.
> Disclaimer requests to be sent to [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: Basic question on /lib/*.jar files

2004-02-03 Thread Claire Wall
we store them in the common/lib folder. Then all applications running on
that web server have access to the jars and negates the need for them to go
into the separate WEB-INF/lib folders for each application.

cw :)

- Original Message -
From: "alvin antony" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 10:58 AM
Subject: Basic question on /lib/*.jar files


> Hello there,
>
>I am on a search for a  good practice on storing lib-jar files in
an J2ee development env. Though I know that is not the right place,i used to
store it in the cvs along with the application unter /WEB-INF/lib . Where do
you store  the jar files, that are required by different applications in
development?
>
> Thanks in advance,
>
> Alvin
>
>
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and
more.Download now.



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



Re: Tomcat error

2004-02-02 Thread Claire Wall
Just thought i'd add that this error might be something completey different
and not necessarily the reason why Tomcat is throwing LifeCycle exceptions..
just i saw the error and put 2 and 2 together..


- Original Message -
From: "Claire Wall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 6:04 PM
Subject: Tomcat error


I know this is the Struts mailing list but replies are nice and quick here
that i'm gonna post my query to you guys (and gals)

Tomcat keeps on throwing LifeCycle exception errors and produces this error
in the log file:

2004-02-02 17:54:57 StandardManager[/ApplicationName] IOException while
loading persisted sessions: java.io.EOFException
java.io.EOFException
 at
java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.ja
va:2423)
 at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1783)
 at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1509)
 at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425)
 at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1616)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
 at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:
1369)
 at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j
ava:864)
 at
org.apache.catalina.session.StandardManager.load(StandardManager.java:440)
 at
org.apache.catalina.session.StandardManager.start(StandardManager.java:655)
 at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572)
 at
org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:802)
 at
org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.ja
va:501)
 at
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.jav
a:151)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:551)
 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.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)



I'm guessing that this is because there are some non-serialized objects
tr

Tomcat error

2004-02-02 Thread Claire Wall
I know this is the Struts mailing list but replies are nice and quick here that i'm 
gonna post my query to you guys (and gals)

Tomcat keeps on throwing LifeCycle exception errors and produces this error in the log 
file:

2004-02-02 17:54:57 StandardManager[/ApplicationName] IOException while loading 
persisted sessions: java.io.EOFException
java.io.EOFException
 at 
java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2423)
 at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1783)
 at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1509)
 at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425)
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1616)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
 at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1369)
 at 
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:864)
 at org.apache.catalina.session.StandardManager.load(StandardManager.java:440)
 at org.apache.catalina.session.StandardManager.start(StandardManager.java:655)
 at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572)
 at org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:802)
 at org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.java:501)
 at org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:151)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.StandardContext.invoke(StandardContext.java:2415)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(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.processConnection(Http11Protocol.java:392)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
 at java.lang.Thread.run(Thread.java:536)



I'm guessing that this is because there are some non-serialized objects trying to be 
persisted in the session but its not allowing it because these objects are non 
serializable. Of course i could be completely wrong, which i probably am :-Þ

Anybody have an idea what this error could be? It's causing problems because the 
exception tomcat is throwing is saying that there is a LifeCycle exception and that 
the path '/ApplicationName' has already been started, even though it clearly is not 
running.


Any help would be

Re: Making the fields non editable dynamically using a form bean element

2004-02-02 Thread Claire Wall
Anant,

You can do the following:

set up a boolean flag at the top of the jsp page that will be used to
disable fields on your page like so:

<% boolean flag = false; %>

and then set this according to the value of the flag in your form using
logic tags:


<% flag = true; %>



<% flag = false; %>


and then in your  elements do this:




you have to make sure though that the boolean is set to the right value (so
that if you wish to disable something it is true - this got me caught out a
few times!)


HTH
Claire :)


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 10:35 AM
Subject: Making the fields non editable dynamically using a form bean
element




Hi ppl,


I have a situation where I do not want the user to edit the fields if
the history record flag in the form bean is true.
Can you suggest me how to go about it. Can I use a form bean element
(java.lang.Boolean/String) to disable a  dynamically
depending on its value.


If yes then how can I do it?

Thanks a ton in advance

Regards

Anant Parnami



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: AW: html:options and html:select

2004-02-02 Thread Claire Wall
Aha!

i use the bean:write's but then i like doing things the complicated way.
Never used the html:options in this situation before so thanks for the tip -
will make things much easier!

cw :)


- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:34 PM
Subject: Re: AW: html:options and html:select


Thank goodness for that, dunno why folks seem to do that bean:write for
dropdowns :o)



On 2 Feb 2004, at 13:27, Otto, Frank wrote:

> Thanks for your answer, but
>
> I have found out, that I can use html:optionsCollection.
>
> 
>  value="id" label="name"/>
> 
>
> Regards,
>
> Frank
>
> -Ursprüngliche Nachricht-
> Von: Claire Wall [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 2. Februar 2004 13:22
> An: Struts Users Mailing List
> Betreff: Re: html:options and html:select
>
>
> you can do the following:
>
> 
> 
>  property="id"/>">
> 
> 
>
>
> 'property' of the select box should be the name of the property in your
> FormBean that you wish to store the selected value in.
> You then iterate through the list in your form by using the
> 
> tag. For every object in your list an  tag is written, where
> the
> value is the property 'id' of the current CProduct and the name
> displayed in
> the select box is the name of this CProduc object. This may not work
> as it
> stands due to using an Integer object - i'm not certain that you can
> set the
> value of a select box option to an Integer object. You'd have to try
> it and
> see, and perhaps somebody can clarify this further, but I've never
> tried
> this myself.
>
> HTH
> claire :)
>
> - Original Message -
> From: "Otto, Frank" <[EMAIL PROTECTED]>
> To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
> Sent: Monday, February 02, 2004 12:11 PM
> Subject: html:options and html:select
>
>
>> hello,
>>
>> I have following bean:
>>
>> public class CProduct {
>>
>> private Integer id;
>>
>> private String name
>>
>> public Integer getId() {return id;}
>> puclic void setId(Integer id){
>> ...
>> }
>>
>> My form class contains a java.util.List of CProduct bean.
>>
>> How can I display the List as select box? I want to use the id as
>> value
> and the name as label of the select box.
>>
>> For example:
>>
>> 
>> scanner
>> harddisk
>> 
>>
>> Has anyone an idea?
>>
>> Regards,
>>
>> Frank
>>
>>
>
>
>
> -
> 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: html:options and html:select

2004-02-02 Thread Claire Wall
you can do the following:



">




'property' of the select box should be the name of the property in your
FormBean that you wish to store the selected value in.
You then iterate through the list in your form by using the 
tag. For every object in your list an  tag is written, where the
value is the property 'id' of the current CProduct and the name displayed in
the select box is the name of this CProduc object. This may not work as it
stands due to using an Integer object - i'm not certain that you can set the
value of a select box option to an Integer object. You'd have to try it and
see, and perhaps somebody can clarify this further, but I've never tried
this myself.

HTH
claire :)

- Original Message -
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:11 PM
Subject: html:options and html:select


> hello,
>
> I have following bean:
>
> public class CProduct {
>
> private Integer id;
>
> private String name
>
> public Integer getId() {return id;}
> puclic void setId(Integer id){
> ...
> }
>
> My form class contains a java.util.List of CProduct bean.
>
> How can I display the List as select box? I want to use the id as value
and the name as label of the select box.
>
> For example:
>
> 
> scanner
> harddisk
> 
>
> Has anyone an idea?
>
> Regards,
>
> Frank
>
>



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



Re: Getting the CheckBox Collection Value in FormBean Class

2004-02-02 Thread Claire Wall
What is 'allreqcand'? I'm assuming that this is the name of your form bean.

When the form is submitted, whatever is the value of the check box will be
stored in the array (and only the checked ones will be submitted). So in the
example you gave, the values that will be stored in the array will be the
string 'check', which isnt very helpful. You should be able to determine
which boxes were checked by iterating through the array in your action like
so:

for(int i = 0; i < myform.getDeletereqs().length; i++)
{
//log the values of the checkboxes so you can see if its working.
}

the most important thing first is to check that something is being submitted
to the array when boxes are selected. If you log the values to the log file
by looping through the array in your action then you can see what's going
on. The next step is to get something useful to be submitted to the array
(values of the checkboxes).




- Original Message -
From: "Ramachandran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 10:11 AM
Subject: RE: Getting the CheckBox Collection Value in FormBean Class


> Yes Claire,
> I am doing like that only.This is my jsp,contains the
code.
> I am nested inside the iteration.
>
>
> FORM BEAN
> public String[] getDeletereqs() {
> return this.deletereqs;
> }
>
> public void setDeletereqs(String[] deletereqs) {
> this.deletereqs=deletereqs;
> }
>
> JSP
> 
>  
> 
>  />
> 
>   
> 
>
> Then in the action, i want to check what r all the check boxes checked.
How
> can i do that one.
> Shall i use the request.getParametervalues();
>
>   Any othet option u know, how to perform in action.
>
> Mail your opinion.
>
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 02, 2004 3:21 PM
> To: Struts Users Mailing List
> Subject: Re: Getting the CheckBox Collection Value in FormBean Class
>
>
> Do you mean that you want to store checkbox values in a form bean? if
so...
>
>
> You can set up an empty String array in your form bean like this:
> String[] checkboxes = new String[]{};
>
>
> and then in your jsp page you can set the property of a checkbox to this
> array, like:
>
> 
>
>
> when the page is submitted, the checked box values are stored in the
array -
> you can then use them how you wish in your action. Note though that you
have
> to set the value of the checkbox if you are going to have anything
submitted
> to the array in the form.
>
>
> HTH
> claire :)
>
>
> - Original Message -
> From: "Ramachandran" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, February 02, 2004 9:38 AM
> Subject: Getting the CheckBox Collection Value in FormBean Class
>
>
> > Hi All,
> >
> >  If any body know how to get the solution for getting the
> check
> > box collection value in the form bean class. If so mail your
ideas...
> >
> > Thanx,
> > Ram
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> 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: Getting the CheckBox Collection Value in FormBean Class

2004-02-02 Thread Claire Wall
Do you mean that you want to store checkbox values in a form bean? if so...


You can set up an empty String array in your form bean like this:
String[] checkboxes = new String[]{};


and then in your jsp page you can set the property of a checkbox to this
array, like:




when the page is submitted, the checked box values are stored in the array -
you can then use them how you wish in your action. Note though that you have
to set the value of the checkbox if you are going to have anything submitted
to the array in the form.


HTH
claire :)


- Original Message -
From: "Ramachandran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 9:38 AM
Subject: Getting the CheckBox Collection Value in FormBean Class


> Hi All,
>
>  If any body know how to get the solution for getting the
check
> box collection value in the form bean class. If so mail your ideas...
>
> Thanx,
> Ram
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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



Re: How do you submit a page and not change values

2004-02-02 Thread Claire Wall
you can use the  and  buttons from within a form.
They will both actually submit the form to an action, but it is possible to
capture the 'cancel' event in your action and therefore forward the user to
different places depending upon which one they clicked on.

so, for example, say you had a form with one field called 'name' and two
buttons- one 'cancel' and one 'submit'...





Submit
Cancel



in struts-config you define your actions and where you wish to forward to
depending on which button the user clicked on:

  
   

  


and, finally, in your action you can catch the cancel event and forward to
the other place like so:

if(isCancelled(request))
{
return mapping.findForward("cancel");
}

else
{
return mapping.findForward("success");
}



I hope that this answers your question - if not then sorry if i am just
repeating stuff that you already know! :)

regards,
Claire :)

- Original Message -
From: "Hunt, Steve" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 9:06 AM
Subject: How do you submit a page and not change values


> If you use either html:button, html:submit or html:cancel buttons they
> generate  html.
>
> So how can you create a screen for example with 1 field and 2 buttons, a
> submit and a do Not Submit button, both of which navigate the user to a
> results screen?
>
> Regards
> Steve
>
>
> ===
> This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is intended
only for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
> ===
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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



Re: Using "bean:write" as a tag's value atrribute

2004-01-29 Thread Claire Wall
This is fine as long as the tag you're using the  is not
another custom tag e.g.  or  etc. It is done like
this:

" /> - make sure you include '/' at the end of the bean
tag.


If you want to use this in a custom tag you're going to have to define a
bean first and then use a jsp expression so you can set the value like so:






hope this answers your question

claire :)

- Original Message -
From: "Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 29, 2004 10:53 AM
Subject: Using "bean:write" as a tag's value atrribute


>
> Dear All;
>
> Using  works
properly
> in my jsp page body. But when I want to use it in a tag to fill its
> attribute, it fails.
>  Actually I don't know the syntax of using bean:write, obviously the below
> way is wrong:
>
> ">
>
> Using expression is wrong, too:
>
>   value="<%=%>">
>
> So how could I use bean:write in my tags?!
>
> Any help would be greatly appreciated
> Nafise
>
>
> -
> 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: iterate with Vector

2004-01-29 Thread Claire Wall
Hi Paulo,

Assuming that your Bean class contains simple data types you can do the
following:





So, for example, if you had a Bean with two fields, 'name' and 'phone' in
it, your form was called 'PeopleForm' in struts-config and your vector of
bean objects was called 'people', you could output the bean details to the
screen for each bean in the vector list like so:







hope this helps.
claire

- Original Message -
From: "Paulo Murphy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 29, 2004 9:02 AM
Subject: iterate with Vector


> Hi,
>
> new to the list so hello to all.
>
> Have a problem.
> I'm trying to use the logic:iterate tag with a vector.
>
> This vector is a vector of Beans.
> Can't see to figure out how to iterate over this vector of Beans.
>
> This is probably not enough information but hopefully someone will reply
> and I can provide more info.
>
> Thanks in advance
>
> /Paulo Murphy de Freitas
>
>
> -
> 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: problem with nested tags

2004-01-26 Thread Claire Wall
You cannot have custom tags within custom tags. As you say you want a
 tag within an  tag, then this will not work as
they are both custom tags. You could get around this by using 
and then using the value of this in your html:button tag like so:





or indeed you could do something like this:

 if you want to use the
 for the name of the button.

I'm not certain as to how you are trying to use  in your
 tag as I dont see an example of it in your code, unless I'm
being completely dopey... :)

cheers
claire w


- Original Message -
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, January 26, 2004 12:19 PM
Subject: problem with nested tags


> Hi all,
> I have problem in invoking a javascript for following code...
>
> 
>  
>
> 
>
>
>
>
>  value="true">Active since  property="value.startDate"/>
>
>value="start" title="Start" /> // I should associate this button with a
> javascript method  //that accepts as input
> parameter the type property //mentioned
> above
> 
> 
>
>  value="false">Currently Inactive  title="Start" value="start"/>
>
>  
>
>
>
> For some reason, the bean:write tag does not work inside an html:button
> ...
>
> Anyone can help?
>
> Thanx in advance and regards
> marco
>
>
> -
> 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: weird Tomcat prob

2004-01-16 Thread Claire Wall
i've just this minute fixed the problem - the servlet mapping for servlets
(/servlet/) was commented out in the web.xml file in the Tomcat conf folder
for some reason - this must be what it is like when Tomcat is first
installed - knew it would be something small and annoying.

cheers :)

claire


- Original Message -
From: "Max Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 16, 2004 10:08 AM
Subject: Re: weird Tomcat prob


> My guess is that it is finding and executing the servlet, but that
something
> goes wrong while the servlet is being processed. It looks like it drops
down
> into some JSPs, and that seems to be the source of the exception.
>
> We need to know more about what that servlet does. I see Struts classes in
> the stack trace. It also seems like there might be an 'identification.jsp'
> file that includes an 'incAttachment.jsp' file. Can you look at line 120
of
> the incAttachment_jsp.java file that Tomcat generates when it transforms
the
> JSP file into a Java class? It might have comments that tell you what the
> line number in the incAttachment.jsp file is causing the exception.
>
> -Max
>
> - Original Message -
> From: "Claire Wall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, January 16, 2004 1:22 AM
> Subject: weird Tomcat prob
>
>
> Hi,
>
> I have a struts application which i am deploying to another server which
is
> running Tomcat 4.1.29 via a WAR file. The application works fine except
for
> one problem:
>
> I have a servlet which loads on start-up via the following declaration in
> web.xml:
>
>   
> hasAttachments
> HasAttachmentsServlet
> 5
>   
>
>
> It loads up fine - the servlet is found as it is logging to the log file
> that it is loaded. However, when I try to access this servlet it does not
> find the servlet at all. The servlet has a doGet() method which just
passes
> back some text to be outputted. I call it like this:
> http://localhost:8080/CRM/servlet/hasAttachments. I get the following
error
> message:
>
>
> org.apache.jasper.JasperException: Exception reading resource
>
http://localhost:8080/CRM/servlet/hasAttachments;jsessionid=B0636FAB02DF85F4
E4980AF8092618AF?context=12&upload=false:
> java.io.FileNotFoundException:
>
http://localhost:8080/CRM/servlet/hasAttachments;jsessionid=B0636FAB02DF85F4
E4980AF8092618AF?context=12&upload=false
>  at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 54)
>  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.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:684)
>  at
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> er.java:575)
>  at
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> .java:498)
>  at
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
> 22)
>  at
> org.apache.jsp.identification_jsp._jspService(identification_jsp.java:278)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 10)
>  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.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:684)
>  at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:432)
>  at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:356)
>  at
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
> 69)
>  at
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
> sor.java:455)
>  at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
>  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.catalina.core.App

weird Tomcat prob

2004-01-16 Thread Claire Wall
Hi,

I have a struts application which i am deploying to another server which is running 
Tomcat 4.1.29 via a WAR file. The application works fine except for one problem:

I have a servlet which loads on start-up via the following declaration in web.xml:

  
hasAttachments
HasAttachmentsServlet
5
  


It loads up fine - the servlet is found as it is logging to the log file that it is 
loaded. However, when I try to access this servlet it does not find the servlet at 
all. The servlet has a doGet() method which just passes back some text to be 
outputted. I call it like this: http://localhost:8080/CRM/servlet/hasAttachments. I 
get the following error message:


org.apache.jasper.JasperException: Exception reading resource 
http://localhost:8080/CRM/servlet/hasAttachments;jsessionid=B0636FAB02DF85F4E4980AF8092618AF?context=12&upload=false:
 java.io.FileNotFoundException: 
http://localhost:8080/CRM/servlet/hasAttachments;jsessionid=B0636FAB02DF85F4E4980AF8092618AF?context=12&upload=false
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
 at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
 at org.apache.jsp.identification_jsp._jspService(identification_jsp.java:278)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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:2417)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(Standard

Re: Tomcat error with compiling JSPs

2004-01-15 Thread Claire Wall
we are using 4.1.24 and are pretty certain that what you say is exactly what
is happening. The path that the app was installed in was quite long + then
there's the package names on top of that and they are pretty lengthy too -
up to 7 folders in depth.

Thanks for your help!

I'm going to try it out at home where I have 4.1.29 installed and see if
this solves the problem, but I'm fairly sure that you're spot on.

:)


- Original Message -
From: "Kevin A. Palfreyman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 1:46 PM
Subject: RE: Tomcat error with compiling JSPs


This is a known problem in some versions of Tomcat, due to a known
problem in some versions of ANT, due to a known problem with
command-line length on windows.

It relates to the path length that is used by ANT when compiling your
JSP.

If the path is longer than the max, then the initial '"' is there but
the final one is chopped. So if you have spaces in the path it will fail
as you say.  We hit this bug too.

My guess is you are using 4.1.24? (maybe 21/27 too, but it broke in 24
for me).  Try 4.1.29 - that seems better (embeds a newer version of
ANT), although I think theoretically its not entirely fixed. (I think
they put quotes around each element, but that could still mean the path
is chopped.  Not sure on this though.)

Your other apps worked because the their paths (e.g. package names) are
shorter, or they depend on fewer 3rd party JARs.


Hope this helps.

Kev


> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: 15 January 2004 12:53
> To: Struts Users Mailing List
> Subject: Re: Tomcat error with compiling JSPs
>
> i see what you're saying, but I've got about 6 applications
> running on Tomcat on this server and they all work fine with
> no problems. This is the first time that this has occured so
> I'd really like to understand what could be causing this to
> happen. I'm assuming that it can't be anything coded into my
> servlets/classes as these are already complied and shouldn't
> be compiled by Tomcat when it's run, should they? I am using
> the getRealPath() method in my servlets but this is also true
> of my other applications. i cannot change the path of Tomcat
> because this application may well need to be installed on a
> server where we can't dictate the install path of Tomcat so
> this is not a solution.
>
>
>
> - Original Message -
> From: "McCormack, Chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 15, 2004 12:11 PM
> Subject: RE: Tomcat error with compiling JSPs
>
>
> >[javac] javac: invalid flag: C:\Program
> >[javac] Usage: javac
> --
>
> Try putting your tomcat install to c:\tomcat
>
> -Original Message-
> From: Claire Wall [mailto:
> Sent: 15 January 2004 12:07
> To: Struts Users Mailing List
> Subject: Tomcat error with compiling JSPs
>
>
> hi,
>
> I am trying to install my application on another server
> (Tomcat 4.1). I have built a WAR file from an ANT build file
> but when I install it on Tomcat and try to access it I get
> the following error:
>
>
> 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: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Since fork is true, ignoring compiler setting.
> [javac] Compiling 1 source file
> [javac] Since fork is true, ignoring compiler setting.
> [javac] javac: invalid flag: C:\Program
> [javac] Usage: javac
> [javac] where possible options include:
> [javac]   -gGenerate all debugging info
> [javac]   -g:none   Generate no debugging info
> [javac]   -g:{lines,vars,source}Generate only some
> debugging info
> [javac]   -nowarn   Generate no warnings
> [javac]   -verbose  Output messages about what the
> compiler is doing
> [javac]   -deprecation  Output source locations where
> deprecated APIs are used
> [javac]   -classpath  Specify where to find user
> class files
> [javac]   -sourcepath Specify where to find input
> source files
> [javac]   -bootclasspath  Override location of
> bootstrap class files
> [javac]   -extdirs

Re: Tomcat error with compiling JSPs

2004-01-15 Thread Claire Wall
sorry, i lied before - the JAVA_HOME variable is pointing to the bin folder
of the JDK.

we have just reinstalled Tomcat (4.1.2) again to a path that has no spaces
and it now works. However, this doesnt solve the problem because as stated
before, we cannot dictate what path our client has their tomcat installed
in.


- Original Message -
From: "Martin Gainty" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 1:43 PM
Subject: Re: Tomcat error with compiling JSPs


> I ran into this exact error when I installed IBM JDK with Websphere and
all
> of a sudden my JSP
> wouldnt compile on Tomcat
> What is your JAVA_HOME pointing to?
> Regards,
> -Martin
> - Original Message -
> From: "Claire Wall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, January 15, 2004 8:44 AM
> Subject: Re: Tomcat error with compiling JSPs
>
>
> > the classpath of the server only points to the bin folder of the JDK.
> >
> > It still doesn't explain why this application isnt working and all of
the
> > rest are, since all our applications are installed via a WAR file and I
do
> > not change or set a class path for each application - I only change the
> > paths that need to be changed in web.xml and struts-config.xml for the
> > application. We have been developing this application on Tomcat on
another
> > server and it works fine.
> >
> > What reasons are there for the java compiler to not be able to compile
JSP
> > files for a particular application as this appears to be the problem.
> >
> >
> > - Original Message -
> > From: "Max Cooper" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, January 15, 2004 1:31 PM
> > Subject: Re: Tomcat error with compiling JSPs
> >
> >
> > > This seems telling:
> > >
> > > [javac] javac: invalid flag: C:\Program
> > >
> > > It seems like some kind of path with a space in it is being passed to
> the
> > > compiler, but it is not being quoted properly.
> > >
> > > javac -classpath C:\Program Files\somelib\lib.jar ...
> > >
> > > (should be: javac -classpath "C:\Program Files\somelib\lib.jar" ...)
> > >
> > > However, I would kind of expect the error to be "invalid flag:
> > > Files\somelib\lib.jar" in that case, since the C:\Program part is
before
> > the
> > > space. Could you have some kind of funky classpath like
"C:\dir\lib.jar;
> > > C:\Program Files\poop\stuff.jar" (note the space after the ';'). Are
you
> > > setting the classpath for the server process yourself, perhaps by
> starting
> > > Tomcat using your own script (rather than startup.bat)? Or do you have
> > some
> > > strange classpath in your environment before you start Tomcat?
> > >
> > > -Max
> > >
> > > - Original Message -
> > > From: "Claire Wall" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, January 15, 2004 4:06 AM
> > > Subject: Tomcat error with compiling JSPs
> > >
> > >
> > > hi,
> > >
> > > I am trying to install my application on another server (Tomcat 4.1).
I
> > have
> > > built a WAR file from an ANT build file but when I install it on
Tomcat
> > and
> > > try to access it I get the following error:
> > >
> > >
> > > 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: Unable to compile class for JSP
> > >
> > > An error occurred at line: -1 in the jsp file: null
> > >
> > > Generated servlet error:
> > > [javac] Since fork is true, ignoring compiler setting.
> > > [javac] Compiling 1 source file
> > > [javac] Since fork is true, ignoring compiler setting.
> > > [javac] javac: invalid flag: C:\Program
> > > [javac] Usage: javac
> > > [javac] where possible

Re: Tomcat error with compiling JSPs

2004-01-15 Thread Claire Wall
the classpath of the server only points to the bin folder of the JDK.

It still doesn't explain why this application isnt working and all of the
rest are, since all our applications are installed via a WAR file and I do
not change or set a class path for each application - I only change the
paths that need to be changed in web.xml and struts-config.xml for the
application. We have been developing this application on Tomcat on another
server and it works fine.

What reasons are there for the java compiler to not be able to compile JSP
files for a particular application as this appears to be the problem.


- Original Message -
From: "Max Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 1:31 PM
Subject: Re: Tomcat error with compiling JSPs


> This seems telling:
>
> [javac] javac: invalid flag: C:\Program
>
> It seems like some kind of path with a space in it is being passed to the
> compiler, but it is not being quoted properly.
>
> javac -classpath C:\Program Files\somelib\lib.jar ...
>
> (should be: javac -classpath "C:\Program Files\somelib\lib.jar" ...)
>
> However, I would kind of expect the error to be "invalid flag:
> Files\somelib\lib.jar" in that case, since the C:\Program part is before
the
> space. Could you have some kind of funky classpath like "C:\dir\lib.jar;
> C:\Program Files\poop\stuff.jar" (note the space after the ';'). Are you
> setting the classpath for the server process yourself, perhaps by starting
> Tomcat using your own script (rather than startup.bat)? Or do you have
some
> strange classpath in your environment before you start Tomcat?
>
> -Max
>
> - Original Message -
> From: "Claire Wall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, January 15, 2004 4:06 AM
> Subject: Tomcat error with compiling JSPs
>
>
> hi,
>
> I am trying to install my application on another server (Tomcat 4.1). I
have
> built a WAR file from an ANT build file but when I install it on Tomcat
and
> try to access it I get the following error:
>
>
> 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: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Since fork is true, ignoring compiler setting.
> [javac] Compiling 1 source file
> [javac] Since fork is true, ignoring compiler setting.
> [javac] javac: invalid flag: C:\Program
> [javac] Usage: javac
> [javac] where possible options include:
> [javac]   -gGenerate all debugging info
> [javac]   -g:none   Generate no debugging info
> [javac]   -g:{lines,vars,source}Generate only some debugging info
> [javac]   -nowarn   Generate no warnings
> [javac]   -verbose  Output messages about what the
> compiler is doing
> [javac]   -deprecation  Output source locations where
> deprecated APIs are used
> [javac]   -classpath  Specify where to find user class files
> [javac]   -sourcepath Specify where to find input source files
> [javac]   -bootclasspath  Override location of bootstrap class
files
> [javac]   -extdirsOverride location of installed
extensions
> [javac]   -d Specify where to place generated class files
> [javac]   -encoding   Specify character encoding used by source
> files
> [javac]   -source  Provide source compatibility with specified
> release
> [javac]   -target  Generate class files for specific VM
version
> [javac]   -help Print a synopsis of standard
options
>
>
>
>
>  at
>
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
> r.java:130)
>  at
>
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
> 93)
>  at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
>  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
>  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.servle

Re: Tomcat error with compiling JSPs

2004-01-15 Thread Claire Wall
i see what you're saying, but I've got about 6 applications running on
Tomcat on this server and they all work fine with no problems. This is the
first time that this has occured so I'd really like to understand what could
be causing this to happen. I'm assuming that it can't be anything coded into
my servlets/classes as these are already complied and shouldn't be compiled
by Tomcat when it's run, should they? I am using the getRealPath() method in
my servlets but this is also true of my other applications. i cannot change
the path of Tomcat because this application may well need to be installed on
a server where we can't dictate the install path of Tomcat so this is not a
solution.



- Original Message -
From: "McCormack, Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 12:11 PM
Subject: RE: Tomcat error with compiling JSPs


>[javac] javac: invalid flag: C:\Program
>[javac] Usage: javac
--

Try putting your tomcat install to c:\tomcat

-Original Message-
From: Claire Wall [mailto:
Sent: 15 January 2004 12:07
To: Struts Users Mailing List
Subject: Tomcat error with compiling JSPs


hi,

I am trying to install my application on another server (Tomcat 4.1). I have
built a WAR file from an ANT build file but when I install it on Tomcat and
try to access it I get the following error:


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: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] javac: invalid flag: C:\Program
[javac] Usage: javac
[javac] where possible options include:
[javac]   -gGenerate all debugging info
[javac]   -g:none   Generate no debugging info
[javac]   -g:{lines,vars,source}Generate only some debugging info
[javac]   -nowarn   Generate no warnings
[javac]   -verbose  Output messages about what the
compiler is doing
[javac]   -deprecation  Output source locations where
deprecated APIs are used
[javac]   -classpath  Specify where to find user class files
[javac]   -sourcepath Specify where to find input source files
[javac]   -bootclasspath  Override location of bootstrap class files
[javac]   -extdirsOverride location of installed extensions
[javac]   -d Specify where to place generated class files
[javac]   -encoding   Specify character encoding used by source
files
[javac]   -source  Provide source compatibility with specified
release
[javac]   -target  Generate class files for specific VM version
[javac]   -help Print a synopsis of standard options




 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
 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(Standa

Tomcat error with compiling JSPs

2004-01-15 Thread Claire Wall
hi,

I am trying to install my application on another server (Tomcat 4.1). I have built a 
WAR file from an ANT build file but when I install it on Tomcat and try to access it I 
get the following error:


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: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] javac: invalid flag: C:\Program
[javac] Usage: javac  
[javac] where possible options include:
[javac]   -gGenerate all debugging info
[javac]   -g:none   Generate no debugging info
[javac]   -g:{lines,vars,source}Generate only some debugging info
[javac]   -nowarn   Generate no warnings
[javac]   -verbose  Output messages about what the compiler is 
doing
[javac]   -deprecation  Output source locations where deprecated APIs 
are used
[javac]   -classpath  Specify where to find user class files
[javac]   -sourcepath Specify where to find input source files
[javac]   -bootclasspath  Override location of bootstrap class files
[javac]   -extdirsOverride location of installed extensions
[javac]   -d Specify where to place generated class files
[javac]   -encoding   Specify character encoding used by source files
[javac]   -source  Provide source compatibility with specified release
[javac]   -target  Generate class files for specific VM version
[javac]   -help Print a synopsis of standard options




 at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
 at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
 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(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(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.

Re: setting Form values from JSP for an object

2004-01-14 Thread Claire Wall
yeah i'm pretty familiar with nested tags having used them in situations
where I have objects nested within objects within my form e.g. to render a
tree structure. I thought it was a replacement for logic tags in these sort
of situations and have never considered using them elsewhere.

this works now thanks Matthias!

quick one though: what is the difference between nested & logic tags and
nested & html tags and in which situations would you choose to use nested
not the others?


cheers
claire :)


- Original Message -
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 11:46 AM
Subject: RE: setting Form values from JSP for an object


> Hi Claire
>
> have you tried the nested-tag?
>
> like this?
>
> 
> 
> name: 
> ref: 
> 
> 
> 
> your formBean (detailsForm) is associated action-path /nested
>
> greetings
>
> Matthias
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 12:36 PM
> To: Struts Users Mailing List
> Subject: setting Form values from JSP for an object
>
>
> Hi,
>
> In have an ActionForm which contains an object called 'Details' like so:
>
>
> public class DetailsForm extends ActionForm
> {
> private Details details = new Details();
>
> public void setDetails(Details details)
> {
> this.details = details;
> }
>
> public Details getDetails()
> {
> return details;
> }
> }
>
>  and the Details class contains two strings: name and reference, plus
> the getters and setters.
>
>
> Now the problem i have is that in my JSP i can render these values fine
> in text boxes. I want the user to be able to change the values, submit
> the form and then save the changes. However, I cannot find the way that
> will call the setters of the Details object. Is this possible and how is
> it done? I have tried the following ways in my JSP:
>
> Firstly, defined a bean and then used this bean definition to render my
> text boxes:
>
> 
>
> 
> 
>
> 
>
>
> Secondly, didnt define the bean using  but instead did
> this:
>
>  style="width:150px"/>  property="details.reference" style="width:150px"/>
>
> 
>
> This didnt work either, I'm assuming because only the setters are being
> called, and not get().set() like I want..
>
>
> Is there any way to call the setters for a class within my ActionForm??
> Any help would be appreciated.
>
>
> Claire :)
>
>
>
> -
> 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]



setting Form values from JSP for an object

2004-01-14 Thread Claire Wall
Hi,

In have an ActionForm which contains an object called 'Details' like so:


public class DetailsForm extends ActionForm
{
private Details details = new Details();
   
public void setDetails(Details details)
{
this.details = details;
}

public Details getDetails()
{
return details;
}
}

 and the Details class contains two strings: name and reference, plus the getters and 
setters.


Now the problem i have is that in my JSP i can render these values fine in text boxes. 
I want the user to be able to change the values, submit the form and then save the 
changes. However, I cannot find the way that will call the setters of the Details 
object. Is this possible and how is it done? I have tried the following ways in my JSP:

Firstly, defined a bean and then used this bean definition to render my text boxes:









Secondly, didnt define the bean using  but instead did this:






This didnt work either, I'm assuming because only the setters are being called, and 
not get().set() like I want..


Is there any way to call the setters for a class within my ActionForm?? Any help would 
be appreciated.


Claire :)



quick DS question

2004-01-07 Thread Claire Wall
hi,

could someone just clarify the difference between 'maxCount' and 'maxActive' propertys 
for the data source for me please.

thanks in advance :)

claire w


Re: determining the database driver in actions

2003-12-23 Thread Claire Wall
cheers Steven!


- Original Message -
From: "Ebersole, Steven" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 4:17 PM
Subject: RE: determining the database driver in actions


connection.getMetadata().getDriverName()...


-Original Message-
From: Claire Wall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 10:14 AM
To: Struts Users Mailing List
Subject: determining the database driver in actions


hi,

is there a way to find out the database driver that is being used in my
struts action classes?

the reason for wanting to be able to do this is that i would like to
structure my class so that, depending upon the driver being used (or
alternatively, type of DataSource) i could either write a Blob to the
database (Oracle) or a BinaryStream (SQLServer or MySQL).

is it possible to find out the DataSource's property's?


cheers
claire

-
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: converting a FormFile to a Blob object

2003-12-23 Thread Claire Wall
cheers!

i got it fixed now :) that one was causing me major headaches.


- Original Message -
From: "Nicholson, Robb" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 4:10 PM
Subject: RE: converting a FormFile to a Blob object


> You have to insert the record using an empty LOB, then select the record
for
> update and write the byte stream to the LOB.
>
> Here's an example insert method from my DAO that I used for the same
purpose
> recently.
>
> Might not be the most efficient or prettiest code out there, but it works
> like a champ. We've tested it with image files, Word, Excel, PDF, etc. The
> VO being passed in has a FormFile field "DataFile", and a bunch of other
> fields for name, type, etc.
>
> I had to turn autocommit off to get this to work. On another project I did
> something similar for CLOBS, but the transaction was handled through
session
> bean, so in that case take those lines out.
>
>
> public int insert(StatsDocumentsVo vo) throws CapException,
SQLException
> {
>
>   long docId = getNextDocId();
> Connection conn = null;
> PreparedStatement ps = null;
> ResultSet rs = null;
> BLOB binLgObj = null;
> OutputStream out = null;
> int rc = -1;
> int ii = 1;
>
> try
> {
> conn = getConnection();
> conn.setAutoCommit(false); // to avoid "ORA-01002: fetch out
of
> sequence"
>
>
> /*
>  * Insert the record with a blank holding spot for LOB
>  */
> ps = conn.prepareStatement(SQL_EXT_INSERT);
> ps.setLong(ii++,docId );
> ps.setString(ii++,vo.getDescr());
> ps.setString(ii++, vo.getMimeType());
> ps.setString(ii++,vo.getLastUpdUser());
> ps.setString(ii++,vo.getDocumentName());
> ps.setString(ii++,vo.getOsoNumber());
> ps.setBlob(ii++, oracle.sql.BLOB.empty_lob());
>
> log.debug("Ready to execute the insert statement (empty
> BLOB).");
> rc = ps.executeUpdate();
>
> /*
>  * Get the record back from the database
>  */
> ps.close();
> ps = conn.prepareStatement(SQL_GET_BY_PK);
> ps.setLong(1, docId);
> log.debug("Ready to execute the select statement to get ref to
> the empty blob.");
> rs = ps.executeQuery();
> rs.next();
>
> // get empty blob pointer out of result set
> log.debug("Ready to get empty blob out of result set.");
> binLgObj = ((OracleResultSet)rs).getBLOB("DATA_FILE");
>
> // open up the output stream to write into blob
> out = binLgObj.getBinaryOutputStream();
>
> // write file byte[] into the blob
> log.debug("Ready to actually write the file's byte[] array
into
> the blob.");
> out.write( ((FormFile)vo.getDataFile()).getFileData());
> log.debug("Closing output stream.");
> out.close();
>
> // commit the xaction
> log.debug("Commit the xaction to the DB");
> conn.commit();
>
>
> log.debug("Closing result set, prepared statement.");
> rs.close();
>
> }
> catch (java.io.FileNotFoundException e)
>     {
> e.printStackTrace();
> throw new CapException(e.getMessage());
> }
> catch (java.io.IOException e)
> {
> e.printStackTrace();
> throw new CapException(e.getMessage());
> }
> finally
> {
> closeResources(conn,ps);
> }
>
> return rc;
> }
>
>
>
> -Original Message-
> From: Claire Wall [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 23, 2003 9:44 AM
> To: Struts Users Mailing List
> Subject: converting a FormFile to a Blob object
>
>
> hi,
>
> I have a jsp page which uploads a file to a database. I have no problems
> storing the file in an SQLServer or MySQL database by using the
> setBinaryStream() method of a PreparedStatement. The file gets upload no
> problem.
>
> However, when I try to upload this file to an oracle database (BLOB
column)
> it does not work. I'm sure that i have to use the setBlob() method of the
> PreparedStatement, however, my dilemma is that I cannot find a way to
> convert my file from FormFile format to sql Blob format. Does anybody know
> how to do this as I've looked everywhere and haven't come up with a
> solution.
>
> Any help would be much appreciated
>
>
> thanks
> claire
>



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



determining the database driver in actions

2003-12-23 Thread Claire Wall
hi,

is there a way to find out the database driver that is being used in my struts action 
classes?

the reason for wanting to be able to do this is that i would like to structure my 
class so that, depending upon the driver being used (or alternatively, type of 
DataSource) i could either write a Blob to the database (Oracle) or a BinaryStream 
(SQLServer or MySQL). 

is it possible to find out the DataSource's property's?


cheers
claire


converting a FormFile to a Blob object

2003-12-23 Thread Claire Wall
hi,

I have a jsp page which uploads a file to a database. I have no problems storing the 
file in an SQLServer or MySQL database by using the setBinaryStream() method of a 
PreparedStatement. The file gets upload no problem.

However, when I try to upload this file to an oracle database (BLOB column) it does 
not work. I'm sure that i have to use the setBlob() method of the PreparedStatement, 
however, my dilemma is that I cannot find a way to convert my file from FormFile 
format to sql Blob format. Does anybody know how to do this as I've looked everywhere 
and haven't come up with a solution.

Any help would be much appreciated 


thanks
claire


Re: simple question

2003-12-22 Thread Claire Wall
in the JSP you need to do:

<%
String hulp = (String)request.getAttribute("hulp");
%>

then you can use:

<%= hulp %>


often i do this (instead of the one above) to make sure u get the parameter:

<%
String hulp = (String)request.getParameter("hulp");
if(hulp==null) hulp = (String)request.getAttribute("hulp");
%>

HTH

- Original Message -
From: "dirk" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 3:55 PM
Subject: Re: simple question


the value is null allthought the value of help is not null. But i cannot
access it in the jsp...
thx !

- Original Message -
From: "François Richard" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 4:45 PM
Subject: Re: simple question


> hi,
> try this,
> <%= request.getParameter("users.userId") %>
>
>
>
> dirk wrote:
>
> >I have an action which contains the following:
> >
> >
> >
> >String hulp=request.getParameter("users.userId");
> >
> >return mapping.findForward(CONTINUE);
> >
> >
> >
> >continue points to user.jsp. How can i use in the file user.jsp the value
of hulp ?
> >
> >eg: <%=hulp%> is not working.
> >
> >Thx
> >
> >
> >
> >
> >
>
>
> -
> 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]



datasources and oracle 9i

2003-12-17 Thread Claire Wall
hi,

i am using Oracle 9i as my datasource and have declared it in my struts-config as 
follows:


   


 









however, when i come to use this datasource in my struts actions, it gives me the 
following error:


Invalid Oracle URL specified: OracleDataSource.makeURL


im accessing the datasource in my actions like so (i use the same thing with an 
SQLServer datasource and it works fine):

DataSource dataSource = (DataSource)servlet.getServletContext().getAttribute("DB");


also, i have my oracle driver jar in the commons folder in tomcat - could this be the 
cause


Any help would be much appreciated!
claire




Re: getServletContext() throws null pointer

2003-12-10 Thread Claire Wall
as i understand it, in order to retrieve the servlet context, you need to
use the ServletConfig to retrieve it like so:

config.getServletContext()


this sounds similar to a problem that i had where i was trying to log
something from a servlet, just used the log() method and it through an
exception pretty much like the one you are experiencing. however, by putting
config.getServletContext().log() it threw no exceptions...


- Original Message -
From: "Oliver Meyn" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 5:41 PM
Subject: Re: getServletContext() throws null pointer


> On Wed, 2003-12-10 at 12:18, Richard Yee wrote:
> > Oliver,
> > Are you overriding init(ServletConfig config) in your
> > init servlet? If so, did you call super.init(config)
> > before you tried accessing the ServletContext?
> >
> I'm not overriding init(config) but I am overriding init().  I hadn't
> been calling super.init() but gave that a shot and no change.  I am able
> to access the ServletContext (and the init-ed object) from both my
> controlling Action and from a jsp - just not from another servlet.  I
> must be missing something simple yet fundamental...
>
> Thanks,
> Oliver
>
>
>
> -
> 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: Wht does tag in web.xml means ??

2003-12-03 Thread Claire Wall
The  tag determines the order in which the specified
classes are run when the application first starts. so for example, say i had
two servlets which i wanted to start up immediately when the application
starts, i would do the following:


  myServlet1
  package1.myServlet1
  ...
  1



  myServlet2
  package1.myServlet2
  ...
  2


this means that myServlet1 would start up (run) first and then myServlet2
would start up after myServlet1. Often the ordering does not matter but if
you had a class which depended upon another to be up and running first, you
would need to order them correctly otherwise your application may not run as
expected and may well throw exceptions.

HTH
Claire


- Original Message -
From: "Shakti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 03, 2003 9:13 AM
Subject: Wht does  tag in web.xml means ??


Hi,
Wht does  tag in web.xml means ?? I am using struts
framework with weblogic and i am not able to find out wht is does this tag
implies ? Is this the cause due to which my weblogic is not picking up new
compiled classes without restarting ..???
waiting for a reply 
Thanks & Regards,
Shakti.





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



Re: forward vs redirect ?

2003-12-01 Thread Claire Wall
caroline,

when the user gets to page2, what is the url displayed in the address box?
is it the action or the jsp page?


claire

- Original Message -
From: "Caroline Lauferon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 4:04 PM
Subject: Re: forward vs redirect ?


> > For example, say i had an action which saved some details from a form to
a
> > database. if the page is not redirected then if the user were to refresh
> the
> > page, the action would be called again and the data saved again. This
> > obviously i would not want the user to do so in this case i redirect the
> > page, so that if the user were to refresh the page, the save action
would
> > not be called again.
>
> I'm not sure I understand what you mean. The case you describe is very
close
> to mine, and so I would like to prevent the user from making twice the
> addition on refresh:
> I've got one first form, Form1, which calls Action1:
>  input="/form1.jsp">
> 
> 
>
> but once the user is on page2, if he makes a refresh, action1 is called
> again and the data added by action1 is added once more
>
> What didn't I understand?
> Thanks
> Caroline
>
>
> -
> 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: forward vs redirect ?

2003-12-01 Thread Claire Wall
Hi Antony,

As a rule i always use just forward unless there is a specific need to
redirect to the page you're forwarding to.

For example, say i had an action which saved some details from a form to a
database. if the page is not redirected then if the user were to refresh the
page, the action would be called again and the data saved again. This
obviously i would not want the user to do so in this case i redirect the
page, so that if the user were to refresh the page, the save action would
not be called again.

The times when I would advise against using redirecting is when you're
storing objects on the request object in your action. If you redirect then
this information is lost. There are ways around this (like putting the
objects on the session rather than on the request object) but i try to cut
down on the amount of information being stored in the session.

There are probably some better defined uses of the redirect attribute and
when/where to use it, but the above is the general rules i go by, having run
into problems with both redirecting and not redirecting in the past.

hope this helps

Claire


- Original Message -
From: "Antony Paul" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 1:28 PM
Subject: forward vs redirect ?


> Hi,
> I would like to receive comments on when to use forward and redirect
in
> action mapping. Do people use forward only. All the articles and examples
I
> saw uses forward.
>
> Antony Paul.
>
> -
> 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: validation : the select field and checkbox field origin value lost...

2003-11-28 Thread Claire Wall
Ricky,

it is possible to do what you wish to do by doing the following (example
taken from a similiar thing that i did):

  
  
   
  

here i am iterating through a list of User objects in my form (my User
object is basically a class with the fields 'id' and 'username'). By using
 you can then use a JSP expression to set the value of the
 using the id of the . So in your case it will be
something like:


  
  





hope this helps
claire

- Original Message -
From: "Ricky" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 28, 2003 4:37 PM
Subject: Re: validation : the select field and checkbox field origin value
lost...


> thanks for helping me..  and then i search a question like this at achieve
> mailing and it told me use , and i test it, the solution is
ok,
> but, what a pity, i can't use  , because.. if i use it...it
> will show me the exception :"equal symbol expected"
> in the jsp page , i use a  nested a  in it. just like this.
>
> 
>/>">
> 
>
> if i use that code above , it shows me the exception... so i have to
abandon
> the  tag, what a pity... :(   i can only use common html
syntax
> , so my first problem you replied me come out..
>
> and could anyone have a better solution about my case?
>
> or i can change the  to java script as java.util.List to
use
> a loop to get my select option...in fact, i don't want insert a java
script
> in my page, all of my page are using taglib, none java script within my
jsp
> page
>
> and what about  tag... any other better way?
>
>
>
> - Original Message -
> From: "Janice" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, November 29, 2003 12:15 AM
> Subject: re: validatation : the select field and checkbox field origin
value
> lost...
>
>
> > Hi Ricky,
> >
> > After validation, struts will display whatever you specified in the
input
> > parameter of your action mapping.  If you specify an action (like
> > displayForm.do), then all of the processing that is done in that action
> will
> > be performed before the page is shown.  I suspect this is why the values
> on
> > the form that were changed have gone back to their defaults.  What you
> > probably want to do instead is specify the .jsp page that you would
> normally
> > forward to upon success (like myForm.jsp).
> >
> > hth,
> > Janice
> >
> >
> > -
> > 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: request.setAttribute

2003-11-28 Thread Claire Wall
Hi Sporak,

The name which you have given your object is "myObejct" so when you try to retrieve 
this object off of the request, you need to do:

MyObject o2 = (MyObject)request.getAttribute("myObejct");

and not:

MyObject o2 = (MyObject)request.getAttribute("o");

Doing it this way (the way you have done it) would try to retrieve an object that has 
been given the key "o" but you have no object on the request with that name, so o2 
will be null. This is why you're getting the NullPointer exception.

Hope that helps

Claire :)



-Original Message-

From: Honza Spurný [mailto:[EMAIL PROTECTED]

Sent: 28 November 2003 11:40

To: [EMAIL PROTECTED]

Subject: request.setAttribute



Hi there,

I have small problem with adding some objects to the request. I need to

store quite huge object into request variable

MyObject o = new MyObject();

o.setObjectName("name");

request.setAttribute("myObejct", o);

These are correct steps how to make it, aren't they? But the object MyObject

is really huge. Is it possible, tak the huge objects are not store into

request variable? Because when I store there object that surely exists, and

then I call

MyObject o2 = (MyObject)request.getAttribute("o");

if (o2 == null) System.out.println("NULL");

else System.out.println(o.getObjectName());

I always get NULL on output.

Can be there problem with the size of such object?

Thanks

Sporak



-

To unsubscribe, e-mail: [EMAIL PROTECTED]

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