Cannt connect Struts + Tiles with mysql

2010-02-25 Thread abhishek jain
Hi friends,
Just learned struts 1.2 and tiles, want to connect to mysql.
pl. find below the configuration i am using:
struts-config.xml

data-sources

data-source type=*org.apache.commons.dbcp.BasicDataSource*

set-property property=*driverClassName* value=*com.mysql.jdbc.Driver*
/

set-property property=*url* value=*jdbc:mysql://localhost:3306/mysqldb*
/

set-property property=*username* value=*root* /

set-property property=*maxActive* value=*10* /

set-property property=*maxWait* value=*5000* /

set-property property=*defaultAutoCommit* value=*false* /

set-property property=*defaultReadOnly* value=*false* /

/data-source

/data-sources


controller processorClass=*org.apache.struts.tiles.TilesRequestProcessor
*/

plug-in className=*org.apache.struts.tiles.TilesPlugin*

set-property property=*definitions-config* value=*
/WEB-INF/tiles-defs.xml* /

set-property property=*moduleAware* value=*true* /

/plug-in


I get the error message: Can't get definitions factory from context.
I know due to the datasource it cannot find the tiles defs file, but why?
Can anyone help and give me some pointers,
thanks
-- 
Thanks and kind Regards,
Abhishek jain


Re: Cannt connect Struts + Tiles with mysql

2010-02-25 Thread Antonio Petrelli
2010/2/25 abhishek jain abhishek.netj...@gmail.com:
 I get the error message: Can't get definitions factory from context.
 I know due to the datasource it cannot find the tiles defs file, but why?

Because the application failed starting, probably. Check the log
related to the start of your application.

Antonio

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Single Sign On And Spring Security

2010-02-25 Thread Lance Hill
Hello,

 

I am hoping someone can provide me with some links or examples of how to
combine Struts 2 with Spring security. The end goal is to use Spring
security to access a CAS server (http://www.jasig.org/cas) in order to
provide single sign on ability between a Struts2 application and a Wordpress
site.

 

Thank you,

Lance Hill

 



Re: Single Sign On And Spring Security

2010-02-25 Thread Frans Thamura
i believe the cool reference only roller 5 which it is not released yet

F
On Thu, Feb 25, 2010 at 10:11 PM, Lance Hill la...@baldhead.com wrote:

 Hello,



 I am hoping someone can provide me with some links or examples of how to
 combine Struts 2 with Spring security. The end goal is to use Spring
 security to access a CAS server (http://www.jasig.org/cas) in order to
 provide single sign on ability between a Struts2 application and a
 Wordpress
 site.



 Thank you,

 Lance Hill






Re: Cannt connect Struts + Tiles with mysql

2010-02-25 Thread abhishek jain
On Thu, Feb 25, 2010 at 6:40 PM, Antonio Petrelli 
antonio.petre...@gmail.com wrote:

 2010/2/25 abhishek jain abhishek.netj...@gmail.com:
  I get the error message: Can't get definitions factory from context.
  I know due to the datasource it cannot find the tiles defs file, but why?

 Because the application failed starting, probably. Check the log
 related to the start of your application.

 Antonio--


Hi ,
Thanks for the help, it narrowed the problem to the following error,
Where should i look next,

Feb 25, 2010 8:46:32 PM org.apache.struts.action.ActionServlet init
SEVERE: Unable to initialize Struts ActionServlet due to an unexpected
exception or error thrown, so marking the servlet as unavailable.  Most
likely, this is due to an incorrect or missing library dependency.
java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool


Thanks for the help, really appreciated,
-- 
Thanks and kind Regards,
Abhishek jain


Re: Cannt connect Struts + Tiles with mysql

2010-02-25 Thread Antonio Petrelli
2010/2/25 abhishek jain abhishek.netj...@gmail.com:
 Feb 25, 2010 8:46:32 PM org.apache.struts.action.ActionServlet init
 SEVERE: Unable to initialize Struts ActionServlet due to an unexpected
 exception or error thrown, so marking the servlet as unavailable.  Most
 likely, this is due to an incorrect or missing library dependency.
 java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool

The error says it all, you need commons-pool:
http://commons.apache.org/pool/

Antonio

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:if inside s:url

2010-02-25 Thread Dale Newfield

CRANFORD, CHRIS wrote:

That still renders department= on the request when the department
field is null which is not what I want.


I understand the desire to have pretty urls, but technically the 
presence or absence of department= in the url is not distinguishable 
by the action created when this url is requested.


If you're trying to distinguish between null and empty, you need a way 
to signal that distinction to the action.  One or two reserved 
department ids/names that you interpret as these magic values would 
solve your problem:


for example:
s:param name=department value=%{(#attr.row.department == 
null)?'null':(#attr.row.department.isEmpty?'unconstrained':#attr.row.department)}/


-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: s:if inside s:url

2010-02-25 Thread CRANFORD, CHRIS
Although, I didn't consider this solution, which seems sort of broken
but appears to at least work and provide the desired effect:

s:param name=%{#attr.row.department==null?'d':'department'}
  s:property value=%{#attr.row.department}/
/s:param

If the department value is null, the request parameter is named d
rather than department.  It is only department when the parameter is
not null.

I still do not understand why you cannot wrap a s:param tag with a s:if
construct to control whether a parameter is appended to the s:url or
not.  

According to Eclipse, placing a s:if inside the s:url around an s:param
is not considered abnormal use of the tags, so I'm at a loss.  

 -Original Message-
 From: Dale Newfield [mailto:d...@newfield.org]
 Sent: Thursday, February 25, 2010 11:35 AM
 To: Struts Users Mailing List
 Subject: Re: s:if inside s:url
 
 CRANFORD, CHRIS wrote:
s:if test='%{#attr.row.department != null}'
  s:param name='department's:property
  value='#attr.row.department'//s:param
/s:if
 
 s:param name=department value=%{(#attr.row.department ==
 null)?'':#attr.row.department}/
 
 -Dale
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



struts 2 token interceptor problem

2010-02-25 Thread repuken2

Hi,

i'm having trouble with token interceptor, i'm using struts 2.1.8.1 with
eclipse and glassfish V3. 
***we're using struts 1 plugin***  , we're migrating an old project wich
used struts 1 and so far everything is working ok, fileupload interceptor,
forms, etc. but toke-interceptor stuff. When goin from an action to another
that is protected-affected by this token-interceptor ( the jsp has the
s:token\ tag and the config.xml is properly configured having the
interceptor-ref token in the corresponding action) the interceptor indeed
works and interceps but it always return invalid.token result. The action
never executes as the application flow is interrupted at the interceptor
stage.

Has anybody experimented something similar? using struts 1 plugin or not?
does it have to do with this plugin and it would work using pure struts 2? (
don't ask me why but we need this up and working with the S1 plugin) , any
ideas??

Cheerz and thanks in advance,

best regards.

Manuel
-- 
View this message in context: 
http://old.nabble.com/struts-2-token-interceptor-problem-tp27714506p27714506.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Validation of indexed properties

2010-02-25 Thread Cielpa

Hey,

I have a similar problem with DynaValidatorActionForm.
It says that invalid property when i have a ArrayList in the form-property
name=searchList type=java.util.ArrayList/ in the form-bean
declaration.

Any idea?
 Thanks and your help is appreciated.
Silpa

hugh11 wrote:
 
 I've got a problem relating to the validation of indexed properties in
 Struts 1.1
 I get the following error message when I try to access an ArrayList of
 students in my DynaValidatorForm
 
 root cause 
 
 java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
 java.util.ArrayList.RangeCheck(Unknown Source)
 java.util.ArrayList.get(Unknown Source)
 org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:298)
 
 
 
 Here is some background to the problem...
 
 In my session I have an ArrayList called studentsList of objects of type
 experiment.mybeans.Student. A Student object has getter and setter methods
 for id, year and gradeAverage.
 
 In my students.jsp I create a table by iterating through my student
 objects like this...
 
 c:forEach var=students items=${sessionScope.group.studentsList} 
   trtdhtml:text indexed=true name=students property=id//td
   tdhtml:text indexed=true name=students property=year//td
   tdhtml:text indexed=true name=students
 property=gradeAverage//td/tr
 /c:forEach
 
 As you can see the table contains empty text boxes and I would like to
 validate these have been filled in, so in struts-config.xml I create my
 dynavalidatorform as follows...
 
 form-bean name=studentsForm
 type=org.apache.struts.validator.DynaValidatorForm 
 form-property name=students type=java.util.ArrayList /
 /form-bean
 
 And in validation.xml I place my validation rules...
 
 form name=studentsForm 
field property=id indexedListProperty=students depends=required
  arg0 key=error.studentid.required/
 /field
field property=year indexedListProperty=students
 depends=required
  arg0 key=error.studentyear.required/
 /field
field  property=gradeAverage indexedListProperty=students
 depends=required
  arg0 key=error.studentgrade.required/
 /field
 /form
 
 Now here is where things start to go a bit pear-shaped
 
 I have read somewhere online that I need to populate the form ArrayList
 before I get to my jsp page. So I have created an action class called
 PreStudentsAction.java which takes the student ArrayList out of the
 session and assigns it to the student ArrayList in the form before
 forwarding to the students.jsp page...
 
 public class PreStudentsAction extends Action{
   
   public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
   {
   
   DynaValidatorForm myForm = (DynaValidatorForm)form;
   Group group = (Group)request.getSession().getAttribute(group);
   ArrayListStudent students = group.getStudentsList();
   
   myForm.set(students, students);   
   return (mapping.findForward(success));
   }
 
 }
 
 
 Finally when I run my application my table is displayed but when I fill in
 the table and press submit I get the IndexOutOfBounds error. It appears to
 me that the student ArrayList in the form remains empty and that my Action
 class was unsuccessful in populating the form's ArrayList.
 
 Can anybody see what I'm doing wrong?
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Validation-of-indexed-properties-tp27493794p27714507.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:if inside s:url

2010-02-25 Thread Dale Newfield

CRANFORD, CHRIS wrote:

  s:if test='%{#attr.row.department != null}'
s:param name='department's:property
value='#attr.row.department'//s:param
  /s:if


s:param name=department value=%{(#attr.row.department == 
null)?'':#attr.row.department}/


-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Nabble and mailing list archives

2010-02-25 Thread Greg Lindholm
This mailing list on Nabble seems to be gone, at least I can't find it.
Nabble switched over to a new system and old system is now at
old.nabble.com but doesn't seem to be getting updates anymore.
Anyone working to get this mailing list archived on the  New and
Improved nabble or is there a better place to search the mail
archives?

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts with JSF and Tiles error

2010-02-25 Thread Sekar, Sowmya

Hi,
I have an existing Struts 1 application with Tiles and JSP. I would like to use 
JSF 2 components instead of the JSP tags and leave the business logic and 
actions as is.
These are the steps I followed :

1.   Copied jsf-impl , jsf-api.jar and struts-faces-1.3.8.jar in my 
web-inf/lib folder of my application

2.   Configured the faces servlet in my web.xml
  servlet
  servlet-namefaces/servlet-name
  servlet-classjavax.faces.webapp.FacesServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
  load-on-startup1/load-on-startup

  /servlet


  servlet-mapping
  servlet-namefaces/servlet-name
  url-pattern/faces/*/url-pattern
  /servlet-mapping

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern/do/*/url-pattern

  /servlet-mapping



I also configured my action servlet as follows :


  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param

load-on-startup2/load-on-startup

 /servlet



I forwarded a menu option to a page through an action class using tiles. The 
target page is /faces/pages/home.jsp.

After the action is executed, it throws the following error -


WARNING: executePhase(RENDER_RESPONSE 
6,com.sun.faces.context.facescontexti...@1ebf89f) threw exception
java.lang.NullPointerException

  at 
com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:183)



FacesContext is returned as null.





Please help









Sowmya Sekar



Re: Problem reloading Struts 2 app in Tomcat and Eclipse

2010-02-25 Thread Volker Karlmeier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

that seems to me as if you have a problem with your sax-parser.
You should have a look if you have
1) the correct JDK (think 5.5.28 runs with 1.5, doesn't it ?)
2) the correct xerces - libraries in your classpath
3) not any other libraries in your classpath that provide a SaxParser.

Maybe this helps.

regards

  Volker




Am 24.02.2010 16:33, schrieb Greg Lindholm:
 I decided to finally ask about this problem I've been seeing for
 several years. During development I will run my Struts 2 (2.1.8)
 apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the
 current versions I'm using but this problem goes way back over many
 different versions over a couple years.

 Here's the problem, if I make any changes while the app is running
 like change a properties file of change a class, Eclipse will push
 the changes to the deploy area and Tomcat will see the change and
 attempt to reload the application (that's all good and expected).
 However the reload always fails with the exception stack below and
 I have to manually stop and restart Tomcat to get it to load
 successfully and see the updates.  I never had this problem with
 Struts 1 or even JSF, Tomcat was always able to reload the apps
 automatically.

 Anyone have any idea why the reload is failing and how to fix?

 Here is the stack dump:

 Feb 24, 2010 10:15:44 AM
 org.apache.catalina.loader.WebappClassLoader findResourceInternal
 INFO: Illegal access: this web application instance has been
 stopped already.  Could not load
 META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.


The eventual following stack trace is caused by an error thrown for
 debugging purposes as well as to attempt to terminate the thread
 which caused the illegal access, and has no functional impact.
 2010-02-24 10:15:44,081 ERROR
 org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher
 initialization failed Unable to load configuration. - [unknown
 location] at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)


at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at
 org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 at
 org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)


at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)


at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)


at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)


at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
 at
 org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)


at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)


at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)


at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
 at java.lang.Thread.run(Thread.java:619) Caused by: Caught
 exception while loading file struts-default.xml - [unknown
 location] at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)


at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)


at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
 at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)


... 17 more
 Caused by: java.lang.ClassCastException:
 org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot
 be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at
 org.apache.xerces.parsers.DOMParser.init(Unknown Source) at
 org.apache.xerces.parsers.DOMParser.init(Unknown Source) at
 org.apache.xerces.jaxp.DocumentBuilderImpl.init(Unknown Source)
 at
 org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown


Source)
 at
 com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)


at
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.init(SAX2DOM.java:85)
 at
 

Re: Problem reloading Struts 2 app in Tomcat and Eclipse

2010-02-25 Thread Volker Karlmeier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi again,

regarding your reloading problem I have another idea. Look here,
if you have the next problem :)
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

regards

  Volker



Am 24.02.2010 16:33, schrieb Greg Lindholm:
 I decided to finally ask about this problem I've been seeing for
 several years. During development I will run my Struts 2 (2.1.8)
 apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the
 current versions I'm using but this problem goes way back over many
 different versions over a couple years.

 Here's the problem, if I make any changes while the app is running
 like change a properties file of change a class, Eclipse will push
 the changes to the deploy area and Tomcat will see the change and
 attempt to reload the application (that's all good and expected).
 However the reload always fails with the exception stack below and
 I have to manually stop and restart Tomcat to get it to load
 successfully and see the updates.  I never had this problem with
 Struts 1 or even JSF, Tomcat was always able to reload the apps
 automatically.

 Anyone have any idea why the reload is failing and how to fix?

 Here is the stack dump:

 Feb 24, 2010 10:15:44 AM
 org.apache.catalina.loader.WebappClassLoader findResourceInternal
 INFO: Illegal access: this web application instance has been
 stopped already.  Could not load
 META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.


The eventual following stack trace is caused by an error thrown for
 debugging purposes as well as to attempt to terminate the thread
 which caused the illegal access, and has no functional impact.
 2010-02-24 10:15:44,081 ERROR
 org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher
 initialization failed Unable to load configuration. - [unknown
 location] at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)


at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at
 org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 at
 org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)


at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)


at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)


at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)


at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
 at
 org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)


at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)


at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)


at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
 at java.lang.Thread.run(Thread.java:619) Caused by: Caught
 exception while loading file struts-default.xml - [unknown
 location] at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)


at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)


at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
 at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)


... 17 more
 Caused by: java.lang.ClassCastException:
 org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot
 be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at
 org.apache.xerces.parsers.DOMParser.init(Unknown Source) at
 org.apache.xerces.parsers.DOMParser.init(Unknown Source) at
 org.apache.xerces.jaxp.DocumentBuilderImpl.init(Unknown Source)
 at
 org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown


Source)
 at
 com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)


at
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.init(SAX2DOM.java:85)
 at
 com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)


at

Re: Nabble and mailing list archives

2010-02-25 Thread Dale Newfield

Greg Lindholm wrote:

This mailing list on Nabble seems to be gone, at least I can't find it.


http://old.nabble.com/Struts-f203.html

-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Problem reloading Struts 2 app in Tomcat and Eclipse

2010-02-25 Thread Greg Lindholm
1) the correct JDK (think 5.5.28 runs with 1.5, doesn't it ?)
Running with JDK 1.6.0_16

 2) the correct xerces - libraries in your classpath
I've got xercesImpl.jar (2.9.1) in my WEB-INF/lib folder and as far as
I know that is the only SAXParser.

 3) not any other libraries in your classpath that provide a SaxParser.
Not that I'm aware of but how would I know?   I have Struts 2 and
Hibernate and all there dependent jars but nothing else that looks
like it's an XML parser.


regarding your reloading problem I have another idea. Look here,
if you have the next problem :)
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
I not finding anything that looks like a problem off this link.

Again, everything works when I launch Tomcat fresh or restart it from
within Eclipse. I only get the error when Tomcat attempts to reload
the application.

Here seems to be the core issue:

Caused by: java.lang.ClassCastException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration


Any ideas on how to figure out what is going on?


On Thu, Feb 25, 2010 at 4:13 PM, Volker Karlmeier vol...@magiccode.eu wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi again,

 regarding your reloading problem I have another idea. Look here,
 if you have the next problem :)
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

 regards

  Volker



 Am 24.02.2010 16:33, schrieb Greg Lindholm:
 I decided to finally ask about this problem I've been seeing for
 several years. During development I will run my Struts 2 (2.1.8)
 apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the
 current versions I'm using but this problem goes way back over many
 different versions over a couple years.

 Here's the problem, if I make any changes while the app is running
 like change a properties file of change a class, Eclipse will push
 the changes to the deploy area and Tomcat will see the change and
 attempt to reload the application (that's all good and expected).
 However the reload always fails with the exception stack below and
 I have to manually stop and restart Tomcat to get it to load
 successfully and see the updates.  I never had this problem with
 Struts 1 or even JSF, Tomcat was always able to reload the apps
 automatically.

 Anyone have any idea why the reload is failing and how to fix?

 Here is the stack dump:

 Feb 24, 2010 10:15:44 AM
 org.apache.catalina.loader.WebappClassLoader findResourceInternal
 INFO: Illegal access: this web application instance has been
 stopped already.  Could not load
 META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.


 The eventual following stack trace is caused by an error thrown for
 debugging purposes as well as to attempt to terminate the thread
 which caused the illegal access, and has no functional impact.
 2010-02-24 10:15:44,081 ERROR
 org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher
 initialization failed Unable to load configuration. - [unknown
 location] at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)


 at
 org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at
 org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 at
 org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)


 at
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)


 at
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)


 at
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)


 at
 org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
 at
 org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)


 at
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)


 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)


 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
 at java.lang.Thread.run(Thread.java:619) Caused by: Caught
 exception while loading file struts-default.xml - [unknown
 location] at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)


 at
 

Struts with JSF and Tiles error

2010-02-25 Thread Sekar, Sowmya
Hi,
I have an existing Struts 1 application with Tiles and JSP. I would like to use 
JSF 2 components instead of the JSP tags and leave the business logic and 
actions as is.
These are the steps I followed :

1.   Copied jsf-impl , jsf-api.jar and struts-faces-1.3.8.jar in my 
web-inf/lib folder of my application

2.   Configured the faces servlet in my web.xml
  servlet
  servlet-namefaces/servlet-name
  servlet-classjavax.faces.webapp.FacesServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
  load-on-startup1/load-on-startup

  /servlet


  servlet-mapping
  servlet-namefaces/servlet-name
  url-pattern/faces/*/url-pattern
  /servlet-mapping

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern/do/*/url-pattern

  /servlet-mapping



I also configured my action servlet as follows :


  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param

load-on-startup2/load-on-startup

 /servlet



I forwarded a menu option to a page through an action class using tiles. The 
target page is /faces/pages/home.jsp.

After the action is executed, it throws the following error -


WARNING: executePhase(RENDER_RESPONSE 
6,com.sun.faces.context.facescontexti...@1ebf89f) threw exception
java.lang.NullPointerException

  at 
com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:183)



FacesContext is returned as null.





Please help









Sowmya Sekar



Way to forcefully reload struts.xml [struts2]

2010-02-25 Thread Bhaarat Sharma
We are seeing a situation where certain namespaces/actions are getting error
There is no action mapped for namespace ... and action ... on the server.
  However, on our local we do not get this error. Which leads us to believe
that struts.xml might be getting lost.

Is there a way to forcefully reload the struts.xml?

I tried:

import com.opensymphony.xwork2.config.ConfigurationManager;
ConfigurationManager config = new ConfigurationManager();
config.reload();


But that gives error: Could not open files of the name xwork.xml - [unknown
location]

By the way, we've noticed that when we get There is no action mapped...
error then the action name generally has a ! in the URL because we are
directly going a specific method in the action.

I'd appreciate if someone can tell me how to forcefully reload struts.xml.
 (Besites the struts.reload property being true in struts.xml)

Thanks


Re: Struts2 and PlugIn interface

2010-02-25 Thread Maciej Radochonski
Further on the subject. For my persistence layer I use iBatis. With Struts1
I had been using plugin to load the connection object on start-up. Any
suggestion on how can I achieve similar effect with Struts2?

Thank you,
Maciej Radochonski

On Fri, Feb 19, 2010 at 3:01 PM, Maciej Radochonski
mradochon...@gmail.comwrote:

 Thanks for the answer.

 Maciej


 On Fri, Feb 19, 2010 at 2:53 PM, Lukasz Lenart 
 lukasz.len...@googlemail.com wrote:

 2010/2/19 Maciej Radochonski mradochon...@gmail.com:
  Currently I am migration one of my applications from Struts1 onto
 Struts2. I
  am using several Struts1 PlugIn's (mainly for data source configuration)
  that are loaded on start up of the app. Could someone advise me if such
 a
  functionality, or similar, is available in Struts2?

 No, use Spring, Guice or Hibernate - there are plugins to connect such
 frameworks with Struts 2


 Regards
 --
 Łukasz
 http://www.lenart.org.pl/
 Kapituła Javarsovia 2010
 http://javarsovia.pl

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Way to forcefully reload struts.xml [struts2]

2010-02-25 Thread Lukasz Lenart
2010/2/26 Bhaarat Sharma bhaara...@gmail.com:
 I'd appreciate if someone can tell me how to forcefully reload struts.xml.
  (Besites the struts.reload property being true in struts.xml)

You should get rid of it, as for production environment it isn't
desired behaviour, the same with devMode


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org