--------------------------------------------
On Tue, 11/6/18, Thomas Broyer <[email protected]> wrote:

 Subject: Re: Fw: Re: Need advice to put my bootstrap template in Maven 
archetype web app
 To: "Karen Goh" <[email protected]>
 Cc: "Maven Users List" <[email protected]>
 Date: Tuesday, November 6, 2018, 11:56 PM
 
 Take the Bootstrap and Images folder out of
 the WebContent and move them
 into src/main/webapp.
 
 I mean: tutorRegister.jsp was in
 WebContent and you moved it to
 src/main/webapp, right? so just do the
 same things with the rest: the
 Bootstrap folder is in WebContent, move
 it into src/main/webapp (i.e.
 src/main/webapp/Bootstrap/…)

Hello Thomas,

I followed your advice but it is still not working.  Do I need to do anything 
else to make the jsp render the layout as per the Bootstrap template cos it was 
working before I change my structure to meet the Maven's standard directory 
layout.

Here's the layout I have done as per your advice:

https://ibb.co/fb23DV
 
 On Tue, Nov 6, 2018 at 4:51 PM Karen
 Goh <[email protected]>
 wrote:
 
 > I am so sorry but please ignore
 the last email.
 >
 > The URL is ok now after I read
 thru your email again and then looking at
 > many images online.
 >
 > However, the jsp page is still not
 rendering the Bootstrap template.
 >
 > I just need you kindly tell me
 where to put the WebContent which contains
 > all the template, css etc.
 >
 > https://ibb.co/hbF8dV
 >
 > Thanks in advance.
 >
 > --- On Tue, 11/6/18, Karen Goh
 <[email protected]>
 wrote:
 >
 > > From: Karen Goh <[email protected]>
 > > Subject: Fw: Re: Need advice
 to put my bootstrap template in Maven
 > archetype web app
 > > To: [email protected]
 > > Date: Tuesday, November 6,
 2018, 9:38 PM
 > > Hi Thomas,
 > >
 > > I have not heard back from
 you so I am
 > > writing to you again.
 > >
 > > Basically, I still can't get
 the
 > > localhost to run the jsp page
 properly.
 > >
 > > So, what I did now is re-edit
 the web
 > > deployment assembly
 > >
 > > https://ibb.co/eJ93Cq
 > >
 > > Now, another problem appeared
 :
 > >
 > > The URL appeared to be like
 this which
 > > differs from what you have
 mentioned
 > >
 > > http://localhost:8013/WebApp/WEB-INF/tutorRegister.jsp
 > >
 > > I am really lost and can't
 get going
 > > with my project so I really
 hope you could point out how to
 > > make it right.
 > >
 > > Here's my latest attempt :
 > >
 > > https://ibb.co/g4atCq
 > >
 > > https://ibb.co/kppH5A
 > >
 > > I am so sorry to trouble you
 again but
 > > I really hope how should I
 make the my URL correct.  Do
 > > I move all the jsp to above
 image folder and just below
 > > WEB-INF ?
 > >
 > > Tks & regards,
 > > Karen
 > >
 > > --- On Sun, 11/4/18, Karen
 Goh <[email protected]>
 > > wrote:
 > >
 > > > From: Karen Goh <[email protected]>
 > > > Subject: Re: Need advice
 to put my
 > > bootstrap template in Maven
 archetype web app
 > > > To: "Thomas Broyer"
 <[email protected]>
 > > > Date: Sunday, November
 4, 2018,
 > > 1:25 PM
 > > >
 > > >
 > >
 --------------------------------------------
 > > > On Sat, 11/3/18, Thomas
 Broyer
 > > <[email protected]>
 > > > wrote:
 > > >
 > > >  Subject: Re: Need
 advice to
 > > put my
 > > > bootstrap template in
 Maven
 > > archetype web app
 > > >  To: "Karen Goh"
 <[email protected]>
 > > >  Date: Saturday,
 November 3,
 > > 2018, 9:21
 > > > PM
 > > >
 > > >
 > > >
 > > >  On Sat, Nov
 > > >  3, 2018 at 1:38 PM
 Karen Goh
 > > <[email protected]>
 > > >  wrote:
 > > >
 > > >
 > > >
 > > >
 > >
 --------------------------------------------
 > > >
 > > >  On Fri, 11/2/18,
 Thomas
 > > Broyer <[email protected]>
 > > >  wrote:
 > > >
 > > >
 > > >
 > > >   Subject: Re: Need
 advice
 > > to put my
 > > > bootstrap template in
 > > >  Maven archetype
 web app
 > > >
 > > >   To: "Maven Users
 List"
 > > <[email protected]>,
 > > >  "Karen Goh" <[email protected]>
 > > >
 > > >   Date: Friday,
 November 2,
 > > 2018, 7:37
 > > > PM
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >   On Thu, Nov
 > > >
 > > >   1, 2018 at 5:55
 AM Karen
 > > Goh
 > > >
 > > >   <[email protected]>
 > > > wrote:
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > 
 --------------------------------------------
 > > >
 > > >
 > > >
 > > >   On Tue, 10/30/18,
 jieryn
 > > <[email protected]>
 > > >
 > > >   wrote:
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >    Subject:
 Re: Need advice
 > > to put my
 > > > bootstrap template
 > > >  in
 > > >
 > > >   Maven archetype
 web app
 > > >
 > > >
 > > >
 > > >    To: "Maven
 Users List"
 > > <[email protected]>,
 > > >
 > > >   [email protected]
 > > >
 > > >
 > > >
 > > >    Date:
 Tuesday, October
 > > 30, 2018,
 > > > 8:31 PM
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >    https://maven.apache.org/plugins/maven-war-plugin/usage.html
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >   Hi Jieryn,
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >   Just to clarify,
 so I have
 > > to place
 > > > the WebContent
 > > >  folder
 > > >
 > > >   which contents
 all my
 > > bootstrap css
 > > > etc under the
 > > >  resources
 > > >
 > > >   ?
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >   I am confused cos
 the
 > > title is how
 > > > to WAR plug in where
 > > >  is
 > > >
 > > >   my question is
 more on the
 > > Maven
 > > > structure directory
 > > >  usage
 > > >
 > > >   for 3rd party
 bootstrap
 > > template.
 > > >
 > > >
 > > >
 > > >   In Maven,
 everything is
 > > done by
 > > >
 > > >   plugins, even
 the
 > > "standard" things.
 > > > Besides
 > > >  the
 > > >
 > > >   things that are
 part of
 > > the Project
 > > > Object Model
 > > >  (sources,
 > > >
 > > >   resources,
 output
 > > directory, test
 > > > sources, test
 > > >  resources,
 > > >
 > > >   test output
 directory),
 > > the
 > > > "standard layout"
 > > >  for
 > > >
 > > >   Maven projects
 are
 > > actually simply
 > > > the default
 > > >
 > > >   configurations
 for those
 > > plugins.If
 > > > you want to
 > > >
 > > >   build a WAR file
 for a web
 > > app,
 > > > you'll use
 > > >
 > > >
 > > >
 > > 
 <packaging>war</packaging> in your POM,
 > > >  which
 > > >
 > > >   will trigger the
 plugin
 > > bindings for
 > > > war packaging (
 > https://maven.apache.org/ref/3.6.0/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging
 > ).
 > > >
 > > >   The
 maven-war-plugin is
 > > responsible
 > > > for packaging the
 > > >  WAR
 > > >
 > > >   file, and by
 default will
 > > take the
 > > > "web
 > > >  resources"
 > > >
 > > >   from
 src/main/webapp.In
 > > you case,
 > > > you could
 > > >
 > > >   either
 reconfigure the
 > > > maven-war-plugin to use
 > > WebContent
 > > >  as
 > > >
 > > >   the
 warSourceDirectory, or
 > > move the
 > > > content of you
 > > >
 > > >   WebContent folder
 into
 > > > src/main/webapp (so you
 will
 > > >  have,
 > > >
 > > >   for example, a
 > > >
 src/main/webapp/WEB-INF/web.xml
 > > file
 > > >  instead
 > > >
 > > >   of
 > > WebContent/WEB-INF/web.xml)
 > > >
 > > >   See also
 > https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
 >
 > > >
 > > >
 > > >
 > > >  Hi Thomas,
 > > >
 > > >
 > > >
 > > >  Just to clarify,
 do you mean
 > > I have to
 > > > remove src/main/java
 > > >  from my pom which
 will point
 > > to the
 > > > source directory?
 > > >
 > > >  You don't need to
 configure
 > > >  src/main/java
 explicitly,
 > > it's the
 > > > default value for
 > > >
 > >
 project.build.sourceDirectory.
 > > >  This is my new
 edited pom.
 > > >
 > > >
 > > >
 > > >
 > > >
 > >
 <packaging>war</packaging>
 > > >
 > > >
 > > >
 > >
 <version>0.0.1-SNAPSHOT</version>
 > > >
 > > >   
 <name>WebApp Maven
 > > > Webapp</name>
 > > >
 > > >   
 <url>http://maven.apache.org</url>
 > > >
 > > >   
 <properties>
 > > >
 > > >
 > > >
 > >
 <src.dir>src/main/java</src.dir> //
 > > >  DO i need to
 remove this ?
 > > Will
 > > > maven compile without
 the
 > > >  java files ?
 > > >
 > > >  You can remove
 it,
 > > >  yes.Note that the
 line below
 > > redefines
 > > > the
 > > >  property, so this
 POM
 > > actually
 > > > configures
 > > >
 > > project.build.sourceDirectory
 to
 > > >  src/main/webapp.
 > > >
 > > >
 > > >
 > >
 <src.dir>src/main/webapp</src.dir>
 > > >
 > > >     
 </properties>
 > > >
 > > >     
 <build>
 > > >
 > > >
 > > >
 > > >
 > >
 <sourceDirectory>${src.dir}</sourceDirectory>
 > > >
 > > >
 > > >
 > > >
 > > 
 <finalName>WebApp</finalName>
 > > >
 > > >     
 <plugins>
 > > >
 > > >     
   <plugin>
 > > >
 > > >
 > > >
 > > >
 > >
 <groupId>org.apache.maven.plugins</groupId>
 > > >
 > > >
 > > >
 > > >
 > >
 <artifactId>maven-compiler-plugin</artifactId>
 > > >
 > > >
 > > >
 > >
 <version>3.8.0</version>
 > > >
 > > >
 > > <configuration>
 > > >
 > > >
 > > >
 <source>1.8</source>
 > > >
 > > >
 > > >
 <target>1.8</target>
 > > >
 > > >
 > > </configuration>
 > > >
 > > >
 > > </plugin>
 > > >
 > > >
 > > <plugin>
 > > >
 > > >
 > > >
 > > >
 > >
 <artifactId>maven-war-plugin</artifactId>
 > > >
 > > >
 > >
 > > >
 > > >
 > >
 <version>2.6</version>
 > > >
 > > >
 > >
 > > >
 > > > 
 <configuration>
 > > >
 > > >
 > >
 > > >
 > > >
 > > >
 > >
 <warSourceDirectory>WebContent</warSourceDirectory>
 > > >
 > > >  If you configure
 > > warSourceDirectory
 > > >  to be WebContent,
 then keep
 > > all your
 > > > web resources (JSPs,
 > > >  WEB-INF, etc.)
 into
 > > WebContent at the
 > > > root of your
 > > >  project.If you
 want to use
 > > the
 > > > "standard
 > > >  layout", then
 remove this
 > > >  line.
 > > >
 > >
 > > >
 > > >
 > > >
 > >
 <failOnMissingWebXml>false</failOnMissingWebXml>
 > > >
 > > >
 > >
 > > >
 > > >
 > > > </configuration>
 > > >
 > > >
 > > >     
   </plugin>
 > > >
 > > >     
 </plugins>
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >  Can you please let
 me know
 > > the way I
 > > > put my Bootstrap files
 > > >  as per below is it
 correct?
 > > >
 > > >
 > > >
 > > >  https://ibb.co/eNbEdL
 > > >  Remove the
 "WebContent"
 > > >  level, and move
 webapp into
 > > src/main
 > > > (it's at src/webapp
 > > >  instead of
 > > src/main/webapp).If you
 > > > deploy your
 > > >  WAR into a server
 (Tomcat,
 > > whatever)
 > > > at
 http://localhost:8080/WebApp/,
 > > >  then a file at
 > > >
 src/main/webapp/index.jsp will be
 > > reachable
 > > >  at
 > > >
 > >
 http://localhost:8080/WebApp/index.jsp.
 > > >  Similarly, a file
 at
 > > >
 > > >
 > >
 src/main/webapp/WebContent/Bootstrap/Checkbox.js will be
 > > >  reachable at
 > http://localhost:8080/WebApp/WebContent/Bootstrap/Checkbox.js
 > > >
 > > > Hi Thomas,
 > > >
 > > > I did what you said and
 move the
 > > > WEB-INF which contains
 the lib
 > > folder for image etc and the
 > > > jsps into
 src/main/webapp folder
 > > as per picture below.
 > > >
 > > > https://ibb.co/fYWi7f
 > > >
 > > > The folder which
 contains the
 > > > bootstraps in WebContent
 all all
 > > in white but the files like
 > > > bootstraps, css,
 fontawesome are
 > > still in side.  They
 > > > are now in
 src/main/webapp as
 > > well.
 > > >
 > > > However, when I ran the
 jsp file,
 > > the
 > > > url is
 > http://localhost:8013/WebApp/WEB-INF/classes/WEB-INF/tutorRegister.jsp
 > > > and I think something is
 wrong
 > > here.
 > > >
 > > > Do you mean I should
 create a
 > > > src/webapp and then
 move
 > > everything - WEB-INF and its
 files
 > > > together with the
 bootstraps files
 > > like css, bootstrap all
 > > > onto src/webapp ?
 > > >
 > > > Hope to hear from you
 soon.
 > > >
 > > > Once again, thank you so
 much for
 > > your
 > > > help!  Really
 appreciated.
 > > >
 > > > Karen
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >    On
 > > >
 > > >
 > > >
 > > >    Sun, Oct
 28, 2018 at
 > > 4:37 AM Karen
 > > > Goh
 > > >
 > > >   <[email protected]>
 > > >
 > > >
 > > >
 > > >    wrote:
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > Hi,
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > I have
 been
 > > >
 > > >
 > > >
 > > >    struggling
 for 2 days
 > > where to put
 > > > my bootstrap
 > > >
 > > >   template
 > > >
 > > >
 > > >
 > > >    that comes
 with
 > > pre-build template
 > > > which includes
 > > >  css,
 > > >
 > > >   fonts
 > > >
 > > >
 > > >
 > > >    etc. inside
 my maven web
 > > project
 > > > without success.
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > The
 problem - jsp
 > > is
 > > >
 > > >
 > > >
 > > >    not
 rendering the
 > > bootstrap
 > > > layout.  It was
 > > >  rendering
 > > >
 > > >   ok
 > > >
 > > >
 > > >
 > > >    before I
 changed the
 > > project
 > > > structure which meets
 > > >  the
 > > >
 > > >   Maven
 > > >
 > > >
 > > >
 > > >    project
 standard
 > > structure.
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > This
 is a 3rd party
 > > bootstrap
 > > > template.
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > After
 reading up
 > > the
 > > >
 > > >
 > > >
 > > >    maven
 project structure,
 > > I have
 > > > tried to put it under
 > > >
 > > >
 > > >
 > > >   
 src/main/resources,
 > > tried under
 > > > src, tried moving
 > > >  around
 > > >
 > > >   all
 > > >
 > > >
 > > >
 > > >    parts of
 the directory
 > > but to no
 > > > avail....
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > I also
 used the
 > > below
 > > >
 > > >
 > > >
 > > >    structure
 to move my
 > > WebContent
 > > > which included this
 > > >
 > > >   template
 > > >
 > > >
 > > >
 > > >    but it is
 still not
 > > working
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > https://stackoverflow.com/questions/15529184/where-to-place-twitter-bootstrap-files-in-a-maven-project
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > Here's
 my pom.xml
 > > >
 > > >
 > > >
 > > >    :
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > https://ibb.co/fesnGV
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > https://ibb.co/m7GQ3A
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    Here's
 where my
 > > bootstrap ended
 > > > now (still not
 > > >
 > > >   working)
 > > >
 > > >
 > > >
 > > >    - where I
 put the jsp
 > > files and
 > > > WebContent
 > > >  separately.
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > https://ibb.co/fKArbV
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > Please
 tell me
 > > where
 > > >
 > > >
 > > >
 > > >    should I
 put the
 > > bootstrap
 > > > template.
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    > Thank
 you &
 > > regards,
 > > >
 > > >
 > > >
 > > >    > Karen
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >    >
 > > >
 > > >
 > > >
 > > >
 > > >
 > >  
 ---------------------------------------------------------------------
 > > >
 > > >
 > > >
 > > >    > 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]
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > >
 > > 
 ---------------------------------------------------------------------
 > > >
 > > >
 > > >
 > > >   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