[Beginners Corner] - Context issues
by tomsimmons
Hi Folks
I am using Eclipse to develop an application, I have JBoss integrated with it and all is working fine. In a JSP page I have added an output that displays:
request.getServerName = localhost
request.getServerPort = 8080
request.getContextPath = test1
request.getServletPath = index.jsp
As I expect when I reference css, javascript includes etc I use /test1/css or similar. Similarly inside the css's I can use /test1/images... for access to images and everything works fine.
The problem I have is that when I deploy to the test or production servers all my references are wrong. When I investigated I found that there was no context...
request.getServerName = test1.comp.com
request.getServerPort = 80
request.getContextPath =
request.getServletPath = index.jsp
I'm not responsible for the configuration of the servers, but I'm wondering if someone can explain to me how there is no context on the server?
To release the file all I do is copy the WAR and SAR into...
c:\jboss-4.2.0.GA\server\default\deploy
Until I understand this I'm going to have to sort out the nice directories I created for each area of the project so all pages are in the root. I didn't create this project, I've inherited it and to be honest I'm not convinced it's configured correctly.
Tom
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210700#4210700
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210700
17 years, 2 months
[JBoss Messaging] - Network Failure undetected - Linux
by cbolanos
Good morning, I have developed a JMS system. These are their main properties:
Jboss Messaging 1.4.0 SP3
Jboss Remoting 1.2.2 sp7
Jboss AS 4.2.2.GA
Linux debian 4
In a Jboss server there is a Queue, with a MDB listener on it, and a topic. When the MDB receives a message, pass it to the topic after processing it.
I have serveral clients who send messages to the remote Queue and receive messages from the topic, because all of them have a durable suscription.
This is the code of the JMS Client durable suscription
| ...
| //Remote connections
| AVMain.controller.updateProgressAction(35, "Starting Remote Connections...");
| ic2 = new InitialContext();
| AVMain.controller.updateProgressAction(45);
| ConnectionFactory cf2= null;
| cf2 = (ConnectionFactory)ic2.lookup(jndiConnectionFactory);
| AVMain.controller.printLog("Found remote context: " + ic2.getEnvironment().get(ic2.PROVIDER_URL));
| connection2 = cf2.createConnection(jmsUser, jmsPwd);
| AVMain.controller.updateProgressAction(55);
| AVMain.controller.printLog("JMS connection 2 created " + " of type " + connection2.getClass().getName());
|
| ave = new AVExceptionListener();
| //Obligatorio indicar clientid para poder crear una durable suscription
| connection2.setClientID(clientId);
| AVMain.controller.printLog("Client id " + clientId + "established");
|
| connection2.setExceptionListener(ave);
| session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
| AVMain.controller.updateProgressAction(60);
| AVMain.controller.printLog("Session2 created auto ack and without transatcions");
|
|
My problem is that in Linux enviroment, the client doesn't detect network failure (e.g if I disconect eth wire), however in Windows enviroment it does because the ExceptionListener throws an ConnectException. I've read a lot of configuring timeouts, keep alives, but i can't find the solution.
Please, could anyone help me.
Thank you for your great job.
Regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210692#4210692
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210692
17 years, 2 months