blogspot

Friday, August 6, 2010

Tomcat file structure in Eclipse

  • WebContent.
    Regular Web files (HTML, JavaScript, CSS, JSP, images, etc.)
  • WebContent/some-subdirectory
    Web files in subdirectory.
  • WebContent/WEB-INF
    web.xml (used for servlet mappings)
  • WebContent/WEB-INF/lib
    JAR files specific to application.
  • src/(default package)
    Unpackaged (default package) Java code. Using the default package is generally a bad choice in Web apps.
  • src/somePackage
    Java code in somePackage package.
  • Note:
    You can cut/paste or drag/drop existing files into
    appropriate locations, but it is hard to drag files into a Java
    package until you create at least one class first.

Posted by
TobyQingnan


at
9:56 PM






1 comments











Thursday, August 5, 2010

XSSearchEngine do not go to result page (open search)

In the skin file of the search module reference, setup a proper result page id.


Posted by
TobyQingnan


at
8:29 PM






0
comments












Monday, July 19, 2010

log error in DotNetNuke

(new DotNetNuke.Services.Log.EventLog.EventLogController())
.AddLog("Exception", ex.ToString(), DotNetNuke.Entities.Portals.PortalSettings.Current,
-1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT);


Posted by
TobyQingnan


at
4:57 PM






0
comments












Generate a self-signed certificate

makecert -pe -n "cn= http://www.domain.co.nz " -ss my -sr LocalMachine -r " http://www.domain.co.nz " -sky exchange


Posted by
TobyQingnan


at
2:30 PM






0
comments












Thursday, July 8, 2010

Dotnetnuke Logging to the EventLog

First, create an instance of the EventLogViewer…

Dim objEventLog As New DotNetNuke.Services.Log.EventLog.EventLogController

Next, log the event you wish to trap…

objEventLog.AddLog("Sample Message", "Something Interesting Happened!", PortalSettings, -1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)


Posted by
TobyQingnan


at
6:37 PM






0
comments












Friday, July 2, 2010

Blackra1n ASL. dll Error

Go to: C:\ program files\common files\apple\apple application support

Than copy blackra1n into that folder.


Posted by
TobyQingnan


at
5:11 PM






0
comments







Friday, July 2, 2010

Iphone restore error 3194 fix

Navigate to “c:\windows\system32\drivers\etc\” and open the ‘hosts’
file in notepad. To do so, right click on the file and select Open
With->Notepad. At the end of the document, add this string
“74.208.10.249 gs.apple.com”.


Posted by
TobyQingnan


at
5:04 PM






0
comments












Wednesday, June 30, 2010

DNN programmatically login user

PortalSettings currentPortal = PortalController.GetCurrentPortalSettings();

UserLoginStatus loginStatus = new UserLoginStatus();

UserInfo objUser = UserController.ValidateUser(
currentPortal.PortalId,
ConfigurationSettings.AppSettings["DnnLoginUser"],
ConfigurationSettings.AppSettings["DnnLoginPassword"],
"DNN", "",
currentPortal.PortalName, HttpContext.Current.Request.UserHostAddress, ref loginStatus);

if (loginStatus == UserLoginStatus.LOGIN_SUCCESS)
{
UserController.UserLogin
(currentPortal.PortalId,
objUser, currentPortal.PortalName,
HttpContext.Current.Request.UserHostAddress, false);
}


Posted by
TobyQingnan


at
1:55 PM






0
comments












Monday, June 28, 2010

disable enter key

<asp:TextBox onKeyPress="return disableEnterKey(event)"
runat="server" name="txtUserName" ID="txtUserName" MaxLength="20"
Width="135px"></asp:TextBox>

function disableEnterKey(e) {
var key;
if (window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
return (key != 13);
}


Posted by
TobyQingnan


at
9:32 PM






0
comments












Monday, June 14, 2010

Setup Ubuntu as web server


Posted by
TobyQingnan


at
3:31 PM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s