Formless actions

2000-11-24 Thread Pierre Métras

Hi,

I have to code a menu. Depending on the user interaction, different features
will be executed. These features are Struts actions *.do URL with associated
JSP files for the views. The menu is included on all the forms.

Should I use an Action class to manage the menu processing, knowing that no
input form will be associated with it? So the mapping will look like:

  
  
  



Using the Struts design has the advantage that the foward mapping allows to
use logical names for the features. This indirection level allows to add or
modify a feature without impacting the others (just place a ).
On the other side, Struts mechanic is a bit heavy for a servlet whose role
will be to forward to another feature based on a request parameter, that's
to say a big sequence of if-else.


Subsidiary question:
I have a menu option that is used to switch the language used for display,
and then return to the calling feature.
Can the menu know from which feature it is called, without having to add
another parameter in the request? Is the Referer header available in that
case?

Any opinion welcome.

Pierre Métras




Re: How to access the session from a custom tag

2000-11-24 Thread anna . hristova

I think this works also, right?
HttpSession session = (HttpSession) pageContext.getSession();
String  = (String) session.getAttribute("...");

--ani
- Original Message -
From: "Matthias Kerkhoff" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Friday, November 24, 2000 2:27 PM
Subject: Re: How to access the session from a custom tag


> > I need to access the session (to get and set attributes) from a custom
tag. Any idea?
>
> ... or of course ...
>
> getPageContext().getAttribute("AttributeName", SESSION_SCOPE) and
> getPageContext().setAttribute("AttributeName", attribute, SESSION_SCOPE)
>
> --
> Matthias(mailto:[EMAIL PROTECTED])
>
>






Re: How to access the session from a custom tag

2000-11-24 Thread Matthias Kerkhoff

> I need to access the session (to get and set attributes) from a custom tag. Any idea?

... or of course ...

getPageContext().getAttribute("AttributeName", SESSION_SCOPE) and
getPageContext().setAttribute("AttributeName", attribute, SESSION_SCOPE)

-- 
Matthias(mailto:[EMAIL PROTECTED])





Re: How to access the session from a custom tag

2000-11-24 Thread Matthias Kerkhoff

> Hi,
> I need to access the session (to get and set attributes) from a custom tag. Any 
>idea? 

getPageContext().getSession()

-- 
Matthias(mailto:[EMAIL PROTECTED])





How to access the session from a custom tag

2000-11-24 Thread anna . hristova



Hi,
I need to access the session (to get and set 
attributes) from a custom tag. Any idea? 
 
Thanks
 
--ani


Orion and Struts 1.0 (once again)

2000-11-24 Thread Till Nagel

Hi,

I am trying to use Struts 1.0 (20001115) with Orion Server 1.4.

If I use the struts-config.xml with validate=true in the web.xml the
following exception occurs:
  java.net.MalformedURLException: unknown protocol: jndi

Okay, no prob. I deleted the validation in web.xml so at startup it uses the
"system identifier" and gets the DTD via the
http://jakarta.apache.org/struts/dtds/ link. (You could change the URI to
your local drive, if you are a using a dial up.)
After that it can read the struts-config.xml correctly. But if I call my
action ("myhost/showNews.do") I just get a message saying "Invalid path
/showNews was requested".

I appreciate any advice.

Regards,
Till


new dtd (struts-config.xml):

  


log file:
24.11.00 22:25 neteye-web: org.apache.struts.action.ActionServlet:
Processing a GET for /showNews
24.11.00 22:25 neteye-web: org.apache.struts.action.ActionServlet:  No
mapping available for path /showNews



old dtd (action.xml) and working:

  






Re: need some explanations

2000-11-24 Thread Craig R. McClanahan

Vilavanh Messien wrote:

> Actually, I'm using Tomcat 3.2.
> If the prob comes from Tomcat, why the struts example has no trouble with it
> ?
>

The bug doesn't bite everyone -- whether or not your struts-example gets shut
down correctly or not depends on what other web apps are defined in the same
Tomcat installation (technically, it depends on the order in which the web apps
are enumerated in a Hashtable, plus which JVM you are running).

At any rate, the only damage this bug does is it will fail to save any changes
to the "users" or "subscriptions" that took place.  The application itself still
works OK.

Of course, as others have pointed out, this is only an example app anyway -- a
real system would use a database.  I just wanted something self contained, that
would run "out of the box" in most circumstances.

Craig





RE: need some explanations

2000-11-24 Thread Vilavanh Messien

Actually, I'm using Tomcat 3.2.
If the prob comes from Tomcat, why the struts example has no trouble with it
?

-Message d'origine-
De : Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Envoyé : 24 novembre, 2000 16:00
À : [EMAIL PROTECTED]
Objet : Re: need some explanations


Vilavanh Messien wrote:

> If I understand, destroy() should be called when the servlet container
(i.e
> Tomcat) is shutdown.
> But, in my small application, destroy() seems not to be called so that
> information cannot be
> written database.xml.
> I didn't manage to find where my error is.
>

Tomcat 3.2, right?  There was a bug in Tomcat that causes this.  It was
recently
fixed, and will work correctly in the upcoming final release.

>
> Thanks
>

Craig


>
> -Message d'origine-
> De : Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Envoyé : 24 novembre, 2000 15:33
> À : [EMAIL PROTECTED]
> Objet : Re: need some explanations
>
> Vilavanh Messien wrote:
>
> > I analyzed the struts example in order to develop my own small
> application.
> > Unfortunatelaty, I don't really understand how the user's information
are
> > saved
> > in the "database.xml" file.
> > The DatabaseServlet must write the information in the "database.xml"
when
> > the destroy() method
> > is called.
> > My question is how to make the destroy() method perform ?
> >
>
> The destroy() method is called by the servlet container, when it removes
> this
> servlet from service or when the application is shut down.  Typically,
> server
> shutdown is the *only* time that a servlet is removed and destroy() is
> called.
>
> >
> > How can I do to pass some arguments to the DatabaseServlet ?
> >
>
> This is done by adding  entries in the WEB-INF/web.xml file.
> See
> the Servlet API Specification, version 2.2, for the details -- you can
> download
> it at:
>
> http://java.sun.com/products/servlet/download.html
>
> There are also a growing number of articles and books covering the servlet
> 2.2
> API that discusses this kind of thing.  I would try looking for "web.xml"
in
> your favorite search engine, as a starting point.
>
> >
> > Thanks
> >
> > Vilavanh
>
> Craig McClanahan




Re: need some explanations

2000-11-24 Thread Craig R. McClanahan

Vilavanh Messien wrote:

> If I understand, destroy() should be called when the servlet container (i.e
> Tomcat) is shutdown.
> But, in my small application, destroy() seems not to be called so that
> information cannot be
> written database.xml.
> I didn't manage to find where my error is.
>

Tomcat 3.2, right?  There was a bug in Tomcat that causes this.  It was recently
fixed, and will work correctly in the upcoming final release.

>
> Thanks
>

Craig


>
> -Message d'origine-
> De : Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Envoyé : 24 novembre, 2000 15:33
> À : [EMAIL PROTECTED]
> Objet : Re: need some explanations
>
> Vilavanh Messien wrote:
>
> > I analyzed the struts example in order to develop my own small
> application.
> > Unfortunatelaty, I don't really understand how the user's information are
> > saved
> > in the "database.xml" file.
> > The DatabaseServlet must write the information in the "database.xml" when
> > the destroy() method
> > is called.
> > My question is how to make the destroy() method perform ?
> >
>
> The destroy() method is called by the servlet container, when it removes
> this
> servlet from service or when the application is shut down.  Typically,
> server
> shutdown is the *only* time that a servlet is removed and destroy() is
> called.
>
> >
> > How can I do to pass some arguments to the DatabaseServlet ?
> >
>
> This is done by adding  entries in the WEB-INF/web.xml file.
> See
> the Servlet API Specification, version 2.2, for the details -- you can
> download
> it at:
>
> http://java.sun.com/products/servlet/download.html
>
> There are also a growing number of articles and books covering the servlet
> 2.2
> API that discusses this kind of thing.  I would try looking for "web.xml" in
> your favorite search engine, as a starting point.
>
> >
> > Thanks
> >
> > Vilavanh
>
> Craig McClanahan




RE: need some explanations

2000-11-24 Thread Vilavanh Messien

If I understand, destroy() should be called when the servlet container (i.e
Tomcat) is shutdown.
But, in my small application, destroy() seems not to be called so that
information cannot be
written database.xml.
I didn't manage to find where my error is.

Thanks

-Message d'origine-
De : Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Envoyé : 24 novembre, 2000 15:33
À : [EMAIL PROTECTED]
Objet : Re: need some explanations


Vilavanh Messien wrote:

> I analyzed the struts example in order to develop my own small
application.
> Unfortunatelaty, I don't really understand how the user's information are
> saved
> in the "database.xml" file.
> The DatabaseServlet must write the information in the "database.xml" when
> the destroy() method
> is called.
> My question is how to make the destroy() method perform ?
>

The destroy() method is called by the servlet container, when it removes
this
servlet from service or when the application is shut down.  Typically,
server
shutdown is the *only* time that a servlet is removed and destroy() is
called.

>
> How can I do to pass some arguments to the DatabaseServlet ?
>

This is done by adding  entries in the WEB-INF/web.xml file.
See
the Servlet API Specification, version 2.2, for the details -- you can
download
it at:

http://java.sun.com/products/servlet/download.html

There are also a growing number of articles and books covering the servlet
2.2
API that discusses this kind of thing.  I would try looking for "web.xml" in
your favorite search engine, as a starting point.

>
> Thanks
>
> Vilavanh

Craig McClanahan





Re: Global resources and DatabaseServlet (struts-example)

2000-11-24 Thread Craig R. McClanahan

Mike Dunn wrote:

> Are you not worried about code breaking when container vendors take
> advantage of the spec? We can define something now that will support the
> current spec. I propose replacing servlets such as DatabaseServlet with the
> concept of a "plugin" (hopefully, you can come up with a less overused
> name):
>

Are you thinking that the "plugins" will be plugged into ActionServlet?  If so,
you've still got the same issues as with DatabaseServlet, because the servlet
container is entitled to throw out your ActionServlet instance if it wants to.

In the servlet 2.3 API, there is a new feature called "Application Event
Listeners".  You can register (in web.xml) a particular class as a listener, and
an instance of your class will be called when the application is created, and
when it is destroyed -- completely independent of the lifecycle of the servlets
in that application.

This is perfect for things like initializing and finalizing database
connections, or any other resources that you want to guarantee you have
available for the entire lifetime of your app.  Unfortunately, I cannot (yet)
use them in Struts because it wouldn't be supported in any of the servlet 2.2 /
JSP 1.1 containers out there.

If you want to try this new feature, I suggest you download a recent milestone
release of Tomcat 4.0 (http://jakarta.apache.org), which supports the new APIs.

Craig McClanahan





Re: need some explanations

2000-11-24 Thread Craig R. McClanahan

Vilavanh Messien wrote:

> I analyzed the struts example in order to develop my own small application.
> Unfortunatelaty, I don't really understand how the user's information are
> saved
> in the "database.xml" file.
> The DatabaseServlet must write the information in the "database.xml" when
> the destroy() method
> is called.
> My question is how to make the destroy() method perform ?
>

The destroy() method is called by the servlet container, when it removes this
servlet from service or when the application is shut down.  Typically, server
shutdown is the *only* time that a servlet is removed and destroy() is called.

>
> How can I do to pass some arguments to the DatabaseServlet ?
>

This is done by adding  entries in the WEB-INF/web.xml file.  See
the Servlet API Specification, version 2.2, for the details -- you can download
it at:

http://java.sun.com/products/servlet/download.html

There are also a growing number of articles and books covering the servlet 2.2
API that discusses this kind of thing.  I would try looking for "web.xml" in
your favorite search engine, as a starting point.

>
> Thanks
>
> Vilavanh

Craig McClanahan





Re: apache - tomcat - struts: path was not found

2000-11-24 Thread Craig R. McClanahan

Martin Weber wrote:

> Hi !
>
> I am using apache 1.3.12, tomcat 3.1 and struts.

Tomcat 3.1 has quite a few bugs, one of them being the use of URL rewriting when 
running behind Apache.  I
would suggest trying this with 3.2 -- you will still need the rewrite rule that you've 
described, so that
Apache knows what to do.

Craig McClanahan





Re: thought on design

2000-11-24 Thread Craig R. McClanahan

Ned Seagoon wrote:

>
> I take it the
> custom tags have access to the form beans?
>

Yes.

Custom tags are initialized with an instance of javax.servlet.jsp.PageContext, which
provides access to (among other things) all of the attributes in all of the scopes.
Therefore, they have access to the form beans.

Craig





release

2000-11-24 Thread appliedcommerce.com - mihir

Hello,

Is there any milestone release after 0.5 ? I can only see nightly
builds. When is the next release likely?

Thanks,
Mihir




Digester Explanation?

2000-11-24 Thread Ray Power

Hi,
I trying to get my head around the Digester.
Is this based on a well known pattern?
Could someone point me to extra documentation/explanation re. the digester?

I'll probably have more specific questions when I understand it a bit
better.

Thanks

Ray




Re: Global resources and DatabaseServlet (struts-example)

2000-11-24 Thread Mike Dunn

Are you not worried about code breaking when container vendors take
advantage of the spec? We can define something now that will support the
current spec. I propose replacing servlets such as DatabaseServlet with the
concept of a "plugin" (hopefully, you can come up with a less overused
name):

1. Define the plugin interface:

public interface IPlugin {
void init(HttpServlet servlet) throws ServletException;
void destroy(HttpServlet servlet);
}

2. Define a plugin manager class:

public PluginManager implements IPlugin {
// list of plugins
private List _plugins;

public void init(HttpServlet servlet) throws ServletException {
// get the list of plugins from servlet's init parameters or
from a file

// for every plugin in the list, call its init method
}

public void destroy(HttpServlet servlet) {
// for every plugin in the list, call its destroy method
}
}

3. Convert DatabaseServlet and any other such servlets to plugins:

public DatabasePlugin implements IPlugin {
public void init(HttpServlet servlet) throws ServletException {
// original DatabaseServlet init code
}

public void destroy(HttpServlet servlet) {
// original DatabaseServlet destroy code
}
}

4. In ActionServlet's init method, instantiate PluginManager and call its
init method.
5. In ActionServlet's destroy method, call the PluginManager instance's
destroy method.

I don't know if you could (or if you would even want to) store the list of
plugins in the ActionServlet's init parameters because the order in which
they are initialized could be important.

Mike
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 10:13 PM
Subject: Re: Global resources and DatabaseServlet (struts-example)


> Mike Dunn wrote:
>
> > The DatabaseServlet in the example puts the database (a Hashtable) in
the
> > ServletContext. It removes it in its destroy method. As DatabaseServlet
can be
> > unloaded at anytime, why would you remove this global resource at this
time
> > (potentially prematurely)?
> >
> > Mike
>
> Under the servlet 2.2 API, there is no graceful way to deal with this.
The
> current implementation relies on the behavior of most servlet containers
that
> leave the servlet in place until the container is shut down.
>
> Under the new servlet 2.3 spec, the API support for application events
provides
> a *much* better place to do application startup and application shutdown
> processing, because you are guaranteed that the listener will be called
only at
> those two times.
>
> Craig McClanahan
>
>
>



RE: struts-config_1_0.dtd failure

2000-11-24 Thread James Wiltshire

Not sure if this is exactly the same thing, but I had a similar problem
yesterday - I think you need to add the following to your action servlet
configration in web.xml for your app.

  validate
  true


Sorted it out for me anyway!

Regards
James Wiltshire

-Original Message-
From: Christian STOIBER [mailto:[EMAIL PROTECTED]]
Sent: 24 November 2000 11:06
To: [EMAIL PROTECTED]
Subject: struts-config_1_0.dtd failure



I have a problem using the new action configuration:


resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN',
 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Not registered, use system identifier
Parse Fatal Error at line 5 column -1: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd".
org.xml.sax.SAXParseException: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd".
at com.sun.xml.parser.Parser.fatal(Parser.java:2817) ...


Cannot have a DTD declaration outside of a DTD. Line 26, Position 12

---^



thanks Christian



__
Der Austausch von Nachrichten mit Software Daten Service via E-Mail dient
ausschliesslich Informationszwecken. Rechtsgeschaeftliche Erklaerungen
duerfen
ueber dieses Medium nicht ausgetauscht werden.

Correspondence with Software Daten Service via e-mail is only for
information
purposes. This medium is not to be used for the exchange of legally-binding
communications.






Re: logic:iterate does not work with HashMap

2000-11-24 Thread Jannik Nørgaard Steen

Hi,

we looked in the Struts source code a second time. Line 283 and 284 says:

 else if (collection instanceof Map)
 iterator = ((Map) collection).entrySet().iterator();

This gets you an iterator of the *mappings* in the Map. So each element is a
java.util.Map.Entry - right ?
The doAfterBody method just put a Map.Entry in the pageContext for each
mapping in the HashMap.
So you would acutally have to do two  to get to the
value of each mapping in the entry set - one to retrieve the Map.Entry and
one to retrieve the value of the entry.

Is this the right way to do this ?

Regards,
Jannik

- Original Message -
From: "Jannik Nørgaard Steen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 24, 2000 12:21 PM
Subject: logic:iterate does not work with HashMap


> Hi,
>
> we're developing a web-app currently using Struts 0.5 milestone release.
> In this application we store a object in the session context that contains
a
> HashMap which we try to access
> from a JSP. This works fine.
> However when we try to iterate through the HashMap like this (contents
> property contains the HashMap):
>
>  name="com.smartmediatech.internet.beans.MaterialResult"
property="contents">
> ..
> ..
> 
>
> no materialItem bean is placed in the pageContext. This is odd because if
we
> use a ArrayList instead of a HashMap it works... but we need to use a
> HashMap for other reasons.
>
> We've looked in the iterate tag handler source code an cannot see why it
> does not work.
> Have we missed something or is this a bug ?
>
> Med venlig hilsen/Best Regards
>
> Jannik Nørgaard Steen
>
>
>




Re: Difference between action.xml and struts-config.xml

2000-11-24 Thread Pierre Métras

Hi Koen,

Use the struts-config.xml if you want to create a new application. It's the
new version 1.0 file format used by struts. For compatibility with version
0.5, Struts can read the old action.xml file. The version you choose to use
is defined in web.xml:


  action
  org.apache.struts.action.ActionServlet
  
config
/WEB-INF/struts-config.xml
  
...

Pierre Métras

- Original Message -
From: "De Smet Koen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 24, 2000 8:05 AM
Subject: Difference between action.xml and struts-config.xml


> Hello,
>
> We're looking at struts for a few days now and it looks good, but I was
> wondering the following:
>
> What's the difference between action.xml and struts-config.xml for the
> action mapping? I see that in both files you nearly define the same
things.
>
> Can somebody explain us the difference please?
>
> Thanks,
>
>
> Koen De Smet
> The Capital Markets Company
> T   +32 3 740 11 96
> F   +32 3 740 10 01
> Mobile   +32 497 51 88 51
> e-mailmailto:[EMAIL PROTECTED] 
> webhttp://www.capco.com/ 
>
>
> 
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorised. If you are not
> an intended recipient, you must not read, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of
> The Capital Markets Company.
>
> http://www.capco.com
> ***
>
>




AW: logic:equal help ?!?

2000-11-24 Thread Laufer, Michael
Title: logic:equal help ?!?



Hi 
Pierre,
 
thanks 
!!! That's it.
 
Sometimes the solution is so easy 
:-))
I've 
looked at that problem over hours without seeing the wrong slash 

 
Thanks 
again.
 
Michael

  -Ursprüngliche 
  Nachricht-Von: Pierre Métras 
  [mailto:[EMAIL PROTECTED]]Gesendet am: Freitag, 24. November 2000 
  14:41An: [EMAIL PROTECTED]Betreff: Re: 
  logic:equal help ?!?
  Hi Michael,
   
  That's a classic: rule true
  Remove the / from your opening tag and 
  everything will work as expected. The XML parser is not smart enough to 
  complain that it encountered a closing tag without opening...
  But take care that the comparison will try to 
  check for String comparison, and not the boolean true...
   
  Pierre Métras
   
  
- Original Message - 
From: 
Laufer, Michael 
To: 'Struts' 
Sent: Friday, November 24, 2000 6:41 
AM
Subject: logic:equal help ?!?

Hi, 
I've just started with the logic-library of the 
Struts framework I'm using the following 
code to create a dynamic html-table: 
   
          
    true    
         
                                                                 
No I'm facing the following problem: 
my rule true   code seems not to work correctly. My impression is that it doesnt compare the property 
"isActive" with the value "true".Because I'm always getting the text "rule 
true" in my table.
Am I using the equal-tag not correctly or am 
misunderstanding here something terribly ?? 
Any help would be appreciated. Thanks in advance. 
Mike 



Re: logic:equal help ?!?

2000-11-24 Thread Pierre Métras
Title: logic:equal help ?!?



Hi Michael,
 
That's a classic: rule 
true
Remove the / from your opening tag and 
everything will work as expected. The XML parser is not smart enough to 
complain that it encountered a closing tag without opening...
But take care that the comparison will try to check 
for String comparison, and not the boolean true...
 
Pierre Métras
 

  - Original Message - 
  From: 
  Laufer, Michael 
  To: 'Struts' 
  Sent: Friday, November 24, 2000 6:41 
  AM
  Subject: logic:equal help ?!?
  
  Hi, 
  I've just started with the logic-library of the 
  Struts framework I'm using the following 
  code to create a dynamic html-table: 
     
            
      true    
           
          
                                                           
  No I'm facing the following problem: 
  my rule true   code seems not to work correctly. My impression is that it doesnt compare the property 
  "isActive" with the value "true".Because I'm always getting the text "rule 
  true" in my table.
  Am I using the equal-tag not correctly or am 
  misunderstanding here something terribly ?? 
  Any help would be appreciated. Thanks in advance. 
  Mike 



RE: Difference between action.xml and struts-config.xml

2000-11-24 Thread Kevin Gibbs

As I undertand it...

action.xml was used up to the 0.5 milestone release.

The current development release is able to use either, but from v1.0+
action.xml will no longer be supported.

> -Original Message-
> From: De Smet Koen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 24, 2000 1:05 PM
> To: '[EMAIL PROTECTED]'
> Subject: Difference between action.xml and struts-config.xml
> 
> 
> Hello,
>  
> We're looking at struts for a few days now and it looks good, 
> but I was
> wondering the following:
>  
> What's the difference between action.xml and struts-config.xml for the
> action mapping? I see that in both files you nearly define 
> the same things.
>  
> Can somebody explain us the difference please?
>  
> Thanks,
>  
>  
> Koen De Smet
> The Capital Markets Company
> T   +32 3 740 11 96
> F   +32 3 740 10 01
> Mobile   +32 497 51 88 51 
> e-mailmailto:[EMAIL PROTECTED] 
>   
> webhttp://www.capco.com/   
>  
> 
> **
> **
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorised. If you are not
> an intended recipient, you must not read, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the 
> individual sender,
> except where the sender specifically states them to be the views of
> The Capital Markets Company.
> 
> http://www.capco.com
> **
> *
> 



Difference between action.xml and struts-config.xml

2000-11-24 Thread De Smet Koen

Hello,
 
We're looking at struts for a few days now and it looks good, but I was
wondering the following:
 
What's the difference between action.xml and struts-config.xml for the
action mapping? I see that in both files you nearly define the same things.
 
Can somebody explain us the difference please?
 
Thanks,
 
 
Koen De Smet
The Capital Markets Company
T   +32 3 740 11 96
F   +32 3 740 10 01
Mobile   +32 497 51 88 51 
e-mailmailto:[EMAIL PROTECTED]   
webhttp://www.capco.com/   
 


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Capital Markets Company.

http://www.capco.com
***




logic:equal help ?!?

2000-11-24 Thread Laufer, Michael
Title:  logic:equal  help ?!?





Hi,


I've just started with the logic-library of the Struts framework
I'm using the following code to create a dynamic html-table:



  
    
        true    
    
    
  
    
    
  
    
    
  
    
    
  
    
    
  
    
  



No I'm facing the following problem:
my
rule true   
code seems not to work correctly.
My impression is that it doesnt compare the property "isActive" with the value "true".Because I'm always getting the text "rule true" in my table.

Am I using the equal-tag not correctly or am misunderstanding here something terribly ??


Any help would be appreciated.
Thanks in advance.


Mike








RE: logic:iterate does not work with HashMap

2000-11-24 Thread Jon-Paul Harkin

I also have a similar problem but using a Vector instead of a HaspMap

Any feedback would be appreciated

Regards,
Jon-Paul


-Original Message-
From: Jannik Nørgaard Steen [mailto:[EMAIL PROTECTED]]
Sent: 24 November 2000 11:22
To: [EMAIL PROTECTED]
Subject: logic:iterate does not work with HashMap


Hi,

we're developing a web-app currently using Struts 0.5 milestone release.
In this application we store a object in the session context that contains a
HashMap which we try to access
from a JSP. This works fine.
However when we try to iterate through the HashMap like this (contents
property contains the HashMap):


..
..


no materialItem bean is placed in the pageContext. This is odd because if we
use a ArrayList instead of a HashMap it works... but we need to use a
HashMap for other reasons.

We've looked in the iterate tag handler source code an cannot see why it
does not work.
Have we missed something or is this a bug ?

Med venlig hilsen/Best Regards

Jannik Nørgaard Steen






logic:iterate does not work with HashMap

2000-11-24 Thread Jannik Nørgaard Steen

Hi,

we're developing a web-app currently using Struts 0.5 milestone release.
In this application we store a object in the session context that contains a
HashMap which we try to access
from a JSP. This works fine.
However when we try to iterate through the HashMap like this (contents
property contains the HashMap):


..
..


no materialItem bean is placed in the pageContext. This is odd because if we
use a ArrayList instead of a HashMap it works... but we need to use a
HashMap for other reasons.

We've looked in the iterate tag handler source code an cannot see why it
does not work.
Have we missed something or is this a bug ?

Med venlig hilsen/Best Regards

Jannik Nørgaard Steen





struts-config_1_0.dtd failure

2000-11-24 Thread Christian STOIBER


I have a problem using the new action configuration:


resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Not registered, use system identifier
Parse Fatal Error at line 5 column -1: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd".
org.xml.sax.SAXParseException: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd".
at com.sun.xml.parser.Parser.fatal(Parser.java:2817) ...


Cannot have a DTD declaration outside of a DTD. Line 26, Position 12

---^



thanks Christian



__
Der Austausch von Nachrichten mit Software Daten Service via E-Mail dient
ausschliesslich Informationszwecken. Rechtsgeschaeftliche Erklaerungen duerfen
ueber dieses Medium nicht ausgetauscht werden.

Correspondence with Software Daten Service via e-mail is only for information
purposes. This medium is not to be used for the exchange of legally-binding
communications.