You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2008/03/11 18:06:22 UTC
restructure webapp code so we can easily test .jsp
How do you feel about moving:
/src/webapp/src/org...
into
/src/java/org...
and then removing the /src/webapp/resources directory?
The reason for this change is:
1) more standard layout
2) The tests could easily run /admin/ and the .jsp files -- this would
avoid any problems like my most recent SOLR-350 commit
WebAppContext app = new WebAppContext();
app.setServer(server);
app.setWar("src/webapp");
I imagine the reason to have o.a.s.servlet as an independent source
directory was to keep the javax.servlet dependency isolated. Can we
move it into the same source directory, but agree that all servlet
related items belong in that package?
ryan
Re: restructure webapp code so we can easily test .jsp
Posted by Chris Hostetter <ho...@fucit.org>.
: Without objection, I'll go ahead and do this. Patches with 'move' don't work.
:
: Should I open a JIRA issue?
you already opened one, but in general: yes.
having an issue associated with any non-trivial code change is handy
becuase it gives us an easily trackable place to look up the reasons for a
change (based on simple commit messages like "SOLR-503 - refactoring JSPs
for easier testing")
it also gives people something to "reopen" if the change turns out to
break something horrificly and needs to be rolled back.
-Hoss
Re: restructure webapp code so we can easily test .jsp
Posted by Ryan McKinley <ry...@gmail.com>.
>
> : Ok, then let me revise my proposal to:
> : /src/webapp/java/(all java classes)
> : /src/webapp/web/index.jsp
> : /src/webapp/web/admin/...
> : /src/webapp/web/WEB-INF/...
>
> Yeah, got it ... I'm totally on board with that.
>
Without objection, I'll go ahead and do this. Patches with 'move' don't
work.
Should I open a JIRA issue?
ryan
Re: restructure webapp code so we can easily test .jsp
Posted by Chris Hostetter <ho...@fucit.org>.
: this way we could debug directly from /src/webapp/
Doh! ... sorry, the piece is was missing in my mind is that 'resources'
isn't actually a standard WAR directory name ... for some reason i was
thinking that it was a standard directory for holding JSP .. i forgot it's
just something we created and we hav a special fileset for it in our <war>
task.
(which should show you how infrequently i work with WARs now a days)
: Ok, then let me revise my proposal to:
: /src/webapp/java/(all java classes)
: /src/webapp/web/index.jsp
: /src/webapp/web/admin/...
: /src/webapp/web/WEB-INF/...
Yeah, got it ... I'm totally on board with that.
-Hoss
Re: restructure webapp code so we can easily test .jsp
Posted by Bill Au <bi...@gmail.com>.
+1
I like putting index.jsp, admin, and WEB-INF all in the same directory.
Bill
On Sun, Mar 16, 2008 at 9:34 AM, Yonik Seeley <yo...@apache.org> wrote:
> On Thu, Mar 13, 2008 at 1:48 PM, Ryan McKinley <ry...@gmail.com> wrote:
> > The thing I'm tyring to work with is how to get the jsp files to easily
> > load into jetty for testing/debugging
>
> +1
>
> "resources" is only there because IntelliJ put it there loooong ago.
>
> -Yonik
>
Re: restructure webapp code so we can easily test .jsp
Posted by Yonik Seeley <yo...@apache.org>.
On Thu, Mar 13, 2008 at 1:48 PM, Ryan McKinley <ry...@gmail.com> wrote:
> The thing I'm tyring to work with is how to get the jsp files to easily
> load into jetty for testing/debugging
+1
"resources" is only there because IntelliJ put it there loooong ago.
-Yonik
Re: restructure webapp code so we can easily test .jsp
Posted by Ryan McKinley <ry...@gmail.com>.
Chris Hostetter wrote:
> : and then removing the /src/webapp/resources directory?
>
> i'm confused ... where would the JSPs go?
>
rather then
/src/webapp/resoures/admin/index.jsp
/src/webapp/admin/index.jsp
this way we could debug directly from /src/webapp/
> : I imagine the reason to have o.a.s.servlet as an independent source directory
> : was to keep the javax.servlet dependency isolated. Can we move it into the
> : same source directory, but agree that all servlet related items belong in that
> : package?
>
> looking at the build file, it doesn't look like we actually have anything
> ensuring that only webapps/src has serlvet dependencies at the moment ...
> i'd kind of like to add that now that i've noticed it ... either way, i'm
> not sure how moving the source really helps anything. what matters is
> that the classes are available to the classloader when the unit tests run
> right ?
>
> that should already be true ... both src/java and src/webapp/src are
> compiled into build/core which is in the classpath when the unit tests are
> run.
>
> (and leaving src/webapps/src where it is leaves open the possibility of me
> fixing the build.xml to only make the servlet jar available when compiling
> src/webapps/src)
>
Ok, then let me revise my proposal to:
/src/webapp/java/(all java classes)
/src/webapp/web/index.jsp
/src/webapp/web/admin/...
/src/webapp/web/WEB-INF/...
The thing I'm tyring to work with is how to get the jsp files to easily
load into jetty for testing/debugging
ryan
Re: restructure webapp code so we can easily test .jsp
Posted by Chris Hostetter <ho...@fucit.org>.
: and then removing the /src/webapp/resources directory?
i'm confused ... where would the JSPs go?
: I imagine the reason to have o.a.s.servlet as an independent source directory
: was to keep the javax.servlet dependency isolated. Can we move it into the
: same source directory, but agree that all servlet related items belong in that
: package?
looking at the build file, it doesn't look like we actually have anything
ensuring that only webapps/src has serlvet dependencies at the moment ...
i'd kind of like to add that now that i've noticed it ... either way, i'm
not sure how moving the source really helps anything. what matters is
that the classes are available to the classloader when the unit tests run
right ?
that should already be true ... both src/java and src/webapp/src are
compiled into build/core which is in the classpath when the unit tests are
run.
(and leaving src/webapps/src where it is leaves open the possibility of me
fixing the build.xml to only make the servlet jar available when compiling
src/webapps/src)
-Hoss