RE: ActionError - java.lang.NummPointer Exception HELP!!!

2001-02-22 Thread Jason H. Kim

Seems like I use this mail group without giving enough thoughts to
problems..
If anyone has taken time to read my post about the error messages, I was
ignorant. The logs from the third method were not generated because
validation functions I used in my second method was wrong - so third method
was never called, since error.empty() was false.

Although I am still getting the nllpointer exception, I am very sure that
it's my configuration problem. I was kinda lost in my two previous posts
cause I though my computer was lying to me - I fell that way kinda often.

I will make sure that my future posts are the ones that I have given enough
thoughts to.

Thank you.

Jason H. Kim
Quatrix Emerging Technology Team
Phone: 314-993-5858 EXT: 137

-Original Message-
From: Jason H. Kim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 6:21 PM
To: [EMAIL PROTECTED]
Subject: RE: ActionError - java.lang.NummPointer Exception HELP!!!


oh.. and the exception message:



Context log: path="" Internal Servlet Error:

java.lang.NullPointerException:
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:18
95)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1430)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:490)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:475)



Thank you.

Jason H. Kim
Quatrix Emerging Technology Team
Phone: 314-993-5858 EXT: 137

-Original Message-
From: Jason H. Kim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 6:14 PM
To: Struts-User Mail Group
Subject: ActionError - java.lang.NummPointer Exception HELP!!!


First, thank you very much in advance for your help.

I am using struts 1.0 and I am getting Null pointer exception when running
validate(Mapping, request) and I am experiencing a coder's block.. if
there's such a thing..

Look at my validate(.., ..) function:

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
log4.debug("Validate:: arraySize = " + getArraySize());
if (!m_boIsProject && !m_boSigned) {
validateNumbers(errors);


if (errors.empty()) {
validateHours(errors);
}
log4.debug("");
if (errors == null) {
log4.debug("2. error is null...");
errors = new ActionErrors();
}
log4.debug("2. error is not null...");
if (errors.empty()) {
validateComments(errors);
}
}
return errors;
}

I am getting logj logs up till log4.debug("2. error is not null..."),
meaning errors did not become null - of course.. But the thing is, I don't
get the very first log message from validateComments(error), which should
execute as the first code inside the method.

the validate mathod was quite long, but I made some helper functions because
I thought it might solve the proble. - but since I am still using the
reference of errors, it will be basically the same, right? So... should  I
create new ActionErrors from my methods and return it? so that my main
validate method does get() to get Iterators and go through it??

Following is my code for validateComments(errors):










private void validateComments(ActionErrors errors) {
// Validate only iff all numbers are of valid hour.
log4.debug("Validate:: No error detected so far... Now checking comment
length validation...");
log4.debug("Validate:: isLengthValid for Sundar hour...");
for (int i=0; i


RE: ActionError - java.lang.NummPointer Exception HELP!!!

2001-02-22 Thread Jason H. Kim

oh.. and the exception message:



Context log: path="" Internal Servlet Error:

java.lang.NullPointerException:
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:18
95)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1430)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:490)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:475)



Thank you.

Jason H. Kim
Quatrix Emerging Technology Team
Phone: 314-993-5858 EXT: 137

-Original Message-
From: Jason H. Kim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 6:14 PM
To: Struts-User Mail Group
Subject: ActionError - java.lang.NummPointer Exception HELP!!!


First, thank you very much in advance for your help.

I am using struts 1.0 and I am getting Null pointer exception when running
validate(Mapping, request) and I am experiencing a coder's block.. if
there's such a thing..

Look at my validate(.., ..) function:

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
log4.debug("Validate:: arraySize = " + getArraySize());
if (!m_boIsProject && !m_boSigned) {
validateNumbers(errors);


if (errors.empty()) {
validateHours(errors);
}
log4.debug("");
if (errors == null) {
log4.debug("2. error is null...");
errors = new ActionErrors();
}
log4.debug("2. error is not null...");
if (errors.empty()) {
validateComments(errors);
}
}
return errors;
}

I am getting logj logs up till log4.debug("2. error is not null..."),
meaning errors did not become null - of course.. But the thing is, I don't
get the very first log message from validateComments(error), which should
execute as the first code inside the method.

the validate mathod was quite long, but I made some helper functions because
I thought it might solve the proble. - but since I am still using the
reference of errors, it will be basically the same, right? So... should  I
create new ActionErrors from my methods and return it? so that my main
validate method does get() to get Iterators and go through it??

Following is my code for validateComments(errors):










private void validateComments(ActionErrors errors) {
// Validate only iff all numbers are of valid hour.
log4.debug("Validate:: No error detected so far... Now checking comment
length validation...");
log4.debug("Validate:: isLengthValid for Sundar hour...");
for (int i=0; i


ActionError - java.lang.NummPointer Exception HELP!!!

2001-02-22 Thread Jason H. Kim

First, thank you very much in advance for your help.

I am using struts 1.0 and I am getting Null pointer exception when running
validate(Mapping, request) and I am experiencing a coder's block.. if
there's such a thing..

Look at my validate(.., ..) function:

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
log4.debug("Validate:: arraySize = " + getArraySize());
if (!m_boIsProject && !m_boSigned) {
validateNumbers(errors);


if (errors.empty()) {
validateHours(errors);
}
log4.debug("");
if (errors == null) {
log4.debug("2. error is null...");
errors = new ActionErrors();
}
log4.debug("2. error is not null...");
if (errors.empty()) {
validateComments(errors);
}
}
return errors;
}

I am getting logj logs up till log4.debug("2. error is not null..."),
meaning errors did not become null - of course.. But the thing is, I don't
get the very first log message from validateComments(error), which should
execute as the first code inside the method.

the validate mathod was quite long, but I made some helper functions because
I thought it might solve the proble. - but since I am still using the
reference of errors, it will be basically the same, right? So... should  I
create new ActionErrors from my methods and return it? so that my main
validate method does get() to get Iterators and go through it??

Following is my code for validateComments(errors):










private void validateComments(ActionErrors errors) {
// Validate only iff all numbers are of valid hour.
log4.debug("Validate:: No error detected so far... Now checking comment
length validation...");
log4.debug("Validate:: isLengthValid for Sundar hour...");
for (int i=0; i


Re: Jetspeed

2001-02-22 Thread Craig R. McClanahan

Jonathan Carlson wrote:

> Are there any Struts users that are also using JetSpeed?
>
> I am curious about how compatible JetSpeed is with Struts.  Judging by the
> JetSpeed documentation, I have inferred that it is better to use Turbine if
> also using JetSpeed.  Is this an accurate statement?
>

Last time I looked, Jetspeed was pretty heavily dependent on Turbine, so
you're
probably correct that using Turbine would be a good idea here.

>
> Any comments?
>
> Jonathan
>
> Jonathan Carlson,  Software Developer
> [EMAIL PROTECTED]
>
> Such ever was loves way: to rise, it stoops.
>  - Robert Browning
>
>

Craig



Re: using XML and Struts

2001-02-22 Thread Eduardo Pelegri-Llopart

Seems reasonable to me.

Also, somebody should write a tag to use JAXB (aka. adelard); I'll see
if the core team @ sun has any cycles, if not, perhaps somebody at
jakarta-taglibs will.

You can also use a tag that applies a transformation to an XML source.

Concepts on XML & JSP interaction can be found at:
http://java.sun.com/products/jsp/html/JSPXML.html.  Some may be even
useful :-)

- eduard/o

Craig Tataryn wrote:
> 
> >
> > The Struts functionality assumes you are working with data that is presented as
> > JavaBeans.  It sounds like you are faced with a situation where your data is
> > actually presented to you as XML.
> >
> > If so, you might explore some of the technologies for creating Java objects out
> > of XML-formatted data.  One such project is Castor at
> > .
> >
> > Even if none of that works out, using Struts to manage your control flow is
> > still a good idea :-).
> >
> > Craig McClanahan
> 
> If you need a really quick and dirty one (for prototyping lets say), I already made
> an XML->JavaBean builder.  Currently it only reads an XML file and infers what the
> resulting bean should look like and then spits it out.  I've been meaning to
> explore sucking in a DTD instead of the actual XML to do this, but I haven't gotten
> around to it yet :(  I've also got one in the works that just reads an XML file and
> dynamically creates getters/setters at runtime.  I'm sure this has been done
> before, but how else does one learn right :)
> 
> Let me know if you want it.
> 
> 
> 
> --
> I've been trying to change the world for years, but they just won't give me the
> source code



Jetspeed

2001-02-22 Thread Jonathan Carlson

Are there any Struts users that are also using JetSpeed?
 
I am curious about how compatible JetSpeed is with Struts.  Judging by the
JetSpeed documentation, I have inferred that it is better to use Turbine if
also using JetSpeed.  Is this an accurate statement?
 
Any comments?
 
Jonathan

Jonathan Carlson,  Software Developer 
[EMAIL PROTECTED] 

Such ever was loves way: to rise, it stoops.   
 - Robert Browning 


 



Re: Final Release 1.0 Time Frame

2001-02-22 Thread Craig R. McClanahan

Gerry Chike wrote:

> Hi Craig,
> Do you have a "time frame" for the final release of Struts 1.0? I'm working on a 
>project that needs to make either a Go or No-go based on the timing of the final 
>release. I appreciate any thoughts or feedback regarding this issue.

As it happens, I'm going to be creating the Beta 1 release this afternoon (just licked 
the last problem reported in the bug tracking system).  I would anticipate the time 
between beta 1 and a final release to be a small number of
weeks -- the only new "functionality" that I want to see added is unit tests, so there 
should be no disruption of the stability of basic Struts features.

>
> Thanks,
> Gerry
>

Craig


>
> Good, Cheap, or Fast: Pick any two.

It's amazing how many people don't remember this :-)





Re: CheckLogOn Tag.

2001-02-22 Thread Maya Muchnik



Peri,
Check with struts-example. You can find CheckLogonTag.java (and class).
If you "play" with this example, then you can see that a menu is changing
depending on you are logon or not.
Maya
Peri Srinivas wrote:

Hi
All,   
Generic  requirement for this tag  would   be  
name - Name of the session-scope bean to check for [user] 
page - Context-relative path to the logon page [/logon.jsp]
and  also.. 
next page --  page to show  after  suceessful 
page. Eg:    a.jsp,b.jsp 
,which should  be displayed  only after   successful
login.   
login.jsp   is the  login page.   
when i click on  a.jsp, i  should  get login.jsp  and 
after  succesful login  should go back to a.jsp.   
when i click on  b.jsp, i  should  get login.jsp  and 
after  succesful login  should go back to b.jsp. Does
Struts provide  this with 1.0.  Thanks,Peri





Final Release 1.0 Time Frame

2001-02-22 Thread Gerry Chike

Hi Craig,
Do you have a "time frame" for the final release of Struts 1.0? I'm working on a 
project that needs to make either a Go or No-go based on the timing of the final 
release. I appreciate any thoughts or feedback regarding this issue.

Thanks,
Gerry




Good, Cheap, or Fast: Pick any two.
---
   .   .Gerry Chike
  .|. .|.   IT Engineer, CSE-IT
 .|||.   .|||.  Cisco Systems - RTP
.|. .|. Phone: +1 919.392.2701
  .:|||:. .:|||:.   7025 Kit Creek Rd RTP, NC 27709-4987
   Cisco Systems[EMAIL PROTECTED]
---





CheckLogOn Tag.

2001-02-22 Thread Peri Srinivas



Hi All,
        Generic  
requirement for this tag  would   be  
        
        
      name - Name of the session-scope bean to check for 
[user]
     
 page - Context-relative path to the logon page 
[/logon.jsp] and  
also..
  
next page --  page to show  after  
suceessful  page.
 
Eg:
    a.jsp,b.jsp  ,which 
should  be displayed  only after   successful 
login.
    login.jsp   is 
the  login page.
    when i click on  a.jsp, 
i  should  get login.jsp  and  after  succesful 
login  should go back to a.jsp.

    when i click on  b.jsp, 
i  should  get login.jsp  and  after  succesful 
login  should go back to b.jsp.
 
Does Struts provide  this with 
1.0.
 
 
Thanks,
Peri


Re: JUNIT and Struts

2001-02-22 Thread Vincent Massol

Hi,


J2EEUnit does support reading web.xml file and I have already used it to
test some struts features. Yuri is absolutely right about his 3 points
(MVC).


Thanks.
Vincent.

- Original Message -
From: "Shkuro, Yuri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 22, 2001 5:48 PM
Subject: RE: JUNIT and Struts


> Since Struts is MVC:
>
> 1. Model: put all business logic into beans and use JUNIT as usual to test
> them.
>
> 2. View: you can try using HttpUnit, but it's a pain to test HTML output.
>
> 3. Controller: you can probably use J2EEUnit to test Action classes,
however
> I
>don't know if they support reading web.xml file, which you would need
in
> order
>to properly initialize ActionServlet or any extensions of it (e.g., I
am
> using
>an extension that also depends on some 's from web.xml
to
> do
>application-specific initialization).
>
> Struts 1.1 TODO list contains entries for unit testing framework extension
> to Struts.
>
> YS.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 11:16 AM
> To: [EMAIL PROTECTED]
> Subject: JUNIT and Struts
>
>
> Hello,
>
> We are using the XP development
process(http://www.extremeprogramming.org/)
> as
> we develop our Struts web application.  We need to write some tests in
> JUnit(http://www.junit.org) to incrementally test as we write code.  Has
> anyone
> ever used JUnit with Struts?  Does anyone have any advice about how to
> proceed
> in coding these tests?
>
> TIA,
>
> Julia
>
>




Re: using XML and Struts

2001-02-22 Thread Craig Tataryn

>
> The Struts functionality assumes you are working with data that is presented as
> JavaBeans.  It sounds like you are faced with a situation where your data is
> actually presented to you as XML.
>
> If so, you might explore some of the technologies for creating Java objects out
> of XML-formatted data.  One such project is Castor at
> .
>
> Even if none of that works out, using Struts to manage your control flow is
> still a good idea :-).
>
> Craig McClanahan

If you need a really quick and dirty one (for prototyping lets say), I already made
an XML->JavaBean builder.  Currently it only reads an XML file and infers what the
resulting bean should look like and then spits it out.  I've been meaning to
explore sucking in a DTD instead of the actual XML to do this, but I haven't gotten
around to it yet :(  I've also got one in the works that just reads an XML file and
dynamically creates getters/setters at runtime.  I'm sure this has been done
before, but how else does one learn right :)

Let me know if you want it.



--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Re: using XML and Struts

2001-02-22 Thread Craig R. McClanahan

"Fickes, Vic" wrote:

> Thanks for all of the responses.
> Most of the suggestions discussed ways to address the presentation part of
> the problem, but I guess my real problem is that once I have translated the
> XML data for display as standard html, I don't see how I can really make use
> of any of Struts capabilities, such as automatically loading and unloading
> forms using the get/set properties methods and doing validation.  This is
> the problem for which I don't see a workaround.  I suppose I could still use
> Struts in a limited fashion to help with control flow, but as a neophyte, I
> really want to use the entire Struts framework to provide me with some
> "guidance" on the proper way to develop a web application, so it looks as
> though it would be better to drop the idea of accessing my data via legacy
> XML functions.  As Michael suggested, I may not be really gaining that much
> by trying to do this, anyway.
>
> Vic

The Struts functionality assumes you are working with data that is presented as
JavaBeans.  It sounds like you are faced with a situation where your data is
actually presented to you as XML.

If so, you might explore some of the technologies for creating Java objects out
of XML-formatted data.  One such project is Castor at
.

Even if none of that works out, using Struts to manage your control flow is
still a good idea :-).

Craig McClanahan





RE: using XML and Struts

2001-02-22 Thread Fickes, Vic

Thanks for all of the responses.  
Most of the suggestions discussed ways to address the presentation part of
the problem, but I guess my real problem is that once I have translated the
XML data for display as standard html, I don't see how I can really make use
of any of Struts capabilities, such as automatically loading and unloading
forms using the get/set properties methods and doing validation.  This is
the problem for which I don't see a workaround.  I suppose I could still use
Struts in a limited fashion to help with control flow, but as a neophyte, I
really want to use the entire Struts framework to provide me with some
"guidance" on the proper way to develop a web application, so it looks as
though it would be better to drop the idea of accessing my data via legacy
XML functions.  As Michael suggested, I may not be really gaining that much
by trying to do this, anyway.

Vic




Problem running Struts with JRun 3.0

2001-02-22 Thread Keju Ma


I just upgraded Struts from the 2000-12-15 build to the most current one,
and
encountered the following problem with JRun 3.0:

--

javax.servlet.ServletException: Compilation error occured: 
 
allaire.jrun.scripting.DefaultCFE: 

Errors reported by compiler:

C:/Program
Files/Allaire/JRun/servers/default/bis/WEB-INF/jsp/jrun__openReports2ejsp10.
java:163:1:163:29:
Error: No match was found for method "setFilter(java.lang.String)".

C:/Program
Files/Allaire/JRun/servers/default/bis/WEB-INF/jsp/jrun__openReports2ejsp10.
java:176:1:176:29:
Error: No match was found for method "setFilter(java.lang.String)".

C:/Program
Files/Allaire/JRun/servers/default/bis/WEB-INF/jsp/jrun__openReports2ejsp10.
java:189:1:189:29:
Error: No match was found for method "setFilter(java.lang.String)".

at
allaire.jrun.scripting.JavaCompilerService.compile(JavaCompilerService.java:
122)
at allaire.jrun.jsp.JSPServlet.compilePage(JSPServlet.java:458)
at allaire.jrun.jsp.JSPServlet.createServlet(JSPServlet.java:399)
at allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:202)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:169)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:367)
at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(WorkerThread.java:75)


--

It appeared that the JRun Jsp engine couldn't find the setFilter method in
the class
org.apache.struts.taglib.bean.WriteTag.

Prior to the upgrade, everything was ok. Does any one know the cause of this
problem?

Any help would be appreciated.

Keju



Re: Struts in Websphere, missing resources attribute...

2001-02-22 Thread rbackhouse

Make sure that you don't put the struts.jar in the admin.config or 
adminserver script classpath. Just put it in the war file at 
WEB-INF/lib.

Have you tried converting the struts-example war ?

Quoting Wayland Chan <[EMAIL PROTECTED]>:

> Sorry, I should have mentioned that I'm using Struts
> 0.5 and WAS 3.5.2
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices!
> http://auctions.yahoo.com/
> 



Re: using XML and Struts

2001-02-22 Thread Craig R. McClanahan

"Fickes, Vic" wrote:

> Hi,
>
> Being new to the world of web applications and Struts, I'm still trying to
> decide on an architecture to use for our application.
> One of the things I had been hoping to do was to make use of some legacy
> code that publishes XML from our database and then translates it to HTML
> using XSL.  However, it seems you can't use XSL to translate to Struts html
> tags (or any JSP custom tags).   So before I completely drop the idea of
> using XML and XSL, does anybody know of any approach that would allow me to
> use XML in the context of the Struts framework?
>
> I thought of using Digester, but since this is all new to me, my first
> impression was that the implementation would get to be too complicated to
> make it worthwhile.  I also ran into the Cocoon project in my wanderings,
> which seems like a great solution if all you're going to do is builds
> displays, but I've got to do some heavy duty editing and validating of input
> data and I don't see how Coccon supports that.  If anybody could provide
> some suggestions on using these or any other approachs, I'd appreciate it.
>

One integration opportunity is the  custom tag, which is available
in the Jakarta Taglibs project .  This tag
lets you dynamically request XSLT transformations over XML data gathered from
any of a variety of places, and then render the transformed information
(presumably HTML in this case) to the resulting page.

In a similar vein, Struts itself uses offline XSLT transformations to create the
documentation pages you see in the Struts Documentation application.  The Ant
build tool  has a 

Re: Select/Options Tag

2001-02-22 Thread Craig R. McClanahan

"Chalmers, Douglas" wrote:

> A tag reference can maintain a String from a SELECT statement within a
> form bean, but only the ONE actually selected..
>
> How can I maintain ALL the OPTIONS within a SELECT box within a form
> bean??
>

This bug was just fixed, so you will need the most current nightly
release.  You can now have a property that returns a String array, and use
it to back a SELECT statement that allows multiple options:


... Use  and/or  here ...


and Struts will correctly remember all of the selected values, based on
the contents of your array.

There is a test page (html-select.jsp) in the Struts test application
(struts-test.war) that illustrates how this works.


>
> Doug Chalmers
> Software Development
> Petrotechnics Ltd
> Exploration House
> Exploration Drive
> Aberdeen
> 707303 (Ext 14)

Craig





Re: Struts in Websphere, missing resources attribute...

2001-02-22 Thread Wayland Chan

Sorry, I should have mentioned that I'm using Struts
0.5 and WAS 3.5.2



__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/



RE: using XML and Struts

2001-02-22 Thread Kitching Simon



> -Original Message-
> From: Craig Tataryn [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 6:06 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: using XML and Struts
> 
> Vic, IMHO you could fit XML into your solution as far as presentation goes
> by
> simply making yourself a JSP page that reads a session var that a
> controller
> servlet setup which contains the XML doc in it.
> 
> You would probably want to do something like this (this is just adhoc
> code,
> syntax isn't correct):
> 
> In your controller:
> 
> xmlDoc.parse("appropriateXML.xml");
> xmlDoc.transform("appropriateXSL.xsl");
> request.setAttribute("xml", xmlDoc);
> mappings.findForward("displayResults");
> 
> In displayResults.jsp:
> 
> 
> <%= request.getAttribute("xml").toString() %>
> 
> Hope that leads you in the right direction,
> 
> 
[Kitching Simon]  

Or perhaps write a servlet that does fetch, parse, 
transform operations, and then use a tag
 to import that data into 
the relevate jsp/view?

The servlet could be passed parameters from 
the jsp page to indicate what xml data and 
what format are to be fetched...hmm, sounds
like cocoon!

> "Fickes, Vic" wrote:
> 
> > Hi,
> >
> > Being new to the world of web applications and Struts, I'm still trying
> to
> > decide on an architecture to use for our application.
> > One of the things I had been hoping to do was to make use of some legacy
> > code that publishes XML from our database and then translates it to HTML
> > using XSL.  However, it seems you can't use XSL to translate to Struts
> html
> > tags (or any JSP custom tags).   So before I completely drop the idea of
> > using XML and XSL, does anybody know of any approach that would allow me
> to
> > use XML in the context of the Struts framework?
> >
> > I thought of using Digester, but since this is all new to me, my first
> > impression was that the implementation would get to be too complicated
> to
> > make it worthwhile.  I also ran into the Cocoon project in my
> wanderings,
> > which seems like a great solution if all you're going to do is builds
> > displays, but I've got to do some heavy duty editing and validating of
> input
> > data and I don't see how Coccon supports that.  If anybody could provide
> > some suggestions on using these or any other approachs, I'd appreciate
> it.
> >
> > Thanks,
> > Vic
> 
> --
> I've been trying to change the world for years, but they just won't give
> me the
> source code
>  << File: Card for Craig Tataryn >> 



RE: using XML and Struts

2001-02-22 Thread Michael S. Kelly

I guess my first thought is that maybe you don't need the legacy code.
Think about what problem is being solved by the legacy code.  I think you
will find that Struts also solves those problems, or a significant subset of
them.  I'd suggest that you do a small proof of concept with Struts,
something that contains the main features of your target application (e.g.
authentication; authorization; the ability to add, edit, and delete data;
forms that change depending on authorization; etc.).  I think of this as
being a holographic proof of concept, it contains a reflection of the whole.
The point is to quickly get an indepth understanding of the what problems
Struts solves and how it solves them, and there's no substitute for actually
digging in and using something to get that understanding.

My 2 cents.

-=michael=-

-Original Message-
From: Fickes, Vic [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 7:58 AM
To: [EMAIL PROTECTED]
Subject: using XML and Struts


Hi,

Being new to the world of web applications and Struts, I'm still trying to
decide on an architecture to use for our application.
One of the things I had been hoping to do was to make use of some legacy
code that publishes XML from our database and then translates it to HTML
using XSL.  However, it seems you can't use XSL to translate to Struts html
tags (or any JSP custom tags).   So before I completely drop the idea of
using XML and XSL, does anybody know of any approach that would allow me to
use XML in the context of the Struts framework?

I thought of using Digester, but since this is all new to me, my first
impression was that the implementation would get to be too complicated to
make it worthwhile.  I also ran into the Cocoon project in my wanderings,
which seems like a great solution if all you're going to do is builds
displays, but I've got to do some heavy duty editing and validating of input
data and I don't see how Coccon supports that.  If anybody could provide
some suggestions on using these or any other approachs, I'd appreciate it.

Thanks,
Vic




Re: Struts in Websphere, missing resources attribute...

2001-02-22 Thread rbackhouse

My instructions were for installing struts 0.5. If you are using Struts
1.0 then I understand there are some complications with the change to using
struts-config.xml instead of action.xml. Specifically struts-config.xml now
uses a dtd and the websphere classloader has problems finding the dtd. I 
haven't actually tried struts 1.0 with websphere so I can't tell you definitely
that that is the only problem. I think some other people have worked around this
issue so I would continue to seach through the archives.

On the issue of the convert war tool the reason you don't see the same directory
structure as in the war file is because the convert tool converts to websphere
format which is different. The tool should set up the correct classpaths and
document paths that websphere understands.

FYI WebSphere 4.0 will support wars (ears, ejb-jars etc) natively as it will be
j2ee compliant. Hopefully it will be out in the summer.

Richard

Quoting Wayland Chan <[EMAIL PROTECTED]>:

> 
> Hello,
> 
> I've been trying to get Struts to work in Websphere
> and am running into problems.
> 
> I've been following Richard Backhouse's instructions
> (http://archive.covalent.net/jakarta/struts-user/2000/10/0392.xml)
> and I'm getting the infamous missing resources
> error
> 
> Missing resources attribute
> org.apache.struts.action.MESSAGE
> error.
> 
> I've noticed that Websphere's 'Convert a War File'
> task, it doesn't seem to create the webapp as you'd
> expect. ie. I have no WEB-INF/lib or WEB-INF/classes
> directories as I'd expect within the webapp. I can
> assume this is because WAS' doesn't support WAR files.
> 
> One thing I couldn't do according to Richard's
> instructions was changing WAS' classpath in
> admin.config or adminserver.bat/sh. admin.config
> didn't seem to have a general classpath to modify and
> I don't have the adminserver.bat/sh files in my 3.5
> installation. I do have setenv.bat which I've modified
> to add the jaxp.jar, crimson.jar, xalan.jar to the
> classpath.
> 
> Anyone tackle this problem yet?
> 
> Thanks,
> 
> Wayland Chan
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices!
> http://auctions.yahoo.com/
> 



Re: Struts in Websphere, missing resources attribute...

2001-02-22 Thread Wayland Chan

I've found the adminserver.bat and changed the
classpath to include jaxp.jar, crimson.jar, xalan.jar
(and what the hell, struts.jar for the hell of it
too).

I'm noticing in my Admin Console the following error:

2/22/01 12:10 PM : AUDIT [daytona/Default Server]:
SRVE0092I: [Servlet LOG]: "database: Database load
exception": org.xml.sax.SAXNotRecognizedException:
Feature: http://xml.org/sax/features/raw-names

So the missing resources error isn't really valid in
this sense as my struts-example webapp hasn't started properly.

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/



Re: using XML and Struts

2001-02-22 Thread Craig Tataryn

Vic, IMHO you could fit XML into your solution as far as presentation goes by
simply making yourself a JSP page that reads a session var that a controller
servlet setup which contains the XML doc in it.

You would probably want to do something like this (this is just adhoc code,
syntax isn't correct):

In your controller:

xmlDoc.parse("appropriateXML.xml");
xmlDoc.transform("appropriateXSL.xsl");
request.setAttribute("xml", xmlDoc);
mappings.findForward("displayResults");

In displayResults.jsp:


<%= request.getAttribute("xml").toString() %>

Hope that leads you in the right direction,



"Fickes, Vic" wrote:

> Hi,
>
> Being new to the world of web applications and Struts, I'm still trying to
> decide on an architecture to use for our application.
> One of the things I had been hoping to do was to make use of some legacy
> code that publishes XML from our database and then translates it to HTML
> using XSL.  However, it seems you can't use XSL to translate to Struts html
> tags (or any JSP custom tags).   So before I completely drop the idea of
> using XML and XSL, does anybody know of any approach that would allow me to
> use XML in the context of the Struts framework?
>
> I thought of using Digester, but since this is all new to me, my first
> impression was that the implementation would get to be too complicated to
> make it worthwhile.  I also ran into the Cocoon project in my wanderings,
> which seems like a great solution if all you're going to do is builds
> displays, but I've got to do some heavy duty editing and validating of input
> data and I don't see how Coccon supports that.  If anybody could provide
> some suggestions on using these or any other approachs, I'd appreciate it.
>
> Thanks,
> Vic

--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



RE: JUNIT and Struts

2001-02-22 Thread Shkuro, Yuri

Since Struts is MVC:

1. Model: put all business logic into beans and use JUNIT as usual to test
them.

2. View: you can try using HttpUnit, but it's a pain to test HTML output.

3. Controller: you can probably use J2EEUnit to test Action classes, however
I
   don't know if they support reading web.xml file, which you would need in
order
   to properly initialize ActionServlet or any extensions of it (e.g., I am
using
   an extension that also depends on some 's from web.xml to
do 
   application-specific initialization).

Struts 1.1 TODO list contains entries for unit testing framework extension
to Struts.

YS.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 11:16 AM
To: [EMAIL PROTECTED]
Subject: JUNIT and Struts


Hello,

We are using the XP development process(http://www.extremeprogramming.org/)
as
we develop our Struts web application.  We need to write some tests in
JUnit(http://www.junit.org) to incrementally test as we write code.  Has
anyone
ever used JUnit with Struts?  Does anyone have any advice about how to
proceed
in coding these tests?

TIA,

Julia



Struts in Websphere, missing resources attribute...

2001-02-22 Thread Wayland Chan


Hello,

I've been trying to get Struts to work in Websphere
and am running into problems.

I've been following Richard Backhouse's instructions
(http://archive.covalent.net/jakarta/struts-user/2000/10/0392.xml)
and I'm getting the infamous missing resources
error

Missing resources attribute
org.apache.struts.action.MESSAGE
error.

I've noticed that Websphere's 'Convert a War File'
task, it doesn't seem to create the webapp as you'd
expect. ie. I have no WEB-INF/lib or WEB-INF/classes
directories as I'd expect within the webapp. I can
assume this is because WAS' doesn't support WAR files.

One thing I couldn't do according to Richard's
instructions was changing WAS' classpath in
admin.config or adminserver.bat/sh. admin.config
didn't seem to have a general classpath to modify and
I don't have the adminserver.bat/sh files in my 3.5
installation. I do have setenv.bat which I've modified
to add the jaxp.jar, crimson.jar, xalan.jar to the
classpath.

Anyone tackle this problem yet?

Thanks,

Wayland Chan


__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/



Re: tag and cancel functionality

2001-02-22 Thread Maya Muchnik

Thank you for asking this question. I need resolve this too. We use some images to 
"submit", "cancel" and other option.  Can somebody help with this?

Thanks in advance.

Maya

"Christophe Thiébaud" wrote:

> We are using the  tag to produce graphical buttons. This tag 
>writes a HTML tag .
>
> the problem with the  tag is that it submits "aaa.x" and "aaa.y" 
>parameters rather than the usual "aaa" parameter.
>
> Thus I cannot use the  for a cancel function because the
> ActionServlet tests for Constants.CANCEL_PROPERTY, in a request that include only 
>Constants.CANCEL_PROPERTY.x  and Constants.CANCEL_PROPERTY.y parameters.
>
> So I have subclassed the ActionServlet and Action classes as below
>
> ActionServlet (row 1851)
>  if (request.getParameter(Constants.CANCEL_PROPERTY) != null) {
> ...
> MYActionServlet:
>  if (request.getParameter(Constants.CANCEL_PROPERTY) != null
> ||
> request.getParameter(Constants.CANCEL_PROPERTY+".x") != null) {
>  ...
>
> Action (row 457)
> protected boolean isCancelled(HttpServletRequest request) {
> return (request.getParameter(Constants.CANCEL_PROPERTY) != null);
>
> MYAction
> protected boolean isCancelled(HttpServletRequest request) {
> if (super.isCancelled(request))
> return true;
> return 
>(request.getParameter(org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY+".x") 
>!= null);
> }
>
> Isn't there a better way to handle this problem ?
> anybody else using  to handle cancel ?
>
> Christophe




JUNIT and Struts

2001-02-22 Thread Julia Reynolds

Hello,

We are using the XP development process(http://www.extremeprogramming.org/) as
we develop our Struts web application.  We need to write some tests in
JUnit(http://www.junit.org) to incrementally test as we write code.  Has anyone
ever used JUnit with Struts?  Does anyone have any advice about how to proceed
in coding these tests?

TIA,

Julia




tag and cancel functionality

2001-02-22 Thread Christophe Thiébaud

We are using the  tag to produce graphical buttons. This tag writes 
a HTML tag .

the problem with the  tag is that it submits "aaa.x" and "aaa.y" 
parameters rather than the usual "aaa" parameter.

Thus I cannot use the  for a cancel function because the
ActionServlet tests for Constants.CANCEL_PROPERTY, in a request that include only 
Constants.CANCEL_PROPERTY.x  and Constants.CANCEL_PROPERTY.y parameters.

So I have subclassed the ActionServlet and Action classes as below

ActionServlet (row 1851)
 if (request.getParameter(Constants.CANCEL_PROPERTY) != null) {
...
MYActionServlet:
 if (request.getParameter(Constants.CANCEL_PROPERTY) != null
||
request.getParameter(Constants.CANCEL_PROPERTY+".x") != null) {
 ...

Action (row 457)
protected boolean isCancelled(HttpServletRequest request) {
return (request.getParameter(Constants.CANCEL_PROPERTY) != null);

MYAction
protected boolean isCancelled(HttpServletRequest request) {
if (super.isCancelled(request))
return true;
return 
(request.getParameter(org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY+".x") != 
null);
}

Isn't there a better way to handle this problem ?
anybody else using  to handle cancel ?

Christophe



using XML and Struts

2001-02-22 Thread Fickes, Vic

Hi,

Being new to the world of web applications and Struts, I'm still trying to
decide on an architecture to use for our application.
One of the things I had been hoping to do was to make use of some legacy
code that publishes XML from our database and then translates it to HTML
using XSL.  However, it seems you can't use XSL to translate to Struts html
tags (or any JSP custom tags).   So before I completely drop the idea of
using XML and XSL, does anybody know of any approach that would allow me to
use XML in the context of the Struts framework?  

I thought of using Digester, but since this is all new to me, my first
impression was that the implementation would get to be too complicated to
make it worthwhile.  I also ran into the Cocoon project in my wanderings,
which seems like a great solution if all you're going to do is builds
displays, but I've got to do some heavy duty editing and validating of input
data and I don't see how Coccon supports that.  If anybody could provide
some suggestions on using these or any other approachs, I'd appreciate it.

Thanks,
Vic



RE: passing substitution parameters to ActionError still working?

2001-02-22 Thread Deadman, Hal



I 
changed UserForm.MIN_PASSWORD_LENGTH to an Integer from an int but I am still 
getting the same problem. Isn't MK Kan Leung having the same problem as 
me?  Here is his post repeated:

Hi all,
I have a property file like 
this:
common.copyright={0} 
Copyright
I used the following tag to retrieve 
the message:

The displayed message 
becomes:
[Ljava.lang.Object;@47393f 
Copyright
 
Any clue?

  -Original Message-From: Craig R. McClanahan 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 21, 
  2001 7:27 PMTo: [EMAIL PROTECTED]Subject: 
  Re: passing substitution parameters to ActionError still 
  working?"Deadman, Hal" wrote: 
   I have a form where I call the following (where 
UserForm.MIN_PASSWORD_LENGTH is an int):errors.add("password", new 
ActionError("error.user.passwordinvalid", 
String.valueOf(UserForm.MIN_PASSWORD_LENGTH)));which references 
this in the ApplicationResource.properties file:error.user.passwordinvalid=The password 
must contain at least {0} characters. But the html:error 
tag displays this: 
The password must contain at least 
[Ljava.lang.Object;@14f467 characters.  I could have sworn 
that this used to work but it doesn't anymore for me. Does passing 
parameters to ActionError objects still work for everyone with recent 
builds? If it still works then I must have broke 
something. Thanks, Hal
  You should be able to pass the length as an object of type Integer, and 
  let the message formatting methods worry about converting it to a String: 
      errors.add("password", new 
  ActionError("error.user.passwordinvalid", 
      new 
  Integer(UserForm.MIN_PASSWORD_LENGTH)); 
  The parameter values are all Objects rather than Strings. 
  Craig   


RE: ActionForm.reset()

2001-02-22 Thread Christian Billen

Thanks for your prompt response, I believe it will not work for the
following reason:

My preparation action does thing such as setting collection for html:options
in request attribute.  Imagine that PrepAction initialize a new ActionForm
setting the defaults and overwritting the one created by the controller, we
now forward to the jsp view and all fields are set to their default.  so far
so good.
Next the user enters data, I post that request to the action that
validates...this action makes server call, create some errors and forward
back to preparation handler (because it needs to do so since I have code in
there to build up my collection for the html:options)
Now this prep handler will create a new ActionForm effectively resetting the
one with all the data filled in by the user.  Not the desired effect.

A suggestion would be to configure the defaults value as config parameters
in the struts-config.xml at the Action Mapping level.  Something like
blahsomedefault

Am I making sense of all this?

Thanks,

Christian
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 11:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: ActionForm.reset()
>
>
> Christian Billen wrote:
>
> > Hi list,
> >
> > Is there a way to prevent the reset() method from being called on the
> > ActionForm when the validate option in struts-config for that
> mapping is set
> > to false?
> >
>
> Doing this would break the recommended approach for dealing with
> checkboxes,
> which rely on reset() being called to reset the corresponding booleans to
> false.  You will want this to occur even if you are not
> validating, so that the
> bean properties correctly reflect what the user last entered.
>
> >
> > My problem is that I have an Action to prepare the data for a
> jsp page and
> > another Action to process the data from that jsp. Both point to the same
> > ActionForm class.
> > In my prep action (/prepare.do), I configured the mapping not
> to validate
> > the form, but still I see that the reset() method is being called, very
> > annoying considering that some properties in my actionform are set to a
> > default in the constructor (like a checkbox set to true) and that I have
> > code in reset of the same form to clear checkboxes.  Shouldn't reset be
> > called by the controller only when validate is true?
> >
>
> The Struts example application faces a similar situation.  In the
> EditSubscriptionAction, it creates a new form bean (initialized
> to defaults in
> the constructor) and *replaces* the one that was created by the controller
> servlet (and on which reset() was called).  You might consider
> using a similar
> technique.
>
> Craig McClanahan
>
>
> >
> > Thanks for your advise,
> >
> > Christian Billen
>
>
>




Change ApplicationResources.properties dynamically ?

2001-02-22 Thread Laufer, Michael
Title: Change ApplicationResources.properties dynamically ?





Hi,


is there any way to switch the used ApplicationResources.properties file
within a session ?


Any help would be appreciated.


Thanks in advance,


Michael



entory AG
Becker-Goering-Str. 26
D-76307 Karlsbad-Ittersbach
Phone   +49 (0) 72 48/73-364
mailto:[EMAIL PROTECTED]
http://www.entory.com









Re: Small problem with TRANSACTION_TOKEN_KEY + multipart support

2001-02-22 Thread Rob Leland


When I originally implemented this
I had a custom tag that generated the token.

I had envisioned having the  tag
generate the token for you.
However, that is not they way Craig eventually
implemented it.

Alternatively, you can download the old implementation:

http://marc.theaimsgroup.com/?l=struts-dev&m=97119585909952&w=2
http://marc.theaimsgroup.com/?l=struts-dev&m=97119647211699&w=2

These are a separate set of classes not tied to struts
so they will still work. There is JavaDoc for it.

If this method works for you then that would be a good
reason to take a look at the custom tag approach again.

-ROb

Richard Reich wrote:
> 
> The transaction enforcement support in class Action assumes that the key
> will be returned in the request attributes.  This is not the case with pages
> that require multipart support (for file uploads, for example).  A direct
> work-around exists -- just use the generateToken() and saveToken() methods,
> handle schlepping the key in the form yourself, and write your own one-liner
> to compare the schlepped key with the stored one.
> 
> It took me an embarrassingly long time to find this problem because of my
> (deserved) faith in Struts.   Maybe it should be documented, though
> devoting resources to fix it now is probably not necessary.
> 
> -r
> 
> Richard Reich
> http://reich.com
> http://calendar.yahoo.com/richard+reich



Re: auto reload of message resource and URL-rewrite

2001-02-22 Thread Maya Muchnik

Kan is correct. I did have admin subdir under struts-example either.

"Kan Leung, MK" wrote:

> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 22, 2001 2:06 AM
> Subject: Re: auto reload of message resource and URL-rewrite
>
> > At the bottom of the struts-config.xml file for the example
> application, you
> > will see an action definition:
> >
> >  > type="org.apache.struts.actions.ReloadAction"/>
> >
> > which means you can send a request to the following URL (assuming the
> normal
> > *.do mapping):
> >
> > http://localhost:8080/struts-example/admin/reload.do
> >
> > and the Struts controller servlet will reload all of the configuration
> files
> > and message resources (but not the Java classes -- you have to ask
> your
> > servlet container to reload the app in order to accomplish that).
> >
> > You can use any of these standard actions in your own applications as
> well.
>
> Apache "page not found" error is experienced. I did include a handler
> for *.do in tomcat-apache.conf file! I'm still unable to reload resource
> file in runtime.
>
> ===CUT===
> Not Found
>
> The requested URL /struts-example/admin/reload.do was not found on this
> server.
>
> Apache/1.3.12 Server at localhost Port 80
> ===CUT===
>
> --
> Kan LEUNG, M K
> email: [EMAIL PROTECTED]
> Digital Empires Company Limited




Re: Missing struts-config_1_0.dtd when not logged on

2001-02-22 Thread Maya Muchnik

Tom,

Tomcat includes a local copy of web_app_2_2.dtd file, but the file name is web.dtd. 
Maybe this is your problem. In my application I am going to replace a reference to Sun 
site of web_app_2_2.dtd to a local copy of web.dtd (I will copy it to the WEB-INF/dtds 
directory).
Maya

Tom Miller wrote:

> "Craig R. McClanahan" wrote:
>
> > DONNIE HALE wrote:
> >
> > > Tom,
> > >
> > > First, the web.xml file isn't parsed by the ActionServlet; it's parsed by the 
>servlet engine when it's initializing a web application (web.xml is part of the 
>standard for defining the properties/characteristics of a "web application"). It 
>should be completely parsed and accepted as correct by the time ActionServlet.init() 
>is called, during which the struts-config.xml file is parsed.
> > >
> >
> > Actually, a recent change to ActionServlet means that it *does* do a 
>non-validating parse of web.xml as well (to figure out what  it is 
>invoked under).  This is necessary to make correct recognition of the action 
>attribute in  work on path-mapped servlets.
> >
> > Struts includes a local copy of the struts-config DTD file, and Tomcat 3.2.1 
>includes a local copy of the web.xml DTD file -- which should both be used when you 
>specify a public identifier that matches (as it appears you are doing).  Have you by 
>any chance changed the parser that came with Tomcat (jaxp.jar and parser.jar), or 
>tried to put a parser in your WEB-INF/lib directory?
> >
> > Craig
>
> Re: jaxp.jar and parser.jar, I have been all over the map trying to get my Visual 
>Age for Java environment working with Struts again. But I started clean with fresh 
>installations of Tomcat 3.2.1 and Struts build of Feb. 20, no edits and running 
>totally independent of VAJ. I drop the struts-example into webapps and start up, not 
>logged onto the Internet.
>
> I can see in the debug trace that the struts_config_1_0.dtd resolving to the local 
>copy as you explained. But when it comes time for web_app_2_2.dtd, the SAXParser 
>throws a fatal error. After that, I can access the index.jsp of the example, but 
>login with "user" and "pass" yields an HTTP 404. If I enter registration info and 
>attempt to submit it, again HTTP 404.
>
> When I restart after loggin on to the Internet, the example application works as 
>expected. Do you think something is broken?
> --
> Tom Miller
> Miller Associates, Inc.
> [EMAIL PROTECTED]
> 641.469.3535 Phone
> 413.581.6326 FAX




Loading database servlet in struts example throws an error

2001-02-22 Thread Michael Gluckman

Hi

Getting this error in the log file:

The path to the file database.xml is wrong.
Checked the digest but did not find a related question. Any suggestions
Platform Windows
Struts release build.
Thanks
Michael

2001-02-22 02:34:47 - path="/struts-example" :database: init
2001-02-22 02:34:47 - path="/struts-example" :database: Initializing
database servlet
2001-02-22 02:34:47 - path="/struts-example" :database: Loading database
from
'C:\jakarta-tomcat-3.2.1\webapps\struts-example\/WEB-INF/database.xml'
2001-02-22 02:34:48 - path="/struts-example" :database: Database load
exception - org.xml.sax.SAXException: org.apache.struts.example.User
 at org.apache.struts.digester.Digester.startElement(Digester.java:541)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
 at com.sun.xml.parser.Parser.content(Parser.java:1499)
 at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
 at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
 at com.sun.xml.parser.Parser.parse(Parser.java:284)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
 at org.apache.struts.digester.Digester.parse(Digester.java:748)
 at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282)

 at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175)

 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
 at org.apache.tomcat.core.Handler.init(Handler.java:215)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
 at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)

 at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)

 at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
 at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)




List of checkboxes split on multiple pages

2001-02-22 Thread Sebastien Cesbron

Hi,

Does somebody know how to manage elegantly a list of checkboxes that is
split upon multiple pages. My problem is that when you valid one page
you must reset only the checkboxes you have shown on this page. I've
seen a solution with hidden fields but it doesn't sounds good to me : is
there other solutions ?
Does struts provide a mecanism to do that ?

Thanks

Seb
 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif





Request for change: RequestUtil.absoluteURL()

2001-02-22 Thread Matthias Bauer

To all active developers.

I would like to see a minor change (bugfix) in struts, which fixes the problem
outlined in a previous mail from Gordon Maclean, subjected "netscape 4.7x,
session ids and struts". I attached it to the end of this mail because it
describes the problem very good. 

I ran into the same problem this morning and finally found a workaround. I would
like to see this change in struts before it is released as official version 1.0.
It simply prevents the function RequestUtil.absoluteURL() from including the
port number into the URL, when the port number is equal to 80.

Unfortunately I do not have a (and don't want to open one now) Bugzilla account.
Nevertheless I would like to ask an active developer to implement this change. I
am quite sure, that considerably many developers have already stumbled over this
problem outlined int Gordon's mail.

Here is the little change in the code (RequestUtils.java):

Former code:

> public static String absoluteURL(HttpServletRequest request, String path) {
> 
> try {
> URL url = new URL(request.getScheme(),
>   request.getServerName(),
>   request.getServerPort(),
>   request.getContextPath() + path);
> return (url.toString());
> } catch (MalformedURLException e) {
> return (null);
> }
> 
> }

New code:

> public static String absoluteURL(HttpServletRequest request, String path) {
> 
> try {
>   int port = request.getServerPort();
>   URL url;
>   if (80 == port)
>   {
>   url = new URL(request.getScheme(),
> request.getServerName(),
> request.getContextPath() + 
>path);
>   }
>   else
>   {
>   url = new URL(request.getScheme(),
> request.getServerName(),
> port,
> request.getContextPath() + 
>path);
>   }
> return (url.toString());
> } catch (MalformedURLException e) {
> return (null);
> }
> 
> }

Thanks,

--- Matthias



Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ www.livinglogic.de



Gordon's Previous Mail with the bug description:


>Using netscape 4.7x on either solaris, linux or windows, the
>struts-example fails, because I am bounced between two different
>sessions.
> 
>The symptom indicates to me that netscape keeps separate lists
>of cookies for the following URLs:
> 
>http://myhost
>http://myhost:80
> 
>As one goes through the struts example, the URL is
>sometimes displayed as myhost, and sometimes as myhost:80,
>and I am never allowed past the login because the user
>information is kept in a session associated with myhost,
>and can't be found in a session associated with myhost:80.
> 
>Environment: struts nightly download as of Feb 12, 2001.
>Tomcat 3.2.1, mod_jk, apache 1.3.12 on RH7.
> 
>I have all cookies enabled in netscape preferences, with
>"Warn before accepting a cookie" also turned on for debugging.
> 
>1. When I try the struts-example with the following URL:
> 
>http://myhost/struts-example
> 
>Netscape asks if I want to send the cookie JSESSIONID=f78s0eymd1,
>and I click OK.
> 
>2. I select the "Log on ..." link.  Then the logon form is displayed at
>a
>   URL of
>http://myhost:80/struts-example/logon.jsp;jsessionid=f78s0eymd1
> 
>Note the cookie in the URL because struts doesn't yet know if my browser 
>accepts cookies.  Also note the port number 80 in the URL.
> 
>3. I enter user:pass and Submit.  
> 
>LogonAction logs the following message:
> 
>2001-02-15 01:59:47 - path="/struts-example" :action: LogonAction: 
>User 'user' logged on in session f78s0eymd1
> 
> 
>The mainMenu.jsp page is displayed, with a URL: 
> 
>http://myhost/struts-example/logon.do;jsessionid=f78s0eymd1
> 
>(note no port number is in the URL)
> 
>4. Then, when I select "Edit your" the netscape question box pops up
>asking if I want to send a cookie JSESSIONID=ynsmafyqr1.
>The URL is shown as
>http://myhost:80/struts-example/editRegistration.do?action=Edit
> 
>This shouldn't happen, it should use the first session id!
> 
>5. When I cli

Select/Options Tag

2001-02-22 Thread Chalmers, Douglas

A tag reference can maintain a String from a SELECT statement within a
form bean, but only the ONE actually selected..

How can I maintain ALL the OPTIONS within a SELECT box within a form
bean??

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)




Re: auto reload of message resource and URL-rewrite

2001-02-22 Thread Craig R. McClanahan

"Kan Leung, MK" wrote:

> * My 2nd question is about "struts-example". Everytime when I load
> "http://localhost/struts-documentation/", the image is never loaded
> successfully at during first time. I viewed the source it the IMG_SRC is
> "/struts-example/struts-power.gif;jsessionid=nhiizz1yq1". May I know why
> URL-rewrite is invoked for my browser, which cookie capability is
> properly enabled?
>

I didn't answer the other half of this question in my previous response, so
here is some background on why the URL rewriting takes place (even though
you have cookies enabled).

When a session is first created, the servlet container does not yet know
whether the client browser supports cookies.  Therefore, the only safe thing
to do on that initial response is to send the session id *both* ways (URL
rewriting and a cookie), and see what comes back in on the next request.  If
the cookie does not come back, the container says "aha, this client does not
support cookies, so I will continue to use rewriting".

>
> The image is loaded successfully when I pressed "reload" on my browser.
> The string ";jsessionid*" is gone.
>

That is because, on the subsequent request, your browser sent the session id
cookie along.  Therefore, the servlet container knows that you support
cookies, and it stops adding the session ID with URL rewriting.

>
> --
> Kan LEUNG, M K
> email: [EMAIL PROTECTED]
> Digital Empires Company Limited

Craig





Re: netscape 4.7x, session ids and struts

2001-02-22 Thread Matthias Bauer

Hi Gordon,

I found your problem description about the two different sessions in the mailing
list archive, because today 
I ran into the same thing. I tested with tomcat as a standalone container before
and did not have the problem there, because for every URL I provided the port
number. But when I integrated tomcat with apache for pre deployment testing I
envountered exactly the same behaviour as you.

Did you dig any further into the problem and maybe found some solution. Any help
would be greatly appreciated.

--- Matthias 


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ www.livinglogic.de



Multiple Select

2001-02-22 Thread Geddes, Mark (ANTS)



Could someone 
confirm whether the fix for bug 260 made it into last night's build 
(20010221).
 
If so, then I seem 
to still have a problem.
 
My form bean has the 
following getter:
 
  public int[] 
getApplications() {    return (this.applications);  
}
My page has the 
following:
 
  
The 'id' property of 
the object in the collection is an int.
 
As before, the 
select box is only displaying the first element of the array returned by the 
form bean's accessor.
 
Any help would be 
appreciated.
 
Mark


Re: Missing struts-config_1_0.dtd when not logged on

2001-02-22 Thread Tom Miller

"Craig R. McClanahan" wrote:

> DONNIE HALE wrote:
>
> > Tom,
> >
> > First, the web.xml file isn't parsed by the ActionServlet; it's parsed by the 
>servlet engine when it's initializing a web application (web.xml is part of the 
>standard for defining the properties/characteristics of a "web application"). It 
>should be completely parsed and accepted as correct by the time ActionServlet.init() 
>is called, during which the struts-config.xml file is parsed.
> >
>
> Actually, a recent change to ActionServlet means that it *does* do a non-validating 
>parse of web.xml as well (to figure out what  it is invoked under).  
>This is necessary to make correct recognition of the action attribute in  
>work on path-mapped servlets.
>
> Struts includes a local copy of the struts-config DTD file, and Tomcat 3.2.1 
>includes a local copy of the web.xml DTD file -- which should both be used when you 
>specify a public identifier that matches (as it appears you are doing).  Have you by 
>any chance changed the parser that came with Tomcat (jaxp.jar and parser.jar), or 
>tried to put a parser in your WEB-INF/lib directory?
>
> Craig

Re: jaxp.jar and parser.jar, I have been all over the map trying to get my Visual Age 
for Java environment working with Struts again. But I started clean with fresh 
installations of Tomcat 3.2.1 and Struts build of Feb. 20, no edits and running 
totally independent of VAJ. I drop the struts-example into webapps and start up, not 
logged onto the Internet.

I can see in the debug trace that the struts_config_1_0.dtd resolving to the local 
copy as you explained. But when it comes time for web_app_2_2.dtd, the SAXParser 
throws a fatal error. After that, I can access the index.jsp of the example, but login 
with "user" and "pass" yields an HTTP 404. If I enter registration info and attempt to 
submit it, again HTTP 404.

When I restart after loggin on to the Internet, the example application works as 
expected. Do you think something is broken?
--
Tom Miller
Miller Associates, Inc.
[EMAIL PROTECTED]
641.469.3535 Phone
413.581.6326 FAX





Re: Missing struts-config_1_0.dtd when not logged on

2001-02-22 Thread DONNIE HALE

What servlet engine are you using?

-Donnie

>>> [EMAIL PROTECTED] 02/21/01 09:19AM >>>
Presumeably some kind of configuration error. Any ideas how to correct
this?

I'm using the Feb 20 build. During startup when SAXParserImpl trys to
execute for the struts-example, if I'm logged on to the Internet, I get:

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

If I am logged on, I get:

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".
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 org.xml.sax.SAXException(java.lang.String, java.lang.Exception)
 org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator,
java.lang.Exception)
 void com.sun.xml.parser.Parser.fatal(java.lang.String, java.lang.Object
[], java.lang.Exception)
 void
com.sun.xml.parser.Parser.externalParameterEntity(com.sun.xml.parser.ExternalEntity)

 boolean com.sun.xml.parser.Parser.maybeDoctypeDecl()
 void com.sun.xml.parser.Parser.parseInternal(org.xml.sax.InputSource)
 void com.sun.xml.parser.Parser.parse(org.xml.sax.InputSource)
 void javax.xml.parsers.SAXParser.parse(org.xml.sax.InputSource,
org.xml.sax.HandlerBase)
 void javax.xml.parsers.SAXParser.parse(java.io.InputStream,
org.xml.sax.HandlerBase)
 java.lang.Object
org.apache.struts.digester.Digester.parse(java.io.InputStream)
 void org.apache.struts.action.ActionServlet.initMapping()
 void org.apache.struts.action.ActionServlet.init()
 void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
 void org.apache.tomcat.core.ServletWrapper.doInit()
 void org.apache.tomcat.core.Handler.init()
 void org.apache.tomcat.core.ServletWrapper.init()
 void
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(org.apache.tomcat.core.Context)

 void
org.apache.tomcat.core.ContextManager.initContext(org.apache.tomcat.core.Context)

 void org.apache.tomcat.core.ContextManager.init()
 void org.apache.tomcat.startup.Tomcat.execute(java.lang.String [])
 void org.apache.tomcat.startup.Tomcat.main(java.lang.String [])
 java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object [])
 void TomcatStart.start(java.lang.String [], java.lang.String)
 void TomcatStart.main(java.lang.String [])

--
Tom Miller
Miller Associates, Inc.
[EMAIL PROTECTED] 
641.469.3535 Phone
413.581.6326 FAX






Re: Problem w/ Struts and VA for Java

2001-02-22 Thread Ned Seagoon

Hi Jerzy

I assume that the context /test your own struts app registered in the
conf\server.xml tomcat file? If so the only thing I can think of is that in
your web.xml file the parameter 'application' which registers your struts
app messages is either missing or pointing to the wrong file, or it cannot
locate the file.

From: "Jerzy Kawa" <[EMAIL PROTECTED]>


Hi Ned !
I'm using VAJ 3.5.2 with Tomcat 3.2.1 with your setup.
The displayed message becomes:

--
2001-02-22 08:01:46 - ContextManager: Adding context Ctx( /examples )
2001-02-22 08:01:46 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2001-02-22 08:01:46 - ContextManager: Adding context Ctx(  )
2001-02-22 08:01:46 - ContextManager: Adding context Ctx(
/struts-documentation )
2001-02-22 08:01:46 - ContextManager: Adding context Ctx( /struts-example )
2001-02-22 08:01:46 - ContextManager: Adding context Ctx( /struts-upload )
2001-02-22 08:01:46 - ContextManager: Adding context Ctx( /test )
java.lang.reflect.InvocationTargetException:
java.lang.ExceptionInInitializerError: java.util.MissingResourceException:
Can't find resource for base name javax.servlet.http.LocalStrings, locale
en_US
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 java.lang.RuntimeException(java.lang.String)
 java.util.MissingResourceException(java.lang.String, java.lang.String,
java.lang.String)
 java.util.ResourceBundle
java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale,
java.lang.ClassLoader)
 java.util.ResourceBundle
java.util.ResourceBundle.getBundle(java.lang.String)
 java.lang.Object java.lang.Class.newInstance0()
 java.lang.Object java.lang.Class.newInstance()
 void org.apache.tomcat.core.ServletWrapper.loadServlet()
 void org.apache.tomcat.core.ServletWrapper.init()
 void
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(org.apache.to
mcat.core.Context)
 void
org.apache.tomcat.core.ContextManager.initContext(org.apache.tomcat.core.Con
text)
 void org.apache.tomcat.core.ContextManager.init()
 void org.apache.tomcat.startup.Tomcat.execute(java.lang.String [])
 void org.apache.tomcat.startup.Tomcat.main(java.lang.String [])
 java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object [])
 void TomcatRunner.start(java.lang.String [], java.lang.String)
 void TomcatRunner.main(java.lang.String [])

Any clue?
Jerzy Kawa
- Original Message -
From: Ned Seagoon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 5:39 PM
Subject: Re: Problem w/ Struts and VA for Java


>
> Hi Tom,
>
> I'm using VAJ 3.5.2 with Tomcat 3.2.1 with no problems at all. Here is my
> setup:
>
> Get rid of any IBM WTE stuff
> Import the servlet.jar from tomcat into it's own project
> Import all the struts source and resources into its own project
> Create a class in a package in another project called 'TomcatRunner' (code
> follows at the end of this mail)
> right click on tomcat runner and set the properties
> in properties set tomcat.home=c:\yourwebhome
>
> on the class path page set the 'extra directories' path to be
> c:\TomcatLocal\lib\webserver.jar;
> c:\TomcatLocal\lib\ant.jar;
> c:\TomcatLocal\lib\jasper.jar;
> c:\TomcatLocal\lib\jaxp.jar;
> c:\TomcatLocal\lib\parser.jar;
>
> (or whatever your directories are)
>
> And in the project path add the VAJ projects for the servlet API and
struts,
> plus whatever your own app project is. And that should be it, you can edit
> and debug your own code and the struts source in VAJ.
>
> Your problems will come if you try to import Tomcat into VAJ. That I have
> not managed to do sucessfully!
>
> Hope that helps!
> Ned
>
> TomcatRunner.java:
>
> import java.lang.reflect.*;
>
> public class TomcatRunner {
>
>   public TomcatRunner() {
> super();
>   }
>
>   public static void main(java.lang.String[] args) {
> TomcatRunner runner = new TomcatRunner();
> runner.start(args, "org.apache.tomcat.startup.Tomcat");   }
>
>   public void start(String[] args, String className) {
> try {
>   Class cls = Class.forName(className);
>   if (cls != null) {
> Method main = cls.getMethod("main",new Class[] {new
> String[]{}.getClass()});
> if(main != null) {
>   Object [] mainArgs = new Object [] {args};
>   main.invoke(null,mainArgs);
> }
>   }
> } catch (ClassNotFoundException e) {
>   System.out.println("Unable to find the class "+className);
> System.out.println("Set properties as described in this class' javadoc.");
> } catch (Exception e) {
>   e.printStackTrace();
> }
>   }
> }
>
>
>
> >From: Tom Miller <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Problem w/ Struts and VA for Java
> >Date: Tue, 20 Feb 2001 10:14:27 -0600
> >
> >Struts people
> >
> >I had great success using VAJ to develop Struts applications a few
> >months ago, but recently upgraded my

Re: File Upload

2001-02-22 Thread Martin Cooper

There's a file upload sample in the Struts distribution. You'll find it in
the jakarta-struts/web/upload directory.

--
Martin Cooper
Tumbleweed Communications

- Original Message -
From: "Ji Rong Hu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 6:25 PM
Subject: File Upload


>
>
> Hi, can anyone give me an example on file uploading within Struts?
> Thanks,
> Jirong
>
>





redirect question

2001-02-22 Thread Arnold Cano

i have run into a bit of a problem.  my action class calls beans that
'could' take a few seconds at least to process and return.  is there a way
in struts to have a redirect or forward to a page that says 'processing...'
while the beans are busy and then forward correctly once they are done?  has
anyone else run into a similar problem?

-arnold





attribute blah has no value

2001-02-22 Thread Justin Kennedy

HI all,

I'm trying to use a dynamic value for an attribute of my tag. but I'm 
gettin this error:
org.apache.jasper.compiler.ParseException: 
D:\jakarta-tomcat-3.2.1\webapps\mycompany\test.jsp(6,46) Attribute users 
has no value at 
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:499)


Here's my tag entry in my tld file

hi.tld

 
 hello
 mycompany.HelloTag
 JSP
 
 foo
 true
 true
 
 

mycompany.HelloTag simply calls out.print(foo)

Here's the JSP that generates the error.
" />

users doesn't actually exist in the request but it should just return null 
right ?
so when I change my jsp to this:
<%
String bar = request.getParameter("users");
%>


it prints out "null" and works just fine.

Any suggestions ?
Thanx




Re: component project rebuild / updating

2001-02-22 Thread Cedric Dumoulin


  I update Components project when there is major change, either in
Struts or in
Components.
  I have done it today, and will do it as soon as struts 1.0 is ready.
  To know the latest update, check the date in the "download" window ;-)

  Unfortunately, I have less and less time for Components. So, if there
is some
volunteers to improve them, let me know. I will soon put Components on a
CVS server.

  Usually, changes in Struts don't affect Components. If Components come
with an older
version of Struts, just replace the struts.jar and struts-*.tld files
with the newest
ones. The biggest changes in Struts that can affect Components are in
ActionServlet. But
either in this case, modifications are very simple (3 lines at the end
of methods
processActionForward() and ProcessValidate() ).

Cedric

Maya Muchnik wrote:

> Hello, Cedric,
>
> I have got your *zip file maybe one week ago. Do you update it and how often? Does it
> depend on the struts updating?
>
> Thanks,
>
> Maya



Re: attribute blah has no value

2001-02-22 Thread Justin Kennedy

yea, that works great. I should've known better.

Thanx

At 02:24 PM 2/21/2001 -0800, you wrote:
>You are trying to use nested double quotes, which is probably confusing the
>parser somewhat. Try this instead:
>
>
>
>Hope this helps.
>
>--
>Martin Cooper
>Tumbleweed Communications
>
>
>- Original Message -
>From: "Justin Kennedy" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, February 21, 2001 2:13 PM
>Subject: attribute blah has no value
>
>
> > HI all,
> >
> > I'm trying to use a dynamic value for an attribute of my tag. but I'm
> > gettin this error:
> > org.apache.jasper.compiler.ParseException:
> > D:\jakarta-tomcat-3.2.1\webapps\mycompany\test.jsp(6,46) Attribute users
> > has no value at
> >
>org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:499)
> >
> >
> > Here's my tag entry in my tld file
> >
> > hi.tld
> >
> >  
> >  hello
> >  mycompany.HelloTag
> >  JSP
> >  
> >  foo
> >  true
> >  true
> >  
> >  
> >
> > mycompany.HelloTag simply calls out.print(foo)
> >
> > Here's the JSP that generates the error.
> > " />
> >
> > users doesn't actually exist in the request but it should just return null
> > right ?
> > so when I change my jsp to this:
> > <%
> > String bar = request.getParameter("users");
> > %>
> > 
> >
> > it prints out "null" and works just fine.
> >
> > Any suggestions ?
> > Thanx
> >

Justin Kennedy
Computer Systems Analyst
Consortio, Inc.
www.consortio.com




passing substitution parameters to ActionError still working?

2001-02-22 Thread Deadman, Hal



I have a form where 
I call the following (where UserForm.MIN_PASSWORD_LENGTH is an 
int):
errors.add("password", new 
ActionError("error.user.passwordinvalid", 
String.valueOf(UserForm.MIN_PASSWORD_LENGTH)));
which references 
this in the ApplicationResource.properties file:
error.user.passwordinvalid=The password 
must contain at least {0} characters.
 
But the html:error 
tag displays this:

The password must contain at least 
[Ljava.lang.Object;@14f467 characters. 
 
I could have sworn 
that this used to work but it doesn't anymore for me. Does passing parameters to 
ActionError objects still work for everyone with recent builds? If it still 
works then I must have broke something. 
 
Thanks, 
Hal