Using Struts with XSLT

2001-11-02 Thread Jan Arendtsz

I would like to use Struts as my MVC framework but use XSLT for
rendering the final HTML/WML pages.  I thought that this would be
somewhat of a common approach but was surprised to find very little
information when searching through these archives.  Is this something
that Struts 1.1 will support?

The application that I'm hoping to building should eventually support
several UI devices as well as multiple languages and that's the reason
we would like to use XSLT.  However, we are also somewhat concerned
about some of the performance ramifications when using XSLT.

It seems that using Struts 1.0, I would have to do the following:
- Use the action object to call JavaBeans or EJBs to retrieve data from
the database either as XML text, Row sets (JDBC 2.0 extension), or
custom data objects (the optimal way would be not to use XML since it's
not as efficient), and store this data as a request attribute.  Once the
action object has forwarded to the corresponding view JSP or Servlet,
this data can be retrieved (since it has a request scope), converted to
a DOM object and transformed using a XSL stylesheet.  I was also hoping
to use the stylesheet template caching described in the book "Java and
XSLT" by Eric Burke
(http://oreilly.com/catalog/javaxslt/chapter/ch05.html) to improve
performance.  The JSP page used for the view will not contain any Struts
tags and therefore can be a servlet.

Variations to this could include the following:
- Using the Jakarta XSL tag lib within the JSP page to do the
transformation.  This could mean that I won't get some of the
performance benefits using stylesheet caching.
- Use filters (new to servlet 2.3 spec).  Don't know much about this,
especially on the performance side.

For those of you have worked on a similar application, do you have any
suggestions or best practices?  I'm trying to use both Struts (purely as
the Model 2) and XSLT together and this does not seem to be a common
practice.  I could drop one or the other if the solution is a good one.


Does anyone have thoughts or experience with other frameworks such as
Coccon, Turbine, and Barracuda?

Thanks
Jan




Re: ActionForward to url outside of the web app

2001-11-02 Thread Ted Husted

Isn't the "session" a creature of Java? Can you share it with non-Java
code?

>From your direction structure it appears that script1 and page1 are not
part of the same application root. (Unless the reference is suppose to
be path="/N/jspFiles/page1.jsp".) If that were the case, then you could
not share the session, even if both were written in Java. 

You might be able to share information with cookies, the old-fashioned
way.

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


"Fu, Walter" wrote:
> 
> Normally, when forwarding to a new page, one can use the  tag in
> struts-config.xml to help the Action's perform() method to indicate what the
> next page to go to. Typically, the next page is a url within the same web
> application (sharing the same web.xml).
> 
> I have a situation where I want to mix some legacy (web app) system L with a
> new web application N. I want L and N to share to same session information.
> The legacy web app L is not even java-based.
> 
> Example directory structure:
>   /L/serverSideScripts/script1
>   /N/jspFiles/page1.jsp
> 
> I can reference page1.jsp using: 
> I wanted to reference script1 doing something like:  path="../L/serverSideScripts/script1"/>
> Of course, this does not work.
> 
> Any pointer as to what I can do so as to integrate the new system with the
> old? Keep in mind that I want both L and N to share the same session.
> 
> Thanks,
> 
> Walter
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




ActionForward to url outside of the web app

2001-11-02 Thread Fu, Walter

Normally, when forwarding to a new page, one can use the  tag in
struts-config.xml to help the Action's perform() method to indicate what the
next page to go to. Typically, the next page is a url within the same web
application (sharing the same web.xml).

I have a situation where I want to mix some legacy (web app) system L with a
new web application N. I want L and N to share to same session information.
The legacy web app L is not even java-based.

Example directory structure: 
  /L/serverSideScripts/script1
  /N/jspFiles/page1.jsp

I can reference page1.jsp using: 
I wanted to reference script1 doing something like: 
Of course, this does not work.

Any pointer as to what I can do so as to integrate the new system with the
old? Keep in mind that I want both L and N to share the same session.

Thanks,

Walter






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




Re: exceptions

2001-11-02 Thread Ted Husted

Once an exception gets up to the ActionServlet, it's either going to a
white screen, or the default error page (if it is a ServletException, or
wrapped therein). 

I would recommend that you catch any exception you can handle in the
Action, where you have a chance to handle the error and branch the
control flow. That's the Action's job: handle (routine) errors and
exceptions, and control the flow.

I would say if the Action invokes the business object, and it can throw
LDAP exception, then the Action should catch those, and do whatever is
needed to recover.

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


Todd Fulton wrote:
> 
> Design wise . . . do you all tend to propagate exceptions all the way up to
> the ActionServlet -- centralized like -- or rather grab them in a more
> granular fashion?
> 
> For instance, I've got Action classes using a business object layer which
> has LDAP exceptions possible down deep.  This layer is essentially separate
> and distinct from the web-struts layer.
> 
> Do I send them through, or deal with them at some juncture in-between?
> 
> Any opinion?
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




exceptions

2001-11-02 Thread Todd Fulton


Design wise . . . do you all tend to propagate exceptions all the way up to
the ActionServlet -- centralized like -- or rather grab them in a more
granular fashion?

For instance, I've got Action classes using a business object layer which
has LDAP exceptions possible down deep.  This layer is essentially separate
and distinct from the web-struts layer.

Do I send them through, or deal with them at some juncture in-between?

Any opinion?


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




Re: Capturing an outgoing response.

2001-11-02 Thread Adam

Another way is to proxy it yourself.  This may or may not work if you 
are dependent on user state.  Basically, you server code plays the role 
of the web browser ala wget.  

 (not sure if the following code is correct.  Let the buyer beware)

URL url = new URL(pageToCache);

String pageToCacheContent = (string)url.getContent();

If you are dependant on user state, You may need to do some additional 
hacking


Scott Sayles wrote:

>There are probably numerous ways this can be done.  If you just want to
>easily capture the output from a single page, you could simply make that
>page an included page and use the  tag to capture it's
>output.  i.e. make the requested page include the real page via the
> tag.
>
>For example:
>
>- page1.jsp -
>
>
>
><%
>writeFile(page2Output); //or however else you're going to do this
>%>
>
>
>
>-
>
>Where page2.jsp is what you actually want to display to the user.
>
>
>This is not the best solution in all cases, but may suffice for your
>needs.
>
>Scott
>
>
>On Fri, 2001-11-02 at 01:20, Brandon Goodin wrote:
>
>>I need it to capture the returning html/page on the server side. For
>>example, a client makes a request to a jsp page on my website and an an html
>>page is returned. Is there a way to capture the html being returned to a
>>file on the server side before it is sent to the client or as it is heading
>>out. I would like to capture this output to a static file.
>>
>>Brandon Goodin
>>Phase Communications
>>P (406)862-2245
>>F (406)862-0354
>>http://www.phase.ws
>>
>>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, November 01, 2001 11:00 PM
>>To: Struts Users Mailing List; [EMAIL PROTECTED]
>>Subject: Re: Capturing an outgoing response.
>>
>>
>>You might want to take a look at WebDebug:
>>
>>http://www.cyberclip.com/webdebug/
>>
>>--
>>Martin Cooper
>>
>>
>>- Original Message -
>>From: "Brandon Goodin" <[EMAIL PROTECTED]>
>>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>>Sent: Thursday, November 01, 2001 6:34 PM
>>Subject: Capturing an outgoing response.
>>
>>
>>>Is it possible to capture the html page that is generated by a jsp page
>>>before it is sent to the client who requested it?
>>>
>>>Brandon Goodin
>>>Phase Communications
>>>P (406)862-2245
>>>F (406)862-0354
>>>http://www.phase.ws
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>
>>
>>>For additional commands, e-mail:
>>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail:
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>



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




RE: struts with tiles

2001-11-02 Thread Trieu, Danny

I think 1.1 will have tiles in it  actually the current nigthly build of
1.1 already have Tile in its source.

-Original Message-
From: peter [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 4:15 PM
To: Struts Users Mailing List
Subject: struts with tiles


hi

Does anybody know when the next version of struts (containing tiles) will be
released?


Thanks


Peter


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




struts with tiles

2001-11-02 Thread peter

hi

Does anybody know when the next version of struts (containing tiles) will be
released?


Thanks


Peter


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




RE: Form Bean

2001-11-02 Thread Prengaman.Karen

Cameron, are you still experiencing this problem?  I just ran into the same
thing and thought I would share how I solved it.  

I too was creating a form bean and then adding it to the session.  When the
corresponding jsp was loaded, all the values were reset to the default.
Upon examining my struts-config.xml, I noticed the following in my action
mapping for that jsp:

Note: irrelevant attributes have been omitted



Notice the value of the scope attribute...  I decided to add my newly
created form bean as a request attribute instead of to the session, and my
problem was solved.  To confirm my suspicions, I changed the value of the
scope attribute to session and then saved my form bean in the session, and
it still worked.

Hope this helps.

-Karen

-Original Message-
From: Cameron Ingram [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 4:57 AM
To: [EMAIL PROTECTED]
Subject: Re: Form Bean


No... should I be? Ted could you enlighten us a bit on how to do this? :)
Am I  missing some thing? My code to do this consists of a few lines to do
this. I figure the problem is probably something pretty small.

Ex.
ActionForm frm = new ActionForm();
frm.setSomething("Something");
session.setAttribute("Form", form);

Thanks !! Cameron Ingram


>>> [EMAIL PROTECTED] 10/31/01 04:28PM >>>
When you create the ActionForm, are you calling setServlet()?

Cameron Ingram wrote:
> 
> Hi all!
> 
>  Ok here is the problem I have a form bean that I create in an action
class, I then set the variables in it and then add it to the session.
> This is before the corresponding jsp has been loaded  The jsp is loaded
and it appears that the action servlet is then recreating the form bean and
re-adding it to the session, thus all of the fields I set are set back to
there original values. I overrode the reset method so I know that it's not
calling that to clear the variables.  As I understand it the action servlet
should check to see if it's in the session before it recreates it. The name
I am using to define it in the session is the same name that the
struts-config file uses to define the name. Any ideas???
> 
> This is the name that I am
using when the form bean is added to the session.
>   type="net.pscu.ndswebutils.EditDeleteUserNdsForm"/>
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Silverstream, struts and UTF-8 Encoding

2001-11-02 Thread Krueger, Jeff

Russell,

This comes from the SilverStream admin guide on page 90.  It tells
you how to change it in the httpd.props file, but you might be able to get
it to work via the web.xml.


_
Specifying character set encoding


The SilverStream server uses the following server property when URL-encoding
and -decoding form content:

http-server.com.sssw.srv.international.UrlEncoding

NOTE SilverStream stores the encoding and other server startup properties in
the httpd.props configuration file, which is located in the
SilverStreamInstallDir\resources directory. For more information, see
Appendix A, "The httpd.props File". By default, the SilverStream server uses
utf-8 (Universal Character Set Transfer Format) for URL encoding and
decoding. Because utf-8 can encode ASCII characters without requiring
modification, utf-8 works well for English and most western languages.
Because languages
using multibyte encodings are not a subset of utf-8, character encoding and
decoding will not work properly with them.

When to change the encoding scheme You typically need to change the encoding
scheme only when the majority of client browsers in your environment use
character encodings that are not ISO 8859-1 (Latin 1). For example, a
Japanese Web site that serves content to its employees using the ShiftJIS
encoding may want to change its SilverStream server's encoding property to
SJIS.

To change the encoding scheme:

1. To change from the default utf-8 to another encoding, add the following
line to the httpd.props file (located in the resources directory beneath the
SilverStream root directory):

http-server.com.sssw.srv.international.UrlEncoding= NewEncoding

2. Enter the language mapping needed at your site in place of the
NewEncoding variable.
Check the Sun Web site if you are unsure about the Java string mapping for
your
language.

3. Restart the SilverStream server.

URL content will be encoded using the new encoding scheme after you restart
the server.


Jeff Krueger


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: Silverstream, struts and UTF-8 Encoding


I am having some problems with a struts based application in that the
browser does not seem to change to UTF-8 encoding and as a result, i am
losing some characters. I have read quite a few postings regarding i18n
including this excerpt:

1) Specify the content type for the JSP output:

<%@ page contentType="text/html; charset=utf-8" %>

You can also do this by setting the content type header manually, using
response.setContentType().

2) Specify the content type to the browser:



3) Specify the default content type to the container. In our case, we are
using Resin, and so do this:




I have changed the jsp for the first 2 but the browser still doesn't
recognise that it is meant to be UTF-8. Has anyone any experience of this
or know how to resolve it? I have been unable to do the last step in the
web xml as i dont know what the context-param name would be for
silverstream - does anyone know?
I think the web.xml should look something like:



weblogic.httpd.inputCharset./*
UTF-8

...


but with a different param-name.

Any clues as to why UTF-8 isn't working would be appreciated.

Russell


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Professional JSP Site Design BOOK

2001-11-02 Thread Paulo J S Pereira

Nick ...

Don't know about that one, but I like Professionl JSP 2nd Ed. from Wrox ...
good foundation on JSP and good coverage of "basic" Struts with a plus!
(custom tag libs section)

Paulo

-Original Message-
From: Nicolas Parisé [mailto:[EMAIL PROTECTED]]
Sent: November 2, 2001 5:22 PM
To: [EMAIL PROTECTED]
Subject: Professional JSP Site Design BOOK


Anybody knows how much Struts related pages will be
in this book ?


Nicolas


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




Re: Professional JSP Site Design BOOK

2001-11-02 Thread Ted Husted

Lots. 

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


Nicolas Parisé wrote:
> 
> Anybody knows how much Struts related pages will be
> in this book ?
> 
> Nicolas

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




help: config filter-mapping and struts

2001-11-02 Thread c tang

Hi all,

I wrote an app using struts and it works fine.  Now I
want to add a filter, so that a pre-defined page will
be filtered before return.  The question is how to
specify .  I tried lots of options, it
does not work.

For the following action,

 
  
 

I want to compress the response when it is forward to
success page(/success).  When I map filter to
generateBig.do, the doFilter method is invoked, but
the request page is returned.  Even if correct page is
return, I think mapping to generateBig.do is not the
right way because failure page will be filter too. 
When I map filter to /success(or the servlet mapping
to /success), the doFilter method is not even invoked.


please help!

ct

__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Professional JSP Site Design BOOK

2001-11-02 Thread Nicolas Parisé

Anybody knows how much Struts related pages will be
in this book ? 


Nicolas



Re: Need help

2001-11-02 Thread Ashoka Murthy


Will get back on this. Probably the right track to go.

Tnx
Ashoka

>From: Mark Gordon <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: Re: Need help
>Date: Fri, 02 Nov 2001 14:30:27 -0700
>
>
>I think all paths are relative to the root of your application.
>
>I am new to struts... so I may be all wrong but
>
>
>make the path in your action "/jsp/logon"
>
>   type="com.tgt.d2g.auth.LogonAction"
>   name="logonForm"
>   input="/jsp/logon.jsp"
>   scope="session">
>  
>  
>
>
>
>then in your form use "/jsp/logon" as the action
>
>
>
>
>
>
>-Mark
>
>
>Ashoka Murthy wrote:
>
>>Hi,
>>
>>I am relatively new to struts..I have a login page on which I fill user
>>name and password and press "login" button. Then it should go to
>>home.jsp instead browser says "Page cannot be displayed". I saw the
>>Tomcat console and error given is "No action instance for path /logon
>>could be created"
>>
>>My web.xml looks like :-
>>
>>  
>>action
>>/do/*
>>  
>>
>>My struts-config.xml looks like :-
>>
>>>   type="com.tgt.d2g.auth.LogonAction"
>>   name="logonForm"
>>   input="/jsp/logon.jsp"
>>   scope="session">
>>  
>>  
>>
>>
>>
>>
>>Could some body guide me through this?
>>
>>Thanks in Advance
>>Ashoka Murthy
>>
>>_
>>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail:
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: Problem with multilingual submit button with request paramete rs

2001-11-02 Thread Justin Piper

I would say having three properties for the three buttons would be a cleaner
solution.  Relying on JavaScript anywhere you don't have to is asking for
trouble, IMO.

-Original Message-
From: Sobkowski, Andrej [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 3:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Problem with multilingual submit button with request paramete
rs


Why don't you separate the value displayed from the action sent using a
Javascript method:


function submitWithAction(action) {
  document.yourFormName.action.value=action;
}


 (this can be generated with
)

  


  


Your buttons will be multi-language and the value of your hidden "action"
parameter will be a constant that you can reuse (and that is not tied to a
language).

Just my 2 cents...

Andrej
-Original Message-
From: Mark Gordon [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 4:51 PM
To: Struts Users Mailing List
Subject: Re: Problem with multilingual submit button with request
parameters


If you have three submit buttons for the same form only the submit 
button that is pressed will be sent as a parameter... i think.

so you could check for the existence of the parameter to find out what 
button was pressed.  The parameter name will not be localized just the 
value... and who cares what the value is because you only care if it exists.



Christian Rosner wrote:

> Hello struts experts,
> 
> I can't get a submit button to work which uses a  for a
> localized button text _and_ a request parameter at the same time. I have
> browsed the mail archive, but haven't found a solution for this. Maybe one
> of you can tell me the way to achieve my goal:
> 
> A form on my page contains several submit buttons, which trigger different
> actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem
of
> a single action target in a form I did add a request parameter to each
> submit button (as suggested earlier in this mailing list):
> 
>   
> Search
>   
> 
> Because my application has to support different languages (like English
and
> German), I also use the  tag to set the button text
according
> the Locale setting in the session:
> 
>   
> 
>   
> 
> Each of the above code samples works well, like it's described in the
> documentation and as I expected it.
> 
> But if I try to combine both techniques to get a multilingual submit
button
> with a request parameter, like in:
> 
>   
> 
>   
> 
> it does not work: Instead of my desired result - a button with a (german)
> label 'Suchen', which submits a request parameter 'action=search' - I do
get
> a button labeled 'search' (with a lowercase 's'). The 'value' attribute
> seems to be used used twice _with a different meaning_.
> 
> The Struts  taglib guide says under 'Common Form Tag Attributes':
> 
> "value : Value of the label to be used with this element. This value will
> also be submitted as the value of the specified request parameter."
> 
> As far as I understand this sentence, it says that the 'value' attribute
is
> used twice for different purposes: For the label of the button and for the
> request parameter value.
> 
> Have I done something wrong or misunderstood something? Or is this a
slight
> design flaw in the i18n support (using the same attribute twice)? Does
> someone know a solution or workaround for this problem?
> 
> Regards
> 
> Christian Rosner
> Software Architect
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Problem with multilingual submit button with request parameters

2001-11-02 Thread Sobkowski, Andrej

Why don't you separate the value displayed from the action sent using a
Javascript method:


function submitWithAction(action) {
  document.yourFormName.action.value=action;
}


 (this can be generated with
)

  


  


Your buttons will be multi-language and the value of your hidden "action"
parameter will be a constant that you can reuse (and that is not tied to a
language).

Just my 2 cents...

Andrej
-Original Message-
From: Mark Gordon [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 4:51 PM
To: Struts Users Mailing List
Subject: Re: Problem with multilingual submit button with request
parameters


If you have three submit buttons for the same form only the submit 
button that is pressed will be sent as a parameter... i think.

so you could check for the existence of the parameter to find out what 
button was pressed.  The parameter name will not be localized just the 
value... and who cares what the value is because you only care if it exists.



Christian Rosner wrote:

> Hello struts experts,
> 
> I can't get a submit button to work which uses a  for a
> localized button text _and_ a request parameter at the same time. I have
> browsed the mail archive, but haven't found a solution for this. Maybe one
> of you can tell me the way to achieve my goal:
> 
> A form on my page contains several submit buttons, which trigger different
> actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem
of
> a single action target in a form I did add a request parameter to each
> submit button (as suggested earlier in this mailing list):
> 
>   
> Search
>   
> 
> Because my application has to support different languages (like English
and
> German), I also use the  tag to set the button text
according
> the Locale setting in the session:
> 
>   
> 
>   
> 
> Each of the above code samples works well, like it's described in the
> documentation and as I expected it.
> 
> But if I try to combine both techniques to get a multilingual submit
button
> with a request parameter, like in:
> 
>   
> 
>   
> 
> it does not work: Instead of my desired result - a button with a (german)
> label 'Suchen', which submits a request parameter 'action=search' - I do
get
> a button labeled 'search' (with a lowercase 's'). The 'value' attribute
> seems to be used used twice _with a different meaning_.
> 
> The Struts  taglib guide says under 'Common Form Tag Attributes':
> 
> "value : Value of the label to be used with this element. This value will
> also be submitted as the value of the specified request parameter."
> 
> As far as I understand this sentence, it says that the 'value' attribute
is
> used twice for different purposes: For the label of the button and for the
> request parameter value.
> 
> Have I done something wrong or misunderstood something? Or is this a
slight
> design flaw in the i18n support (using the same attribute twice)? Does
> someone know a solution or workaround for this problem?
> 
> Regards
> 
> Christian Rosner
> Software Architect
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 



--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Problem with multilingual submit button with request parameters

2001-11-02 Thread Mark Gordon

If you have three submit buttons for the same form only the submit 
button that is pressed will be sent as a parameter... i think.

so you could check for the existence of the parameter to find out what 
button was pressed.  The parameter name will not be localized just the 
value... and who cares what the value is because you only care if it exists.



Christian Rosner wrote:

> Hello struts experts,
> 
> I can't get a submit button to work which uses a  for a
> localized button text _and_ a request parameter at the same time. I have
> browsed the mail archive, but haven't found a solution for this. Maybe one
> of you can tell me the way to achieve my goal:
> 
> A form on my page contains several submit buttons, which trigger different
> actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of
> a single action target in a form I did add a request parameter to each
> submit button (as suggested earlier in this mailing list):
> 
>   
> Search
>   
> 
> Because my application has to support different languages (like English and
> German), I also use the  tag to set the button text according
> the Locale setting in the session:
> 
>   
> 
>   
> 
> Each of the above code samples works well, like it's described in the
> documentation and as I expected it.
> 
> But if I try to combine both techniques to get a multilingual submit button
> with a request parameter, like in:
> 
>   
> 
>   
> 
> it does not work: Instead of my desired result - a button with a (german)
> label 'Suchen', which submits a request parameter 'action=search' - I do get
> a button labeled 'search' (with a lowercase 's'). The 'value' attribute
> seems to be used used twice _with a different meaning_.
> 
> The Struts  taglib guide says under 'Common Form Tag Attributes':
> 
> "value : Value of the label to be used with this element. This value will
> also be submitted as the value of the specified request parameter."
> 
> As far as I understand this sentence, it says that the 'value' attribute is
> used twice for different purposes: For the label of the button and for the
> request parameter value.
> 
> Have I done something wrong or misunderstood something? Or is this a slight
> design flaw in the i18n support (using the same attribute twice)? Does
> someone know a solution or workaround for this problem?
> 
> Regards
> 
> Christian Rosner
> Software Architect
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




RE:

2001-11-02 Thread Todd Fulton

I finally got it.  Was missing the init-param for the 'action' servlet in
the web.xml file.


application
com.spk.ApplicationResources


Thanks!!



-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:29 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: 


You have validate="true" in your action?  Or in your
Action if you are definitely getting back an
ActionErrors object with messages then you could use
the saveErrors method in the Action class to save it.
Also, do you have errors.header and errors.footer
defined?  There is also an html:messages that tag
iterates through error messages if you are using a
recent nightly build.

David

--- Todd Fulton <[EMAIL PROTECTED]> wrote:
>
> I just can't seem to get the  tag to
> display the errors passed
> through via my ActionForm object's validate()
> method.  I have confirmed that
> the validate() method is working correctly -- as I'm
> getting a forward to
> the input page as configured.  Simply nothing
> appears with:
>
> 
> 
>
> Read all the docs, but just can't figure this one
> out.  What am I missing in
> the struts-config, web.xml or what? Anyone?
>
>
> ToFu
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: Need help

2001-11-02 Thread Ashoka Murthy

Pardon me, I forgot to mention earlier that the  entry is also 
there.

Ashoka Murthy


>From: "Christian Rosner" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Need help
>Date: Fri, 2 Nov 2001 22:13:39 +0100
>
>Hi Ashoka,
>
>your sample struts config file does not define a form bean. Maybe this is
>the reason for your problem.
>
> >  >type="com.tgt.d2g.auth.LogonAction"
> >name="logonForm"
> >input="/jsp/logon.jsp"
> >scope="session">
> >   
> >   
> > 
>
>You should add something like
>
>   
> 
>   
>
>(or whatever name your ActionForm class has) to your file struts-config.xml
>(before to the action definition).
>
>Hope this helps
>
>Christian Rosner
>
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: Problem with multilingual submit button with request parameters

2001-11-02 Thread Justin Piper

The problem is actually with HTML itself.  The value attribute of a submit
button specifies both the button label as well as the value submitted to the
server.

-Original Message-
From: Christian Rosner [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 3:08 PM
To: [EMAIL PROTECTED]
Subject: Problem with multilingual submit button with request parameters


Hello struts experts,

I can't get a submit button to work which uses a  for a
localized button text _and_ a request parameter at the same time. I have
browsed the mail archive, but haven't found a solution for this. Maybe one
of you can tell me the way to achieve my goal:

A form on my page contains several submit buttons, which trigger different
actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of
a single action target in a form I did add a request parameter to each
submit button (as suggested earlier in this mailing list):

  
Search
  

Because my application has to support different languages (like English and
German), I also use the  tag to set the button text according
the Locale setting in the session:

  

  

Each of the above code samples works well, like it's described in the
documentation and as I expected it.

But if I try to combine both techniques to get a multilingual submit button
with a request parameter, like in:

  

  

it does not work: Instead of my desired result - a button with a (german)
label 'Suchen', which submits a request parameter 'action=search' - I do get
a button labeled 'search' (with a lowercase 's'). The 'value' attribute
seems to be used used twice _with a different meaning_.

The Struts  taglib guide says under 'Common Form Tag Attributes':

"value : Value of the label to be used with this element. This value will
also be submitted as the value of the specified request parameter."

As far as I understand this sentence, it says that the 'value' attribute is
used twice for different purposes: For the label of the button and for the
request parameter value.

Have I done something wrong or misunderstood something? Or is this a slight
design flaw in the i18n support (using the same attribute twice)? Does
someone know a solution or workaround for this problem?

Regards

Christian Rosner
Software Architect



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Need help

2001-11-02 Thread Mark Gordon


I think all paths are relative to the root of your application.

I am new to struts... so I may be all wrong but


make the path in your action "/jsp/logon"


  
  



then in your form use "/jsp/logon" as the action






-Mark


Ashoka Murthy wrote:

> Hi,
> 
> I am relatively new to struts..I have a login page on which I fill user 
> name and password and press "login" button. Then it should go to 
> home.jsp instead browser says "Page cannot be displayed". I saw the 
> Tomcat console and error given is "No action instance for path /logon 
> could be created"
> 
> My web.xml looks like :-
> 
>  
>action
>/do/*
>  
> 
> My struts-config.xml looks like :-
> 
>   type="com.tgt.d2g.auth.LogonAction"
>   name="logonForm"
>   input="/jsp/logon.jsp"
>   scope="session">
>  
>  
>
> 
> 
> 
> Could some body guide me through this?
> 
> Thanks in Advance
> Ashoka Murthy
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 



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




Problem with multilingual submit button with request parameters

2001-11-02 Thread Christian Rosner

Hello struts experts,

I can't get a submit button to work which uses a  for a
localized button text _and_ a request parameter at the same time. I have
browsed the mail archive, but haven't found a solution for this. Maybe one
of you can tell me the way to achieve my goal:

A form on my page contains several submit buttons, which trigger different
actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of
a single action target in a form I did add a request parameter to each
submit button (as suggested earlier in this mailing list):

  
Search
  

Because my application has to support different languages (like English and
German), I also use the  tag to set the button text according
the Locale setting in the session:

  

  

Each of the above code samples works well, like it's described in the
documentation and as I expected it.

But if I try to combine both techniques to get a multilingual submit button
with a request parameter, like in:

  

  

it does not work: Instead of my desired result - a button with a (german)
label 'Suchen', which submits a request parameter 'action=search' - I do get
a button labeled 'search' (with a lowercase 's'). The 'value' attribute
seems to be used used twice _with a different meaning_.

The Struts  taglib guide says under 'Common Form Tag Attributes':

"value : Value of the label to be used with this element. This value will
also be submitted as the value of the specified request parameter."

As far as I understand this sentence, it says that the 'value' attribute is
used twice for different purposes: For the label of the button and for the
request parameter value.

Have I done something wrong or misunderstood something? Or is this a slight
design flaw in the i18n support (using the same attribute twice)? Does
someone know a solution or workaround for this problem?

Regards

Christian Rosner
Software Architect



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




Re: Need help

2001-11-02 Thread Christian Rosner

Hi Ashoka,

your sample struts config file does not define a form bean. Maybe this is
the reason for your problem.

> type="com.tgt.d2g.auth.LogonAction"
>name="logonForm"
>input="/jsp/logon.jsp"
>scope="session">
>   
>   
> 

You should add something like

  

  

(or whatever name your ActionForm class has) to your file struts-config.xml
(before to the action definition).

Hope this helps

Christian Rosner



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




Re: How to use Data source in *.jsp

2001-11-02 Thread Mark Gordon


The datasource is an attribute in application scope.  You can use the 
pageContext to get this attribute.

You may be able to do something with a  tag or a 
 tag to expose this attribute... but I could not figure 
it out.

by the way you aren't going to put a business rule in a jsp page 
are you  :-)

I try to keep all my sql in a bean then call methods to enforce business 
rules or pull data to be displayed in a page.

Scriptlets bad, taglibs good :-)

my $.02

-Mark



<%@ page import="javax.sql.DataSource,
 org.apache.struts.action.Action,
 java.sql.Connection,
 java.sql.Statement,
 java.sql.ResultSet" %>

<%

DataSource dataSource = (DataSource) 
 pageContext.getAttribute(Action.DATA_SOURCE_KEY, 
PageContext.APPLICATION_SCOPE);

Connection connection = dataSource.getConnection();

Statement statement = connection.createStatement();

ResultSet resultSet = statement.executeQuery("select bill_grp_code, 
bill_grp_dsc from bill_grp");

/*  DO SOMETHING WITH THE DATA */
   
resultSet.close();
statement.close();
connection.close();

%>





testing



Barry Jia wrote:

>Hi, All
>I read the struts document, I config my data source in struts-config.xml, 
>In my action I can use the following code to get Data source and use it.
>Right now I want to use it in my JSP scriplet, when I use it, it can not be
>compiled as servlet is a undefined variable or class.
>I want to know, in my Action, servlet is in which package ? how to use same
>code in *.jsp file
>Thanks!
>
>DataSource dataSource = (DataSource)
>  servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
>conn = dataSource.getConnection();
>... perform required functions as in the previous example ...
>conn.close();
>



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




RE: Need help

2001-11-02 Thread Justin Piper

Are you submitting your form to /login, or /do/login?  Alternately, are you
using the  tag with the action attribute set to "/login"?

-Original Message-
From: Ashoka Murthy [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 1:41 PM
To: [EMAIL PROTECTED]
Subject: Need help


Hi,

I am relatively new to struts..I have a login page on which I fill user name

and password and press "login" button. Then it should go to home.jsp instead

browser says "Page cannot be displayed". I saw the Tomcat console and error 
given is "No action instance for path /logon could be created"

My web.xml looks like :-

  
action
/do/*
  

My struts-config.xml looks like :-


  
  




Could some body guide me through this?

Thanks in Advance
Ashoka Murthy

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re:

2001-11-02 Thread David Winterfeldt

You have validate="true" in your action?  Or in your
Action if you are definitely getting back an
ActionErrors object with messages then you could use
the saveErrors method in the Action class to save it. 
Also, do you have errors.header and errors.footer
defined?  There is also an html:messages that tag
iterates through error messages if you are using a
recent nightly build.

David

--- Todd Fulton <[EMAIL PROTECTED]> wrote:
> 
> I just can't seem to get the  tag to
> display the errors passed
> through via my ActionForm object's validate()
> method.  I have confirmed that
> the validate() method is working correctly -- as I'm
> getting a forward to
> the input page as configured.  Simply nothing
> appears with:
> 
> 
> 
> 
> Read all the docs, but just can't figure this one
> out.  What am I missing in
> the struts-config, web.xml or what? Anyone?
> 
> 
> ToFu
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: ActionMessage classes

2001-11-02 Thread David Winterfeldt

There isn't a set schedule, but there are goals set. 
Below is a link to the To Do List.  There will be a
Struts 1.1 release when these things are done.
http://jakarta.apache.org/struts/todo-1.1.html

When is the next release coming out?
http://jakarta.apache.org/struts/userGuide/kickstart.html#release

David

--- John Nikolai <[EMAIL PROTECTED]> wrote:
> 
> 
> Hi all,
> 
> This may or may not be the proper place to ask this
> question. Please let me 
> know...
> 
> I noticed that the nightly builds contain new
> ActionMessage classes and 
> taglibs. Any idea when we might see these updates in
> a release build? 
> 
> Thanks much,
>  - John
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




RE: Need help

2001-11-02 Thread Ashoka Murthy


Yes I do :-(



>From: Barry Jia <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: Need help
>Date: Fri, 2 Nov 2001 15:19:42 -0500
>
>did you have this classes in your WEB-INF/classes dir
>?"com.tgt.d2g.auth.LogonAction"
>
>-Original Message-
>From: Ashoka Murthy [mailto:[EMAIL PROTECTED]]
>Sent: Friday, November 02, 2001 2:41 PM
>To: [EMAIL PROTECTED]
>Subject: Need help
>
>
>Hi,
>
>I am relatively new to struts..I have a login page on which I fill user 
>name
>
>and password and press "login" button. Then it should go to home.jsp 
>instead
>
>browser says "Page cannot be displayed". I saw the Tomcat console and error
>given is "No action instance for path /logon could be created"
>
>My web.xml looks like :-
>
>   
> action
> /do/*
>   
>
>My struts-config.xml looks like :-
>
> type="com.tgt.d2g.auth.LogonAction"
>name="logonForm"
>input="/jsp/logon.jsp"
>scope="session">
>   
>   
> 
>
>
>
>Could some body guide me through this?
>
>Thanks in Advance
>Ashoka Murthy
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: Need help

2001-11-02 Thread Barry Jia

did you have this classes in your WEB-INF/classes dir
?"com.tgt.d2g.auth.LogonAction"

-Original Message-
From: Ashoka Murthy [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 2:41 PM
To: [EMAIL PROTECTED]
Subject: Need help


Hi,

I am relatively new to struts..I have a login page on which I fill user name

and password and press "login" button. Then it should go to home.jsp instead

browser says "Page cannot be displayed". I saw the Tomcat console and error 
given is "No action instance for path /logon could be created"

My web.xml looks like :-

  
action
/do/*
  

My struts-config.xml looks like :-


  
  




Could some body guide me through this?

Thanks in Advance
Ashoka Murthy

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:

For additional commands, e-mail:




How to use Data source in *.jsp

2001-11-02 Thread Barry Jia

Hi, All
I read the struts document, I config my data source in struts-config.xml, 
In my action I can use the following code to get Data source and use it.
Right now I want to use it in my JSP scriplet, when I use it, it can not be
compiled as servlet is a undefined variable or class.
I want to know, in my Action, servlet is in which package ? how to use same
code in *.jsp file
Thanks!

DataSource dataSource = (DataSource)
  servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
conn = dataSource.getConnection();
... perform required functions as in the previous example ...
conn.close();



Need help

2001-11-02 Thread Ashoka Murthy

Hi,

I am relatively new to struts..I have a login page on which I fill user name 
and password and press "login" button. Then it should go to home.jsp instead 
browser says "Page cannot be displayed". I saw the Tomcat console and error 
given is "No action instance for path /logon could be created"

My web.xml looks like :-

  
action
/do/*
  

My struts-config.xml looks like :-


  
  




Could some body guide me through this?

Thanks in Advance
Ashoka Murthy

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




Re: Exception: Cannot retrieve mapping for action

2001-11-02 Thread cahana

Try

  


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 8:25 AM
Subject: Exception: Cannot retrieve mapping for action


> Hello,
>
> I have the following Strut-Config file.
>
>   
>   
>
> 
>  type="com.mlsbuyer.logonform"/>
>   
>
>
>
>   
>   
> 
>   
>
>
>   
>   
>
> 
> type="com.mlsbuyer.logonaction"
>name="logonForm"
>   scope="request"
>   input="/WEB-INF/pages/logon.jsp">
> 
> 
> 
>
> My web.xml maps the action to /do/* like below.
>
>   
>   
> action
> /do/*
>   
>
> My pages are all located under the WEB-INF directory to prevent prying
eyes
> from looking at the JSP code.
>
> The main index checks to see if you have logon to the system and if not
> forwards you to the logon page as follows:
>
> 
>   
> 
>
> When the forward is called I keep encountering an exception:
>
> javax.servlet.ServletException: Exception forwarding for name logon:
>
>   javax.servlet.ServletException: Cannot retrieve mapping for
action
> /do/logon
>
> What am I missing here?
>
> Thanks for your assistance.
>
> Regards,
>
> Todd G. Nist
> Email:   [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Chen, Gin

What application server are u using Rob? Cause unless ur doing something
else different. WEB-INF is supposed to be a PRIVATE folder (read the J2EE
specifications) nothing public should be in this folder. Not that it cant
be.. it just takes more coding.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


I apologize if I gave out incorrect information.  I did not realize that you
could place the JSPs in the WEB-INF ... learn something new every day.

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:32 PM
To: Struts Users Mailing List
Subject: RE: Newbe - problem with Struts-Config.xml



You can have your JSPs in the WEB-INF directory - I use that and it works
fine.

Are you using a  in your JSP?

Rob Breeds




|+->
||  "Drozdowski, Terry"|
||   |
|| |
||  02/11/2001 16:57   |
||  Please respond to  |
||  "Struts Users  |
||  Mailing List"  |
|| |
|+->
 
>---
|
  |
|
  |  To: "'Struts Users Mailing List'"
<[EMAIL PROTECTED]>   |
  |  cc:
|
  |  Subject: RE: Newbe - problem with Struts-Config.xml
|
  |
|
  |
|
 
>---
|




what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab & Co.
(602)355-8843

Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I
thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Common User Interface for JSP's

2001-11-02 Thread Bill Willis

http://cvs.apache.org/viewcvs/jakarta-struts/contrib/tiles/

Regards,
Bill

-Original Message-
From: Prengaman.Karen [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 01:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Common User Interface for JSP's


Hi Ted,

I joined the Struts Mailing List yesterday and have already learned some
valuable information.  I have seen Tiles refered to in several different
posts and am wondering where I can find out more information about it (I
couldn't find a Contrib folder, but wasn't sure where to look for it).  If
you or someone else could point me in the right direction, I would
appreciate it.

Thanks,

Karen

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:17 AM
To: Struts Users Mailing List
Subject: Re: Common User Interface for JSP's


The Tiles version (in the Contrib folder) can be integrated with the
Action forwards, eliminating places where another physical file might
otherwise be needed. This uses a XML configuration file, which is very
"Struts-like".

CSS can be used along with JSP templates.

Other than that, I would say a CUI is a CUI, and you could compare each
on its own merits.

What other interface rendering utilities did you have in mind?

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


John Regan wrote:
>
> Can anyone enlighten me on the Pros and Cons of using the Struts template
> taglib as opposed to say CSS or any other common interface rendering
> utility?
>
> Thanks in advance.
>
> JBR

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Siggelkow, Bill

I apologize if I gave out incorrect information.  I did not realize that you
could place the JSPs in the WEB-INF ... learn something new every day.

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:32 PM
To: Struts Users Mailing List
Subject: RE: Newbe - problem with Struts-Config.xml



You can have your JSPs in the WEB-INF directory - I use that and it works
fine.

Are you using a  in your JSP?

Rob Breeds




|+->
||  "Drozdowski, Terry"|
||   |
|| |
||  02/11/2001 16:57   |
||  Please respond to  |
||  "Struts Users  |
||  Mailing List"  |
|| |
|+->
 
>---
|
  |
|
  |  To: "'Struts Users Mailing List'"
<[EMAIL PROTECTED]>   |
  |  cc:
|
  |  Subject: RE: Newbe - problem with Struts-Config.xml
|
  |
|
  |
|
 
>---
|




what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab & Co.
(602)355-8843

Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I
thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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





--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Data source

2001-11-02 Thread Barry Jia

Thanks, Stephen, 
It was my fault, the url I setup is wrong, why I set it to jdbc.odbc:myDb;
it should jdbc:odbc:myDb.
I need more coffee, it is Friday, right ? that is why !

-Original Message-
From: Stephen Owens [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 2:01 PM
To: Struts Users Mailing List
Subject: RE: Data source


Barry,

This can happen if your data source is improperly configured. The Action
mappings aren't processed due to an error while trying to access the
datasource. My most frequent cause has been a misconfigured JDBC URL, or
a missing JDBC driver.

regards,

Stephen Owens
Corner Software

-Original Message-
From: Barry Jia [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:41 PM
To: '[EMAIL PROTECTED]'
Subject: Data source


Hi, All, 
I set up a data source in my struts-config.xml like this:

 
  
when I start my Tomcat and try to access jsp under my web app, there are
exceptions.
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImp
l.java:459)
at
_0002flogon_0002ejsplogon_jsp_1._jspService(_0002flogon_0002ejsplogon_js
p_1.
java:317)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServle
t.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50
1)
at java.lang.Thread.run(Thread.java:484

Any body knows why ?

--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: Common User Interface for JSP's

2001-11-02 Thread Prengaman.Karen

Hi Ted,

I joined the Struts Mailing List yesterday and have already learned some
valuable information.  I have seen Tiles refered to in several different
posts and am wondering where I can find out more information about it (I
couldn't find a Contrib folder, but wasn't sure where to look for it).  If
you or someone else could point me in the right direction, I would
appreciate it.

Thanks,

Karen

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:17 AM
To: Struts Users Mailing List
Subject: Re: Common User Interface for JSP's


The Tiles version (in the Contrib folder) can be integrated with the
Action forwards, eliminating places where another physical file might
otherwise be needed. This uses a XML configuration file, which is very
"Struts-like".

CSS can be used along with JSP templates. 

Other than that, I would say a CUI is a CUI, and you could compare each
on its own merits.

What other interface rendering utilities did you have in mind?

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


John Regan wrote:
> 
> Can anyone enlighten me on the Pros and Cons of using the Struts template
> taglib as opposed to say CSS or any other common interface rendering
> utility?
> 
> Thanks in advance.
> 
> JBR

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Silverstream, struts and UTF-8 Encoding

2001-11-02 Thread rmcsporran

I am having some problems with a struts based application in that the
browser does not seem to change to UTF-8 encoding and as a result, i am
losing some characters. I have read quite a few postings regarding i18n
including this excerpt:

1) Specify the content type for the JSP output:

<%@ page contentType="text/html; charset=utf-8" %>

You can also do this by setting the content type header manually, using
response.setContentType().

2) Specify the content type to the browser:



3) Specify the default content type to the container. In our case, we are
using Resin, and so do this:




I have changed the jsp for the first 2 but the browser still doesn't
recognise that it is meant to be UTF-8. Has anyone any experience of this
or know how to resolve it? I have been unable to do the last step in the
web xml as i dont know what the context-param name would be for
silverstream - does anyone know?
I think the web.xml should look something like:



weblogic.httpd.inputCharset./*
UTF-8

...


but with a different param-name.

Any clues as to why UTF-8 isn't working would be appreciated.

Russell


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




RE: Data source

2001-11-02 Thread Stephen Owens

Barry,

This can happen if your data source is improperly configured. The Action
mappings aren't processed due to an error while trying to access the
datasource. My most frequent cause has been a misconfigured JDBC URL, or
a missing JDBC driver.

regards,

Stephen Owens
Corner Software

-Original Message-
From: Barry Jia [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:41 PM
To: '[EMAIL PROTECTED]'
Subject: Data source


Hi, All, 
I set up a data source in my struts-config.xml like this:

 
  
when I start my Tomcat and try to access jsp under my web app, there are
exceptions.
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImp
l.java:459)
at
_0002flogon_0002ejsplogon_jsp_1._jspService(_0002flogon_0002ejsplogon_js
p_1.
java:317)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServle
t.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50
1)
at java.lang.Thread.run(Thread.java:484

Any body knows why ?

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




ActionMessage classes

2001-11-02 Thread John Nikolai



Hi all,

This may or may not be the proper place to ask this question. Please let me 
know...

I noticed that the nightly builds contain new ActionMessage classes and 
taglibs. Any idea when we might see these updates in a release build? 

Thanks much,
 - John

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




RE: Exception: Cannot retrieve mapping for action

2001-11-02 Thread tnist

Thank you, I realize that the *.do will work, I had it that way initially.
However, I was reviewing the "Artimus" example by Ted Husted and liked how
he had the URL mapping setup and the struts-conf.xml file so I thought I
would give it a try.  But so far, it has not worked at all in my
application, but works just fine in the example and I can not see where the
difference is at.

Again, thanks for the reply.

Regards,

Todd

-Original Message-
From: Chilakala, Laxminarsimha [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:32 PM
To: 'Struts Users Mailing List'
Subject: RE: Exception: Cannot retrieve mapping for action


try using 




action
/*.do
  


instead of


action
/do/*
  

LN

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: Exception: Cannot retrieve mapping for action


Hello,

I have the following Strut-Config file.

  
  



  



  
  

  


  
  







My web.xml maps the action to /do/* like below.

  
  
action
/do/*
  

My pages are all located under the WEB-INF directory to prevent prying eyes
from looking at the JSP code.

The main index checks to see if you have logon to the system and if not
forwards you to the logon page as follows:


  


When the forward is called I keep encountering an exception:

javax.servlet.ServletException: Exception forwarding for name logon:

  javax.servlet.ServletException: Cannot retrieve mapping for action
/do/logon

What am I missing here?  

Thanks for your assistance.

Regards,

Todd G. Nist 
Email:   [EMAIL PROTECTED] 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Data source

2001-11-02 Thread Barry Jia

Hi, All, 
I set up a data source in my struts-config.xml like this:

 
  
when I start my Tomcat and try to access jsp under my web app, there are
exceptions.
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002flogon_0002ejsplogon_jsp_1._jspService(_0002flogon_0002ejsplogon_jsp_1.
java:317)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484

Any body knows why ?



RE: Exception: Cannot retrieve mapping for action

2001-11-02 Thread Chilakala, Laxminarsimha

try using 




action
/*.do
  


instead of


action
/do/*
  

LN

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: Exception: Cannot retrieve mapping for action


Hello,

I have the following Strut-Config file.

  
  



  



  
  

  


  
  







My web.xml maps the action to /do/* like below.

  
  
action
/do/*
  

My pages are all located under the WEB-INF directory to prevent prying eyes
from looking at the JSP code.

The main index checks to see if you have logon to the system and if not
forwards you to the logon page as follows:


  


When the forward is called I keep encountering an exception:

javax.servlet.ServletException: Exception forwarding for name logon:

  javax.servlet.ServletException: Cannot retrieve mapping for action
/do/logon

What am I missing here?  

Thanks for your assistance.

Regards,

Todd G. Nist 
Email:   [EMAIL PROTECTED] 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Exception: Cannot retrieve mapping for action

2001-11-02 Thread tnist

Hello,

I have the following Strut-Config file.

  
  



  



  
  

  


  
  







My web.xml maps the action to /do/* like below.

  
  
action
/do/*
  

My pages are all located under the WEB-INF directory to prevent prying eyes
from looking at the JSP code.

The main index checks to see if you have logon to the system and if not
forwards you to the logon page as follows:


  


When the forward is called I keep encountering an exception:

javax.servlet.ServletException: Exception forwarding for name logon:

  javax.servlet.ServletException: Cannot retrieve mapping for action
/do/logon

What am I missing here?  

Thanks for your assistance.

Regards,

Todd G. Nist 
Email:   [EMAIL PROTECTED] 

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




Re: action forward tag...

2001-11-02 Thread John Nikolai


Thanks for your reply Sandeep,

We are already using struts templates to render the pages. So we have 
something like the following:

template.jsp
 - Contains all navigation
 - Gets the content page

content.jsp
 - Inserts into template.jsp
 - Puts several items (title, image, etc...) into template.jsp

So, as you pointed out, we display the page with the following URL:
  http://localhost/dynamic/content.jsp

The problem is when the content contains a struts form element and the form 
is successfully submited. We need the "success" page to render at the same 
navigation level. So when an ActionFroward object is returned from the 
process() method, we want the url to look like this, again:

  http://localhost/dynamic/content.jsp

BUT, instead of seeing the form, we want to only see a "success" message. 
This is required due to the way our dynamic navigation works.

Does it make sense to have another taglib added to the struts html taglib? It 
would be very similar to the  tag but it would show a 
successfull message instead -- . So this would add another 
couple of classes to struts: ActionSuccess and ActionSuccesses to be 
consistent with the ActionError classes. Perhapes there can be some logic 
tags used as well to remove the form elements so that we only display the 
successfully submited message without the form.

Or this all may be possible with the existing classes and taglibs. 
Any other thoughts or suggestions?

Thanks again for your help,
  - John



On Friday 02 November 2001 07:04 am, you wrote:
> If you are not using framesets - I would suggest
> looking at using tiles or templates.  These allow you
> to include header,footer,menu,body type layouts within
> the jsp -- here you would just reference the jsp file.
>
> sandeep
>
> --- John Nikolai <[EMAIL PROTECTED]> wrote:
> > Hello all!
> >
> > I have an action-mapping with one action element.
> > This action element defines
> > an input attribute used for when an error occurs in
> > the form. I was
> > wondering if it is possible for the action elements
> > forward element can do
> > the same thing as the input attribute?
> >
> > Let me explain:
> >
> > We have a navigation system in place and the
> > navigation is dependent on where
> > the user is located in the web directory hierarchy.
> >
> > http://localhost/dynamic/form.htm
> >  - Contains  and form elements
> >  - The navigation is properly created, highlighting
> > "form" in the left hand
> > navigation
> >
> > When a user submits the form and an error occurs the
> > URL changes to the
> > following:
> >
> > http://localhost/dynamic/formHandler.do 
> >
> > The errors are reported and the form.HTML file is
> > redisplayed. The important
> > thing here is that the navigation remains the same.
> > That is to say that
> > "form" is still highlighted in the left hand
> > navigation...
> >
> > Now when the form is successfully filled out I want
> > to display a "success"
> > page BUT keep the left hand navigation intact with
> > "form" highlighted. I do
> > not want to redisplay the form again, rather just
> > show some simple text
> > saying the form was successfully submitted. I have
> > tried messing around with
> > the forward element, setting the redirect attribute
> > to true/false, as
> > well as changing the path too.
> >
> > - I set the path to /dynamic/form.htm but then the
> > form is redisplayed.
> >
> > - I set the path to /dynamic/success.htm but then
> > the navigation will not
> > display properly.
> >
> > - I set the redirect to "false" but that did not
> > work either...
> >
> > Is it possible to have the success page be rendered
> > like the error page,
> > minus the form fields?
> >
> > Thanks for your help,
> >  - John
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
> __
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com


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




RE: Common User Interface for JSP's

2001-11-02 Thread John Regan

thank you for the quick response Ted.  it's quite obvious that you are the
man.  I will look @ Tiles.  I didn't have any other interface rendering
utilities in mind, I was just looking for suggestions.  thanks again.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:17 AM
To: Struts Users Mailing List
Subject: Re: Common User Interface for JSP's


The Tiles version (in the Contrib folder) can be integrated with the
Action forwards, eliminating places where another physical file might
otherwise be needed. This uses a XML configuration file, which is very
"Struts-like".

CSS can be used along with JSP templates. 

Other than that, I would say a CUI is a CUI, and you could compare each
on its own merits.

What other interface rendering utilities did you have in mind?

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


John Regan wrote:
> 
> Can anyone enlighten me on the Pros and Cons of using the Struts template
> taglib as opposed to say CSS or any other common interface rendering
> utility?
> 
> Thanks in advance.
> 
> JBR

--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: How to use the radio tag inside logic:iterate tag

2001-11-02 Thread dhay



See if this helps...

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16684.html

Cheers,

Dave





"Alvin Kutttikkat Antony"
<[EMAIL PROTECTED]> on 11/02/2001 12:33:27
PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "<" <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to use the radio tag inside logic:iterate tag






I have a collection called workrelationships .I have to use radio buttons to
select the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980



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








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


javax.servlet.ServletException: BeanUtils.populate

2001-11-02 Thread Sudha

Hello.


I get the following error


2001-11-02 18:34:42,855 533668 [Thread-4] ERROR
(gui.framework.ExceptionHandler)  - Handling exception
javax.servlet.ServletException with template error.htm
2001-11-02 18:34:42,855 533668 [Thread-4] ERROR
(gui.framework.ExceptionHandler)  - Exception-Message: BeanUtils.populate
2001-11-02 18:34:42,865 533678 [Thread-4] ERROR
(gui.framework.ExceptionHandler)  - Stacktrace:
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:486)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:19
10)
at
de.einsurance.gui.framework.ExtendedActionServlet.processPopulate(ExtendedAc
tionServlet.java:79)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521)
at
de.einsurance.gui.framework.ExtendedActionServlet.process(ExtendedActionServ
let.java:51)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:432)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
5)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:161)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:517)
at java.lang.Thread.run(Thread.java:484)

when I use the below entry in struts-config.xml file.






Could anyone of u can help me out?

Best Regards

Sudha


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




How to use the radio tag inside logic:iterate tag

2001-11-02 Thread Alvin Kutttikkat Antony

I have a collection called workrelationships .I have to use radio buttons to select 
the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin 


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980



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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Rob Breeds


You can have your JSPs in the WEB-INF directory - I use that and it works
fine.

Are you using a  in your JSP?

Rob Breeds




|+->
||  "Drozdowski, Terry"|
||   |
|| |
||  02/11/2001 16:57   |
||  Please respond to  |
||  "Struts Users  |
||  Mailing List"  |
|| |
|+->
  
>---|
  |
   |
  |  To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
   |
  |  cc:   
   |
  |  Subject: RE: Newbe - problem with Struts-Config.xml   
   |
  |
   |
  |
   |
  
>---|




what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab & Co.
(602)355-8843

Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I
thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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





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




Re: Newbie: Iterate tag : Object properties not updated to form bean from JSP

2001-11-02 Thread dhay



Rajoy,

Please read the archives of this list before posting questions.  This problem
has been addressed many times.

To summarise again, to update in an iteration, the names of the form elements
must have the index included eg. name="parameter[0].value".  Struts will then
use this to make the following call to populate the form bean:
FormBean.getParameter(0).setValue(value).  In order for this to work, you must
have a Parameter getParameter(int index) getter in your form bean, and
appropriate get/setters in your parameter object.  Various previous messages
provide more details, and there is an example I posted at
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html.

Cheers,

Dave




"Rajoy" <[EMAIL PROTECTED]> on 09/03/2001 07:22:39 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "Struts Users Mailing List"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: Newbie: Iterate tag : Object properties  not updated to form bean
  from JSP



Hi again ..
I am quite new to struts  .. hope someone will take time to go through my
query which I am reposting  ( if not I am gonna come back with a more catchy
subject line !! ;-) )

Thankx in advance (again)
Rajoy

HI all
I've encountered a situation as follows

1. I have a 'UserInfoContainer'  form bean which contains a Vector of
individual 'UserInfo' objects.
2. Each UserInfo object is iterated through using the 'iterate' tag in the
JSP.
3. Some 'UserInfo'  data (say 'NickName' ) is displayed in a text box so
that the user can modify it.

Every thing is going fine till now. The trouble is once I submit the form
and retrieve the 'NickName' from each UserInfo object in the
UserInfoContainer object passed to the perform method , it doesn't reflect
the modifications user entered in the text box. Basicaly the data entered by
the user isn't set back to each UserInfo object by the Action servlet.

I've read in the struts docs that the iterate tag copies each object in the
collection ( in my case the userinfo veactor) to a page scope bean
referenced by the value of 'index' attribute. So I guess the values in the
text boxes inside the iterate tag never gets set to the original objects in
the FormBean.

A. Is my understanding correct ?
B. Am I doing somethimng wrong here ?
C. Is there any way to tackle this problem?

I am at present using lots of request.getParameter methods to get the values
edited by the user. But it really does increaase dependency between the JSP
pages and  the action classes. SO I wonder whether that is the correct way
to go even ...

FYI : 'UserInfoContainer' is a session scope formbean.
Thankx in advance
Rajoy

- Original Message -
From: "Rajoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 03, 2001 7:58 PM
Subject: Newbie: Iterate tag : Object properties not updated to form bean
from JSP


HI all
I've encountered a situation as follows

1. I have a 'UserInfoContainer'  form bean which contains a Vector of
individual 'UserInfo' objects.
2. Each UserInfo object is iterated through using the 'iterate' tag in the
JSP.
3. Some 'UserInfo'  data (say 'NickName' ) is displayed in a text box so
that the user can modify it.

Every thing is going fine till now. The trouble is when I retrieve the
'NickName' from each UserInfo object in the UserInfoContainer object passed
to the perform method , it doesn't reflect the modifications user entered in
the text box. Basicaly the data entered by the user isn't set back to each
UserInfo object.

I've read in the struts docs that the iterate tag copies each object in the
collection ( in my case the userinfo veactor) to a page scope bean
referenced by the value of 'index' attribute. So I guess the values in the
text boxes inside the iterate tag never gets set to the original objects in
the FormBean.
A. Is my understanding correct ?
B. Am I doing somethimng wrong here ?
C. Is there any way to tackle this problem?

I am at present using lots of request.getParameter methods to get the values
edited by the user. But it really does increaase dependency between the JSP
pages and  the action classes. SO I wonder whether that is the correct way
to go even ...

FYI : 'UserInfoContainer' is a session scope formbean.
Thankx in advance
Rajoy



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








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




Re: Common User Interface for JSP's

2001-11-02 Thread Ted Husted

The Tiles version (in the Contrib folder) can be integrated with the
Action forwards, eliminating places where another physical file might
otherwise be needed. This uses a XML configuration file, which is very
"Struts-like".

CSS can be used along with JSP templates. 

Other than that, I would say a CUI is a CUI, and you could compare each
on its own merits.

What other interface rendering utilities did you have in mind?

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


John Regan wrote:
> 
> Can anyone enlighten me on the Pros and Cons of using the Struts template
> taglib as opposed to say CSS or any other common interface rendering
> utility?
> 
> Thanks in advance.
> 
> JBR

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




RE:

2001-11-02 Thread Todd Fulton

I have the following:

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



-Original Message-
From: Sandeep Takhar [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 6:20 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: 


Have you defined the tag library in the jsp?
--- Todd Fulton <[EMAIL PROTECTED]> wrote:
>
> I just can't seem to get the  tag to
> display the errors passed
> through via my ActionForm object's validate()
> method.  I have confirmed that
> the validate() method is working correctly -- as I'm
> getting a forward to
> the input page as configured.  Simply nothing
> appears with:
>
> 
> 
>
> Read all the docs, but just can't figure this one
> out.  What am I missing in
> the struts-config, web.xml or what? Anyone?
>
>
> ToFu
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE:

2001-11-02 Thread Todd Fulton

Yes, I have in my Action subclass.  But, I'm doing the validation in the
ActionForm subclass -- via the validate() method which returns the populated
ActionErrors object (i checked that it is indeed populated) to the
ActionServlet.




-Original Message-
From: Tom Servo [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 7:09 AM
To: [EMAIL PROTECTED]
Subject: Re: 


And have you done a

saveErrors(request, errors);

in your action (or wherever the validation is occuring)?


--
Posted via jApache.org


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: I can't find taglib "logic:empty" nor "logic:notEmpty"

2001-11-02 Thread Minh Tran

Arnaud,

they are in the nightly builds  my assumption is that you are using the
1.0 release..

Good Luck,
Minh Tran

-Original Message-
From: Arnaud Chiaberge [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 7:02 AM
To: [EMAIL PROTECTED]
Subject: I can't find taglib "logic:empty" nor "logic:notEmpty"


Hi all,

On the "http://jakarta.apache.org/struts/struts-logic.html"; site page, two
very interresting tags are presented : 'empty' and 'notEmpty'.

I have downloaded struts v1.0, but I just can't find them neither the
declaration in the "struts-logic.tld" file, nor the corresponding .class
files in "struts.jar".

Where are they ?

I absolutely need them ;-)

Thanks in advance,

Arnaud Chiaberge


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Common User Interface for JSP's

2001-11-02 Thread John Regan

Can anyone enlighten me on the Pros and Cons of using the Struts template
taglib as opposed to say CSS or any other common interface rendering
utility?

Thanks in advance.

JBR



How to use the radio tag inside logic:iterate tag

2001-11-02 Thread Alvin Kutttikkat Antony

I have a collection called workrelationships .I have to use radio buttons to select 
the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin 


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980




BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:Alvin Kutttikkat Antony
EMAIL;WORK;PREF;NGW:aantony.RFE-MAIN.RFE
N:Antony;Alvin Kutttikkat
X-GWUSERID:aantony
END:VCARD




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


Re:

2001-11-02 Thread Tom Servo

And have you done a 

saveErrors(request, errors);

in your action (or wherever the validation is occuring)?


--
Posted via jApache.org


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




RE: Setter method doesn't work with indexed tag

2001-11-02 Thread dhay



Hi again,

Took another look at your code - wondering why there are no setter/getters in
your Parameter.java?!!  Did I miss something?

You obviously need these for the set to work.  You still haven't posted your jsp
page to show what you are doing there, but if you have something like this:

  

 

this will be translated by struts into a call
ParametersForm.getParameter(0).setValue(value).  So for *each* parameter
attribute you use on the page, you must have an appropriate getter/setter.

Cheers,

Dave





"L. Yeung" <[EMAIL PROTECTED]> on 11/01/2001 09:52:46
PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: Setter method doesn't work with indexed tag



I use log4j for debugging purposes. My PO number and
other po header info do contain edited values, except
for the po details (a vector of param) which turned
out null even though there are values retrieved from
the database. I've been debugging this for about 2
days. I'm currently using request.getParameter() as a
temporary workaround.

Regards,
L. yeung
--- [EMAIL PROTECTED] wrote:
>
>
> Hi.  You didn't attach your jsp!
>
> How far have you got debugging it?  What shows up in
> the log?  What about in the
> request?
>
> Dave
>
>
>
>
>
> "L. Yeung"
> <[EMAIL PROTECTED]> on
> 10/30/2001 09:40:42
> PM
>
> Please respond to "Struts Users Mailing List"
>
>
<[EMAIL PROTECTED]>
>
> To:   Struts Users Mailing List
>
>
<[EMAIL PROTECTED]>
> cc:(bcc: David Hay/Lex/Lexmark)
> Subject:  RE: Setter method doesn't work with
> indexed tag
>
>
>
> I jsut attached my code below.
>
> Regards,
> L. Yeung
> --- [EMAIL PROTECTED] wrote:
> >
> >
> > Hi,
> >
> > Can you maybe post some more code?
> >
> > It should work fine.  Usually it turns out to be a
> > tiny mistake somewhere.  Have
> > you debugged it at all?  What is getting added to
> > the request?  Are you using
> > your own code, or the example I posted?
> >
> > Cheers,
> >
> > Dave
> >
> >
> >
> >
> >
> > "L. Yeung"
> > <[EMAIL PROTECTED]> on
> > 10/29/2001 10:55:58
> > PM
> >
> > Please respond to "Struts Users Mailing List"
> >
> >
>
<[EMAIL PROTECTED]>
> >
> > To:   Struts Users Mailing List
> >
> >
>
<[EMAIL PROTECTED]>
> > cc:(bcc: David Hay/Lex/Lexmark)
> > Subject:  RE: Setter method doesn't work with
> > indexed tag
> >
> >
> >
> > Still not working. Got any workaround for this?
> >
> > Regards,
> > L. Yeung
> >
> > --- "L. Yeung" <[EMAIL PROTECTED]> wrote:
> > > David, Yea I changed my struts-config from
> request
> > > to
> > > session . Still didn't work.
> > >
> > > Jason, I'm designing a web app for next january
> > > production release.
> > >
> > > --- Jason Chaffee <[EMAIL PROTECTED]>
> wrote:
> > > > Actually, I just filed a bug on this agains
> > > > BeanUtils.  There is a bug
> > > > when the indexed propery you are trying to set
> > is
> > > of
> > > > the type Array.
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, October 29, 2001 10:53 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setter method doesn't work with
> > > indexed
> > > > tag
> > > >
> > > >
> > > >
> > > >
> > > > Hi.  Have you checked what scope your form
> bean
> > is
> > > > in?  Try changing it
> > > > to
> > > > session and see if that helps...
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "L. Yeung"
> > > > <[EMAIL PROTECTED]>
> on
> > > > 10/29/2001
> > > > 05:48:38
> > > > AM
> > > >
> > > > Please respond to "Struts Users Mailing List"
> > > >
> > > >
> > >
> >
>
<[EMAIL PROTECTED]>
> > > >
> > > > To:   Struts Users Mailing List
> > > >
> > > >
> > >
> >
>
<[EMAIL PROTECTED]>
> > > > cc:(bcc: David Hay/Lex/Lexmark)
> > > > Subject:  Setter method doesn't work with
> > indexed
> > > > tag
> > > >
> > > >
> > > >
> > > > I've downloaded the sample from the achive and
> > > read
> > > > the posts on "setter methods and indexed tag"
> > but
> > > > find
> > > > it vague. I followed the sample and the getter
> > > > methods
> > > > works fine except the setter methods. I am
> > > expecting
> > > > the vector to contain values from the form but
> I
> > > got
> > > > null values instead.
> > > >
> > > > public final class EditPOForm extends
> ActionForm
> > {
> > > > ..
> > > >public void setParameterList(Vector col) {
> > > >  this.parameterList = col;
> > > >}
> > > >
> > > > public Vector getParameterList() {
> > > >  return parameterList;
> > > > }
> > > >
> > > > public Parameter getParameter(int index) {
> > > >  return
> > > >
> > > > (Parameter)parameterList.elementAt(index);
> > > > }
> > > > }
> > > >
> > > > Thanks in advance.
> > > > L. Yeung
> > > >
> > > >
> > __
> > > > Do You Yahoo!?
> > > > Make a great connection at Yahoo! Perso

RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Drozdowski, Terry

what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab & Co.
(602)355-8843
 
Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist 
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Tiles/Orion(Oracle)

2001-11-02 Thread Cedric Dumoulin


  It is now ok : Tiles run with Orion in both mode (development and production).
  Otavio, can you tell us if it also works on Oracle's flavor of Orion (I thing yes, 
but want to be sure).
  I have try it with Orion 1.5.3.

Cedric

"Otavio C. Decio" wrote:

> Hi all,
>
> Did anybody successfully installed an ran Tiles on Oracle's flavor of Orion? We have 
>a new project starting, I wanted to use Tiles but so far I couldn't solve a problem 
>with the submenu. If someone got it running, would you please tell me which platform 
>and version are you using.
>
> Thanks!!
>
> Otavio


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




RE: MessageResources bean - application scope

2001-11-02 Thread Scott Watson

You can also look at 

http://www.onjava.com/lpt/a//onjava/2001/10/31/struts2.html

The fifth and sixth page to be precise.  It talks about exactly what you are looking 
for.

HTH
Scott.

-Original Message-
From: Justin Piper [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 11:42 AM
To: 'Struts Users Mailing List'
Subject: RE: MessageResources bean - application scope


Take a look at the section on internationalization in the User's Guide,
http://jakarta.apache.org/struts/userGuide/building_view.html#i18n

-Original Message-
From: Todd Fulton [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 10:38 AM
To: Struts Users Mailing List (E-mail)
Subject: MessageResources bean - application scope



Can anyone interpret this for me?  I'm really at a roadblock here:

Re the  tag . . .

" In order to use this tag successfully, you must have defined an
application scope MessageResources bean under the default attribute name,
with at least the following message keys:
errors.header - Text that will be rendered before the error messages
list.
Typically, this message text will end with  to start the error messages
list. . . ."

Where do I define this?  Any examples?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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


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




RE: MessageResources bean - application scope

2001-11-02 Thread Justin Piper

Take a look at the section on internationalization in the User's Guide,
http://jakarta.apache.org/struts/userGuide/building_view.html#i18n

-Original Message-
From: Todd Fulton [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 10:38 AM
To: Struts Users Mailing List (E-mail)
Subject: MessageResources bean - application scope



Can anyone interpret this for me?  I'm really at a roadblock here:

Re the  tag . . .

" In order to use this tag successfully, you must have defined an
application scope MessageResources bean under the default attribute name,
with at least the following message keys:
errors.header - Text that will be rendered before the error messages
list.
Typically, this message text will end with  to start the error messages
list. . . ."

Where do I define this?  Any examples?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Siggelkow, Bill

Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist 
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




MessageResources bean - application scope

2001-11-02 Thread Todd Fulton


Can anyone interpret this for me?  I'm really at a roadblock here:

Re the  tag . . .

" In order to use this tag successfully, you must have defined an
application scope MessageResources bean under the default attribute name,
with at least the following message keys:
errors.header - Text that will be rendered before the error messages list.
Typically, this message text will end with  to start the error messages
list. . . ."

Where do I define this?  Any examples?


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




Re: Check Box,Radio button (Urgent)

2001-11-02 Thread Jens Kühnberger

When you call a page for the first time and you want some values in 
checkboxes or radiobuttons preselected,
just initialise the form bean with the values you want to preselect.

Jens

Ted Husted wrote:

>It's hard to say without seeing your code. They should automatically
>select the current value.
>
>
>-- Ted Husted, Husted dot Com, Fairport NY USA.
>-- Custom Software ~ Technical Services.
>-- Tel +1 716 737-3463
>-- http://www.husted.com/struts/
>
>yogesh borse wrote:
>
>>Hi All,
>>
>>I'm populating a FormBean from action class so that I can open the
>>form(jsp)in edit mode with all values for updating purpose but the
>>problem is, I'm having checkbox or radio button, It's not showing me
>>selected radio or checked chech box if it is checked or selected before.
>>Can any one please tell me the solution for this problem.It's urgent.
>>
>>Regards
>>Yogesh
>>
>>_
>>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




Re: Newbie: Iterate tag : Object properties not updated to form bean from JSP

2001-11-02 Thread Rajoy

Hi again ..
I am quite new to struts  .. hope someone will take time to go through my
query which I am reposting  ( if not I am gonna come back with a more catchy
subject line !! ;-) )

Thankx in advance (again)
Rajoy

HI all
I've encountered a situation as follows

1. I have a 'UserInfoContainer'  form bean which contains a Vector of
individual 'UserInfo' objects.
2. Each UserInfo object is iterated through using the 'iterate' tag in the
JSP.
3. Some 'UserInfo'  data (say 'NickName' ) is displayed in a text box so
that the user can modify it.

Every thing is going fine till now. The trouble is once I submit the form
and retrieve the 'NickName' from each UserInfo object in the
UserInfoContainer object passed to the perform method , it doesn't reflect
the modifications user entered in the text box. Basicaly the data entered by
the user isn't set back to each UserInfo object by the Action servlet.

I've read in the struts docs that the iterate tag copies each object in the
collection ( in my case the userinfo veactor) to a page scope bean
referenced by the value of 'index' attribute. So I guess the values in the
text boxes inside the iterate tag never gets set to the original objects in
the FormBean.

A. Is my understanding correct ?
B. Am I doing somethimng wrong here ?
C. Is there any way to tackle this problem?

I am at present using lots of request.getParameter methods to get the values
edited by the user. But it really does increaase dependency between the JSP
pages and  the action classes. SO I wonder whether that is the correct way
to go even ...

FYI : 'UserInfoContainer' is a session scope formbean.
Thankx in advance
Rajoy

- Original Message -
From: "Rajoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 03, 2001 7:58 PM
Subject: Newbie: Iterate tag : Object properties not updated to form bean
from JSP


HI all
I've encountered a situation as follows

1. I have a 'UserInfoContainer'  form bean which contains a Vector of
individual 'UserInfo' objects.
2. Each UserInfo object is iterated through using the 'iterate' tag in the
JSP.
3. Some 'UserInfo'  data (say 'NickName' ) is displayed in a text box so
that the user can modify it.

Every thing is going fine till now. The trouble is when I retrieve the
'NickName' from each UserInfo object in the UserInfoContainer object passed
to the perform method , it doesn't reflect the modifications user entered in
the text box. Basicaly the data entered by the user isn't set back to each
UserInfo object.

I've read in the struts docs that the iterate tag copies each object in the
collection ( in my case the userinfo veactor) to a page scope bean
referenced by the value of 'index' attribute. So I guess the values in the
text boxes inside the iterate tag never gets set to the original objects in
the FormBean.
A. Is my understanding correct ?
B. Am I doing somethimng wrong here ?
C. Is there any way to tackle this problem?

I am at present using lots of request.getParameter methods to get the values
edited by the user. But it really does increaase dependency between the JSP
pages and  the action classes. SO I wonder whether that is the correct way
to go even ...

FYI : 'UserInfoContainer' is a session scope formbean.
Thankx in advance
Rajoy



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




RE: Force login...

2001-11-02 Thread Sobkowski, Andrej

Hello All,

by using a JSP tag to check if the user is logged, aren't you mixing somehow
logic and presentation? In theory, you should provide a way that is
independent of the fact that you store your user in the session (though
Struts does it that way). Furthermore, you may need to not only check if the
user is logged, but also if he/she has specific permissions/roles...

My suggestion would be similar to Peter's:
- subclass the Action class with your own with a checkLogon() method that
throws an exception if the user is not logged (the extension would be
defining a checkAuthorization(auth))
- at the beginning at the main command method of each _Action_ that requires
the user to be logged id, do something like

  public ActionForward perform(...) {
try {
  checkLogon();

// Add here business logic if user is logged in
...

} catch (UserNotLoggedException e) {
// React to user not logged (or not authorized)
// Probably forward to login page...
}   
  }

What do you think?

Andrej

-Original Message-
From: Peter Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 11:11 AM
To: Struts Users Mailing List
Subject: Re: Force login...




To do it properly you have to:

(1) Write a abstract base class, say `SecureActionBase' that provide
security methods
"checkLogon()". Write a default implementation of `checkLogin' that
subclasser can
override. If no user is not longer return an action mapping forward that
redirects
to the "login". Otherwise let the user continue.

(2) Borrow the `CheckLoginTag' from the Struts example and use it as it is,
or modify it.
You put the checklogin tag at the beginning of your JSPs.

(3) Extend the Struts ActionServlet with a custom class for your project
that will enable you
to look for instances of `SecureActionBase' and then call the security
methods.
Like so:

   protected ActionForward processActionPerform(Action action,
 ActionMapping mapping,
 ActionForm formInstance,
 HttpServletRequest request,
 HttpServletResponse
response)
throws IOException, ServletException
{
 

if ( action instanceof SecureBaseAction ) {
SecureBaseAction baseAction = (SecureBaseAction)action;
 ...

if ( baseAction.isSecureAction() ) { // This action needs
security
 
ActionForward fwd = baseAction.checkUserSecurityAccess(
context, mapping, request );
if ( fwd != null ) {
// Redirect to login screen or other warning page
return fwd;
}
 // Otherwise we are authenticated, continue
}
 ... // pre-process checking U desire

ActionForward forward = action.perform(mapping, formInstance,
request, response);

 ... // post -process checking U desire
return forward;
}


--
Peter Pilgrim ++44 (0)207-545-9923
  //_\\
"Mathematics is essentially the study of islands of  ===
disparate subjects in a sea of ignorance."   || ! ||
Andrew Wiles _


 Message History



From: "Scott Watson" <[EMAIL PROTECTED]> on 02/11/2001 10:44 EST


My appologies for asking something that has probablly been asked and
answered before, however, I wasn't able to find the answer in
my searches.

How do you force someone to login before being allowed to access your
application.  It doesn't seem right to code this in each
action class.

Is it possible to search the archives for this list like the SERVLET and the
JSP lists?

Thanks
Scott.



--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Digester content with elements

2001-11-02 Thread Bob Byron

Actually, I can use SAX to do this, but I have been hearing good
things about the digester and wanted to see if I could utilize any
of its advantages.

Would you recommend I use SAX instead?
Bob
- Original Message - 
From: "Scott Atwell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 9:51 AM
Subject: Re: Digester content with elements


> Could you not use a DOM parser, e.g. xerces, to do this?
> 
> Regards,
> Scott
> 
> - Original Message -
> From: "Bob Byron" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, November 02, 2001 3:46 PM
> Subject: Re: Digester content with elements
> 
> 
> > Hmmm  Is this too easy or too hard of a question to be answered?
> >
> > Bob
> > - Original Message -
> > From: "Bob Byron" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 01, 2001 3:16 PM
> > Subject: Digester content with elements
> >
> >
> > I was wondering how to digest content that contains additional
> > elements.
> >
> > For example, I have two tags "text" and "date".  I want to parse
> > the following:
> > I want to remember this date, , forever!
> >
> > Ultimately I want to end up with three objects as follows
> > (I hope you get what I am inferring below):
> > MyText("I want to remember this date, ");
> > MyDate();
> > MyText(", forever!");
> >
> > Granted, it would be easy enough to do:
> > I want to remember this date, , forever!
> > But, I prefer to do the first way.
> >
> > Thank You,
> > Bob Byron
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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




Re: Digester content with elements

2001-11-02 Thread Bob Byron

The examples that I have seen only show "neat" cases
where there is no intermixing of text and content..
Case 1: I want to remember this date,, forever!

I want to see an example of how to parse the following:
Case 2: I want to remember this date,, forever!

In Case 1, the text is all neatly contained in tags.
In Case 2 however, the text mixes with the subtags.  The documentation
did not show this kind of example.

Bob

- Original Message - 
From: "Sandeep Takhar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 9:52 AM
Subject: Re: Digester content with elements


> I don't understand how this is any different than the
> stuff that comes with the documentation.
> 
> -sandeep
> --- Scott Atwell <[EMAIL PROTECTED]> wrote:
> > Could you not use a DOM parser, e.g. xerces, to do
> > this?
> > 
> > Regards,
> > Scott
> > 
> > - Original Message -
> > From: "Bob Byron" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Friday, November 02, 2001 3:46 PM
> > Subject: Re: Digester content with elements
> > 
> > 
> > > Hmmm  Is this too easy or too hard of a
> > question to be answered?
> > >
> > > Bob
> > > - Original Message -
> > > From: "Bob Byron" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > > Sent: Thursday, November 01, 2001 3:16 PM
> > > Subject: Digester content with elements
> > >
> > >
> > > I was wondering how to digest content that
> > contains additional
> > > elements.
> > >
> > > For example, I have two tags "text" and "date".  I
> > want to parse
> > > the following:
> > > I want to remember this date, ,
> > forever!
> > >
> > > Ultimately I want to end up with three objects as
> > follows
> > > (I hope you get what I am inferring below):
> > > MyText("I want to remember this date, ");
> > > MyDate();
> > > MyText(", forever!");
> > >
> > > Granted, it would be easy enough to do:
> > > I want to remember this date,
> > , forever!
> > > But, I prefer to do the first way.
> > >
> > > Thank You,
> > > Bob Byron
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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




Re: Force login...

2001-11-02 Thread Peter Pilgrim



To do it properly you have to:

(1) Write a abstract base class, say `SecureActionBase' that provide security methods
"checkLogon()". Write a default implementation of `checkLogin' that subclasser can
override. If no user is not longer return an action mapping forward that redirects
to the "login". Otherwise let the user continue.

(2) Borrow the `CheckLoginTag' from the Struts example and use it as it is, or modify 
it.
You put the checklogin tag at the beginning of your JSPs.

(3) Extend the Struts ActionServlet with a custom class for your project that will 
enable you
to look for instances of `SecureActionBase' and then call the security methods.
Like so:

   protected ActionForward processActionPerform(Action action,
 ActionMapping mapping,
 ActionForm formInstance,
 HttpServletRequest request,
 HttpServletResponse response)
throws IOException, ServletException
{
 

if ( action instanceof SecureBaseAction ) {
SecureBaseAction baseAction = (SecureBaseAction)action;
 ...

if ( baseAction.isSecureAction() ) { // This action needs security
 
ActionForward fwd = baseAction.checkUserSecurityAccess(
context, mapping, request );
if ( fwd != null ) {
// Redirect to login screen or other warning page
return fwd;
}
 // Otherwise we are authenticated, continue
}
 ... // pre-process checking U desire

ActionForward forward = action.perform(mapping, formInstance, request, 
response);

 ... // post -process checking U desire
return forward;
}


--
Peter Pilgrim ++44 (0)207-545-9923
  //_\\
"Mathematics is essentially the study of islands of  ===
disparate subjects in a sea of ignorance."   || ! ||
Andrew Wiles _


 Message History 



From: "Scott Watson" <[EMAIL PROTECTED]> on 02/11/2001 10:44 EST


My appologies for asking something that has probablly been asked and answered before, 
however, I wasn't able to find the answer in
my searches.

How do you force someone to login before being allowed to access your application.  It 
doesn't seem right to code this in each
action class.

Is it possible to search the archives for this list like the SERVLET and the JSP lists?

Thanks
Scott.



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Re: Force login...

2001-11-02 Thread Martin Samm

a common method is to insert a custom tag on each page and 
a) checks the session, say, for a suitable attribute and value
b) presents a login / redirects to login if no such value is found

On Friday 02 Nov 2001 3:44 pm, you wrote:
> My appologies for asking something that has probablly been asked and
> answered before, however, I wasn't able to find the answer in my searches.
>
> How do you force someone to login before being allowed to access your
> application.  It doesn't seem right to code this in each action class.
>
> Is it possible to search the archives for this list like the SERVLET and
> the JSP lists?
>
> Thanks
> Scott.

-- 
Martin Samm MSc, Bsc Hons

http://www.readingroom.com
Winner : Best Business to Business Website 2000-01
(Internet Business Awards sponsored by ntl)

Reading Room Ltd.
77 Dean Street
Soho
London
W1D 3SH
UK

Tel: +44 (0) 20 7734 9499
Fax: +44 (0) 20 7739 4190

The information transmitted is intended only for the person or entity to 
which it is addressed and may contain confidential and/or privileged 
material.  Any review, re-transmission, dissemination or other use of, or 
taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited.  If you received 
this in error, please contact the sender and delete the material from any 
computer.


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




RE: Force login...

2001-11-02 Thread Matt Raible

In my opinion, the best method to use is container-managed authentication.  You
can set this up via your web.xml file and protect your struts action class
(*.do).

http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html

Matt

--- Princeton Lau <[EMAIL PROTECTED]> wrote:
> Scott,
> 
> Check out the Struts sample app, it has two features that could solve your
> problem.  
> 
> Firstly, it has a login form and action.  The sample app checks against an
> XML file for a list of users, but you could code the action to access a
> business object that verifies the username and password.  If the lookup
> fails, then return them to the login page with an error.
> 
> It also has a custom tag, checklogin , to ensure that the user has logged
> in before doing anything.  Just place this tag in your JSPs and if the user
> isn't logged in yet, it will return them to the login page.
> 
> HTH,
> 
> Princeton
> 
> -Original Message-
> From: Scott Watson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 8:45 AM
> To: Struts Users Mailing List
> Subject: Force login...
> 
> 
> My appologies for asking something that has probablly been asked and
> answered before, however, I wasn't able to find the answer in
> my searches.
> 
> How do you force someone to login before being allowed to access your
> application.  It doesn't seem right to code this in each
> action class.
> 
> Is it possible to search the archives for this list like the SERVLET and the
> JSP lists?
> 
> Thanks
> Scott.
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: Digester content with elements

2001-11-02 Thread Sandeep Takhar

I don't understand how this is any different than the
stuff that comes with the documentation.

-sandeep
--- Scott Atwell <[EMAIL PROTECTED]> wrote:
> Could you not use a DOM parser, e.g. xerces, to do
> this?
> 
> Regards,
> Scott
> 
> - Original Message -
> From: "Bob Byron" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Friday, November 02, 2001 3:46 PM
> Subject: Re: Digester content with elements
> 
> 
> > Hmmm  Is this too easy or too hard of a
> question to be answered?
> >
> > Bob
> > - Original Message -
> > From: "Bob Byron" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> > Sent: Thursday, November 01, 2001 3:16 PM
> > Subject: Digester content with elements
> >
> >
> > I was wondering how to digest content that
> contains additional
> > elements.
> >
> > For example, I have two tags "text" and "date".  I
> want to parse
> > the following:
> > I want to remember this date, ,
> forever!
> >
> > Ultimately I want to end up with three objects as
> follows
> > (I hope you get what I am inferring below):
> > MyText("I want to remember this date, ");
> > MyDate();
> > MyText(", forever!");
> >
> > Granted, it would be easy enough to do:
> > I want to remember this date,
> , forever!
> > But, I prefer to do the first way.
> >
> > Thank You,
> > Bob Byron
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




RE: Force login...

2001-11-02 Thread Princeton Lau

Scott,

Check out the Struts sample app, it has two features that could solve your
problem.  

Firstly, it has a login form and action.  The sample app checks against an
XML file for a list of users, but you could code the action to access a
business object that verifies the username and password.  If the lookup
fails, then return them to the login page with an error.

It also has a custom tag, checklogin , to ensure that the user has logged
in before doing anything.  Just place this tag in your JSPs and if the user
isn't logged in yet, it will return them to the login page.

HTH,

Princeton

-Original Message-
From: Scott Watson [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 8:45 AM
To: Struts Users Mailing List
Subject: Force login...


My appologies for asking something that has probablly been asked and
answered before, however, I wasn't able to find the answer in
my searches.

How do you force someone to login before being allowed to access your
application.  It doesn't seem right to code this in each
action class.

Is it possible to search the archives for this list like the SERVLET and the
JSP lists?

Thanks
Scott.


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Re: Digester content with elements

2001-11-02 Thread Scott Atwell

Could you not use a DOM parser, e.g. xerces, to do this?

Regards,
Scott

- Original Message -
From: "Bob Byron" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 3:46 PM
Subject: Re: Digester content with elements


> Hmmm  Is this too easy or too hard of a question to be answered?
>
> Bob
> - Original Message -
> From: "Bob Byron" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 01, 2001 3:16 PM
> Subject: Digester content with elements
>
>
> I was wondering how to digest content that contains additional
> elements.
>
> For example, I have two tags "text" and "date".  I want to parse
> the following:
> I want to remember this date, , forever!
>
> Ultimately I want to end up with three objects as follows
> (I hope you get what I am inferring below):
> MyText("I want to remember this date, ");
> MyDate();
> MyText(", forever!");
>
> Granted, it would be easy enough to do:
> I want to remember this date, , forever!
> But, I prefer to do the first way.
>
> Thank You,
> Bob Byron
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




RE: struts-example.war

2001-11-02 Thread Matt Raible

I'd suggest using Tomcat 4.0.  I've installed the struts-example.war on it
without any problems at all - and no setup.

Matt

--- Marcel  Andres <[EMAIL PROTECTED]> wrote:
> Andy, if everything is configured well, I can't think of what is wrong. As
> much as I understand, you did reiceve the logon form. after signing on you
> are redirected back to the logon form. Right? As much as I remember the
> example (it is quiet a long time ago, I used it), it will redirect you to the
> logon form, as long as you did not logon to the application.
> 
> Marcel
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 1:31 PM
> To: [EMAIL PROTECTED]
> Subject: RE: struts-example.war
> 
> 
> Indeed I did. The only thing I dont have is the:
> 
>  JDBC 2.0 Optional Package Classes - Struts supports an optional
> implementation of javax.sql.DataSource, so it requires the API classes to be
> compiled. They can be downloaded from
> http://java.sun.com/products/jdbc/download.html.
> 
> I want sure if these were compulsory, but i downloaded the class files, i
> just dont know where to put them, but i dont think this is the problem.
> 
> Andy
> 
> -Original Message-
> From: Marcel Andres [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 12:34 PM
> To: struts-user
> Subject: RE: struts-example.war
> 
> 
> Hi Andy,
> 
> First of all, don't break your head on the desk, use a pillow! Now, to your
> problem:
> Did you instal all the prerequisite software, how it is described on
> http://jakarta.apache.org/struts/installation-1.0.html?
> 
> Marcel
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: struts-example.war
> 
> 
> After a week of banging my head on my desk I am still no closer to getting
> any struts example to work.
> I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example
> file.nI have tried it on 2 macheines with the same result. I displays the
> first Jsp but the image on it is missing as it has been given a stupid url
> (sturtspower.gif;jsessionid=837983). When i try to submit any form in the
> example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever
> number. If i click on registration i am redirected to
> ../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create.
> I realise i have brought this up before but i thought i should re-itterate
> the problem before asking any questions.
> 
> Does anyone know of any prerequisite software i might be missing in order
> for this to be happening? It happens with any strusts application i try.
> 
> Thanks for your time
> 
> Andy
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: Digester content with elements

2001-11-02 Thread Bob Byron

Hmmm  Is this too easy or too hard of a question to be answered?

Bob
- Original Message - 
From: "Bob Byron" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 3:16 PM
Subject: Digester content with elements


I was wondering how to digest content that contains additional
elements.

For example, I have two tags "text" and "date".  I want to parse
the following:
I want to remember this date, , forever!

Ultimately I want to end up with three objects as follows 
(I hope you get what I am inferring below):
MyText("I want to remember this date, ");
MyDate();
MyText(", forever!");

Granted, it would be easy enough to do:
I want to remember this date, , forever!
But, I prefer to do the first way.

Thank You,
Bob Byron




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




Force login...

2001-11-02 Thread Scott Watson

My appologies for asking something that has probablly been asked and answered before, 
however, I wasn't able to find the answer in
my searches.

How do you force someone to login before being allowed to access your application.  It 
doesn't seem right to code this in each
action class.

Is it possible to search the archives for this list like the SERVLET and the JSP lists?

Thanks
Scott.


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




Newbe - problem with Struts-Config.xml

2001-11-02 Thread tnist

Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist 
[EMAIL PROTECTED]

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




Re: ClassCastException when moving extended Action and ActionForm classesin the classpath

2001-11-02 Thread Rob Breeds


That's the error message I get in the browser for my current problem too
(see earlier post)! I don't think I see a specific ClassCastException
though, only 'incompatible object'.

You're right - it makes no sense

Rob Breeds




   

"Leonardo  

Mena"To: <[EMAIL PROTECTED]>  

   Subject: ClassCastException when moving 
extended Action and ActionForm classes in the classpath   
   

02/11/2001 

15:51  

Please respond 

to "Struts 

Users Mailing  

List"  

   

   



The web browser shows a processed error
message: "The following error occurred: 500 - No action instance for path
/logon could be created".






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




RE: struts-example.war

2001-11-02 Thread Marcel Andres

Andy, if everything is configured well, I can't think of what is wrong. As much as I 
understand, you did reiceve the logon form. after signing on you are redirected back 
to the logon form. Right? As much as I remember the example (it is quiet a long time 
ago, I used it), it will redirect you to the logon form, as long as you did not logon 
to the application.

Marcel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:31 PM
To: [EMAIL PROTECTED]
Subject: RE: struts-example.war


Indeed I did. The only thing I dont have is the:

 JDBC 2.0 Optional Package Classes - Struts supports an optional
implementation of javax.sql.DataSource, so it requires the API classes to be
compiled. They can be downloaded from
http://java.sun.com/products/jdbc/download.html.

I want sure if these were compulsory, but i downloaded the class files, i
just dont know where to put them, but i dont think this is the problem.

Andy

-Original Message-
From: Marcel Andres [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:34 PM
To: struts-user
Subject: RE: struts-example.war


Hi Andy,

First of all, don't break your head on the desk, use a pillow! Now, to your
problem:
Did you instal all the prerequisite software, how it is described on
http://jakarta.apache.org/struts/installation-1.0.html?

Marcel



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:09 PM
To: [EMAIL PROTECTED]
Subject: struts-example.war


After a week of banging my head on my desk I am still no closer to getting
any struts example to work.
I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example
file.nI have tried it on 2 macheines with the same result. I displays the
first Jsp but the image on it is missing as it has been given a stupid url
(sturtspower.gif;jsessionid=837983). When i try to submit any form in the
example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever
number. If i click on registration i am redirected to
../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create.
I realise i have brought this up before but i thought i should re-itterate
the problem before asking any questions.

Does anyone know of any prerequisite software i might be missing in order
for this to be happening? It happens with any strusts application i try.

Thanks for your time

Andy


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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

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




ClassCastException when moving extended Action and ActionForm classes in the classpath

2001-11-02 Thread Leonardo Mena

Hi folks! I am from Uruguay, South America, so sorry my English :)

I am evaluating the Struts framework as an MVC aproach in the web tier in
our company product (after attending the entusiastic presentation in the
JavaOne conference!). The framework convince us pretty much, but we are very
concerned with a situation that we hope is due to our little experience with
Struts.


PROBLEM:

If we move our extended Action or ActionForm classes from WEB-INF/classes to
somewhere else in the servlet container classpath (we're using ServletExec
3.0c), an error occurs (ClassCastException) wich prevents the application to
continue.


DETAIL:

I don't want to include further details (such as servlet logs) unless you
think it's necesary, but tell you that the error takes the form of a
java.lang.ClassCastException in the ActionServlet, when it attemps to cast a
new extended Action class (instantiated via reflection) to its superclass
Action. We're pretty confussed because the class is found and instantiated
when moved, but generates a cast error, even when the log tell us that its
superclass is the one Struts is casting to: org.apache.struts.action.Action.
The same occurs with ActionForm. The web browser shows a processed error
message: "The following error occurred: 500 - No action instance for path
/logon could be created".

Any help will be very appreciated, we hope we're doing some trivial mistake
or something else and this is not a limitation on the framework. We think
that from a JVM standpoint this make no sense, but...

Thanks in advance,
Leonardo Mena


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




Re: action forward tag...

2001-11-02 Thread Sandeep Takhar

If you are not using framesets - I would suggest
looking at using tiles or templates.  These allow you
to include header,footer,menu,body type layouts within
the jsp -- here you would just reference the jsp file.

sandeep
--- John Nikolai <[EMAIL PROTECTED]> wrote:
> 
> Hello all!
> 
> I have an action-mapping with one action element.
> This action element defines 
> an input attribute used for when an error occurs in
> the form. I was 
> wondering if it is possible for the action elements
> forward element can do 
> the same thing as the input attribute?
> 
> Let me explain:
> 
> We have a navigation system in place and the
> navigation is dependent on where 
> the user is located in the web directory hierarchy.
> 
> http://localhost/dynamic/form.htm
>  - Contains  and form elements
>  - The navigation is properly created, highlighting
> "form" in the left hand 
> navigation
> 
> When a user submits the form and an error occurs the
> URL changes to the 
> following:
>  
> http://localhost/dynamic/formHandler.do 
> 
> The errors are reported and the form.HTML file is
> redisplayed. The important 
> thing here is that the navigation remains the same.
> That is to say that 
> "form" is still highlighted in the left hand
> navigation...
> 
> Now when the form is successfully filled out I want
> to display a "success" 
> page BUT keep the left hand navigation intact with
> "form" highlighted. I do 
> not want to redisplay the form again, rather just
> show some simple text 
> saying the form was successfully submitted. I have
> tried messing around with 
> the forward element, setting the redirect attribute
> to true/false, as 
> well as changing the path too. 
> 
> - I set the path to /dynamic/form.htm but then the
> form is redisplayed.
> 
> - I set the path to /dynamic/success.htm but then
> the navigation will not 
> display properly.
> 
> - I set the redirect to "false" but that did not
> work either...
> 
> Is it possible to have the success page be rendered
> like the error page, 
> minus the form fields?
> 
> Thanks for your help,
>  - John
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: ActionForms extending ActionForms

2001-11-02 Thread Ted Husted

The problem is that html:form is looking for the ActionForm associated
with its ActionMapping. 

Having one Action handle more than one ActionForm isn't a problem. But
getting html:form to handle more than ActionForm is problematic. 

If the *properties* for each registration type are the same, then you
may not need two different ActionForm beans at all. 

The Action just needs a way to tell the registeration types apart,
perhaps by using a hidden property. 

This is admittedly not a very OOP approach, but HTTP is not a OO
protocol, so we have to make allowances on this tier ;-)

Interally, you might want to have different beans for the different user
types; these should not be ActionForm beans, but some other bean
representing your internal model, and not bound to HTTP.

You should also omit the "scope" property from the html:form, since, in
this case, it will get all that out of the Struts config.

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


Richard Dallaway wrote:
> 
> I've been wondering about the best way to go about using struts in this
> situation
> 
> I have two types of forms (for different kind of web registrations) which
> are very similar, but not quite identical.  The associated
> RegistrationAction will perform slightly different tasks depending on which
> form it is given.  So I could go for two actions, one for each of the
> forms.  That'll work.
> 
> But I was wondering if instead I could do have a base RegistrationForm
> (containing lots of common stuff), and then extend it to give me say
> UserRegistrationForm and StaffRegistrationForm.  A single action would
> accept a form of type "RegistrationForm" and do whatever it needed to
> do.  (For the sake of argument, assume that the JSP form can be shared, so
> validation is OK).
> 
> So I tried this, by having a startRegistrationAction that created an
> instance of either StaffRegistrationForm or UserRegistrationForm , casting
> it to be of type RegistrationForm, and put it in session scope under the
> name "registrationForm" before forwarding on to the JSP form for the end
> user to complete.
> 
> When the form is submitted to the RegistrationAction I get a null form
> passed.   The config I have is
> 
> name="registrationForm"
>type="RegistrationForm" />
> 
>  
>path="/register"
>  name="registrationForm"
>  type="RegistrationAction"
>  unknown="false"
>  input="/register.jsp"
>  validate="true">
>  
> 
> The form tag looks like:
>
> 
> and of course if I change the form-bean type to be
> "StaffRegistrationForm" or "UserRegistrationForm" it will work for one of
> those specific instances.
> 
> Am I right in thinking that because my form is of type (say)
> StaffRegistraionForm (which happens to extend RegistrationForm), struts
> won't be able to find a RegistrationForm type object in the session? Which
> is why my Action sees a null form.
> 
> So my questions are really
> (1) is this a sane thing to be trying?
> (2) is there a way to do this?
> 
> Many thanks
> Richard
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




I can't find taglib "logic:empty" nor "logic:notEmpty"

2001-11-02 Thread Arnaud Chiaberge

Hi all,

On the "http://jakarta.apache.org/struts/struts-logic.html"; site page, two
very interresting tags are presented : 'empty' and 'notEmpty'.

I have downloaded struts v1.0, but I just can't find them neither the
declaration in the "struts-logic.tld" file, nor the corresponding .class
files in "struts.jar".

Where are they ?

I absolutely need them ;-)

Thanks in advance,

Arnaud Chiaberge


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




ActionForms extending ActionForms

2001-11-02 Thread Richard Dallaway

I've been wondering about the best way to go about using struts in this 
situation

I have two types of forms (for different kind of web registrations) which 
are very similar, but not quite identical.  The associated 
RegistrationAction will perform slightly different tasks depending on which 
form it is given.  So I could go for two actions, one for each of the 
forms.  That'll work.

But I was wondering if instead I could do have a base RegistrationForm 
(containing lots of common stuff), and then extend it to give me say 
UserRegistrationForm and StaffRegistrationForm.  A single action would 
accept a form of type "RegistrationForm" and do whatever it needed to 
do.  (For the sake of argument, assume that the JSP form can be shared, so 
validation is OK).

So I tried this, by having a startRegistrationAction that created an 
instance of either StaffRegistrationForm or UserRegistrationForm , casting 
it to be of type RegistrationForm, and put it in session scope under the 
name "registrationForm" before forwarding on to the JSP form for the end 
user to complete.

When the form is submitted to the RegistrationAction I get a null form 
passed.   The config I have is




 
 
 

The form tag looks like:
   

and of course if I change the form-bean type to be 
"StaffRegistrationForm" or "UserRegistrationForm" it will work for one of 
those specific instances.

Am I right in thinking that because my form is of type (say) 
StaffRegistraionForm (which happens to extend RegistrationForm), struts 
won't be able to find a RegistrationForm type object in the session? Which 
is why my Action sees a null form.

So my questions are really
(1) is this a sane thing to be trying?
(2) is there a way to do this?

Many thanks
Richard

  


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




Re:

2001-11-02 Thread Sandeep Takhar

Have you defined the tag library in the jsp?
--- Todd Fulton <[EMAIL PROTECTED]> wrote:
> 
> I just can't seem to get the  tag to
> display the errors passed
> through via my ActionForm object's validate()
> method.  I have confirmed that
> the validate() method is working correctly -- as I'm
> getting a forward to
> the input page as configured.  Simply nothing
> appears with:
> 
> 
> 
> 
> Read all the docs, but just can't figure this one
> out.  What am I missing in
> the struts-config, web.xml or what? Anyone?
> 
> 
> ToFu
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: Capturing an outgoing response.

2001-11-02 Thread Sandeep Takhar

I believe there is also a tag that struts uses that
can take the output servlet/jsp and place it in a
bean.  If you look at the code for this tag you will
see how they get the output of a servlet and place it
in a bean.  This should work for any type of output. 
Unfortunately I don't have the code with me -- or
which tag it is, but I remember it as being an xml/xsl
tag that could be used to reference a url and placing
the output of that url to a bean.  The idea being that
this bean could then be used as a starting point for
an xsl transform.

- Sandeep
--- Erik Hatcher
<[EMAIL PROTECTED]> wrote:
> Are you running a Servlet 2.3 compliant app. server?
>  If so, Filters are
> what you are looking for.  If not, you could add
> some scriptlet to the end
> of each JSP (perhaps?) that could "post-process" the
> response before it is
> finalized.
> 
> Erik
> 
> 
> - Original Message -
> From: "Brandon Goodin" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'"
> <[EMAIL PROTECTED]>
> Sent: Thursday, November 01, 2001 9:34 PM
> Subject: Capturing an outgoing response.
> 
> 
> > Is it possible to capture the html page that is
> generated by a jsp page
> > before it is sent to the client who requested it?
> >
> > Brandon Goodin
> > Phase Communications
> > P (406)862-2245
> > F (406)862-0354
> > http://www.phase.ws
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Incompatible object error trying to instantiate an Action

2001-11-02 Thread Rob Breeds


Hello I've been successfully forwarding a form submit to an Action (A0)
which uses a parameter in the form to forward to another Action (call it
A1) which performs business logic and populates a bean to display in a
result page. It all works.

I now copy that working Action (A1) class to another business logic Action
(A2) and rename it where appropriate.

I set up the config file for the new Action A2, and change my input form so
it offers another parameter such that Action A0 will forward to A2.

When the new Action class (A2 is FindBusinessSimple in this case) is
forwarded to, I get this weird error in the log:

[Servlet LOG]: action: Error creating Action instance for path
'/findBusiness', class name '**.inquire.FindBusinessSimple':
java.lang.VerifyError: (class: /inquire/FindBusinessSimple, method:
perform signature:
(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;)

Incompatible object

If I select the other parameter in the form, class A1 still works as
before.

(I've had to * some of the package names for confidentiality reasons
but that doesn't change the problem!)

Any ideas please? I'm stumped. I'm running in WebSphere App Server 4.0 and
up until now, that hasn't been a problem...

Thanks

Rob Breeds



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




Re:

2001-11-02 Thread Kris Thompson

Are you using Frames?  That could be the problem.  I haven't quite figured out
why but try removing any frames (if possible).

Todd Fulton wrote:

> I just can't seem to get the  tag to display the errors passed
> through via my ActionForm object's validate() method.  I have confirmed that
> the validate() method is working correctly -- as I'm getting a forward to
> the input page as configured.  Simply nothing appears with:
>
> 
> 
>
> Read all the docs, but just can't figure this one out.  What am I missing in
> the struts-config, web.xml or what? Anyone?
>
> ToFu
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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




struts on iPlanet Webserver 4.1

2001-11-02 Thread Heiner, Aaron

I'm trying to install and run the struts example on iPlanet Webserver
4.1.  I've followed the instructions provided on the jakarta website,
however, when I try to access the index.jsp page, I get the following
error.  Has anybody encountered this problem before or have ideas on the
cause of the problem?

[02/Nov/2001:08:06:28] info ( 7622): Internal Info: loading servlet
/index.jsp
[02/Nov/2001:08:06:28] info ( 7622): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to open taglibrary
/WEB-INF/struts-bean.tld : null
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Exception.java:42)
at
javax.servlet.ServletException.(ServletException.java:68)
at
org.apache.jasper.JasperException.(JasperException.java:73)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(Compile
d Code)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
Listener.java:119)
at org.apache.jasper.compiler.Parser$Directive.accept(Compiled
Code)
at org.apache.jasper.compiler.Parser.parse(Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1022)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1018)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
at
com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.ja
va:230)
at
com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity.
java:149)
at
com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner
.java:469)


[02/Nov/2001:08:06:28] warning ( 7622): Internal error: Failed to get
GenericServlet. (uri=/index.jsp,SCRIPT_NAME=/index.jsp)

Aaron L. Heiner
Software Engineer
Great Lakes Technologies Group
Direct: 248-204-7171
Email: 




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




Producing an XML document from a form

2001-11-02 Thread Matt Raible

I'd like to be able to produce an XML document from my form that wraps the
bean's values with the method names.  Has anyone done this, or should I do it
on my own and submit the "extension?"

Thanks,

Matt

__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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




Re: Setting bean property with custom tag

2001-11-02 Thread Ted Husted

If you want to set a value that is part of an ActionForm, you can use
. 

Note that the Struts html:form tag will automatically create a bean if
it is not already in the expected scope. An Action will also create a
ActionForm bean if it is missing. Otherwise, you need to create it
yourself.

Also note that the Struts bean tags are not coupled to the ActionForm
names in the Struts config. They obtain the type through introspection,
not by looking things up in Struts config, and work equally well with
any bean.

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


Graham King wrote:
> 
>I'm building my first struts App and would appreciate some help with
> the following:
> 
>   Currently I have a JSP with the following code:
> 
> 
> 
> 
> ***
> SUMMARY: Essentially I want to be able to replace the above two lines
> with a struts tag where I don't have to give it the class name, because
> my bean is already defined in struts-config hence struts knows the
> class. Is there such a thing or is the above the recommended way ?
>   More details follow.
> ***
> 
> View details
> 
>   This is in the struts-config as follows:
> 
> Bean:
>   
> 
> Global forward:
> 
> 
> Action:
>   type="com.myapp.NameAdminController"
>name="nameForm"
>scope="session"
>input="/admin/admin_list_names.jsp" >
> 
> 
>   The NameAdminController uses the 'surname' as a key into the db to
> load the details.
> 
>   This works fine, but it means I have the name of the class in my
> struts-config and in my JSP. Struts already knows the class for
> 'nameForm' so I'm hoping for a tag of the form:
>
> 
>   Is there such a thing ?
> 
>   There is a  tag but it seems to want my nameForm to be a
> String.
> 
>   Many thanks,
>   Graham King.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Check Box,Radio button (Urgent)

2001-11-02 Thread Ted Husted

It's hard to say without seeing your code. They should automatically
select the current value.


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

yogesh borse wrote:
> 
> Hi All,
> 
> I'm populating a FormBean from action class so that I can open the
> form(jsp)in edit mode with all values for updating purpose but the
> problem is, I'm having checkbox or radio button, It's not showing me
> selected radio or checked chech box if it is checked or selected before.
> Can any one please tell me the solution for this problem.It's urgent.
> 
> Regards
> Yogesh
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




RE: struts-example.war

2001-11-02 Thread Andrew Kirkland

Indeed I did. The only thing I dont have is the:

 JDBC 2.0 Optional Package Classes - Struts supports an optional
implementation of javax.sql.DataSource, so it requires the API classes to be
compiled. They can be downloaded from
http://java.sun.com/products/jdbc/download.html.

I want sure if these were compulsory, but i downloaded the class files, i
just dont know where to put them, but i dont think this is the problem.

Andy

-Original Message-
From: Marcel Andres [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:34 PM
To: struts-user
Subject: RE: struts-example.war


Hi Andy,

First of all, don't break your head on the desk, use a pillow! Now, to your
problem:
Did you instal all the prerequisite software, how it is described on
http://jakarta.apache.org/struts/installation-1.0.html?

Marcel



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:09 PM
To: [EMAIL PROTECTED]
Subject: struts-example.war


After a week of banging my head on my desk I am still no closer to getting
any struts example to work.
I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example
file.nI have tried it on 2 macheines with the same result. I displays the
first Jsp but the image on it is missing as it has been given a stupid url
(sturtspower.gif;jsessionid=837983). When i try to submit any form in the
example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever
number. If i click on registration i am redirected to
.../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create.
I realise i have brought this up before but i thought i should re-itterate
the problem before asking any questions.

Does anyone know of any prerequisite software i might be missing in order
for this to be happening? It happens with any strusts application i try.

Thanks for your time

Andy


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: struts-example.war

2001-11-02 Thread Marcel Andres

Hi Andy, 

First of all, don't break your head on the desk, use a pillow! Now, to your problem:
Did you instal all the prerequisite software, how it is described on 
http://jakarta.apache.org/struts/installation-1.0.html?

Marcel



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 1:09 PM
To: [EMAIL PROTECTED]
Subject: struts-example.war


After a week of banging my head on my desk I am still no closer to getting
any struts example to work.
I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example
file.nI have tried it on 2 macheines with the same result. I displays the
first Jsp but the image on it is missing as it has been given a stupid url
(sturtspower.gif;jsessionid=837983). When i try to submit any form in the
example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever
number. If i click on registration i am redirected to
.../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create.
I realise i have brought this up before but i thought i should re-itterate
the problem before asking any questions.

Does anyone know of any prerequisite software i might be missing in order
for this to be happening? It happens with any strusts application i try.

Thanks for your time

Andy


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

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




struts-example.war - url correction

2001-11-02 Thread Andrew Kirkland

Slight correction 

When i try to submit any form in the
example, my browser is redirected to logon.do;jsessionid=454333 or whatever
number.

Im my haste and frustration I got it wrong, sorry guys :) 

Andy

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




struts-example.war

2001-11-02 Thread Andrew Kirkland

After a week of banging my head on my desk I am still no closer to getting
any struts example to work.
I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example
file.nI have tried it on 2 macheines with the same result. I displays the
first Jsp but the image on it is missing as it has been given a stupid url
(sturtspower.gif;jsessionid=837983). When i try to submit any form in the
example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever
number. If i click on registration i am redirected to
.../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create.
I realise i have brought this up before but i thought i should re-itterate
the problem before asking any questions.

Does anyone know of any prerequisite software i might be missing in order
for this to be happening? It happens with any strusts application i try.

Thanks for your time

Andy


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




  1   2   >