我在jboss容器中部署了两个应用程序(相同的unix框).如果我从app1收到请求,我需要为app2设置相应的请求.
例如:
如果app1请求是:http://example.com/context? param1 = 123
然后我需要提取" http://example.com/ ",以便我可以构建第二个应用程序的请求.
我试过用:
HttpServletRequest.getServerName() &
HttpServletRequest.getServerPort() & \
HttpServletRequest.getHeader("host")
Run Code Online (Sandbox Code Playgroud)
方法,但请求可能是http或https.
如果还有其他更好的方法,请告诉我.谢谢!
在将一个分支重新建立到另一个分支上后,我遇到了一个有趣的问题;git rebase -i HEAD~n不仅显示错误的提交历史记录(旧分支),还显示错误的提交数量。
我希望能够对git rebase -i HEAD~n正确的提交历史记录进行操作,以便压缩我基于分支的旧分支的剩余提交。
# On another Feature branch
git branch -b NewFeautureBranch
# Develop my commit
git add editedfile.extension
git commit -m "Commit message"
# I squashed and merged the feature branch into the development branch, as well as some other feature branches
git fetch --all
git checkout DevelopmentBranch
git pull
git checkout NewFeatureBranch
git rebase DevelopmentBranch
git push -f
Run Code Online (Sandbox Code Playgroud)
运行git log并gitk会显示应有的历史记录,这是我当前的提交和它最初基于的功能分支的较旧提交,如预期的那样。然而,如果我随后运行,git rebase -i …
command-line ×1
git ×1
git-rebase ×1
http ×1
http-headers ×1
httprequest ×1
java ×1
servlets ×1
windows-10 ×1