Re: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Caroline Jen
People answer questions without reading my original
post.  Therefore, I must re-type my original question
again.

Before I posted my question, I had configured the
Tomcat JDBCRealm following the instructions at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
so that I can do security testing programmically, such
as isUserInRole(), in my program.

If I use form based authentication, I insert the
 and its sub-elements in my web.xml file
(see below).  As we know, the  and
 are required.

My question is that the container-managed
authentication (we provide login page and error page
in the web.xml) does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.  

What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml or
we should use the  and
 in the web.xml file?

Thanks.
--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> Caroline Jen wrote:
> 
> >But, I do not want to use BASIC authentication.  I
> >have many different roles and hundreds of people
> per
> >role.  Users' name, role, etc. are stored in a
> >database.
> >
> How authentication is performed (BASIC, form-based,
> DIGEST, or SSL 
> client certificates) and how users are stored
> (database, directory 
> server, local XML file, ...) are two separate
> questions.  For most 
> servers , any combination is possible.  With Tomcat,
> for example, you 
> can configure JDBCRealm to point at your user and
> role definitions in a 
> database, and then use those users with any of the
> authentication 
> methods.  For more information, see:
> 
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
> 
> The choice between BASIC and form-based
> authentication, then, can be 
> based on user interface related concerns, rather
> than worrying about a 
> database.
> 
> Craig
> 
> >--- Matt Raible <[EMAIL PROTECTED]> wrote:
> >  
> >
> >>A JDBCRealm can use BASIC authentication - it
> >>doesn't require form-based.
> >>Here's an example app that might help you out:
> >>
> >>
> >>
> >>
>
>http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
> >  
> >
> >>HTH,
> >>
> >>Matt
> >>
> >>-Original Message-
> >>From: Caroline Jen [mailto:[EMAIL PROTECTED]
> >>Sent: Monday, October 06, 2003 4:45 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Container-Managed Authentication
> >> in web.xml vs.
> >>Specifying Paths in the struts-config.xml
> >>
> >>
> >>I use the Tomcat.  I configured the Tomcat
> JDBCRealm
> >>so that I can use programmic security testing,
> such
> >>as
> >>isUserInRole(), in my program.
> >>
> >>Because Tomcat JDBCRealm is form based, I inserted
> >>the
> >> and its sub-elements in my web.xml
> >>file
> >>(see below).  As we know, the 
> and
> >> are required.
> >>
> >>My question is that the container-managed
> >>authentication does not seem to be consistent with
> >>what we usually do in struts; e.g. we state the
> >>logical name and path for each .jsp page in the
> >>struts-config.xml file.  
> >>
> >>What is the Struts convention in dealing with user
> >>authentication?  Should we specify the paths for
> the
> >>logon page and error page in the struts.config.xml
> >>or
> >>we should use the  and
> >> in the web.xml file?
> >>
> >>
> >>
> >>
>
>==
> >  
> >
> >>
> >>   
> >> 
> >>SalesInfo
> >>  /SalesInfo/*
> >>  GET
> >>  POST
> >>   
> >>   
> >>  manager  
> >>   
> >>   
> >> 
> >>NONE
> >>   
> >>
> >>
> >>
> >>   FORM
> >>   
> >>  
> >>
> >>
> >>
>
>/authentication/login.html
> >  
> >
> >>  
> >>
> >>
> >>
>
>/authentication/error.html
> >  
> >
> >>
> >>
> >>
> >>
> >>
> >>   manager
> >>
> >>
> >>
> >>
> >>
> >>__
> >>Do you Yahoo!?
> >>

RE: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-06 Thread Caroline Jen
But, I do not want to use BASIC authentication.  I
have many different roles and hundreds of people per
role.  Users' name, role, etc. are stored in a
database.
--- Matt Raible <[EMAIL PROTECTED]> wrote:
> A JDBCRealm can use BASIC authentication - it
> doesn't require form-based.
> Here's an example app that might help you out:
> 
>
http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
> 
> HTH,
> 
> Matt
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 4:45 PM
> To: [EMAIL PROTECTED]
> Subject: Container-Managed Authentication
>  in web.xml vs.
> Specifying Paths in the struts-config.xml
> 
> 
> I use the Tomcat.  I configured the Tomcat JDBCRealm
> so that I can use programmic security testing, such
> as
> isUserInRole(), in my program.
> 
> Because Tomcat JDBCRealm is form based, I inserted
> the
>  and its sub-elements in my web.xml
> file
> (see below).  As we know, the  and
>  are required.
> 
> My question is that the container-managed
> authentication does not seem to be consistent with
> what we usually do in struts; e.g. we state the
> logical name and path for each .jsp page in the
> struts-config.xml file.  
> 
> What is the Struts convention in dealing with user
> authentication?  Should we specify the paths for the
> logon page and error page in the struts.config.xml
> or
> we should use the  and
>  in the web.xml file?
> 
>
==
> 
>
>  
> SalesInfo
>   /SalesInfo/*
>   GET
>   POST
>
>
>   manager  
>
>
>  
> NONE
>
> 
> 
> 
>FORM
>
>   
>
/authentication/login.html
>   
>
/authentication/error.html
> 
> 
> 
> 
> 
>manager
> 
> 
> 
> 
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Container-Managed Authentication in web.xml vs. Specifying Paths in the struts-config.xml

2003-10-06 Thread Caroline Jen
I use the Tomcat.  I configured the Tomcat JDBCRealm
so that I can use programmic security testing, such as
isUserInRole(), in my program.

Because Tomcat JDBCRealm is form based, I inserted the
 and its sub-elements in my web.xml file
(see below).  As we know, the  and
 are required.

My question is that the container-managed
authentication does not seem to be consistent with
what we usually do in struts; e.g. we state the
logical name and path for each .jsp page in the
struts-config.xml file.  

What is the Struts convention in dealing with user
authentication?  Should we specify the paths for the
logon page and error page in the struts.config.xml or
we should use the  and
 in the web.xml file?

==

   
  SalesInfo
  /SalesInfo/*
  GET
  POST
   
   
  manager  
   
   
  NONE
   



   FORM
   
  
/authentication/login.html
  
/authentication/error.html





   manager





__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: My Mail is Bombing

2003-10-05 Thread Caroline Jen
Todd,

 I am uncertain if this piece of information will
be of any use to you -- when I first tried to setup
JavaMail, I followed the online instruction and put
the mail.jar and activation.jar in my
j2sdk1.4.1_02\jre\li\ext folder.  The JavaMail did not
work.  Thereafter, I got an advise from someone saying
that it was a class loader problem.  I then put the
location of the mail.jar and activation.jar explicitly
in the CLASSPATH.  It worked well.

-Caroline
--- todd thorner <[EMAIL PROTECTED]> wrote:
> Thanks for helping me, I appreciate the ideas and
> thoughts.
> 
> I have activation.jar and mail.jar in
> TOMCAT-HOME/common/lib and nowhere else on the
> machine I am using.  Is this right or wrong?  Are
> there other .jar files that I should make sure are
> in (or not in) the common/lib directory?  Does
> activation.jar or mail.jar also need to be in my
> webapp's WEB-INF/lib directory?
> 
> I think I'm doing something wrong with the
> MimeMessage object (passing an invalid Session
> object to the constructor or something like that). 
> Does anyone know what circumstances would prevent a
> new MimeMessage from being created properly?  What
> should I do about setContentType() for my
> request/response ("text/plain" or "text/html")?
> 
> Much of my headache is that I have only one machine
> with which to work, and it runs Windows ME (my Linux
> machine blew a motherboard recently).
> 
> Can you learned Struts-Users help me with further
> suggestions?  I am another one of those whose
> timeframe is "urgent" (I have a job opportunity that
> hinges on my ability to demonstrate Struts
> knowledge).
> 
> Thanks for anything you can offer.
> --
> 
> - Original Message -
> 
> DATE: Sun, 5 Oct 2003 14:09:21 
> From: "Yann Cébron" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: 
> 
> >Todd,
> >
> >you need to add activation.jar to your webapp or TC
> (common/lib)
> >
> >d/l:
> >
>
>http://java.sun.com/products/javabeans/glasgow/jaf.html
> >
> >HTH,
> >Yann
> >
> >
> >
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> 
>

> Get advanced SPAM filtering on Webmail or POP Mail
> ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



How To Use Connection Pooling in Struts 1.1?

2003-09-30 Thread Caroline Jen
Before I started converting my web app to STRUTS, I
used a DataSource to do connection pooling. I had the
Tomcat server.xml file configured. My servlet accessed
a helper class in which I had Context.lookup for the
JNDI name.  All worked well.

Now that I am using STRUTS. I try to authenticate the
logon information against "database".  Should I keep
Connection, ResultSet, Statement in an Action or in a
business bean?  How should I utilize a DataSource and
Connection Pooling in STRUTS 1.1?




__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: No Error Message But A Blank Page Is Displayed.

2003-09-30 Thread Caroline Jen
I am very grateful for the overwhelming help that I
have received.  

I followed the advices given by all of you and paid
special attention to possible mis-spelling in forward
mapping.  I did not find any mis-spelling or mixing up
of lower case/upper case.

Finally, I re-typed all the key words in the forward
mapping parts of the program.  Everything worked -  I
got the expected page displayed in the browser.

I still do not have any idea why I got a blank page
last night.  I would be more than happy to share my
experience with all of you if I knew the root cause of
the problem.  But, I do not know.

-Caroline
--- "Richard J. Duncan" <[EMAIL PROTECTED]> wrote:
> In my experience, this is because your
> execute/perform is returning null as the result of
> findForward("forwardname") not finding anything.
> Usually, this is because I misspelled the forward
> name.
> 
> Returning null from execute/perform tells struts
> that your method wrote the response itself.
> 
> Regards,
>  
> Rich
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 30, 2003 3:05 AM
> To: Struts Users Mailing List
> Subject: Re: No Error Message But A Blank Page Is
> Displayed.
> 
> Your missing html:form
> > My welcome page "is displayed" as the very first
> > screen without any problem.  The page has
> >  and  tags, which
> > test if any registered user has logged on.
> >
> > The problem occurred after I filled out username,
> and
> > clicked the "Submit" button.  Thereafter, the
> welcome
> > page was not shown.  My welcome page looks like
> the
> > following:
> >
> > Welcome.jsp
> >
> > <%@ taglib uri="/tags/struts-bean" prefix="bean"
> %>
> > <%@ taglib uri="/tags/struts-html" prefix="html"
> %>
> > <%@ taglib uri="/tags/struts-logic" prefix="logic"
> %>
> > 
> > 
> > Welcome!
> > 
> > 
> > 
> > 
> > Welcome  > property="username"/>!
> > 
> > 
> > Welcome World!
> > 
> > 
> > 
> > Sign
> > in
> > 
> > Sign
> > out
> > 
> > 
> > 
> > 
> > 
> > --- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote:
> >> You might want to put System.out.println("Line
> >> [number]") ; to see
> >> the flow in your action. BTW did you actually put
> >> anything(like hello
> >> world) in Welcome.jsp ?
> >>
> >>
> >> Caroline Jen wrote:
> >>
> >> >Which resource file needs to be updated?  I have
> >> >checked the application.properties.  Nothing in
> >> that
> >> >file is relevant to my problem.
> >> >--- Abhijeet Mahalkar
> >> ><[EMAIL PROTECTED]> wrote:
> >> >
> >> >
> >> >>have u updated the Resource files... ?
> >> >>abhijeet
> >> >>
> >> >>- Original Message -
> >> >>From: "Caroline Jen" <[EMAIL PROTECTED]>
> >> >>To: <[EMAIL PROTECTED]>
> >> >>Sent: Tuesday, September 30, 2003 9:45 AM
> >> >>Subject: No Error Message But A Blank Page Is
> >> >>Displayed.
> >> >>
> >> >>
> >> >>I am experimenting a basic application - logon.
>  I
> >> >>got
> >> >>the first two screens working without problem.
> >> >>However, the third screen displays a blank page
> >> (no
> >> >>error message).  I am having a very difficult
> time
> >> >>to
> >> >>figure out the problem; henceforth, seeking
> help.
> >> >>Here is the history of my application:
> >> >>
> >> >>1.
> http://localhost:8080/LogonPractice/index.jsp
> >> (no
> >> >>problem and I clicked on "Sign in")
> >> >>2.
> >> >>
> >> >>
> >> >>
> >>
>
>>http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
> >> >
> >> >
> >> >>(no problem and the screen asked for username
> and
> >> >>password.  I filled out the information and
> >> clicked
> >> >>on
> >> >>"Submit")
> >> >>3.
> >>
> >>http://localhost:8080/LogonPractice/LogonSubmit.do
> >> >>(displayed a blank page)
&g

Re: No Error Message But A Blank Page Is Displayed.

2003-09-29 Thread Caroline Jen
My welcome page "is displayed" as the very first
screen without any problem.  The page has
 and  tags, which
test if any registered user has logged on.  

The problem occurred after I filled out username, and
clicked the "Submit" button.  Thereafter, the welcome
page was not shown.  My welcome page looks like the
following:

Welcome.jsp

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Welcome!




Welcome !


Welcome World!



Sign
in

Sign
out





--- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote:
> You might want to put System.out.println("Line
> [number]") ; to see
> the flow in your action. BTW did you actually put
> anything(like hello 
> world) in Welcome.jsp ?
> 
> 
> Caroline Jen wrote:
> 
> >Which resource file needs to be updated?  I have
> >checked the application.properties.  Nothing in
> that
> >file is relevant to my problem.
> >--- Abhijeet Mahalkar
> ><[EMAIL PROTECTED]> wrote:
> >  
> >
> >>have u updated the Resource files... ?
> >>abhijeet
> >> 
> >>- Original Message - 
> >>From: "Caroline Jen" <[EMAIL PROTECTED]>
> >>To: <[EMAIL PROTECTED]>
> >>Sent: Tuesday, September 30, 2003 9:45 AM
> >>Subject: No Error Message But A Blank Page Is
> >>Displayed.
> >>
> >>
> >>I am experimenting a basic application - logon.  I
> >>got
> >>the first two screens working without problem. 
> >>However, the third screen displays a blank page
> (no
> >>error message).  I am having a very difficult time
> >>to
> >>figure out the problem; henceforth, seeking help. 
> >>Here is the history of my application:
> >>
> >>1. http://localhost:8080/LogonPractice/index.jsp
> (no
> >>problem and I clicked on "Sign in")
> >>2.
> >>
> >>
> >>
>
>http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
> >  
> >
> >>(no problem and the screen asked for username and
> >>password.  I filled out the information and
> clicked
> >>on
> >>"Submit")  
> >>3.
> >>http://localhost:8080/LogonPractice/LogonSubmit.do
> >>(displayed a blank page)
> >>
> >>The Tomcat log file shows the following (no error
> >>message at all):
> >>
> >>2003-09-29 23:29:26 action: Processing a GET for
> >>/Logon
> >>2003-09-29 23:29:26 action:  Looking for Action
> >>instance for class
> >>org.apache.struts.actions.ForwardAction
> >>2003-09-29 23:29:26 action:   Double checking for
> >>Action instance already there
> >>2003-09-29 23:29:26 action:   Creating new Action
> >>instance
> >>2003-09-29 23:29:35 action: Processing a POST for
> >>/LogonSubmit
> >>2003-09-29 23:29:35 action:  Looking for
> ActionForm
> >>bean under attribute 'logonForm'
> >>2003-09-29 23:29:35 action:  Creating new
> ActionForm
> >>instance of class
> >>'org.apache.artimus.logon.LogonForm'
> >>2003-09-29 23:29:35 action:  Storing instance
> under
> >>attribute 'logonForm' in scope 'request'
> >>2003-09-29 23:29:35 action:  Populating bean
> >>properties from this request
> >>2003-09-29 23:29:35 action:  Validating input form
> >>properties
> >>2003-09-29 23:29:35 action:   No errors detected,
> >>accepting input
> >>2003-09-29 23:29:35 action:  Looking for Action
> >>instance for class
> >>org.apache.artimus.logon.LogonAction
> >>2003-09-29 23:29:35 action:   Double checking for
> >>Action instance already there
> >>2003-09-29 23:29:35 action:   Creating new Action
> >>instance
> >>
> >>in my struts-config.xml, I have:
> >>
> >> >>path="/LogonSubmit"
> >>   
> >>type="org.apache.artimus.logon.LogonAction"
> >>name="logonForm"
> >>scope="request"
> >>validate="true"
> >>input="/signin/Logon.jsp">
> >> >>name="valid"
> >>path="/signin/Welcome.jsp"/>
> >>
> >>
&

Re: No Error Message But A Blank Page Is Displayed.

2003-09-29 Thread Caroline Jen
Which resource file needs to be updated?  I have
checked the application.properties.  Nothing in that
file is relevant to my problem.
--- Abhijeet Mahalkar
<[EMAIL PROTECTED]> wrote:
> have u updated the Resource files... ?
> abhijeet
>  
> - Original Message - 
> From: "Caroline Jen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 30, 2003 9:45 AM
> Subject: No Error Message But A Blank Page Is
> Displayed.
> 
> 
> I am experimenting a basic application - logon.  I
> got
> the first two screens working without problem. 
> However, the third screen displays a blank page (no
> error message).  I am having a very difficult time
> to
> figure out the problem; henceforth, seeking help. 
> Here is the history of my application:
> 
> 1. http://localhost:8080/LogonPractice/index.jsp (no
> problem and I clicked on "Sign in")
> 2.
>
http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
> (no problem and the screen asked for username and
> password.  I filled out the information and clicked
> on
> "Submit")  
> 3.
> http://localhost:8080/LogonPractice/LogonSubmit.do
> (displayed a blank page)
> 
> The Tomcat log file shows the following (no error
> message at all):
> 
> 2003-09-29 23:29:26 action: Processing a GET for
> /Logon
> 2003-09-29 23:29:26 action:  Looking for Action
> instance for class
> org.apache.struts.actions.ForwardAction
> 2003-09-29 23:29:26 action:   Double checking for
> Action instance already there
> 2003-09-29 23:29:26 action:   Creating new Action
> instance
> 2003-09-29 23:29:35 action: Processing a POST for
> /LogonSubmit
> 2003-09-29 23:29:35 action:  Looking for ActionForm
> bean under attribute 'logonForm'
> 2003-09-29 23:29:35 action:  Creating new ActionForm
> instance of class
> 'org.apache.artimus.logon.LogonForm'
> 2003-09-29 23:29:35 action:  Storing instance under
> attribute 'logonForm' in scope 'request'
> 2003-09-29 23:29:35 action:  Populating bean
> properties from this request
> 2003-09-29 23:29:35 action:  Validating input form
> properties
> 2003-09-29 23:29:35 action:   No errors detected,
> accepting input
> 2003-09-29 23:29:35 action:  Looking for Action
> instance for class
> org.apache.artimus.logon.LogonAction
> 2003-09-29 23:29:35 action:   Double checking for
> Action instance already there
> 2003-09-29 23:29:35 action:   Creating new Action
> instance
> 
> in my struts-config.xml, I have:
> 
>  path="/LogonSubmit"
>
> type="org.apache.artimus.logon.LogonAction"
> name="logonForm"
> scope="request"
> validate="true"
> input="/signin/Logon.jsp">
>  name="valid"
> path="/signin/Welcome.jsp"/>
> 
> 
> and my LogonAction.java is:
> 
> package org.apache.artimus.logon;
> 
> import java.io.IOException;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionServlet;
> 
> import org.apache.artimus.lang.Constants;
> 
> public final class LogonAction extends Action {
> 
> public boolean isUserLogon(String username,
> String password) throws
> UserDirectoryException
> {
> 
> return
>
(UserDirectory.getInstance().isValidPassword(username,password));
> // return true;
> 
> }
> 
> 
> public ActionForward execute(ActionMapping
> mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
> 
> // Obtain username and password from web
> tier
> String username = ((LogonForm)
> form).getUsername();
> String password = ((LogonForm)
> form).getPassword();
> 
> // Validate credentials with business tier
> boolean validated = false;
> try {
> 
> validated =
> isUserLogon(username,password);
> }
> 
> catch (UserDirectoryException ude) {
&g

No Error Message But A Blank Page Is Displayed.

2003-09-29 Thread Caroline Jen
I am experimenting a basic application - logon.  I got
the first two screens working without problem. 
However, the third screen displays a blank page (no
error message).  I am having a very difficult time to
figure out the problem; henceforth, seeking help. 
Here is the history of my application:

1. http://localhost:8080/LogonPractice/index.jsp (no
problem and I clicked on "Sign in")
2.
http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
(no problem and the screen asked for username and
password.  I filled out the information and clicked on
"Submit")  
3. http://localhost:8080/LogonPractice/LogonSubmit.do
(displayed a blank page)

The Tomcat log file shows the following (no error
message at all):

2003-09-29 23:29:26 action: Processing a GET for
/Logon
2003-09-29 23:29:26 action:  Looking for Action
instance for class
org.apache.struts.actions.ForwardAction
2003-09-29 23:29:26 action:   Double checking for
Action instance already there
2003-09-29 23:29:26 action:   Creating new Action
instance
2003-09-29 23:29:35 action: Processing a POST for
/LogonSubmit
2003-09-29 23:29:35 action:  Looking for ActionForm
bean under attribute 'logonForm'
2003-09-29 23:29:35 action:  Creating new ActionForm
instance of class 'org.apache.artimus.logon.LogonForm'
2003-09-29 23:29:35 action:  Storing instance under
attribute 'logonForm' in scope 'request'
2003-09-29 23:29:35 action:  Populating bean
properties from this request
2003-09-29 23:29:35 action:  Validating input form
properties
2003-09-29 23:29:35 action:   No errors detected,
accepting input
2003-09-29 23:29:35 action:  Looking for Action
instance for class
org.apache.artimus.logon.LogonAction
2003-09-29 23:29:35 action:   Double checking for
Action instance already there
2003-09-29 23:29:35 action:   Creating new Action
instance

in my struts-config.xml, I have:





and my LogonAction.java is:

package org.apache.artimus.logon;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;

import org.apache.artimus.lang.Constants;

public final class LogonAction extends Action {

public boolean isUserLogon(String username,
String password) throws UserDirectoryException
{

return
(UserDirectory.getInstance().isValidPassword(username,password));
// return true;

}


public ActionForward execute(ActionMapping
mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {

// Obtain username and password from web tier
String username = ((LogonForm)
form).getUsername();
String password = ((LogonForm)
form).getPassword();

// Validate credentials with business tier
boolean validated = false;
try {

validated =
isUserLogon(username,password);
}

catch (UserDirectoryException ude) {
// couldn't connect to user directory
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.logon.connect"));
saveErrors(request,errors);
// return to input page
return (new
ActionForward(mapping.getInput()));
}

if (!validated) {
// credentials don't match
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.logon.invalid"));
saveErrors(request,errors);
// return to input page
return (new
ActionForward(mapping.getInput()));
}

// Save our logged-in user in the session,
// because we use it again later.
HttpSession session = request.getSession();
session.setAttribute(Constants.USER_KEY,
form);

// Log this event, if appropriate
if (servlet.getDebug() >= Constants.DEBUG) {
StringBuffer message =
new StringBuffer("LogonAction: User
'");
message.append(username);
message.append("' logged on in session ");
message.append(session.getId());
servlet.log(message.toString());
}

// Return success
return (mapping.findForward(Constants.VALID));

}

} // End LogonAction


The Constants.class is in the
ApplicationRoot/WEB-INF/classes/org/apache/artimus/lang
directory.  And I have 
public static final String VALID = "valid";

My Welcome.jsp in the 

RE: What Could Lead To NoClassDefFound Error?

2003-09-22 Thread Caroline Jen
James and Nate, thank you very much.  My application
works now after I placed the struts-legacy.jar in the
ContextRoot/WEB-INF/lib directory.

-Caroline
--- James Childers <[EMAIL PROTECTED]> wrote:
> 99 times out of 100 this is due to a classpath
> issue, usually due to a misplaced or nonexistant jar
> file. I don't believe the legacy components are
> included in the Struts 1.1 jar, so if you're using
> that stuff you'll need to get it separately:
> 
>
http://archive.apache.org/dist/jakarta/struts/struts-legacy/
> 
> HTH,
> 
> -= J
> 
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 22, 2003 2:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: What Could Lead To NoClassDefFound Error?
> > 
> > 
> > Your help is greatly appreciated: what could lead
> to
> > NoClassDefFound Error:
> > org/apache/struts/legacy/GenericDataSource?
> > 
> > the error message is HTTP Status 500.  The root
> cause
> > is:
> > java.lang.NoClassDefFoundError:
> > org/apache/struts/legacy/GenericDataSource
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



What Could Lead To NoClassDefFound Error?

2003-09-22 Thread Caroline Jen
Your help is greatly appreciated: what could lead to
NoClassDefFound Error:
org/apache/struts/legacy/GenericDataSource?

the error message is HTTP Status 500.  The root cause
is:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource

Here is the log:

description: The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for
servlet action threw exception
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
at
javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

What Could Lead To NoClassDefFound Error: org/apache/struts/legacy/GenericDataSource?

2003-09-22 Thread Caroline Jen
Your help is greatly appreciated: what could lead to
NoClassDefFound Error:
org/apache/struts/legacy/GenericDataSource?

the error message is HTTP Status 500.  The root cause
is:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource

Here is the log:

description: The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for
servlet action threw exception
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
at
javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

What Could Lead To NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource?

2003-09-22 Thread Caroline Jen
Your help is greatly appreciated: what could lead to
NoClassDefFound Error:
org/apache/struts/legacy/GenericDataSource?

the error message is HTTP Status 500.  The root cause
is:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource

Here is the log:

description: The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for
servlet action threw exception
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
at
javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

Re: Do Not Understand "/tags/struts-logic" not found

2003-09-19 Thread Caroline Jen
I am following Ted Husted's example code and setup;
therefore, I do not think it is the problem.  Those
TLD files can be in the WEB-INF/lib folder.
--- John Cavacas <[EMAIL PROTECTED]> wrote:
> Shouldn't those TLD files be in WEB-INF/ ? not
> WEB-INF/lib ...
> 
> At 07:49 PM 19/09/2003 -0700, you wrote:
> >I double checked that
> >
> >1. struts-logic.tld is in the
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\MyApplication\WEB-INF\lib
> >folder
> >
> >2. in my web.xml file, I have
> >
> > /tags/struts-logic
> >
>
>/WEB-INF/lib/struts-logic.tld
> >   
> >
> >3. in my .jsp files, I have
> ><%@ taglib uri="/tags/struts-logic" prefix="logic"
> %>
> >
> >When I ran the application, I had
> >
> >org.apache.jasper.JasperException: File
> >"/tags/struts-logic" not found
> >
> >displayed in the browser.
> >
> >I looked at the tomcat log file, it seems to say
> >something else is going on.  I do not have the
> ability
> >diagnose the proble and hereby post the problem for
> >help.  The log message is in the attachment.  Thank
> >you.
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> >http://sitebuilder.yahoo.com
> >2003-09-19 22:18:04 WebappLoader[]: Deploying class
> repositories to work 
> >directory
>
C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\_
> >2003-09-19 22:18:04 WebappLoader[]: Deploy class
> files /WEB-INF/classes to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\ROOT\WEB-INF\classes
> >2003-09-19 22:18:04 StandardManager[]: Seeding
> random number generator 
> >class java.security.SecureRandom
> >2003-09-19 22:18:04 StandardManager[]: Seeding of
> random number generator 
> >has been completed
> >2003-09-19 22:18:04 StandardWrapper[:default]:
> Loading container servlet 
> >default
> >2003-09-19 22:18:04 StandardWrapper[:invoker]:
> Loading container servlet 
> >invoker
> >2003-09-19 22:18:04 HostConfig[localhost]:
> Deploying configuration 
> >descriptor admin.xml
> >2003-09-19 22:18:12 HostConfig[localhost]:
> Deploying configuration 
> >descriptor manager.xml
> >2003-09-19 22:18:12 WebappLoader[/manager]:
> Deploying class repositories 
> >to work directory 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\manager
> >2003-09-19 22:18:12 ContextConfig[/manager]:
> Configured an authenticator 
> >for method BASIC
> >2003-09-19 22:18:12 StandardManager[/manager]:
> Seeding random number 
> >generator class java.security.SecureRandom
> >2003-09-19 22:18:12 StandardManager[/manager]:
> Seeding of random number 
> >generator has been completed
> >2003-09-19 22:18:12
> StandardWrapper[/manager:default]: Loading container
> 
> >servlet default
> >2003-09-19 22:18:12
> StandardWrapper[/manager:invoker]: Loading container
> 
> >servlet invoker
> >2003-09-19 22:18:12 HostConfig[localhost]:
> Expanding web application 
> >archive artimus_1_1.war
> >2003-09-19 22:18:12 StandardHost[localhost]:
> Installing web application at 
> >context path /artimus_1_1 from URL 
>
>file:C:/jakarta-tomcat-4.1.18-LE-jdk14/webapps/artimus_1_1
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploying class 
> >repositories to work directory 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\artimus_1_1
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy class files 
> >/WEB-INF/classes to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\classes
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-beanutils.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-beanutils.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-collections.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-collections.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-dbcp.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-dbcp.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-digester.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-digester.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-fileupload.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-fileupload.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-lang.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-lang.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-logging.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-logging.jar
> >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
> Deploy JAR 
> >/WEB-INF/lib/commons-pool.jar to 
>
>C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-pool.jar
> >2003

Do Not Understand "/tags/struts-logic" not found

2003-09-19 Thread Caroline Jen
I double checked that 

1. struts-logic.tld is in the 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\MyApplication\WEB-INF\lib
folder

2. in my web.xml file, I have  

/tags/struts-logic
   
/WEB-INF/lib/struts-logic.tld
  

3. in my .jsp files, I have
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

When I ran the application, I had

org.apache.jasper.JasperException: File
"/tags/struts-logic" not found 

displayed in the browser.

I looked at the tomcat log file, it seems to say
something else is going on.  I do not have the ability
diagnose the proble and hereby post the problem for
help.  The log message is in the attachment.  Thank
you.


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com2003-09-19 22:18:04 WebappLoader[]: Deploying class repositories to work directory 
C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\_
2003-09-19 22:18:04 WebappLoader[]: Deploy class files /WEB-INF/classes to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\ROOT\WEB-INF\classes
2003-09-19 22:18:04 StandardManager[]: Seeding random number generator class 
java.security.SecureRandom
2003-09-19 22:18:04 StandardManager[]: Seeding of random number generator has been 
completed
2003-09-19 22:18:04 StandardWrapper[:default]: Loading container servlet default
2003-09-19 22:18:04 StandardWrapper[:invoker]: Loading container servlet invoker
2003-09-19 22:18:04 HostConfig[localhost]: Deploying configuration descriptor admin.xml
2003-09-19 22:18:12 HostConfig[localhost]: Deploying configuration descriptor 
manager.xml
2003-09-19 22:18:12 WebappLoader[/manager]: Deploying class repositories to work 
directory C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\manager
2003-09-19 22:18:12 ContextConfig[/manager]: Configured an authenticator for method 
BASIC
2003-09-19 22:18:12 StandardManager[/manager]: Seeding random number generator class 
java.security.SecureRandom
2003-09-19 22:18:12 StandardManager[/manager]: Seeding of random number generator has 
been completed
2003-09-19 22:18:12 StandardWrapper[/manager:default]: Loading container servlet 
default
2003-09-19 22:18:12 StandardWrapper[/manager:invoker]: Loading container servlet 
invoker
2003-09-19 22:18:12 HostConfig[localhost]: Expanding web application archive 
artimus_1_1.war
2003-09-19 22:18:12 StandardHost[localhost]: Installing web application at context 
path /artimus_1_1 from URL file:C:/jakarta-tomcat-4.1.18-LE-jdk14/webapps/artimus_1_1
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploying class repositories to work 
directory C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\artimus_1_1
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy class files /WEB-INF/classes to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\classes
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-beanutils.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-beanutils.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-collections.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-collections.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-dbcp.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-dbcp.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-digester.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-digester.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-fileupload.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-fileupload.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-lang.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-lang.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-logging.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-logging.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-pool.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-pool.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-resources.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-resources.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-scaffold.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-scaffold.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-services.jar to 
C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-services.jar
2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
/WEB-INF/lib/commons-validator.jar to 
C:\jakarta-tomca

Installation of Artimus_1_1 Was Stuck When Tried to "Create Resources"

2003-09-19 Thread Caroline Jen
I successfully got the Artimus_1_1 welcome page.  I
clicked LOGON buttion and the next page was displayed.
 I selected "Create Resources" from the Manager
options and clicked on GO.  I had
http://localhost:8080/artimus_1_1/do/menu/Manager
displayed in the address bar with the following
message shown on the screen:

. The process did not complete. Details should follow.

. ResourceException: A required resource is not
available. Caused by: java.sql.SQLException: General
error, message from server: "Table 'artimus_keys'
already exists" 

How do I fix the problem?


Part of the messages in the Tomcat log file is shown
below:
 
2003-09-19 03:27:09 action: Creating Helper
org.apache.artimus.CreateResources
2003-09-19 03:27:09 action: Helper created class:
org.apache.artimus.CreateResources
2003-09-19 03:27:09 action: Executing helper beans 
2003-09-19 03:27:09 action: Processing helper beans 
2003-09-19 03:27:09 action: Executing helper beans 
2003-09-19 03:27:10 action: *** ACTION EXCEPTION: 
org.apache.commons.scaffold.lang.ResourceException:
ResourceException: A required resource is not
available.
at
org.apache.commons.scaffold.sql.AccessBase.executeUpdate(Unknown
Source)
at org.apache.artimus.keys.Access.createTable(Unknown
Source)
at org.apache.artimus.CreateResources.execute(Unknown
Source)
at
org.apache.struts.scaffold.ProcessAction.executeLogic(Unknown
Source)
at
org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown
Source)
at
org.apache.struts.scaffold.BaseAction.execute(Unknown Source)

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Confused - Scaffold and Action Mapping

2003-09-17 Thread Caroline Jen
I have problem to understand the action mapping shown
below:

code:
-

 


 

-

It looks to me that 

1. menuForm is the logical name for the form bean as 
   given in the form-bean segment of the 
   struts-config.xml file.  

Question 1: What is the rational of having 'menuForm'
in the org.apache.struts.scaffold folder in
ActionMapping? 

2. the action that is going to be executed is 
   the ExistsAttributeAction in the 
   org.apache.struts.scaffold folder.  If the 
   condition returned in that action is 'success', the

   article.Menu tile will render the next page. 

   The code of ExistsAttributeAction.java shows:

   mapping.findForward(Tokens.SUCCESS);

Question 2: Where can I find Tokens.SUCCESS maps to
'success'?

Thank you for your help.


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Please Help Me To Understand "forward"

2003-09-12 Thread Caroline Jen
I am studying the code in Artimus_1_1 to make sure
that I understand how things actually work.  I am lost
at the beginning of the application.  Please kindly
help me.  The index.jsp of the application contains
two lines:

code:
--

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


---

Does this redirect forward tells the browser to submit
a new request to the path with logical name "welcome"?

I then searched the config.xml file, 


code:
---



 

 
 
 
 ...


---

The path of the logical name "welcome" is "do/Menu"
(note it is upper case Menu).  The other place that
"do/Menu" appears in the config.xml is:


   



There is no Menu ActionServlet in the application.

There is a menu.jsp (note it is lower case menu) file
in the application. Does this application display
menu.jsp when it is first launched? Apparently, it
does. This menu.jsp is in the
artimus_1_1/WEB-INF/src/pages/article/content folder.
I am confused - does /do/Menu locate the menu.jsp 

1. in the /src/pages/article/content folder?
2. regardless upper or lower cases? 



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Menu Forwards?

2003-09-11 Thread Caroline Jen
This is the application I am studying.  The index.jsp
of the application contains two lines:


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



What is the meaning of this redirect forward?  Is the
browser asked to submit a new request to the path with
logical name "welcome"?

I then searched the config.xml file, 


  


 



 

 

 

 ...

  

The path of the logical name "welcome" is "do/Menu". 
However, there is no Menu ActionServlet in the
application.  

There is Menu.jsp in the application.  Does this
application displays the Menu.jsp file when first
deployed?



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



NullPointerException While Deploying the Artimus_1_1

2003-09-09 Thread Caroline Jen
I have 
 
 1. Tomcat 4.1.18-LE-jdk14 up and running in the
Windows XP Pro environment;
 2. I am using Struts-1.1-rc2; 
 3. I have MySQL installed in my machine. And I have
used the Tomcat connection pool to retrieve data
from the MySQL database before.

I tried to deploy the artimus_1_1 application and I
followed the instructions in the README file that was
bundled with the artimus_1_1.war:

 4. I have jdbc2_0-stdext.jar, jta-spec1_0_1.jar, and 

xerces.jar in my 
C:\jakarta-tomcat-4.1.18-LE-jdk14\common\lib
folder

   I hope that jta-spec1_0_1.jar is equivalent to 
   jta.jar
 5. I did not fully understand this instruction:

   "Create a /var/lucene/artimus folder"; therefore,  

   in my machine, I have both folders created
   C:\var\lucene\artimus 
   and 
  
C:\jakarta-tomcat-4.1.18-LE-jdk14\var\lucene\artimus

 6. I exactly followed the rest of the instructions in

the README.txt 

I successfully logged into the application, using the
username: artimus and password: g0rd0n. 

I continued to followed the instructions.  I  selected
"Create Resources" from the Manager's Options, and
press GO. At this point, I got the following message
on the top of the screen:

The process did not complete. Details should follow. 
ERROR: java.lang.NullPointerException

Please advise me what to do with it.  Thanks a lot

Shown below is what in the Tomcat log:

2003-09-05 18:02:52 action: Creating Helper
org.apache.artimus.CreateResources
2003-09-05 18:02:52 action: Helper created class:
org.apache.artimus.CreateResources
2003-09-05 18:02:52 action: Executing helper beans 
2003-09-05 18:02:52 action: Processing helper beans 
2003-09-05 18:02:52 action: Executing helper beans 
2003-09-05 18:02:53 action: *** ACTION EXCEPTION: 
java.lang.NullPointerException
at org.apache.artimus.article.Access.index(Unknown
Source)
at org.apache.artimus.CreateResources.execute(Unknown
Source)
at
org.apache.struts.scaffold.ProcessAction.executeLogic(Unknown
Source)
at
org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown
Source)
at
org.apache.struts.scaffold.BaseAction.execute(Unknown
Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:257)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catal

Confused by index.jsp, welcome.jsp, and logon.jsp

2003-09-09 Thread Caroline Jen
Hi, I am new to Struts.  I have read the logon example
presented in Husted's "Struts in Action" and deployed
the logon.war on my machine.  Everything works exactly
like what says in the book.

However, I am confused -- 
My question is why I entered
http://localhost:8080/logon
and the welcome.jsp is invoked and displayed in the
browser?

In my mind, http://localhost:8080/logon tells to look
for logon.do.  According to the action mappings:



the Logon.jsp should be invoked.  Could anybody shed
some light on it?

I can understand if I enter
http://localhost:8080/logon/index.jsp
the welcome.jsp is invoked because the logic.forward
tag in the index.jsp: 

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





__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: datasource connection problem.

2003-09-09 Thread Caroline Jen
Hi, in my opinion, you should pay attention to this
part of your log file:

Unable to connect to any hosts due to exception.

and 

java.net.BindExceptioncom.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346

It says that the jdbc driver is not registered.
--- Rajat Pandit <[EMAIL PROTECTED]> wrote:
> hello,
> i am using mysql as a datasource in the
> app,everything
> is working fine but when make changes in the class
> files and reload the application the application
> ceazes to work and i got the followng messages in my
> log file. can some one help me figure out where am i
> going wrong. am a newbie.
> thanks in advance
> rajat
> 
> --> SNIP <--
> [INFO] PropertyMessageResources - -Initializing,
> config='resources.application',
>  returnNull=true
> [INFO] GenericDataSource - -   createConnection()
> [ERROR] ActionServlet - -Initializing application
> data
> source org.apache.struts.action.DATA_SOURCE
>  hosts
> due to exception: java.net.BindException: Address in
> use: no further information>java.
> sql.SQLException: Unable to connect to any hosts due
> to exception: java.net.Bind
> Exception: Address in use: no further information
> at
>
com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)
> at
>
com.mysql.jdbc.Connection.(Connection.java:491)
> at
>
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
> at
>
org.apache.struts.legacy.GenericDataSource.createConnection(GenericDataSource.java:805)
> at
>
org.apache.struts.legacy.GenericDataSource.open(GenericDataSource.java:741)
> at
>
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1085)
> at
>
org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
> at
>
javax.servlet.GenericServlet.init(GenericServlet.java:256)
> at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
> at
>
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
> at
>
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
> at
>
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2567)
> at
>
org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:740)
> at
>
org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.java:325)
> at
>
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:143)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> --> SNIP <--
> 
>

> Yahoo! India Matrimony: Find your partner online.
> Go to http://yahoo.shaadi.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



artimus_1_1

2003-09-05 Thread Caroline Jen
I tried to deploy the artimus_1_1 application and I
followed the instructions in the README file that was
bundled with the artimus_1_1.war.

I successfully logged into the application, using the
username: artimus and password: g0rd0n. 

I continued to followed the instructions.  I  selected
"Create Resources" from the Manager's Options, and
press GO. At this point, I got the following message
on the top of the screen:

The process did not complete. Details should follow. 
ERROR: java.lang.NullPointerException

Please advise me what to do with it.  Thanks a lot. 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Need Instructions To Setup The Artimus Example

2003-08-21 Thread Caroline Jen
Rick, thanks a lot for taking the trouble to find the
web link to the Husted discussion forum.  I have
posted my question there and hoping to get some
instructions soon.  I appreciate your help.

Caroline
--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 20,'03 (10:38 PM GMT-0700), Caroline
> wrote: 
> 
> > I have gone to his book site but cannot find a
> > discussion forum.  
> 
> You can get to the forum here: 
> 
>
http://www.manning.com/getpage.html?project=husted&filename=forum.html
> 
> Click on "author online"
> 
> (I admit not easy to find from his personal site.
> Took me a while).
>  
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Need Instructions To Setup The Artimus Example

2003-08-20 Thread Caroline Jen
I have gone to his book site but cannot find a
discussion forum.  I am hoping that Ted would notice
my post here and give a hand.
--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 20,'03 (04:55 PM GMT-0700), Caroline
> wrote: 
>  
> > Hoping Ted noticed my post and provides guidance
> to
> > setup the Artimus example for someone new like me
> to
> > get the "look and feel" of all the features.
> 
> Have you checked out his book's site? and posted
> there? I think he's
> pretty good at responding to questions on that forum
> (if it still
> exists.. been a long while since I was there). I
> never got around to
> actually running the Artimus example so I might not
> be of much help to
> you. I think I remember other posts on that forum
> helping with it
> though. Good luck.
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Need Instructions To Setup The Artimus Example

2003-08-20 Thread Caroline Jen
Thanks for sympathizing and taking care of a newbie.  

I am using Struts-1.1-rc2.  Tomcat-4.1.18-LE-jdk14 is
up and running in my machine.

Hoping Ted noticed my post and provides guidance to
setup the Artimus example for someone new like me to
get the "look and feel" of all the features.

Caroline
--- Mark Galbreath <[EMAIL PROTECTED]> wrote:
> Unfortunately, Struts has changed significantly
> since "Struts In Action" was
> published and I do not know the relevance of your
> question.  I think Ted
> (the author) will probably see your post and answer.
>  Just didn't want to
> leave a newbie hanging
> 
> Can you gives us more information, like what version
> of Struts you are using
> and what application container you are employing?
> 
> Mark
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 20, 2003 5:36 PM
> To: [EMAIL PROTECTED]
> Subject: Need Instructions To Setup The Artimus
> Example
> 
> 
> Hi, I am new to Struts.  I would like to get a "look
> and feel" of the Artimus example (artimus_1_1.war)
> in
> the "Struts in Action" provided by Husted.
> 
> I have the Tomcat 4.1.18 installed and functioning
> in
> my machine.  I also have downloaded the Ant.
> 
> Where can I find instructions to quickly deploy the
> Artimus example to see all the features offered,
> such
> as users can add, edit, or delete articles,  Any
> visitor to the site can view the articles online
> using
> various search features, including full text and by
> author, title, or time span?
> 
> Thank you very much.
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Need Instructions To Setup The Artimus Example

2003-08-20 Thread Caroline Jen
Hi, I am new to Struts.  I would like to get a "look
and feel" of the Artimus example (artimus_1_1.war) in
the "Struts in Action" provided by Husted.

I have the Tomcat 4.1.18 installed and functioning in
my machine.  I also have downloaded the Ant.

Where can I find instructions to quickly deploy the
Artimus example to see all the features offered, such
as users can add, edit, or delete articles,  Any
visitor to the site can view the articles online using
various search features, including full text and by
author, title, or time span?

Thank you very much.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



ActionForm Design Question

2003-08-01 Thread Caroline Jen
Hi, I am building a web site.  The primary functions
of this site are for authors to submit their research
papers.  The research papers will go through a
screening process (screened by peers in the field). 
Visiors can view the published articles online.

Authors and peers are the registered users of the web
site.

Therefore, there is not much data manipulation at the
web site except that authors may be requested to
revise their papers and re-submit.  And both authors
and peers have to fill out registration forms to
become members of the web site.

The content of the registration form is pretty
standard: name, address, phone number, academic
background information and achievements, etc.  Most of
them are Strings.  A couple of checkboxes, three sets
of radio buttons (to indicate preferences), and a
primitive double.  Of course, I have a text field for
loading research papers.

Question 1: Do I use conventional ActionForm?
Map-backed ActionForm? or DynaActionForm for this
project?

Question 2: Which strategy should I use to transfer
values between tiers?  Setting an immutable value
object?  or transferring values by reflection
(BeanUtil)? or passing a Map?

I highly value your opinions and advices.  Thanks.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Converting Data Types On the Business Bean Side

2003-07-31 Thread Caroline Jen
Does the Struts 1.1 BeanUtils class supports
transferring data between String and native types on
the business bean side?

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: File "/WEB-INF/struts-bean.tld" not found

2003-07-28 Thread Caroline Jen
Did you put:

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

in your FileName.jsp?
--- message message <[EMAIL PROTECTED]> wrote:
> 
> You probably need to reload your application after
> having made
> the entry in the web.xml file.
> 
> 
> >From: "Vinayak Birari"
> <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: File "/WEB-INF/struts-bean.tld" not found
> >Date: Mon, 28 Jul 2003 14:08:08 +0530
> >
> >hi all,
> >I am new to Struts, I have downloaded sample
> banking application
> >oreilly
>
site.(http://www.oreilly.com/catalog/jakarta/banking-dev.zip)
> >I have unzipped the entire code in webapps\ROOT
> directory if
> >  I m getting following error
> >  org.apache.jasper.JasperException: File
> >"/WEB-INF/struts-bean.tld" not found
> >
> >I have kept all the .tld file in WEB-INF folder
> >in web.xml i have made the entry and given the path
> as
> >/WEB-INF/struts-bean.tld
> >i wanted to know is it necessary to make its entry
> anywhere else.
> >
> >thanks in advance.
> >Vinayak.
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
>
_
> MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*. 
> http://join.msn.com/?page=features/virus
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Logon "Submit" returns a blank page

2003-07-28 Thread Caroline Jen
What is in the log file?  Log files records errors. 
There may be a clue.
--- todd thorner <[EMAIL PROTECTED]> wrote:
> Hi and thanks,
> 
> Ok, I have reached this far in my logon page
> development...
> 
> The first JSP page comes up fine, showing me a form
>  with a rendered
>  tag for each required field (username
> and password), plus a "Reset" and a "Submit" button.
>  Code sample below comes from my struts-config.xml
> file:
> 
> 
>   type="mystrutsforms.LogonForm"/>
> 
> 
> 
>  
> 
> 
> 
>   type="org.apache.struts.actions.ForwardAction"
> parameter="/pages/Logon.jsp"/>
>   type="mystrutsactions.LogonAction" name="logonForm"
> scope="request" validate="true"
> input="/pages/Logon.jsp">
> path="/pages/LogonSuccess.jsp"/>
> path="/pages/LogonFail.jsp"/>
>   
> 
> 
> ** struts-config.xml code above
> **
> 
> I can enter data into the  fields and
> they will erase if I click "Reset"
> I can click "Submit" with nothing filled in (passing
> nulls with the request), and the proper
>  are displayed
> However,
> 
> If I enter any values for the "username" and
> "password" fields, then click "Submit," a blank page
> is always returned.
> 
> What's up with that?  The browser says it's trying
> to display results from "LogonSubmit.do" (which is
> what I expect).  I have a file called
> "users.properties" in the directory
> "WEB-INF/classes" and in my LogonAction.java code:
> 
> public final class LogonAction extends Action {
> 
> public ActionForward execute( ActionMapping
> mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response )
> throws Exception {
> 
> String username = ( ( LogonForm ) form
> ).getUsername();
> String password = ( ( LogonForm ) form
> ).getPassword();
> boolean validated = false;
>   
> try {
> 
> validated = isUserLoggedOn( username,
> password );
> }
> catch ( SimpleUserDirectoryException sudexc
> ) {
> ActionErrors errors = new
> ActionErrors();
> errors.add( ActionErrors.GLOBAL_ERROR,
> new ActionError( "error.logon.connect" )
> );
> saveErrors( request, errors );
> return ( new ActionForward(
> mapping.getInput() ) );
> }
> 
> if ( !validated ) {
> 
> ActionErrors errors = new
> ActionErrors();
> errors.add( ActionErrors.GLOBAL_ERROR,
> new ActionError( "error.logon.invalid" )
> );
> saveErrors( request, errors );
> return ( new ActionForward(
> mapping.getInput() ) );
> }
> 
> HttpSession session = request.getSession();
> session.setAttribute( Constants.USER_KEY,
> form );
>   
> return ( mapping.findForward(
> Constants.SUCCESS ) );
> }
> 
> public boolean isUserLoggedOn( String username,
> String password ) throws
> SimpleUserDirectoryException {
> 
> return (
> SimpleUserDirectory.getInstance().passwordIsValid(
> username, password ) );
> }
> }
> 
> ** mystrutsactions.LogonAction.java
> code above **
> 
> Note: The LogonAction.java file above makes use of
> the following SimpleUserDirectory.java code:
> 
>   private static final String
> SimpleUserDirectoryFilepath = "users.properties";
>   InputStream ips =
>
this.getClass().getClassLoader().getResourceAsStream(
> SimpleUserDirectoryFilepath );
>   
> ** mystrutsforms.LogonForm.java code
> above **
> 
> Also, my web.xml file has:
> 
> 
>  application
>  application
> 
> 
> ** web.xml code above
> **
> 
> Any suggestions or guesses are appreciated.
> 
> 
>

> Get advanced SPAM filtering on Webmail or POP Mail
> ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: drop-down list help

2003-07-22 Thread Caroline Jen
Hi, Rick:

 Take a look at
http://www.reumann.net/do/struts/main

In Lesson II, you'll find an example of how to use the
html:select tag

Lesson II-4 Create ActionForm - The UI element for
entering a value into the department field will be a
drop-down list.

Lesson II-6 Create DepartmentBean - This bean will be
used to represent options for the drop-down list.

Lesson II-8 Create EmployerService - shows how the
list of departments is created. 

Lesson II-9 Create SetUpEmployerAction - this is where
the list of options is put into the session context.


code:
--

  Collection departments = service.getDepartments();
  HttpSession session = request.getSession();
  session.setAttribute( "departments", departments );

--

Lesson II-14 Create employeeForm.jsp - shows how the
html:select and html:options is used to present a
drop-down list of departments. 

Note the property and labelProperty attributes in the
html:options tag: both id and description are
properties of the DepartmentBean created in II-6. The 
collection attribute is the name "departments" which
was used when the list of DepartmentBeans was added to
the session context (II-9).

--- Rick Col <[EMAIL PROTECTED]> wrote:
> Hi, Swaroop:
> 
> I have a question about your implementation, do we
> still need to implement an actionForm class for the
> following drop down list? 
> 
> regards,
> 
> 
> 
> --- Swaroop George <[EMAIL PROTECTED]> wrote:
> >  > class="com.xxx.DropdownCollections">
> >
> > 
> > 
> >  > property="months"
> > toScope="request"/>
> > 
> >  > labelProperty="value"/>
> > 
> > 
> > 
> > Hi this is a part of the page I developed..
> > (Ofcourse a commercial
> > application..) I have a class called
> > DropDownCollections.java
> > Now in the class I have a method getMonths() which
> > will return me a
> > collection of months..
> > 
> > I am using the months collection to populate the
> > options..
> > You can actually use an html:select instead of a
> > nested:select
> > 
> > The getMonths() returns a set of beans having two
> > attributes key and
> > value..
> > Key will be the month numbers 1,2,3,4..
> > While value will be month names Jan, Feb,..
> > While the dropdown is rendered the month name will
> > be shown.. When the
> > page is submitted the month num(key) will be set
> to
> > the property 'month'
> > 
> > Hope it helps..
> > Swaroop
> > 
> > -Original Message-
> > From: Rick Col [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, July 22, 2003 6:24 PM
> > To: Struts Users Mailing List
> > Subject: drop-down list help
> > 
> > Hi, guys:
> > 
> > I am a struts newbie. I have spent sevaral days
> > trying
> > build a struts page with several drop-down lists
> in
> > vain. I am wondering there are any struts drop
> down
> > lists examples out there. I appreciate your help. 
> > 
> > regards,
> > 
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: AW: Error Using select tag To Create Drop-Down Menu

2003-07-21 Thread Caroline Jen
Hi, Dirk:  Thanks for your help.  My code works now. 
I am able to see the drop-down menu in the browser.

--- Dirk Behrendt <[EMAIL PROTECTED]> wrote:
> Hello!
>  
> I had the same problem...
>  
> You have to include the  tag into
>  tags.  Look:
>  
>  
> 
>  
>  onchange="javascript: submit ()">
>   value="Englisch"/>
> 
>  
>   
>  
> I have an ActionBean and a FormBean for the action
> "/language".
>  
> Without that you will get the exception 
> "Cannot find bean under name
> org.apache.struts.taglib.html.BEAN" 
>  
> Hope, that will help!
>  
> Dirk
>  
>  
> -Ursprüngliche Nachricht-
> Von: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 21. Juli 2003 21:18
> An: [EMAIL PROTECTED]
> Betreff: Error Using select tag To Create Drop-Down
> Menu
>  
> I am doing testings step by step. I simply want to
> add
> a drop-down menu feature to something that works
> OKay.
> I am a newbie to struts. I do not know where to look
> for my mistakes when I encounter problems. 
> Something is wrong in my .jsp page. This .jsp page
> had
> worked fine before ...
> tags were added. The error message is:
>  
>  
> code:
>
--
>  
> 2003-07-21 01:24:51
> StandardWrapperValve[action]:Servlet.service() for
> servlet action threw
> exceptionorg.apache.jasper.JasperException: Cannot
> find bean under name
> org.apache.struts.taglib.html.BEAN
>  
>
---
>  
> Here is the source code of my MainMenu.jsp:
>  
>  
> code:
>
---
>  
> <%@ taglib uri="/WEB-INF/struts-html.tld"
> prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld"
> prefix="bean" %>
>  class="resources.version1.LogonBean" /> 
> 
> 
>   
> 
> :
>  property="userType" />
> 
> State: 
>   
>  
> property="value"   
>labelProperty="label" /> 
>  
>   
> 
> 
> 
>  
>
---
>  
>  
> In the LogonBean.java, I inserted in the
> setParameters() method the following code:
>  
>  
> code:
>
---
>  
> public void setParameters( HttpServletRequest
> request
> ){   userID = request.getParameter("userID");  
> password = request.getParameter("password");  
> ArrayList states = new ArrayList();   states.add(new
> LabelValueBean("Virginia", "VA"));   states.add(new
> LabelValueBean("Maryland", "MD"));   states.add(new
> LabelValueBean("Ohio", "OH"));   states.add(new
> LabelValueBean("Rode Island", "RI"));  
> states.add(new
> LabelValueBean("New York", "NY"));  
> request.setAttribute("STATES", states);}
>  
>
--
>  
> I would appreciate if anybody could point out my
> mistakes.
>  
>  
>  
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> <http://sbc.yahoo.com/> 
>  
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Error Using select tag To Create Drop-Down Menu

2003-07-21 Thread Caroline Jen
I am doing testings step by step. I simply want to add
a drop-down menu feature to something that works OKay.
I am a newbie to struts. I do not know where to look
for my mistakes when I encounter problems. 
Something is wrong in my .jsp page. This .jsp page had
worked fine before ...
tags were added. The error message is:


code:
--

2003-07-21 01:24:51
StandardWrapperValve[action]:Servlet.service() for
servlet action threw
exceptionorg.apache.jasper.JasperException: Cannot
find bean under name
org.apache.struts.taglib.html.BEAN

---

Here is the source code of my MainMenu.jsp:


code:
---

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







 
:


State: 

   
  




---


In the LogonBean.java, I inserted in the
setParameters() method the following code:


code:
---

public void setParameters( HttpServletRequest request
){   userID = request.getParameter("userID");  
password = request.getParameter("password");  
ArrayList states = new ArrayList();   states.add(new
LabelValueBean("Virginia", "VA"));   states.add(new
LabelValueBean("Maryland", "MD"));   states.add(new
LabelValueBean("Ohio", "OH"));   states.add(new
LabelValueBean("Rode Island", "RI"));   states.add(new
LabelValueBean("New York", "NY"));  
request.setAttribute("STATES", states);}

--

I would appreciate if anybody could point out my
mistakes.



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: package org.apache.struts.action Does Not Exist?

2003-07-19 Thread Caroline Jen
Jimmy, thanks for your reminder and sorry for my
stupid question.  I worked late last night (after
mid-night) and was not thinking well.

Now, I put the struts.jar file back to the CLASSPATH
(not $TOMCATHOME/webapps\MyApplication\WEB-INF\lib)
and everything works.


--- Jimmy Emmanual <[EMAIL PROTECTED]> wrote:
> are you sure struts.jar is in your classpath? It
> doesn't matter that
> struts.jar is in
> $TOMCATHOME\webapps\MyApplication\WEB-INF\lib when
> you are
> compiling. only that it is in your classpath.
> 
> echo $CLASSPATH or echo %CLASSPATH% and see if you
> see struts.jar.
> 
> -----Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 18, 2003 8:15 PM
> To: [EMAIL PROTECTED]
> Subject: package org.apache.struts.action Does Not
> Exist?
> 
> 
> I have been using Struts (jakarta-struts-1.1-rc2)
> for
> about two weeks. I have tested a number of things
> and
> made them work.
> 
> Today, while I was trying to compile a model bean (I
> have compiled it before without any problem), I got
> compilation error: 
> package org.apache.struts.action does not exist
> 
> I double checked that the struts.jar is in the
> $TOMCATHOME\webapps\MyApplication\WEB-INF\lib
> directory. What could have happened?
> 
> The source code of my model bean is:
> 
> package resources.version1;
> 
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
> 
> 
> public class LogonBean {
> 
>   String userType, userID ,password;
> 
>   public LogonBean() {}
> 
>   public void setParameters(HttpServletRequest
> request)
> {
>   userID = request.getParameter("userID");
>   password = request.getParameter("password");
>   }
> 
>   public ActionErrors validate() {
> 
>   if (!userID.equals(password)) {
>   ActionErrors ae = new ActionErrors();
>   ae.add("userID", new
> ActionError("error.invalid.logon"));
>   return ae;
>   }
> 
>   if (userID.equals("admin")) {
>   userType = "Adminstrator";
>   } else
>   if (userID.equals("user")) {
>   userType = "User";
>   } else {
>   ActionErrors ae = new ActionErrors();
>   ae.add("userID", new
> ActionError("error.invalid.logon"));
>   return ae;
>   }
> 
>   return null;
>   }
> 
>   public String getUserType() {
>   return userType;
>   }
> 
>   public void setUserType(String userType) {
>   this.userType = userType;
>   }
> } 
> 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



package org.apache.struts.action Does Not Exist?

2003-07-18 Thread Caroline Jen
I have been using Struts (jakarta-struts-1.1-rc2) for
about two weeks. I have tested a number of things and
made them work.

Today, while I was trying to compile a model bean (I
have compiled it before without any problem), I got
compilation error: 
package org.apache.struts.action does not exist

I double checked that the struts.jar is in the
$TOMCATHOME\webapps\MyApplication\WEB-INF\lib
directory. What could have happened?

The source code of my model bean is:

package resources.version1;

import javax.servlet.http.*;
import org.apache.struts.action.*;


public class LogonBean {

String userType, userID ,password;

public LogonBean() {}

public void setParameters(HttpServletRequest request)
{
userID = request.getParameter("userID");
password = request.getParameter("password");
}

public ActionErrors validate() {

if (!userID.equals(password)) {
ActionErrors ae = new ActionErrors();
ae.add("userID", new
ActionError("error.invalid.logon"));
return ae;
}

if (userID.equals("admin")) {
userType = "Adminstrator";
} else
if (userID.equals("user")) {
userType = "User";
} else {
ActionErrors ae = new ActionErrors();
ae.add("userID", new
ActionError("error.invalid.logon"));
return ae;
}

return null;
}

public String getUserType() {
return userType;
}

public void setUserType(String userType) {
this.userType = userType;
}
}   



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



What Is The Proper Location To Place Inputs For Creating A Drop-Down Menu

2003-07-17 Thread Caroline Jen
I want to put the "label and value" pairs of the 51
states of the U.S. in a file, read in the file into an
ArrayList, and then create a drop-down menu in a .jsp
file.

Question 1.  Where is the proper place to put those
"label and value" pairs?  Create a table in the
database? or put those pairs in a properties file? 
Which directory does this properties file go?

Question 2.  Do I read those pairs into an ArrayList
in the controller servlet?   

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Specify Error Messages For Automatic Validation

2003-07-08 Thread Caroline Jen
I am trying to put entries in the
MessageResource.properties file for the error messages
generated by the automatic validation. 

I used "mask" to provide a number of validation rules.

How do I specify those error messages?  (I used "mask"
for a number of text field to report various errors.) 
I would like to see an example.

I could find examples for email and date:
errors.email={0} is an invalid e-mail address.
errors.date={0} is not a date.



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: How can I set the defualt selection?

2003-07-08 Thread Caroline Jen
Leon:

 I am working on the same thing.  Could you show
me your example of setting default selection?  

CJen
--- leonZ <[EMAIL PROTECTED]> wrote:
> Thank you very much! I have made it.
> 
> "Adam Hardy" <[EMAIL PROTECTED]>
> wrote in message
> news:[EMAIL PROTECTED]
> > You don't need to submit a form (HTTP PUT) to get
> a request object. You
> > can do an HTTP GET, with no form submit in HTML
> client-side, by clicking
> > on the URL, but to the servlet container and
> struts this is irrelevant.
> > The request object will be created for a GET just
> as for a PUT.
> >
> > And struts will also create a form bean for you
> depending entirely on
> > your action mapping in struts-config, regardless
> of whether you did a
> > GET or a PUT.
> >
> > GET and PUT are just HTTP internet transfer
> protocol formats. I believe
> > a GET has only got a HTTP header, whereas PUT has
> a body too, which
> > means you can send more bytes in your parameters.
> (GET parameters are on
> > the query string, PUT params are the form fields).
> >
> > Adam
> >
> > leonZ wrote:
> > > But how do you set the defualt option without
> submit the form?
> > > action.execute() need the HttpServletRequest
> object, and this object is
> got
> > > from a submitting of a form in jsp.
> > > Maybe I am wrong, could give me a valid code
> segment example?
> > >
> > > "Adam Hardy" <[EMAIL PROTECTED]>
> wrote in message
> > > news:[EMAIL PROTECTED]
> > >
> > >>Struts will automatically mark the selected
> option when the value of the
> > >>select box field/property in the actionform is
> set.
> > >>
> > >>So if you want to set one option as default in a
> blank form, set the
> > >>actionform property to the value of the option
> you want. Preferably in
> > >>the action.execute() so you don't muddle your
> jsp unnecessarily.
> > >>
> > >>Adam
> > >>
> > >>Caroline Jen wrote:
> > >>
> > >>>I have similar questions.  What is the syntax
> of the
> > >>> tag?
> > >>>
> > >>>Just take the example given by you, are the
> codes
> > >>>shown below correct?  Will the default
> selection
> > >>>shown?
> > >>>
> > >>>
> > >>>  labelProperty="first">
> > >>>  labelProperty="second">
> > >>>  labelProperty="third">
> > >>>
> > >>>
> > >>>JPJ
> > >>>
> > >>>--- leonZ <[EMAIL PROTECTED]> wrote:
> > >>>
> > >>>
> > >>>>I make it more clear here:
> > >>>>
> > >>>>A normal html:
> > >>>>
> > >>>> first
> > >>>>  SELECTED>second
> > >>>> third
> > >>>>
> > >>>>
> > >>>>how can I use the 'SELECTED' to set a defualt
> option
> > >>>>with struts tags.
> > >>>>
> > >>>>   
> > >>>>   ...
> > >>>>
> > >>>>
> > >>>>"leon" <[EMAIL PROTECTED]> wrote in message
> > >>>>news:[EMAIL PROTECTED]
> > >>>>
> > >>>>
> > >>>>>I am a beginner of struts. I can't use the
> > >>>>
> > >>>>'selected' property of the
> > >>>>select
> > >>>>
> > >>>>
> > >>>>>tag in struts to set the default selection
> like I
> > >>>>
> > >>>>used it in a normal
> > >>>>html.
> > >>>>
> > >>>>
> > >>>>>It's happened in 'checked' property of struts
> > >>>>
> > >>>>radio tag. Could you tell me
> > >>>>
> > >>>>
> > >>>>>how to set a defualt selection.
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> >
>
>>>-
> > >>>
> > >>>
> > >>>>To unsubscribe, e-mail:
> > >>>>[EMAIL PROTECTED]
> > >>>>For additional commands, e-mail:
> > >>>>[EMAIL PROTECTED]
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>>__
> > >>>Do you Yahoo!?
> > >>>SBC Yahoo! DSL - Now only $29.95 per month!
> > >>>http://sbc.yahoo.com
> > >>>
> >
>
>>>-
> > >>>To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > >>>For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >>>
> > >>>
> > >
> > >
> > >
> > >
> > >
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



How To Specify Error Messages For Self-Provided Validation Rules: "mask"

2003-07-07 Thread Caroline Jen
I am trying to insert entries in the
MessageResources.properties file for 
the error messages generated by automatic validation.
I could find examples for email and date (see below):

errors.email={0} is an invalid e-mail address.
errors.date={0} is not a date.

What should the messages look like for "mask" in the
MessageResources.properties? I used "mask" to provide
a number of validation rules.  How do I specify those
error messages? (I used mask several times.)


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: How can I set the defualt selection?

2003-07-06 Thread Caroline Jen
I have similar questions.  What is the syntax of the
 tag?

Just take the example given by you, are the codes
shown below correct?  Will the default selection
shown?


 
 
 


JPJ

--- leonZ <[EMAIL PROTECTED]> wrote:
> I make it more clear here:
> 
> A normal html:
> 
>   first
>   second
>   third
> 
> 
> how can I use the 'SELECTED' to set a defualt option
> with struts tags.
> 
> 
> ...
> 
> 
> "leon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I am a beginner of struts. I can't use the
> 'selected' property of the
> select
> > tag in struts to set the default selection like I
> used it in a normal
> html.
> > It's happened in 'checked' property of struts
> radio tag. Could you tell me
> > how to set a defualt selection.
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



My LogonView.jsp Displays A Blank Page

2003-07-05 Thread Caroline Jen
My LogonView.jsp displays a blank page. I have no idea
why nothing is written while the
MessageResources.properties file is found. 

I would have gotton HTTP Status 500 if the
MessageResources.properties is not found or the value
of the corresponding key in the bean:message tag
cannot be picked up.  I did not get any error message.
 I cannot figure out the reason.  Please help.

Here is my web.xml file:


code:
---


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  Struts Application
  
  
  
action
   
org.apache.struts.action.ActionServlet

  application
 
resources.version1.MessageResources


  mapping
 
org.apache.struts.action.RequestActionMapping


  config
 
/WEB-INF/struts-config.xml


  debug
  2


  detail
  2

2
  


  
  
action
*.do
  


  
  
index.jsp
  


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

  
/WEB-INF/struts-html.tld
   
/WEB-INF/struts-html.tld
  

  
/WEB-INF/struts-logic.tld
   
/WEB-INF/struts-logic.tld
  

  
   
/WEB-INF/struts-nested.tld
   
/WEB-INF/struts-nested.tld
  

  
/WEB-INF/struts-tiles.tld
   
/WEB-INF/struts-tiles.tld
  

  
   
/WEB-INF/struts-template.tld
   
/WEB-INF/struts-template.tld
  



---

Here is my MessageResources.properties file:


code:
--
button.submit=Send for Verification
button.reset=Clear the Form
logonForm.userId=User Name
logonForm.password=Password
logonForm.confirm_password=Confirm Password
logonForm.emailAddress=E-mail Address
logonForm.hear_from_us=How did you hear about the
StudentScholar.org?
logonForm.subscriber=Subscribe to the
StudentScholar.org newsletter
logonForm.send_updates=Occassionally send me updates
logonForm.fname=First Name
logonForm.lname=Last name
logonForm.streetAddress=Street Address
logonForm.city=City
logonForm.state=State
logonForm.zip=Zip Code
logonForm.country=Country
logonForm.phone=Telephone
logonForm.degree_type=Degree Type(s)
logonForm.major=Majoring Field(s)
logonForm.cumulativeGPA=Cumulative GPA
logonForm.collegeID=College ID
logonForm.permissionID=Permission ID
logonForm.last_logon_date=Last Logon Date
heading.logon=Enter your user information
title.logon=Logon Screen
error.invalid.logon=The User ID and/or Password
are invalid. Please try again.
errors.header=Validation
ErrorYou must correct the following
error(s) before proceeding:
title.mainmenu=Welcome
heading.mainmenu=Welcome!
label.userType=You are authorized to use this
system as a
errors.prefix=
errors.suffix=
errors.footer=
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1}
characters.
errors.minlength={0} can not be less than {1}
characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card
number.
errors.email={0} is an invalid e-mail address.
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details
should follow.
errors.token=Request could not be completed. Operation
is not in sequence.
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own
application, copy the struts-blank.war to a new WAR
file using the name for your application. Place it in
your container's "webapp" folder (or equivalent), and
let your container auto-deploy the application. Edit
the skeleton configuration files as needed, restart
your container, and you are on your way! (You can find
the application.properties file with this message in
the /WEB-INF/src/java/resources folder.)

---

Here is my LogonView.jsp:


code:
---


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










   :
   

   :
   












---


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



My LoginView.jsp Displays A Blank Page

2003-07-05 Thread Caroline Jen
My LogonView.jsp displays a blank page.  I have no
idea why nothing is written while the
MessageResources.properties file is found.
 
I would have gotton HTTP Status 500 if the
MessageResources.properties is not found or the value
of the corresponding key in the bean:message tag
cannot be picked up.  I did not get any error message.
 I cannot figure out the reason.  Please help.

Here is my web.xml file:
[CODE]


;


  Struts Blank
Application
  
  
  
action
   
org.apache.struts.action.ActionServlet

  application
 
resources.version1.MessageResources


  mapping
 
org.apache.struts.action.RequestActionMapping


  config
 
/WEB-INF/struts-config.xml


  debug
  2


  detail
  2

2
  


  
  
action
*.do
  


  
  
index.jsp
  


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

  
   
/WEB-INF/struts-html.tld
   
/WEB-INF/struts-html.tld
  

  
   
/WEB-INF/struts-logic.tld
   
/WEB-INF/struts-logic.tld
  

  
   
/WEB-INF/struts-nested.tld
   
/WEB-INF/struts-nested.tld
  

  
   
/WEB-INF/struts-tiles.tld
   
/WEB-INF/struts-tiles.tld
  

  
   
/WEB-INF/struts-template.tld
   
/WEB-INF/struts-template.tld
  


[/CODE]

Here is my MessageResources.properties file:
[CODE]
button.submit=Send for Verification
button.reset=Clear the Form
logonForm.userId=User Name
logonForm.password=Password
logonForm.confirm_password=Confirm Password
logonForm.emailAddress=E-mail Address
logonForm.hear_from_us=How did you hear about the
StudentScholar.org?
logonForm.subscriber=Subscribe to the
StudentScholar.org newsletter
logonForm.send_updates=Occassionally send me updates
logonForm.fname=First Name
logonForm.lname=Last name
logonForm.streetAddress=Street Address
logonForm.city=City
logonForm.state=State
logonForm.zip=Zip Code
logonForm.country=Country
logonForm.phone=Telephone
logonForm.degree_type=Degree Type(s)
logonForm.major=Majoring Field(s)
logonForm.cumulativeGPA=Cumulative GPA
logonForm.collegeID=College ID
logonForm.permissionID=Permission ID
logonForm.last_logon_date=Last Logon Date
heading.logon=

Enter your user information

title.logon=Logon Screen error.invalid.logon=
  • The User ID and/or Password are invalid. Please try again.
  • errors.header=

    Validation Error

    You must correct the following error(s) before proceeding:
      title.mainmenu=Welcome heading.mainmenu=

      Welcome!

      label.userType=

      You are authorized to use this system as a

      errors.prefix=
    • errors.suffix=
    • errors.footer=

    errors.minlength={0} can not be less than {1} characters. errors.required={0} is required. errors.date={0} is not a date. errors.double={0} must be an double. errors.email={0} is an invalid e-mail address. [/CODE] Here is my LogonView.jsp: [CODE] <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <bean:message key="title.logon" />
    :

    RE: Stuck With My First Struts Exercise -- Tomcat Cannot Find The MessageResources.properties File

    Hi, James:
    
     There may be copy and paste problem.  Let me try
    to copy it again:
    
    
    
    
    
    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
    
    
    
      
      
    action
       
    org.apache.struts.action.ActionServlet
      
    application
       
    test.struts.MessageResources
      
    
      mapping
     
    org.apache.struts.action.RequestActionMapping
    
    
      config
     
    /WEB-INF/struts-config.xml
    
    
      debug
      2
    
    2
      
    
    
      
      
    action
    *.do
      
    
      
      
    /WEB-INF/struts-bean.tld
       
    /WEB-INF/struts-bean.tld
      
    
      
    /WEB-INF/struts-html.tld
       
    /WEB-INF/struts-html.tld
      
    
      
    /WEB-INF/struts-logic.tld
       
    /WEB-INF/struts-logic.tld
      
    
      
       
    /WEB-INF/struts-template.tld
       
    /WEB-INF/struts-template.tld
      
    
    
    
    ---
    
    Caroline Jen
    --- James Mitchell <[EMAIL PROTECTED]> wrote:
    > I'm hoping that was a copy 'n paste error, because
    > you're web.xml is
    > hosed.
    > 
    > 
    > 
    > --
    > James Mitchell
    > Web Developer/Struts Evangelist
    > http://www.apache.org/struts/
    > 
    > 
    > 
    > > -Original Message-
    > > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > > Sent: Thursday, February 27, 2003 12:02 PM
    > > To: [EMAIL PROTECTED]
    > > Subject: Stuck With My First Struts Exercise --
    > Tomcat Cannot 
    > > Find The MessageResources.properties File
    > > 
    > > 
    > > I am trying to run my first Struts -- using the
    > > tutorial "Login" example at
    > >
    >
    http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.
    > > jsp#struts
    > > 
    > > There is a MessageResources.properties file that
    > > allows for all strings displayed in an application
    > to
    > > be defined. Nonetheless, After I 
    > > entered
    > http://localhost:8080/struts/jsp/LoginView.jsp
    > > 
    > > in the browser address bar, I got HTTP Status 500
    > > --missing key title.login.  However, "title.login"
    > is
    > > in the MessageResources.properties and is not
    > empty.  
    > > 
    > > Therefore, I hard coded the text of the key
    > > title.login in the LoginView.jsp and re-ran this
    > Login
    > > example.  I got another HTTP Status 500.  This
    > time,
    > > the error message said that the next key
    > > "heading.login" in the MessageResources.properties
    > is
    > > missing.  Henceforth, I concluded that the Tomcat
    > > cannot find the MessageResources.properties file. 
    > > 
    > > I have checked MessageResources.properties:
    > > 
    > > 1. name of the file: spelling is correct
    > > 2. location of the file: it is in the directory 
    > >together with all compiled servlet class files;
    > 
    > >i.e.
    > >
    > c:\tomcat\webapps\struts\WEB-INF\classes\test\struts
    > > 3. type of the file: the Windows Explorer shows
    > the 
    > >type of the MessageResources.properties file is
    > a 
    > >PROPERTIES File
    > > 4. mapping of the MessageResources.properties
    > file: 
    > >it does not seem to be wrong.
    > > 
    > > I need your experience in telling what else could
    > go
    > > wrong. Please help.
    > > 
    > > The contents of the web.xml file that is in the
    > > c:\tomcat\webapps\struts\WEB-INF directory is
    > shown
    > > below:
    > > 
    > > 
    > > code:
    > >
    >
    ---
    > > 
    > > 
    > >  > Inc.//DTD Web Application 2.2//EN" 
    > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
    > > 
    > >   
    > >   
    > > action
    > >
    > >
    >
    org.apache.struts.action.ActionServlet
    > >   
    > > application
    > >
    > >
    >
    test.struts.MessageResources
    > >   
    > > 
    > >   mapping
    > >  
    > >
    >
    org.apache.struts.action.RequestActionMapping > ram-value>
    > > 
    > > 
    > >   config
    > >  
    > >
    >
    /WEB-INF/struts-config.xml
    > > 
    > > 
    > >   debug
    > >   2
    > > 
    > > 2
    > >   
    > >   
    > >   
    > > action   
    > > *.do
    > >   
    > >   
    > >   
    > >
    > /WEB-INF/struts-bean.tld
    > >
    > >
    >
    /WEB-INF/struts-bean.tld
    > >   
    > >   
    > >
    > /WEB-INF/struts-html.tld
    > >
    > >
    >
    /WEB-INF/struts-html.tld
    > >   
    > >   
    > >
    > /WEB-INF/struts-logic.tld
    > >
    > >
    >
    /WEB-INF/struts-logic.tld
    > >   
    > >   
    > >
    > >
    >
    /WEB-INF/struts-template.tld
    > >
    > >
    >
    /WEB-INF/struts-template.tld
    > >   
    > > 
    > > 
    > >
    >
    

    Stuck With My First Struts Exercise -- Tomcat Cannot Find The MessageResources.properties File

    I am trying to run my first Struts -- using the
    tutorial "Login" example at
    http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#struts
    
    There is a MessageResources.properties file that
    allows for all strings displayed in an application to
    be defined. Nonetheless, After I 
    entered http://localhost:8080/struts/jsp/LoginView.jsp
    
    in the browser address bar, I got HTTP Status 500
    --missing key title.login.  However, "title.login" is
    in the MessageResources.properties and is not empty.  
    
    Therefore, I hard coded the text of the key
    title.login in the LoginView.jsp and re-ran this Login
    example.  I got another HTTP Status 500.  This time,
    the error message said that the next key
    "heading.login" in the MessageResources.properties is
    missing.  Henceforth, I concluded that the Tomcat
    cannot find the MessageResources.properties file. 
    
    I have checked MessageResources.properties:
    
    1. name of the file: spelling is correct
    2. location of the file: it is in the directory 
       together with all compiled servlet class files; 
       i.e.
    c:\tomcat\webapps\struts\WEB-INF\classes\test\struts
    3. type of the file: the Windows Explorer shows the 
       type of the MessageResources.properties file is a 
       PROPERTIES File
    4. mapping of the MessageResources.properties file: 
       it does not seem to be wrong.
    
    I need your experience in telling what else could go
    wrong. Please help.
    
    The contents of the web.xml file that is in the
    c:\tomcat\webapps\struts\WEB-INF directory is shown
    below:
    
    
    code:
    ---
    
    
    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
    
      
      
    action
       
    org.apache.struts.action.ActionServlet
      
    application
       
    test.struts.MessageResources
      
    
      mapping
     
    org.apache.struts.action.RequestActionMapping
    
    
      config
     
    /WEB-INF/struts-config.xml
    
    
      debug
      2
    
    2
      
      
      
    action   
    *.do
      
      
      
    /WEB-INF/struts-bean.tld
       
    /WEB-INF/struts-bean.tld
      
      
    /WEB-INF/struts-html.tld
       
    /WEB-INF/struts-html.tld
      
      
    /WEB-INF/struts-logic.tld
       
    /WEB-INF/struts-logic.tld
      
      
       
    /WEB-INF/struts-template.tld
       
    /WEB-INF/struts-template.tld
      
    
    
    ---
    
    . 
    
    
     
    
    
    __
    Do you Yahoo!?
    Yahoo! Tax Center - forms, calculators, tips, more
    http://taxes.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    <    1   2