R: Question - Problem

2002-01-24 Thread Vercesi Paolo

Hello Anthony,

I don't know why rd.forward() method doesn't redirect your users, I use a
similar schema and I haven't any problem. Are there some error messages ?
Instead, to mantain session information through response.sendRedirect(site)
you may use:
response.sendRedirect(response.encodeURL(site));

Regards
Paolo

 -Messaggio originale-
 Da: Anthony Diodato [mailto:[EMAIL PROTECTED]]
 Inviato: mercoledì 23 gennaio 2002 20.25
 A: '[EMAIL PROTECTED]'
 Oggetto: Question - Problem
 
 
 Hello All,
 
 Here is my scenario.
 I have Tomcat 3.2.4 running on IIS 5.0
 
 I have an html page as my entrance to the website.
 (http://www.domainname.com/index.html)
 On this site is a form to login, with you user name and password.
 
 When the user clicks submit, they get sent to a servlet that I wrote.
 This servlet verify's their username and password, and should 
 re-direct them
 to a certain pace depending on who they are.
 If I use response.sendRedirect(site);
 it sends them to the right webpage, but it doesn't seem like 
 the session is
 created.
 
 I test the page to see if there is a valid session, and I get a Null
 Pointer.
 Here is what Im doing there.
 
 if (userSesson.getValue(userName) == null) {
   // redirect them to login because the session isn't valid
 } else {
   // display the page..
 }
 
 If I use the rd.forward() method
 they never get re-directed anywhere
 
 
 Here is my doPost() code...
 
[...]

 Any thoughts would be greatly appreciated.
 Thanks
 Anthony
 

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Question - Problem

2002-01-24 Thread Årun.N


response.sendRedirect(response.encodeRedirectURL(site));

i think 

- Original Message -
From: Vercesi Paolo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 1:58 PM
Subject: R: Question - Problem


Hello Anthony,

I don't know why rd.forward() method doesn't redirect your users, I use a
similar schema and I haven't any problem. Are there some error messages ?
Instead, to mantain session information through response.sendRedirect(site)
you may use:
response.sendRedirect(response.encodeURL(site));

Regards
Paolo

 -Messaggio originale-
 Da: Anthony Diodato [mailto:[EMAIL PROTECTED]]
 Inviato: mercoledì 23 gennaio 2002 20.25
 A: '[EMAIL PROTECTED]'
 Oggetto: Question - Problem


 Hello All,

 Here is my scenario.
 I have Tomcat 3.2.4 running on IIS 5.0

 I have an html page as my entrance to the website.
 (http://www.domainname.com/index.html)
 On this site is a form to login, with you user name and password.

 When the user clicks submit, they get sent to a servlet that I wrote.
 This servlet verify's their username and password, and should
 re-direct them
 to a certain pace depending on who they are.
 If I use response.sendRedirect(site);
 it sends them to the right webpage, but it doesn't seem like
 the session is
 created.

 I test the page to see if there is a valid session, and I get a Null
 Pointer.
 Here is what Im doing there.

 if (userSesson.getValue(userName) == null) {
 // redirect them to login because the session isn't valid
 } else {
 // display the page..
 }

 If I use the rd.forward() method
 they never get re-directed anywhere


 Here is my doPost() code...

[...]

 Any thoughts would be greatly appreciated.
 Thanks
 Anthony


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




R: Question - Problem

2002-01-24 Thread Vercesi Paolo

Yes, your are right!
Thanks a lot!


 -Messaggio originale-
 Da: Årun.N [mailto:[EMAIL PROTECTED]]
 Inviato: giovedì 24 gennaio 2002 9.44
 A: [EMAIL PROTECTED]
 Oggetto: Re: Question - Problem
 
 
 
 response.sendRedirect(response.encodeRedirectURL(site));
 
 i think 
 
 - Original Message -
 From: Vercesi Paolo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 24, 2002 1:58 PM
 Subject: R: Question - Problem
 
 
 Hello Anthony,
 
 I don't know why rd.forward() method doesn't redirect your 
 users, I use a
 similar schema and I haven't any problem. Are there some 
 error messages ?
 Instead, to mantain session information through 
 response.sendRedirect(site)
 you may use:
 response.sendRedirect(response.encodeURL(site));
 
 Regards
 Paolo
 
  -Messaggio originale-
  Da: Anthony Diodato [mailto:[EMAIL PROTECTED]]
  Inviato: mercoledì 23 gennaio 2002 20.25
  A: '[EMAIL PROTECTED]'
  Oggetto: Question - Problem
 
 
  Hello All,
 
  Here is my scenario.
  I have Tomcat 3.2.4 running on IIS 5.0
 
  I have an html page as my entrance to the website.
  (http://www.domainname.com/index.html)
  On this site is a form to login, with you user name and password.
 
  When the user clicks submit, they get sent to a servlet 
 that I wrote.
  This servlet verify's their username and password, and should
  re-direct them
  to a certain pace depending on who they are.
  If I use response.sendRedirect(site);
  it sends them to the right webpage, but it doesn't seem like
  the session is
  created.
 
  I test the page to see if there is a valid session, and I get a Null
  Pointer.
  Here is what Im doing there.
 
  if (userSesson.getValue(userName) == null) {
  // redirect them to login because the session isn't valid
  } else {
  // display the page..
  }
 
  If I use the rd.forward() method
  they never get re-directed anywhere
 
 
  Here is my doPost() code...
 
 [...]
 
  Any thoughts would be greatly appreciated.
  Thanks
  Anthony
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




RE: Question - Problem

2002-01-24 Thread Anthony Diodato

I ended up getting it to work in this same manner. 

Thanks for all the help,
Although I still don't know why rd.forward() doesn't work

-Original Message-
From: Vercesi Paolo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 3:39 AM
To: [EMAIL PROTECTED]
Subject: R: Question - Problem


Yes, your are right!
Thanks a lot!


 -Messaggio originale-
 Da: Årun.N [mailto:[EMAIL PROTECTED]]
 Inviato: giovedì 24 gennaio 2002 9.44
 A: [EMAIL PROTECTED]
 Oggetto: Re: Question - Problem
 
 
 
 response.sendRedirect(response.encodeRedirectURL(site));
 
 i think 
 
 - Original Message -
 From: Vercesi Paolo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 24, 2002 1:58 PM
 Subject: R: Question - Problem
 
 
 Hello Anthony,
 
 I don't know why rd.forward() method doesn't redirect your 
 users, I use a
 similar schema and I haven't any problem. Are there some 
 error messages ?
 Instead, to mantain session information through 
 response.sendRedirect(site)
 you may use:
 response.sendRedirect(response.encodeURL(site));
 
 Regards
 Paolo
 
  -Messaggio originale-
  Da: Anthony Diodato [mailto:[EMAIL PROTECTED]]
  Inviato: mercoledì 23 gennaio 2002 20.25
  A: '[EMAIL PROTECTED]'
  Oggetto: Question - Problem
 
 
  Hello All,
 
  Here is my scenario.
  I have Tomcat 3.2.4 running on IIS 5.0
 
  I have an html page as my entrance to the website.
  (http://www.domainname.com/index.html)
  On this site is a form to login, with you user name and password.
 
  When the user clicks submit, they get sent to a servlet 
 that I wrote.
  This servlet verify's their username and password, and should
  re-direct them
  to a certain pace depending on who they are.
  If I use response.sendRedirect(site);
  it sends them to the right webpage, but it doesn't seem like
  the session is
  created.
 
  I test the page to see if there is a valid session, and I get a Null
  Pointer.
  Here is what Im doing there.
 
  if (userSesson.getValue(userName) == null) {
  // redirect them to login because the session isn't valid
  } else {
  // display the page..
  }
 
  If I use the rd.forward() method
  they never get re-directed anywhere
 
 
  Here is my doPost() code...
 
 [...]
 
  Any thoughts would be greatly appreciated.
  Thanks
  Anthony
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from any
computer. 



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Question - Problem

2002-01-23 Thread Anthony Diodato

Hello All,

Here is my scenario.
I have Tomcat 3.2.4 running on IIS 5.0

I have an html page as my entrance to the website.
(http://www.domainname.com/index.html)
On this site is a form to login, with you user name and password.

When the user clicks submit, they get sent to a servlet that I wrote.
This servlet verify's their username and password, and should re-direct them
to a certain pace depending on who they are.
If I use response.sendRedirect(site);
it sends them to the right webpage, but it doesn't seem like the session is
created.

I test the page to see if there is a valid session, and I get a Null
Pointer.
Here is what Im doing there.

if (userSesson.getValue(userName) == null) {
// redirect them to login because the session isn't valid
} else {
// display the page..
}

If I use the rd.forward() method
they never get re-directed anywhere


Here is my doPost() code...

String  error = null,
site = (/index.html);
ServletConfig   servletConfig = null;
ServletContext  servletContext = null;
RequestDispatcher   rd = null;

public void doPost (HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

// Get the current session object, create one if necessary
HttpSession userSession = request.getSession(true);

if (Authenticate.verifyUsername(request.getParameter(userName))) {
userSession.putValue(userName,
request.getParameter(userName));

if
(Authenticate.verifyPassword(request.getParameter(userName),
request.getParameter(password))) {
userSession.putValue(password,
request.getParameter(password));

if
(Customers.isAcclaim(request.getParameter(userName))) {
 if
(Customers.isWholesale(request.getParameter(userName))) {
 site = /cocoon/choose.xml;
 } else {
 site = /cocoon/acclaim/index.xml;
 }
} else {
 if
(Customers.isWholesale(request.getParameter(userName))) {
 site = /cocoon/yCust/index.xml;
 } else {
 site = /cocoon/choose.xml;
 }
}

} else {
 error = We could not match your Password with your
Username, Please re-enter your login information.;
userSession.invalidate();
}

} else {
 error = We could not verify your Username, Please re-enter
your login information.;
userSession.invalidate();
}

servletConfig = getServletConfig();
servletContext = servletConfig.getServletContext();
rd = servletContext.getRequestDispatcher(site);

rd.forward(request, response);
}


What I want to do is this.
I want my servlet to re-direct them to the proper page while passing my
session to it, so I can verify it in my xml pages.

Any thoughts would be greatly appreciated.
Thanks
Anthony


Anthony Diodato
Webmaster - IT
Prophet 21, Inc.
19 West College Avenue
Yardley, PA 19067
1-800-776-7438, ext. 4600
Fax: 215-321-8014 
[EMAIL PROTECTED]
http://www.p21.com/
Prophet 21 -- Powering the Distribution Industry for the Digital Age 

For the latest press releases from Prophet 21 --
http://www.p21.com/press/press.html 
*   2/12/2001 - Trading Partner Connect Offers Enterprise-to-Enterprise
(E2E) Commerce 
*   2/9/2001 -- Prophet 21 CommerceCenter 8.0 is Now Available
*   2/9/2001 -- Prophet 21 Upgrades and Enhances Prophet 21 Acclaim
For the latest articles on Prophet 21
http://www.manufacturing.net/magazine/id/archives/2001/ind010.02/techupdate.
htm 
http://www.manufacturing.net/magazine/id/develop/techmain01.1.htm 
http://www.manufacturing.net/magazine/id/archives/2000/ind1201/news.htm




Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from any
computer. 



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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