Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Struts in JBoss

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
i'm new here from Singapore.... i'm currently doing a project on JBoss and struts... Can i know how am i going to intergrate struts into JBoss?
i'm a noobie in training here... please forgive me should i made some mistakes
regards
Jimmy
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Struts forum...
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Mathews:
Moving to the Struts forum...


sorry abt that...
i really hope someone can help me out...

regards
Jimmy
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no replies?
need help urgently
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone?
noone?
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dont now if i understand your question ? but if you want to use struts in your webb-app, just add the struts.jar files in your war lib directory and sett upp the struts front controller servlet listing in the web.xml file. read this http://jakarta.apache.org/struts/userGuide/
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
i got this error when i tried to run my upload.jsp on my JBoss 3.2.3:
Generated servlet error:
[javac] Compiling 1 source file
[javac] C:\jboss\server\default\work\MainEngine\localhost\coleman\upload_jsp.java:9: package org.apache.struts.webapp.upload does not exist
[javac] import org.apache.struts.webapp.upload.UploadForm;
[javac] ^
[javac] C:\jboss\server\default\work\MainEngine\localhost\coleman\upload_jsp.java:100: cannot resolve symbol
[javac] symbol : variable UploadForm
[javac] location: class org.apache.jsp.upload_jsp
[javac] Iterator iterator = errors.get(UploadForm.ERROR_PROPERTY_MAX_LENGTH_EXCEEDED);
[javac] ^
[javac] Note: C:\jboss\server\default\work\MainEngine\localhost\coleman\upload_jsp.java uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 2 errors
i have put my .jar files in my WEB-INF/lib and my struts.*.tld files into WEB-INF folder
here's my web.xml:
---

<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>org.apache.struts.webapp.upload.UploadResources</param-value>
</init-param>
<load-on-startup>1</load-on-startup>

---
and my struts-config.xml:
---
<struts-config>
<form-beans>
<form-bean name="uploadForm"
type="org.apache.struts.webapp.upload.UploadForm"/>
</form-beans>
<action-mappings>
<!-- Upload Action -->

</action-mappings>
---
can anyone help me out with the problem?
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
up
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
up
 
Jimmy Wu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
up~
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are not really integrating with JBOSS, you would be deploying your Struts web application on Jetty (which sits in JBOSS). So you would need to create a .war file containing all your JSPs, with a WEB-INF directory containing a lib directory, which must contain all your struts libraries. That's what seems to be missing from the error you are getting.
 
author
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jimmy,
Your JSP does not have the import statement for Iterator.
That's why the Upload jsp is failing.
There is no dependency on JBoss whatsoever.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you figured out your issue?
If not why don't you paste your code for your upload.jsp page so we can take a look at it?
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We used Struts and JBoss in an application we developed two years ago.
They integrated very well, because Struts appears to JBoss just another one web application.
We were used to call our EJBs from Struts Action classes, using two separate VMs (the first one running Tomcat and the other one running JBoss).
There's nothing too complex on it... keep trying.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic