[JNDI/Naming/Network] - Re: jboss-client.jar really needed for Tomcat?
by jaikiran
"henk53" wrote :
| I do wonder, but perhaps this is not a question for this forum, why a JNDI connection to the Jboss AS directory can't be made without exposing the jboss-client-jar to the client application.
|
| The reason I'm asking is that I'm building an application where the dependencies should be as few as is reasonably possible. As much as possible should be defined at the servlet or AS level.
Remember that JNDI (similar to JDBC) is just a set of interfaces. There are various JNDI service providers. Tomcat has its own JNDI service and JBoss has its own. So when a client in Tomcat wants to use JBoss JNDI service, the client has to pass the appropriate properties (similar to what you do with JDBC DriverManager to load the appropriate drivers). The properties are usually passed through a jndi.properties file or through the constructor of the InitialContext class. Here's an example:
Properties props = new Properties();
| props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
|
| Context ctx = new InitialContext(props);
|
As a result, you will have to package the required jar files (again, similar to your JDBC driver jars) with the client. Kazuhisa is right, you can package the jbossall-client.jar with the client to access the JNDI service of JBoss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152004#4152004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152004
18 years, 1 month
[JBoss Portal] - Problem regarding renderURL param
by ruchika
Hello,
I am facing a problem while using renderURL.
My scenario:
I have two tabs: Home, Test.
Test tab has one portlet in which a jsp(Say testTabHome.jsp) is being displayed. This jsp has links (renderURL with param value say state).
Depending on state i m showing the respective pages (say testTabPageA.jsp,testTabPageB.jsp....) in same portlet.
Now suppose last page visited is testTabPageA.jsp (using link).
The problem is that when I am clicking on Home tab , the home page is getting displayed(correctly) but when I am again clicking on Test tab, instead of testTabHome.jsp, the last page (testTabPageA.jsp in this case) visited under Test tab is getting displayed.
Any help in this regard will be greatly appreciated.
Regards,
Ruchika
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151995#4151995
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151995
18 years, 1 month