Martin Gainty 写道:
check to make sure your jsp is in webapps/webapplication
check the 'work' folder to see if the jsp compiled
e.g. index.jsp would look like
_index__jsp.class
*
which means
a)index.jsp was compiled to _index__jsp.java
b)_index__jsp.java was compiled to _index__jsp.class
HTH
*
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained
within this transmission.
> Date: Mon, 4 Aug 2008 17:23:45 +0800
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> Subject: Re: Issue with Url mapping with struts-action-extension=""
>
> Jeromy Evans 写道:
> > Haulyn R. Jason wrote:
> >
> >> Hi,all
> >> I set struts-action-extension="" for no extension as "action" or
"do" by
> >> default for struts2, and mapping all url to struts2 dispatcher as
"/*".
> >> But, the problem is I can not access any jsp, html,css and js
files. The
> >> page display:there are no action mapping for XXX.jsp action.
> >> Should any one give me some suggestions or referenced links? Always
> >> thanks very much.
> >>
> >>
> >>
> >
> > I'm not sure if your setting is interpreted as blank, not set
(default)
> > or null.
> >
> > Did your jsp, html, css and js work before you made that change?
> >
> > The process works like this:
> > 1. the container sees the request and maps it to the Strust2
> > FilterDispatcher because it matches /*
> > 2. the FilterDispatcher checks whether the request contains a known
> > action extension, and if so, invokes the ActionMapper
> > 3. If the ActionMapper didn't find anything, the FilterDispatcher
checks
> > if there's struts static resource for the request (if
> > serve.static.resource=true)
> > 4. If nothing matched, the filter does nothing
> > 5. If nothing has processed the request, the container eventually
> > invokes the Default Servlet (and JSP handling, other file handling)
> >
> > So there's two possible problems:
> > a. the FilterDispatcher thinks it can handle everything and tries to,
> > causing an error; or
> > b. there is a configuration problem with the container (eg. the
default
> > servlet is disabled or the request never reached the container).
> >
> > In case it is a, I would try the following settings:
> >
> > struts.action.extension=,,action
> >
> > Note the double comma. That means a blank (no extension), or .action
> > extension. The double-comma ensures blank isn't trimmed as whitespace.
> >
> > Hope that helps,
> > Jeromy Evans
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> Hi, Evans
>
> Thanks for your answer, it looks very useful but some new problem
occurred:
>
> When I set
>
> "struts.action.extension="
>
> value as "" with no space or " "(same as before with one whitespace)
>
> Struts treat all html, js, css and jsp as action, but all real
actions work well.
>
> Without struts 2 FilterDispatcher, everything works well.(Certainly
real action can not work)
>
> Then I tried your solution as:
> struts.action.extension=,,action
>
> but modified as
> struts.action.extension=,,jsps
>
> ok, this time, when I visit http://localhost:8080/8f/myAction.jsps,
everything works well,but I can not access to
> http://localhost:8080/8f/myAction without any extension.
>
> And something interesting occurred: I can access
"http://localhost:8080/8f/myAction." and everything works well.
> I mean, I can not visit myAction with no extension but I can visit
myAction "with extension":".", just a "."
>
> I am not sure what's wrong with my configuration. And I use
struts2.0.11.1.
>
>
>
>
>
> --
>
> Thanks!
>
> Mobile: +086-15864011231
> EMail>alk:[EMAIL PROTECTED]
> EMail&yahoo:[EMAIL PROTECTED]
> Skype:saharabear
>
>
> Haulyn Runner Jason
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
------------------------------------------------------------------------
Reveal your inner athlete and share it with friends on Windows Live.
Share now!
<http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us>
Hi,Martin
Thanks for your answer, maybe this is the problem, but I am not sure.
all my jsps are compiled, but not _index__jsp.java, all jsps are
compiled as index__jsp.java, without prefix "_". I am not sure what's
wrong with it.
--
Thanks!
Mobile: +086-15864011231
EMail>alk:[EMAIL PROTECTED]
EMail&yahoo:[EMAIL PROTECTED]
Skype:saharabear
贾昊林(Haulyn Runner Jason)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]