473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help in URL Redirection between Apache and JBoss

Hi..
I am new to Apache.. I face issues in redirection of pages between Apache and JBOSS.
The page is working fine when i hit the URL https://example.com/test.
My requirement is to land in the same page when i hit the URL https://example.com without providing the context root "/test".
Kindly help in resolving this issue.
Jan 11 '13 #1
1 4113
I would give jboss another chance for doing http authentication.
I'll tell you what files you should modify:

Expand|Select|Wrap|Line Numbers
  1. * web.xml: say wich resources should be secured and how
  2.  
  3.      <security-constraint>
  4. <display-name>acceso seguro</display-name>
  5. <web-resource-collection>
  6. <web-resource-name>fullSite</web-resource-name>
  7. <url-pattern>*.jsp</url-pattern>
  8. <url-pattern>*.do</url-pattern>
  9. <http-method>GET</http-method>
  10. <http-method>POST</http-method>
  11. </web-resource-collection>
  12. <auth-constraint>
  13. <role-name>normalUser</role-name>
  14. </auth-constraint>
  15. <user-data-constraint>
  16. <transport-guarantee>NONE</transport-guarantee>
  17. </user-data-constraint>
  18. </security-constraint>
  19.  
  20. <login-config>
  21. <auth-method>FORM</auth-method>
  22. <realm-name>myLogin</realm-name>
  23. <form-login-config>
  24. <form-login-page>/logon/logon.jsp</form-login-page>
  25. <form-error-page>/logon/logonError.html</form-error-page>
  26. </form-login-config>
  27. </login-config>
  28. You should modify this to do http authentication.
  29.  
  30. <security-role>
  31. <role-name>normalUser</role-name>
  32. </security-role>
  33.  
  34. * jboss-web.xml (located in the same directory as web.xml
  35.  
  36. <jboss-web>
  37.       <security-domain>java:/jaas/mySecurityDomain</security-domain>    </jboss-web>
  38.  
  39. * login-config.xml (in your application jboss conf directory)
  40.  
  41. <application-policy name="mySecurityDomain">
  42. <authentication>
  43.             <login-module
  44. code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
  45. flag="required">
  46. <module-option name="dsJndiName">java:/genesisDS</module-option>
  47. <module-option name="principalsQuery">select password from Usuario where userid=?</module-option>
  48. <module-option name="rolesQuery">select rolId, 'Roles' from Usuario_Rol where userId=?</module-option>
  49. <module-option name="hashAlgorithm">SHA</module-option>
  50. <module-option name="hashEncoding">base64</module-option>
  51. <module-option name="hashCharset">UTF-8</module-option>
  52. </login-module>
  53.        </authentication>
  54. </application-policy>
If you set those files correctly you should get the http login window, managed directly by jboss (tomcat running inside jboss actually).

Thanks
Jeff Jones
Lead -
Dec 10 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John C | last post by:
Hello all, First off thanks for reading this... The following code works fine on my redhat linux box at home, however it does not work when running on my webhost, whose server is also apache....
5
by: Grant Collins | last post by:
Hi I am writing a web based application as part of a small project that I am undertaking using servlets beans and jsp. I already have one servlet - bean - jsp page working and I have written...
0
by: bruce | last post by:
Hi... Update.... We have the following setup in our httpd.conf file. We've tried to give what's related to the issue. We're trying to set up a virtual host for a test project. The behavior...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
4
by: nawrin22 | last post by:
hi.. I am a niwebie in 'AXIS' . but i had correctly installed it without any problem with the help of 'apache.axis.install.pdf' and also tested the examples under 'samples\userguide' directoy...
4
by: segis bata | last post by:
Hello all, I have a page (located at mywebsite/a.asp) that redirects to another page (theirwebsite/b.asp) located in other server. This other page probably will redirect to another link again...
0
xxoulmate
by: xxoulmate | last post by:
when i install apache in the location c:/apache. it was successfully installed on that path, but on the right corner of the window when i mouse over the apache monitor it says the no service...
4
by: kjsphoto | last post by:
I jsut installed a new PHP 5 server as I wanted to keep the php4 version server running until I change over all the code to work with 5. Here is the problem and for the life of me I cannot...
1
by: viswanathtvs | last post by:
java.util.NoSuchElementException javax.faces.el.EvaluationException: java.util.NoSuchElementException at...
22
by: parashar123 | last post by:
Trying to solve the issue, I found one thing which is not there in my Apache version and that might be affecting the result LoadModule perl_module modules/mod_perl.so in httpd.conf file But for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.