export to excel - displaytag

2010-10-25 Thread Struts User
Hi all,

I am trying to export data to excel using diplaytag. I am able to save the
excel file but the file is empty. Any help is greatly appreciated.
I am setting the export filter and display-tag properties as below.

*web.xml:*


ResponseOverrideFilter

org.displaytag.filter.ResponseOverrideFilter



ResponseOverrideFilter
*.do


ResponseOverrideFilter
*.jsp


*displaytag.properties*

#sort.behavior=list
#sort.amount=list
basic.empty.showtable=true
basic.msg.empty_list=Query returned no results.
basic.msg.empty_list_row= Query returned no
results.
#paging.banner.placement=top
#paging.banner.onepage=
export.types=csv excel xml pdf rtf
export.excel=true
export.csv=true
export.xml=true
export.pdf=true
export.rtf=true
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
export.pdf.class=org.displaytag.export.DefaultPdfExportView
export.rtf.class=org.displaytag.export.DefaultRtfExportView
# if set, file is downloaded instead of opened in the browser window
export.excel.filename=logging_report.xls
export.excel.include_header=true

*Table.jsp*




 











Thanks.


redirect with parameter in struts

2010-08-23 Thread Struts User
Hi,

Is it possible in struts1 to include a parameter in the action redirection.
If I have a web application say, http://www..xyz.com/welcome.do and I want
to redirect it to http://www.xyz.com/welcomeredirect.do?cmp=company1 while
value of "cmp" will be assigned dynamically. how can I achieve this? Any
help or suggestion is greatly appreciated.

Thanks


Re: Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Thanks Paul, What I mean is not exaclty one session per user rather
preventing or detecting the session which is getting copied when any one
does CTRL+N or in IE7 opens application new TAB. 
In above said cases session remains to be same however session data is
replaced with the recentely logged in user's data. 
This creates problem when employee logs in one window and same employee
tries to log as admin in CTRL+Ned window as admin which will result in
employee session data being replaced by admin data



-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964689.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Hi All - Is there any way in Struts2 to handle session sharing across
browsers.
My problem: 
User logs in -> session created, user does CTRL+N and opens child window 
now he logs in as admin-> session created (it does not create new session)
and now parent window has the admin session, and session data is of admin.
This problem is seen only when browser windows are opened by CTRL+N.

Please suggest 
-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964416.html
Sent from the Struts - User mailing list archive at Nabble.com.


Struts woes

2009-03-31 Thread struts-user

Hi.

I am upgrading from Struts 2.0.11 to 2.1.6, which mostly works as it 
should thanks to the migration guide [1].  A couple of things elude me, 
though:


1) I am not able to get fetch static files from dojo.  They are supposed 
to be in the classpath per default [2],  but the 
/struts/dojo/struts_dojo.js path only gives me a 404.  These files are 
in the struts2-dojo-plugin jar, and the jar is included in my War (under 
WEB-INF/lib/)


2) I also get NullPointers in 
com.opensymphony.xwork2.util.TextParseUtil.java (155) and 
com.opensymphony.xwork2.util.LocalizedTextUtil.findText (318) when 
accessing certain pages.  It seems that it's unable to fetch the strings 
in under WEB-INF/classes/my/app/package.properties


Best regards,
Henrik

[1] 
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html

[2] http://struts.apache.org/2.x/docs/configuration-files.html


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













































/my-app/Login.jsp
/my-app/LoginSuccess.jsp




/my-app/Dummy.jsp






/my-app/Login.jsp
/my-app/Login.jsp



/my-app/AboutOTTO.jsp




/my-app/Hellomy-app.jsp




/my-app/Welcome.jsp




/my-app/LoginSuccess.jsp



/my-app/Logout.jsp


=${activationCode}
/my-app/activate.jsp



ShowActivate
/my-app/activate_success.jsp




/my-app/my-app_support.jsp
/my-app/my-app_support.jsp




	Showmy-appSupport
my-appComplete





/my-app/my-app_support_success.jsp




/my-app/Register.jsp
/my-app/Register.jsp




ShowRegister
RegisterComplete




/my-app/SuccessfullRegistration.jsp




/my-app/Trackingcodes.jsp



ShowTrackingcodes
ShowTrackingcodes



ShowTrackingcodes
ShowTrackingcodes



/my-app/playerReport.jsp



/my-app/BannerURL.jsp
ShowTrackingcodes





/my-app/withdraw.jsp


/my-app/withdraw.jsp


/my-app/withdraw_details.jsp


Withdraw_details
Withdraw_show_validation


/my-app/withdraw_show_confirm.jsp
Withdraw_details


/my-app/withdraw_complete.jsp
Withdraw_validate_attributes





/my-app/view_transactions.jsp
/my-app/view_transactions.jsp



/my-app/view_commissions.jsp
/my-app/view_commissions.jsp



/my-app/view_commission_tickets.jsp
/my-app/view_commission_tickets.jsp



/my-app/view_withdrawals.jsp
/my-app/view_withdrawals.jsp




 /my-app/edit_settings.jsp
 /my-app/edit_settings.jsp

   

		ShowSettings
EditComplete

   

/my-app/settings_changed.jsp






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














http://java.sun.com/xml/ns/j2ee"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
	
	Struts 2 - Maven Archetype - Starter
	
	
		contextConfigLocation
		classpath*:applicationContext*.xml
	
	
	
	
action2-cleanup
org.apache.struts2.dispatcher.ActionContextCleanUp


sitemesh
com.opensymphony.module.sitemesh.filter.PageFilter



[EMAIL PROTECTED]

2006-01-14 Thread struts-user
 



[EMAIL PROTECTED]

2006-01-09 Thread struts-user
[EMAIL PROTECTED]



[EMAIL PROTECTED]

2006-01-08 Thread struts-user
[EMAIL PROTECTED]



Re: [STRUTS] Issues switching context paths

2004-12-10 Thread Chad Lauritsen (Struts User)
In the struts-config.xml, you still leave things as /appEntryPoint, and
the same holds true for custom tags e.g.




The struts controller and the taglibs will take /appEntryPoint, find
matching actions, and translate into /ice/appEntryPoint.do for you.

Keep in mind that if you don't use the custom tags, then you may have to
prepend /ice, and add the .do (or whatever you specified in web.xml)
suffix e.g.



> I just upgraded to struts 1.2.4, and now we want to move from our app at
> /, to being /ice/ So I modified my application.xml to be /ice and then
> pre-pended /ice to all of my actions. So I went from /appEntryPoint to
> /ice/appEntryPoint in the struts-config.xml
>
> Now when I navigate to http://www.localhost/ice/appEntryPoint.do: I
> get "Invalid Path to /appEntryPoint requested".
>
> Any ideas on what is wrong?
>
> 
> Mick Knutson
> Wells Fargo Business Direct Information Systems
> (415) 222-1020
>
> "This message may contain confidential and/or privileged information. If
> you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based on
> this message or any information herein. If you have received this
> message in error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
> 
>
>
>
> - To
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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


Re: [STRUTS] Struts or straight HTML button for action w/ no assoc. form?

2004-12-09 Thread Chad Lauritsen (Struts User)
how about

Post message
   for this classmate


or perhaps you could create a throw-away DynaActionForm for this action if
you really want it to be a button.

csl

> [ServletException in:/classmateInfoData1.jsp] Cannot retrieve
> definition for form bean null' javax.servlet.jsp.JspException: Cannot
> retrieve definition for
>  form bean null at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
>  at...
>  ...
-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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



Re: Struts, file upload, Websphere 5.0.1 'Read timed out'

2004-12-09 Thread Chad Lauritsen (Struts User)
Sean,

Is there a proxy server involved in the upload request?

csl


Sullivan, Sean C - MWT said:
>
> I am using Struts 1.1 in Websphere 5.0.1
>
> I am trying to use Struts' FormFile feature to receive an uploaded file.
>
> The file upload is failing due to a "Read timed out" error.  The error
> occurs when Struts is trying to read data from the InputStream for the
> HttpServletRequest object.
>
> Is this a known issue in Websphere 5.0.1?  Is there a solution and/or
> workaround?
>
-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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



Re: [OT] how do i get context-param

2004-11-24 Thread Struts User
I had the same feeling that servlet spec. should be more specific when
I just started working with J2EE:)

But, my experience tells me that a specification tells you "What" you
need to have in a servlet container and not "How" to implement a
servlet container.

If I want to learn servlet programming, I usually pick up Jason Hunter's book.

Lee

On Wed, 24 Nov 2004 14:57:14 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> Good point. I guess the J2EE tutorial would be the place for stuff like
> that (I was trying to only speak of "official" documentation).
> 
> Erik
> 
> 
> 
> 
> Craig McClanahan wrote:
> 
> >It's important to remember that the Servlet Specification target
> >audience isn't application developers -- it's people that are
> >implementing servlet containers (such as the group that creates
> >Tomcat).  It is about defining requirements, not illustrating use
> >cases.
> >
> >For application level questions, and especially for beginners, you'll
> >find any of the plethora of books, magazine articles, tutorials, and
> >mailing lists that are available to be somewhat more accessible.
> >(Personally, I still agree with your PS about the spec being "required
> >reading" -- just need to set your expectations correctly :-).
> >
> >As for your specific question about accessing a context init
> >parameter, you do have it right.
> >
> >Craig
> >
> >
> >On Wed, 24 Nov 2004 14:26:23 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Well, I have to criticize my own advice. I just read over the Servlet
> >>2.4 spec. It doesn't explain this well at all, in my opinion. It still
> >>uses the same old, nearly meaningless, obscure language like "used by
> >>the Servlet container to communicate with a Servlet", and stuff like
> >>that, which doesn't help anyone who actually wants to write a program.
> >>It does mention the getInitParameter methods of ServletContext and
> >>ServletConfig, but nowhere that I could find does it simply say, use one
> >>with this element in web.xml and the other with that element in web.xml,
> >>and/or why you would choose one or the other.
> >>
> >>Why can't the spec just say what I wrote below instead of trying to be
> >>so "conceptual"? Is what I wrote wrong? This is the stuff that .NET
> >>people criticize and that frustrates new programmers (in my experience).
> >>
> >>Here is a partial outline of how it should be explained:
> >>
> >>Initializing a Servlet
> >>-
> >>
> >>I. Initialization parameter that is global to your Web application (all
> >>Servlets)
> >>
> >>A. web.xml
> >>
> >>
> >>. . .
> >>
> >>globalDateFormatString
> >>-MM-dd
> >>
> >>. . .
> >>
> >>
> >>B. Java
> >>
> >>// store the date format String, but not a DateFormat,
> >>// as an instance variable or class variable
> >>// (DateFormat can't always be used concurrently)
> >>protected String globalDateFormatString;
> >>. . .
> >>public void init() throws ServletException, UnavailableException {
> >>globalDateFormatString =
> >>getServletContext().getInitParameter("globalDateFormatString");
> >>// try to instantiate a SimpleDateFormat with the String;
> >>// if the String is invalid, throw an Exception to make the Servlet
> >>unavailable
> >>}
> >>
> >>II. Initialization parameter that is specific to one Servlet
> >>
> >>A. web.xml
> >>
> >>
> >>. . .
> >>
> >>specificDateFormatString
> >>|EEE, d MMM  HH:mm:ss Z|
> >>
> >>. . .
> >>
> >>
> >>B. Java
> >>
> >>protected String specificDateFormatString;
> >>. . .
> >>public void init() throws ServletException, UnavailableException {
> >>globalDateFormatString =
> >>getServletConfig().getInitParameter("specificDateFormatString");
> >>}
> >>
> >>Please correct me if I have it wrong, or show me the light if I missed
> >>something in the spec. I know I learned this somewhere, but can't
> >>remember where (the tutorial maybe?).
> >>
> >>Shouldn't this be the way the spec reads, or does this type of example
> >>belong somewhere else?
> >>
> >>Erik
> >>
> >>P.S. The spec is still required reading. ;-)
> >>
> >>
> >>
> >>
> >>Bill Siggelkow wrote:
> >>
> >>
> >>
> >>>Thanks for the clarification, Erik.
> >>>
> >>>Erik Weber wrote:
> >>>
> >>>
> >>>
> I think you want ServletContext.getInitParameter here. That is used
> with the "context-param" element (global to your web app).
> ServletConfig.getInitParameter is used with the "init-param" element
> (specific to one Servlet).
> 
> In addition to the JavaDocs, you should read the Servlet
> specification, which tells you how Servlets and Servlet containers
> are supposed to work. Trust me, it is required reading:
> 
> http://www.jcp.org/aboutJava/communityprocess/final/jsr154/
> 
> Erik
> 
> 
> 
> 
> Bill Siggelkow wrote:
> 
> 
> 
> >MyServlet extends HttpServlet {
> >public void init (ServletConfig config) {
> >String paramV

Re: Problem downloading file

2004-11-23 Thread Struts User
Here is a good article related to the problem:

http://www.javaworld.com/javatips/jw-javatip94_p.html

Lee


On Tue, 23 Nov 2004 18:38:30 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> 
> 
> Dakota Jack wrote:
> 
> >Weber, you're the best.  Thanks a million.
> >
> >Jack
> >
> >
> 
> You're quite welcome.
> 
> >P.S.  Would you like a gmail invite?
> >
> >
> 
> Why, thank you. But, I already have a gmail account. Unfortunately, my
> main email address long has been posted all over the Web (I didn't know
> any better), so what the hell, I might as well keep using it.
> Earthlink's spam filtering is getting better and better anyway. :-)
> 
> Erik
> 
> 
> 
> 
> >
> >On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Morales de Frías wrote:
> >>
> >>
> >>
> >>>Hi¡
> >>>
> >>>I already know that this problem have been resolved before, but i can't 
> >>>find the solution searching in this post. (Or solutions founded don't help 
> >>>me).
> >>>
> >>>I have an action that generates pdf files, and zip them. And i want to 
> >>>download it... but i have two problems:
> >>>
> >>>--> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip"
> >>>
> >>>
> >>>
> >>>
> >>Probably you already saw this, but if not it might help:
> >>
> >>http://www.mail-archive.com/user@struts.apache.org/msg10189.html
> >>
> >>
> >>
> >>
> >>
> >>>code is like this
> >>>-
> >>>
> >>>  if (gz.exists()) {
> >>>
> >>>  response.setContentType("application/zip");
> >>>  
> >>> response.setHeader("Content-Disposition","attachment; fichero=\"" + 
> >>> nombreBaseFichero + "\";");
> >>>  response.setContentLength((int)gz.length());
> >>>
> >>>
> >>>  ServletOutputStream sos;
> >>>  sos = response.getOutputStream();
> >>>
> >>>  FileInputStream stream = new 
> >>> FileInputStream(gz);
> >>>  BufferedInputStream  bis = new 
> >>> BufferedInputStream(stream);
> >>>  InputStream is = new 
> >>> BufferedInputStream(bis);
> >>>  int count;
> >>>  byte buf[] = new byte[4096];
> >>>  while ((count = is.read(buf)) > -1)
> >>>  sos.write(buf, 0, count);
> >>>
> >>>  is.close();
> >>>  sos.close();
> >>>  }
> >>>-
> >>>
> >>>---> Dialog appears two times, and next any action i take, download's 
> >>>dialog appears. I read that action must return "null" but iit doesn't work.
> >>>
> >>>
> >>>Can you help me, please???
> >>>
> >>>Thanks in advance.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>-
> >>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: AW: talking about paradigms

2004-11-16 Thread Struts User
I agree with Jack. There are pointers everywhere in Java. Java learns
from C++ mistake by "hiding" error prone functionality such as
pointers.

Joshua Block's book is not a Java Book for beginner. It is target for
experience developer. Probably you should look into Bruce Eckel's
on-line book for more information - http://64.78.49.204/

I hope this helps.

Lee

On Tue, 16 Nov 2004 06:42:32 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Hello, Leon,
> 
> There are pointers in Java.  Every object is referenced by a pointer.
> Indeed, how else could an object be referenced?  I am not sure why you
> cited Joshua Bloch's book on this.  There is not, as Eddie said,
> pointer arithmetic.
> 
> Jack
> 
> On Tue, 16 Nov 2004 11:46:05 +0100, Rosenberg, Leon
> <[EMAIL PROTECTED]> wrote:
> 
> >
> > And, taking in risk bringing in boredom in your life, there are NO
> > _pointers_ in java; if you don't believe me, try some books written by
> > java developers (i.e. Joshua Bloch, Effective Java Programming Language
> > Guide,
> > Regards
> > Leon
> 
> --
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> -
> 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: contrib/struts-shale-mailreader

2004-11-14 Thread Struts User
Thanks for the great explaination, Batien! 

It certainly makes sense to have tiles to work with any JSF implementation!

Lee

On Sun, 14 Nov 2004 10:37:27 -0700, BaTien Duong
<[EMAIL PROTECTED]> wrote:
> Struts User wrote:
> 
> 
> 
> >>Having said all this, the framework is powerful for sophisticated web
> >>production side, where all fragments of each page are completely dynamic
> >>based on built-in backend intelligence. Tiles is appropriate for such
> >>page, rather than each page need a backing bean.
> >>
> >>
> >
> >Hi Batien,
> >
> >I am running the struts-shale-mailreader and just started to look into
> >Java Server Faces and Shale. Thus, I am not totally familiar with the
> >new frameworks and hope you can bear with me.
> >
> >Are you saying that Tile and backing bean don't have to co-exist? I
> >thought Tiles and backing bean are two different things. Backing bean
> >is sort of like ActionForm in Struts. More accurately, backing bean is
> >like OzPage in Tak's introductory document.
> >
> >
> >
> Backing beans and tiles need to co-exist in any decent dynamic web or
> portlet application. This is a very powerful presentation framework.
> 
> Backing bean is a power tool under jsf. In a typical dynamic page, there
> is NOT a 1-to-1 mapping between a backing bean and a navigated page. A
> page is made of many dynamic fragments, each fragment has its own
> backing bean to receive data input from user and to push relevant data
> back to the user depending on user request context. Jsf provides this
> required infrastructure and fully configurable under managed beans. For
> example, if user asks any information related to company X in your
> portal directory, the portal supply requested information together with
> user existing authorized services under a complete layout of company X
> name brand (with company X logo vision, product vision, and copyright,
> etc) by just changing the contents of the company backing bean. The
> components and layouts to make up a page are re-useable.
> 
> Tiles enables you to encapsulate the layouts and insert dynamic
> fragments to the page. For example, your portal enables user with
> different portal tabs so user can organize his/her authorized services
> in relevant portal tab, named by the user in his/her own language. Each
> portal tab has differnet layout designed for its purpose. The design of
> your portlet authorized services may follow a typical portlet layout
> with a portlet header for current status of PortletMode and portlet
> WindowState, followed by portlet contents. Hence, in each portal tab
> page, you have a tab layout and the portlet layout as raw templates. You
> insert relevant contents to the raw components having their own backing
> beans in the raw templates. Tiles is a very clean and powerful for this job.
> 
> Under Shale, Tiles can be a plug in, similar to current tiles under
> struts. The design can be similar to what has been done under MyFaces
> for tiles. Each nagigated page is routed to a tiles definition with its
> own layout. Any attribute in a definition can be a page fragment or
> another definition. This enables you to be simple at the beginning and
> further drill down for more dynamic content implementation. I hope
> someone has time to port Tiles under Shale so it can be used under any
> compliant JSF implementation. If i have time i will do it. But life will
> not always go according to your wishes.
> 
> Currently, i use MyFaces + Tiles + Spring IoC. I will use Shale as a
> framework for application filter to leverage on whatever developed under
> Shale, while inserting whatever servlet filters you already have for
> your current applications using common-chain in Shale.
> 
> BaTien
> DBGROUPS
> 
> 
> 
> >Please correct me if I am wrong.
> >
> >Thanks!
> >Lee
> >
> >-
> >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: contrib/struts-shale-mailreader

2004-11-13 Thread Struts User
> Having said all this, the framework is powerful for sophisticated web
> production side, where all fragments of each page are completely dynamic
> based on built-in backend intelligence. Tiles is appropriate for such
> page, rather than each page need a backing bean. 

Hi Batien,

I am running the struts-shale-mailreader and just started to look into
Java Server Faces and Shale. Thus, I am not totally familiar with the
new frameworks and hope you can bear with me.

Are you saying that Tile and backing bean don't have to co-exist? I
thought Tiles and backing bean are two different things. Backing bean
is sort of like ActionForm in Struts. More accurately, backing bean is
like OzPage in Tak's introductory document.

Please correct me if I am wrong.

Thanks!
Lee

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



Re: contrib/struts-shale-mailreader

2004-11-12 Thread Struts User
On Thu, 11 Nov 2004 14:42:30 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> There's another dependency when you try to compile
> struts-shale-mailreader ... you have to have run the "dist" target on
> the shared database code in "struts-examples/mailreader" first (along
> with "struts-contrib/struts-shale" of course).

Craig, 

Can you elaborate more on running the "dist" target on the shared
database code in "struts-examples/mailreader" first (along with
"struts-contrib/struts-shale")? Are saying I have to run those two at
the same time? Also, I could not find the shared database code in the
folder.

Thanks!
Lee

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



Re: VO usage

2004-11-09 Thread Struts User
On Tue, 9 Nov 2004 12:45:48 -0500, Robert Taylor <[EMAIL PROTECTED]> wrote:
> Yes. Wendy is absolutely correct.
> Although the I described will work technically,
> you will run into issues as Wendy already mentioned.

I use Robert's approach and make my VO as a JavaBean which only
accepts String and boolean. I validate user input using struts
validator. If a user entered character instead of an integer, struts
validator will catch it and redisplay the error input.

Lee

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



Re: Display message beside input field using struts validator

2004-11-08 Thread Struts User
Thanks, Joe and Erik.

I got it to work using the following code:


   


Struts validator returns error object instead of message object.

Thanks!
Lee


On Mon, 8 Nov 2004 16:08:26 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 3:49 PM -0600 11/8/04, Struts User wrote:
> 
> 
> >Hello,
> >
> >Currently, I am using struts validator to validate the fields in my
> >ActionForm.
> >
> >Before I updated to struts 1.2.4, I could add an error this way - errors.add(
> >"username", new ActionError("error.username.required"));
> >
> >If the validation failed, the error message for username will be
> >displayed right beside the user name text field if I use Username:
> >.
> >
> >Can someone tell me how to display error message beside an input field
> >using struts validator?
> 
> I've never seen any automatic message placement.  You can access
> messages like this:
> 
> 
> 
> html:messages is effectively a combination logic/iterator tag.  If
> there are any "username" messages in the ActionMessages object saved
> as the "errors" messages, the body of html:messages will be evaluated
> once for each, with a scripting variable of type String defined with
> the name specified in the "id" attribute.  You can use c:out or
> bean:write to display this value, wrapped with span, div, or other
> tags which format your messages correctly.
> 
> I kind of think someone talked on the list once about making
> something which rendered an HTML "label" tag and which was also
> "smart" about the presence of errors.  I like the idea of something
> like that in general, but wonder if you'd be able to specify
> something suitably general for inclusion in Struts.  Seems like it
> might be better left for local development.
> 
> Joe
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> back; I'll know I'm in the wrong place."
>- Carlos Santana
>

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



Display message beside input field using struts validator

2004-11-08 Thread Struts User
Hello,

Currently, I am using struts validator to validate the fields in my ActionForm. 

Before I updated to struts 1.2.4, I could add an error this way - errors.add(
"username", new ActionError("error.username.required"));

If the validation failed, the error message for username will be
displayed right beside the user name text field if I use Username:
.

Can someone tell me how to display error message beside an input field
using struts validator?

Thanks,
Lee

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