Re: [OT] Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-12 Thread Manickam-Periaswamy . Vignesh
Sorry, still I did not understand it quite well.

But my non-struts web project is working fine along with Eclipse WTP. So 
that means the deployment is proper right? I understand that I sound dumb 
here.

But why I get this problem when I include struts? which works fine when I 
deploy it separately in Tomcat.

Vignesh Manickam Periaswamy
Web Application Developer Intern, Information Management Section
WPTD,   EPA Region 5 312-886-0887




Dave Newton [EMAIL PROTECTED] 
04/11/2007 04:51 PM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]



To
Struts Users Mailing List [EMAIL PROTECTED]
cc





Subject
[OT] Re: Eclipse WTP / Struts 2 - Not working!!



--- [EMAIL PROTECTED] wrote:
 Sorry, I do not understand what you mean by
 publishing project.

Did you add a project deployment for the Struts app
and deploy it? In other words, did you configur things
such that Eclipse/WTP knows things about your app,
where you're deploying it to etc.?

d.



 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Eclipse WTP / Struts 2 - Not working!!

2007-04-11 Thread Manickam-Periaswamy . Vignesh
Hi all

This problem has been driving me crazy and I know that it should be a 
simple problem. I have already posted this in this mailing list, but a 
simply configuration issue is stopping my development work!! Please help.

There is a reason why I post this in the struts mailing list because a 
non-struts web application works fine with Eclipse WTP.

I have written the simplest struts-enabled HelloWorld application. It 
works fine if I deploy it directly to the Tomcat server. But I get a 404 
error while configuring it with Eclipse WTP.

Below is my configuration:
Java - 1.4.2_13
Tomcat 5.5.23 with Java 1.4 compatible jars
Struts 2.0.6 with Java 1.4 compatible jars
Eclipse WTP 3.2.2

I created a new dynamic web project with Tomcat 5.5 as runtime, test 
as context root and WebContent as Content Directory. I copied the 
struts jars to the WebContent/WEB-INF/lib folder. The jsp files are 
placed in WebContent/WEB-INF/jsp folder.

The following is my folder structure:
+ WebContent
- + WEB-INF
   - + classes
  - struts.xml
   - + jsp
   - + lib
   - + src
   - web.xml

Following are my codes:

web.xml

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_9 version=2.4 
xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

display-nametest/display-name
 
filter
filter-namestruts2/filter-name
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/
filter-class
/filter
 
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping
 
/web-app

struts.xml

!DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.0//EN
http://struts.apache.org/dtds/struts-2.0.dtd;

struts
!-- Configuration for the default package. --
package name=default extends=struts-default
action name=HelloWorld class=gov.epa.r5sis.HelloWorld

result/WEB-INF/jsp/HelloWorld.jsp/result
/action
 
/package
/struts

HelloWorld.java

package gov.epa.r5sis;
import com.opensymphony.xwork2.ActionSupport;
public class HelloWorld extends ActionSupport {

private static final long serialVersionUID = 1L;
public static final String MESSAGE = Hello World! Struts is up 
and running ...;

public String execute() throws Exception {
setMessage(MESSAGE);
return SUCCESS;
}

private String message;

public void setMessage(String message){
this.message = message;
}

public String getMessage() {
return message;
}
}

HelloWorld.jsp

%@ page contentType=text/html; charset=iso-8859-1 language=java 
import=java.sql.* errorPage= %
%@ taglib prefix=s uri=/struts-tags %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
 titleHello World!/title
/head

body
h2s:property value=message //h2

/body
/html

When I run the application by using run on server option, the tomcat 
server starts without a problem and opens the url http://localhost
:8080/test/ in the browser. http://localhost
:8080/test/HelloWorld.action gives a 404 error. But the same application 
deployed directly in Tomcat, works fine!!

Please help.

Thanks
Vignesh Manickam Periaswamy
Web Application Developer Intern, Information Management Section
WPTD,   EPA Region 5 312-886-0887
email: [EMAIL PROTECTED]



Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-11 Thread Manickam-Periaswamy . Vignesh
Sorry, I do not understand what you mean by publishing project.

Vignesh Manickam Periaswamy
Web Application Developer Intern, Information Management Section
WPTD,   EPA Region 5 312-886-0887
email: [EMAIL PROTECTED]





Adam Ruggles [EMAIL PROTECTED] 
04/11/2007 04:35 PM
Please respond to
Struts Users Mailing List user@struts.apache.org



To
Struts Users Mailing List user@struts.apache.org
cc





Subject
Re: Eclipse WTP / Struts 2 - Not working!!



Did you publish your project before starting tomcat through eclipse?

[EMAIL PROTECTED] wrote:
 Hi all

 This problem has been driving me crazy and I know that it should be a 
 simple problem. I have already posted this in this mailing list, but a 
 simply configuration issue is stopping my development work!! Please 
help.

 There is a reason why I post this in the struts mailing list because a 
 non-struts web application works fine with Eclipse WTP.

 I have written the simplest struts-enabled HelloWorld application. It 
 works fine if I deploy it directly to the Tomcat server. But I get a 404 

 error while configuring it with Eclipse WTP.

 Below is my configuration:
 Java - 1.4.2_13
 Tomcat 5.5.23 with Java 1.4 compatible jars
 Struts 2.0.6 with Java 1.4 compatible jars
 Eclipse WTP 3.2.2

 I created a new dynamic web project with Tomcat 5.5 as runtime, test 

 as context root and WebContent as Content Directory. I copied the 
 struts jars to the WebContent/WEB-INF/lib folder. The jsp files are 
 placed in WebContent/WEB-INF/jsp folder.

 The following is my folder structure:
 + WebContent
 - + WEB-INF
- + classes
   - struts.xml
- + jsp
- + lib
- + src
- web.xml

 Following are my codes:

 web.xml

 ?xml version=1.0 encoding=UTF-8?
 web-app id=WebApp_9 version=2.4 
 xmlns=http://java.sun.com/xml/ns/j2ee; 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

 display-nametest/display-name
 
 filter
 filter-namestruts2/filter-name
 filter-classorg.apache.struts2.dispatcher.FilterDispatcher/
 filter-class
 /filter
 
 filter-mapping
 filter-namestruts2/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 
 /web-app

 struts.xml

 !DOCTYPE struts PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
 http://struts.apache.org/dtds/struts-2.0.dtd;

 struts
 !-- Configuration for the default package. --
 package name=default extends=struts-default
 action name=HelloWorld 
class=gov.epa.r5sis.HelloWorld
 
 result/WEB-INF/jsp/HelloWorld.jsp/result
 /action
 
 /package
 /struts

 HelloWorld.java

 package gov.epa.r5sis;
 import com.opensymphony.xwork2.ActionSupport;
 public class HelloWorld extends ActionSupport {

 private static final long serialVersionUID = 1L;
 public static final String MESSAGE = Hello World! Struts is up 
 and running ...;

 public String execute() throws Exception {
 setMessage(MESSAGE);
 return SUCCESS;
 }

 private String message;

 public void setMessage(String message){
 this.message = message;
 }

 public String getMessage() {
 return message;
 }
 }

 HelloWorld.jsp

 %@ page contentType=text/html; charset=iso-8859-1 language=java 
 import=java.sql.* errorPage= %
 %@ taglib prefix=s uri=/struts-tags %

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 
/
  titleHello World!/title
 /head

 body
 h2s:property value=message //h2

 /body
 /html

 When I run the application by using run on server option, the tomcat 
 server starts without a problem and opens the url http://localhost
 :8080/test/ in the browser. http://localhost
 :8080/test/HelloWorld.action gives a 404 error. But the same 
application 
 deployed directly in Tomcat, works fine!!

 Please help.

 Thanks
 Vignesh Manickam Periaswamy
 Web Application Developer Intern, Information Management Section
 WPTD,   EPA Region 5 312-886-0887
 email: [EMAIL PROTECTED]


 




Simple Login demo issue

2007-04-09 Thread Manickam-Periaswamy . Vignesh
Hi all

I am trying to run the Simple Login demo for Struts 2. 
http://struts.apache.org/2.x/docs/simplelogin-with-session.html

I am using struts 2.0.6 with tomcat 5.5.23. r5sis is context root and 
WebContent is Content Directory. I copied the struts jars to the 
WebContent/WEB-INF/lib folder. The jsp files are placed in 
WebContent/WEB-INF/jsp folder.

When I run http://localhost:8080/r5sis/; it gives a 404 error. I think 
there is a problem in configuring the following files.

Following is my folder structure
+ WebContent
- + WEB-INF
   - + classes
  - struts.xml
   - + jsp
   - + lib
   - + src
   - web.xml
- index.jsp

Following are the source code.

web.xml

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4 xmlns=
http://java.sun.com/xml/ns/j2ee; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-namer5test/display-name
filter
filter-namestruts/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter
filter-mapping
filter-namestruts/filter-name
url-pattern/*/url-pattern
/filter-mapping
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list
/web-app

struts.xml

?xml version=1.0 encoding=UTF-8?
struts
!-- Include Struts 2 default (from Struts 2 JAR). --
include file=struts-default.xml/

!-- Configuration for the default package. --
package name=default extends=struts-default

!-- Default interceptor stack. --
action name=login class=
gov.epa.r5sis.struts.action.LoginAction 
result name=success type=dispatcher
/WEB-INF/jsp/welcome.jsp/result
result name=error type=redirect/WEB-INF/jsp/login.jsp/
result
/action

action name=logout2 class=
gov.epa.r5sis.struts.action.LoginAction method=logout 
result name=success type=redirect/WEB-INF/jsp/login.jsp
/result
/action

action name=logout class=
gov.epa.r5sis.struts.action.LogoutAction 
result name=success type=redirect/WEB-INF/jsp/login.jsp
/result
/action

/package
/struts

index.jsp

%@ page language=java contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1%
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titleInsert title here/title
/head
body
% response.sendRedirect(login.action); %
/body
/html

The rest of the code is as same as the sample code given in the demo.

Please help me.

Vignesh 



Eclipse WTP/Tomcat/Struts 2 - 404 error

2007-04-06 Thread Manickam-Periaswamy . Vignesh
Hi all

This might sound off topic, but I had already posted this in Eclipse WTP 
newsgroup, but couldn't resolve it yet. So I thought someone here might 
have already faced this problem.

I configured Eclipse WTP for a struts-enabled web application. When I ran 
my application using run on server option, it gives a 404 error.

Below is my configuration:
Java - 1.4.2_13
Tomcat 5.5.23 with Java 1.4 compatible jars
Struts 2.0.6 with Java 1.4 compatible jars
Eclipse WTP 3.2.2

I created a new dynamic web project with Tomcat 5.5 as runtime, r5sis 
as context root and WebContent as Content Directory. I copied the 
struts jars to the WebContent/WEB-INF/lib folder. The jsp files are 
placed in WebContent/WEB-INF/jsp folder.

Find below my struts.xml and web.xml

?xml version=1.0 encoding=UTF-8?
struts
   !-- Include Struts 2 default (from Struts 2 JAR). --
   include file=struts-default.xml/

   !-- Configuration for the default package. --
   package name=default extends=struts-default

   !-- Default interceptor stack. --
   action name=login 
class=gov.epa.r5sis.struts.action.LoginAction 
  result name=success 
type=dispatcher/WEB-INF/jsp/welcome.jsp/result
  result name=error 
type=redirect/WEB-INF/jsp/login.jsp/result
  /action

  action name=logout2 
class=gov.epa.r5sis.struts.action.LoginAction method=logout 
  result name=success 
type=redirect/WEB-INF/jsp/login.jsp/result
  /action

  action name=logout 
class=gov.epa.r5sis.struts.action.LogoutAction 
  result name=success 
type=redirect/WEB-INF/jsp/login.jsp/result
  /action

   /package
/struts


?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4 xmlns=
http://java.sun.com/xml/ns/j2ee; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
   display-namer5test/display-name
   filter
   filter-namestruts/filter-name
   
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
   /filter
   filter-mapping
   filter-namestruts/filter-name
   url-pattern/*/url-pattern
   /filter-mapping
   welcome-file-list
   welcome-filejsp/login.jsp/welcome-file
   welcome-fileindex.html/welcome-file
   welcome-fileindex.htm/welcome-file
   welcome-filedefault.html/welcome-file
   welcome-filedefault.htm/welcome-file
   welcome-filedefault.jsp/welcome-file
   /welcome-file-list
/web-app


When I run the application by using run on server option, the tomcat 
server starts without a problem and opens the url http://localhost
:8080/r5sis/ in the browser.

It gives a 404 error, saying The requested resource (/r5sis/) is not 
available. r5sis is my project name. Also the project is placed only in 
the eclipse workspace and not in the tomcat dir/webapps folder. Even 
localhost:8080/index.jsp gives a 404 error. 

When I tried running Tomcat from the command prompt, it runs properly and 
localhost:8080/index.jsp works fine.So the Tomcat is not working fine 
inside Eclipse WTP. Please let me know what went wrong.

A member in eclipse mailing list suggest to place the welcome file in the 
WebContent folder and try. So I just created a index.htm file with 
just Hello world!, in the WebContent folder and modified the web.xml 
as:

welcome-file-list
welcome-fileindex.htm/welcome-file
/welcome-file-list

But still it is not working, please help!

Thanks
Vignesh


Vignesh Manickam Periaswamy
Web Application Developer Intern, Information Management Section
WPTD,   EPA Region 5 312-886-0887
email: [EMAIL PROTECTED]



IDE for struts-enabled web application

2007-03-30 Thread Manickam-Periaswamy . Vignesh
Hi all

I am new to J2EE development and I am developing a web application using 
the following configuration. 

Web server - IIS
Servlet engine - ServletExec 5.0 
MVC framework - Struts 2.0.6
Java - 1.4.2_13

I am not using Tomcat because ServletExec is already available in my 
company and I am supposed to use that. I am using struts 2.0.6 because it 
is compatible ServletExec 5.0 and not with struts 1.3.5. I am using Java 
1.4.2 because it is used for all other application in my company and so I 
am using the alternative Java 4 compatible JARs of struts 2.0.6.

Now I am looking for IDE that would make my work easier. I tried Lomboz 
but had few problems in setting it up and its free user forum is very 
inactive, so couldn't get any help. So I have decided to quit using it and 
look for other alternative. Please let me know of any Eclipse plugin and 
any detailed tutorial to set up the web application of the configuration I 
mentioned above.

I suppose Eclipse does not support the run-time which I am using 
(ServletExec). Is there a way setting up a generic runtime, rather than 
those predefined ones in Eclipse? Or currently runtime's integration with 
the IDE is not really important to me, as I can test the application in 
the browser. 

I don't want to use MyEclipse too as my company won't be paying for it.

Please suggest me a free IDE (mostly Eclipse plugin), for developing 
struts-enabled web application. (if possible supporting my run-time too)

I would highly appreciate your help.

Vignesh Manickam Periaswamy
Web Application Developer Intern, Information Management Section
WPTD,   EPA Region 5 312-886-0887
email: [EMAIL PROTECTED]



Struts configuration error

2007-03-06 Thread Manickam-Periaswamy . Vignesh
Hi all

I am configuring a struts enabled web application using ColdFusion MX. 
Please do not ignore this thread as it is ColdFusion, because I feel the 
issue I have is a generic one and could happen in any J2EE servers. I have 
already posted this in ColdFusion forum but I feel the issue has got to do 
with struts. Also please do not suggest alternatives for ColdFusion, 
because that is the only application server we have and I wanted to use 
Struts. I followed this article about Struts on ColdFusion (
http://www.macromedia.com/devnet/mx/coldfusion/articles/struts.html). 

After following all the configuration steps and I tried 
http://localhost:8500/do/welcome, I get 503 null error. But the CF 
application server is running fine and it displays other pure ColdFusion 
pages.

I am new to struts and I feel that there is a problem in loading the 
ActionServlet. Following the error and configuration information, if you 
need more information please let me know. I would highly appreciate your 
help.

These are the error messages I found in the coldfusion log file:

03/06 12:13:48 error Could not pre-load servlet: action
javax.servlet.UnavailableException
at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:399)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1243)
at 
jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:790)
at 
jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:297)
at 
jrun.ea.EnterpriseApplication.start(EnterpriseApplication.java:203)
at 
jrun.deployment.DeployerService.initModules(DeployerService.java:710)
at 
jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
at 
jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at 
jrun.deployment.DeployerService.handleEvent(DeployerService.java:381)
at 
jrunx.kernel.JRunServiceDeployer.fireEvent(JRunServiceDeployer.java:710)
at 
jrunx.kernel.JRunServiceDeployer.deployServices(JRunServiceDeployer.java:111)
at 
jrunx.kernel.DeploymentService.loadServices(DeploymentService.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at jrunx.kernel.JRun.startServer(JRun.java:575)
at jrunx.kernel.JRun.init(JRun.java:493)
at jrunx.kernel.JRun$1.run(JRun.java:346)
at java.security.AccessController.doPrivileged(Native Method)
at jrunx.kernel.JRun.start(JRun.java:343)
at jrunx.kernel.JRun.startByNTService(JRun.java:427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jrunx.kernel.JRun.invoke(JRun.java:180)
at jrunx.kernel.JRun.main(JRun.java:168)

03/06 12:14:34 error 
javax.servlet.UnavailableException
at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:399)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1243)
at 
jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java:748)
at 
jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java:98)
at 
jrun.servlet.WebApplicationService.getDispatcher(WebApplicationService.java:866)
at 
jrun.servlet.ServletEngineService$1.fetch(ServletEngineService.java:511)
at jrunx.util.Cache.get(Cache.java:116)
at 
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:523)
at 
jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at 
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
at 
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

This is action-mapping excerpt of struts-config.xml:

action-mappings
action path=/loginUser
type=com.macromedia.article.actions.LoginUserAction
name=LoginForm
forward name=success path=/cfm/welcome.cfm/
forward name=failure path=/cfm/login.cfm/
/action
action path=/logoutUser