I´m trying to get a simple Tapestry sample working, but I´m getting stuck at the very beginning.
I want to declare my first tml page, which I have from the official tapestry site (not yet allowed to post links).
<html t:type="layout" t:id="index" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tapestry.apache.org/schema/tapestry_5_3.xsd ">
<h1>Welcome to the Nifty Web Application!</h1>
<p>
Would you like to
<t:pagelink page="login">Log In</t:pagelink>
?
</p>
</html>
It says "cannot resolve symbol layout" and "cannot resolve symbol login" and I also tried commonLayout which can´t be found too, but there are many other types showing up in the auto completion, which means that in general there is everything okay with the library stuff.
I´ve added every dependency from the sample.
Is layout kind of deprecated or am I missing something?
You are more likely to get help on the Tapestry mailing list.
And you are more likely to get help by reporting the exact error that Tapestry produces. Trust me, a lot of work has gone into making that information valuable, please include it. For example, I can pretty much guarantee that the errors you cite are not the actual error messages Tapestry produced.
That being said, Tapestry does not include a Layout component, since it is one of the most application specific parts of any application. It is something you build yourself. There are tutorials, or the Tapestry Maven archetype includes a basic one.
Likewise, there is no built-in Login page. That's a pretty standard thing you build in yourself as well.
Tapestry is infrastructure, not magic.
Related
I have been reading this tutorial about html imports. However I became more confused after it. I'm coming from an Angular 1 & 2 background with some React recently. I have been progressing trough all the stages of javascript evolution. Using scripts in the header than require.js than system.js and now I've been doing just fine with webpack.
Reading about these imports it becomes a bit fuzzy. I don't have a clear image when to or not to use them. If webpack is used, do I still need html imports (probably for 3rd party stuff)? Certainly I love typescript and I definitely don't want to build the js artefacts myself using the command line like in the early days. I feel webpack is a must-have.
I know this question can be viewed as vague and closed, but I'm really stuck. Right now resources on web components are few and I can't manage to find my way towards a clear and confident answer.
P.S I want to use vanila components, not polymer stuff.
Some of the major browsers(i.e. Firefox) are not planning to ship HTML imports, ever.
Quoting from https://hacks.mozilla.org/2014/12/mozilla-and-web-components/
Mozilla will not ship an implementation of HTML Imports. We expect that once JavaScript modules — a feature derived from JavaScript libraries written by the developer community — is shipped, the way we look at this problem will have changed.
It will still be good to learn about the standard though, because of its unique feature of HTML parsing, which won't be possible with any representation of HTML in JS modules(which are being pioneered as replacement for HTML imports)
But for now, it seems like HTML imports are not getting anywhere, until something comes out of HTML Modules proposal, which plans to rebuild HTML Imports functionality using the ES Modules.
I am a developer with .NET experience but I am now dealing with a J2EE application (with JSP and EJP projects ) which I am trying -without much luck so far- to make it work.
I am now getting the error
Error(22,17): identifier OracleJspRuntime not found
when I try to build it.
googling the error message I found that I may need to add JSP Runtime to my project libraries ,but which libraries exactly that I need to add ?
Given the fact that I am completely new to the J2EE world, what am I missing here?,what are this error message trying to say ?
I found the hack to it ,just added reference to JSP Runtime under Extension tab in add library dialog box (I am using JDeveloper10G)
I'm working with a team of devs using Netbeans, but unfortunately the code they're working on has been stuck using ancient tech for far too long now. In some recent research, I discovered Java's "Expression Language" and I've been converting one of our webapps to use this for building stylesheet and script file URL links rather than the current "relative path" idea.
For example, we have one or two .jsp files in the webapp root, and others in a subfolder, all of which are now using:
<link href="${pageContext.servletContext.contextPath}/assets/css/stylesheet.css" rel="stylesheet" type="text/css"/>
<script src="${pageContext.servletContext.contextPath}/assets/js/script.js" type="text/JavaScript"></script>
Netbeans 8.0.1 doesn't seem to pick up classes from the stylesheet; so even though it runs correctly in a browser, my test project is now riddled with "class not found" warning messages.
So my main question (using Java 6 or 7): is this a good way to do it or should I look for other options? Otherwise, is this simply an IDE bug that's got me worried for no reason..?
For the sake of clarity, I'm only just starting to drag them out of the Java 6 world.. I'm honestly not sure why, but until recently they've been against the idea of relying on application frameworks and libraries, opting to write everything themselves from scratch; so this is an attempt to "fix" a few glaring issues is our current apps to give us a chance to rewrite them using more modern technologies.
After checking the link provided by BalusC in the question comments, some other reading online, and opening my test project in IntelliJ IDEA 15 (which detects the CSS classes correctly); I'm quite satisfied that there are no funny issues with using ${pageContext.servletContext.contextPath} to prefix all my URL attributes.
I cannot make use of the HTML <base> tag since we need to maintain support for IE8 as well.
#BalusC, thanks for the link, that helps clear up a couple minor questions that I had. :)
Attempting to create a selection of webpages that take some information, and then display it on a later page, Works up to the retrieving and displaying stage, where I get the following error,
The value for the useBean class attribute user.UserData is invalid
I am using the following tutorial: http://www.jsptut.com/Forms.jsp
I know there is probably 40 billion different questions aanswering this, but I literally picked up JSP at 9.13am this morning. So I need a tailormade answer!
I'm using Eclipse IDE and Tomcat 6.0.33
Thanks
P.S. Some google research keeps mentioning compile.class. Some mention they compiled the bean, but it thought JavaScript was a script meaning it didn't need to be compiled?
Rev: Right, so apparently, i need to compile the bean and then use JSP to execute it? Can anybody advise me on how to compile my Bean?
http://download.oracle.com/javase/tutorial/ is a good place to start. You might want to jump into http://download.oracle.com/javase/tutorial/getStarted/cupojava/win32.html. It's a step-by-step on how to write, compile and run using command-line tools and then work your way down the tutorial list.
When you're a little familiar with that, you can set yourself up with a good development environment, like netbeans or eclipse
Related question I am having similar problems to what that guy had in his. My upload server returns a redirect.
Specifically, I am not sure what FormPanel.SubmitCompleteEvent.getResults() returns. Sometimes, I get html of an img:
<img style="cursor: -moz-zoom-in;"
alt="http://<myapp>.appspot.com/servePic?blob-key=abcdef"
src="http://<myapp>.appspot.com/servePic?blob-abcdef"
height="1" width="1">
Sometimes I get the image data in bytes. Behavior varies on I dunno what. I get the first in development, and the second in production.
Does anyone know anything about this?
Here's a pretty good example of how to save/load/resize images with gwt & app engine.
http://code.google.com/p/swagswap/source/browse/#svn/trunk/src/main/java/com/swagswap/dao%3Fstate%3Dclosed
Have a look in the dao implemenations and also the gwt interface packages.
Does the project in this link still exists?
http://code.google.com/p/swagswap/source/browse/#svn/trunk/src/main/java/com/swagswap/dao%3Fstate%3Dclosed
I tried to checked it out through eclipse but looks like it does not exist anymore.