Thanks Chris,

I take your point, but I am not sure that is the problem.
I am using html:rewrite to set up the URL like this:

function displayHelp(context)
{
  var url = "<html:rewrite page='/help.do' />"
  url += "?context=" + context;
  
  alert("url=" + url);
        
  displayPopupWindow(url, "HelpWindow", 400, 550);
}

The javascript alert popup shows a URL of
/ExpenSysWT/help.do?context=loginPage every time. That is the correct path
to the help.do action AFAIK. 

When the a new instance of the web browser is opened the alert box shows the
above URL, but the 500 error results. If the user logs in (the login.do
action works!) and then presses back to return to the login page the same
URL now works.


I am baffled :-)


Adam



-----Original Message-----
From: McCormack, Chris [mailto:[EMAIL PROTECTED] 
Sent: 30 June 2004 11:59
To: Struts Users Mailing List
Subject: RE: NEWBIE: Wierd problem - Action sometimes produces Status 500 -
No Context configured to process this request


>500 - No Context configured to process this request

means you are trying to request a url that has no context defined in your
web applications on your appserver.

ie the generated page at : www.url.co.uk/context/action.do

contains a link <a href="/help.do">help</a> if you click this link it will
give you the url

www.url.co.uk/help.do

this is outside of the /context application hence the 500 error. 

Try pre-pending the context from the request object to the start of your
/help.do link. This will keep your request inside your application. 
Another thing to keep in mind if you use <a href="help.do">help</a> then its
a relative link to the page you are on at the time not from the root of the
application.

Chris McCormack

-----Original Message-----
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: 30 June 2004 10:11
To: 'Struts Users Mailing List'
Subject: RE: NEWBIE: Wierd problem - Action sometimes produces Status 500 -
No Context configured to process this request


Hi Adam,

I am new to Struts so this is more of a shot in the dark but anyway... Could
it be that the problem is that you only have one global forward pointing to
your login? So from a controll flow point of view wouldn't that mean that
you can only access login.do as an entry to your system? Have you tried
adding a global forward for your help.do as well?

Cheers, Jan

-----Original Message-----
From: Adam Lipscombe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 29, 2004 7:31 PM
To: 'Struts Users Mailing List'
Subject: NEWBIE: Wierd problem - Action sometimes produces Status 500 - No
Context configured to process this request


Folks,


I have a strange problem that is confusing me:

I have a simple login page with a Help button defined like this:

<html:link href="javascript:displayHelp('loginPage')"%>"<img border="0"
height="28" name="Image10" src="images/b_help_1.gif" width="32"></html:link>


When pressed, the JavaScript displayHelp() method below is called:

function displayHelp(context)
{
 [snip]

  var url = "<html:rewrite page='/help.do' />"  
  url += "?context=" + context;

 [snip]

  window.open(url, "HelpWindow", windowOptions);
}



This page is the first page that the user sees, having been redirected from
index.jsp like this:

<logic:redirect forward="login"/>




The problem is that before a user logs in, pressing the "Help" button
results in the error "HTTP Status 500 - No Context configured to process
this request" being displayed. 

However after a user logs in (and presses the browser back button to return
to the login page) the link works fine and the help is displayed OK.


Its as if the act of logging in sets up a context within which the actions
work....



The relevant bits of my struts-config looks like this:

<global-forwards>
    <forward name="login" path="/pages/Login.jsp" /> </global-forwards>

<action-mappings>
 <action input="/pages/Login.jsp" name="loginActionForm" path="/login"
scope="request" type="com.expensys.expensyswt.struts.action.Login"
validate="true">
   <forward name="home" path="/pages/Home.jsp" />
 </action>

 <action path="/help" scope="request"
type="com.expensys.expensyswt.struts.action.DisplayHelp" validate="false" >
  <forward name="loginHelp" path="/pages/help/LoginHelp.jsp" />
  <forward name="displayHelpTopics" path="/pages/help/HelpTopics.jsp" />
</action> </action-mappings>



Does anyone know what is going on here?
Why does the "/help.do" action URL work after the user has logged in but not
before? 
Is it to do with the fact that no action has been called before the log in
takes place?



TIA - Adam



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


***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its subsidiaries is 100 Old
Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is
262152.
************************************************


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

Reply via email to