[Logo] Mentawai Forum - Mentawai Web Framework
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 

Forum Read-Only! Check the new site and forum here!

Messages posted by: Kaitsu  XML
Profile for Kaitsu -> Messages posted by Kaitsu [9]
Author Message
It went fine. Only jta-1.0.1B.jar didn't download, but maven gave clear instructions how to install it. Thanks!
Ok,

thanks for the fix, quick response and detailed instructions. I'll get maven and do the things in near future, and let You know how it went.

All the best,

Kaitsu

Hi,

either of the above links doesn't seem to respond...? I have SVN. It would be nice to have the reference app in zip or war format still. Anyway, congrats for the best Java MVC framework in the hww (hole wide world)

Kaitsu
Hi,

I moved my app from win XP to win Vista and I have this kind of problem with MySQL: the app works fine, but when left alone for while (few minutes without clicking links) it won't respond to requests anymore, and MySQL cannot be shutdown in windows service, somehow it gets stuck. I tried to search the web but found nothing. I tried to switch C3p0ConnectionHandler to DBCP, but no effect. MySQL processlist shows few processes in state sleep. Any ideas?

Best regards,

Kaitsu
Hi,

I'm using mysql decimal type for a "price" field in my app, and java BigDecimal for that price in java. I didn't find any matching org.mentawai.bean.type.BigDecimalType, so I wrote it myself in the same manner the other DBTypes are written. Is it possible to have this solution in mentawai.jar near future or do you have some other ideas?

Best regards,

Kaitsu

Code:
 
 package org.mentawai.bean.type;
 
 import java.math.BigDecimal;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.mentawai.bean.DBType;
 
 public class BigDecimalType implements DBType {
 	
 	public String toString() {
 		
 		return this.getClass().getSimpleName();
 	}
 	
 	public Object getFromResultSet(ResultSet rset, int index) throws SQLException {
 
         return rset.getBigDecimal(index);
 	}
 	
 	public Object getFromResultSet(ResultSet rset, String field) throws SQLException {
 		
 		return rset.getBigDecimal(field);
 	}
 	
 	
 	public Class<? extends Object> getTypeClass() {
 		
 		return BigDecimal.class;
 	}
 	
 	public void bindToStmt(PreparedStatement stmt, int index, Object value) throws SQLException {
 		
 		if (value == null) {
 			
 			stmt.setNull(index, java.sql.Types.DECIMAL);
 			
 		} else if (value instanceof BigDecimal) {
 			
 			BigDecimal d = (BigDecimal) value;
 		
 			stmt.setBigDecimal(index, d);
 			
 		} else {
 			
 			throw new IllegalArgumentException("value is not a bigdecimal!");
 		}
 		
 	}
 }
 


Code:
 
 // in DBTypes.java
 
 public static BigDecimalType BIGDECIMAL = new BigDecimalType();
 
Thank you.

I really want to, and at this point in my app I also need to. I like coding in the simple way, where you put objects into request and use request in JSP pages. To me it's the most intuitive way when JSP pages contain only Java and html (and some mtw:tags). I can abstract all the unnecessary logic out from JSP pages and the pages are easy to read.



Peace!

I've been using HttpServletRequest in my actions this way:

- by adding "protected HttpServletRequest req" to BaseAction as a member field

- modifying setInput() method in BaseAction:

Code:
 
     public void setInput(Input input) {
         if(input instanceof RequestInput) {
             req = ((RequestInput)input).getRequest();
         }
         this.input = input;
     }
 


- compiling sources to menta.jar


It works fine but now I have modified the sources and have licence problems if I want to do something commercial. So...

Is there any way that the future mentawai.jar includes some kind of getHttpServletRequest() method?

All the best,

Kaitsu

How can I get access to HttpServletRequest in MyAction extends BaseAction? It seems that Input interface doesn't have getRequest() method and (RequestInput)input produces a ClassCastException, because input is a type of AutoWiringFilter, not RequestInput.
Absolutely amazing work! Finally a Java Web Framework, which is a joy to learn, because it is simple! I've been laughing to "Rube Goldberg Machine" and other comments about JavaEE / EJB / RocketScience! So true, keep it simple. This is it, finally the search for framework is over. I just happened to click a link to mentawai.org when reading a 'spring sucks' article. It was a good click.
 
Profile for Kaitsu -> Messages posted by Kaitsu [9]
Go to:   
Powered by JForum 2.1.6 © JForum Team