database - Good practices to deploy project from development to production with differents OS? -
i'm finishing 1 project in jsf, have recreate links (like localhost:8080/project/recoverpassword
www.project.com/recoverpassword
instance , many others. wonder if there's other way in easier way ?
other thing i'm using windows 7
development plataform , project gonna deployed in linux
(probably centos 6) , paths
totally different, links, image, video, etc, referring local content of course (i think expensive host these files outside application running), 'cause file system different, 'cause problems database in names of tables referred in entities in jpa. lesson here have develop project it's gonna deployed ? or wrong ? there's way work around issue ?
thanks.
i gather /project
context path. context path indeed dynamic value, beyond control of web application project.
you should not have need recreate links if have beginning on used:
<h:link>
instead of<a>
internal links<h:graphicimage>
instead of<img>
internal images<h:outputscript>
instead of<script>
internal js<h:outputstylesheet>
instead of<style>
internal css#{request.contextpath}
instead of hardcoded"/project"
print context path in viewexternalcontext#getrequestcontextpath()
in bean
the mentioned tags automatically prepend current context path when necessary. in other words, should never have had need hardcode string /project
representing context path anywhere in code.
pick yourself, bite bullet, take full day fix them in current project , profit of lesson learnt future projects.
Comments
Post a Comment