• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Problems deploying struts 2 app on weblogic 10gR3

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>




 
This will take every ounce of my mental strength! All for a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!