This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Problems deploying struts 2 app on weblogic 10gR3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problems deploying struts 2 app on weblogic 10gR3" Watch "Problems deploying struts 2 app on weblogic 10gR3" New topic
Author

Problems deploying struts 2 app on weblogic 10gR3

Angel Ax
Greenhorn

Joined: Jun 03, 2010
Posts: 5
Hi
I am new to weblogic & struts 2 .I am developing a new java App but facing some issues -here is the log

- Parsing configuration file [struts-default.xml]
- Parsing configuration file [struts-plugin.xml]
- Parsing configuration file [struts.xml]
- Settings: Could not parse struts.locale setting, substituting default VM local
e
- Loading global messages from resources/messages
- Setting DefaultObjectTypeDeterminer as default ...
- WebLogic server detected. Enabling Struts parameter access work-around.
- No configuration found for the specified action: 'login.action' in namespace:
'/jsp'. Form action defaulting to 'action' attribute's literal value.
- No configuration found for the specified action: 'login.action' in namespace:
'/jsp'. Form action defaulting to 'action' attribute's literal value.


I made a sample web application and tried to deploy it on tomcat it works fine there but not on weblogic as its a java project .
I think the problem is with the directory structure. It does not find the action defined an dthe properties file as well ....kindly help

here is my 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-name>Integrations</display-name>
<description>Integrations</description>


<filter>

<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<welcome-file-list>

<welcome-file>Login.jsp</welcome-file>

</welcome-file-list>



</web-app>



Struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
<constant name="struts.enable.DynamicMethodInvocation"
value="false" />
<constant name="struts.devMode" value="false" />

<package name="default" extends="struts-default" namespace="/">

<action name="login"
class="com.action.LoginAction">
<result name="success">/jsp/Welcome.jsp</result>
<result name="error">/jsp/Login.jsp</result>

</action>
</package>
</struts>

Login Action

package com.action;
import com.opensymphony.xwork2.ActionSupport;


public class LoginAction extends ActionSupport {

private String username;
private String password;

public String execute() {

if (this.username.equals("admin")
&& this.password.equals("admin123")) {
return "success";
} else {
addActionError(getText("error.login"));
return "error";
}
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}
}


Login .jsp


<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>

<title>Struts 2 - Login Application </title>
</head>

<body>
<h2>Struts 2 - Login Application</h2>
<s:actionerror />
<s:form action="login.action" method="post">

<s:textfield name="username" key="label.username" size="20" />
<s:password name="password" key="label.password" size="20" />

<s:submit method="execute" key="label.login" align="center" />
</s:form>
</body>
</html>




 
Consider Paul's rocket mass heater.
 
subject: Problems deploying struts 2 app on weblogic 10gR3
 
Similar Threads
Login page in eclipse
The requested resource () is not available
Struts can't work
Form action defaulting to 'action' attribute's literal value
"No configuration found for the specified action"