Re: struts2 with Geronimo

2010-12-02 Thread jbeck

Thanks, however that sample is  not very useful including,

"Because of a problem described in GERONIMO-5020, this sample application is
not available as a geronimo plugin for the time being."

I don't see the integration between struts and geronimo clearly explained.

Also it doesn't answer the question - why do I need to do an ANT build first
of the struts code, and not just be able to "run as->run on server", what
step am I missing to integrate the struts into my geronimo project?

I forgot to mention I'm using eclipse and GEP for building/deploying/running
my geronimo samples .

thanks

jeff
-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/struts2-with-Geronimo-tp2009645p2010078.html
Sent from the Users mailing list archive at Nabble.com.


Re: struts2 with Geronimo

2010-12-02 Thread Forrest Xia
Not sure if you had a chance to look at the latest released Geronimo samples
v2.1.7, there is a sample called DataCDInfo, which uses struts in geronimo.

Basically, I don't see any burden that stop using struts with Geronimo.

Forrest


struts2 with Geronimo

2010-12-02 Thread jbeck

I'm somewhat comfortable with struts2 and now learning about geronimo 

Is combining these 2 technologies a good idea?

I don't want to use httpServlet class to write dynamic info to the view as
in the geronimo examples, and with struts this is not necessary. 

I want to leverage Struts validation, action mapping, struts-enhanced HTML
tags, and reduce the amount of code in my jsp pages. But also want to create
enterprise apps.

At this point i'm not sure how to do this - or if it makes sense - A) do I
need a geronimo-web.xml?

I have deployed a sample struts application to geronimo, I needed to compile
the struts app with ANT, and copy the WAR to the geronimo deploy directory
manually.

I didn't use any EJB or EE or JPA components. Is it wise/useful to try and
mix struts and geronimo when creating an enterprise application?

Any advice or specifics would be appreciated. Or pointers to examples.
Using struts2, java 6, geronimo2.2.



jbeck
-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/struts2-with-Geronimo-tp2009645p2009645.html
Sent from the Users mailing list archive at Nabble.com.


Re: javax.ejb.EJBAccessException - Unauthorized Access by Principal Denied

2010-12-02 Thread viola.lu

You can refer to geronimo sample DataCDInfo
https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-ejb/src/main/java/org/apache/geronimo/samples/datacdinfo/core/DataCDInfoAdmin.java
which also used the ejb security. 
Good Luck!
-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/javax-ejb-EJBAccessException-Unauthorized-Access-by-Principal-Denied-tp2006827p2009511.html
Sent from the Users mailing list archive at Nabble.com.


javax.ejb.EJBAccessException - Unauthorized Access by Principal Denied

2010-12-02 Thread yellowb

Hi,

I'm trying to use authenticated remote ejb but it always fails with the
exception javax.ejb.EJBAccessException - Unauthorized Access by Principal
Denied

I've been browsing the web alot but I didn't found a solution.

i'm using Geronimo 2.1.7

here is the bean :

@Stateless
@DeclareRoles({"admin"})
@RolesAllowed({"admin"})
public class UserBean implements UserBeanRemote, UserBeanLocal {

public UserBean() {
}
   
public String getName() {
return "plout" ;
}

}


Here is the client :

public class User {
private String name="";

   public String getName() {
   return name ;
   }

   public void setName(String name) {
  String n = "";
try {
Properties prop = new Properties();
prop.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
prop.put("java.naming.provider.url",
"ejbd://localhost:4201");
Context ctx= new InitialContext(prop);
   
prop.setProperty("openejb.authentication.realmName", "geronimo-admin");
   
prop.setProperty("java.naming.security.principal", "system");
   
prop.setProperty("java.naming.security.credentials", "manager");
UserBeanRemote
u1=(UserBeanRemote)ctx.lookup("UserBeanRemote");
n = u1.getName();
} catch (NamingException ne) {
System.out.println(ne.toString());
}
this.name = n ;
   }
}

Here is the openejb-jar.xml :


http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
   
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2";
xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0";
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2";
xmlns:pers="http://java.sun.com/xml/ns/persistence";
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1";
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0";
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>


default
pkb-ejb
1.0
car
   











Do you know where the problem come from or where I can find a good
documentation ?


Thanks


-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/javax-ejb-EJBAccessException-Unauthorized-Access-by-Principal-Denied-tp2006827p2006827.html
Sent from the Users mailing list archive at Nabble.com.


Re: Deploying source code using geronimo2.2/eclipse/GEP

2010-12-02 Thread jbeck

yes with a new Helios eclipse install and new 2.2 Gep, it works!

thanks.
-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/Deploying-source-code-using-geronimo2-2-eclipse-GEP-tp1996409p2004580.html
Sent from the Users mailing list archive at Nabble.com.