jstl & error messages

2004-01-29 Thread Andy Richards
Hi,

Does any one know how to display individual error messages created via the
validator or my actions using jstl?



I guess its along the lines of the above but i am missing something?

cant seems to find the answer to this one on the archives?

thanks

Andy



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



Re: tiles resourceBundle

2003-10-30 Thread Andy Richards
apologise.

I had added the following from the struts-tiles war example to my web.xml, 
obviously it needs to point to my resource file.doh!



application
org.apache.struts.webapp.tiles.dev1-1.ApplicationResources


Andy

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



tiles resourceBundle

2003-10-30 Thread Andy Richards
Hi,

I implemented tiles into my struts application. Previously struts found my 
application resolurce bundle fine, however after using implementing tile 
definitions my resource bundle can not be found. How do i tell the tiles 
framework to use my resolurce bundle?

my struts-config contains a  attribute.

Does anyone know of how to do this or a tutorial which shows you how?
I am trying to see how the struts-tiles example war does this?

thanks

Andy

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



Re: navigable search results

2003-09-09 Thread Andy Richards
Cheers Andrew

Exactly what i wanted...i thought there may have been some struts tag but 
obviously not.

Thanks

Andy

On Tuesday 09 Sep 2003 3:09 pm, you wrote:
> Hi,
>
> see these links
>
>http://edhill.its.uiowa.edu/display/
>
>http://jsptags.com/tags/navigation/pager/
>
>http://www.mail-archive.com/[EMAIL PROTECTED]/msg43661.html
>
> --
> Andrew
> http://www.java201.com
>
> - Original Message -
> From: "Andy Richards" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 09, 2003 3:13 PM
> Subject: navigable search results
>
> > Hi everyone,
> >
> > I want to display my search results in a similar fashion to google, with
> > a navigable menu at the bottom. I know this is possible but i am not sure
>
> what
>
> > to re-search for to get some ideas of how to do this with struts? Anyone
>
> have
>
> > any ideas or a key word i can search the struts archives for?
> >
> > thanks
> >
> > Andy
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]



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



navigable search results

2003-09-09 Thread Andy Richards
Hi everyone,

I want to display my search results in a similar fashion to google, with a 
navigable menu at the bottom. I know this is possible but i am not sure what 
to re-search for to get some ideas of how to do this with struts? Anyone have 
any ideas or a key word i can search the struts archives for?

thanks

Andy

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



lists & c:forEach & struts-el html:link

2003-09-04 Thread Andy Richards
hi

I use RowSetDynaClass to get my results from a db then i add these rows to a 
List via  getRows(). The list is then returned to my jsp page which is using 
jstl and struts-el. I would like to use c:forEach to iterate over the list 
and print out the variables. Within the loop i would like to use struts-el 
html:link as follows...



Does anyone know if what i am trying to do is possible as i keep getting 
errors??

I not sure how to correctly pass my list to c:forEach. any ideas

Thanks


Andy


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



Re: login request + ActionServlet RequestProcessor Action

2003-08-22 Thread Andy Richards
Hi david

I spent a little to much allocated time on this so I had to move on, and I am 
going to come back to it at a later date. I have a quick 'hack' (a  taglib 
which checks the session in each jsp) for my prototype to present to the 
client..Anyway, when i do it i will let you know.

What i have found so far though is that by using declarative exception 
handling in my struts-config.xml the error, i think, needs to be thrown from 
a action class. If i could do it from my requestProcessor that would be 
great? I wasnt sure how to configure my app to call processRoles() on evey 
request, so i overrode the locale method as a test as this was been called 
eveytime. However because the locale method dosnt throw any exceptions i 
again ran into problems. So overall what i really would like to do would be 
to extend requestProcessor with my own custom method which throws my own 
exception which will be redirected to the appropriate page and called on 
every request. Sounds easy and probably is to someone who has a better 
understanding of stuts than i do? Anyway wont give up and will let you know 
if you are interested? Bank holiday this monday!! so a long relaxing 
weekend is due before i crack on with this one ; )

cheers

Andy


On Friday 22 Aug 2003 4:21 pm, you wrote:
> Andy,
>
> Did you get processRoles to work for you?
> How do you redirect to the (error) page of
> your choice in it?
>
> Thanks,
> David
>
> -Original Message-
> From: Andy Richards [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 9:55 AM
> To: Struts Users Mailing List
> Subject: Re: login request + ActionServlet RequestProcessor Action
>
>
> Hmm
>
> Strugling a bit with this one now.?? I have extended requestProcessor and
> tried to perform a requestDispatch and responseRedirect, however both fail
> as
> the error message informs me the reponse has already been submitted. I
> thought i may be able to use declarative exception handling with global
> exceptions in the stuts config to redirect the user to my login page (but
> no joy!). Anyone have any ideas? Also what method should i override in the
> RequestProcessor when handling my login?
>
> many thanks
>
> Andy
>
> On Thursday 21 Aug 2003 11:40 am, Kok Wei, Koh wrote:
> > Yeah you should only need to define your custom
> > AuthenticationRequestProcessor class which extends RequestProcessor in
> > controller element of your struts-config.xml.
> >
> > Andy Richards wrote:
> > > Hi Kok
> > >
> > > Good point, never thought about that! One point towards extending the
> > > requestProcessor then, as if i am right i configure this in my
> > > struts-config.xml and dont need to extend it from every action class.
> > >
> > > Thanks
> > >
> > > Andy
> > >
> > > On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:
> > >>Hi Andy,
> > >>
> > >>I guess the decision boils down to how your application is going to be
> > >>written. For a project I worked on couple of weeks back, I ran into a
> > >>problem where one of my Actions needs to extend a class to inherit some
> > >>functionality, but I was stucked because I need to extend my
> > >>"AuthenticationAction" which handles all my user login stuff.
> > >>
> > >>I can't extend from 2 classes, right? I then went on to research the
> > >>RequestProcessor. I used tiles of Struts 1.1 in my project so what I
> > >> did was I ported the "AuthenticationAction" code to say
> > >>"AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
> > >>which extends the Struts "RequestProcessor".
> > >>
> > >>So it all depends on if you're gonna run into problems like this?
> > >>
> > >>My 2 cents. Hope this helps.
> > >>
> > >>Andy Richards wrote:
> > >>>Hi
> > >>>
> > >>>After deciding which approach to take and reading a few of my struts
> > >>>books about the controller object ; ) I am now confused as which is
> > >>> the most appropriate class to extend to perform my login
> > >>> functionality. David suggests extending the base action class,
> > >>> however i have read that the RequestProcessor class was added to
> > >>> struts1.1 to extend the ActionServlet. From what i can see this class
> > >>> handles all requests and one of its methods calls the appropriate
> > >>> action. Therefore which would be the better class to extend 
> > >&g

Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hmm

Strugling a bit with this one now.?? I have extended requestProcessor and 
tried to perform a requestDispatch and responseRedirect, however both fail as 
the error message informs me the reponse has already been submitted. I 
thought i may be able to use declarative exception handling with global 
exceptions in the stuts config to redirect the user to my login page (but no 
joy!). Anyone have any ideas? Also what method should i override in the 
RequestProcessor when handling my login?

many thanks

Andy

On Thursday 21 Aug 2003 11:40 am, Kok Wei, Koh wrote:
> Yeah you should only need to define your custom
> AuthenticationRequestProcessor class which extends RequestProcessor in
> controller element of your struts-config.xml.
>
> Andy Richards wrote:
> > Hi Kok
> >
> > Good point, never thought about that! One point towards extending the
> > requestProcessor then, as if i am right i configure this in my
> > struts-config.xml and dont need to extend it from every action class.
> >
> > Thanks
> >
> > Andy
> >
> > On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:
> >>Hi Andy,
> >>
> >>I guess the decision boils down to how your application is going to be
> >>written. For a project I worked on couple of weeks back, I ran into a
> >>problem where one of my Actions needs to extend a class to inherit some
> >>functionality, but I was stucked because I need to extend my
> >>"AuthenticationAction" which handles all my user login stuff.
> >>
> >>I can't extend from 2 classes, right? I then went on to research the
> >>RequestProcessor. I used tiles of Struts 1.1 in my project so what I did
> >>was I ported the "AuthenticationAction" code to say
> >>"AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
> >>which extends the Struts "RequestProcessor".
> >>
> >>So it all depends on if you're gonna run into problems like this?
> >>
> >>My 2 cents. Hope this helps.
> >>
> >>Andy Richards wrote:
> >>>Hi
> >>>
> >>>After deciding which approach to take and reading a few of my struts
> >>>books about the controller object ; ) I am now confused as which is the
> >>>most appropriate class to extend to perform my login functionality.
> >>> David suggests extending the base action class, however i have read
> >>> that the RequestProcessor class was added to struts1.1 to extend the
> >>>ActionServlet. From what i can see this class handles all requests and
> >>>one of its methods calls the appropriate action. Therefore which would
> >>> be the better class to extend  ActionServlet, RequestProcessor or
> >>> Action. Any ideas.?
> >>>
> >>>thanks
> >>>
> >>>Andy
> >>>
> >>>On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> >>>>Dear Andy,
> >>>>
> >>>>I'm doing the same thing you suggest.  My approach is
> >>>>to extend the base Action (or any type of Action) class
> >>>>by adding a functon 'checkLogin'.  It takes the 'request'
> >>>>as the argument, checks the session for a User bean, and
> >>>>throws an exception if the bean is missing or if the ID
> >>>>number on the bean is zero/unset.  In my execute() method
> >>>>I make my first line 'checkLogin(request)' and it handles
> >>>>my authentication.
> >>>>
> >>>>If you try this approach, keep in mind I'm using Struts
> >>>>v1.1 final so I can use exceptions.
> >>>>
> >>>>Tonight I'm going to try switching it to an interface so
> >>>>I can use it to extend any action type by using 3 lines
> >>>>(and without sub-classing):
> >>>>
> >>>>1. import com.mycompany.auth.LoginCheck;
> >>>>2. public class MyAction extends Action implements LoginCheck
> >>>>3. checkLogin(request) <--- 1st line from within the execute
> >>>>or DispatchAction, or LookupDispatchAction method, etc.
> >>>>
> >>>>Regards,
> >>>>David
> >>>>
> >>>>---Original Message---
> >>>>From: Andy Richards <[EMAIL PROTECTED]>
> >>>>Sent: 08/20/03 09:46 AM
> >>>>To: [EMAIL PROTECTED]
> >>>>Subject: login request
> &g

Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hi Kok

Good point, never thought about that! One point towards extending the 
requestProcessor then, as if i am right i configure this in my 
struts-config.xml and dont need to extend it from every action class.

Thanks

Andy

On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:
> Hi Andy,
>
> I guess the decision boils down to how your application is going to be
> written. For a project I worked on couple of weeks back, I ran into a
> problem where one of my Actions needs to extend a class to inherit some
> functionality, but I was stucked because I need to extend my
> "AuthenticationAction" which handles all my user login stuff.
>
> I can't extend from 2 classes, right? I then went on to research the
> RequestProcessor. I used tiles of Struts 1.1 in my project so what I did
> was I ported the "AuthenticationAction" code to say
> "AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
> which extends the Struts "RequestProcessor".
>
> So it all depends on if you're gonna run into problems like this?
>
> My 2 cents. Hope this helps.
>
> Andy Richards wrote:
> > Hi
> >
> > After deciding which approach to take and reading a few of my struts
> > books about the controller object ; ) I am now confused as which is the
> > most appropriate class to extend to perform my login functionality. David
> > suggests extending the base action class, however i have read that the
> > RequestProcessor class was added to struts1.1 to extend the
> > ActionServlet. From what i can see this class handles all requests and
> > one of its methods calls the appropriate action. Therefore which would be
> > the better class to extend  ActionServlet, RequestProcessor or Action.
> > Any ideas.?
> >
> > thanks
> >
> > Andy
> >
> > On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> >>Dear Andy,
> >>
> >>I'm doing the same thing you suggest.  My approach is
> >>to extend the base Action (or any type of Action) class
> >>by adding a functon 'checkLogin'.  It takes the 'request'
> >>as the argument, checks the session for a User bean, and
> >>throws an exception if the bean is missing or if the ID
> >>number on the bean is zero/unset.  In my execute() method
> >>I make my first line 'checkLogin(request)' and it handles
> >>my authentication.
> >>
> >>If you try this approach, keep in mind I'm using Struts
> >>v1.1 final so I can use exceptions.
> >>
> >>Tonight I'm going to try switching it to an interface so
> >>I can use it to extend any action type by using 3 lines
> >>(and without sub-classing):
> >>
> >>1. import com.mycompany.auth.LoginCheck;
> >>2. public class MyAction extends Action implements LoginCheck
> >>3. checkLogin(request) <--- 1st line from within the execute
> >>or DispatchAction, or LookupDispatchAction method, etc.
> >>
> >>Regards,
> >>David
> >>
> >>---Original Message---
> >>From: Andy Richards <[EMAIL PROTECTED]>
> >>Sent: 08/20/03 09:46 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: login request
> >>
> >>>Hi, i have created a form and a action which checks to see if a user
> >>
> >>exists
> >>in
> >>my database and if so a value object is placed into the session. What i
> >> am
> >>
> >>
> >>unsure of is how to a action called everytime a request is made? Can i
> >>configure struts-config.xml to send all requests via an action to see if
> >>this
> >>session object exists, and if not redirect the user to the login page?
> >>
> >>many thanks
> >>
> >>Andy
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hi

After deciding which approach to take and reading a few of my struts books 
about the controller object ; ) I am now confused as which is the most 
appropriate class to extend to perform my login functionality. David suggests 
extending the base action class, however i have read that the 
RequestProcessor class was added to struts1.1 to extend the ActionServlet. 
From what i can see this class handles all requests and one of its methods 
calls the appropriate action. Therefore which would be the better class to 
extend  ActionServlet, RequestProcessor or Action. Any ideas.?

thanks

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> Dear Andy,
>
> I'm doing the same thing you suggest.  My approach is
> to extend the base Action (or any type of Action) class
> by adding a functon 'checkLogin'.  It takes the 'request'
> as the argument, checks the session for a User bean, and
> throws an exception if the bean is missing or if the ID
> number on the bean is zero/unset.  In my execute() method
> I make my first line 'checkLogin(request)' and it handles
> my authentication.
>
> If you try this approach, keep in mind I'm using Struts
> v1.1 final so I can use exceptions.
>
> Tonight I'm going to try switching it to an interface so
> I can use it to extend any action type by using 3 lines
> (and without sub-classing):
>
> 1. import com.mycompany.auth.LoginCheck;
> 2. public class MyAction extends Action implements LoginCheck
> 3. checkLogin(request) <--- 1st line from within the execute
> or DispatchAction, or LookupDispatchAction method, etc.
>
> Regards,
> David
>
> ---Original Message---
> From: Andy Richards <[EMAIL PROTECTED]>
> Sent: 08/20/03 09:46 AM
> To: [EMAIL PROTECTED]
> Subject: login request
>
> > Hi, i have created a form and a action which checks to see if a user
>
> exists
> in
> my database and if so a value object is placed into the session. What i am
>
>
> unsure of is how to a action called everytime a request is made? Can i
> configure struts-config.xml to send all requests via an action to see if
> this
> session object exists, and if not redirect the user to the login page?
>
> many thanks
>
> Andy

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



Re: login request

2003-08-21 Thread Andy Richards
Thank you ...

I would liked to have used a filter as this was my first idea, however my 
clients app must be deployed onto their raq550 server which supports only 
tomcat 3. I believe only tomcat 4 supports filters(or the servlet spec it 
uses)? I believe i will follow davids example and extend the base action 
class as this seems to be my only option. This dosnt seem as elegent as a 
filter but does seems to be the most elegent alternative thanks david : ), 
unless anyone else has any better ideas?

Most helpful allthanks again

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> Dear Andy,
>
> I'm doing the same thing you suggest.  My approach is
> to extend the base Action (or any type of Action) class
> by adding a functon 'checkLogin'.  It takes the 'request'
> as the argument, checks the session for a User bean, and
> throws an exception if the bean is missing or if the ID
> number on the bean is zero/unset.  In my execute() method
> I make my first line 'checkLogin(request)' and it handles
> my authentication.
>
> If you try this approach, keep in mind I'm using Struts
> v1.1 final so I can use exceptions.
>
> Tonight I'm going to try switching it to an interface so
> I can use it to extend any action type by using 3 lines
> (and without sub-classing):
>
> 1. import com.mycompany.auth.LoginCheck;
> 2. public class MyAction extends Action implements LoginCheck
> 3. checkLogin(request) <--- 1st line from within the execute
> or DispatchAction, or LookupDispatchAction method, etc.
>
> Regards,
> David
>
> ---Original Message---
> From: Andy Richards <[EMAIL PROTECTED]>
> Sent: 08/20/03 09:46 AM
> To: [EMAIL PROTECTED]
> Subject: login request
>
> > Hi, i have created a form and a action which checks to see if a user
>
> exists
> in
> my database and if so a value object is placed into the session. What i am
>
>
> unsure of is how to a action called everytime a request is made? Can i
> configure struts-config.xml to send all requests via an action to see if
> this
> session object exists, and if not redirect the user to the login page?
>
> many thanks
>
> Andy

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



login request

2003-08-20 Thread Andy Richards
Hi, i have created a form and a action which checks to see if a user exists in 
my database and if so a value object is placed into the session. What i am 
unsure of is how to a action called everytime a request is made? Can i 
configure struts-config.xml to send all requests via an action to see if this 
session object exists, and if not redirect the user to the login page?

many thanks

Andy
-- 


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



Re: Struts and JSF?

2003-07-16 Thread Andy Richards
Being a newbie to struts then, is it still worth implementing the two?. I have 
had a look at the integration library but not yet figured it out, ie which 
would i use for validation faces or struts? which tag library to use etc ?
Does anyone know of any documentation implenting the two technologies and the 
benefits of doing so?

cheers

Andy

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



Re: html links

2003-06-25 Thread Andy Richards
Anyone else have any opinions on the best method to do this.?

cheers

Andy
> >
> > But do i have to do this for every link in the config file, or can i
> > configure
> > the struts config file so as that any links not mapped go through a
> > particular action.
> > If i have to map all links in the designers menu system, i will
> > be here till
> > next month !! : )
> >
>
> I'm not sure whether you can use an url-pattern here too. Sorry
>
> Filip
>
> > regards
> >
> > Andy
> >
> > > > Can anyone shed some light on this for me. Being a newbie i tried
> > > > to perform a
> > > > search on the list archive however it just says text searches are
not
> > > > allowed.
> > > >
> > > > Anyway my question is this, at present a multimedia designer will
> > > > hand me a
> > > > HTML site requiring the addition of functionality. All links work
> > > > etc. If  i
> > > > want to use this interface around struts, i understand that i
> > > > need to map the
> > > > requested path to an action. However what do i do with simple
> > > > links such as
> > > > "home" or "go back" which just link to simple html pages? do i
> > > > have to map
> > > > these through the controller servlet if so do i do this with some
sort
> > of
> > > > generic mapping?
> > >
> > > at first: yes you should use struts mappings for those simple pages
too
> > > (IMHO).
> > > To do this u could use org.apache.struts.actions.ForwardAction
> > >
> > > Greetz, Filip
> > > >
> > > > thanks
> > > >
> > > > Andy
> > > >
> > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: html links

2003-06-25 Thread Andy Richards
Thanks filip

But do i have to do this for every link in the config file, or can i
configure
the struts config file so as that any links not mapped go through a
particular action.
If i have to map all links in the designers menu system, i will be here till
next month !! : )

regards

Andy

> > Can anyone shed some light on this for me. Being a newbie i tried
> > to perform a
> > search on the list archive however it just says text searches are not
> > allowed.
> >
> > Anyway my question is this, at present a multimedia designer will
> > hand me a
> > HTML site requiring the addition of functionality. All links work
> > etc. If  i
> > want to use this interface around struts, i understand that i
> > need to map the
> > requested path to an action. However what do i do with simple
> > links such as
> > "home" or "go back" which just link to simple html pages? do i
> > have to map
> > these through the controller servlet if so do i do this with some sort
of
> > generic mapping?
>
> at first: yes you should use struts mappings for those simple pages too
> (IMHO).
> To do this u could use org.apache.struts.actions.ForwardAction
>
> Greetz, Filip
> >
> > thanks
> >
> > Andy
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >


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



html links

2003-06-25 Thread Andy Richards
Can anyone shed some light on this for me. Being a newbie i tried to perform a 
search on the list archive however it just says text searches are not 
allowed. 

Anyway my question is this, at present a multimedia designer will hand me a 
HTML site requiring the addition of functionality. All links work etc. If  i 
want to use this interface around struts, i understand that i need to map the 
requested path to an action. However what do i do with simple links such as 
"home" or "go back" which just link to simple html pages? do i have to map 
these through the controller servlet if so do i do this with some sort of 
generic mapping?

thanks

Andy

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



Re: Struts with M$ Word Docs

2003-02-19 Thread Andy Richards
Thanks david, 
however poi dosnt from what i can see, or has very little support for
manipulating .doc documents. Also i wish to put this into a production
enviroment which i am not sure that POI is ready to do. The excel
support looks good though for anyone who needs to do so.

regards

Andy

On Tue, 2003-02-18 at 17:22, David Holtzhouser wrote:
> I saw your post on the Struts list...would the
> following be benefical to you:
> 
> http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html
> 
> http://jakarta.apache.org/poi/index.html
> 
> Good luck,
> 
> Dave Holtzhouser
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com


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




RE: [OT] RE: microsoft .doc struts

2003-02-19 Thread Andy Richards
Thanks hue,

This shall be the route we will take i think, i had a play around with
rtf, and cutting and pasting the images sections into different
documents, and eveything worked fine. As you suggest though i need some
kind of way to do this on the fly? will have to look into this one.
Regular expressions make sense thanks, would this not be asier to do
with a velocity template in java? , i have never implemented one i am
just guessing? geeting a good idea of what i am going to do
thoughthanks for the help.

Regards

Andy

On Tue, 2003-02-18 at 18:36, Hue Holleran wrote:
> Hi Andy,
> 
> The (MS) reference was because this was using the regular expression syntax
> used by Microsoft's VBScript RegEx object and I'm not sure if this is the
> correct format for java regular expressions. I think jakarta-oro is a reg ex
> library that is included with struts - but sorry I have no experience with
> this - although someone on this group almost certainly will - so might be
> worth a separate post - but the example will serve as a good start point. It
> basically means:
> 
>   \[- string to match begins with "["
>   ("[" is escaped because it's a delimiter)
>   \S- match any non-whitespace
>   [ - (delimiter)
> ^\[ - stop if you encounter another "["
>   (to trap error with unclosed [] blocks)
>   ] - (delimiter)
>   * - match any character
>   \]- ends with "]"
>   ("]" is escaped because it's a delimiter)
> 
> Images would be a different problem - if you look at an RTF file then it is
> quite straightforward to extract the image from the rtf - but each image
> would need to be converted in this way or find some way of doing this
> on-the-fly - but I'm not aware of any tool to do this! If you have a limited
> number of images, e.g. logos etc. then it would be possible to insert the
> converted one of these at the appropriate point. Images begin with something
> like:
> 
>   {\*\shppict{\pict{\ ... }} with loads of hex digits in-between.
> 
> If you have loads of images stored as say gifs or jpgs then you will need to
> find some way of doing this on-the-fly to rtf format.
> 
> Hope the above helps a bit more.
> 
> H.
> 
> -Original Message-
> From: Andy Richards [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2003 15:53
> To: 'Struts Users Mailing List'
> Cc: [EMAIL PROTECTED]
> Subject: Re: [OT] RE: microsoft .doc struts
> 
> 
> Hi hue,
> 
> sounds great, i understand that you replace dynamic data into the
> template where where ever you have a [oTb*.field]. but what is (MS) reg
> ex,,,? some kind of regular expression api? if so i will have to do some
> more research as i am yet to understand regular expressions, and how to
> use them. (there is a jakarta api i think though). Also does this method
> work with images?, if so i think this is the route i will have to take.
> 
> Regards
> 
> Andy
> 
> On Tue, 2003-02-18 at 15:36, Hue Holleran wrote:
> > Hi Andy,
> >
> > I've looked through the thread and can't see specifically what you're
> trying
> > to do but we had exactly the same problem and was solved using RTF, thus:
> >
> > (this was for submission of documents to a UK government body that needed
> to
> > be in MS Word .DOC format - they were able to open these documents with no
> > problem in Word: edit, print, save etc.).
> >
> > We used RTF for the document - generated manually in MS Word and exported
> to
> > a .RTF - and used placeholders to hold active data that was to be inserted
> > into the template of format "[oTbl.Field]" (allowable in RTF - and
> replaced
> > these using (MS) reg ex of format "\[\S[^\[]*\]").
> >
> > This then gave us an RTF format document which was then saved with the
> > extension .DOC - which MS Word opens with no problem at all. This was in
> > fact sent to the browser by adding a header "content-disposition" of type
> > "attachment; filename=""WORD.DOC""" and also specifying the "ContentType"
> of
> > "application/rtf". Saving this document saves the document in "Word" .DOC
> > although it is really an RTF.
> >
> > Not sure it's what you're after but after battling trying to open MS Word
> on
> > the server - which needs administrator privileges for the user running the
> > web app (scary) or using vbscript/javascript in the browser (requires the
> > site to be added to IE "Trusted Sites") - not ideal.
> >
> > The solution outlined, using RTF

Re: [OT] RE: microsoft .doc struts

2003-02-18 Thread Andy Richards
Hi hue,

sounds great, i understand that you replace dynamic data into the
template where where ever you have a [oTb*.field]. but what is (MS) reg
ex,,,? some kind of regular expression api? if so i will have to do some
more research as i am yet to understand regular expressions, and how to
use them. (there is a jakarta api i think though). Also does this method
work with images?, if so i think this is the route i will have to take.

Regards

Andy

On Tue, 2003-02-18 at 15:36, Hue Holleran wrote:
> Hi Andy,
> 
> I've looked through the thread and can't see specifically what you're trying
> to do but we had exactly the same problem and was solved using RTF, thus:
> 
> (this was for submission of documents to a UK government body that needed to
> be in MS Word .DOC format - they were able to open these documents with no
> problem in Word: edit, print, save etc.).
> 
> We used RTF for the document - generated manually in MS Word and exported to
> a .RTF - and used placeholders to hold active data that was to be inserted
> into the template of format "[oTbl.Field]" (allowable in RTF - and replaced
> these using (MS) reg ex of format "\[\S[^\[]*\]").
> 
> This then gave us an RTF format document which was then saved with the
> extension .DOC - which MS Word opens with no problem at all. This was in
> fact sent to the browser by adding a header "content-disposition" of type
> "attachment; filename=""WORD.DOC""" and also specifying the "ContentType" of
> "application/rtf". Saving this document saves the document in "Word" .DOC
> although it is really an RTF.
> 
> Not sure it's what you're after but after battling trying to open MS Word on
> the server - which needs administrator privileges for the user running the
> web app (scary) or using vbscript/javascript in the browser (requires the
> site to be added to IE "Trusted Sites") - not ideal.
> 
> The solution outlined, using RTF is not dependent on the browser used and
> the above solution is being used to generate around 200-300 (probably more)
> "MS Word" .DOC files a week which are emailed directly to the UK government
> body.
> 
> Let me know if this is an option for you - and if you need any more info but
> BTW the above was implemented in MS ASP so I can only send you some
> ASP/VBScript code if that will help.
> 
> H.
> 
> -Original Message-
> From: Andy Richards [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2003 14:12
> To: [EMAIL PROTECTED]
> Subject: microsoft .doc struts
> 
> 
> Hi,
> 
> I have read with interest from the struts archives where a user posted
> the following question to do with producing microsoft .doc files for
> clients. See:
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html
> 
> Peter S. Hamlen: posted a follow up talking about using office 2000
> html, see:
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html
> 
> What i cant understand and i am hoping that someone will be able to help
> me, is that once you have parsed the .html template ie with velocity,
> then how do you convert the html back to a .doc file. I could provide
> for download the html pages, but the images i want to include would be
> seperate from the html file. I am trying to think of a tidier way?
> looking down the thread .rtf format is not the easiest, and POI is in a
> early release. Anyone know what i can do? or have any suggestions?
> 
> dont worry i made my point about cross platform and proprietory .doc,
> doc is what the client wants, and therefor .doc is what i am having to
> try and give.
> 
> Regards
> 
> Andy
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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




Re: [OT] RE: microsoft .doc struts

2003-02-18 Thread Andy Richards




This is how the current system works, written in delphi sitting on a windows box. I have recently joined the team and want to rewrite the sytem using struts, tomcat and some flavour of linux. The current method starting an instance of microsoft word, is damn slow! to say the least, and crashes daily!!

what to do.perhaps i will have to look into .rtf more?

regards

Andy

On Tue, 2003-02-18 at 15:00, John Cavacas wrote:

> i misunderstood, i thought your application was converting the template
> back to .doc. I take from the research that i have done then that this
> cannot be done, or is a real pain to do?
[John Cavacas] 
My findings would concur with yours, as in it is a real pain to do. There
are a couple of ways that it probably could be done. Using a Java/COM
bridge, delegating the building of the document to a third party such as a
.net web service, which in turn its just a .net COM app that ties to Word.
Both of those are possible, but there is one significant potential problem
every time you deal with COM and Word. You essentially need to start a word
instance every time you want to do something. 

John




This communication is intended for the use of the individual(s) or entity it
was addressed to and may contain confidential and/or privileged information.
If the reader of this transmission is not the intended recipient, you are
hereby notified that any review, dissemination, distribution or copying of
this communication is prohibited.  If you receive this communication in
error, please notify the sender immediately and delete this communication
from your system(s) to which it was sent and/or replicated to. (c) 2002
Sapiens Americas Corp.

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












___




 




e:


[EMAIL PROTECTED]




w:


www.esolution.co.uk




t:


[+44] 01785 827666




f:


[+44] 01788 827601




 




This E mail may contain proprietary, confidential or legally privileged information and is intended for the addressee only. If you are not the intended addressee, please notify me immediately and do not use, disclose, distribute, copy, print or rely on it. The views expressed are mine and do not necessarily reflect those of eSolution.












RE: microsoft .doc struts

2003-02-18 Thread Andy Richards
hi john

thanks for the speedy response!

i misunderstood, i thought your application was converting the template
back to .doc. I take from the research that i have done then that this
cannot be done, or is a real pain to do?

andy

On Tue, 2003-02-18 at 14:34, John Cavacas wrote:
> > then how do you convert the html back to a .doc file. I could provide
> > for download the html pages, but the images i want to include would be
> > seperate from the html file. I am trying to think of a tidier way?
> > looking down the thread .rtf format is not the easiest, and POI is in a
> > early release. Anyone know what i can do? or have any suggestions?
> [John Cavacas] 
> 
> That was my post you refer to. Anyway, in our requirements for this
> application, since users are really creating a template for a document that
> they will manually have to finish and save, turning back the document into
> word is a manual process done by the user. Dealing with images becomes a bit
> trickier but also doable. You could for example save the template HTML file
> into a directory that is created on the fly based on some sequence name.
> Then save any images that are needed by that document in the same directory
> and reference them relative to the document in the HTML and the images would
> load when the user loads the document in word. I haven't actually tried
> that, but it should work. There was no requirement for images in our
> application, but if it comes up that's the approach I would take.
> 
> John
> 
> 
> 
> This communication is intended for the use of the individual(s) or entity it
> was addressed to and may contain confidential and/or privileged information.
> If the reader of this transmission is not the intended recipient, you are
> hereby notified that any review, dissemination, distribution or copying of
> this communication is prohibited.  If you receive this communication in
> error, please notify the sender immediately and delete this communication
> from your system(s) to which it was sent and/or replicated to. (c) 2002
> Sapiens Americas Corp.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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




Re: microsoft .doc struts

2003-02-18 Thread Andy Richards




I could use pdf, however our client wishes to amend the .doc report once
generated. An earlier effort produced the documents in pdf format.

regards

Andy

also sorry follow up url was
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58600.html

On Tue, 2003-02-18 at 14:25, Michael Nascimento Santos wrote:

Can't you generate .pdf files? There are many frameworks that would help you
doing that.

[]s
Michael

- Original Message -
From: "Andy Richards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 11:12 AM
Subject: microsoft .doc struts


> Hi,
>
> I have read with interest from the struts archives where a user posted
> the following question to do with producing microsoft .doc files for
> clients. See:
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html
>
> Peter S. Hamlen: posted a follow up talking about using office 2000
> html, see:
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html
>
> What i cant understand and i am hoping that someone will be able to help
> me, is that once you have parsed the .html template ie with velocity,
> then how do you convert the html back to a .doc file. I could provide
> for download the html pages, but the images i want to include would be
> seperate from the html file. I am trying to think of a tidier way?
> looking down the thread .rtf format is not the easiest, and POI is in a
> early release. Anyone know what i can do? or have any suggestions?
>
> dont worry i made my point about cross platform and proprietory .doc,
> .doc is what the client wants, and therefor .doc is what i am having to
> try and give.
>
> Regards
>
> Andy
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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












___




 




e:


[EMAIL PROTECTED]




w:


www.esolution.co.uk




t:


[+44] 01785 827666




f:


[+44] 01788 827601




 




This E mail may contain proprietary, confidential or legally privileged information and is intended for the addressee only. If you are not the intended addressee, please notify me immediately and do not use, disclose, distribute, copy, print or rely on it. The views expressed are mine and do not necessarily reflect those of eSolution.












microsoft .doc struts

2003-02-18 Thread Andy Richards
Hi,

I have read with interest from the struts archives where a user posted
the following question to do with producing microsoft .doc files for
clients. See:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html

Peter S. Hamlen: posted a follow up talking about using office 2000
html, see:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html

What i cant understand and i am hoping that someone will be able to help
me, is that once you have parsed the .html template ie with velocity,
then how do you convert the html back to a .doc file. I could provide
for download the html pages, but the images i want to include would be
seperate from the html file. I am trying to think of a tidier way?
looking down the thread .rtf format is not the easiest, and POI is in a
early release. Anyone know what i can do? or have any suggestions?

dont worry i made my point about cross platform and proprietory .doc,
.doc is what the client wants, and therefor .doc is what i am having to
try and give.

Regards

Andy



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