views:

51

answers:

2

I'm trying to use Struts 2 framework for my Google App Engine project. I have configured the struts framework properly and I have created an action in struts-config.xml file as:

<package name="myproj" namespace="/myproj" extends="struts-default">
  <action name="login">
  <result>/login.jsp</result>
</action>

And I'm trying to access the above action through: http://localhost:8080/myproj/login.action. But I'm not getting my login.jsp page as expected. Instead I'm getting the following error.

HTTP ERROR 500

Problem accessing /myproj/login.action. Reason:

    java.lang.NoClassDefFoundError: javax.swing.tree.TreeNode is a restricted class. Please see the Google  App Engine developer's guide for more details.
Caused by:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax.swing.tree.TreeNode is a restricted class. Please see the Google  App Engine developer's guide for more details.
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
    at org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:64)
    at org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:745)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:743)
    at org.apache.jsp.getin_jsp._jspService(getin_jsp.java:102)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23)
    at com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

Is there something that I need to configure to fix the above error and make Struts 2 framework work on Google App Engine?

+1  A: 

I found this issue at Appengine Groups: http://groups.google.com/group/google-appengine-java/browse_thread/thread/dd84e44f604498c4

And of course you have to follow links from Will it play on GAE

splix
+1  A: 

You can follow my blog tutorial http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-on-google-app-engine-gae/ it contains all the information you need.

Shekhar