473,651 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help in URL Redirection between Apache and JBoss

1 New Member
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 4130
gutts009
10 New Member
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
1647
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. I realize that they have some aspects of the server disabled for security, but after looking at my code, their representative said it should work fine.
5
27980
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 another servlet - bean - jsp but I am hitting an error from tomcat that I have no idea why it is failing. I am getting an org.apache.jasper.JasperException: with the root cause being java.lang.ClassNotFoundException:
0
2026
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 that we're seeing is that we can type: http://foo.com but the url that gets displayed is
52
5428
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. Happy New Year -- Gerry
4
13986
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 provided with 'AXIS'. Later ,I wanted to run a 'build.xml' file created of my own to run the 'example3' project under a diffrent directory and configured the 'build.xml' accordingly. I succeded but after then .. I could not run any of the...
4
27520
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 (othersite/c.asp) and finally display the web page I want the user to see (finalwebsite/d.asp) What I want to do is, once they click the link (b.asp) located in the a.asp webpage, to load a "please wait" type of page, like Expedia does while...
0
1790
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 installed., what will i supposed to do., thanx im using OS 98 SE
4
2397
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 figure it out. If I create a file and put it in the root of apache 2.2 on the php 5 server with the command php_info() it displays the php information. Now if I copy a file from the php4 server into the php5 root and call
1
3899
by: viswanathtvs | last post by:
java.util.NoSuchElementException javax.faces.el.EvaluationException: java.util.NoSuchElementException at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:387) at...
22
3127
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 that, I need mod_perl.so file which I don't have. For generating it, I had downlloaded mod_perl module from Apache site and try to run Makefile.pl but for that it needs apxs executable but that also I don't have
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.