File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts in JBoss" Watch "Struts in JBoss" New topic
Author

Struts in JBoss

Jimmy Wu
Greenhorn

Joined: Feb 16, 2004
Posts: 12
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


please help me... noob in training
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Moving to the Struts forum...
Jimmy Wu
Greenhorn

Joined: Feb 16, 2004
Posts: 12
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

Joined: Feb 16, 2004
Posts: 12
no replies?
need help urgently
Jimmy Wu
Greenhorn

Joined: Feb 16, 2004
Posts: 12
anyone?
noone?
Rikard Qvarforth
Ranch Hand

Joined: Jul 10, 2001
Posts: 107
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

Joined: Feb 16, 2004
Posts: 12
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

Joined: Feb 16, 2004
Posts: 12
up
Jimmy Wu
Greenhorn

Joined: Feb 16, 2004
Posts: 12
up
Jimmy Wu
Greenhorn

Joined: Feb 16, 2004
Posts: 12
up~
Michal Bienek
Greenhorn

Joined: Jun 17, 2002
Posts: 29
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.
Srikanth Shenoy
author
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
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.


Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
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?
Fabrizio Gianneschi
Ranch Hand

Joined: Nov 29, 2001
Posts: 70
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.


Fabrizio Gianneschi<br />SCPJ2, SCWCD, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts in JBoss