Error while importing in jsp page - java

i want to perform some test by using Json . I am using google app engine for development . I want to know how to import json lib and how i can import in jsp page .
The work i have done so far can be seen in picture
i am not sure that i have added jar file correctly or not it is marked with red .
Thanks

Oh right Gson is the Google JSON library - you'll need to import it in your JSP. Make sure it's on the Build Path for your project for example
<%# page import="com.google.gson.Gson" %>

You need to import them on jsp as well, the same way you have imported List
See Also
why-business-logic-should-be-moved-out-of-jsp

Related

Java jsp taglib

I frequently saw links to "external tag libraries" in jsp
Ex:
<%# taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
But I couldn't find answers to these questions:
Does use a tag library from an external web location?
Does it query that location every time the tag is used?
Does it download it only once?
when does the download happen?
Can I create my own tag library, and provide a similar external link to others?
Please edit this question if it's wrong, I never really asked questions of this type
A tag library is part of the application, no download is happening at runtime. The URL you see on the JSP page is just a namespace URI to bind the prefix used on the page to the tag library.
Yes, you can create your own tag library.
Please refer bold replies
Does use a tag library from an external web location? No
Does it query that location every time the tag is used? No
Does it download it only once? No download so no query
when does the download happen? Download never happens
Can I create my own tag library, and provide a similar external link to others? Yes
The uri you see the JSP page, is actually referenced from web.xml file, refer to jsp-config.

Java File Doesn't Load in Joomla Site

I am a total newbie in webdesign and I have created a site using the Joomla CMS. However, on a particular page within the site I am trying to launch an interactive calculator that uses java via .class files which are called by an .html file. I used the embedding tag:
<embed src="images/Calculator/classes/examples/PayeCalc.html"
type="application/x-java-applet"
width="1108" height="407">
Nothing shows up on the page however, when I preview it. What am I doing wrong? The .class files are saved in the folder that the .html file is located. Isn't it supposed to call up the files as needed? Why is the page just blank? Can anyone help this newbie to resolve this issue?
Thanks in advance.
Check if your text editor removes the embed tag.
It can happen from the joomla text filters or from the text editor.
Try using JCE text editor and follow the steps described here
Also if you use RSFirewall check this out
Good luck

Show windows directory structure in html using jquery or jsp or javascript.

I want to show windows directory structure in a web page so that user can select a file and upload to server for backup.Using java am able to get all the directory's and files but I don't how to proceed further to show them in web page as in windows directory structure.I already saw many jquery plugins for that.All they are just static.I need a dynamic Tree structure .It must show all user drives,directory's and files. Please help me to find a solution for this.
Thanks in Advance.
Try jQuery File Tree plugin.
Demo

How can I create a file uploader using JSP and servlet?

Recently I thought of creating a file uploader using JSP/Servlet. In the JSP page there will be a link. On clicking the link corresponding action class is called. So when the upload starts I must get the info status on my JSP page. But if the link is clicked again I must show that some message like one import is already running.
Is something like this already available? I don't want to reinvent the wheel.
One of the Jquery File Upload
http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
You may find many more examples if you google it
Jquery has a bunch of file upload javascript libraries. Google it and see for yourself. JQuery is super simple to work with and works with Servlet libraries like Struts. Hope this helps!

Integration of CKEditor in Java

I am trying to integrate CKEditor in Netbeans to my simple web application. I did follow the documentation given in their official site, but cudnt install. It just shows a textarea instead of the editor.
Is there any tutorial on how to integrate or can anyone help me on this?
Thanks,
Shilpa
it seems you are missing to load css & js files. please check again & tell me if css & js files is downloaded & working.
You just have get ckeditor folder from http://ckeditor.com and put it outside the WEB-INF folder.And keep the ckeditor jar file in WEB-INF/lib folder.If you use jsp page get the include this tag in your page
<%# taglib prefix="ckeditor" uri="http://ekeditor.com"%> and in the body section of the html page create one textarea and replace it with <ckeditor:replace parameters />.
If you want to write all the toolbars and events in java and get them into jsp page use script lets and import these libraries. <% import page="com.ckeditor.EventHandler"%>.
If you want more examples on java refer here http://svn.ckeditor.com/CKEditor.Java. Hope this helps.

Categories