Re: Hi Action Forward problem

2004-01-14 Thread Mark Lowe
If your trying to force the https scheme then i'd do this with your 
webserver, otherwise your app wont be very portable. If you do really 
need to do this then i'd keep the strings in a properties file, but i 
cant see why you'd have to.

I would be mightily vexed if i had to configure tomcat or another 
container to deal with https stuff just to develop on.

imo what you're trying is a hack and you'd be better finding another 
way..

Perhaps useful perhaps not

Cheers Mark

On 14 Jan 2004, at 11:55, [EMAIL PROTECTED] wrote:

try
new ActionForward("https://localhost:1443"+getContextPath()
+"xyz.jsp",true);
Regds
Anant Kumar
TCS




"N.N.S.S Ravi
Krishna" To: "'struts users'" 
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]    cc:
l.com>   Subject: Hi Action 
Forward problem

01/14/04
04:29 PM
Please
respond to
"Struts Users
Mailing List"




Hi All,
I am trying to redirect to a page using the following piece of code:
new ActionForward("https://localhost:1443"+getContextPath()+"xyz.jsp");

when this action takes place the browsers takes me to an error page 
saying
java.lang.illegalArguementException: https://localhost:1443/xyz/xyz.jsp
should start with "/" character.
please help me in resolving this

thanx a ton





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


Re: Hi Action Forward problem

2004-01-14 Thread Anant_Kumar

try
new ActionForward("https://localhost:1443"+getContextPath()
+"xyz.jsp",true);
Regds
Anant Kumar
TCS




   

"N.N.S.S Ravi  

Krishna" To: "'struts users'" <[EMAIL PROTECTED]>  
   
<[EMAIL PROTECTED]cc:  
 
        l.com>   Subject: Hi Action Forward problem

   

01/14/04   

04:29 PM   

Please 

respond to 

"Struts Users  

Mailing List"  

   

   





Hi All,
I am trying to redirect to a page using the following piece of code:

new ActionForward("https://localhost:1443"+getContextPath()+"xyz.jsp");

when this action takes place the browsers takes me to an error page saying
java.lang.illegalArguementException: https://localhost:1443/xyz/xyz.jsp
should start with "/" character.
please help me in resolving this


thanx a ton





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



Hi Action Forward problem

2004-01-14 Thread N.N.S.S Ravi Krishna
Hi All,
I am trying to redirect to a page using the following piece of code:

new ActionForward("https://localhost:1443"+getContextPath()+"xyz.jsp");

when this action takes place the browsers takes me to an error page saying
java.lang.illegalArguementException: https://localhost:1443/xyz/xyz.jsp
should start with "/" character.
please help me in resolving this


thanx a ton


Re: forward problem ?

2003-11-11 Thread Abhijeet Mahalkar
create one more tag in action ...


and provide this name in action class forward. this works...

abhijeet


- Original Message -
From: "Kalra, Ashwani" <[EMAIL PROTECTED]>
To: "Struts (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, November 12, 2003 10:02 AM
Subject: forward problem ?


> hi,
>
> I have one link http://localhost:8080/controller?id=23
> when user clicks it , a page is loaded, user fills in the details in the
> form,  and presses one button and the same page should be loaded . The
> problem is that redirecting to the same page is done using forward, which
> leaves the address bar unchanged and I get that request parameter again,
> which I dont want. This is done by framework which I cannot change. How to
> circumevent this problem ?
>
> TIA
> Ashwani
>
>
> 
> This message contains information that may be privileged or confidential
and
> is the property of the Cap Gemini Ernst & Young Group. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorised to read, print, retain, copy,
disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
copies
> of this message.
>
> -
> 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]



forward problem ?

2003-11-11 Thread Kalra, Ashwani
hi,

I have one link http://localhost:8080/controller?id=23
when user clicks it , a page is loaded, user fills in the details in the
form,  and presses one button and the same page should be loaded . The
problem is that redirecting to the same page is done using forward, which
leaves the address bar unchanged and I get that request parameter again,
which I dont want. This is done by framework which I cannot change. How to
circumevent this problem ?

TIA
Ashwani



This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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



RE: logic forward problem

2003-09-11 Thread David G Friedman
Why not just cut out the middle man and setup the global-forward to use a
tile instead of doing the extra work of forwarding to an action?  The below
is from my struts-config.xml:


  
  

  
  

  
  
  


Then you can logic:forward to config, menu, signOn, or signOff
as you need.

Regards,
David

-Original Message-
From: Van Riper, Mike [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 3:45 PM
To: Struts Users Mailing List
Cc: 'David G Friedman'; [EMAIL PROTECTED]
Subject: RE: logic forward problem


> -Original Message-
> From: David G Friedman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 8:18 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: logic forward problem
>
>
> Your path looks like a tile.  I wrote about this
> problem a week or two ago and you should've been
> able to find it in the archives of this group.
> It is documented on the logic forward tag as:
>
> Note: forwarding to Tiles definitions is not
> supported from this tag. You should forward to
> them from an Action subclass.

Doing what the documentation suggests would work, but, it is not necessary
to do the forward from an Action subclass. You can define an action mapping
that your global forward points to that directly forwards to the tile
definition without having to invoke an action class. This does work. I do
this for the welcome JSP of my current webapp that needs to forward to the
initial webapp tile definition like so:

welcome.jsp:

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

struts-config.xml:

  

  

  

  

The "page.welcome" reference is a tiles definition reference. Granted, it is
annoying to have to define the global-forward/action pairing to make this
work. However, this is much simpler than going to the trouble of defining an
action subclass just to do this where you would still need to define an
action mapping anyway.

FYI, Van

Mike Van Riper
mailto:[EMAIL PROTECTED]
http://www.baychi.org/bof/struts/

>
> Regards,
> David
>
> -Original Message-
> From: koen boutsen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 11:12 AM
> To: Struts Users Mailing List
> Subject: logic forward problem
>
>
> Hi
>
> I want to send my user to a .jsp page and immediately send him to
> the next, without having to click anything on the intermediate page,
> or even without having to see this page.
> I tried with :
> 
> I know this works when you put a global forward in the struts-config
> with as forward the target jsp.
>
> I have to use a definition where I want to send my user to, and
> when I put the definition as a forward in the global forwards, I get a
> pageNotFound error.
> This is my global forward
>  path="isisLayout.organisations.overview"/>
>
> Does someone know what I can do ?
>
> Thanks
>
> Koen


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



RE: logic forward problem

2003-09-11 Thread Van Riper, Mike
> -Original Message-
> From: David G Friedman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 8:18 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: logic forward problem
> 
> 
> Your path looks like a tile.  I wrote about this
> problem a week or two ago and you should've been
> able to find it in the archives of this group.
> It is documented on the logic forward tag as:
> 
> Note: forwarding to Tiles definitions is not
> supported from this tag. You should forward to
> them from an Action subclass.

Doing what the documentation suggests would work, but, it is not necessary
to do the forward from an Action subclass. You can define an action mapping
that your global forward points to that directly forwards to the tile
definition without having to invoke an action class. This does work. I do
this for the welcome JSP of my current webapp that needs to forward to the
initial webapp tile definition like so:

welcome.jsp:

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

struts-config.xml:

  

  

  

  

The "page.welcome" reference is a tiles definition reference. Granted, it is
annoying to have to define the global-forward/action pairing to make this
work. However, this is much simpler than going to the trouble of defining an
action subclass just to do this where you would still need to define an
action mapping anyway.

FYI, Van

Mike Van Riper
mailto:[EMAIL PROTECTED]
http://www.baychi.org/bof/struts/

> 
> Regards,
> David
> 
> -Original Message-
> From: koen boutsen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 11:12 AM
> To: Struts Users Mailing List
> Subject: logic forward problem
> 
> 
> Hi
> 
> I want to send my user to a .jsp page and immediately send him to
> the next, without having to click anything on the intermediate page,
> or even without having to see this page.
> I tried with :
> 
> I know this works when you put a global forward in the struts-config
> with as forward the target jsp.
> 
> I have to use a definition where I want to send my user to, and
> when I put the definition as a forward in the global forwards, I get a
> pageNotFound error.
> This is my global forward
>  path="isisLayout.organisations.overview"/>
> 
> Does someone know what I can do ?
> 
> Thanks
> 
> Koen
 

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



RE: logic forward problem

2003-09-11 Thread David G Friedman
Your path looks like a tile.  I wrote about this
problem a week or two ago and you should've been
able to find it in the archives of this group.
It is documented on the logic forward tag as:

Note: forwarding to Tiles definitions is not
supported from this tag. You should forward to
them from an Action subclass.

Regards,
David

-Original Message-
From: koen boutsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 11:12 AM
To: Struts Users Mailing List
Subject: logic forward problem


Hi

I want to send my user to a .jsp page and immediately send him to
the next, without having to click anything on the intermediate page,
or even without having to see this page.
I tried with :

I know this works when you put a global forward in the struts-config
with as forward the target jsp.

I have to use a definition where I want to send my user to, and
when I put the definition as a forward in the global forwards, I get a
pageNotFound error.
This is my global forward


Does someone know what I can do ?

Thanks

Koen




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]


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



logic forward problem

2003-09-11 Thread koen boutsen
Hi

I want to send my user to a .jsp page and immediately send him to 
the next, without having to click anything on the intermediate page, 
or even without having to see this page.
I tried with : 

I know this works when you put a global forward in the struts-config 
with as forward the target jsp.

I have to use a definition where I want to send my user to, and 
when I put the definition as a forward in the global forwards, I get a pageNotFound 
error.  
This is my global forward


Does someone know what I can do ?

Thanks

Koen




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]



RelayAction forward problem

2003-02-20 Thread Dan McGowan
All,
Struts 1.1b3:  I am using the 
org.apache.struts.scaffold.RelayAction action to handle values from a 
dispatch parameter. My problem is that  the forwards are only working 
for jsp's. My actions are returning 404's.  Here are some action 
mappings from my struts.config:



path="/mainMenuForward"
type="org.apache.struts.actions.ForwardAction"
name="customerForm"
scope="request"
parameter="/jsp/admin/mainMenu.jsp" />



path="/addCustomer"
type="org.apache.struts.scaffold.RelayAction"
name="customerForm"
scope="request"
validate="false" >

name="init" 
path="/jsp/admin/addCustomer.jsp?dispatch=init"/>

name="add" path="/addCustomerAdd"/>

name="done" path="/mainMenuForward"/>
   

When I go to "addCustomer.do?dispatch=init" it forwards correctly to 
the jsp
When I go to "addCustomer.do?dispatch=add or dispatch=done" I get a 404

Separately I can access  addCustomerAdd.do and mainMenuForward.do and 
they work. Perhaps I have missed something obvious. Any suggestions?

tia,

Dan McGowan


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



Dynamic forward problem

2002-11-20 Thread David Bolsover
Hi all

I posted this one a few days back but got no response - so I thought I would
have another go - I'll try an improved explanation of the problem.

I need to generate a dynamic forward to an action/script (I have no control over
implementation) on a remote server.

A typical URL for the forward looks like:

"http://www.somesite.com/actionpath?customer=Joe Bloggs&address=Address line 1
Address line 2 Address line 3"

The problem is that the receiving site requires that new line characters in of
the address string are encoded as "
" (the HTML entity for ASCII 10, the new
line character).

If I were to use an on page form, I could generate the required behaviour by
coding like:

http://www.somesite.com/actionpath"; method="POST">


-- rest of form--

But I don't want to use a form!!  I want to use a dynamic forward

Something like:

StringBuffer sb = new StringBuffer();
sb.append("http://www.somesite/actionpath?";);
sb.append("&customer=" + customer.getName());
sb.append("&address=" + customer.getAddress());
etc..
ActionForward forward = mapping.findForward("success");
forward.setPath(sb.toString);
forward.setRedirect(true);
mapping.addForward(forward);
return forward;

If I try to encode the new line in the above, the forward fails at the first new
line character.

Any ideas please?

David


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles - Forward problem Validator default values

2002-10-15 Thread Heligon Sandra

I solved a part of the problem with two corrections:

1. in the tiles-def.xml in the site.login.page a path
parameter was initialised to null

2. I removed the cast in the processForwardConfig

I can display the login page but I have the following
error in the stack:

javax.servlet.ServletException: Path site.login.page does not start with a
"/" character
This error occurs after the return true in the processPreprocess method.

I have an other problem I use validator and the default
values of my LoginForm are loginName="" and password="",
when the login page is displayed for the first time the following
error is displayed:
Password cannot be less than 3 characters. 

How is it possible to not call the validator on the default values ? 


-Original Message-
From: Heligon Sandra 
Sent: 15 October 2002 10:39
To: 'Struts Users Mailing List'
Subject: RE: Tiles - Forward problem
Importance: High


I replaced processForward by processForwardConfig but it doesn't work.
I don't know if the error is due to the configuration of the ForwardAction
or the processForwardConfig in the requestProcessor.
When I debug the application, the first time I call processForwardConfig
because path=/welcome and the second time path="\login" so I go to
the return true command line but is it the good return value ?
because after return true nothing happens.

index.jsp:

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


struts-config.xml:
















MyRequestProcessor class:

protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
// Get the session object
HttpSession session = request.getSession();

try{
  // Test if the request is a login request
  String path = processPath(request, response);
  if ( !path.equals((String) "/login") )
  {
// If not a login page, test if the user is authenticated on the
application server
User userInfo = (User)session.getAttribute(Constants.USER_KEY);

if ( userInfo == null ||
  (userInfo != null && userInfo.getSessionId() == 0) )
{
  processForwardConfig(request, response,
 
(ActionForward)appConfig.findForwardConfig("login"));
}
  }
}
// if a servlet exception occurs
catch (ServletException ex)
{

}
//if an input/output error occurs
catch (IOException ex)
{

}
return true;
}


-Original Message-
From: Antoni Reus [mailto:[EMAIL PROTECTED]]
Sent: 14 October 2002 18:51
To: Struts Users Mailing List
Subject: Re: Tiles - Forward problem


Hi,

A Dilluns 14 Octubre 2002 16:44, Heligon Sandra va escriure:
> I only have to not cast the result of the findForwardConfig method ?
>

No, you have to change the call to processActionForward for 
processForwardConfig. The  TilesRequestProcessor overwrites 
processForwardConfig to look for tiles definitions.


> Sandra
>
> -Original Message-
> From: Antoni Reus [mailto:[EMAIL PROTECTED]]
> Sent: 14 October 2002 16:39
> To: Struts Users Mailing List
> Subject: Re: Tiles - Forward problem
>
>
> Hi,
>
> A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> > I have overridden the TilesREquestProcessor in order to test
> > if a user is authenticated for each request, but it doesn't work:
> >
> > protected boolean processPreprocess(HttpServletRequest request,
> > HttpServletResponse response)
> > {
> > // Get the session object
> > HttpSession session = request.getSession();
> >
> > try{
> >
> >   // Test if the request is a login request
> >   String path = processPath(request, response);
> >   if ( !path.equals((String) "/login") )
> >   {
> > // If not a login page, test if the user is authenticated on
> > the application server
> > User userInfo =
> > (User)session.getAttribute(Constants.USER_KEY);
> >
> > if ( userInfo == null ||
> >   (userInfo != null && userInfo.getSessionId() == 0) )
> > {
>
> Change this:
> > processActionForward(request, response,
> >
> > (ActionForward)appConfig.findForwardConfig("login"));
>
> for this:
>
>processForwardConfig(request, response,
>   appConfig.findForwardConfig("login"));
>
> > }
> >   }
> > }
> > // if a servlet exception occurs
> > catch (ServletException ex)
> > {
> > }
> > //if an input/ou

RE: Tiles - Forward problem

2002-10-15 Thread Heligon Sandra

I replaced processForward by processForwardConfig but it doesn't work.
I don't know if the error is due to the configuration of the ForwardAction
or the processForwardConfig in the requestProcessor.
When I debug the application, the first time I call processForwardConfig
because path=/welcome and the second time path="\login" so I go to
the return true command line but is it the good return value ?
because after return true nothing happens.

index.jsp:

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


struts-config.xml:
















MyRequestProcessor class:

protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
// Get the session object
HttpSession session = request.getSession();

try{
  // Test if the request is a login request
  String path = processPath(request, response);
  if ( !path.equals((String) "/login") )
  {
// If not a login page, test if the user is authenticated on the
application server
User userInfo = (User)session.getAttribute(Constants.USER_KEY);

if ( userInfo == null ||
  (userInfo != null && userInfo.getSessionId() == 0) )
{
  processForwardConfig(request, response,
 
(ActionForward)appConfig.findForwardConfig("login"));
}
  }
}
// if a servlet exception occurs
catch (ServletException ex)
{

}
//if an input/output error occurs
catch (IOException ex)
{

}
return true;
}


-Original Message-
From: Antoni Reus [mailto:[EMAIL PROTECTED]]
Sent: 14 October 2002 18:51
To: Struts Users Mailing List
Subject: Re: Tiles - Forward problem


Hi,

A Dilluns 14 Octubre 2002 16:44, Heligon Sandra va escriure:
> I only have to not cast the result of the findForwardConfig method ?
>

No, you have to change the call to processActionForward for 
processForwardConfig. The  TilesRequestProcessor overwrites 
processForwardConfig to look for tiles definitions.


> Sandra
>
> -Original Message-
> From: Antoni Reus [mailto:[EMAIL PROTECTED]]
> Sent: 14 October 2002 16:39
> To: Struts Users Mailing List
> Subject: Re: Tiles - Forward problem
>
>
> Hi,
>
> A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> > I have overridden the TilesREquestProcessor in order to test
> > if a user is authenticated for each request, but it doesn't work:
> >
> > protected boolean processPreprocess(HttpServletRequest request,
> > HttpServletResponse response)
> > {
> > // Get the session object
> > HttpSession session = request.getSession();
> >
> > try{
> >
> >   // Test if the request is a login request
> >   String path = processPath(request, response);
> >   if ( !path.equals((String) "/login") )
> >   {
> > // If not a login page, test if the user is authenticated on
> > the application server
> > User userInfo =
> > (User)session.getAttribute(Constants.USER_KEY);
> >
> > if ( userInfo == null ||
> >   (userInfo != null && userInfo.getSessionId() == 0) )
> > {
>
> Change this:
> > processActionForward(request, response,
> >
> > (ActionForward)appConfig.findForwardConfig("login"));
>
> for this:
>
>processForwardConfig(request, response,
>   appConfig.findForwardConfig("login"));
>
> > }
> >   }
> > }
> > // if a servlet exception occurs
> > catch (ServletException ex)
> > {
> > }
> > //if an input/output error occurs
> > catch (IOException ex)
> > {
> > }
> > return true;
> > }


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

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




Re: Tiles - Forward problem

2002-10-14 Thread Antoni Reus

Hi,

A Dilluns 14 Octubre 2002 16:44, Heligon Sandra va escriure:
> I only have to not cast the result of the findForwardConfig method ?
>

No, you have to change the call to processActionForward for 
processForwardConfig. The  TilesRequestProcessor overwrites 
processForwardConfig to look for tiles definitions.


> Sandra
>
> -Original Message-
> From: Antoni Reus [mailto:[EMAIL PROTECTED]]
> Sent: 14 October 2002 16:39
> To: Struts Users Mailing List
> Subject: Re: Tiles - Forward problem
>
>
> Hi,
>
> A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> > I have overridden the TilesREquestProcessor in order to test
> > if a user is authenticated for each request, but it doesn't work:
> >
> > protected boolean processPreprocess(HttpServletRequest request,
> > HttpServletResponse response)
> > {
> > // Get the session object
> > HttpSession session = request.getSession();
> >
> > try{
> >
> >   // Test if the request is a login request
> >   String path = processPath(request, response);
> >   if ( !path.equals((String) "/login") )
> >   {
> > // If not a login page, test if the user is authenticated on
> > the application server
> > User userInfo =
> > (User)session.getAttribute(Constants.USER_KEY);
> >
> > if ( userInfo == null ||
> >   (userInfo != null && userInfo.getSessionId() == 0) )
> > {
>
> Change this:
> > processActionForward(request, response,
> >
> > (ActionForward)appConfig.findForwardConfig("login"));
>
> for this:
>
>processForwardConfig(request, response,
>   appConfig.findForwardConfig("login"));
>
> > }
> >   }
> > }
> > // if a servlet exception occurs
> > catch (ServletException ex)
> > {
> > }
> > //if an input/output error occurs
> > catch (IOException ex)
> > {
> > }
> > return true;
> > }


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




RE: Tiles - Forward problem

2002-10-14 Thread Heligon Sandra

I only have to not cast the result of the findForwardConfig method ? 

Sandra

-Original Message-
From: Antoni Reus [mailto:[EMAIL PROTECTED]]
Sent: 14 October 2002 16:39
To: Struts Users Mailing List
Subject: Re: Tiles - Forward problem


Hi,


A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> I have overridden the TilesREquestProcessor in order to test
>   if a user is authenticated for each request, but it doesn't work:
>
>   protected boolean processPreprocess(HttpServletRequest request,
> HttpServletResponse response)
>   {
>   // Get the session object
>   HttpSession session = request.getSession();
>
>   try{
>
> // Test if the request is a login request
> String path = processPath(request, response);
> if ( !path.equals((String) "/login") )
> {
>   // If not a login page, test if the user is authenticated on
> the application server
>   User userInfo =
> (User)session.getAttribute(Constants.USER_KEY);
>
>   if ( userInfo == null ||
> (userInfo != null && userInfo.getSessionId() == 0) )
>   {

Change this:

>   processActionForward(request, response,
>
> (ActionForward)appConfig.findForwardConfig("login"));


for this:

 processForwardConfig(request, response,
appConfig.findForwardConfig("login"));



>   }
> }
>   }
>   // if a servlet exception occurs
>   catch (ServletException ex)
>   {
>   }
>   //if an input/output error occurs
>   catch (IOException ex)
>   {
>   }
>   return true;
>   }
>



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

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




Re: Tiles - Forward problem

2002-10-14 Thread Antoni Reus

Hi,


A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> I have overridden the TilesREquestProcessor in order to test
>   if a user is authenticated for each request, but it doesn't work:
>
>   protected boolean processPreprocess(HttpServletRequest request,
> HttpServletResponse response)
>   {
>   // Get the session object
>   HttpSession session = request.getSession();
>
>   try{
>
> // Test if the request is a login request
> String path = processPath(request, response);
> if ( !path.equals((String) "/login") )
> {
>   // If not a login page, test if the user is authenticated on
> the application server
>   User userInfo =
> (User)session.getAttribute(Constants.USER_KEY);
>
>   if ( userInfo == null ||
> (userInfo != null && userInfo.getSessionId() == 0) )
>   {

Change this:

>   processActionForward(request, response,
>
> (ActionForward)appConfig.findForwardConfig("login"));


for this:

 processForwardConfig(request, response,
appConfig.findForwardConfig("login"));



>   }
> }
>   }
>   // if a servlet exception occurs
>   catch (ServletException ex)
>   {
>   }
>   //if an input/output error occurs
>   catch (IOException ex)
>   {
>   }
>   return true;
>   }
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tiles - Forward problem

2002-10-14 Thread Heligon Sandra


I have overridden the TilesREquestProcessor in order to test
if a user is authenticated for each request, but it doesn't work:

protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
// Get the session object
HttpSession session = request.getSession();

try{

  // Test if the request is a login request
  String path = processPath(request, response);
  if ( !path.equals((String) "/login") )
  {
// If not a login page, test if the user is authenticated on
the application server
User userInfo =
(User)session.getAttribute(Constants.USER_KEY);

if ( userInfo == null ||
  (userInfo != null && userInfo.getSessionId() == 0) )
{
processActionForward(request, response,
 
(ActionForward)appConfig.findForwardConfig("login"));
}
  }
}
// if a servlet exception occurs
catch (ServletException ex)
{
}
//if an input/output error occurs
catch (IOException ex)
{
}
return true;
}

With the following login forward:






The following error is displayed:
java.lang.IllegalArgumentException: Path  does not start with a "/"
character



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: forward problem with frames

2001-07-31 Thread Peter Alfors

There is a target attribute in the 
Have you tried setting the target to "_top" ?

HTH,
Pete

Stefan Faist wrote:

> Hi all,
> why have a frameset and open a link without this framset. Then I want to go
> back to the frameset with this forward.
>  the main.jsp is the
> page with the frameset.
>
> But this forward opens a new window? Why does it do that and how can I open
> this in the same Window? This forward called with a html:submit tag in the
> action class. With a link I have the target parameter but with the button I
> havn't nothing or ...?
>
> Can somebody help me?
>
> Stefan




forward problem with frames

2001-07-30 Thread Stefan Faist

Hi all,
why have a frameset and open a link without this framset. Then I want to go
back to the frameset with this forward.
 the main.jsp is the
page with the frameset.

But this forward opens a new window? Why does it do that and how can I open
this in the same Window? This forward called with a html:submit tag in the
action class. With a link I have the target parameter but with the button I
havn't nothing or ...?

Can somebody help me?

Stefan




Re[2]: Forward Problem

2001-06-12 Thread Oleg V Alexeev

Hello Sridhar,

 Hm.. But why do you place validate="false" attribute to the action
 mapping? I think it switch off validate process.

 validateSet to "true" if the validate() method of the form bean
 should be called prior to calling this action, or set to
 "false" if you do not want validation performed.
 

Wednesday, June 13, 2001, 10:14:23 AM, you wrote:

SS> Thank U Oleg,

SS> But like I mentioned earlier if I remove the input tag, it gives me a page
SS> not found error

SS> Ne more hints???

SS> -Original Message-
SS> From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
SS> Sent: Wednesday, June 13, 2001 1:22 AM
SS> To: [EMAIL PROTECTED]
SS> Subject: Re: Forward Problem


SS> Hello Sridhar,

SS> Try to remove 'input' attribute from action mapping. I view
SS> validate=false here - you are not use validate after form submitting -
SS> why do you specify input attribute?

SS> Here is quote from struts-config.dtd -

SS>  input   Context-relative path of the input form to which
SS> control
SS>  should be returned if a validation error is
SS> encountered.
SS>  Required if "name" is specified and the input bean
SS>  returns validation errors.  Optional if "name" is
SS>  specified and the input bean does not return validation
SS>  errors.  Not allowed if "name" is not specified.



SS> Tuesday, June 12, 2001, 5:49:55 PM, you wrote:

SS>> Hi All,

SS>> We are using Struts Version 1. We are having a problem with the forward
SS> tag
SS>> of the action defined in struts-config.xml.
SS>> No matter what is defined in the forward it is going to the page defined
SS> in
SS>> input.

SS>> I am attaching a part of the struts-config for clarity:

SS>> >type="net.itcube.bsts.user.register.RegisterFormAction"
SS>>name="registerForm"
SS>>   scope="session"
SS>>  input="/Register.jsp"
SS>>validate="false">
SS>>   
SS>> 


SS>> Once the action is performed action.findForward returns "success" (This
SS> we
SS>> checked!!!). But still the page in the above case goes to Register.jsp
SS>> instead of PostRegistration.html.

SS>> If we remove the input tag it gives a 500 page not found error.

SS>> We have successfully deployed a project on struts with an earlier
SS> version
SS>> and never faced such a problem.

SS>> Can someone please throw some light on it


SS>> Cheers,
SS>> Sridhar S
SS>> You must be the change you wish to see in the world
SS>>  --- Mahatma Gandhi.




SS> --
SS> Best regards,
SS>  Olegmailto:[EMAIL PROTECTED]






-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





RE: Forward Problem

2001-06-12 Thread Sridhar S

Thank U Oleg,

But like I mentioned earlier if I remove the input tag, it gives me a page
not found error

Ne more hints???

-Original Message-
From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 1:22 AM
To: [EMAIL PROTECTED]
Subject: Re: Forward Problem


Hello Sridhar,

Try to remove 'input' attribute from action mapping. I view
validate=false here - you are not use validate after form submitting -
why do you specify input attribute?

Here is quote from struts-config.dtd -

 input   Context-relative path of the input form to which
control
 should be returned if a validation error is
encountered.
 Required if "name" is specified and the input bean
 returns validation errors.  Optional if "name" is
 specified and the input bean does not return validation
 errors.  Not allowed if "name" is not specified.



Tuesday, June 12, 2001, 5:49:55 PM, you wrote:

SS> Hi All,

SS> We are using Struts Version 1. We are having a problem with the forward
tag
SS> of the action defined in struts-config.xml.
SS> No matter what is defined in the forward it is going to the page defined
in
SS> input.

SS> I am attaching a part of the struts-config for clarity:

SS> type="net.itcube.bsts.user.register.RegisterFormAction"
SS>name="registerForm"
SS>   scope="session"
SS>  input="/Register.jsp"
SS>validate="false">
SS>   
SS> 


SS> Once the action is performed action.findForward returns "success" (This
we
SS> checked!!!). But still the page in the above case goes to Register.jsp
SS> instead of PostRegistration.html.

SS> If we remove the input tag it gives a 500 page not found error.

SS> We have successfully deployed a project on struts with an earlier
version
SS> and never faced such a problem.

SS> Can someone please throw some light on it


SS> Cheers,
SS> Sridhar S
SS> You must be the change you wish to see in the world
SS>  --- Mahatma Gandhi.




--
Best regards,
 Olegmailto:[EMAIL PROTECTED]






Re: Forward Problem

2001-06-12 Thread Oleg V Alexeev

Hello Sridhar,

Try to remove 'input' attribute from action mapping. I view
validate=false here - you are not use validate after form submitting -
why do you specify input attribute?

Here is quote from struts-config.dtd -

 input   Context-relative path of the input form to which control
 should be returned if a validation error is encountered.
 Required if "name" is specified and the input bean
 returns validation errors.  Optional if "name" is
 specified and the input bean does not return validation
 errors.  Not allowed if "name" is not specified.



Tuesday, June 12, 2001, 5:49:55 PM, you wrote:

SS> Hi All,

SS> We are using Struts Version 1. We are having a problem with the forward tag
SS> of the action defined in struts-config.xml.
SS> No matter what is defined in the forward it is going to the page defined in
SS> input.

SS> I am attaching a part of the struts-config for clarity:

SS> type="net.itcube.bsts.user.register.RegisterFormAction"
SS>name="registerForm"
SS>   scope="session"
SS>  input="/Register.jsp"
SS>validate="false">
SS>   
SS> 


SS> Once the action is performed action.findForward returns "success" (This we
SS> checked!!!). But still the page in the above case goes to Register.jsp
SS> instead of PostRegistration.html.

SS> If we remove the input tag it gives a 500 page not found error.

SS> We have successfully deployed a project on struts with an earlier version
SS> and never faced such a problem.

SS> Can someone please throw some light on it


SS> Cheers,
SS> Sridhar S
SS> You must be the change you wish to see in the world
SS>  --- Mahatma Gandhi.




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Forward Problem

2001-06-12 Thread Sridhar S

Hi All,

We are using Struts Version 1. We are having a problem with the forward tag
of the action defined in struts-config.xml.
No matter what is defined in the forward it is going to the page defined in
input.

I am attaching a part of the struts-config for clarity:


  



Once the action is performed action.findForward returns "success" (This we
checked!!!). But still the page in the above case goes to Register.jsp
instead of PostRegistration.html.

If we remove the input tag it gives a 500 page not found error.

We have successfully deployed a project on struts with an earlier version
and never faced such a problem.

Can someone please throw some light on it


Cheers,
Sridhar S
You must be the change you wish to see in the world
 --- Mahatma Gandhi.