RE: Nested logic:iterate tags ServletExec

2001-06-07 Thread Roman Fail

I can second your problems with nested iterate tags using ServletExec.
We are running JDK 1.3, ServletExec 3.1, Win2k/IIS 5.0.  I posted
something about it a few weeks ago but no one replied.  It appeared to
me to be some sort of recursion issue, where the body of the inner
iterate tag was evaluated and output prior to the outer iterate tag.  We
ended up just using a scriplet for the outer loop and an iterate tag for
the inner loop.  I havent' seen any other glaring problems with the
custom tags running under ServletExecyet.
 
ServletExec 4.0 is in beta right now, perhaps that will solve the
problem?  It's supposed to support Servlet API 2.3 and JSP 1.2 (as soon
as they are released!).
 
Roman
 

-Original Message- 
From: Amos Shapira 
Sent: Wed 6/6/2001 8:58 AM 
To: '[EMAIL PROTECTED]' 
Cc: 
Subject: RE: Nested logic:iterate tags



Hi,

I just had bad experience with ServletExec 3.0E and nested
iterate tags.  When I changed the inner iterate tag back to
scriptlets things startted working again (the code worked fine
under Tomcat 3.2.1).

Is anyone aware of problems with NewAtlanta's handling of custom
tags in general or Struts in particular?

My env:

1. Sun JDK 1.2.2_5/6
2. New Atlanta ServletExec 3.0E
3. Windows 2000 Professional or Sparc Solaris 2.6
4. Jakarta Struts and Jakarta Taglib

Thanks,

--Amos




 winmail.dat


Can anyone help with solving the BACK button problem, in the browser?

2001-06-07 Thread Dudley [EMAIL PROTECTED]

Please help,

When the user pushes the back button, I want the page to redirect or refresh
to a different page, please, any ideas?

Thanx guys and gals
Dudley



HOW TO INCLUDE JAVASCRIPT FILE.js in your struts jsp page?

2001-06-07 Thread Dudley [EMAIL PROTECTED]

Does anyone have an example of this?



RE: HOW TO INCLUDE JAVASCRIPT FILE.js in your struts jsp page?

2001-06-07 Thread Manoj Deb

You can get help of including JAVASCRIPT FILE.js and style sheet  in
struts jsp from the below lines of code:

e.g:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
%@ taglib uri=/WEB-INF/app.tld prefix=marsh %

html

head
Titlebean:message key=policy.selaccexec//TITLE
link rel=stylesheet href=StyleSheet/marshstyles.css
link rel=stylesheet href=StyleSheet/component.css

script language=JavaScript src=javascript/CansysScript.js
/script
/head
body




/body
/html


Regards,
Manoj
-Original Message-
From:   Dudley Butt@i-Commerce
[mailto:[EMAIL PROTECTED]]
Sent:   Thursday, June 07, 2001 1:50 PM
To: '[EMAIL PROTECTED]'
Subject:HOW TO INCLUDE JAVASCRIPT FILE.js in
your struts jsp page?

Does anyone have an example of this?



Re: Nested logic:iterate tags ServletExec

2001-06-07 Thread Ted Husted

Be sure to report this to your vendor; people are starting to use Struts
as a compatibility test of their containers with the specifications ;-)

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Roman Fail wrote:
 
 I can second your problems with nested iterate tags using ServletExec.
 We are running JDK 1.3, ServletExec 3.1, Win2k/IIS 5.0.  I posted
 something about it a few weeks ago but no one replied.  It appeared to
 me to be some sort of recursion issue, where the body of the inner
 iterate tag was evaluated and output prior to the outer iterate tag.  We
 ended up just using a scriplet for the outer loop and an iterate tag for
 the inner loop.  I havent' seen any other glaring problems with the
 custom tags running under ServletExecyet.
 
 ServletExec 4.0 is in beta right now, perhaps that will solve the
 problem?  It's supposed to support Servlet API 2.3 and JSP 1.2 (as soon
 as they are released!).
 
 Roman
 
 
 -Original Message-
 From: Amos Shapira
 Sent: Wed 6/6/2001 8:58 AM
 To: '[EMAIL PROTECTED]'
 Cc:
 Subject: RE: Nested logic:iterate tags
 
 
 
 Hi,
 
 I just had bad experience with ServletExec 3.0E and nested
 iterate tags.  When I changed the inner iterate tag back to
 scriptlets things startted working again (the code worked fine
 under Tomcat 3.2.1).
 
 Is anyone aware of problems with NewAtlanta's handling of custom
 tags in general or Struts in particular?
 
 My env:
 
 1. Sun JDK 1.2.2_5/6
 2. New Atlanta ServletExec 3.0E
 3. Windows 2000 Professional or Sparc Solaris 2.6
 4. Jakarta Struts and Jakarta Taglib
 
 Thanks,
 
 --Amos
 
 
 
   
   Name: winmail.dat
winmail.datType: application/ms-tnef
   Encoding: base64



Problems with CSS and TEMPLATE !!

2001-06-07 Thread Chuck Amadi


Hi , I have utilised my Companies Cascade Style Sheet .(struts-bbnpa
is the name of My Application ).
My classpath is as follows /webapps/struts-bbnpa/WEB-INF/index.jsp
- Thus classpath for css is as follows /webapps/struts-templates/css/bbnpa.css.
I have included the - %@ taglib uri='/WEB-INF/tlds/template.tld'
prefix='template' %>
I have also included link rel="stylesheet" href="css/bbnpa.css"
 charset="ISO-8859-1"
type="text/css"> within my index.jsp but i am recieving the following.
Any pointers as i am about to reach a project benchmark. Cheers All.;^}
Error: 500
Location: /struts-bbnpa/index.jsp
Internal Servlet Error:
org.apache.jasper.compiler.CompileException: C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\index.jsp(6,0)
Unable to open taglibrary /WEB-INF/tlds/template.tld : C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\tlds\template.tld
(The system cannot find the path specified)
 at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



RE: invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Peter Doyle

Hi,
 I'm using IE 6 beta. I tired it with Netscape 6 and there was no change.
Its not a browser issue. The struts upload example works I think because the
forward is to a jsp and not to another action. In my case I forward to an
action that takes in the request from the controller. I guess the request is
Multipart but should be a regualar requestor the other way around.. Its
just confusing.

At least I'm not alone :)

Peter

-Original Message-
From: Graeme Miller [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 23:17
To: '[EMAIL PROTECTED]'
Subject: RE: invalid multipart request in beta 3


Are you using IE 5.5?  Coz there are some documented issues with IE5 and
below and file uploads in Struts.

Unfortunately I AM using IE5.5 and this is not working for me in Struts
1.0b3 where it was in Struts 1.0b1 so something has definitely been broken
in either b2 or b3.

 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 7 June 2001 4:29 a.m.
 To: [EMAIL PROTECTED]
 Subject: RE: invalid multipart request in beta 3


 The form tag uses enctype multipart/form-data. Uploading is not the
 problem. The file uploads okay. When I forward to the next
 action I get the
 error. I'm wondering if the request is wrapped in a Mulitpart
 request of
 some kind.

 Peter


 -Original Message-
 From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 16:42
 To: [EMAIL PROTECTED]
 Subject: Re: invalid multipart request in beta 3


 Hi Peter,

 I have a file upload program and I am using b3 and everything
 is working
 just fine. Would you make sure that you set the enctype to
 multipart/form-data on your form tag.

 Thanks,
 Amalendu Biswas.


 From: Peter Doyle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: invalid multipart request in beta 3
 Date: Wed, 6 Jun 2001 15:44:58 +0100
 
 Hi,
   I recently changed from Struts b1 to b3. (I skipped b2) I have doe
 working
 with b1 to handle uploading, based on the upload application
 that came with
 struts. Since changed to b3 I get the following error:
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
 
 I cannot find what has changed between struts b1 and b3 that
 would cause
 this. I cannot find a way to resolve it. The code in my upload action
 executes and finishes. Control is passed to the controller
 servlet where
 this problem occurs.
 
 I would appreciate any help
 
 Thanks,
 Peter
 
 
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
  at
 org.apache.struts.upload.MultipartIterator.parseRequest(Multi
 partIterator.j
 a
 va:345)
  at
 org.apache.struts.upload.MultipartIterator.(MultipartIterator.
 java:152)
  at
 org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
 quest(DiskMult
 i
 partRequestHandler.java:65)
  at
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
  at
 org.apache.struts.action.ActionServlet.processPopulate(Action
 Servlet.java:2
 0
 53)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1563)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
  at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
  at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
 tDispatcher.ja
 v
 a:88)
  at
 org.apache.struts.action.ActionServlet.processActionForward(A
 ctionServlet.j
 a
 va:1758)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1595)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
  at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
  at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
 tDispatcher.ja
 v
 a:88)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
  at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
  at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
  at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
  at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
 
 
 
 
 
 --
 __
 Peter Doyle  TEO Media Ireland
 [EMAIL PROTECTED] http://www.teomedia.com
 Ph +353 1 888 1353  Fx +353 1 888 1354
 Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
 __
 

 _
 Get 

RE: Problems with CSS and TEMPLATE !!

2001-06-07 Thread Jon.Ridgway









Hi Chuck,



You shouldn't have to add your webapp to the classpath under
Tomcat. So you might have some other setup config
issue.  Have you added your tlds taglib defs into your web.xml ? 







-Original Message-
From: Chuck Amadi
[mailto:[EMAIL PROTECTED]] 
Sent: 07 June 2001 11:22
To: Petr Jiricka;
[EMAIL PROTECTED]; Craig R. McClanahan
Subject: Problems with CSS and
TEMPLATE !!



Hi , I have utilised my Companies Cascade Style Sheet .(struts-bbnpa is the
name of My Application ). 

My classpath is as follows /webapps/struts-bbnpa/WEB-INF/index.jsp - Thus classpath for
css is as follows /webapps/struts-templates/css/bbnpa.css. 

I have included the - %@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %

I have also included link
rel=stylesheet href="css/bbnpa.css 

charset=ISO-8859-1 type=text/css within
my index.jsp but i am recieving the following. 

Any pointers as i am about to reach a project
benchmark. Cheers All.;^} 

Error: 500 

Location: /struts-bbnpa/index.jsp 

Internal Servlet Error: 

org.apache.jasper.compiler.CompileException:
C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\index.jsp(6,0) Unable to open
taglibrary /WEB-INF/tlds/template.tld :
C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\tlds\template.tld (The
system cannot find the path specified) 
 at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)


-- 
The views expressed by the sender of this message don't 
necessarily represent those of Brecon Beacons National Park 
Authority. This message is intended for the addressee(s) only 
and is sent in confidence; if you receive it in error, please can you 
let us know (at [EMAIL PROTECTED]) and then destroy all copies. 
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn 
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. 
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion 
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn 
mewn camgymeriad, a fyddech gystal â rhoi gwybod i 
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. 









Re: viewing combo box

2001-06-07 Thread William Jaynes

Easiest thing is to have a propery in your ActionForm that tests whether
the combo box is empty or not. Then in your jsp you'll need to surround
the select/option tags with a logic tag of some kind, like

logic:equal name=form property=comboEmpty value=false
...
/logic:equal

- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 4:49 PM
Subject: viewing combo box


 Hi,

 lets say you have a combo box filling from a vector. I can get this to
work
 but I don't want the combo box to show if there are no options in it.
In
 other words if the vector=0. What the best way to do this.

 Thanks for the help.

 Alex





Re: Problems with CSS and TEMPLATE !!

2001-06-07 Thread Chuck Amadi


 Hi this is what's in my xml file beaneath /webapps/struts-bbnpa(myapp)/WEB-INF/xml
 taglib>
 taglib-uri>/WEB-INF/struts-template.tld/taglib-uri>
 taglib-location>/WEB-INF/struts-template.tld/taglib-location>
 /taglib>
"Jon.Ridgway" wrote:
 Part 1.1 Type: Plain
Text (text/plain)
 Encoding:
quoted-printable

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



Re: Problems with CSS and TEMPLATE !!

2001-06-07 Thread Chuck Amadi



Hi "Jon.Ridgway" going back to my set-up - tomcat3.2.1/webapps/struts-bbnpa/
Thus my jsp, taglibs and struts-framework etc should be under
webapps and not struts-bbnpa.
Please not that i had to deploy 6* struts-war files in C:\jarkarta-tomcat-3.2.1\webapps\and
then re-start tomcat thus i renamed the struts-blank to struts-bbnpa
( bbnpa- abbreviation of my company).So basically everthing in my struts-bbnpa
should be in technicaly webapps including all the taglib's and exspecially
the struts details.
If so uh oh. please confirm and direct as a don't fancy later into the
projects having config problems .
Cheers chuck.
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



Re: Problems with CSS and TEMPLATE !!

2001-06-07 Thread Ted Husted

This doesn't seem to match what was given in the other message.

I believe the other cited a /tlds/ folder. 

Chuck Amadi wrote:
 
   Hi  this is what's in my xml file beaneath
 /webapps/struts-bbnpa(myapp)/WEB-INF/xml
 
   taglib
 taglib-uri/WEB-INF/struts-template.tld/taglib-uri
 taglib-location/WEB-INF/struts-template.tld/taglib-location
   /taglib
 
 Jon.Ridgway wrote:
 
 Part 1.1Type: Plain Text (text/plain)
 Encoding: quoted-printable




Re: Scratch RowSets

2001-06-07 Thread Ted Husted

Ted Husted wrote:
 Now, the next step is to create a RowSet from scratch to insert a new
 record to a new table. Given this, there doesn't seem to be any reason
 to have a seperate value object bean for a data set that is coming from
 or going to a persistent store.

In case anyone is interested, all I did was select a record that wasn't
there (primary key=0), and, bingo-bango, CachedRowSet created an empty
but valid RowSet, ready to receive new rows. 

So, now instead of duplicating the data in my own set of properties, I'm
using the CachedRowSet's storage locations directly through a thin
wrapper with conventional mutators and accessors. This reduces the
overhead of redundant storage, retains all the flexibility of a standard
value object, is compatible with existing code bases, and can also
leverage the type casting built into RowSets. 

[ DBMS ] - [ RowSet ] - [ ActionForm - RowSet ] - 
[ DBMS ] - [ RowSet ] - [ JSP or ActionForm ]

And, of course, a RowSet can be treated just like a ResultSet in a JSP,
but without the overhead of an open connection.

A full treatment will follow, but here are some snippets.

ResultValue.java 
// a RowSet Iterator wrapper subclassed as a 
// value object wrapper around a CachedRowSet (whew!)

 /**
  * Return the account
  */
 public String getAccount() {
 try {
 return values.getString(account);
 }
 catch (SQLException sqle) {
 return null;
 }
 }

// .. more property wrappers

 /**
  * Bulk mutator for data transfer from another object
  */
public void set(
String bid, String lot, String amount, String account,
String precedence, String  bidType, String bidFrom, String
pickup
) throws SQLException {

 values.updateString(bid_key,bid);
 values.updateString(lot,lot);
 values.updateString(amount,amount);
 values.updateString(account,account);
 values.updateString(bidder_key,precedence);
 values.updateString(bidType,bidType);
 values.updateString(bidFrom,bidFrom);
 values.updateString(pickup,pickup);
}

 /**
  * Convenience constructor to set internal RowSet
  */
public ResultValue(RowSet values) {
super(values);
}

Result.java 
// encapsulates instance of ResultValue with other 
// helper properties and serves as a data access object

public int insert() throws SQLException {

ResultValue resultValue = (ResultValue) getRows();

  // MySQL can't insert via a RowSet, so use a Statement instead
return Statements.bidInsert(
resultValue.getLot(),
resultValue.getAmount(),
resultValue.getAccount(),
resultValue.getPrecedence(),
resultValue.getBidType(),
resultValue.getBidFrom(),
resultValue.getPickup()
   );
}


Access.java (an Action)
// selects appropriate classes and 
// methods for given request task

// -- INSERT --
if (task.equals(insert)) {

// Instantiate blank RowSet
result = thisResult.select(); // key=0
resultValue =
(ResultValue) thisResult.getRows();

// Create new row in empty set
resultValue.moveToInsertRow(); 

// Transfer data
resultValue.set(
   thisForm.getBid(),
   thisForm.getLot(),
   thisForm.getAmount(),
   thisForm.getAccount(),
   thisForm.getPrecedence(),
   thisForm.getBidType(),
   thisForm.getBidFrom(),
   thisForm.getPickup()
);

// Execute insert command for this Result object
result = thisResult.insert();

// Analyze outcome
if (result==0) {
message = error.database.error;
}
else {
message = record.inserted;
}
}

When retrieving multiple rows, the Result object (a proper JavaBean) can
be inserted in the request, along with it's RowSet. I wrote a quick
Iterator wrapper for RowSets so it could be used by the iterate tag. 

Front to back This gives you a pattern like:

// Search.perform

// Select command
if (task.equals(lot))
command = Commands.BID_SEARCH_LOT;
if (task.equals(account))
command = Commands.BID_SEARCH_ACCOUNT;

// Ready result
Result thisResult = new Result(key,task,command);

// Retrieve data set
thisResult.execute();

// Queue for view
request.setAttribute(result,thisResult);

// Result.execute

public void execute() throws SQLException {
rows = new 

Re: Problems with CSS and TEMPLATE !!

2001-06-07 Thread Chuck Amadi

Sorry i amended the xml

Ted Husted wrote:

 This doesn't seem to match what was given in the other message.

 I believe the other cited a /tlds/ folder.

 Chuck Amadi wrote:
 
Hi  this is what's in my xml file beaneath
  /webapps/struts-bbnpa(myapp)/WEB-INF/xml
 
taglib
  taglib-uri/WEB-INF/struts-template.tld/taglib-uri
  taglib-location/WEB-INF/struts-template.tld/taglib-location
/taglib
 
  Jon.Ridgway wrote:
 
  Part 1.1Type: Plain Text (text/plain)
  Encoding: quoted-printable
 

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





Re: Problems with Classpath, CSS and TEMPLATE !!

2001-06-07 Thread Chuck Amadi


I now recieve the following since i made that alteration
within the broswer i type http://localhost:8080/struts-bbnpa/index.jsp
Not Found (404)
Original request: /struts-bbnpa/css/bbnpa.css
Not found request: /struts-bbnpa/css/bbnpa.css
Albiet is my classpath set up wrong.
C:\jarkarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\
Cheers Chuck
Ted Husted wrote:
This doesn't seem to match what was given in the
other message.
I believe the other cited a /tlds/ folder.
Chuck Amadi wrote:
>
> Hi this is what's in my xml file beaneath
> /webapps/struts-bbnpa(myapp)/WEB-INF/xml
>
> taglib>
> taglib-uri>/WEB-INF/struts-template.tld/taglib-uri>
> taglib-location>/WEB-INF/struts-template.tld/taglib-location>
> /taglib>
>
> "Jon.Ridgway" wrote:
>
> > Part 1.1 Type: Plain Text (text/plain)
> >
Encoding: quoted-printable
>

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



Re[2]: Scratch RowSets

2001-06-07 Thread Oleg V Alexeev

Hello Ted,

Thank for good stub. Now I am trying to implement such approach in my
extension to struts - BeanFactoryServlet.

Thursday, June 07, 2001, 3:38:30 PM, you wrote:

TH Ted Husted wrote:

TH  skipped


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





user-specific default-values of html-formulars

2001-06-07 Thread Michael Schommer

Hi,

I want to save user-specific default-values of html-formulars.
I think the best way is to put the ActionForms in a synchronized HashMap
(user as key) and save this in a file when a user specifies new
default-values for the formular.
In the ActionForm-constructor I will check the HashMap if default values
for the formular are present and set them.

Is there any other meaning? Does anybody make it so?

Gruß
Michael

--
Java - write once, run anywhere






Re: exception in MessageTag.doStartTag()

2001-06-07 Thread RoleModel Software

We have struts.jar in /WEB-INF/lib/

I believe that everthing is in the classpath... but that we probably have a
configuration problem in one of our files.
The immediate problem that I see in the doStartTag() method is that the
message we get back is null.

- Original Message -
From: Oleg V Alexeev [EMAIL PROTECTED]
To: RoleModel Software [EMAIL PROTECTED]
Sent: Thursday, June 07, 2001 1:06 AM
Subject: Re: exception in MessageTag.doStartTag()


 Hello RoleModel,

 Thursday, June 07, 2001, 1:44:37 AM, you wrote:

 RS We're just starting to learn about Struts. We have downloaded the code
(and binaries) (v.b3) for struts-example. The binaries run fine, and we get
the expected output. When we try to set up the
 RS source version, though, we get the following error:

 RS   javax.servlet.jsp.JspException
 RS java.lang.Throwable(java.lang.String)
 RS java.lang.Exception(java.lang.String)
 RS javax.servlet.jsp.JspException(java.lang.String)
 RS int org.apache.struts.taglib.bean.MessageTag.doStartTag()
 RS void
_0002findex_0002ejspindex_jsp_0._jspService(javax.servlet.http.HttpServletRe
quest, javax.servlet.http.HttpServletResponse)...

 RS Can anybody give us a clue about what's going on? As far as we can
tell, we've got everything configured properly, but we're guessing we made a
mistake somewhere.

 I think you place struts.jar to the CLASSPATH. struts.jar must be placed
 to the WEB-INF/lib directory of your application, remove any
 references to it from CLASSPATH.

 If struts.jar in WEB-INF/lib , CLASSPATH is free of links to the
 struts.jar and you are already has this exception then explane please
 your problem.

 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]






RE: No clue what is wrong...

2001-06-07 Thread Zaremba, Don

Are you still having problems with JRun finding your prop files?
I'm having a similar problem, I solved it temporarily by moving all my
classes to be under the servers/lib directory, but I could never get it to
work
leaving the files under the application/WEB-INF/classes dir.

don


-Original Message-
From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 5:30 PM
To: '[EMAIL PROTECTED]'
Subject: RE: No clue what is wrong...


Oh.. sorry.  I was just trying to abbreviate.  It is named
ApplicationResources.properties.

-Original Message-
From: Steven Leija [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 4:03 PM
To: [EMAIL PROTECTED]
Subject: Re: No clue what is wrong...


In your configuration file, you are pointing to an
ApplicationResources.properties file and it looks like you named your own
properties file called App.props

so your path would be:

org.apache.struts.webapp.example.App

Steven



ACtionError Issues

2001-06-07 Thread Prabha Desai
Title: ACtionError Issues





i have a page which calls an Action Form based on the action. Within the page, i have logic to view detail or not.
I am trying to saveErrors and output them back to the page, but I keep getting an infinite loop. 



Error:



path= :action: Processing a POST for /department path= :action: Looking for ActionForm bean under attribute 'departmentForm' path= :action: Recycling existing ActionForm bean instance of class 'com.netvendor.nvat.struts.forms.DepartmentForm' path= :action: Populating bean properties from this request path= :action: Validating input form properties path= :action: Validation error(s), redirecting to: /department.do



my main page is department.jsp
The action to view is viewItem on which I need to show the errors..
Input on the struts-config page is department.do.
The initial page is department.jsp with action of viewList.
This is already within the Action class.
 if (!errors.empty()) {
 saveErrors(request, errors);
 saveToken(request);
 return (new ActionForward(mapping.getInput()));
 }


I need to write out errors if the user has not filled in all the items.





Re: ACtionError Issues

2001-06-07 Thread Ted Husted

You may need to set up another Action Mapping with validate set to
false, but both could point to the same resources. 

Or, you may be able to just use department.jsp as the input resource.

 Prabha Desai wrote:
 
 i have a page which calls an Action Form based on the action. Within
 the page, i have logic to view detail or not.
 I am trying to saveErrors and output them back to the page, but I keep
 getting an infinite loop.
 
 Error:
 
 path= :action: Processing a POST for /department path= :action:
 Looking for ActionForm bean under attribute 'departmentForm' path=
 :action:  Recycling existing ActionForm bean instance of class
 'com.netvendor.nvat.struts.forms.DepartmentForm' path= :action:
 Populating bean properties from this request path= :action:
 Validating input form properties path= :action:   Validation
 error(s), redirecting to: /department.do
 
 my main page  is department.jsp
 The action to view is viewItem on which I need to show the errors..
 Input on the struts-config page is department.do.
 The initial page is department.jsp with action of viewList.
 This is already within the Action class.
 if (!errors.empty()) {
 saveErrors(request, errors);
 saveToken(request);
 return (new ActionForward(mapping.getInput()));
 }
 
 I need to write out errors if the user has not filled in all the
 items.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Matt Raible

Has anyone used logic:iterator to display a list of records, and
corresponding list navigation links at the bottom?

For instance, I have an Iteration of DataObjects that I can list through
with the following code:

while (iteratorName.hasNext()) {
dataObject = (DataObject)iteratorName.next();
out.println(dataObject.getName());
}

I'm assuming I can do this with the Iterator tag, however, I would also like
to display the following at the bottom of the list:

First  |  1-10  |  11-20  |  20-30  | Last

Where there are 30 records returned.

Any ideas?

Thanks,

Matt


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




me again struts-setup problems regarding Top level

2001-06-07 Thread Chuck Amadi


Sorry all but to install Struts i have to copy the six war files in my
Struts / webapp directory to my container webapps directory thus restart
my container .
When i mount separately jakarta-struts or the webapps of jakarta-struts
it did not deploy the war-files.It has to be done via the containers
webapps . Hence i have too if i want rename the struts-blank file as
my
companies web application(struts-bbnpa) . That's why i seemed to have
more than one
web app at top level.
Can you see my dilemma folks i have a webapp at the container
level as below
C:\jakarta-tomcat-3.2.1\webapps ( then comes struts-bbnpa
the blank war file that was like the other five war files auto-deployed
to the containers webapps) .What's going on as i have been told that i
need to mount my web applications as separate filesystems, they must be
a root of a separate filesystem. is this correct as im seem to be going
backwrads.
Cheers chuck
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.


begin:vcard 
n:amadi;chuck
tel;cell:07970 972534
tel;fax:01874 622574
tel;home:[EMAIL PROTECTED]
tel;work:Brecon Beacons National Park
x-mozilla-html:FALSE
url:http://www.breconbeacons.org
org:Brecon Beacons National Park;I.T
version:2.1
email;internet:[EMAIL PROTECTED]
title:I.T Systems Programmer
adr;quoted-printable:;;7 Glamorgan Street=0D=0ABrecon=0D=0APowys;Brecon;Powys;LD3 7DP;Wales (United Kingdom)
fn:chuck amadi
end:vcard



Re: Can anyone help with solving the BACK button problem, in the browser?

2001-06-07 Thread Peter Alfors

Depending on which browser you use, and the data on the page, the back button
may cause (or ask) the page to reload.
However, some browsers (like IE) only display a snapshot of what the last page
rendered to.
Therefore, you cannot use scriptlets or the action class.  However, you are able
to kick-off javascript.
If you can gaurantee that your users will have javascript enabled, you can write
a simple test to see if this page was already displayed to the user.  You could
check a flag (hidden field) when the page loads.  If the flag is true, then use
the javascript to reload to your desired page.

HTH,
Pete

Dudley Butt@i-Commerce wrote:

 Please help,

 When the user pushes the back button, I want the page to redirect or refresh
 to a different page, please, any ideas?

 Thanx guys and gals
 Dudley


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-07 Thread Biswas Amalendu

Graeme Miller,

I was trying to replicate the situation that you have and I think what you 
need to do is, go to your struts-config.xml and for your specific action tag 
turn the validate to true if the validate() method of the form bean should 
be called prior to calling this action, or set to false if you do not want 
validation performed. Let me know if you need any further help.

Thanks,
Amalendu Biswas.

From: Graeme Miller [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: RE: Moving from Struts 1.0b1 to Struts 1.0b3
Date: Thu, 7 Jun 2001 10:21:13 +1200

Unfortunately in my case the controller is not reused but the form bean is,
meaning if I was to do this validation in the controller I would have to do
it for every Action that uses this bean.  Thanks for the suggestion but it
looks like I will have to stay on b1 until a more stable release of Struts
comes out (maybe the 1.0 final release?)

  -Original Message-
  From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 7 June 2001 3:31 a.m.
  To: [EMAIL PROTECTED]
  Subject: Re: Moving from Struts 1.0b1 to Struts 1.0b3
 
 
  Graeme Miller,
 
  As a solution you can have your controller do the validation
  instead of
  validating in the form bean. Let me know if you need any further help.
 
  Thanks,
  Amalendu Biswas.
 
  From: Graeme Miller [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
  Subject: Moving from Struts 1.0b1 to Struts 1.0b3
  Date: Wed, 6 Jun 2001 18:07:59 +1200
  
  As no-one has provided any thoughts on this one I thought I
  would repost
  and
  give a bit more detail on how the error is being caused.
  
  Problem: The validate(mapping, request) method on the
  ActionForm class is
  not completing sucessfully in Struts 1.0b3 where it was in
  Struts 1.0b1.
  
  Detail: This is a form that has a couple of struts file
  upload controls on
  it (as well as text fields etc) so I suppose that might be
  related somehow.
  The exception being thrown in the log is :-
  
  java.lang.ClassCastException:
  org.apache.struts.upload.MultipartRequestWrapper
   at
  org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
  tDispatcherImpl
  .java:144)
   at
  org.apache.struts.action.ActionServlet.processValidate(Action
  Servlet.java:21
  37)
   at
  org.apache.struts.action.ActionServlet.process(ActionServlet.
  java:1564)
   at
  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrappe
  r.java:404)
   at
  org.apache.tomcat.core.Handler.service(Handler.java, Compiled
  Code)
   at
  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.
  java, Compiled
  Code)
   at
  org.apache.tomcat.core.ContextManager.internalService(Context
  Manager.java:79
  7)
   at
  org.apache.tomcat.core.ContextManager.service(ContextManager.
  java:743)
   at
  org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pr
  ocessConnection
  (Ajp12ConnectionHandler.java:166)
  
   at
  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
  Compiled Code)
   at
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadP
  ool.java,
  Compiled Code)
   at java.lang.Thread.run(Thread.java:479)
  
  Does anyone have any ideas?  This one has got me totally stumped and
  without
  a solution we will have to remain on Struts 1.0b1.
  
  Thanks in advance,
  
  Graeme.
  
  -Original Message-
  From: Graeme Miller [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, 5 June 2001 5:02 p.m.
  To: '[EMAIL PROTECTED]'
  Subject: Moving from Struts 1.0b1 to Struts 1.0b3
  
  
  Currently having a problem with migrating code from using
  Struts 1.0b1 to
  Struts 1.0b3
  
  Everything seems to work fine apart from the fact that the
  validate methods
  on our form beans (ie subclasses of
  org.apache.struts.action.ActionForm) no
  longer get called successfully.  I have had a look through
  the release
  notes
  and cannot find any reasons why these methods would no longer work.
  
  Any ideas people?  The following error is what gets thrown
  in the tomcat
  log.
  
  java.lang.ClassCastException
   at
  org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
  tDispatcherImpl
  .java, Compiled Code)
   at
  org.apache.struts.action.ActionServlet.processValidate(Action
  Servlet.java,
  Compiled Code)
   at
  org.apache.struts.action.ActionServlet.process(ActionServlet.
  java, Compiled
  Code)
   at
  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at
  

Re: exception in MessageTag.doStartTag()

2001-06-07 Thread Kyle Brown

I got this error a LOT in writing up my instructions for using Struts
within VAJ.  In 9 cases out of 10 what was happening was that Struts was
failing to load either the DTD's or the struts-config.xml file.  Basically,
what is happening is that the servlet init() method in the Struts
ActionServlet tries to do some one-time-only setup - this includes setting
up some shared configuration information. If the setup doesn't complete
successfully (usually because it can't find a configuration file) then none
of the tag libraries (or the rest of struts for that matter) will work.

Look back through your log files and see if there isn't a set of earlier
messages about not finding one or more files.  Fix that problem and this
one will probably go away.

Kyle Brown


RoleModel Software [EMAIL PROTECTED] on 06/07/2001
09:03:17 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: exception in MessageTag.doStartTag()



We have struts.jar in /WEB-INF/lib/

I believe that everthing is in the classpath... but that we probably have a
configuration problem in one of our files.
The immediate problem that I see in the doStartTag() method is that the
message we get back is null.

- Original Message -
From: Oleg V Alexeev [EMAIL PROTECTED]
To: RoleModel Software [EMAIL PROTECTED]
Sent: Thursday, June 07, 2001 1:06 AM
Subject: Re: exception in MessageTag.doStartTag()


 Hello RoleModel,

 Thursday, June 07, 2001, 1:44:37 AM, you wrote:

 RS We're just starting to learn about Struts. We have downloaded the
code
(and binaries) (v.b3) for struts-example. The binaries run fine, and we get
the expected output. When we try to set up the
 RS source version, though, we get the following error:

 RS   javax.servlet.jsp.JspException
 RS java.lang.Throwable(java.lang.String)
 RS java.lang.Exception(java.lang.String)
 RS javax.servlet.jsp.JspException(java.lang.String)
 RS int org.apache.struts.taglib.bean.MessageTag.doStartTag()
 RS void
_0002findex_0002ejspindex_jsp_0.
_jspService(javax.servlet.http.HttpServletRe
quest, javax.servlet.http.HttpServletResponse)...

 RS Can anybody give us a clue about what's going on? As far as we can
tell, we've got everything configured properly, but we're guessing we made
a
mistake somewhere.

 I think you place struts.jar to the CLASSPATH. struts.jar must be placed
 to the WEB-INF/lib directory of your application, remove any
 references to it from CLASSPATH.

 If struts.jar in WEB-INF/lib , CLASSPATH is free of links to the
 struts.jar and you are already has this exception then explane please
 your problem.

 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]








RE: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the BACK button problem, in the  browser?





I seem to recall a META tag called something like pragma-no-cache that you can embed in your page which will force the page to reload (not just display a snapshot). This should enable handling the situation in scriptlets or your action class.


-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the BACK button problem, in
the browser?



Depending on which browser you use, and the data on the page, the back button
may cause (or ask) the page to reload.
However, some browsers (like IE) only display a snapshot of what the last page
rendered to.
Therefore, you cannot use scriptlets or the action class. However, you are able
to kick-off javascript.
If you can gaurantee that your users will have javascript enabled, you can write
a simple test to see if this page was already displayed to the user. You could
check a flag (hidden field) when the page loads. If the flag is true, then use
the javascript to reload to your desired page.


HTH,
 Pete


Dudley Butt@i-Commerce wrote:


 Please help,

 When the user pushes the back button, I want the page to redirect or refresh
 to a different page, please, any ideas?

 Thanx guys and gals
 Dudley





RE: Can you do this with internationalisation.

2001-06-07 Thread Jon.Ridgway

Hi Alex,

Yes you can do this. When the user clicks on the flag, you set the local in
their session. Then use the local option to explicitly set the local when
using the Struts bean:message tag.
 
Jon.

-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: 07 June 2001 15:07
To: Struts
Subject: Can you do this with internationalisation.

Hi,

my boss wants me to set up one of my apps written using struts for a demo.
He wants to have a web page with a couple of flags. The use clicks on of the
flags and enters the program using the language they selected.

Not having gone down this road before any idea what that would entail. I
know I would have to create multiple localisation files for the languages.
But how do I specify for each user what file to use and can you have
multiple users all accessing your program concurrently viewing it in
different languages.

Some insight into the above is appreciated.

Alex



Re: How to add .props files to web.xml

2001-06-07 Thread Jonathan

why put it in the session when you can put it in the application scope?
I say this because heavily filled session objects have caused us problems in
weblogic, and it is really for the application anyway

- Original Message -
From: Peter Alfors [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 07, 2001 9:56 AM
Subject: Re: How to add .props files to web.xml


 You do not need to specify the style sheet in the web.xml file.  You can
just
 point to it in each of your pages.
 However, if you wanted it configurable, you could over-ride
ActionServlet.init()
 to take in the location of the style sheet and save it as an attribute of
the
 session.  Then, each of your pages could use the session attribute as the
link.
 Then, if you decide to change sheets, rename the file, etc, there is only
one
 place to update.

 HTH,
 Pete

 kuma.cra wrote:

  Hi, maybe off track but nevertheless do i have to map a resource file as
  i want to include a cascade style sheet that my company use on our
  web-site. Thus i have created a resource file beneath
  /WEB-INF/resource/bbnpa.css.
 
  Please point me in the right direction cheers.Chuck
 
  Jon.Ridgway wrote:
  
   Hi Manoj,
  
   Note the application init-param below. So struts will look in
   classes/net/itwa for the resource file in this example running under
Tomcat.
  
   Snip...
  
   !-- Action Servlet Configuration --
 servlet
   servlet-nameaction/servlet-name
  
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameapplication/param-name
 param-valuenet.itwa.ApplicationResources/param-value
   /init-param
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value2/param-value
   /init-param
   init-param
 param-namedetail/param-name
 param-value2/param-value
   /init-param
   init-param
 param-namevalidate/param-name
 param-valuetrue/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet
  
 !-- Action Servlet Mapping --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
  
   Jon.
  
   -Original Message-
   From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
   Sent: 06 June 2001 15:20
   To: '[EMAIL PROTECTED]'
   Subject: Q: How to add .props files to web.xml
  
   Sorry for being a complete newbie, but what is the XML for adding this
file
   to web.xml?
  
   ApplicationResources.properties
  
   Thanks much,
   -Wes
  
   -Original Message-
   From: Manoj Deb [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, June 05, 2001 10:57 PM
   To: [EMAIL PROTECTED]
   Subject: RE: More help Plz: Exception thrown processing JSP page...
  
   You can keep it in any dir in web tier, but there should be an entry
in
   web.xml.
  
   Rgds,
   Manoj





Re: Can you do this with internationalisation.

2001-06-07 Thread David Winterfeldt
You just need to have your users response go to an action and create a java.util.Locale object based on the users choice of language and put it in session scope under the org.apache.struts.action.Action.LOCALE_KEY constant.
session.setAttribute(org.apache.struts.action.Action.LOCALE_KEY, new java.util.Locale("fr", "CA"));
There is no problem with multiple users. All Struts components get the locale from the users session to perform locale sensitive operations.
David
 Alex Colic [EMAIL PROTECTED] wrote: 
Hi,my boss wants me to set up one of my apps written using struts for a demo.He wants to have a web page with a couple of flags. The use clicks on of theflags and enters the program using the language they selected.Not having gone down this road before any idea what that would entail. Iknow I would have to create multiple localisation files for the languages.But how do I specify for each user what file to use and can you havemultiple users all accessing your program concurrently viewing it indifferent languages.Some insight into the above is appreciated.AlexDo You Yahoo!?
Yahoo! Mail Personal Address - 
Get email at your own domain with Yahoo! Mail.

Is this possible with Struts?

2001-06-07 Thread Matt Raible

I have an iteration of Beans and I want to list through the iteration,
extract the beans and get the properties on each bean.  Is this possible?

Example code:



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Re: How to add .props files to web.xml

2001-06-07 Thread Peter Alfors

Yep... That will work too.  :)

Jonathan wrote:

 why put it in the session when you can put it in the application scope?
 I say this because heavily filled session objects have caused us problems in
 weblogic, and it is really for the application anyway

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 07, 2001 9:56 AM
 Subject: Re: How to add .props files to web.xml

  You do not need to specify the style sheet in the web.xml file.  You can
 just
  point to it in each of your pages.
  However, if you wanted it configurable, you could over-ride
 ActionServlet.init()
  to take in the location of the style sheet and save it as an attribute of
 the
  session.  Then, each of your pages could use the session attribute as the
 link.
  Then, if you decide to change sheets, rename the file, etc, there is only
 one
  place to update.
 
  HTH,
  Pete
 
  kuma.cra wrote:
 
   Hi, maybe off track but nevertheless do i have to map a resource file as
   i want to include a cascade style sheet that my company use on our
   web-site. Thus i have created a resource file beneath
   /WEB-INF/resource/bbnpa.css.
  
   Please point me in the right direction cheers.Chuck
  
   Jon.Ridgway wrote:
   
Hi Manoj,
   
Note the application init-param below. So struts will look in
classes/net/itwa for the resource file in this example running under
 Tomcat.
   
Snip...
   
!-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
   
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valuenet.itwa.ApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet
   
  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
   
Jon.
   
-Original Message-
From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 15:20
To: '[EMAIL PROTECTED]'
Subject: Q: How to add .props files to web.xml
   
Sorry for being a complete newbie, but what is the XML for adding this
 file
to web.xml?
   
ApplicationResources.properties
   
Thanks much,
-Wes
   
-Original Message-
From: Manoj Deb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:57 PM
To: [EMAIL PROTECTED]
Subject: RE: More help Plz: Exception thrown processing JSP page...
   
You can keep it in any dir in web tier, but there should be an entry
 in
web.xml.
   
Rgds,
Manoj
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: Can you do this with internationalisation.

2001-06-07 Thread Kowshik . Podder

I think I understand how this works, but some code examples would be 
handy since the documentation for the bean:message tag's locale 
attribute seems to indicate that a 
session scope bean under which our currently selected Locale object is 
stored can be used as an alternative to the Action.LOCALE_KEY constant.

Kosh

 -Original Message-
 From: Jon.Ridgway 
 Sent: 07 June 2001 15:47
 To: struts-user
 Cc: Jon.Ridgway
 Subject: RE: Can you do this with internationalisation.
 
 
 Hi Alex,
 
 Yes you can do this. When the user clicks on the flag, you 
 set the local in
 their session. Then use the local option to explicitly set 
 the local when
 using the Struts bean:message tag.
  
 Jon.
 
 -Original Message-
 From: Alex Colic [mailto:[EMAIL PROTECTED]] 
 Sent: 07 June 2001 15:07
 To: Struts
 Subject: Can you do this with internationalisation.
 
 Hi,
 
 my boss wants me to set up one of my apps written using 
 struts for a demo.
 He wants to have a web page with a couple of flags. The use 
 clicks on of the
 flags and enters the program using the language they selected.
 
 Not having gone down this road before any idea what that 
 would entail. I
 know I would have to create multiple localisation files for 
 the languages.
 But how do I specify for each user what file to use and can you have
 multiple users all accessing your program concurrently viewing it in
 different languages.
 
 Some insight into the above is appreciated.
 
 Alex
 


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.




Re: Re[2]: Scratch RowSets

2001-06-07 Thread Wolfgang Irler

Hi all RowSet-interested,
after 
  Contacts.setCommand(SELECT name, telephone from Contacts);
put
  Contacts.setTableName(Contacts);
in the example jsp mentioned below. Otherwise you won't be able to save.

Wolfgang

At 08:42 6-7-2001 +0400:
Hello Steve,

Thank you, good paper.

Thursday, June 07, 2001, 12:31:52 AM, you wrote:

SS Take a look at sun's CachedRowSet now available in early release.

SS http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html

SS S-


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]







RE: Scratch RowSets

2001-06-07 Thread Gogineni, Pratima

Hi Ted,

I remember playing with cached rowsets sometime ago. It is probably useful
to standardize your tags/code etc. based on the cached rowset rather than
create your own data-structure - but I found that particularly the
update/delete/insert into the rowset doesnt work properly for all but the
simplest tables.

 I am currently implementing my own web-app(struts-based) that could handle
more cases - one thing with this is that the user can specify the
update/insert/delete in an xml file to configure my rowset - since I think
it is not possible to anticipate in all cases what statements they would
want to use. This also allows them to fire off multiple statements (for
data-integrity reasons or something else) in a transaction for each of the
actions update/insert/delete ...

Pratima

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 4:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Scratch RowSets


Ted Husted wrote:
 Now, the next step is to create a RowSet from scratch to insert a new
 record to a new table. Given this, there doesn't seem to be any reason
 to have a seperate value object bean for a data set that is coming from
 or going to a persistent store.

In case anyone is interested, all I did was select a record that wasn't
there (primary key=0), and, bingo-bango, CachedRowSet created an empty
but valid RowSet, ready to receive new rows. 

So, now instead of duplicating the data in my own set of properties, I'm
using the CachedRowSet's storage locations directly through a thin
wrapper with conventional mutators and accessors. This reduces the
overhead of redundant storage, retains all the flexibility of a standard
value object, is compatible with existing code bases, and can also
leverage the type casting built into RowSets. 

[ DBMS ] - [ RowSet ] - [ ActionForm - RowSet ] - 
[ DBMS ] - [ RowSet ] - [ JSP or ActionForm ]

And, of course, a RowSet can be treated just like a ResultSet in a JSP,
but without the overhead of an open connection.

A full treatment will follow, but here are some snippets.

ResultValue.java 
// a RowSet Iterator wrapper subclassed as a 
// value object wrapper around a CachedRowSet (whew!)

 /**
  * Return the account
  */
 public String getAccount() {
 try {
 return values.getString(account);
 }
 catch (SQLException sqle) {
 return null;
 }
 }

// .. more property wrappers

 /**
  * Bulk mutator for data transfer from another object
  */
public void set(
String bid, String lot, String amount, String account,
String precedence, String  bidType, String bidFrom, String
pickup
) throws SQLException {

 values.updateString(bid_key,bid);
 values.updateString(lot,lot);
 values.updateString(amount,amount);
 values.updateString(account,account);
 values.updateString(bidder_key,precedence);
 values.updateString(bidType,bidType);
 values.updateString(bidFrom,bidFrom);
 values.updateString(pickup,pickup);
}

 /**
  * Convenience constructor to set internal RowSet
  */
public ResultValue(RowSet values) {
super(values);
}

Result.java 
// encapsulates instance of ResultValue with other 
// helper properties and serves as a data access object

public int insert() throws SQLException {

ResultValue resultValue = (ResultValue) getRows();

  // MySQL can't insert via a RowSet, so use a Statement instead
return Statements.bidInsert(
resultValue.getLot(),
resultValue.getAmount(),
resultValue.getAccount(),
resultValue.getPrecedence(),
resultValue.getBidType(),
resultValue.getBidFrom(),
resultValue.getPickup()
   );
}


Access.java (an Action)
// selects appropriate classes and 
// methods for given request task

// -- INSERT --
if (task.equals(insert)) {

// Instantiate blank RowSet
result = thisResult.select(); // key=0
resultValue =
(ResultValue) thisResult.getRows();

// Create new row in empty set
resultValue.moveToInsertRow(); 

// Transfer data
resultValue.set(
   thisForm.getBid(),
   thisForm.getLot(),
   thisForm.getAmount(),
   thisForm.getAccount(),
   thisForm.getPrecedence(),
   thisForm.getBidType(),
   thisForm.getBidFrom(),
   thisForm.getPickup()
);

// Execute insert command for this Result object
result = thisResult.insert();

// Analyze outcome
if (result==0) {
message = error.database.error;
}
 

Re: problem with invoking struts-template!!

2001-06-07 Thread Peter Alfors

I haven't done anything with templates, so this may not be correct.
However, if you are referencing a style sheet in your header (on a
regular page), the link:
/struts-bbnpa/css/bbnpa.css
is a reference from the context, not the WEB-INF directory.
Therefore, you would want to change your link to:
/WEB-INF/struts-template/css/bbnpa.css

However, Im not sure if the template stuff changes this.

HTH,
Pete


Chuck Amadi wrote:

 I have created a index.jsp that has the content of our company
 web-site, thus the index.jsp  is located
 C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\index.jsp

 Thus i have set up the tag libraries in the web.xml file and
 referenced the taglib at the top of my index.jsp page as
 below.Nevertheless i recieve a Not Found Error.My struts-template is
 located

 C:\jaka
 ta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\struts-template\css\bbnpa.css

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


 Not Found (404)

 Original request: /struts-bbnpa/css/bbnpa.css

 Not found request: /struts-bbnpa/css/bbnpa.css

 Any suggestions please .

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: problem with invoking struts-template!!

2001-06-07 Thread Ted Husted

I don't believe that the JSP templates and CSS files are strongly
coupled. I believe the browser applies the CSS, not the template. You
might just want to move the CSS up to where Tomcat is looking for it.

Chuck Amadi wrote:
 
 I have created a index.jsp that has the content of our company
 web-site, thus the index.jsp  is located
 C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\index.jsp
 
 Thus i have set up the tag libraries in the web.xml file and
 referenced the taglib at the top of my index.jsp page as
 below.Nevertheless i recieve a Not Found Error.My struts-template is
 located
 
 C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\struts-template\css\bbnpa.css
 
 %@ taglib uri=/WEB-INF/struts-template.tld  prefix=template %
 
 
 Not Found (404)
 
 Original request: /struts-bbnpa/css/bbnpa.css
 
 Not found request: /struts-bbnpa/css/bbnpa.css
 
 Any suggestions please .
 
 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Scope of the form

2001-06-07 Thread Joyce Tang
Title: Scope of the form





I would like to verify my understanding on this thing. Please let me know if it is correct. Thank you very much in advance.

1. Whenever the Action do a forward, the request is being forwarded.
2. When the error happens, the request is forwarded back to the same JSP
3. If I define the scope of the form related to the Action class as request, then before the JSP page is rendered, the form is still in the request, but after the JSP page is rendered,the form is taken out from the request?

Thanks a ton.


Joyce





Problem getting Struts working on RedHat 7.1/Enhydra but not Windows/Tomcat

2001-06-07 Thread Renee . Petris


I posted this yesterday but didn't get a response. Has anyone had problems
with the Struts distribution on RedHat 7.1? When I run struts-example under
Enhydra on RedHat the generated java code for the login.jsp is wrong.






I've just setup Struts to work with Tomcat under Win2K. Everything works
fine. What I noticed is that the generated page is different. The
quotations around true are not present when I'm running under Win2K. So I
get  setLocale(true) not setLocale(true). If someone knows what
could be causing the difference that would be a great help. I used the
.tar.gz binary distribution for my RedHat box and the .zip distribution for
the Win2K box.

Renee Petris
[EMAIL PROTECTED]






Has anyone run into this problem? When I try to run the struts-example page
I get the following error:

org.apache.jasper.JasperException: Unable to compile class for
JSP/home/carol/web/enhydra3.1/work/Struts/_0002findex_0002ejspindex_jsp_0.java:72:



Incompatible type for method. Can't convert java.lang.String to boolean.
_jspx_th_html_html_11.setLocale(true);


The java code generated which causes this error looks like:

org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_11
= new org.apache.struts.taglib.html.HtmlTag();
_jspx_th_html_html_11.setPageContext(pageContext);
_jspx_th_html_html_11.setParent(null);
_jspx_th_html_html_11.setLocale(true);

I've only got one version of struts.jar, the one that was packed in
struts-example.war. I'm running struts using Enhydra 3.1 on RedHat 7.1.

Renee Petris
[EMAIL PROTECTED]












RE: me again struts-setup problems regarding Top level

2001-06-07 Thread Anthony Martin

Sounds like a Tomcat setup issue to me.  Also sounds like someone is
paranoid.


-Original Message- 
From: Chuck Amadi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 6:48 AM
To: Craig R. McClanahan
Subject: me again struts-setup problems regarding Top level


Sorry all but to install Struts i have to copy the six war files in my 
Struts / webapp directory to my container webapps directory thus restart 
my container . 
When i mount separately jakarta-struts or the webapps of jakarta-struts 
it did not deploy the war-files.It has to be done via the containers 
webapps . Hence i have too if i want rename the struts-blank file as my 
companies web application(struts-bbnpa) . That's why i seemed to have more
than one 
web app at top level. 
Can you see my dilemma folks i have a webapp at the container level as below

C:\jakarta-tomcat-3.2.1\webapps   ( then comes struts-bbnpa the blank war
file that was like the other five war files auto-deployed to the containers
webapps) .What's going on as i have been told that i need to mount my web
applications as separate filesystems, they must be a root of a separate
filesystem. is this correct as im seem to be going backwrads. 
Cheers chuck 
-- 
The views expressed by the sender of this message don't 
necessarily represent those of Brecon Beacons National Park 
Authority. This message is intended for the addressee(s) only 
and is sent in confidence; if you receive it in error, please can you 
let us know (at [EMAIL PROTECTED]) and then destroy all copies. 
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn 
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. 
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion 
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn 
mewn camgymeriad, a fyddech gystal â rhoi gwybod i 
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. 
  



Log file, ArrayList/Hashmap

2001-06-07 Thread Bjagoring
Hi, 

I am not yet using Struts but I would like to apply some functionality of it 
in a webapp I'm doing. ActionServlet logs messages if the debug value is = 
1. I'm thinking about writing the messages (maybe just certain warnings or 
error messages ) to a log file (most possibly an AS/400 file), which is to be 
cleared periodically , perhaps weekly. Any idea on how to do this?

I've seen the source of FastArrayList/FastHashMap and the author recommends 
using ArrayList/Hashmap when accessing them within a single thread. I intend 
to use the latter pair instead of Vector/Hashtable for maximum performance. 
If I declare/define them inside a servlet's method, there'll be no 
synchronization problem, right? What if I declare/define them in a 
non-servlet class, say Action or ActionForm, would there be synchronization 
issues?

Any help would be highly appreciated.

Thanks in advance.

-Dingdong


Re: Is this possible with Struts?

2001-06-07 Thread David Winterfeldt
This calls getLastName() on each object in the list.
logic:iterate id="results" name="myList" bean:write name="results" property="lastName"/br
/logic:iterate
 Matt Raible [EMAIL PROTECTED] wrote: 
I have an iteration of Beans and I want to list through the iteration,extract the beans and get the properties on each bean. Is this possible?Example code:_Do You Yahoo!?Get your free @yahoo.com address at http://mail.yahoo.comDo You Yahoo!?
Yahoo! Mail Personal Address - 
Get email at your own domain with Yahoo! Mail.

FW: Scope of the form

2001-06-07 Thread Joyce Tang
Title: FW: Scope of the form








-Original Message-
From: Joyce Tang
To: '[EMAIL PROTECTED]'
Sent: 6/7/01 9:28 AM
Subject: Scope of the form


I would like to verify my understanding on this thing. Please let me
know if it is correct. Thank you very much in advance.


1. Whenever the Action do a forward, the request is being forwarded.
2. When the error happens, the request is forwarded back to the same JSP
3. If I define the scope of the form related to the Action class as
request, then before the JSP page is rendered, the form is still in
the request, but after the JSP page is rendered,the form is taken out
from the request?


Thanks a ton.


Joyce





RE: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the BACK button problem, in th e  browser?





Try putting both of the following in the HEAD element of your page. Please let us know if it works.
META NAME=Pragma CONTENT=no-cache
META NAME=Cache-Control CONTENT=no-cache


From the HTTP1.1 spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32
14.32 Pragma
The Pragma general-header field is used to include implementation- specific directives that might apply to any recipient along the request/response chain. All pragma directives specify optional behavior from the viewpoint of the protocol; however, some systems MAY require that behavior be consistent with the directives. 

 Pragma = Pragma : 1#pragma-directive
 pragma-directive = no-cache | extension-pragma
 extension-pragma = token [ = ( token | quoted-string ) ]


When the no-cache directive is present in a request message, an application SHOULD forward the request toward the origin server even if it has a cached copy of what is being requested. This pragma directive has the same semantics as the no-cache cache-directive (see section 14.9) and is defined here for backward compatibility with HTTP/1.0. Clients SHOULD include both header fields when a no-cache request is sent to a server not known to be HTTP/1.1 compliant. 

Pragma directives MUST be passed through by a proxy or gateway application, regardless of their significance to that application, since the directives might be applicable to all recipients along the request/response chain. It is not possible to specify a pragma for a specific recipient; however, any pragma directive not relevant to a recipient SHOULD be ignored by that recipient. 

HTTP/1.1 caches SHOULD treat Pragma: no-cache as if the client had sent Cache-Control: no-cache. No new Pragma directives will be defined in HTTP. 

 Note: because the meaning of Pragma: no-cache as a response
 header field is not actually specified, it does not provide a
 reliable replacement for Cache-Control: no-cache in a response



-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the BACK button problem, in
th e browser?



Thane ,


I am using:
 META http-equiv=Expires content=now
in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?


thanks,
 Pete



Thane Eisener wrote:




 I seem to recall a META tag called something like pragma-no-cache that
 you can embed in your page which will force the page to reload (not
 just display a snapshot). This should enable handling the situation in
 scriptlets or your action class.

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Can anyone help with solving the BACK button problem,
 in
 the browser?

 Depending on which browser you use, and the data on the page, the back
 button
 may cause (or ask) the page to reload.
 However, some browsers (like IE) only display a snapshot of what the
 last page
 rendered to.
 Therefore, you cannot use scriptlets or the action class. However,
 you are able
 to kick-off javascript.
 If you can gaurantee that your users will have javascript enabled, you
 can write
 a simple test to see if this page was already displayed to the user.
 You could
 check a flag (hidden field) when the page loads. If the flag is true,
 then use
 the javascript to reload to your desired page.

 HTH,
 Pete

 Dudley Butt@i-Commerce wrote:

  Please help,
 
  When the user pushes the back button, I want the page to redirect or
 refresh
  to a different page, please, any ideas?
 
  Thanx guys and gals
  Dudley





RE: SOLVED invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Peter Doyle

HAHA!

Right for anyone (not many) who came across this problem here is how to
solve it.

In the struts upload application you will see that control is sent to a JSP
after the uploading. If you send it to another action you get the
MultipartIterator problem. This is *I think* because the request is wrapped
in a MultipartRequest, as of beta 2. Now the action you forward to does not
expect the multipart request, I think, so it causes the exception... I guess
you could change the encrypt type of the destination action... anyway

What I did was forward control to a JSP that only contains a
logic:redirect to the action I want it to go to in the first place. As I'm
dumping everything into session anyway I don't need to worry about
replicating the request query.
The redirect jsp is rendered and control is redirected. You don't even know
its there.

The reason I don't use multipart in my original action is its not designed
to use multipart. I do the uploading in a separate form and action (that is
multipart) and then go back to the original action with the result, not to a
jsp.

Well it works for me :)

Peter


-Original Message-
From: Peter Doyle [mailto:[EMAIL PROTECTED]]
Sent: 07 June 2001 11:34
To: [EMAIL PROTECTED]
Subject: RE: invalid multipart request in beta 3 Controller Wrapping
Request


Hi,
 I'm using IE 6 beta. I tired it with Netscape 6 and there was no change.
Its not a browser issue. The struts upload example works I think because the
forward is to a jsp and not to another action. In my case I forward to an
action that takes in the request from the controller. I guess the request is
Multipart but should be a regualar requestor the other way around.. Its
just confusing.

At least I'm not alone :)

Peter

-Original Message-
From: Graeme Miller [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 23:17
To: '[EMAIL PROTECTED]'
Subject: RE: invalid multipart request in beta 3


Are you using IE 5.5?  Coz there are some documented issues with IE5 and
below and file uploads in Struts.

Unfortunately I AM using IE5.5 and this is not working for me in Struts
1.0b3 where it was in Struts 1.0b1 so something has definitely been broken
in either b2 or b3.

 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 7 June 2001 4:29 a.m.
 To: [EMAIL PROTECTED]
 Subject: RE: invalid multipart request in beta 3


 The form tag uses enctype multipart/form-data. Uploading is not the
 problem. The file uploads okay. When I forward to the next
 action I get the
 error. I'm wondering if the request is wrapped in a Mulitpart
 request of
 some kind.

 Peter


 -Original Message-
 From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 16:42
 To: [EMAIL PROTECTED]
 Subject: Re: invalid multipart request in beta 3


 Hi Peter,

 I have a file upload program and I am using b3 and everything
 is working
 just fine. Would you make sure that you set the enctype to
 multipart/form-data on your form tag.

 Thanks,
 Amalendu Biswas.


 From: Peter Doyle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: invalid multipart request in beta 3
 Date: Wed, 6 Jun 2001 15:44:58 +0100
 
 Hi,
   I recently changed from Struts b1 to b3. (I skipped b2) I have doe
 working
 with b1 to handle uploading, based on the upload application
 that came with
 struts. Since changed to b3 I get the following error:
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
 
 I cannot find what has changed between struts b1 and b3 that
 would cause
 this. I cannot find a way to resolve it. The code in my upload action
 executes and finishes. Control is passed to the controller
 servlet where
 this problem occurs.
 
 I would appreciate any help
 
 Thanks,
 Peter
 
 
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
  at
 org.apache.struts.upload.MultipartIterator.parseRequest(Multi
 partIterator.j
 a
 va:345)
  at
 org.apache.struts.upload.MultipartIterator.(MultipartIterator.
 java:152)
  at
 org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
 quest(DiskMult
 i
 partRequestHandler.java:65)
  at
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
  at
 org.apache.struts.action.ActionServlet.processPopulate(Action
 Servlet.java:2
 0
 53)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1563)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
  at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
  at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
 tDispatcher.ja
 v
 a:88)
  at
 

RE: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the BACK button problem, in th e  browser?





Oops, I guess I should test before I post. It looks like newer browsers don't support this as a META tag only as a header.

I added the following to one of my action classes and the perform() method was called when I pressed 'Back':


response.addHeader(Pragma,no-cache);
response.addHeader(Cache-control,no-cache);


Hope it helps,
Thane


-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the BACK button problem, in
th e browser?



Thane ,


I am using:
 META http-equiv=Expires content=now
in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?


thanks,
 Pete



Thane Eisener wrote:




 I seem to recall a META tag called something like pragma-no-cache that
 you can embed in your page which will force the page to reload (not
 just display a snapshot). This should enable handling the situation in
 scriptlets or your action class.

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Can anyone help with solving the BACK button problem,
 in
 the browser?

 Depending on which browser you use, and the data on the page, the back
 button
 may cause (or ask) the page to reload.
 However, some browsers (like IE) only display a snapshot of what the
 last page
 rendered to.
 Therefore, you cannot use scriptlets or the action class. However,
 you are able
 to kick-off javascript.
 If you can gaurantee that your users will have javascript enabled, you
 can write
 a simple test to see if this page was already displayed to the user.
 You could
 check a flag (hidden field) when the page loads. If the flag is true,
 then use
 the javascript to reload to your desired page.

 HTH,
 Pete

 Dudley Butt@i-Commerce wrote:

  Please help,
 
  When the user pushes the back button, I want the page to redirect or
 refresh
  to a different page, please, any ideas?
 
  Thanx guys and gals
  Dudley





Re: FW: Scope of the form

2001-06-07 Thread Ted Husted

1. Yes. Using the standard forward or redirect Servlet services.
2. It is forwarded to the JSP or Action specified by the input property.
3. The form is disposed when the request is disposed, which would happen
after the JSP was rendered.

 Joyce Tang wrote:
 
 
 
 -Original Message-
 From: Joyce Tang
 To: '[EMAIL PROTECTED]'
 Sent: 6/7/01 9:28 AM
 Subject: Scope of the form
 
 I would like to verify my understanding on this thing.  Please let me
 know if it is correct.  Thank you very much in advance.
 
 1. Whenever the Action do a forward, the request is being forwarded.
 2. When the error happens, the request is forwarded back to the same
 JSP
 3. If I define the scope of the form related to the Action class as
 request, then before the JSP page is rendered, the form is still in
 the request, but after the JSP page is rendered,the form is taken out
 from the request?
 
 Thanks a ton.
 
 Joyce



Re: Pleeeeease help me using the Digester-Class of STRUTS

2001-06-07 Thread Andre_Beskrowni



hmm, does de.dhw.asim.components.benutzer.LoginObjekt have a method with the
signature:

setGrp(de.dhw.asim.components.benutzer.BenutzerGruppe)?

and does the this in the line:

digester.push(this);

have a method with the signature:

setLoginObjekt(de.dhw.asim.components.benutzer.BenutzerGruppe)?


andre


  From:  [EMAIL PROTECTED]
 Date:   06/06/2001 02:05 PM
Hello,


it seems that the Digester Class of Struts is a strange thing.
I take the following XML-Document (in a String):

?xml version=1.0 encoding=UTF-8?
login usr=Benutzername
   hilfe=true
   rn=Hartmut Bernecker
   mail=[EMAIL PROTECTED]
   txt=Persoenlicher Begruessungstext des Benutzers
   spr=de
   med=medium
  grp name=Gruppe 1 txt=Begruessungstext 1/grp
  grp name=Gruppe 2 txt=Begruessungstext 2/grp
/login

--


Then I want to parse it with a Digester object as follows:


--
Digester digester = new Digester();
digester.setDebug(1);
digester.setValidating(false);

digester.push(this);

digester.addObjectCreate(login/grp,
de.dhw.asim.components.benutzer.BenutzerGruppe);
digester.addSetProperties(login/grp);
digester.addSetNext(login/grp, addGrp,
de.dhw.asim.components.benutzer.BenutzerGruppe);

digester.addObjectCreate(login,
de.dhw.asim.components.benutzer.LoginObjekt);
digester.addSetProperties(login);
digester.addSetNext(login, setLoginObjekt,
de.dhw.asim.components.benutzer.LoginObjekt);

try {
 digester.parse(new InputSource(new StringReader(pXml)));
}
catch (IOException e){
  e.printStackTrace();
}
catch (SAXException e)
{
  e.printStackTrace();
}

--


Then I receive the following Message:
It seems that the stack can not be controlled.
Please give me an idea of what happens here and how to do it in the
right way!!

--

New de.dhw.asim.components.benutzer.LoginObjekt

Set de.dhw.asim.components.benutzer.LoginObjekt properties

New de.dhw.asim.components.benutzer.BenutzerGruppe

Set de.dhw.asim.components.benutzer.BenutzerGruppe properties

Call
de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutz

er.BenutzerGruppe@683912)

End event threw exception

java.lang.NoSuchMethodException

 at java.lang.Class.getMethod0(Native Method)

 at java.lang.Class.getMethod(Class.java:888)

 at org.apache.struts.digester.SetNextRule.end(SetNextRule.java:156)

 at org.apache.struts.digester.Digester.endElement(Digester.java:409)

 at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

 at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

 at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.jav

a:1436)

 at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDoc

umentScanner.java:1205)

 at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java

:381)

 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

 at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

 at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

 at org.apache.struts.digester.Digester.parse(Digester.java:738)

 at
de.dhw.asim.components.benutzer.Xml2Object.getUserObjekt(Xml2Object.java:49)

 at de.dhw.asim.components.benutzer.Test.main(Test.java:11)

java.lang.NoSuchMethodException

 at org.apache.struts.digester.Digester.endElement(Digester.java:412)

 at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

 at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

 at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.jav

a:1436)

 at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDoc

umentScanner.java:1205)

 at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java

:381)

 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

 at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

--


Any help is very appreciated!

Hartmut







Re: Is this possible with Struts?

2001-06-07 Thread Matt Raible



Thanks - worked like a charm!

I have another question now:

I am now trying to setup my list so it alternates 
row backgrounds as it writes the list. Below is how I can do it with 
scriplets, but I'd rather use Struts to do this - any ideas?


% int rowNum = 0;%logic:iterate id="list" 
name="beans"%rowNum++; 
// Set tdClassName for different colored rowsString tdClassName = 
"";if ((rowNum % 2)  0) { tdClassName = 
"tableRowNormal";} else { tdClassName = 
"tableRowAlternate";}%tr  td 
class="%=tdClassName%"bean:write name="list" 
property="name"//td td 
class="%=tdClassName%"bean:write name="list" 
property="description"//td td 
class="%=tdClassName%"bean:write name="list" 
property="status"//td/logic:iterate/tr


  - Original Message - 
  From: 
  David 
  Winterfeldt 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, June 07, 2001 10:39 
  AM
  Subject: Re: Is this possible with 
  Struts?
  
  This calls getLastName() on each object in the list.
  logic:iterate id="results" name="myList" 
  bean:write name="results" property="lastName"/br
  /logic:iterate
   Matt Raible [EMAIL PROTECTED] 
  wrote: 
  I 
have an iteration of Beans and I want to list through the 
iteration,extract the beans and get the properties on each bean. Is this 
possible?Example 
code:_Do 
You Yahoo!?Get your free @yahoo.com address at 
  http://mail.yahoo.com
  
  
  Do You Yahoo!?Yahoo! Mail Personal 
  Address - Get email at your own domain with Yahoo! 
Mail.


Re: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Peter Alfors

Looks like you can also set the Servlet init param nocache to true,
and struts will automatically set the response headers for you.

Thanks,
Pete

Thane Eisener wrote:



 Oops, I guess I should test before I post. It looks like newer
 browsers don't support this as a META tag only as a header.

 I added the following to one of my action classes and the perform()
 method was called when I pressed 'Back':

 response.addHeader(Pragma,no-cache);
 response.addHeader(Cache-control,no-cache);

 Hope it helps,
 Thane

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 11:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Can anyone help with solving the BACK button problem,
 in
 th e browser?

 Thane ,

 I am using:
 META http-equiv=Expires content=now
 in my header, and my action is not re-executed when I use the browser
 back button.
 Is there another option I should be using?

 thanks,
 Pete

 Thane Eisener wrote:

 
 
  I seem to recall a META tag called something like pragma-no-cache
 that
  you can embed in your page which will force the page to reload (not
  just display a snapshot). This should enable handling the situation
 in
  scriptlets or your action class.
 
  -Original Message-
  From: Peter Alfors [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 07, 2001 9:52 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Can anyone help with solving the BACK button problem,

  in
  the browser?
 
  Depending on which browser you use, and the data on the page, the
 back
  button
  may cause (or ask) the page to reload.
  However, some browsers (like IE) only display a snapshot of what the

  last page
  rendered to.
  Therefore, you cannot use scriptlets or the action class.  However,
  you are able
  to kick-off javascript.
  If you can gaurantee that your users will have javascript enabled,
 you
  can write
  a simple test to see if this page was already displayed to the user.

  You could
  check a flag (hidden field) when the page loads.  If the flag is
 true,
  then use
  the javascript to reload to your desired page.
 
  HTH,
  Pete
 
  Dudley Butt@i-Commerce wrote:
 
   Please help,
  
   When the user pushes the back button, I want the page to redirect
 or
  refresh
   to a different page, please, any ideas?
  
   Thanx guys and gals
   Dudley




Re: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Spencer Smith
Title: RE: Can anyone help with solving the "BACK" button problem, in th e browser?



That won't work. I solved the problem using 
javascript. Javascript doesn't cache like JSP pages does, so you can get 
around this problem using javascript.

If you want, I can send you the code I 
use.

  - Original Message - 
  From: 
  Thane Eisener 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, June 07, 2001 10:12 
  AM
  Subject: RE: Can anyone help with solving 
  the "BACK" button problem, in th e browser?
  
  Oops, I guess I should test before I post. It looks like newer 
  browsers don't support this as a META tag only as a header.
  I added the following to one of my action classes and the 
  perform() method was called when I pressed 'Back': 
  response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
  Hope it helps, Thane 
  -Original Message- From: Peter 
  Alfors [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: Re: 
  Can anyone help with solving the "BACK" button problem, in th e browser? 
  Thane , 
  I am using:  
  META http-equiv="Expires" content="now" in my 
  header, and my action is not re-executed when I use the browser 
  back button. Is there another option 
  I should be using? 
  thanks,  Pete 
  
  Thane Eisener wrote: 
 
  I seem to recall a META tag called something like pragma-no-cache that 
   you can embed in your page which will force the page to 
  reload (not  just display a snapshot). This should 
  enable handling the situation in  scriptlets or 
  your action class.   
  -Original Message-  From: Peter Alfors [mailto:[EMAIL PROTECTED]] 
   Sent: Thursday, June 07, 2001 9:52 AM  To: [EMAIL PROTECTED]  
  Subject: Re: Can anyone help with solving the "BACK" button problem, 
   in  the browser? 
Depending on which browser 
  you use, and the data on the page, the back  
  button  may cause (or ask) the page to 
  reload.  However, some browsers (like IE) only 
  display a snapshot of what the  last page 
   rendered to.  Therefore, you 
  cannot use scriptlets or the action class. However,  you are able  to kick-off 
  javascript.  If you can gaurantee that your users 
  will have javascript enabled, you  can 
  write  a simple test to see if this page was 
  already displayed to the user.  You could 
   check a flag (hidden field) when the page loads. 
  If the flag is true,  then use  the javascript to reload to your desired page.   HTH,  Pete  
   "Dudley Butt@i-Commerce" wrote:Please help, When the user pushes the 
  back button, I want the page to redirect or  
  refresh   to a different page, please, any 
  ideas? 
  Thanx guys and gals   Dudley 



Re: Scratch RowSets

2001-06-07 Thread Ted Husted

I've seen the same problem with updating via the CachedRowSet, but had
been blaming MySQL's lack of transaction support (with the default
tables at least). 

As a workaround, I'm using PreparedStatements for update/insert/delete
but drawing the data from the RowSets to avoid defining another
structure. 

Have had no problems whatsoever with selects at least. 

There are plans to increase support within Struts for RowSets in the
1.1. timeframe. (Who knows, maybe we can do a FastCachedRowSet that can
cope with inserts!) In the meantime, I'm wrapping the Rowsets in
standard beans and Iterators so I can use what we got now with what we
got now. Hopefully I can just drop the wrappers later and use the raw
Rowsets.

Obviously, I'm extremely interested in your work, and would love to see
it. 

Speaking of configuration issues, I've also played with the idea of
loading SQL commands from a resource, so they could be changed and
reloaded without restarting the application. It would also be easier to
optimize command sets for different DBMS packages. Just wondering if
anyone else has implemented a SQL command resource.

Gogineni, Pratima wrote:
 
 Hi Ted,
 
 I remember playing with cached rowsets sometime ago. It is probably useful
 to standardize your tags/code etc. based on the cached rowset rather than
 create your own data-structure - but I found that particularly the
 update/delete/insert into the rowset doesnt work properly for all but the
 simplest tables.
 
  I am currently implementing my own web-app(struts-based) that could handle
 more cases - one thing with this is that the user can specify the
 update/insert/delete in an xml file to configure my rowset - since I think
 it is not possible to anticipate in all cases what statements they would
 want to use. This also allows them to fire off multiple statements (for
 data-integrity reasons or something else) in a transaction for each of the
 actions update/insert/delete ...
 
 Pratima



Logic-Iterate not finding scope of Bean

2001-06-07 Thread Luna, Kat
Title: Logic-Iterate not finding scope of Bean






Hi all, me again with my afternoon question..



I have a UserAction class that extracts a list of Users from the database and stores them in an ArrayList. Success from this Action forwards to user.jsp which I want to display the list in table format. I have:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html:html
headtitle/title
/head
body


table


 logic:iterate id=user name=UserAction property=userList type=com.test.User


 TR
 TDbean:write name=user property=username//TD
 TDbean:write name=user property=password//TD
 /TR


 /logic:iterate


..etc


but this causes the UserAction to run again (essentially calling the database and building the ArrayList again). Is there a way to have this bean init() when the jsp page loads and then iterate through the ArrayList instead of calling the Action first and then displaying the page? And if so, do I need to add anything to struts-config.xml to tell the page where to find/identify the UserAction bean?

Thanks,



Kat Luna
Web Developer,
BCE Emergis
[EMAIL PROTECTED] 





Re: Is this possible with Struts?

2001-06-07 Thread Ted Husted

 
http://jakarta.apache.org:8080/jyve-faq/Turbine/screen/DisplayQuestionAnswer/action/SetAll/project_id/2/faq_id/36/topic_id/207/question_id/821
 





Re: FW: Scope of the form - TED

2001-06-07 Thread Ted Husted

I don't believe that there is a reliable way for Struts to determine
dynamically where a submit actually started, since things can get passed
around. There is history information in the request, but that can be
iffy.

If you want that behaviour, you should be able to script that through
the ActionMappings file by having an entry for each possible input page
with its own input property. The action locations are virtual, and you
can have as many as you need.

Jonathan wrote:
 
 Ted, I have been questioning the value of the input property.  The input
 property in Joyce's case is literally the submitting page, which I hardcoded
 into the struts-config.xml.  If I came from another page, however, I will
 STILL be forwarded to the uri of the input property.  I believe this is not
 the behavior we want.  I believe what we want is to simply return where we
 submitted, right?  There was a thread about this before I think.  Can you
 shed some light on this?



Re: Is this possible with Struts?

2001-06-07 Thread Matt Raible



I got this to work, but now my problem is that my 
font attributes specified in my stylesheet don't get into Netscape 
4.x.

I know of a workaround - that is to have a class 
associated with each td that defines the font-family, but I'm hoping 
someone knows of a workaround for NS 4.x.

Here's my code:

logic:iterate id="profileList" 
name="resourceWorkProfiles"logic:row 
evenStyleClass="tableRowAlternate" 
oddStyleClass="tableRowNormal" 
tdbean:write name="profileList" 
property="name"//td 
tdbean:write name="profileList" 
property="description"//td 
tdbean:write name="profileList" 
property="status"//td 
/logic:row/logic:iterate


  - Original Message - 
  From: 
  David 
  Winterfeldt 
  To: Matt Raible 
  Sent: Thursday, June 07, 2001 12:07 
  PM
  Subject: Re: Is this possible with 
  Struts?
  
  A RowTag for doing this has been made by Niall Pemberton and it is posted 
  on Ted Husted's site along with many other links and downloads for Struts. 
  http://www.husted.com/about/struts 

  David 
   Matt Raible [EMAIL PROTECTED] 
  wrote: 
  



Thanks - worked like a charm!

I have another question now:

I am now trying to setup my list so it 
alternates row backgrounds as it writes the list. Below is how I can 
do it with scriplets, but I'd rather use Struts to do this - any 
ideas?


% int rowNum = 0;%logic:iterate id="list" 
name="beans"%rowNum++; 
// Set tdClassName for different colored rowsString tdClassName = 
"";if ((rowNum % 2)  0) { tdClassName = 
"tableRowNormal";} else { tdClassName = 
"tableRowAlternate";}%tr  
td class="%=tdClassName%"bean:write name="list" 
property="name"//td td 
class="%=tdClassName%"bean:write name="list" 
property="description"//td td 
class="%=tdClassName%"bean:write name="list" 
property="status"//td/logic:iterate/tr


  - Original Message - 
  From: 
  David 
  Winterfeldt 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, June 07, 2001 10:39 
  AM
  Subject: Re: Is this possible with 
  Struts?
  
  This calls getLastName() on each object in the list.
  logic:iterate id="results" name="myList" 
  bean:write name="results" property="lastName"/br
  /logic:iterate
   Matt Raible [EMAIL PROTECTED] 
  wrote: 
  I 
have an iteration of Beans and I want to list through the 
iteration,extract the beans and get the properties on each bean. Is 
this possible?Example 
code:_Do 
You Yahoo!?Get your free @yahoo.com address at 
http://mail.yahoo.com
  
  
  Do You Yahoo!?Yahoo! Mail 
  Personal Address - Get email at your own domain with Yahoo! 
Mail.
  
  
  Do You Yahoo!?Yahoo! Mail Personal 
  Address - Get email at your own domain with Yahoo! 
Mail.


Re: Can I have NO action?!

2001-06-07 Thread dhay



Oleg,

Hi.  Thanks for the post.  The current file name is set in my action before the
page is called.  BUT, I want to give the user the option to change the filename,
and forward back to this action to display the filter for the new file.  Hence,
my action doesn't need to DO anything, which prompted my question (I just need
Struts to set the filename property in my form bean).

Any ideas whether this is possible, or do I need to have a dummy action for it?

Thanks,

Dave





Oleg V Alexeev [EMAIL PROTECTED] on 06/07/2001 12:57:10 AM

Please respond to [EMAIL PROTECTED]; Please
  respond to Oleg V Alexeev
  [EMAIL PROTECTED]

To:   [EMAIL PROTECTED] [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: Can I have NO action?!



Hello dhay,

Thursday, June 07, 2001, 1:34:00 AM, you wrote:

dlc Hi.  I have a form where I display the current filename, and allow them to
dlc change it.  As such, I don't need to do anything in the action, just let
Struts
dlc populate the form bean.

dlc How do I go about this?  Do I need an action that does nothing in its
perform
dlc method?  Or can I set things up so no action is needed at all?

What is the source of current filename? Do you retrieve it in your
form class? It is wrong solution if so.

Struts uses scheme with Action class (contains all logic to retrieve,
process and store data), ActionForm class (used to store values
between pages or actions and to validate it after submit), JSP-page as
view (to display values which was processed by Action class and stored
in session or request scope). According to this scheme you need to
implement action if you display by JSP any values fetched from
external source.

--
Best regards,
 Olegmailto:[EMAIL PROTECTED]











Re[2]: exception in MessageTag.doStartTag()

2001-06-07 Thread Oleg V Alexeev

Hello RoleModel,

Yes, it is another common error. To use bean:message tag you must
place properties files for all supported languages to the path
WEB-INF/classes or to the some jar in WEB-INF/lib derectory and place
string with properties path to the web.xml as init parameter for
ActopnServlet -

init-param
  param-nameapplication/param-name
  param-valuemy.app.ApplicationResources/param-value
/init-param

For this example you must place properties files to the path
WEB-INF/classes/my/app and fill it with all messages wich used in your
pages with bean:message tag.


Thursday, June 07, 2001, 5:03:17 PM, you wrote:

RS We have struts.jar in /WEB-INF/lib/

RS I believe that everthing is in the classpath... but that we probably have a
RS configuration problem in one of our files.
RS The immediate problem that I see in the doStartTag() method is that the
RS message we get back is null.

RS - Original Message -
RS From: Oleg V Alexeev [EMAIL PROTECTED]
RS To: RoleModel Software [EMAIL PROTECTED]
RS Sent: Thursday, June 07, 2001 1:06 AM
RS Subject: Re: exception in MessageTag.doStartTag()


 Hello RoleModel,

 Thursday, June 07, 2001, 1:44:37 AM, you wrote:

 RS We're just starting to learn about Struts. We have downloaded the code
RS (and binaries) (v.b3) for struts-example. The binaries run fine, and we get
RS the expected output. When we try to set up the
 RS source version, though, we get the following error:

 RS   javax.servlet.jsp.JspException
 RS java.lang.Throwable(java.lang.String)
 RS java.lang.Exception(java.lang.String)
 RS javax.servlet.jsp.JspException(java.lang.String)
 RS int org.apache.struts.taglib.bean.MessageTag.doStartTag()
 RS void
RS _0002findex_0002ejspindex_jsp_0._jspService(javax.servlet.http.HttpServletRe
RS quest, javax.servlet.http.HttpServletResponse)...

 RS Can anybody give us a clue about what's going on? As far as we can
RS tell, we've got everything configured properly, but we're guessing we made a
RS mistake somewhere.

 I think you place struts.jar to the CLASSPATH. struts.jar must be placed
 to the WEB-INF/lib directory of your application, remove any
 references to it from CLASSPATH.

 If struts.jar in WEB-INF/lib , CLASSPATH is free of links to the
 struts.jar and you are already has this exception then explane please
 your problem.

 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]





-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Can I have NO action?!

2001-06-07 Thread Ted Husted

If you truly don't need the Action to do anything, you might be able to
specify the JSP as the target for your form's submit Action. 

If you did use an Action, it would return an ActionForward to the JSP,
which is its main purpose. 

An empty perform() is not permitted since it must return an
ActionForward or null.

[EMAIL PROTECTED] wrote:
 
 Oleg,
 
 Hi.  Thanks for the post.  The current file name is set in my action before the
 page is called.  BUT, I want to give the user the option to change the filename,
 and forward back to this action to display the filter for the new file.  Hence,
 my action doesn't need to DO anything, which prompted my question (I just need
 Struts to set the filename property in my form bean).
 
 Any ideas whether this is possible, or do I need to have a dummy action for it?
 
 Thanks,
 
 Dave



Re: Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Oleg V Alexeev

Hello Matt,

I can send you Pager class, used to generate ArrayList of links to the
pages in this result set, and a piece of jsp code to display it. I
think it can used for any container wich implements Collection
interface.

Thursday, June 07, 2001, 5:57:12 PM, you wrote:

MR Has anyone used logic:iterator to display a list of records, and
MR corresponding list navigation links at the bottom?

MR For instance, I have an Iteration of DataObjects that I can list through
MR with the following code:

MR while (iteratorName.hasNext()) {
MR dataObject = (DataObject)iteratorName.next();
MR out.println(dataObject.getName());
MR }

MR I'm assuming I can do this with the Iterator tag, however, I would also like
MR to display the following at the bottom of the list:

MR First  |  1-10  |  11-20  |  20-30  | Last

MR Where there are 30 records returned.

MR Any ideas?

MR Thanks,

MR Matt


MR _
MR Do You Yahoo!?
MR Get your free @yahoo.com address at http://mail.yahoo.com



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Matt Raible

Please send it - and an example if you have one.

Thanks,

Matt

- Original Message -
From: Oleg V Alexeev [EMAIL PROTECTED]
To: Matt Raible [EMAIL PROTECTED]
Sent: Thursday, June 07, 2001 2:07 PM
Subject: Re: Logic Tag Library and (Iterator) List Navigation


 Hello Matt,

 I can send you Pager class, used to generate ArrayList of links to the
 pages in this result set, and a piece of jsp code to display it. I
 think it can used for any container wich implements Collection
 interface.

 Thursday, June 07, 2001, 5:57:12 PM, you wrote:

 MR Has anyone used logic:iterator to display a list of records, and
 MR corresponding list navigation links at the bottom?

 MR For instance, I have an Iteration of DataObjects that I can list
through
 MR with the following code:

 MR while (iteratorName.hasNext()) {
 MR dataObject = (DataObject)iteratorName.next();
 MR out.println(dataObject.getName());
 MR }

 MR I'm assuming I can do this with the Iterator tag, however, I would
also like
 MR to display the following at the bottom of the list:

 MR First  |  1-10  |  11-20  |  20-30  | Last

 MR Where there are 30 records returned.

 MR Any ideas?

 MR Thanks,

 MR Matt


 MR _
 MR Do You Yahoo!?
 MR Get your free @yahoo.com address at http://mail.yahoo.com



 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




RE: SOLVED invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Graeme Miller

Hmm... it actually looks like someone has beaten me to this. See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1947

--

Thanks Peter.  Have logged this bug with your comments.  See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2039

 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 8 June 2001 4:58 a.m.
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: SOLVED invalid multipart request in beta 3 Controller
 Wrapping Request
 
 
 HAHA!
 
 Right for anyone (not many) who came across this problem here 
 is how to
 solve it.
 
 In the struts upload application you will see that control is 
 sent to a JSP
 after the uploading. If you send it to another action you get the
 MultipartIterator problem. This is *I think* because the 
 request is wrapped
 in a MultipartRequest, as of beta 2. Now the action you 
 forward to does not
 expect the multipart request, I think, so it causes the 
 exception... I guess
 you could change the encrypt type of the destination action... anyway
 
 What I did was forward control to a JSP that only contains a
 logic:redirect to the action I want it to go to in the 
 first place. As I'm
 dumping everything into session anyway I don't need to worry about
 replicating the request query.
 The redirect jsp is rendered and control is redirected. You 
 don't even know
 its there.
 
 The reason I don't use multipart in my original action is its 
 not designed
 to use multipart. I do the uploading in a separate form and 
 action (that is
 multipart) and then go back to the original action with the 
 result, not to a
 jsp.
 
 Well it works for me :)
 
 Peter
 
 
 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: 07 June 2001 11:34
 To: [EMAIL PROTECTED]
 Subject: RE: invalid multipart request in beta 3 Controller Wrapping
 Request
 
 
 Hi,
  I'm using IE 6 beta. I tired it with Netscape 6 and there 
 was no change.
 Its not a browser issue. The struts upload example works I 
 think because the
 forward is to a jsp and not to another action. In my case I 
 forward to an
 action that takes in the request from the controller. I guess 
 the request is
 Multipart but should be a regualar requestor the other 
 way around.. Its
 just confusing.
 
 At least I'm not alone :)
 
 Peter
 
 -Original Message-
 From: Graeme Miller [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 23:17
 To: '[EMAIL PROTECTED]'
 Subject: RE: invalid multipart request in beta 3
 
 
 Are you using IE 5.5?  Coz there are some documented issues 
 with IE5 and
 below and file uploads in Struts.
 
 Unfortunately I AM using IE5.5 and this is not working for me 
 in Struts
 1.0b3 where it was in Struts 1.0b1 so something has 
 definitely been broken
 in either b2 or b3.
 
  -Original Message-
  From: Peter Doyle [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 7 June 2001 4:29 a.m.
  To: [EMAIL PROTECTED]
  Subject: RE: invalid multipart request in beta 3
 
 
  The form tag uses enctype multipart/form-data. Uploading 
 is not the
  problem. The file uploads okay. When I forward to the next
  action I get the
  error. I'm wondering if the request is wrapped in a Mulitpart
  request of
  some kind.
 
  Peter
 
 
  -Original Message-
  From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
  Sent: 06 June 2001 16:42
  To: [EMAIL PROTECTED]
  Subject: Re: invalid multipart request in beta 3
 
 
  Hi Peter,
 
  I have a file upload program and I am using b3 and everything
  is working
  just fine. Would you make sure that you set the enctype to
  multipart/form-data on your form tag.
 
  Thanks,
  Amalendu Biswas.
 
 
  From: Peter Doyle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: invalid multipart request in beta 3
  Date: Wed, 6 Jun 2001 15:44:58 +0100
  
  Hi,
I recently changed from Struts b1 to b3. (I skipped b2) 
 I have doe
  working
  with b1 to handle uploading, based on the upload application
  that came with
  struts. Since changed to b3 I get the following error:
  
  javax.servlet.ServletException: MultipartIterator: invalid 
 multipart
  request
  data, doesn't start with boundary
  
  I cannot find what has changed between struts b1 and b3 that
  would cause
  this. I cannot find a way to resolve it. The code in my 
 upload action
  executes and finishes. Control is passed to the controller
  servlet where
  this problem occurs.
  
  I would appreciate any help
  
  Thanks,
  Peter
  
  
  
  javax.servlet.ServletException: MultipartIterator: invalid 
 multipart
  request
  data, doesn't start with boundary
 at
  org.apache.struts.upload.MultipartIterator.parseRequest(Multi
  partIterator.j
  a
  va:345)
 at
  org.apache.struts.upload.MultipartIterator.(MultipartIterator.
  java:152)
 at
  org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
  quest(DiskMult
  i
  partRequestHandler.java:65)
 at
  

Building Latest version of Struts

2001-06-07 Thread Matt Raible

I downloaded the latest source (b3) from apache.org and I get the following
error when I try to build it with Ant.  Any ideas?

/cygdrive/e/development/ijsa/../jakarta-struts-1.0-b3-src/ant
Buildfile: build.xml

init:
 [echo] - jakarta-struts 1.0-b1 -
 [echo]
 [echo] java.class.path =
e:\development\timetracker\classes;e:\development\access\build\access.jar;e:
\development\i
jsa\classes;d:\iPlanet\iPM6\ias\APPS\modules\pact\WEB-INF\classes;d:\SDKs\xa
lan-j_2_1_0\build\xalan.jar;e:\development\j
akarta-struts\lib\struts.jar;.;d:\sdks\jakarta-ant-1.3\lib\ant.jar;d:\sdks\j
akarta-ant-1.3\lib\antext.jar;d:\sdks\jakart
a-ant-1.3\lib\jakarta-ant-1.3-optional.jar;d:\sdks\jakarta-ant-1.3\lib\jaxp.
jar;d:\sdks\jakarta-ant-1.3\lib\parser.jar;d
:\sdks\jdk1.2.2\lib\tools.jar
 [echo] java.home = d:\sdks\jdk1.2.2\jre
 [echo] user.home = C:\WINNT\Profiles\mraible

prepare.library:

compile.library:
[javac] Compiling 1 source file to
E:\development\jakarta-struts-1.0-b3-src\target\library\classes
 [copy] Copying 8 files to
E:\development\jakarta-struts-1.0-b3-src\target\library\classes
 [copy] Copying 4 files to
E:\development\jakarta-struts-1.0-b3-src\target\library
[style] Transforming into
E:\development\jakarta-struts-1.0-b3-src\target\library
[style] Loading stylesheet
E:\development\jakarta-struts-1.0-b3-src\doc\stylesheets\tld.xsl
[style] Failed to read stylesheet stylesheets\tld.xsl

BUILD FAILED

e:\development\jakarta-struts-1.0-b3-src\build.xml:188:
javax.xml.transform.TransformerConfigurationException: Namespace
 not supported by SAXParser
--- Nested Exception ---


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Re[2]: Can I have NO action?!

2001-06-07 Thread Oleg V Alexeev

Hello dhay,

From your words I found that you want to make -
 in Action
   - retrieve current filename
   - forward to the JSP page to display it
 in JSP page
   - edit current filename
   - submit new value to the action
 in Action
   - take new value
   - build or retrieve filter for new file
   - forward to the JSP
 in JSP
   - review filter
   - edit other values or just stay here

Is it right?

Thursday, June 07, 2001, 11:50:04 PM, you wrote:



dlc Oleg,

dlc Hi.  Thanks for the post.  The current file name is set in my action before the
dlc page is called.  BUT, I want to give the user the option to change the filename,
dlc and forward back to this action to display the filter for the new file.  Hence,
dlc my action doesn't need to DO anything, which prompted my question (I just need
dlc Struts to set the filename property in my form bean).

dlc Any ideas whether this is possible, or do I need to have a dummy action for it?

dlc Thanks,

dlc Dave




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-07 Thread Oleg V Alexeev

Hello Ted,

Thursday, June 07, 2001, 9:52:24 PM, you wrote:

TH Speaking of configuration issues, I've also played with the idea of
TH loading SQL commands from a resource, so they could be changed and
TH reloaded without restarting the application. It would also be easier to
TH optimize command sets for different DBMS packages. Just wondering if
TH anyone else has implemented a SQL command resource.

I already implement this as part of my bean generation framework. It
contains JDBC bean factories (for single row, for all rows from result
set, for window from the result set) and bean-templates (may be wrong
term, of course) in which SQL queries can be defined. At bean creation
process factory uses attributes, properties and parameters from
request (all needed for this bean=template) and conserves result in
session or request scope to display with jsp page.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Oleg V Alexeev

Hello Matt,

Pager - this one
PagerIterator - iterator to review Pager without cach
PagerEntry - link to page representation
JDBCPagerFactory - sample of Pager utilization
pager.jsp - displaying of pager data and current page

Friday, June 08, 2001, 12:17:19 AM, you wrote:

MR Please send it - and an example if you have one.

MR Thanks,


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]
 PagerIterator.java
 PagerEntry.java
 Pager.java
 JDBCPagerFactory.java
 pager.jsp


URGENT!!! NEED HELP WITH SSL AND STRUTS

2001-06-07 Thread SPandith

Hi,

I am working on a Struts app where some of the pages need to be secure. We
are using WebLogic 5.1 sp6
I will not be using a war file to deploy. Instead I have all the jsp pages
under my webapp directory.

Here are a few questions I have:
1. Should I create 2 directories - One which has only secure files and the
other which has only standard files.
2. If so should I do need to add anything in the config file?
3. Since the user will be in standard mode when they login I need to switch
them to secure mode for the secure pages. 
In order to switch from http to https should I calculate the new absolute
URL, 
wrap it in a new ActionForward with the redirect property set, 
and return that to the controller servlet?

It would be great if anyone could email me an example.

Thanks,
S P

This message is intended only for the use of the Addressee and may contain
information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended
recipient, dissemination of this communication is prohibited. If you have
received this communication in error, please erase all copies of the message
and its attachments and notify us immediately. 





RE: SOLVED invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Graeme Miller

Thanks Peter.  Have logged this bug with your comments.  See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2039

 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 8 June 2001 4:58 a.m.
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: SOLVED invalid multipart request in beta 3 Controller
 Wrapping Request
 
 
 HAHA!
 
 Right for anyone (not many) who came across this problem here 
 is how to
 solve it.
 
 In the struts upload application you will see that control is 
 sent to a JSP
 after the uploading. If you send it to another action you get the
 MultipartIterator problem. This is *I think* because the 
 request is wrapped
 in a MultipartRequest, as of beta 2. Now the action you 
 forward to does not
 expect the multipart request, I think, so it causes the 
 exception... I guess
 you could change the encrypt type of the destination action... anyway
 
 What I did was forward control to a JSP that only contains a
 logic:redirect to the action I want it to go to in the 
 first place. As I'm
 dumping everything into session anyway I don't need to worry about
 replicating the request query.
 The redirect jsp is rendered and control is redirected. You 
 don't even know
 its there.
 
 The reason I don't use multipart in my original action is its 
 not designed
 to use multipart. I do the uploading in a separate form and 
 action (that is
 multipart) and then go back to the original action with the 
 result, not to a
 jsp.
 
 Well it works for me :)
 
 Peter
 
 
 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: 07 June 2001 11:34
 To: [EMAIL PROTECTED]
 Subject: RE: invalid multipart request in beta 3 Controller Wrapping
 Request
 
 
 Hi,
  I'm using IE 6 beta. I tired it with Netscape 6 and there 
 was no change.
 Its not a browser issue. The struts upload example works I 
 think because the
 forward is to a jsp and not to another action. In my case I 
 forward to an
 action that takes in the request from the controller. I guess 
 the request is
 Multipart but should be a regualar requestor the other 
 way around.. Its
 just confusing.
 
 At least I'm not alone :)
 
 Peter
 
 -Original Message-
 From: Graeme Miller [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 23:17
 To: '[EMAIL PROTECTED]'
 Subject: RE: invalid multipart request in beta 3
 
 
 Are you using IE 5.5?  Coz there are some documented issues 
 with IE5 and
 below and file uploads in Struts.
 
 Unfortunately I AM using IE5.5 and this is not working for me 
 in Struts
 1.0b3 where it was in Struts 1.0b1 so something has 
 definitely been broken
 in either b2 or b3.
 
  -Original Message-
  From: Peter Doyle [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 7 June 2001 4:29 a.m.
  To: [EMAIL PROTECTED]
  Subject: RE: invalid multipart request in beta 3
 
 
  The form tag uses enctype multipart/form-data. Uploading 
 is not the
  problem. The file uploads okay. When I forward to the next
  action I get the
  error. I'm wondering if the request is wrapped in a Mulitpart
  request of
  some kind.
 
  Peter
 
 
  -Original Message-
  From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
  Sent: 06 June 2001 16:42
  To: [EMAIL PROTECTED]
  Subject: Re: invalid multipart request in beta 3
 
 
  Hi Peter,
 
  I have a file upload program and I am using b3 and everything
  is working
  just fine. Would you make sure that you set the enctype to
  multipart/form-data on your form tag.
 
  Thanks,
  Amalendu Biswas.
 
 
  From: Peter Doyle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: invalid multipart request in beta 3
  Date: Wed, 6 Jun 2001 15:44:58 +0100
  
  Hi,
I recently changed from Struts b1 to b3. (I skipped b2) 
 I have doe
  working
  with b1 to handle uploading, based on the upload application
  that came with
  struts. Since changed to b3 I get the following error:
  
  javax.servlet.ServletException: MultipartIterator: invalid 
 multipart
  request
  data, doesn't start with boundary
  
  I cannot find what has changed between struts b1 and b3 that
  would cause
  this. I cannot find a way to resolve it. The code in my 
 upload action
  executes and finishes. Control is passed to the controller
  servlet where
  this problem occurs.
  
  I would appreciate any help
  
  Thanks,
  Peter
  
  
  
  javax.servlet.ServletException: MultipartIterator: invalid 
 multipart
  request
  data, doesn't start with boundary
 at
  org.apache.struts.upload.MultipartIterator.parseRequest(Multi
  partIterator.j
  a
  va:345)
 at
  org.apache.struts.upload.MultipartIterator.(MultipartIterator.
  java:152)
 at
  org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
  quest(DiskMult
  i
  partRequestHandler.java:65)
 at
  org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
 at
  org.apache.struts.action.ActionServlet.processPopulate(Action
  Servlet.java:2
  0
  53)
 at
  

Problem with Form Default Values

2001-06-07 Thread Owais Anjum

Hello,

I am having problems with my jsp page. If I do not specify a default
value (value=any value) for the fields in my page, I get the following
exception. I have written all the getter and setter methods in my
FormBean and carefully checked for the naming convention as well. If I
specify any defaule value in my jsp page, then this issue does not show
up. However, specifying a default value does not allow to refresh the
page with latest values in case of errors.

The exception that I get is:

javax.servlet.jsp.JspException
at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:234)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:
220)
at
pagecompile._DPMSOLDBQOnlineReport_xjsp._jspService(_DPMSOLDBQOnlineRepo
rt_xjsp.java:422)
at
com.newatlanta.servletexec.JSP10HttpJspPage.service(JSP10HttpJspPage.jav
a)
at
com.newatlanta.servletexec.JSP10Servlet.service(JSP10Servlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.newatlanta.servletexec.ServletExec.CallServletService(ServletExec.ja
va)
at
com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatch
er.java)
at
com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatch
er.java)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServle
t.java:1697)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.newatlanta.servletexec.ServletExec.CallServletService(ServletExec.ja
va)
at
com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatch
er.java)
at
com.newatlanta.servletexec.ApplicationInfo.processApplRequest(Applicatio
nInfo.java)
at
com.newatlanta.servletexec.ServerHostInfo.processApplRequest(ServerHostI
nfo.java)
at
com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java)
at
com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java)


Anybody has a clue to what might be going wrong in all this?

Thanks and warm regards,
Owais