You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mhargus <mh...@gmail.com> on 2007/05/16 18:18:17 UTC

[S2] Action returns blank page

I'm trying to split my Struts 2 app up a bit using namespaces, but have run
into a bit of trouble

I have an action mapping that works fine without a namespace, but when I
move that same action to another package with a namespace, the action
returns a blank page.  I'm not seeing any errors in the app server logs,
just the blank page.

Beyond setting the namespace attribute on the package, is there anything I
need to be doing?

Thanks in advance for the help.

Matt
-- 
View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10644874
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Action returns blank page

Posted by mhargus <mh...@gmail.com>.
Ah, yes.  Looks like another case of user error.

My pages are located underneath the WEB-INF folder of the web app, which I
mapped like so:

<result name="input">WEB-INF/pages/clientSearch.jsp</result>

This worked fine, until I added the namespace to the package, which resulted
in URLs like this:

/packagename/WEB-INF/pages/clientSearch.jsp

All you Struts-savvy developers out there have already noticed the missing
"/" before WEB-INF.   Kudos to you, and may your lives be full of rainbows
and sunshine.

After properly placing the "/" in the result path, everything works as
expected.

Matt


mhargus wrote:
> 
> I'm trying to split my Struts 2 app up a bit using namespaces, but have
> run into a bit of trouble
> 
> I have an action mapping that works fine without a namespace, but when I
> move that same action to another package with a namespace, the action
> returns a blank page.  I'm not seeing any errors in the app server logs,
> just the blank page.
> 
> Beyond setting the namespace attribute on the package, is there anything I
> need to be doing?
> 
> Thanks in advance for the help.
> 
> Matt
> 

-- 
View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10651130
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Action returns blank page

Posted by mhargus <mh...@gmail.com>.
Looks like what I've got.  My thought is that this is related to other parts
of the application, like Sitemesh or Acegi (security).  I'll try eliminating
those as variables and post my findings.

Thanks for the info.

Matt

sr wrote:
> 
> I use a name space as well and it works just fine.
> Here is the snippet:
> 
> <struts>
> 
>     <package name="default" namespace = "/mynamespace"
> extends="struts-default">
> 
>         <action name="myIndex" class="myAction" method="myIndex">
>             <result name="success">/index.jsp</result>
> etc.
> 
> When I call the action:
> 
> localhost:8080/projectname/mynamespace/myIndex.action
> 
> 
> 
> 
> 
> mhargus wrote:
>> 
>> I'm trying to split my Struts 2 app up a bit using namespaces, but have
>> run into a bit of trouble
>> 
>> I have an action mapping that works fine without a namespace, but when I
>> move that same action to another package with a namespace, the action
>> returns a blank page.  I'm not seeing any errors in the app server logs,
>> just the blank page.
>> 
>> Beyond setting the namespace attribute on the package, is there anything
>> I need to be doing?
>> 
>> Thanks in advance for the help.
>> 
>> Matt
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10646399
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Action returns blank page

Posted by sr <sr...@actionet.com>.
I use a name space as well and it works just fine.
Here is the snippet:

<struts>

    <package name="default" namespace = "/mynamespace"
extends="struts-default">

        <action name="myIndex" class="myAction" method="myIndex">
            <result name="success">/index.jsp</result>
etc.

When I call the action:

localhost:8080/projectname/mynamespace/myIndex.action





mhargus wrote:
> 
> I'm trying to split my Struts 2 app up a bit using namespaces, but have
> run into a bit of trouble
> 
> I have an action mapping that works fine without a namespace, but when I
> move that same action to another package with a namespace, the action
> returns a blank page.  I'm not seeing any errors in the app server logs,
> just the blank page.
> 
> Beyond setting the namespace attribute on the package, is there anything I
> need to be doing?
> 
> Thanks in advance for the help.
> 
> Matt
> 

-- 
View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10645353
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org