RE: not rendering action attribute properly (Found problem)

2001-03-14 Thread Mindaugas Idzelis

I found the problem. It was in my web.xml file. I had the following:


action
*.do
action
/mysite


I guess when struts was looking up to see what to add to the end of the
servlets name there was a problem. (I guess it's looking to see which url
patterns match "action" and since I have two patterns it got confused and
outputed nothing.

Would this be considered a bug, or is there something wrong with my web.xml
file? What I was trying to accomplish was to have the action servlet handle
the initial request to the website. Thanks.

-Original Message-
From: Mindaugas Idzelis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 10:45 PM
To: [EMAIL PROTECTED]
Subject: RE:  not rendering action attribute properly


Yes, I am using the "struts-example" struts-config.xml file as my base
config file. I have the action servlet loaded on startup: (When I start the
servlet engine, i see all the debug messages fly buy) all the formBeans are
properly found. There is no output in the log file about any errors. There
are no exceptions.

Yes, the struts example works for me. I'm currently trying to compare as
much of my code to its code as possible.

--min






Question about

2001-03-14 Thread Mike Viens

I have a bean called ieObj that will return a Vector of strings.  I want
these strings to be options within a .  I have this working
just fine, however, according to the docs, a value will be marked as
SELECTED when it matches the value of the property within the bean.  This
doesn't seem to be working for me.  Can someone please point of what I am
doing incorrectly?

Thanks in advance!


  
<%= element %>
  



Mike V.




RE: not rendering action attribute properly

2001-03-14 Thread Mindaugas Idzelis

Yes, I am using the "struts-example" struts-config.xml file as my base
config file. I have the action servlet loaded on startup: (When I start the
servlet engine, i see all the debug messages fly buy) all the formBeans are
properly found. There is no output in the log file about any errors. There
are no exceptions.

Yes, the struts example works for me. I'm currently trying to compare as
much of my code to its code as possible.

--min


On Wed, 14 Mar 2001, Mindaugas Idzelis wrote:

> Well... yes, I know why the sessionid was there the first time and not the
> next. It tried to use url rewriting first, and cookies second. My problem
is
> the actual action="". This should be action="/logon.do" Any ideas???
>

One thing that would cause problems here is if you forget to configure
your controller servlet for  (or your servlet container
does not implement this correctly).  The  tag depends on the
controller servlet having actually been initialized (although it doesn't
matter whether a request has gone through it yet) in order to set things
up correctly.

Does the Struts example work for you?

> --min
>

Craig




RE: not rendering action attribute properly

2001-03-14 Thread Craig R. McClanahan



On Wed, 14 Mar 2001, Mindaugas Idzelis wrote:

> Well... yes, I know why the sessionid was there the first time and not the
> next. It tried to use url rewriting first, and cookies second. My problem is
> the actual action="". This should be action="/logon.do" Any ideas???
> 

One thing that would cause problems here is if you forget to configure
your controller servlet for  (or your servlet container
does not implement this correctly).  The  tag depends on the
controller servlet having actually been initialized (although it doesn't
matter whether a request has gone through it yet) in order to set things
up correctly.

Does the Struts example work for you?

> --min
> 

Craig




RE: not rendering action attribute properly

2001-03-14 Thread Mindaugas Idzelis

Well... yes, I know why the sessionid was there the first time and not the
next. It tried to use url rewriting first, and cookies second. My problem is
the actual action="". This should be action="/logon.do" Any ideas???

--min

-Original Message-
From: Jeff Davis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 6:46 PM
To: [EMAIL PROTECTED]
Subject: Re:  not rendering action attribute properly


At least under WebLogic, when you first visit a page under a certain context
or web site, the WL server doesn't know whether the user's browser supports
cookies or not. As a consequence, it uses URL rewritting the first time
through (this can be turned off, in the case of WL, in the weblogic.xml
settings file). Subsequent visits to the page use cookies instead. I had the
same problem with the  tag (and the image wasn't being loaded
properly as a result).

jeff
- Original Message -
From: "Mindaugas Idzelis" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 3:31 PM
Subject:  not rendering action attribute properly


> In my JSP page, I have the following tag:
>
> 
>
> when I open this page up in a browser, I get the following html
>
> (if the first time visitin the page)
>  action=";jsessionid=aaagnMM1qx2htSNg-9Xqb9oVdkN8R">
>
> (after a reload)
> 
>
> For some reason, the action is not being rendered properly. What am I
doing
> wrong? Here is the relevent struts-config.xml info:
>
> type="mysite.LogonAction"
>  name="logonForm"
>scope="session"
>validate="true"
>input="/mysite/core/loginBox.jsp">
> path="/mysite/user_activate.jsp"/>
>
> 
>
>  type="mysite.core.LogonForm"/>
>
> Any ideas what could be causing this problem? In the <%@ page directive do
I
> have to include the LogonForm class, etc? I am currently doing this, could
> this be the problem? Thank you.
>
>




Digester bug, comments and enhancements

2001-03-14 Thread Pierre Métras

Hi,

It seems that Bugzilla didn't swallowed the incidents I opened yesterday (I
can't find them in Bugzilla queries), so I post them again in the list.

[1] Digester enhancement.
=
I have set up a ObjectPushRule class that allows to have the digester use
existing objects, instead of creating new ones when it encounters a pattern.
For instance, you have two containers containA and containB that need to
collect objects when the digester encounters tags  or . Now, you are
able to write:

containA = new ContainA();
containB = new ContainB();

// Put  objects into containA
digester.addObjectPush("*/a", containA);
 ...  processing
digester.addSetNext("*/a", "add");

// Put  objects into containB
digester.addObjectPush("*/b", containB);
...  processing
digester.addSetNext("*/b", "add");

and process an XML file with intermixed  and  tags:



and have the containA object contain all the "a", and containB all the "b".

In order to fit with the rest of the digester engine (and because the
Digester is a final class), I've added a "addObjectPush" method.
The code for this is at the end of the e-mail.


[2] Digester bug
===
As the Digester class uses a lot of BeanUtils and PropertyUtils methods,
would it be possible to correlate the Digester.setDebug() method to also
call the BeanUtils.setDebug().

Also, I think that the documentation should be improved to mention that ALL
the classes and the methods accessed by the Digester must be declared
public.

Consider the following short example:
class A
{
  int id;
  setId(int id) {
this.id = id;
  }
}

class B extends A
{
  String name;
  setName(name) {
this.name = name;
  }
}

In order for the digester to digest the tag  (with
the appropriate rules), you must have:
- setName public
- setId public
- class B public
AND class A public

If you forget to declare A public (as I did), you end up with a B object
partially initialized: "name" attribute is OK, but not "id". And no error
message or hint from the digester!!!

If you set the BeanUtils.setDebug(), then you obtain a "CANNOT HAPPEN:"
message printed by the "populate" method! It should be more pleasant to have
that method raise an exception when this occurs to facilitate the debugging,
instead of allowing a fuzzy situation...


[3] Digester enhancement
=
In regard of the previous comment, could it be possible (after version 1.0
release) to parameterize the access control level of the digester, when
accessing methods.

I am presently working on a framework (not struts related) where I use the
digester to initialize the state of the framework. Later, I will have
clients classes built upon that framework.
In order to do the initialization of my objects, the digester imposes on me
to declare all the classes and setter methods as public. The risk is that
later, I open a breach in my objects and the clients classes will be able to
modify the state of the framework.

I think it would be cool to have either:
- a global flag to tell the digester that it can access private or protected
classes when accessing the setter methods.
- or better, on a rule by rule cases, define the access level authorized.


Pierre Métras

And now, the ObjectPushRule stuff:

= ObjectPushRule.java==
package org.apache.struts.digester;


import org.xml.sax.AttributeList;


/**
 * Rule implementation that pushes and existing object
 * onto the object stack.  When the element is complete, the
 * object will be popped
 *
 * @author Pierre Métras
 * @version $Revision: 1.0 $ $Date: 2001/03/10 23:18:29 $
 */

public final class ObjectPushRule extends Rule {


// ---
Constructors


/**
 * Construct an object create rule with the specified class name.
 *
 * @param digester The associated Digester
 * @param object The object to push onto the stack
 */
public ObjectPushRule(Digester digester, Object object) {

 super(digester);
 this.object = object;

}



// - Instance
Variables


/**
 * The object put on top of the stack.
 */
private Object object = null;



// - Public
Methods


/**
 * Process the beginning of this element.
 *
 * @param attributes The attribute list of this element
 */
public void begin(AttributeList attributes) throws Exception {

 digester.push(object);

}


/**
 * Process the end of this element.
 */
public void end() throws Exception {

 Object top = digester.pop();
 if (digester.getDebug() >= 1)
 digester.log("Pop " + top.getClass().getName());

}


/**
 * Clean up after parsing is complete.
 */
public void finish() throws Exception {

 object = null;

}

}

==

=Digester.java=

Re:

2001-03-14 Thread Craig R. McClanahan



On Wed, 14 Mar 2001, Richard Yumul wrote:

> Is there a particular reason why the  tag from the
> struts-logic taglib can't check if a value has been set in the request w/
> the Servlet.setAttribute() method?
> 
> It seems like this would be common design pattern:
> 
>   The Action class successfully processes some submitted form data,
> 
>   It adds some info to the request object
> (HttpServletRequest.setAttribute()),
>   (like a status message of the whatever the form was supposed to do)
> 
>   Passes control to whatever the mapping.findforward() method returns;
> 
>   Then the JSP displays the page with the status message w/ a
> request.getAttribute().
> 
> Essentially, I'd like to avoid a:
> 
> <%
>   String mesg = request.getAttribute("status.message");
>   if (mesg != null) {
>   out.println(mesg);
>   }
> %>
> 
> in my JSP page and leverage as much as I can from the taglibs.  Does struts
> provide any other mechanism to accomplish this?
> 

Doesn't this do what you want?





Request attributes (in an Action) are the same as request scope beans (in
a JSP page).

> 
> Thanks,
> Rich
> 

Craig McClanahan




Please disregard my last email.

2001-03-14 Thread Richard Yumul

Duh.  I figured it out.

Richard M. Yumul
Polexis, Inc.
Direct: 619-542-7209
Fax: 619-542-8675
http://www.polexis.com
transforming data into knowledge  



struts-user@jakarta.apache.org

2001-03-14 Thread Richard Yumul

Is there a particular reason why the  tag from the
struts-logic taglib can't check if a value has been set in the request w/
the Servlet.setAttribute() method?

It seems like this would be common design pattern:

The Action class successfully processes some submitted form data,

It adds some info to the request object
(HttpServletRequest.setAttribute()),
(like a status message of the whatever the form was supposed to do)

Passes control to whatever the mapping.findforward() method returns;

Then the JSP displays the page with the status message w/ a
request.getAttribute().

Essentially, I'd like to avoid a:

<%
String mesg = request.getAttribute("status.message");
if (mesg != null) {
out.println(mesg);
}
%>

in my JSP page and leverage as much as I can from the taglibs.  Does struts
provide any other mechanism to accomplish this?


Thanks,
Rich


Richard M. Yumul
Polexis, Inc.
http://www.polexis.com
transforming data into knowledge




RE: Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null

2001-03-14 Thread Damien Joldersma

hahahah isn't that just the way these really annoying problems are?  After
working on this problem for like 2 days, and finally getting frustrated
enough to write a letter, I solved it about 20 min after I wrote the letter.

So just incase anyone else out there runs in to this problem be advised:

"cvs add -kb" is WAY cooler for binary files than just "cvs add"!

The problem was that the struts.jar file was checked into cvs on a linux box
with out the -kb flag, then checked out with wincvs on the windows box, thus
windows replaced all the newlines with carragie returns/line feed garbage
and corrupted the file.  So! Be warned, becareful when putting binary files
into CVS!

-Damien Joldersma

-Original Message-
From: Damien Joldersma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 3:58 PM
To: [EMAIL PROTECTED]
Subject: Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null


Hello,

We just started writing an application with tomcat and struts.  Our
developers are developing on both windows and linux. We're running into a
problem on the windows side of things with the taglibrary jazz.

The problem is namely that tomcat is upset and is throwing an exception when
we make a call to loading the taglib:

<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>

This line throws the following exception:

org.apache.jasper.compiler.CompileException: /globals.jsp(5,0)
Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java, Compiled Code)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled
Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

We are using tomcat 3.2 and Struts 1.0.

The same code and war file work fine under linux.

It looks like there is some problem with the windows configuration.  I've
gone over the web.xml and have been unable to locate any problems
(obviously!).  Here is the relavent bit from web.xml


servlet
servelt-mapping
welcome-file-list

 
/WEB-INF/tlds/struts-bean.tld
/WEB-INF/tlds/struts-bean.tld
  


If I move the file out of the way, the error changes properly to one where
the system cannot find the file specified, so I know it's finding the file.
I thought it may have been like a case where newline/carrage return
corruption and replaced it with a fresh tld from the struts zip file
distribution, no luck.

Does anyone know where the error is being thrown? Where can I track down
what error is supposed to being thrown? Has anyone run into a null error
while trying to open a taglib?

Thanks in advance for any help!

-Damien Joldersma





Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null

2001-03-14 Thread Damien Joldersma

Hello,

We just started writing an application with tomcat and struts.  Our
developers are developing on both windows and linux. We're running into a
problem on the windows side of things with the taglibrary jazz.

The problem is namely that tomcat is upset and is throwing an exception when
we make a call to loading the taglib:

<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>

This line throws the following exception:

org.apache.jasper.compiler.CompileException: /globals.jsp(5,0)
Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java, Compiled Code)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled
Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

We are using tomcat 3.2 and Struts 1.0.

The same code and war file work fine under linux.

It looks like there is some problem with the windows configuration.  I've
gone over the web.xml and have been unable to locate any problems
(obviously!).  Here is the relavent bit from web.xml


servlet
servelt-mapping
welcome-file-list

 
/WEB-INF/tlds/struts-bean.tld
/WEB-INF/tlds/struts-bean.tld
  


If I move the file out of the way, the error changes properly to one where
the system cannot find the file specified, so I know it's finding the file.
I thought it may have been like a case where newline/carrage return
corruption and replaced it with a fresh tld from the struts zip file
distribution, no luck.

Does anyone know where the error is being thrown? Where can I track down
what error is supposed to being thrown? Has anyone run into a null error
while trying to open a taglib?

Thanks in advance for any help!

-Damien Joldersma




Re: not rendering action attribute properly

2001-03-14 Thread Jeff Davis

At least under WebLogic, when you first visit a page under a certain context
or web site, the WL server doesn't know whether the user's browser supports
cookies or not. As a consequence, it uses URL rewritting the first time
through (this can be turned off, in the case of WL, in the weblogic.xml
settings file). Subsequent visits to the page use cookies instead. I had the
same problem with the  tag (and the image wasn't being loaded
properly as a result).

jeff
- Original Message -
From: "Mindaugas Idzelis" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 3:31 PM
Subject:  not rendering action attribute properly


> In my JSP page, I have the following tag:
>
> 
>
> when I open this page up in a browser, I get the following html
>
> (if the first time visitin the page)
>  action=";jsessionid=aaagnMM1qx2htSNg-9Xqb9oVdkN8R">
>
> (after a reload)
> 
>
> For some reason, the action is not being rendered properly. What am I
doing
> wrong? Here is the relevent struts-config.xml info:
>
> type="mysite.LogonAction"
>  name="logonForm"
>scope="session"
>validate="true"
>input="/mysite/core/loginBox.jsp">
> path="/mysite/user_activate.jsp"/>
>
> 
>
>  type="mysite.core.LogonForm"/>
>
> Any ideas what could be causing this problem? In the <%@ page directive do
I
> have to include the LogonForm class, etc? I am currently doing this, could
> this be the problem? Thank you.
>
>




not rendering action attribute properly

2001-03-14 Thread Mindaugas Idzelis

In my JSP page, I have the following tag:



when I open this page up in a browser, I get the following html

(if the first time visitin the page)


(after a reload)


For some reason, the action is not being rendered properly. What am I doing
wrong? Here is the relevent struts-config.xml info:


   
   




Any ideas what could be causing this problem? In the <%@ page directive do I
have to include the LogonForm class, etc? I am currently doing this, could
this be the problem? Thank you.




ActionForm (DataObject) generator?

2001-03-14 Thread Kyle Robinson




We are using Struts 
with an Oracle database as the backend.  We don't really feel like 
handwriting 100's of java files (one for each table).  Does anyone know of 
a good db table -> java object generator?  Preferably open 
source?
 
Thanks
Kyle Robinson Systems Consultant Pangaea Systems 
Inc. (250) 360-0111 
 


Re: How to generate a form bean manually?

2001-03-14 Thread Maya Muchnik

It is my guess. Take as example logon.jsp and registration.jsp. The
first jsp uses a part of info for the second jsp (or form). I think you
need to have 2 form beans, one for fill in parameters, other one - for
full object.

John Chang wrote:

> Usually, a form bean is automatically created after a
> user submit the form at the first time.  But if I want
> to generate the form bean before the form is shown,
> how can I do that?
>
> The reason for me to do so is for this case: some
> information of the form are already in database.  When
> users fill the form, they don't have to input these
> information.
>
> Another question, how can I get the instance of the
> form bean in my JSP file?
>
> Thanks a lot!
>
> John Chang
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/




Re: How to generate a form bean manually?

2001-03-14 Thread Craig R. McClanahan



On Wed, 14 Mar 2001, John Chang wrote:

> 
> Usually, a form bean is automatically created after a
> user submit the form at the first time.  But if I want
> to generate the form bean before the form is shown,
> how can I do that?  
> 
> The reason for me to do so is for this case: some
> information of the form are already in database.  When
> users fill the form, they don't have to input these
> information.
> 

The example application does exactly this trick.

On the registration.jsp page, look at the link that is generated for
editing a subscription -- it goes back to an action
("/editSubscription") which will precreate and populate the form bean,
place it in request scope, and then forwards to subscription.jsp for
display.

> Another question, how can I get the instance of the
> form bean in my JSP file?
> 

The  tag does this for you, at least as far as is required by
the various field tags like .  If you want to refer to this
bean with other tags and scriptlets, you can simply use  to
declare it, just like any other bean.  If the bean already exists at that
point in time, it will not be recreated.

> Thanks a lot!
> 
> John Chang
> 

Craig McClanahan




How to generate a form bean manually?

2001-03-14 Thread John Chang


Usually, a form bean is automatically created after a
user submit the form at the first time.  But if I want
to generate the form bean before the form is shown,
how can I do that?  

The reason for me to do so is for this case: some
information of the form are already in database.  When
users fill the form, they don't have to input these
information.

Another question, how can I get the instance of the
form bean in my JSP file?

Thanks a lot!

John Chang


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



Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Compare yours index.jsp with struts-example's index.jsp. Can you run struts-example.war
? If you do, try find out differences.
 
Jesse Vitrone wrote:
 OK,
those are the 2 that I renamed, so I guess that's not my problem.Thanks
for you help, I'll keep pluggin' away.Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
 
Yes, you can replace the 2 names (in red color):
  
  
    action
    org.apache.struts.action.ActionServlet
    
  application
  org.apache.struts.example.ApplicationResources
    
    
  config
  /WEB-INF/struts-config.xml
Jesse Vitrone wrote:
That's
exacly the setup that I have :)*.tld
and my web and config xml files are in my_app/WEB-INFand
my 2 jsp's are under my_app/http://localhost/my_app/index.jsp
is what's giving me that error.I
have Apache with Tomcat, so the :8080 isn't needed.Any
other ideas?The config
xml and resource properties file can be named what ever I want, right? 
As long as I refer to them with the right name in my web.xml?Thanks
again,   
Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
Check a location of all struts-*tld files. They have to be under your_app/WEB-INF
(check with your web.xml). struts.jar file has to be under your_app/WEB-INF/lib.
Put your first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp
Jesse Vitrone wrote:
Good
idea, but it didn't help, I still got the same directory.Thanks
anyway,    Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:
 
OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Does this look familiar to anyone?
Thanks in advance,
    Jesse









RE: new problem - fixed one, now I've got another

2001-03-14 Thread Jesse Vitrone



OK, 
those are the 2 that I renamed, so I guess that's not my 
problem.
 
Thanks 
for you help, I'll keep pluggin' away.
 
Jesse

  -Original Message-From: Maya Muchnik 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 5:25 
  PMTo: [EMAIL PROTECTED]Subject: Re: new 
  problem - fixed one, now I've got anotherYes, you can 
  replace the 2 names (in red color): 
       
       
  action     
  org.apache.struts.action.ActionServlet 
         
  application 
    org.apache.struts.example.ApplicationResources 
           
     
  config   
  /WEB-INF/struts-config.xml 
  Jesse Vitrone wrote: 
   That's exacly the setup that I 
have :)*.tld and my web and config xml 
files are in my_app/WEB-INFand my 2 jsp's are under my_app/http://localhost/my_app/index.jsp 
is what's giving me that error.I have Apache with Tomcat, so the :8080 isn't 
needed.Any other ideas?  The config xml and resource properties file can be named what 
ever I want, right?  As long as I refer to them with the right name in 
my web.xml?Thanks again,    Jesse 

  -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, March 14, 2001 
  5:00 PM To: 
  [EMAIL PROTECTED] Subject: Re: new problem - fixed one, now I've got 
  another  Check a location of all struts-*tld 
  files. They have to be under your_app/WEB-INF (check with your web.xml). 
  struts.jar file has to be under your_app/WEB-INF/lib. Put your first.jsp 
  file under your_app directory and try http://localhost:8080/your_app/first.jsp 

  Jesse Vitrone wrote: 
  Good idea, but it didn't 
help, I still got the same directory.Thanks 
anyway,    
Jesse 

  -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, March 14, 
  2001 3:43 PM To: [EMAIL PROTECTED] 
  Subject: Re: new problem - 
  fixed one, now I've got anotherTry to stop Tomcat. 
  Remove everything under tomcat/work directory and startup Tomcat 
  again. 
  Jesse Vitrone wrote: 
    
OK, I fixed the other properties file problem, it 
turned out that I had a syntax error in my web.xml and I didn't see 
Tomcat barf when it loaded. 
Now that I've fixed that, and Tomcat doesn't give 
any error when it starts, I get this error when I try to load my 
first page. 
javax.servlet.ServletException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in scope null at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
at 
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315) 
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at 
org.apache.tomcat.core.Handler.service(Handler.java:286) 
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) 
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 
Does this look familiar to anyone? 
Thanks in advance, 
    Jesse


Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Yes, you can replace the 2 names (in red color):
  
  
    action
    org.apache.struts.action.ActionServlet
    
  application
  org.apache.struts.example.ApplicationResources
    
    
  config
  /WEB-INF/struts-config.xml
Jesse Vitrone wrote:
 That's
exacly the setup that I have :)*.tld
and my web and config xml files are in my_app/WEB-INFand
my 2 jsp's are under my_app/http://localhost/my_app/index.jsp
is what's giving me that error.I
have Apache with Tomcat, so the :8080 isn't needed.Any
other ideas?  The
config xml and resource properties file can be named what ever I want,
right?  As long as I refer to them with the right name in my web.xml?Thanks
again,   
Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
 
Check a location of all struts-*tld files. They have to be under your_app/WEB-INF
(check with your web.xml). struts.jar file has to be under your_app/WEB-INF/lib.
Put your first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp
Jesse Vitrone wrote:
Good
idea, but it didn't help, I still got the same directory.Thanks
anyway,    Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:
 
OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Does this look familiar to anyone?
Thanks in advance,
    Jesse







RE: new problem - fixed one, now I've got another

2001-03-14 Thread Jesse Vitrone



That's 
exacly the setup that I have :)
*.tld 
and my web and config xml files are in my_app/WEB-INF
and my 
2 jsp's are under my_app/
 
http://localhost/my_app/index.jsp 
is what's giving me that error.
I have 
Apache with Tomcat, so the :8080 isn't needed.
 
Any 
other ideas?
 
 
The config xml and resource properties 
file can be named what ever I want, right?  As long as I refer to them with 
the right name in my web.xml?
 
 
Thanks 
again,
    Jesse

  -Original Message-From: Maya Muchnik 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 5:00 
  PMTo: [EMAIL PROTECTED]Subject: Re: new 
  problem - fixed one, now I've got anotherCheck a location 
  of all struts-*tld files. They have to be under your_app/WEB-INF (check with 
  your web.xml). struts.jar file has to be under your_app/WEB-INF/lib. Put your 
  first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp 

  Jesse Vitrone wrote: 
   Good idea, but it didn't help, 
I still got the same directory.Thanks 
anyway,    
Jesse 

  -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, March 14, 2001 
  3:43 PM To: 
  [EMAIL PROTECTED] Subject: Re: new problem - fixed one, now I've got 
  another  Try to stop Tomcat. Remove 
  everything under tomcat/work directory and startup Tomcat again. 
  Jesse Vitrone wrote: 
    
OK, I fixed the other properties file problem, it 
turned out that I had a syntax error in my web.xml and I didn't see 
Tomcat barf when it loaded. 
Now that I've fixed that, and Tomcat doesn't give any 
error when it starts, I get this error when I try to load my first 
page. 
javax.servlet.ServletException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in scope null at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
at 
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315) 
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at 
org.apache.tomcat.core.Handler.service(Handler.java:286) 
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) 
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 
Does this look familiar to anyone? 
Thanks in advance, 
    Jesse


can other servlet have reload function

2001-03-14 Thread Maya Muchnik

Hi,

I would like to have a business servlet (similar as database servlet in
struts-example) to reload its configuration files. Is it possible? What
minimum I need to implement? Can I use struts-config.xml file to add
some action as:



Thanks in advance.

Maya




Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Check a location of all struts-*tld files. They have to be under your_app/WEB-INF
(check with your web.xml). struts.jar file has to be under your_app/WEB-INF/lib.
Put your first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp
Jesse Vitrone wrote:
 Good
idea, but it didn't help, I still got the same directory.Thanks
anyway,   
Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
 
Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:
 
OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Does this look familiar to anyone?
Thanks in advance,
    Jesse





RE: dynamically constructing non-jsp pages

2001-03-14 Thread Troy Hart

I don't know why you need the file to be a .js file (there is no rule that
says javascript must be defined in such a file). You can build a .jsp file
that dynamically defines a bunch of client side javascript, and then simply
include that file wherever you need it...

Alternatively you could also map *.js such that the JspServlet processes it,
but this seems arbitrarily complex.

Troy


-Original Message-
From: Martijn Spronk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 10:13 AM
To: Troy Hart
Subject: RE: dynamically constructing non-jsp pages


I assume one way should be by configuring your servlet/JSP
engine. For example in Resin, jsp files are processed by the
JspServlet servlet because of the mapping:



I don't see why this wouldn't work for *.js.

Martijn.



Martijn Spronk
[EMAIL PROTECTED]
www.columbusgroup.com
604.801.5758 ext. 248
Vancouver + Toronto + Seattle


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: March 14, 2001 8:51 AM
To: [EMAIL PROTECTED]
Subject: dynamically constructing non-jsp pages




first, let me say that this is not necessarily struts-specific, but since
i'm
pretty much using struts exclusively these days, and this list generates so
much
more useful info than the sun jsp and servlet list, i decided to try here
first.

here's my situation, i would like query a database and load the results for
some
reference tables into .js files, where they can then be quickly accessed for
client side validation.  (not an ideal solution, i know, but it would take
me
along time to explain why we came to this decision.)  i realize i can do
this
the hard way by directly printing out the response in the servlet, but i'd
like
to avoid that if possible.  is there a way to dynamically load a page and
not
have it end with the .jsp suffix?

thanks,

ab




RE: html:submit

2001-03-14 Thread Steve A Drake

On Wed, 14 Mar 2001, Kyle Robinson wrote:

> In the onchange event of your select I would make it look like
> onchange="javascript:submit();"

 Thanks for the idea, but I tried that and still get the Javascript error.




RE: new problem - fixed one, now I've got another

2001-03-14 Thread Jesse Vitrone



Good 
idea, but it didn't help, I still got the same directory.
 
Thanks 
anyway,
    Jesse

  -Original Message-From: Maya Muchnik 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 3:43 
  PMTo: [EMAIL PROTECTED]Subject: Re: new 
  problem - fixed one, now I've got anotherTry to stop 
  Tomcat. Remove everything under tomcat/work directory and startup Tomcat 
  again. 
  Jesse Vitrone wrote: 
    
OK, I fixed the other properties file problem, it turned 
out that I had a syntax error in my web.xml and I didn't see Tomcat barf 
when it loaded. 
Now that I've fixed that, and Tomcat doesn't give any error 
when it starts, I get this error when I try to load my first page. 
javax.servlet.ServletException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in scope null at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
at 
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315) 
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at 
org.apache.tomcat.core.Handler.service(Handler.java:286) at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) 
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 
Does this look familiar to anyone? 
Thanks in advance, 
    Jesse


RE: html:submit

2001-03-14 Thread Kyle Robinson

In the onchange event of your select I would make it look like
onchange="javascript:submit();"

-Original Message-
From: Steve A Drake [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 12:18
To: [EMAIL PROTECTED]
Subject: html:submit


 I'm having a problem with the html:submit tag. The scenario is that I
have a number of select menus, each of which invokes form.submit() on the
onchange event, i.e.:




The problem is that the html:submit tag creates a Submit input type with
the name "submit". I think this name is conflicting with the 
form.submit() Javascript function. The html:submit tag :


  


creates an input type that looks like:



By hardwiring the input type (not using the html:submit tag) with a "name"
attribute other than "submit", the select menus properly invoke
form.submit(). Otherwise, the select menus generate the Javascript error:

Javascript Error: form.submit is not a function

Any advice is appreciated.





Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:
 
OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Does this look familiar to anyone?
Thanks in advance,
    Jesse



Re: Is a parser required to run STRUTS?

2001-03-14 Thread Derek Harding

i've gotten this error before.  and from looking at what you typed.  you
need to capitalize your web-inf folder to WEB-INF.




html:submit

2001-03-14 Thread Steve A Drake

 I'm having a problem with the html:submit tag. The scenario is that I
have a number of select menus, each of which invokes form.submit() on the
onchange event, i.e.:




The problem is that the html:submit tag creates a Submit input type with
the name "submit". I think this name is conflicting with the 
form.submit() Javascript function. The html:submit tag :


  


creates an input type that looks like:



By hardwiring the input type (not using the html:submit tag) with a "name"
attribute other than "submit", the select menus properly invoke
form.submit(). Otherwise, the select menus generate the Javascript error:

Javascript Error: form.submit is not a function

Any advice is appreciated.






newbie problem - fixed one, now there's more

2001-03-14 Thread Jesse Vitrone
Title: newbie problem - fixed one, now there's more





I sent this a few hours ago, but never saw it, so I'm sending again.


OK, I fixed the other properties file problem, it turned out that I had a syntax error in my web.xml and I didn't see Tomcat barf when it loaded.

Now that I've fixed that, and Tomcat doesn't give any error when it starts, I get this error when I try to load my first page.

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Does this look familiar to anyone?


Thanks in advance,
    JesseOK, I fixed the other properties file problem, it turned out that I had a syntax error in my web.xml and I didn't see Tomcat barf when it loaded.

Now that I've fixed that, and Tomcat doesn't give any error when it starts, I get this error when I try to load my first page.

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Does this look familiar to anyone?


Thanks in advance,
    Jesse





RE: Scope and re-display with errors problem...

2001-03-14 Thread Abraham Kang

Firmin,

   Due to the inherient problems with frames here is a solution for your
case.

   Abstract out the logic to generate the list of items in a different
Action object.

   When you are outputting the the  HTML tag,
   map that to the action object that will generate the list items.

   Ex:



   If you are submitting your form from a frame and not building a 

  this function would reload the menuFrame with the URL above:

 buildMenu.do?paramThatYouNeedToBuildList=value&OtherParam=2

Hope This Helps,
Abraham


> -Original Message-
> From: Firmin David [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 14, 2001 3:13 AM
> To: '[EMAIL PROTECTED]'
> Subject: Scope and re-display with errors problem...
>
>
> Hi all,
> I make a request from a menu frame for a list of items, and they are then
> displayed in the adjacent main frame. Before the page is displayed, the
> "list" object is put in *request* scope in the code. If the user enters
> invalid data and submits the form (of which the list is a part), the page
> cannot be redisplayed with the associated errors as the "list"
> object is no
> longer visible to it. I have no wish (for a multitude of reasons)
> to put the
> "list" object in the session even though it would solve the problem.
> Is there another way around this? I have tried  with
> toScope="request" in the original page but clearly cannot call the new
> variable the same thing, meaning that all my references to the bean within
> the page become invalid. (I am unsure whether or not this would've worked
> anyway)
>
> Any help in finding a way of doing this without using session
> scope would be
> very gratefully received!
>
> Thanks in advance
>
> Rgds
> David
>
> 
> 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
***





Re: Is a parser required to run STRUTS?

2001-03-14 Thread Julia Reynolds

>From the installation page on the Struts web site:

XML Parser - Struts requires the presence of an XML parser that is compatible
with the Java API for XML Parsing (JAXP) specification, 1.0 or later. You can
download and install the JAXP reference implementation, which is required for
building the Struts source distribution. In Struts-based web applications, you
may replace the reference implementation classes with any other JAXP compliant
parser, such as Xerces. See detailed instructions related to the parser in the
instructions for building and installing Struts, below.


"Anderson, Jessica" wrote:

> I recently tried to load our application to another user's machine and am
> curious what all is required.  I put the struts.jar in Web-inf\lib and made
> sure all tlds, struts-config and web.xml were all in the correct place
> (identical to my environment which run fine).
>
> All needed classes are compiled (with reference to struts.jar) and appear
> under Web-inf\classes in their respective package structures.
>
> However, I am receiving the following errors and wonder if something else
> (maybe jaxp or other parser) is required to JUST RUN STRUTS web app?
>
> The following error is appearing in the tomcat console when tomcat is
> started (is Web-inf case sensitive?):
>
> 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
> /WEB-INF/struts-config.xml
> cannot load servlet name: controller
>
> Then when trying to retrieve a jsp:
>
> 2001-03-14 12:39:10 - Ctx( /best ): Exception in init  null -
> java.lang.NullPointerException
> at
> org.apache.tomcat.facade.ServletContextFacade.getResourceAsStream(ServletCon
> textFacade.java:143)
> at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1284)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
> 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.core.Handler.service(Handler.java:254)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
> 2001-03-14 12:39:10 - Ctx( /best ): Exception in: R( /best +
> /maintainParticipant.do + null) - java.lang.NullPointerException
> at
> org.apache.tomcat.facade.ServletContextFacade.getResourceAsStream(ServletCon
> textFacade.java:143)
> at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1284)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
> 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.core.Handler.service(Handler.java:254)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
> Thanks,
> Jessica

--
In a time of drastic change it is the learners who inherit the future. The
learned find themselves equipped to live in a world that no longer exists. -
Eric Hoffer



  H e a l t h S t r e a m,   I n c.
  Julia Reynolds - Systems Developer
  209 10th Ave. South Ste. 450 - Nashville, TN 37203
  phone: (615) 301-3220 - fax: (615) 301-3200

  email: [EMAIL PROTECTED]
  Web Site: http://www.cmecourses.com





RE: info: what works well when developing struts

2001-03-14 Thread Andrew Boyko

> If you need database drivers, but these in resin/lib. I'm not sure the
> reason, but you can't have them in WEB-INF/lib (it won't work)

Actually, we've never found this to be true with 
PostgreSQL, Oracle, or DB2's JDBC drivers.  In fact,
the only off-the-shelf jar we've ever needed to place
in resin/lib is Sitraka (KL Group)'s JClass ServerChart;
it has some weird classloader issues that cause it to stop
working after a class reload, or in multiple virtual hosts,
unless it's loaded from resin/lib.  Sitraka says "resin
is not supported", and meanwhile I can't even figure out
what you'd do to induce that behavior if you *wanted* to.

thanks for letting me vent. :)

Andy Boyko   [EMAIL PROTECTED]



new problem - fixed one, now I've got another

2001-03-14 Thread Jesse Vitrone
Title: new problem - fixed one, now I've got another





OK, I fixed the other properties file problem, it turned out that I had a syntax error in my web.xml and I didn't see Tomcat barf when it loaded.

Now that I've fixed that, and Tomcat doesn't give any error when it starts, I get this error when I try to load my first page.

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Does this look familiar to anyone?


Thanks in advance,
    Jesse





Struts and Sun's J2EE Patterns

2001-03-14 Thread Jorge Ribeiro Jordão

Has anybody read Sun Java Center J2EE Patterns
(http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/)
yet ?

For those that did, it seemed that Struts is pretty much an implementation
of the "Front Controller" pattern (no surprises so far), using the
"ServletFront", "Command and Controller", "Multiplexed Resource Mapping" and
"Dispatcher in Controller" stategies.

What do you think ?


-- 
This message may contain confidential information or privileged material,
and is intended only for the individual(s) named. If you are not in the
named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses.  The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission. If verification is required please
request a hard-copy version. 



Is a parser required to run STRUTS?

2001-03-14 Thread Anderson, Jessica

I recently tried to load our application to another user's machine and am
curious what all is required.  I put the struts.jar in Web-inf\lib and made
sure all tlds, struts-config and web.xml were all in the correct place
(identical to my environment which run fine).  

All needed classes are compiled (with reference to struts.jar) and appear
under Web-inf\classes in their respective package structures.

However, I am receiving the following errors and wonder if something else
(maybe jaxp or other parser) is required to JUST RUN STRUTS web app?

The following error is appearing in the tomcat console when tomcat is
started (is Web-inf case sensitive?):

2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
/WEB-INF/struts-config.xml
cannot load servlet name: controller

Then when trying to retrieve a jsp:

2001-03-14 12:39:10 - Ctx( /best ): Exception in init  null -
java.lang.NullPointerException
at
org.apache.tomcat.facade.ServletContextFacade.getResourceAsStream(ServletCon
textFacade.java:143)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1284)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
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.core.Handler.service(Handler.java:254)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

2001-03-14 12:39:10 - Ctx( /best ): Exception in: R( /best +
/maintainParticipant.do + null) - java.lang.NullPointerException
at
org.apache.tomcat.facade.ServletContextFacade.getResourceAsStream(ServletCon
textFacade.java:143)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1284)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
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.core.Handler.service(Handler.java:254)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Thanks,
Jessica



Auto-generating form classes from xml file?

2001-03-14 Thread Mindaugas Idzelis

Does anyone know of a way to automatically generate java source for forms
from the form jsp file, or from the struts-config.xml file (like the
documentation aludes to?)

This would be most helpful.




info: what works well when developing struts

2001-03-14 Thread Mindaugas Idzelis

I found this configuration VERY good at developing struts.

Resin (www.caucho.com)
The struts.jar file should be in your WEB-INF/lib directory.
(if struts is in /resin/lib your classes will not be found when using struts
taglibs --> this is because struts.jar comes before the WEB-INF/classes in
the CLASSPATH)

If you need database drivers, but these in resin/lib. I'm not sure the
reason, but you can't have them in WEB-INF/lib (it won't work)

Resin auto-compiles your JSPs AS WELL AS your java source files (beans,
classes, etc) this is very helpful for development!

Resin is also free to develop with. ;-)





RE: dynamically constructing non-jsp pages

2001-03-14 Thread Andre_Beskrowni



right-o.  it turns out that tomcat has something similar in the web.xml file:


  
jsp
  
  
*.jsp
  


and


  jsp


  org.apache.jasper.runtime.JspServlet


thanks, for pointing this out.

ab


>  From:  [EMAIL PROTECTED]
> Date:   03/14/2001 11:13 AM
>
>I assume one way should be by configuring your servlet/JSP
>engine. For example in Resin, jsp files are processed by the
>JspServlet servlet because of the mapping:
>
>servlet-name='com.caucho.jsp.JspServlet'/>
>
>I don't see why this wouldn't work for *.js.
>
>Martijn.
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: March 14, 2001 8:51 AM
>To: [EMAIL PROTECTED]
>Subject: dynamically constructing non-jsp pages
>
>
>
>
>first, let me say that this is not necessarily struts-specific, but since
>i'm
>pretty much using struts exclusively these days, and this list generates so
>much
>more useful info than the sun jsp and servlet list, i decided to try here
>first.
>
>here's my situation, i would like query a database and load the results for
>some
>reference tables into .js files, where they can then be quickly accessed for
>client side validation.  (not an ideal solution, i know, but it would take
>me
>along time to explain why we came to this decision.)  i realize i can do
>this
>the hard way by directly printing out the response in the servlet, but i'd
>like
>to avoid that if possible.  is there a way to dynamically load a page and
>not
>have it end with the .jsp suffix?
>
>thanks,
>
>ab
>
>
>





newbie with struts 1.0b

2001-03-14 Thread Derek Harding

I have the following code in my struts-config.xml document:




and I am getting the following tomcat error:

Parse Error at line 8 column -1: Attribute "page" is not declared for
element "f
orward".
org.xml.sax.SAXParseException: Attribute "page" is not declared for
element "for
ward".

i had this in the .5 version.  but for some reason i am getting this using
the 1.0b version. any ideas?




RE: newbie question

2001-03-14 Thread Craig R. McClanahan



On Wed, 14 Mar 2001, Jesse Vitrone wrote:

> I took WEB-INF classes out of my classpath, as well as struts.jar, and
> restarted Apache and Tomcat, but I still get the same error.
>  
> It's a problem if struts.jar is in my classpath?

Yes, if you have it on your classpath when you start Tomcat.  See the
message archives for lots of messages about what problems this causes.


> How am I expected to
> compile?
>  

Here's a couple of approaches:

* Create a simple shell script that compiles for you with a custom
  class path.  For example, create a "myjava.sh" script (on Unix)
  that says:
javac -classpath /path/to/struts.jar:$CLASSPATH "$@"
  and use this to compile things that need Struts.

* Use the Ant development tool (which is how Struts itself is built).
  There is an "Application Developer's Guide" in the Tomcat documentation
  that talks about how to use Ant to create web applications.


> Do I need to have my classes and properties in a package?  Right now, I
> didn't put anything in a package, they're just in my classes folder.
>  

The servlets will not have any problems with this, but the JSP pages
will.  This happens because a JSP page is compiled into a servlet, and
different servlet containers put the generated servlet into different
packages.  When you try to use  or  with an
unpackaged class name, the servlet container will look for this class in
the same package as the generated servlet.

For portability and correct operation, you should make your bean classes
in packages.

> Thanks,
> Jesse
> 

Craig McClanahan




Re: struts-config.xml suggestion

2001-03-14 Thread Rajan Gupta

I think the same can be applied to action and its type so that there can
be a possibility of using an action in diffenet mappings e.g.



  

By doing this, I can reuse editReg for different purposes while having the
ability to change the implementation at one place. References are always
nice :)
--- Bryan Field-Elliot <[EMAIL PROTECTED]> wrote:
> Using 1.0 beta --
> 
> I have many "global forwards" in my config. All of my "input forms" are 
> represented as global forwards. e.g.:
> 
> 
>
> 
> 
> In my action mappings, those which require ActionForms have an "input"
> tag:
> 
> ...
>input="/jsp/logon.jsp">
> 
> 
> It would be nice if the "input" attribute of the "action" tag would 
> allow me to refer to a global-forward, instead of an absolute filename. 
> If it did, then if I were to change the filename of my logon JSP page, I
> 
> would only have to change it in one place.
> 
> If I am missing something and I can already do this some other way, then
> 
> please direct me.
> 
> Thanks,
> Bryan
> 


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



RE: dynamically constructing non-jsp pages

2001-03-14 Thread Martijn Spronk

I assume one way should be by configuring your servlet/JSP
engine. For example in Resin, jsp files are processed by the
JspServlet servlet because of the mapping:



I don't see why this wouldn't work for *.js.

Martijn.



Martijn Spronk
[EMAIL PROTECTED]
www.columbusgroup.com
604.801.5758 ext. 248
Vancouver + Toronto + Seattle


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: March 14, 2001 8:51 AM
To: [EMAIL PROTECTED]
Subject: dynamically constructing non-jsp pages




first, let me say that this is not necessarily struts-specific, but since
i'm
pretty much using struts exclusively these days, and this list generates so
much
more useful info than the sun jsp and servlet list, i decided to try here
first.

here's my situation, i would like query a database and load the results for
some
reference tables into .js files, where they can then be quickly accessed for
client side validation.  (not an ideal solution, i know, but it would take
me
along time to explain why we came to this decision.)  i realize i can do
this
the hard way by directly printing out the response in the servlet, but i'd
like
to avoid that if possible.  is there a way to dynamically load a page and
not
have it end with the .jsp suffix?

thanks,

ab




RE: newbie question

2001-03-14 Thread Martijn Spronk
Title: newbie question



Do you 
have your ApplicationResources.properties file in the right 
place?
I have 
it in the same directory my ActionServlet is located. So in your 
case
that 
would be in your org.apache.struts.action folder (which is in your 
jar).
 
I am 
overriding the ActionServlet class so it's in my classes tree. Why don't 
you
try 
moving it around a bit.
 
I 
remember getting a similar error when I didn't have my properties 
file
in the 
right place.
 
Martijn.
 
Martijn Spronk[EMAIL PROTECTED]www.columbusgroup.com604.801.5758 ext. 
248Vancouver + Toronto + 
Seattle 

        
      action 
      
      org.apache.struts.action.ActionServlet 
      
       
      
      
      application 
      
      
      BNPriceResources 
      
       
      
       
      
      
      config 
      
      
      /WEB-INF/my-example-config.xml 
      
       
      
       
      
      
      debug 
      
      
      2 
      
       
      
       
      
      
      validate 
      
      
      true 
      
       
      
      1>   
       
  

  BNPriceResources is in my .../WEB-INF/classes folder and 
  I've got .../WEB-INF/classes in my classpath. 
  Any help would be greatly appreciated. 
  Thanks, 
      Jesse 
  


dynamically constructing non-jsp pages

2001-03-14 Thread Andre_Beskrowni



first, let me say that this is not necessarily struts-specific, but since i'm
pretty much using struts exclusively these days, and this list generates so much
more useful info than the sun jsp and servlet list, i decided to try here first.

here's my situation, i would like query a database and load the results for some
reference tables into .js files, where they can then be quickly accessed for
client side validation.  (not an ideal solution, i know, but it would take me
along time to explain why we came to this decision.)  i realize i can do this
the hard way by directly printing out the response in the servlet, but i'd like
to avoid that if possible.  is there a way to dynamically load a page and not
have it end with the .jsp suffix?

thanks,

ab





RE: newbie question

2001-03-14 Thread Jesse Vitrone
Title: newbie question



I took 
WEB-INF classes out of my classpath, as well as struts.jar, and restarted Apache 
and Tomcat, but I still get the same error.
 
It's a 
problem if struts.jar is in my classpath?  How am I expected to 
compile?
 
Do I 
need to have my classes and properties in a package?  Right now, I didn't 
put anything in a package, they're just in my classes 
folder.
 
Thanks,
    Jesse

  -Original Message-From: Deadman, Hal 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 
  11:20 AMTo: [EMAIL PROTECTED]Subject: RE: 
  newbie question
  
  > BNPriceResources is in my 
  .../WEB-INF/classes folder and I've got .../WEB-INF/classes in my classpath. 
  
  Don't put WEB-INF/classes in your classpath and don't put struts.jar in 
  your classpath. Any jarfiles in WEB-INF/lib and the WEB-INF/classes directory 
  get added to your webapps classpath. Having them in a the classpath 
  for the appserver will cause problems.  
  
-Original Message-From: Jesse Vitrone 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 
10:52 AMTo: Struts User Mailing List (E-mail)Subject: 
newbie question
I'm new to struts and I'm trying to create a little sample 
app, but I'm getting this error when I try to go my index.jsp
javax.servlet.ServletException: Cannot find message 
resources under key org.apache.struts.action.MESSAGE at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
at 
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315) 
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at 
org.apache.tomcat.core.Handler.service(Handler.java:286) at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) 
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 
What does this mean? 
I would think that it means that it can't find the 
properties file, but I've got this in my xml: 
         
    action 
    
    org.apache.struts.action.ActionServlet 
    
     
    
    
    application 
    
    
    BNPriceResources 
    
     
    
     
    
    
    config 
    
    
    /WEB-INF/my-example-config.xml 
    
     
    
     
    
    
    debug 
    
    
    2 
    
     
    
     
    
    
    validate 
    
    
    true 
    
     
    
    1>   
     
BNPriceResources is in my .../WEB-INF/classes folder and 
I've got .../WEB-INF/classes in my classpath. 
Any help would be greatly appreciated. 
Thanks, 
    Jesse 
  


Re: action class perform method

2001-03-14 Thread Martin Cooper

Yes. Just don't put the form-related entries in your struts-config.xml file.
Your perform() method will be called with null passed for the form
parameter.

--
Martin Cooper


- Original Message -
From: "Puneet Vardhan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 7:56 AM
Subject: action class perform method


> Hi,
>   Method 'perform'  in action class needs ActionForm as one of the
> parameters. I dont have a form and I dont need one as I just need to call
> perform method
>  from a url .
> like  Can I use perform method and ActionMapping inside perfom without having
> ActionForm class?
>
>  Thanks
> Puneet





RE: newbie question

2001-03-14 Thread Deadman, Hal
Title: newbie question




> BNPriceResources is in my 
.../WEB-INF/classes folder and I've got .../WEB-INF/classes in my classpath. 

Don't 
put WEB-INF/classes in your classpath and don't put struts.jar in your 
classpath. Any jarfiles in WEB-INF/lib and the WEB-INF/classes directory get 
added to your webapps classpath. Having them in a the classpath for 
the appserver will cause problems.  

  -Original Message-From: Jesse Vitrone 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 14, 2001 
  10:52 AMTo: Struts User Mailing List (E-mail)Subject: 
  newbie question
  I'm new to struts and I'm trying to create a little sample 
  app, but I'm getting this error when I try to go my index.jsp
  javax.servlet.ServletException: Cannot find message resources 
  under key org.apache.struts.action.MESSAGE at 
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
  at 
  _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315) 
  at 
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
  at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) 
  at 
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
  at 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
  at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
  at 
  org.apache.tomcat.core.Handler.service(Handler.java:286) at 
  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
  at 
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 
  at 
  org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
  at 
  org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) 
  at 
  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
  at 
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
  at java.lang.Thread.run(Thread.java:484) 
  What does this mean? 
  I would think that it means that it can't find the properties 
  file, but I've got this in my xml: 
           
      action 
      
      org.apache.struts.action.ActionServlet 
      
       
      
      
      application 
      
      
      BNPriceResources 
      
       
      
       
      
      
      config 
      
      
      /WEB-INF/my-example-config.xml 
      
       
      
       
      
      
      debug 
      
      
      2 
      
       
      
       
      
      
      validate 
      
      
      true 
      
       
      
      1>   
       
  BNPriceResources is in my .../WEB-INF/classes folder and I've 
  got .../WEB-INF/classes in my classpath. 
  Any help would be greatly appreciated. 
  Thanks,     
  Jesse 


RE: newbie question

2001-03-14 Thread Anderson, Jessica

>From the User Guide:

---

When you configue the controller servlet in the web application deployment
descriptor, one of the things you will need to define in an initialization
parameter is the base name of the resource bundle for the application. In
the case described above, it would be com.mycompany.mypackage.MyResources.

 

action

org.apache.struts.action.ActionServlet



application

com.mycompany.mypackage.MyResources



<.../>



The important thing is for the resource bundle to be found on the class path
for your application.

-Original Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 9:52 AM
To: Struts User Mailing List (E-mail)
Subject: newbie question



I'm new to struts and I'm trying to create a little sample app, but I'm
getting this error when I try to go my index.jsp


javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE 
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459) 
at
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
java:315) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at org.apache.tomcat.core.Handler.service(Handler.java:286) 
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7) 
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160) 
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 

What does this mean? 

I would think that it means that it can't find the properties file, but I've
got this in my xml: 

 
action 
 
org.apache.struts.action.ActionServlet 
 
application 
BNPriceResources 
 
 
config 
 
/WEB-INF/my-example-config.xml 
 
 
debug 
2 
 
 
validate 
true 
 
1>   
 

BNPriceResources is in my .../WEB-INF/classes folder and I've got
.../WEB-INF/classes in my classpath. 

Any help would be greatly appreciated. 

Thanks, 
Jesse 




action class perform method

2001-03-14 Thread Puneet Vardhan

Hi,
  Method 'perform'  in action class needs ActionForm as one of the
parameters. I dont have a form and I dont need one as I just need to call
perform method
 from a url . 
like 


newbie question

2001-03-14 Thread Jesse Vitrone
Title: newbie question





I'm new to struts and I'm trying to create a little sample app, but I'm getting this error when I try to go my index.jsp


javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


What does this mean?


I would think that it means that it can't find the properties file, but I've got this in my xml:


    
        action
        org.apache.struts.action.ActionServlet
        
            application
            BNPriceResources
        
        
            config
            /WEB-INF/my-example-config.xml
        
        
            debug
            2
        
        
            validate
            true
        
        1>   
    


BNPriceResources is in my .../WEB-INF/classes folder and I've got .../WEB-INF/classes in my classpath.


Any help would be greatly appreciated.


Thanks,
    Jesse





struts-config.xml suggestion

2001-03-14 Thread Bryan Field-Elliot

Using 1.0 beta --

I have many "global forwards" in my config. All of my "input forms" are 
represented as global forwards. e.g.:


   


In my action mappings, those which require ActionForms have an "input" tag:




It would be nice if the "input" attribute of the "action" tag would 
allow me to refer to a global-forward, instead of an absolute filename. 
If it did, then if I were to change the filename of my logon JSP page, I 
would only have to change it in one place.

If I am missing something and I can already do this some other way, then 
please direct me.

Thanks,
Bryan




I want to de-session my STRUTS app

2001-03-14 Thread Girish Haran

My app is currently heavily reliant on sessions and I want to reverse that so that
all bean passing is effected through the request object.
What is the easiest way to do this?

The action tag that is part of the STRUTS config scheme appears to have a scope
parameter that I thought is used by Struts html tags to get hold of the form
beans. Assuming that this was the case, I

   * added scope="request" in my actions
   * made sure that my aplication specific action classes (that inherit Action)
 place the form beans in the request

and kept my STRUTS HTML tags the same in the JSPs i.e no scope sepcification in
the form tag etc.

This did not work and I keep getting NullPointerException in FormTag.java (of
course, to test this I had to disable sessions in my app server (Resin))

The only way it works is if the STRUTS Form tags include the scope parameter to
point to request.

While I can change all my JSPs, I was wordering if there was a more elegant
solution to my problem.
Thanks
--
Girish Haran
Director of Engineering
Bidder's Edge, Inc.
Where Smart Buying Begins
[EMAIL PROTECTED]
(781) 993-9193, X205
www.biddersedge.com





Re: PostgreSQL problems.

2001-03-14 Thread Jim Richards

At 01:51 PM 14/03/01 +0100, you wrote:
>This does not sound at all like a PostgreSQL problem.
>
>Doesn't the error also show up, when you remove the datasource section?

No. That's the catch, it loads and runs if there's no datasource
section in the struts-config.xml file (although you need to comment
out the database code, or not access it).


--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



Re: PostgreSQL problems.

2001-03-14 Thread Matthias Bauer

This does not sound at all like a PostgreSQL problem.

Doesn't the error also show up, when you remove the datasource section?

--- Matthias

Jim Richards wrote:
> 
> At 01:28 PM 14/03/01 +0100, you wrote:
> >We are currently using PostgreSQL as a database in a productive system together
> >with struts. We tried with Interbase before, but ran into many many
> >difficulties. So we switched to PostgreSQL and everything went well from then
> >on.
> >
> >What specific kind of problems do you have?
> 
> See
> 
> http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=827
> 
> --
> Kumera - a new Open Source Content Management System
> for small to medium web sites written in Perl and using XML
> http://www.cyber4.org/kumera/index.html



Re: PostgreSQL problems.

2001-03-14 Thread Jim Richards

At 01:28 PM 14/03/01 +0100, you wrote:
>We are currently using PostgreSQL as a database in a productive system together
>with struts. We tried with Interbase before, but ran into many many
>difficulties. So we switched to PostgreSQL and everything went well from then
>on. 
>
>What specific kind of problems do you have?

See

http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=827


--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



Re: PostgreSQL problems.

2001-03-14 Thread Matthias Bauer

We are currently using PostgreSQL as a database in a productive system together
with struts. We tried with Interbase before, but ran into many many
difficulties. So we switched to PostgreSQL and everything went well from then
on. 

What specific kind of problems do you have?

--- Matthias

Jim Richards wrote:
> 
> I'm still getting problems with PostgreSQL (documented previously several
> times). Has anyone used it successfully as a database.
> 
> Yes, I've got the settings correct, the JDBC string correct, lots of other
> things. I really need someone who actually has it working to put their
> hand up and say "yes, it does work, this is how I did it."
> 
> Thanks.
> 
> --
> Kumera - a new Open Source Content Management System
> for small to medium web sites written in Perl and using XML
> http://www.cyber4.org/kumera/index.html



PostgreSQL problems.

2001-03-14 Thread Jim Richards


I'm still getting problems with PostgreSQL (documented previously several
times). Has anyone used it successfully as a database.

Yes, I've got the settings correct, the JDBC string correct, lots of other
things. I really need someone who actually has it working to put their
hand up and say "yes, it does work, this is how I did it."

Thanks.


--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



Scope and re-display with errors problem...

2001-03-14 Thread Firmin David

Hi all,
I make a request from a menu frame for a list of items, and they are then
displayed in the adjacent main frame. Before the page is displayed, the
"list" object is put in *request* scope in the code. If the user enters
invalid data and submits the form (of which the list is a part), the page
cannot be redisplayed with the associated errors as the "list" object is no
longer visible to it. I have no wish (for a multitude of reasons) to put the
"list" object in the session even though it would solve the problem.
Is there another way around this? I have tried  with
toScope="request" in the original page but clearly cannot call the new
variable the same thing, meaning that all my references to the bean within
the page become invalid. (I am unsure whether or not this would've worked
anyway)

Any help in finding a way of doing this without using session scope would be
very gratefully received!

Thanks in advance

Rgds
David


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
***




Re: Alternative Frameworks

2001-03-14 Thread ZlatanovV

"Perez, Bill" wrote:
> 
> Does anyone know of some good JSP/Servlet MVC Frameworks besides Struts?

Have a look at Enhydra's Barracuda http://www.enhydra.org - it is
supposed to be an alternative.
It is still in relatively early, but active development.

Vladimir