Win a copy of Functional Design and Architecture this week in the Functional programming forum!

Michael Keisu

Ranch Hand
+ Follow
since Oct 08, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Keisu

Thanks. Although I think i'll try something else with SQLite after all. HSQLDB is making nuts, complaining about user privledges, and then I can't find anything in the documentation that helps much.
I came across an exception, which said the following: java.sql.SQLException: NYI
when I tried to implement PreparedStatement stmt = conn.prepareStatement(sql, ResultSet.CONCUR_UPDATABLE);

After some googling, it turns out this feature isn't supported. Not Yet Implemented.

I think ResultSet's "concur updatable" is a really neat feature, and although I'm sure I can think of a workaround, I wonder if anyone has suggestions for better serverless databases?
Preferably something that would be painless to implement in SQLite's stead.

thanks, I shall explore it and see how things work out
got it working somewhat

however this is very much like DOM in JS, is there some library to ease development? It seems like a lot of work for so little
How do I achieve that?
From what I have turned up googling, I'm guessing it's something along the lines of:

but nothing I have tried works to actually parse a XML document on the web

Oops, sorry about the confusing variable names. Edited them
thanks, I'll check them out
9 years ago

I'm looking to learn PHP. However, I'd like to learn from a book that doesn't assume one is completely new to programming,
the HTTP protocol, etc..

is there such a book?

9 years ago

Mark Spritzler wrote:Glad you got it resolved. Funny I have this in my xml file, put there by Spring ROO, but I don't use it because I don't have a /resources/** directory

<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources -->
<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>

Maybe the "/" in location is what gets it to work.


Yes, the "/" should be enough, although I used <mvc:resources mapping="/**" location="/*" /> to get all my resources(css, js, other stuff) to work(not sure if it makes any difference). By doing that I wasn't required to use
any further trickery, just importing css, js as I normally would in a regular HTML page.
9 years ago
I put this in my spring-servlet.xml:
<mvc:resources mapping="/css/**" location="/css/*" />

and this in my jsp:
<link href="<c:url value="/css/main.css"/>" rel="stylesheet" type="text/css" />

that got it working, although I suspect it was just mvc:resources mapping that did it.

Anyway, thanks everyone.
9 years ago

Mark Spritzler wrote:What did you change it too?

I would assume

<link href="${pageContext.request.contextPath}/css/main.css" rel="StyleSheet" />


Yes, also tried with type of text/css at the end
9 years ago

Mark Spritzler wrote:Yep, it isn't a Spring issue. It is a Web context location issue.

I bring in my css files like

<link href="${pageContext.request.contextPath}/styles/themes/default.css" rel="stylesheet">

This is putting it at the root of the war file, then going into the /styles…. directory to find the css.


It does what you say. Only, it doesn't seem to solve the issue I have only used Spring for about a week, but I didn't try any css until now. (in any Spring projects I mean, I have known css some time)

"Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/blog/css/main.css"."
9 years ago
In my Spring MVC application, I have trouble loading .css resources.

In my Google Chrome console when I load the page in question:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/blog/css/main.css".

which is odd because this is what my link tag looks like:

and my folder structure looks like this
etc, etc.

You'd think it had nothing to do with Spring(and it might not), but I have almost identical code in normal servlet projects which run smoothly.

Any ideas?
9 years ago
Thanks, I will look into them.
9 years ago
I have had some problems when I have tried to export my game projects as a runnable .jar file in Eclipse, images and and none source files don't get included in the jar, so I had to place them outside (on the same level as the jar) to get it to work properly.
How do I fix this problem?

9 years ago

Bear Bibeault wrote:

Graeme Byers wrote:You will need some knowledge of servlets and JSP but don't get too involved - the skills in demand are Spring and Hibernate.

I do not think that this is particularly good advice. Firstly, Hibernate and JSP/Servlets have no intersection. The fact that Hibernate skills are in demand has nothing at all to do with JSP and Servlets. Secondly, by "Spring" I assume what was meant was the SpringMVC web application framework. A sound knowledge of JSP and Servlets is necessary for using SpringMVC (and indeed, any other web application framework) to its best advantage.

So my advice would be to continue to learn JSP and Servlets quite well. This knowledge will serve you well no matter what other frameworks you may decide to use at some point in the future.

Yes, I did get the impression Servlets and JSP was a prerequisite for some web application frameworks. Anyway, my class has yet to start with Servlets,JSP and web applicaiton frameworks, I'm studying it at home since my education is a pretty short one (only 2 years), and I yet question if they can teach me everything I need to know(though JSP & Servlets, SpringMVC and/or Struts is planned), especially since Java Basics and OOP was crammed into it for the first few months. Almost everyone gets work after finishing it, so they must be doing something right but it never hurts to study more in depth..

Anyway, I'll be attending a developer conference JFokus(Primarily Java), one of the talks will be comparison of web frameworks, I hope to learn more there.
9 years ago